Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/estimate caller balance #19

Closed
wants to merge 2,414 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2414 commits
Select commit Hold shift + click to select a range
c43be6c
les: remove invalid use of t.Fatal in TestHandshake (#21012)
BurtonQin May 1, 2020
510b6f9
accounts/external: convert signature v value to 0/1 (#20997)
holiman May 1, 2020
65cd28a
tests: cleanup snapshot generator goroutine leak
karalabe May 4, 2020
e872083
accounts/abi: removed Kind from Type struct (#21009)
MariusVanDerWijden May 4, 2020
ab72803
accounts/abi: move U256Bytes to common/math (#21020)
MariusVanDerWijden May 4, 2020
5e45db7
Merge pull request #21021 from karalabe/tests-snapshot-gen-cleanup
karalabe May 4, 2020
da59147
core/state/snapshot: release iterator after verification
karalabe May 4, 2020
5876566
Merge pull request #21023 from karalabe/snapshot-verify-iterator-release
karalabe May 4, 2020
c989bca
cmd/utils: renames flags related to http-rpc server (#20935)
renaynay May 5, 2020
4515772
tests: skip consensus test using 1GB RAM
karalabe May 5, 2020
8f8ff8d
cmd/geth: handle memfixes on 32bit arch with large RAM
karalabe May 5, 2020
a52511e
build: raise test timeout back to 10 mins (#21027)
karalabe May 5, 2020
44a3b8c
Merge pull request #21026 from karalabe/disable-highmem-test
karalabe May 5, 2020
933acf3
account/abi: remove superfluous type checking (#21022)
MariusVanDerWijden May 5, 2020
34ed2d8
eth: skip transaction announcer goroutine on eth<65
karalabe May 6, 2020
292570a
Merge pull request #21028 from karalabe/memfix-32bit-arch
karalabe May 6, 2020
b982598
Merge pull request #21032 from karalabe/skip-announce-goroutine-eth64
karalabe May 6, 2020
c2147ee
eth: don't inadvertently enable snapshots in archive nodes (#21025)
ploui May 6, 2020
5cdc2df
trie: fix TestBadRangeProof unit test (#21034)
rjl493456442 May 6, 2020
234cc8e
eth/downloader: minor typo fixes in comments (#21035)
gballet May 6, 2020
39c64d8
core: avoid double-lock in tx_pool_test (#20984)
BurtonQin May 6, 2020
90af6da
core/state/snapshot: don't create storage list for non-existing accounts
karalabe May 6, 2020
87c463c
Merge pull request #21036 from karalabe/snapshot-storage-leak
karalabe May 6, 2020
85944c2
core/state/snapshot: fix typo (#21037)
rjl493456442 May 7, 2020
dd88bd8
accounts/abi/bind: add void if no return args specified (#21002)
MariusVanDerWijden May 7, 2020
1152f45
core/state: include zero-address in state dump if present (#21038)
holiman May 7, 2020
b0b65d0
core/state: abort commit if read errors have occurred (#21039)
holiman May 7, 2020
0423726
ethdb/cdc: Fix op.Apply tests
AusIV May 8, 2020
82f9ed4
core/state: avoid statedb.dbErr due to emptyCode (#21051)
holiman May 8, 2020
5272dd8
Merge branch 'replica-1.9' into feature/freeze-s3
AusIV May 8, 2020
e29e4c2
build: fix CLI params for windows LNK files (#21055)
ligi May 11, 2020
0b2edf0
core/state: make GetCodeSize mirror GetCode implementation wise
karalabe May 11, 2020
263622f
accounts/abi/bind/backend, internal/ethapi: recap gas limit with bala…
rjl493456442 May 11, 2020
37877e8
Merge pull request #21056 from karalabe/statedb-simpler-code
karalabe May 11, 2020
930e82d
params, cmd/utils: remove outdated discv5 bootnodes, deprecate flags …
MariusVanDerWijden May 11, 2020
bd60295
console: fix some crashes/errors in the bridge (#21050)
holiman May 11, 2020
069a7e1
core/rawdb: stop freezer process as part of freezer.Close() (#21010)
AusIV May 11, 2020
6f54ae2
p2p: add 0 port check in dialer (#21008)
fjl May 11, 2020
126ac94
params: bump CHTs for the v1.9.14 release
karalabe May 11, 2020
4535230
cmd, core, eth: background transaction indexing (#20302)
holiman May 11, 2020
40859a2
Merge pull request #21061 from karalabe/cht-1.9.14
karalabe May 11, 2020
df400d4
cmd/geth: Command for reindexinging the freezer
AusIV May 11, 2020
48c773a
replica: Handle the flags system dropping a slash on s3://
AusIV May 11, 2020
ac98ca3
core/rawdb: S3 Freezer Fixes
AusIV May 11, 2020
8d39257
add support for sequential gas estimation
kvhnuke May 12, 2020
63d500a
Merge branch 'master' of github.com:kvhnuke/go-ethereum
kvhnuke May 12, 2020
e280d93
merge
kvhnuke May 12, 2020
2d2482b
fix test errors https://github.com/ethereum/go-ethereum/pull/21062
kvhnuke May 12, 2020
7ace5a3
core: fixup blockchain tests (#21062)
holiman May 12, 2020
53cac02
les: drop the message if the entire p2p connection is stuck (#21033)
rjl493456442 May 12, 2020
aaede53
core/rawdb : log format fix for Unindexing transaction (#21064)
ucwong May 12, 2020
7540c53
core/rawdb: remove unused math (#21065)
ucwong May 12, 2020
7b7e592
miner: support disabling empty blockprecommits form the Go API (#20736)
rjl493456442 May 12, 2020
b8ea904
accounts/abi: accounts/abi/bind: Move topics to abi package (#21057)
MariusVanDerWijden May 12, 2020
0b63915
accounts/abi: allow overloaded argument names (#21060)
MariusVanDerWijden May 12, 2020
7831547
CircleCi: Adding EtherCattle build automation
samuelmattjohnston May 12, 2020
d02301f
core: fix missing receipt on Clique crashes (#21045)
rjl493456442 May 13, 2020
a188a1e
ethstats: stop report ticker in each loop cycle #21070 (#21071)
duanhao0814 May 13, 2020
6d74d1e
params: release go-ethereum v1.9.14
karalabe May 13, 2020
46698d7
params: begin v1.9.15 release cycle
karalabe May 13, 2020
677724a
cmd: fix log contexts (#21077)
SatpalSandhu61 May 13, 2020
1214604
Merge pull request #14 from samuelmattjohnston/circleci-tags
AusIV May 13, 2020
f3f1e59
accounts/abi: simplify reflection logic (#21058)
MariusVanDerWijden May 13, 2020
4e85cbf
node, core/rawdb, cmd/geth: Ensure subcommands can use s3 freezer
AusIV May 13, 2020
3666da8
console: fix unlockAccount argument count check (#21081)
fjl May 14, 2020
bdf1026
Merge v1.9.14 into feature/tx-s3
AusIV May 15, 2020
8fea21e
Misc: Updates for 1.9.14 compatibility
AusIV May 15, 2020
d296074
Merge remote-tracking branch 'mine/replica-1.9' into feature/tx-s3
AusIV May 18, 2020
e0987f6
cmd/clef, signer/core: password input fixes (#20960)
holiman May 19, 2020
d5b7d1c
accounts: add blockByNumberNoLock() to avoid double-lock (#20983)
BurtonQin May 19, 2020
b87dd83
fix previous state error
kvhnuke May 20, 2020
de52df7
lint
kvhnuke May 20, 2020
0a99efa
whisper: use canonical import name of package go-ethereum (#21099)
ucwong May 20, 2020
94fe329
set empty previousState if not set
kvhnuke May 20, 2020
65ce550
trie: extend range proofs with non-existence (#21000)
rjl493456442 May 20, 2020
07c4252
replica: Fix backend test
AusIV May 21, 2020
b4a2681
les, les/lespay: implement new server pool (#20758)
zsfelfoldi May 22, 2020
3a4d3f0
cleanup and create state copy during DoCall
kvhnuke May 22, 2020
64b2d3c
replica: Add snapshot support
AusIV May 23, 2020
e6d4783
replica: Fix tests to work with snapshots
AusIV May 23, 2020
48e3b95
miner: replace use of 'self' as receiver name (#21113)
ucwong May 25, 2020
4f2784b
all: fix typos in comments (#21118)
tbm May 25, 2020
25a661e
consensus/clique: remove redundant pair of parentheses (#21104)
yutianwu May 25, 2020
e868add
core/vm: improve jumpdest lookup (#21123)
holiman May 25, 2020
befecc9
consensus/ethash: fix flaky test by reading seal results (#21085)
meowsbits May 25, 2020
dbf6b8a
cmd/utils: fix default DNS discovery configuration (#21124)
fjl May 25, 2020
2f66a8d
metrics/prometheus: define TYPE once, add tests (#21068)
riptl May 26, 2020
7ddb402
ethdb/leveldb: use timer instead of time.After (#21066)
ucwong May 26, 2020
81e9cae
ethstats: avoid blocking chan when received invalid stats request (#2…
duanhao0814 May 26, 2020
070a5e1
trie: fix for range proof (#21107)
rjl493456442 May 26, 2020
4873a9d
build: upgrade to golangci lint v1.27.0 (#21127)
fjl May 26, 2020
9219e0f
eth: interrupt chain insertion on shutdown (#21114)
fjl May 26, 2020
b2c59e2
consensus/clique: make internal error private (#21132)
six-days May 27, 2020
389da6a
trie: enforce monotonic range in prover and return end marker (#21130)
rjl493456442 May 27, 2020
a5eee8d
eth/downloader: more context in errors (#21067)
holiman May 29, 2020
a35382d
metrics: replace gosigar with gopsutil (#21041)
renaynay Jun 2, 2020
cd57d5c
core/vm: EIP-2315, JUMPSUB for the EVM (#20619)
gcolvin Jun 2, 2020
723bd8c
p2p/discover: move discv4 encoding to new 'v4wire' package (#21147)
fjl Jun 2, 2020
d98c42c
rpc: send websocket ping when connection is idle (#21142)
fjl Jun 2, 2020
5f6f5e3
console: handle undefined + null in console funcs (#21160)
gballet Jun 2, 2020
3f649d4
core: collect NewTxsEvent items without holding reorg lock (#21145)
cheng762 Jun 2, 2020
d3dfc5f
create eth_estimateGasList method
kvhnuke Jun 2, 2020
1d6f0d6
add comments for eth_estimateGasList
kvhnuke Jun 2, 2020
0331a14
enfore gasCap on eth_estimateGasList
kvhnuke Jun 2, 2020
4fc6785
core/vm, crypto/bls12381, params: add bls12-381 elliptic curve precom…
kilic Jun 3, 2020
890757f
cmd, core, params: inital support for yolo-v1 testnet (#21154)
holiman Jun 3, 2020
f52ff0f
cmd/geth: fix the fork orders for DAO tests
karalabe Jun 3, 2020
8b83125
Merge pull request #21162 from karalabe/daofork-order-check-fix
karalabe Jun 3, 2020
8523ad4
core: filter out txs with invalid signatures as soon as possible
duanhao0814 Jun 3, 2020
469b873
acounts/keystore, cmd/faucet: fix faucet double import, fix twitter url
karalabe Jun 4, 2020
201e345
Merge pull request #21172 from karalabe/faucet-twitter-mobile
karalabe Jun 4, 2020
b1b75f0
accounts/keystore, cmd/faucet: return old account to allow unlock
karalabe Jun 4, 2020
cefa2ab
Merge pull request #21173 from karalabe/faucet-delete-oldaccs
karalabe Jun 4, 2020
4b2ff14
go.mod: upgrade go-duktape to hide unused function warning (#21168)
ucwong Jun 4, 2020
9d93535
node: missing comma on toml tags (#21187)
mcortesi Jun 8, 2020
55f30db
core/vm, crypt/bls12381: fixed comments in bls (#21182)
MariusVanDerWijden Jun 8, 2020
88125d8
core: fix typo in comments (#21181)
evertonfraga Jun 8, 2020
0b3f3be
internal/ethapi: return revert reason for eth_call (#21083)
MariusVanDerWijden Jun 8, 2020
a5c827a
params: update CHTs for 1.9.15 release
karalabe Jun 8, 2020
6512334
Merge pull request #21188 from karalabe/cht-1.9.15
karalabe Jun 8, 2020
0f77f34
params: go-ethereum v1.9.15 stable
fjl Jun 8, 2020
da06519
params: begin v1.9.16 release cycle
fjl Jun 8, 2020
45b7535
cmd/ethkey: support --passwordfile in generate command (#21183)
libby Jun 8, 2020
39abd92
ethstats: use timer instead of time.sleep (#20924)
ucwong Jun 8, 2020
cf66745
core/vm: use uint256 in EVM implementation (#20787)
chfast Jun 8, 2020
80e887d
core/state: avoid escape analysis fault when accessing cached state
karalabe Jun 8, 2020
a0797e3
Merge pull request #21192 from karalabe/fix-escape-analysis
karalabe Jun 8, 2020
d5c267f
accounts/keystore: fix typo in error message (#21200)
p4u Jun 9, 2020
89043cb
accounts/abi: make GetType public again (#21157)
natsukagami Jun 9, 2020
e9ba536
eth/downloader: fix spuriously failing tests (#21149)
holiman Jun 9, 2020
4a19c0e
core, eth, internal: include read storage entries in structlog output…
rjl493456442 Jun 10, 2020
e30c0af
build, internal/ethapi, crypto/bls12381: fix typos (#21210)
howjmay Jun 10, 2020
c85fdb7
go.mod: update uint256 to 1.1.0 (#21206)
holiman Jun 11, 2020
9371b2f
internal/web3ext: add missing params to debug.accountRange (#21208)
hackmod Jun 11, 2020
a981b60
eth/downloader: don't use defer for unlock before return (#21227)
six-days Jun 15, 2020
eb9d7d1
Merge pull request #21170 from duanhao0814/fix-dup-ecrecover
karalabe Jun 16, 2020
bcf19bc
core/rawdb: swap tailId and itemOffset for deleted items in freezer (…
zhangsoledad Jun 17, 2020
56a319b
cmd, eth, internal, les: add txfee cap (#21212)
rjl493456442 Jun 17, 2020
e029cc6
go.mod: update snappy dependency (#21237)
ucwong Jun 18, 2020
5435e0d
whisper : use timer.Ticker instead of sleep (#21240)
ucwong Jun 18, 2020
3ebfeb0
core/rawdb: fix high memory usage in freezer (#21243)
AusIV Jun 19, 2020
9a188c9
common/fdlimit: build on DragonflyBSD (#21241)
gballet Jun 19, 2020
dce533c
whisper: fix time.sleep by time.ticker in whisper_test (#21251)
ucwong Jun 23, 2020
42ccb2f
p2p: measure packet throughput too, not just bandwidth
karalabe Jun 24, 2020
c42d139
Merge pull request #21256 from karalabe/p2p-packet-metrics
karalabe Jun 24, 2020
da180ba
cmd/devp2p: add commands for node key management (#21202)
fjl Jun 24, 2020
23f1a0b
crypto/secp256k1: enable 128-bit int code and endomorphism optimizati…
fjl Jun 24, 2020
93142e5
eth: don't block if transaction broadcast loop fails (#21255)
rjl493456442 Jun 24, 2020
b482423
trie: reduce allocs in insertPreimage (#21261)
MariusVanDerWijden Jun 24, 2020
0c82928
core/vm: fix incorrect computation of BLS discount (#21253)
MariusVanDerWijden Jun 24, 2020
413358a
cmd/geth: make import cmd exit with 1 if import errors occurred (#21244)
meowsbits Jun 24, 2020
02cea23
eth: returned revert reason in traceTx (#21195)
MariusVanDerWijden Jun 26, 2020
c13df14
utils: fix ineffectual miner config flags (#21271)
meowsbits Jun 30, 2020
dd91c7c
cmd: abstract `getPassPhrase` functions into one (#21219)
binacs Jun 30, 2020
e376d2f
cmd/evm: add state transition tool for testing (#20958)
holiman Jun 30, 2020
ddeea1e
core: types: less allocations when hashing and tx handling (#21265)
MariusVanDerWijden Jun 30, 2020
b86b1e6
go.mod: bump gopsutil version (#21275)
gballet Jun 30, 2020
1e635bd
go.mod: updated crypto deps causing build failure (#21276)
renaynay Jun 30, 2020
d671dbd
eth/downloader: fixes data race between synchronize and other methods…
MariusVanDerWijden Jun 30, 2020
ec51cbb
cmd/geth: LES priority client test (#20719)
adamschmideg Jul 1, 2020
8dfd66f
rlp: avoid list header allocation in encoder (#21274)
MariusVanDerWijden Jul 1, 2020
af5c97a
core, txpool: less allocations when handling transactions (#21232)
MariusVanDerWijden Jul 1, 2020
12867d1
rpc, internal/ethapi: default rpc gascap at 25M + better error messag…
holiman Jul 1, 2020
7451fc6
internal/ethapi: default gas to maxgascap, not max int64 (#21284)
holiman Jul 2, 2020
04c4e50
ethapi: don't crash when keystore-specific methods are called but ext…
holiman Jul 2, 2020
07a95ce
les/checkpointoracle: don't lookup checkpoint more than once per minu…
holiman Jul 2, 2020
61270e5
eth/gasprice: lighter gas price oracle for light client (#20409)
rjl493456442 Jul 3, 2020
490b380
cmd/geth: allow configuring metrics HTTP server on separate endpoint …
meowsbits Jul 3, 2020
fa01117
build/ci: handle split up listing (#21293)
holiman Jul 4, 2020
6315b6f
rlp: reduce allocations for big.Int and byte array encoding (#21291)
fjl Jul 6, 2020
6d8e51a
cmd, node: dump empty value config (#21296)
rjl493456442 Jul 6, 2020
e5871b9
cmd/clef: Update README with external v6.0.0 & internal v7.0.1 APIs (…
chris-j-h Jul 7, 2020
6a48ae3
cmd/devp2p: add discv4 test suite (#21163)
adamschmideg Jul 7, 2020
c16967c
cmd/clef: Fix broken link in README and other minor fixes (#21303)
chris-j-h Jul 7, 2020
5b1cfde
eth: increase timeout in TestBroadcastBlock (#21299)
holiman Jul 8, 2020
7a556ab
go.mod: upgrade to github.com/golang/snappy with arm64 asm (#21304)
ucwong Jul 8, 2020
967d8de
eth/downloader: fix peer idleness tracking when restarting state sync…
holiman Jul 8, 2020
bcb3087
Revert "core, txpool: less allocations when handling transactions (#2…
fjl Jul 9, 2020
6ccce09
common/math: use math/bits intrinsics for Safe* (#21316)
fjl Jul 9, 2020
beabf95
cmd/geth, cmd/puppeth: replace deprecated rpc and ws flags in tests a…
renaynay Jul 9, 2020
feb40e3
accounts/external: remove dependency on internal/ethapi (#21319)
rjl493456442 Jul 10, 2020
ea3b00a
params: go-ethereum v1.9.16 stable
fjl Jul 10, 2020
b8dd089
params: begin v1.9.17 release cycle
fjl Jul 10, 2020
6eef141
les: historical data garbage collection (#19570)
rjl493456442 Jul 13, 2020
af258ef
light: goimports -w (#21325)
fjl Jul 13, 2020
2e08dad
p2p/discv5: unset pingEcho on pong timeout (#21324)
libotony Jul 13, 2020
6cf6e1d
README.md: point Go API reference link to pkg.go.dev (#21321)
tiendo1011 Jul 13, 2020
4edbc1f
internal/ethapi: cap txfee for SignTransaction and Resend (#21231)
rjl493456442 Jul 13, 2020
7d5267e
.github: Change Code Owners (#21326)
renaynay Jul 13, 2020
79addac
core/rawdb: better log messages for ancient failure (#21327)
rjl493456442 Jul 13, 2020
6ef4495
p2p/discover: require table nodes to have an IP (#21330)
fjl Jul 13, 2020
5b081ab
cmd/clef: change --rpcport to --http.port and update flags in docs (#…
renaynay Jul 14, 2020
594230c
replica, node: Support overlay outside the replica
AusIV Jul 14, 2020
6c9f040
core: transaction pool optimizations (#21328)
holiman Jul 14, 2020
240d185
trie: quell linter in commiter.go (#21329)
gballet Jul 15, 2020
2956937
core/vm: less allocations for various call variants (#21222)
holiman Jul 16, 2020
9e88224
core: raise gas limit in --dev mode, seed blake precompile (#21323)
madjarevicn Jul 16, 2020
508891e
core/vm: use pointers to operations vs. copy by value
karalabe Jul 16, 2020
0fef66c
ethstats: fix reconnection issue, implement primus pings
karalabe Jul 20, 2020
35ddf36
Merge pull request #21347 from karalabe/ethstats-fixes
karalabe Jul 20, 2020
43e2e58
accounts, internal: fix funding check when estimating gas (#21346)
rjl493456442 Jul 20, 2020
748f22c
params: release Geth v1.9.17
karalabe Jul 20, 2020
722b742
params: begin v1.9.18 release cycle
karalabe Jul 20, 2020
3a52c4d
Merge pull request #21336 from karalabe/tiny-ref-optimization
karalabe Jul 21, 2020
4366c45
les: make clientPool.connectedBias configurable (#21305)
binacs Jul 21, 2020
7163a66
ethclient: serialize negative block number as "pending" (#21177)
sammy007 Jul 21, 2020
123864f
whisper/whisperv6: improve test error messages (#21348)
renaynay Jul 21, 2020
9e22e91
cmd/utils: reuse existing genesis in persistent dev mode
karalabe Jul 21, 2020
0b53e48
Merge pull request #21352 from karalabe/dev-noinit-genesis
karalabe Jul 22, 2020
4c268e6
cmd/utils: implement configurable developer (--dev) account options (…
meowsbits Jul 23, 2020
997b552
build: fix GOBIN for gomobile commands (#21361)
fjl Jul 23, 2020
3a57eec
mobile: fix build on iOS (#21362)
fjl Jul 23, 2020
eac2e2d
Merge 1.9.17 with ethercattle fork
AusIV Jul 23, 2020
06c939f
Merge remote-tracking branch 'kvhnuke/master' into merge-1.9.17
AusIV Jul 23, 2020
c5ad0fb
internal/ethapi: Add accidentally omitted replica_api
AusIV Jul 23, 2020
1059221
eth/downloader: refactor downloader + queue (#21263)
holiman Jul 24, 2020
c374447
core: fix queued transaction eviction
villanuevawill May 23, 2020
5413df1
core: fix heartbeat in txpool
rjl493456442 Jul 8, 2020
6793ffa
Merge pull request #21300 from rjl493456442/txpool-fix-queued-evictions
karalabe Jul 24, 2020
56434bf
deps: update uint256 to v1.1.1
holiman Jul 24, 2020
e997f92
Merge pull request #21368 from holiman/update_uint256
karalabe Jul 24, 2020
0720a32
cmd/geth: Wrap up error channel after pruning
AusIV Jun 26, 2020
db97a4f
core/rawdb: Use quit channel in s3freezer
AusIV Jul 6, 2020
9ab8dce
replica: Emit offset messages only when a block is emitted
AusIV Jul 23, 2020
e9ad468
replica: Add removed flag for removed logs
AusIV May 28, 2020
5920f3e
core/rawdb: Fix variable name
AusIV Jul 24, 2020
69127b0
replica: Fix tests
AusIV Jul 24, 2020
16c097d
core/state/snapshot: Add accidentally omitted file
AusIV Jul 24, 2020
440cd04
CircleCi: Add slack-post.sh
samuelmattjohnston May 22, 2020
b1be979
params: upgrade CHTs (#21376)
rjl493456442 Jul 27, 2020
f538259
params: release Geth v1.9.18
karalabe Jul 27, 2020
131736a
Merge tag 'v1.9.18' into merge-1.9.18
AusIV Jul 27, 2020
d2b9c5e
core/rawdb: Close the upload channel after the quit send to avoid rac…
AusIV Jul 27, 2020
8e0189e
cmd/geth: Add back if handling for mining flags
samuelmattjohnston Jul 28, 2020
ebbcaf8
replica: Add ethercattle_estimateGasList into replica
AusIV Aug 5, 2020
da36534
internal/ethapi: Only update statedata on successes
AusIV Aug 5, 2020
2649513
internal/ethapi: Use a copy of the state, rather than the actual state
AusIV Aug 5, 2020
fa63af7
internal/ethapi: Fix testing for ErrIntrinsicGas
AusIV Aug 5, 2020
bb5e833
internal/ethapi: Check result failed state before updating prevs
AusIV Aug 5, 2020
5c1fd69
Merge pull request #17 from NoteGio/bugfix/1918-mining-flags
AusIV Aug 19, 2020
91fff58
cmd/geth: Refactor state migration initialization
AusIV Aug 6, 2020
a65b529
replica: don't set sender balance to maxuint, aligns to geth # #20783
AusIV Aug 20, 2020
a4a528d
replica: Don't warm addresses if syncshutdown is True
AusIV Aug 21, 2020
3d75c8d
internal/ethapi: Optimize gas estimation
AusIV Aug 21, 2020
5175cc1
ethdb/cdc, replica: Allocate partitions equal to available brokers
AusIV Sep 9, 2020
c02edf1
Merge pull request #18 from NoteGio/bugfix/partition-count
samuelmattjohnston Sep 9, 2020
92bac2b
ethdb/cdc: Fix topic max.message.bytes key
AusIV Sep 9, 2020
bbc2f4f
Merge branch 'feature/gasestimationoptimization' into merge-1.9.18
AusIV Sep 9, 2020
6d0ba7f
Merge branch 'bugfix/partition-count' into merge-1.9.18
AusIV Sep 9, 2020
4685ace
internal/ethapi: Use prevState for the caller's balance if available
AusIV Oct 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
accounts/abi: removed Kind from Type struct (ethereum#21009)
* accounts/abi: removed Kind from Type struct

* accounts/abi: removed unused code
  • Loading branch information
MariusVanDerWijden authored May 4, 2020
commit e872083d444eb571ea4ce55553a7d4dcb439474c
12 changes: 6 additions & 6 deletions accounts/abi/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ func formatSliceString(kind reflect.Kind, sliceSize int) string {
// type in t.
func sliceTypeCheck(t Type, val reflect.Value) error {
if val.Kind() != reflect.Slice && val.Kind() != reflect.Array {
return typeErr(formatSliceString(t.Kind, t.Size), val.Type())
return typeErr(formatSliceString(t.Type.Kind(), t.Size), val.Type())
}

if t.T == ArrayTy && val.Len() != t.Size {
return typeErr(formatSliceString(t.Elem.Kind, t.Size), formatSliceString(val.Type().Elem().Kind(), val.Len()))
return typeErr(formatSliceString(t.Elem.Type.Kind(), t.Size), formatSliceString(val.Type().Elem().Kind(), val.Len()))
}

if t.Elem.T == SliceTy || t.Elem.T == ArrayTy {
Expand All @@ -52,8 +52,8 @@ func sliceTypeCheck(t Type, val reflect.Value) error {
}
}

if elemKind := val.Type().Elem().Kind(); elemKind != t.Elem.Kind {
return typeErr(formatSliceString(t.Elem.Kind, t.Size), val.Type())
if elemKind := val.Type().Elem().Kind(); elemKind != t.Elem.Type.Kind() {
return typeErr(formatSliceString(t.Elem.Type.Kind(), t.Size), val.Type())
}
return nil
}
Expand All @@ -66,8 +66,8 @@ func typeCheck(t Type, value reflect.Value) error {
}

// Check base type validity. Element types will be checked later on.
if t.Kind != value.Kind() {
return typeErr(t.Kind, value.Kind())
if t.Type.Kind() != value.Kind() {
return typeErr(t.Type.Kind(), value.Kind())
} else if t.T == FixedBytesTy && t.Size != value.Len() {
return typeErr(t.Type, value.Type())
} else {
Expand Down
22 changes: 11 additions & 11 deletions accounts/abi/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,32 @@ func indirectInterfaceOrPtr(v reflect.Value) reflect.Value {
return v
}

// reflectIntKind returns the reflect using the given size and
// reflectIntType returns the reflect using the given size and
// unsignedness.
func reflectIntKindAndType(unsigned bool, size int) (reflect.Kind, reflect.Type) {
func reflectIntType(unsigned bool, size int) reflect.Type {
if unsigned {
switch size {
case 8:
return reflect.Uint8, uint8T
return uint8T
case 16:
return reflect.Uint16, uint16T
return uint16T
case 32:
return reflect.Uint32, uint32T
return uint32T
case 64:
return reflect.Uint64, uint64T
return uint64T
}
}
switch size {
case 8:
return reflect.Int8, int8T
return int8T
case 16:
return reflect.Int16, int16T
return int16T
case 32:
return reflect.Int32, int32T
return int32T
case 64:
return reflect.Int64, int64T
return int64T
}
return reflect.Ptr, bigT
return bigT
}

// mustArrayToBytesSlice creates a new byte slice with the exact same size as value
Expand Down
14 changes: 2 additions & 12 deletions accounts/abi/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const (
// Type is the reflection of the supported argument type
type Type struct {
Elem *Type
Kind reflect.Kind
Type reflect.Type
Size int
T byte // Our own type checking
Expand Down Expand Up @@ -94,14 +93,12 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
if len(intz) == 0 {
// is a slice
typ.T = SliceTy
typ.Kind = reflect.Slice
typ.Elem = &embeddedType
typ.Type = reflect.SliceOf(embeddedType.Type)
typ.stringKind = embeddedType.stringKind + sliced
} else if len(intz) == 1 {
// is a array
typ.T = ArrayTy
typ.Kind = reflect.Array
typ.Elem = &embeddedType
typ.Size, err = strconv.Atoi(intz[0])
if err != nil {
Expand Down Expand Up @@ -139,34 +136,29 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
// varType is the parsed abi type
switch varType := parsedType[1]; varType {
case "int":
typ.Kind, typ.Type = reflectIntKindAndType(false, varSize)
typ.Type = reflectIntType(false, varSize)
typ.Size = varSize
typ.T = IntTy
case "uint":
typ.Kind, typ.Type = reflectIntKindAndType(true, varSize)
typ.Type = reflectIntType(true, varSize)
typ.Size = varSize
typ.T = UintTy
case "bool":
typ.Kind = reflect.Bool
typ.T = BoolTy
typ.Type = reflect.TypeOf(bool(false))
case "address":
typ.Kind = reflect.Array
typ.Type = addressT
typ.Size = 20
typ.T = AddressTy
case "string":
typ.Kind = reflect.String
typ.Type = reflect.TypeOf("")
typ.T = StringTy
case "bytes":
if varSize == 0 {
typ.T = BytesTy
typ.Kind = reflect.Slice
typ.Type = reflect.SliceOf(reflect.TypeOf(byte(0)))
} else {
typ.T = FixedBytesTy
typ.Kind = reflect.Array
typ.Size = varSize
typ.Type = reflect.ArrayOf(varSize, reflect.TypeOf(byte(0)))
}
Expand Down Expand Up @@ -199,7 +191,6 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
}
}
expression += ")"
typ.Kind = reflect.Struct
typ.Type = reflect.StructOf(fields)
typ.TupleElems = elems
typ.TupleRawNames = names
Expand All @@ -217,7 +208,6 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
}

case "function":
typ.Kind = reflect.Array
typ.T = FunctionTy
typ.Size = 24
typ.Type = reflect.ArrayOf(24, reflect.TypeOf(byte(0)))
Expand Down
Loading