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

[R4R] Upgrade to 1.10.3 #152

Merged
merged 935 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
935 commits
Select commit Hold shift + click to select a range
c4a2b68
cmd/geth: add db commands stats, compact, put, get, delete (#22014)
holiman Feb 23, 2021
142fbcf
internal/ethapi: reject non-replay-protected txs over RPC (#22339)
MariusVanDerWijden Feb 23, 2021
2d1a0e9
accounts/abi/bind: fix up Go mod files for Go 1.16
karalabe Feb 23, 2021
2743fb0
Dockerfile: bump to Go 1.16 base images
karalabe Feb 23, 2021
4ee8d2d
travis, appveyor, build, Dockerfile: bump Go to 1.16 (#22351)
karalabe Feb 23, 2021
cdb6a84
Merge pull request #22350 from karalabe/disable-preimage-collection
karalabe Feb 23, 2021
c9aa267
travis: bump Android NDK version
karalabe Feb 23, 2021
b502c86
Merge pull request #22368 from karalabe/ndk-bump
karalabe Feb 23, 2021
70afe15
travis: bump builders to Bionic
karalabe Feb 23, 2021
bf5b379
Merge pull request #22369 from karalabe/android-bionic-builder
karalabe Feb 23, 2021
f54dc4a
travis: manually install Android since Travis is stale (#22373)
karalabe Feb 24, 2021
8e547ee
cmd/utils: remove deprecated command line flags (#22263)
renaynay Feb 24, 2021
b2b5c82
eth/protocols/snap: lower abortion and resumption logs to debug
karalabe Feb 25, 2021
96d9306
Merge pull request #22381 from karalabe/lower-error-log
karalabe Feb 25, 2021
378e961
cmd, eth, les: enable serving light clients when non-synced (#22250)
rjl493456442 Feb 25, 2021
7a3c890
les, light: improve txstatus retrieval (#22349)
rjl493456442 Feb 25, 2021
bbfb1e4
all: add support for EIP-2718, EIP-2930 transactions (#21502)
lightclient Feb 25, 2021
de9465f
cmd/devp2p: add eth66 test suite (#22363)
renaynay Feb 25, 2021
dc109cc
les: move server pool to les/vflux/client (#22377)
zsfelfoldi Feb 25, 2021
0928562
all: define Berlin hard fork spec
karalabe Feb 25, 2021
27b3137
rpc: add separate size limit for websocket (#22385)
fjl Feb 26, 2021
744707a
Merge pull request #22380 from karalabe/berlin
karalabe Feb 26, 2021
3822b09
accounts/keystore: use github.com/google/uuid (#22217)
MariusVanDerWijden Feb 26, 2021
498458b
core/state: fix eta calculation on pruning (#22386)
holiman Feb 26, 2021
d968704
les: UDP pre-negotiation of available server capacity (#22183)
zsfelfoldi Mar 1, 2021
19d7a37
core/rawdb: fix the transaction indexer (#22395)
rjl493456442 Mar 1, 2021
7834e4a
core, eth: unship EIP 2315
karalabe Mar 2, 2021
430f69e
core/vm/runtime: more unshipping
karalabe Mar 2, 2021
0540d3c
cmd/geth: put allowUnsecureTx flag in RPC section (#22412)
MariusVanDerWijden Mar 3, 2021
c539a05
params: update chts (#22418)
rjl493456442 Mar 3, 2021
07e907c
cmd/utils: fix txlookuplimit for archive node (#22419)
rjl493456442 Mar 3, 2021
ba99910
core/forkid, params: unset Berlin fork number (#22413)
karalabe Mar 3, 2021
b24804d
les: fix nodiscover option on the client side (#22422)
zsfelfoldi Mar 3, 2021
5a81dd9
cmd: retire whisper flags (#22421)
rjl493456442 Mar 3, 2021
cd316d7
tests: update to latest tests (#22290)
MariusVanDerWijden Mar 3, 2021
56dec25
params: release geth 1.10.0 stable
fjl Mar 3, 2021
6338537
params: begin v1.10.1 release cycle
fjl Mar 3, 2021
9230ca4
Revert "core/forkid, params: unset Berlin fork number (#22413)"
karalabe Mar 4, 2021
de61da9
build: fix PPA failure due to updated debsrc
karalabe Mar 4, 2021
89026d5
Merge pull request #22431 from karalabe/builder-fix-ppa
karalabe Mar 4, 2021
5b95453
build: add support for Ubuntu Hirsute Hippo
karalabe Mar 4, 2021
dab90e4
Merge pull request #22432 from karalabe/add-hirsute
karalabe Mar 4, 2021
658cb9f
Merge pull request #22414 from karalabe/unship-2315
karalabe Mar 7, 2021
44c0bb2
Merge pull request #22426 from ethereum/revert-22413-unship-berlin
karalabe Mar 7, 2021
72b8cac
tests: update reference tests with 2315 removed from Berlin
holiman Mar 7, 2021
5aba946
Merge pull request #22452 from holiman/testupdate_berlin
karalabe Mar 7, 2021
c2d2f4e
params: release Geth v1.10.1
karalabe Mar 8, 2021
1826708
params: begin v1.10.2 release cycle
karalabe Mar 8, 2021
be87f76
core/types: reduce allocations in GasPriceCmp (#22456)
MariusVanDerWijden Mar 8, 2021
3d299b7
les: fix errors in metric namespace (#22459)
holiman Mar 9, 2021
22082f9
cmd: extend dumpgenesis to support network flags on the cmd (#22406)
rjl493456442 Mar 9, 2021
aae7660
p2p/enr: fix decoding of incomplete lists (#22484)
fjl Mar 11, 2021
6387c52
cmd/geth: add ancient datadir flag to snapshot subcommands (#22486)
michael1011 Mar 12, 2021
3f74c8e
cmd/devp2p: better testcase failure output for ethtests (#22482)
holiman Mar 13, 2021
c6d4500
eth, les: properly init statedb accesslist during tracing (#22480)
holiman Mar 14, 2021
faacc8e
cmd/geth, eth/downloader: remove copydb command (#22501)
holiman Mar 15, 2021
bc47993
tests/fuzzers: fix goroutine leak in les fuzzer (#22455)
holiman Mar 16, 2021
9983072
core/types: improve comments in new EIP-2718 code (#22402)
lightclient Mar 16, 2021
7076e8e
cmd/clef: docs - link to ethereum org repo (#22400)
ligi Mar 16, 2021
7cbf1d7
cmd/clef (docs): fix image background (#22399)
ligi Mar 16, 2021
94ab4ea
core/rawdb: fix transaction indexing/unindexing hashing error (#22457)
holiman Mar 16, 2021
62d8022
les: fix UDP connection query (#22451)
zsfelfoldi Mar 16, 2021
6d9707a
les: fix UDP connection query (#22451)
zsfelfoldi Mar 16, 2021
91726e8
les: allow either full enode strings or raw hex ids in the API (#22423)
zsfelfoldi Mar 16, 2021
410089a
eth/protocols/snap, eth/downloader: don't use bloom filter in snap sync
holiman Mar 17, 2021
117fa7d
eth/protocols/snap: fix typo (#22530)
r1cs Mar 19, 2021
6a528fc
cmd/devp2p/internal/ethtest: return request ID in BlockHeaders respon…
renaynay Mar 19, 2021
aa8b218
ethclient: fix error handling for header test (#22514)
meowsbits Mar 19, 2021
38ea7f2
accounts/abi/bind: add NoSend transact option (#22446)
reds Mar 19, 2021
a90861a
go.mod: upgrade goleveldb to commit 64b5b1c (#22436)
ucwong Mar 19, 2021
345890a
go.mod: upgrade goupnp to commit 0ca76305 (#22479)
ucwong Mar 19, 2021
d50e9d2
consensus/ethash: remove unnecessary variable definition (#22512)
jacksoom Mar 19, 2021
e3a3f7c
cmd/devp2p: use AWS-SDK v2 (#22360)
qhenkart Mar 19, 2021
5bc0343
p2p/dnsdisc: fix flaw in dns size calculation (#22533)
holiman Mar 19, 2021
c454717
core: fix potential race in chainIndexerTest (#22346)
s1na Mar 19, 2021
d3040a8
cmd/devp2p/internal/ethtest: skip eth/66 tests when v66 not supported…
renaynay Mar 19, 2021
9429ab1
cmd/devp2p: add flag for AWS region (#22537)
fjl Mar 19, 2021
5bf6612
cmd/devp2p: fix error in updating the cursor when collecting records …
holiman Mar 20, 2021
36b51b8
cmd/devp2p: add old block announcement test to eth test suite (#22474)
renaynay Mar 20, 2021
ec73ec0
cmd/utils: fix compilation issue on openbsd (#22511)
tobias-hildebrandt Mar 20, 2021
eaccdba
core: fix method comment for `txpool.requestReset` (#22543)
derekchiang Mar 22, 2021
aab3560
accounts: eip-712 signing for ledger (#22378)
MrChico Mar 22, 2021
0c70b83
all: add read-only option to database (#22407)
rjl493456442 Mar 22, 2021
8d6cc16
cmd/geth: check block range against chain head in export cmd (#22387)
s1na Mar 22, 2021
a31f6d5
core/state/snapshot: fix panic on missing parent
karalabe Mar 22, 2021
f304290
Merge pull request #22551 from karalabe/snapshot-parent-get-panic
karalabe Mar 22, 2021
477ec75
Merge pull request #22513 from holiman/no_snap_bloom
karalabe Mar 23, 2021
e862cbf
internal/web3ext, node: migrate node admin API (Start|Stop)RPC->HTTP …
meowsbits Mar 23, 2021
5129cdc
cmd/devp2p: skip ENR field tails properly in nodeset filter (#22565)
fjl Mar 24, 2021
15e6c27
p2p: fix minor typo and remove fd parameter in checkInboundConn (#22547)
terasum Mar 24, 2021
ab8fd4d
p2p/dnsdisc: rate limit resolving before checking cache (#22566)
fjl Mar 24, 2021
c5df05b
eth/protocols/snap: fix the flaws in the snap sync (#22553)
rjl493456442 Mar 24, 2021
0fda25e
eth/tracers, core: use scopecontext in tracers, provide statedb in ca…
holiman Mar 25, 2021
497448b
core: fix condition on header verification
holiman Mar 25, 2021
bed74b3
cmd/devp2p: fix comparison of TXT record value (#22572)
fjl Mar 25, 2021
4adf0b9
Merge pull request #22573 from holiman/checkfreq
karalabe Mar 25, 2021
54c0d57
eth: dump rpc gas cap and tx fee cap (#22574)
MariusVanDerWijden Mar 25, 2021
6d7ff6a
eth/protocols, metrics, p2p: add handler performance metrics
karalabe Mar 26, 2021
efe0229
Merge pull request #22581 from karalabe/network-latency-monitoring
karalabe Mar 26, 2021
2550e46
eth/protocols, metrics: use resetting histograms for rare packets
karalabe Mar 26, 2021
6477ea6
Merge pull request #22586 from karalabe/resettting-histogram
karalabe Mar 26, 2021
9557271
eth: fix corner case in sync head determination (#21695)
zouguangxian Mar 26, 2021
cae6b55
cmd/geth, consensus/ethash: add support for --miner.notify.full flag …
fjl Mar 26, 2021
62379f0
metrics/influxdb: don't push empty histograms, no measurement != 0
karalabe Mar 26, 2021
063f78c
Merge pull request #22590 from karalabe/nil-histogram
karalabe Mar 26, 2021
099be04
eth/protocols/snap: add peer id and req id to the timeout logs
karalabe Mar 26, 2021
e7f3962
Merge pull request #22591 from karalabe/snap-detailed-timeout-logs
karalabe Mar 26, 2021
27056f6
cmd/devp2p: update to newer cloudflare API client (#22588)
fjl Mar 26, 2021
76700ac
core/state/pruner: move the compaction out of the pruning procedure (…
rjl493456442 Mar 29, 2021
7644795
eth/protocols/snap: try to prevent requests timing out
holiman Mar 29, 2021
b6912c1
core: add BlockGen.GetBalance method (#22589)
renaynay Mar 29, 2021
24588ba
cmd/puppeth: specify working directory for nodejs 15 (#22549)
MariusVanDerWijden Mar 29, 2021
43a3768
Merge pull request #22596 from holiman/snap_timelimits
karalabe Mar 30, 2021
59ac3c9
cmd/geth: add db dumptrie command (#22563)
holiman Mar 30, 2021
44fe466
core/vm: fix Byzantium address list (#22603)
nebojsa94 Mar 30, 2021
3faae5d
ethstats: avoid creating subscriptions on background goroutine (#22587)
MariusVanDerWijden Mar 30, 2021
61ff3e8
core/state/snapshot, ethdb: track deletions more accurately (#22582)
karalabe Mar 30, 2021
4a37ae5
rpc: tighter shutdown synchronization in client subscription (#22597)
fjl Mar 30, 2021
55300d4
all: fix miner hashRate -> hashrate on API calls
karalabe Mar 31, 2021
73ed689
Merge pull request #22604 from karalabe/hashrate-capitalization-fix
karalabe Mar 31, 2021
c79fc20
core/state/snapshot: fix data race in diff layer (#22540)
fxfactorial Apr 6, 2021
706683e
internal/ethapi: fix eth_chainId method (#22243)
piersy Apr 6, 2021
adf09ae
graphql: add support for tx types and tx access lists (#22491)
AmitBRD Apr 6, 2021
5338ce4
internal/debug: add JSON log format and rename logging flags (#22341)
s1na Apr 6, 2021
95219ae
cmd/utils: move cache sanity check to SetEthConfig (#22510)
petesimard Apr 6, 2021
e275b1a
consensus/ethash: replace a magic number with it's constant (#22618)
Evolution404 Apr 6, 2021
2d89fe0
les: move client pool to les/vflux/server (#22495)
zsfelfoldi Apr 6, 2021
a600dab
eth, les: fix tracers (#22473)
rjl493456442 Apr 7, 2021
9d10856
core, eth, internal/ethapi: create access list RPC API (#22550)
MariusVanDerWijden Apr 7, 2021
2a7c4b6
eth: fix tracing state retrieval if requesting the non-dirty genesis
karalabe Apr 7, 2021
264fff7
Merge pull request #22629 from karalabe/fix-chain-tracing-from-0
karalabe Apr 7, 2021
e3ff37c
params: update CHTs for v1.10.2
karalabe Apr 8, 2021
a665f5d
Merge pull request #22632 from karalabe/cht-1.10.2
karalabe Apr 8, 2021
97d11b0
params: release go-ethereum v1.10.2 stable
fjl Apr 8, 2021
04dcc93
params: begin v1.10.3 release cycle
fjl Apr 8, 2021
fe1586b
eth, les: drop support for eth/64, fix eth/66 tests
karalabe Apr 8, 2021
9c653ff
Merge pull request #22636 from karalabe/drop-eth64
karalabe Apr 9, 2021
6c27d8f
accounts: documentation fixes (#22645)
balajipachai Apr 13, 2021
271e5b7
cmd/geth: add db-command to inspect freezer index (#22633)
holiman Apr 13, 2021
72e3794
cmd/faucet: support testnet flags in the faucet (#22545)
maxsam4 Apr 13, 2021
a50251e
eth/fetcher: avoid spurious timer events at startup (#22652)
r1cs Apr 14, 2021
7088f1e
core, eth: faster snapshot generation (#22504)
rjl493456442 Apr 14, 2021
d5e5794
core/types: drop some relice data types
karalabe Apr 14, 2021
d8ff53d
Merge pull request #22666 from karalabe/remove-stale-datatype
karalabe Apr 14, 2021
1e20734
all: make logs a bit easier on the eye to digest (#22665)
karalabe Apr 15, 2021
9553c98
eth/protocols/snap: use ephemeral channels to avoid cross-sync delveries
karalabe Apr 15, 2021
3cfd0fe
core: add TestGenesisHashes and fix YoloV3 (#22559)
meowsbits Apr 15, 2021
061cd50
upgrade to 1.10.2
yutianwu Apr 16, 2021
cc8efd1
revert changes
yutianwu Apr 16, 2021
7414a95
fix faucet
yutianwu Apr 16, 2021
8c32b58
fix readme
yutianwu Apr 16, 2021
fda93f6
log: fix formatting of big.Int (#22679)
fjl Apr 16, 2021
f8afb68
Merge pull request #22678 from karalabe/snap-ephemeral-channels
karalabe Apr 16, 2021
65689e7
les/vflux/server: fix priority cornercase causing fuzzer timeout (#22…
zsfelfoldi Apr 16, 2021
4f3ba67
trie: make stacktrie not mutate input values (#22673)
holiman Apr 16, 2021
09d44e9
core/state/snapshot: avoid copybytes for stacktrie
holiman Apr 16, 2021
f79cce5
eth/catalyst: add catalyst API prototype (#22641)
gballet Apr 16, 2021
e43ac53
Merge pull request #22686 from holiman/minor_fixes
karalabe Apr 18, 2021
4246565
cmd/devp2p: add support for -limit option in nodeset filter command (…
fjl Apr 19, 2021
653b7e9
cmd/devp2p: add dns nuke-route53 command (#22695)
fjl Apr 19, 2021
d6ffa14
core: nuke legacy snapshot supporting (#22663)
rjl493456442 Apr 20, 2021
d7bfb97
ethash: no block reward in catalyst mode (#22697)
gballet Apr 20, 2021
581539c
trie: make stacktrie support binary marshal/unmarshal (#22685)
holiman Apr 20, 2021
beee6b7
go.mod: upgrade gopsutils to v3.21.4 (#22693)
gballet Apr 20, 2021
cc33398
tests: disable blockchain tests based on general state tests (#22704)
holiman Apr 20, 2021
dd9c322
eth, internal: extend the TraceCall API (#22245)
rjl493456442 Apr 21, 2021
96828c9
eth/tracers, internal/ethapi: fix typos causing lint issue (#22711)
rjl493456442 Apr 21, 2021
3e68d62
les: fix goroutine leaks in tests (#22707)
holiman Apr 21, 2021
4b783c0
trie: improve the node iterator seek operation (#22470)
holiman Apr 21, 2021
67da83a
accounts/external, signer/core: add support for EIP-2930 transactions…
holiman Apr 21, 2021
9357280
rpc: add HTTPError type for HTTP error responses (#22677)
Apr 21, 2021
1fb9a6d
eth/protocols, prp/tracker: add support for req/rep rtt tracking (#22…
karalabe Apr 22, 2021
ea54c58
cmd/devp2p/internal/ethtest: run test suite as Go unit test (#22698)
renaynay Apr 23, 2021
148c9ff
revert bug fix in 1.9.17
yutianwu Apr 23, 2021
49281ab
core/state/snapshot, true: reuse dirty data instead of hitting disk w…
holiman Apr 23, 2021
cac1b21
cmd/devp2p/internal/ethtest: add more tx propagation tests (#22630)
renaynay Apr 23, 2021
34f3c95
p2p/discover: improve discv5 handling of IPv4-in-IPv6 addresses (#22703)
nisdas Apr 23, 2021
83375b0
core: remove old conversion to shuffle leveldb blocks into ancients
holiman Apr 26, 2021
9b99e3d
core/rawdb: fix datarace in freezer (#22728)
holiman Apr 26, 2021
854f068
les: polish code (#22625)
rjl493456442 Apr 27, 2021
a3f0da1
build: upgrade to golangci-lint v1.39.0 (#22696)
fjl Apr 27, 2021
85a0bab
Merge pull request #21467 from holiman/minor_ethashfix
karalabe Apr 27, 2021
ad983b3
cmd/puppeth: add support for authentication via ssh agent (#22634)
lightclient Apr 27, 2021
a0a99e6
build: upgrade -dlgo version to Go 1.16.3 (#22746)
fjl Apr 27, 2021
65a1c2d
core/vm: make gas cost reporting to tracers correct (#22702)
holiman Apr 27, 2021
caea6c4
eth/protocols/snap: generate storage trie from full dirty snap data (…
karalabe Apr 27, 2021
45fca44
p2p/tracker: properly clean up fulfilled requests
holiman Apr 27, 2021
55043ee
Merge pull request #22751 from holiman/tracker_fix
karalabe Apr 27, 2021
ff3535e
p2p/tracker: only reschedule wake if previous didn't run
karalabe Apr 27, 2021
d9c9ee5
Merge pull request #22753 from karalabe/p2p-tracker-stopfix
karalabe Apr 27, 2021
0c99868
cmd/devp2p, eth/protocols/eth: fix tests + make sanity checks earlier…
holiman Apr 28, 2021
256c5d6
eth/gasprice: improve stability of estimated price (#22722)
GregTheGreek Apr 28, 2021
9e5bb84
tests/fuzzers: crypto/bn256 and crypto/bls12381 tests against gnark-c…
gbotrel Apr 28, 2021
6d7c956
les, tests: fix les clientpool (#22756)
rjl493456442 Apr 28, 2021
558bff4
eth/protocols/snap: lower the packet size to avoid overloading link
karalabe Apr 28, 2021
e4270ca
cmd/devp2p: fix flaky SameRequestID test (#22754)
renaynay Apr 28, 2021
abb6cfa
Merge pull request #22761 from karalabe/snap-small-packets
karalabe Apr 28, 2021
a81cf0d
trie: remove redundant returns + use stacktrie where applicable (#22760)
holiman Apr 28, 2021
2ac3f4c
Merge pull request #165 from binance-chain/upgrade_revert_fork
unclezoro Apr 29, 2021
c92a53d
add more logs
unclezoro Apr 29, 2021
fae165a
core, eth, ethdb, trie: simplify range proofs
karalabe Apr 28, 2021
64b60c7
Merge pull request #22762 from karalabe/snap-lower-complexity
karalabe Apr 29, 2021
06f44c0
eth: restore eth_hashrate API endpoint
karalabe Apr 29, 2021
871f50b
Merge pull request #22765 from karalabe/revert-eth-hashrate
karalabe Apr 29, 2021
c7d0729
catalyst: check if block exists in assemble-block call with unknown p…
protolambda Apr 29, 2021
793c8f8
add myself as code owner for catalyst (#22778)
gballet Apr 29, 2021
56f533d
docs: fix docstring on read head block (#22776)
aaronbuchwald Apr 29, 2021
63bad18
evm: remove unused errors left after EIP-2315 removal (#22767)
chfast Apr 29, 2021
b50b17a
github: add note about screenshots in issue template (#22764)
ligi Apr 29, 2021
bb43cd7
core/types: add license header (#22781)
aaronbuchwald Apr 29, 2021
8130dd5
core/vm: fix typo in comment (#22785)
aaronbuchwald Apr 30, 2021
1e57ab5
core: remove unused else branch in reorg (#22783)
aaronbuchwald Apr 30, 2021
dde6cb0
core/vm: replace repeated string with variable in tests (#22774)
aaronbuchwald Apr 30, 2021
b778e37
core: fix typo in comment (#22773)
aaronbuchwald Apr 30, 2021
ff75b21
README.md: update commands table, add note about web3.js version (#22…
holiman Apr 30, 2021
f66f1a1
eth/filters: fix comment on PublicFilterAPI timeoutLoop (#22782)
aaronbuchwald Apr 30, 2021
bbb57fd
core/state: remove toAddr helper in tests (#22772)
aaronbuchwald Apr 30, 2021
745757a
core, eth: abort snapshot generation on snap sync and resume later
karalabe Apr 29, 2021
8681a25
Merge pull request #22777 from karalabe/snapshots-abort-resume-on-sync
karalabe Apr 30, 2021
52b5d2d
eth/protocols/snap: use storage batch, not account batch in st task
karalabe Apr 30, 2021
afc1abd
Merge pull request #22789 from karalabe/snap-fix-batch
karalabe Apr 30, 2021
8ff9810
cmd/devp2p: fix flakey tests in CI (#22757)
renaynay Apr 30, 2021
0e00ee4
core/vm: clean up contract creation error handling (#22766)
chfast May 1, 2021
ca9c576
core/vm: fix interpreter comments (#22797)
aaronbuchwald May 3, 2021
afb097e
params: remove dependency on crypto (#22788)
fjl May 3, 2021
8f94fc2
cmd/utils: don't crash on nonexistent datadir (#22738)
MariusVanDerWijden May 3, 2021
fc1c1cb
Merge pull request #22739 from holiman/remove_code
karalabe May 3, 2021
856c379
eth: don't print db upgrade warning on db init
karalabe May 3, 2021
640d2c5
Merge pull request #22803 from karalabe/silence-scary-warning
karalabe May 4, 2021
b8040a4
cmd/utils: use eth DNS tree for snap discovery (#22808)
fjl May 4, 2021
effaf18
build: improve cross compilation setup (#22804)
fjl May 4, 2021
3d42dd1
tolerate unindex tx light client
unclezoro May 4, 2021
b37e445
add disk layer as the last layer when prune
unclezoro May 4, 2021
d107f90
go.mod: go mod tidy (#22814)
fjl May 4, 2021
973ad66
build: fix iOS framework build (#22813)
fjl May 4, 2021
3a2b29c
appveyor.yml: upgrade to VisualStudio 2019 image (#22811)
fjl May 4, 2021
41671d4
build: fix windows installer build for NSIS v3.05 (#22821)
fjl May 5, 2021
0f3a1e7
cmd/devp2p/internal/ethtest: send simultaneous requests on one connec…
renaynay May 5, 2021
991384a
params: go-ethereum v1.10.3 stable
fjl May 5, 2021
334b6ad
fix conflicts
yutianwu May 6, 2021
2605189
Merge pull request #187 from binance-chain/upgrade_1.10.3
unclezoro May 6, 2021
0316072
Merge pull request #186 from binance-chain/upgrade_tmp
unclezoro May 6, 2021
f3ad96d
fix conflicts
yutianwu May 7, 2021
3ddedad
fix comments
yutianwu May 7, 2021
a4bb482
bump version to 1.1.0
yutianwu May 7, 2021
d331344
fix conflicts
yutianwu May 8, 2021
9188475
update version
yutianwu May 10, 2021
75447df
update hardware requirement
unclezoro May 10, 2021
5a1338f
change log to debug when gas limti exceet 25M
unclezoro May 10, 2021
3ab97c2
disable log of snap update
unclezoro May 10, 2021
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
cmd/devp2p/internal/ethtest: add more tx propagation tests (#22630)
This adds a test for large tx announcement messages, as well as a test to
check that announced tx hashes are requested by the node.
  • Loading branch information
renaynay committed Apr 23, 2021
commit cac1b21d392370f8768a9ee45a9a10c0b5ddcc9b
97 changes: 81 additions & 16 deletions cmd/devp2p/internal/ethtest/eth66_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package ethtest
import (
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
Expand Down Expand Up @@ -125,22 +126,7 @@ func (s *Suite) TestSimultaneousRequests_66(t *utesting.T) {
// TestBroadcast_66 tests whether a block announcement is correctly
// propagated to the given node's peer(s) on the eth66 protocol.
func (s *Suite) TestBroadcast_66(t *utesting.T) {
sendConn, receiveConn := s.setupConnection66(t), s.setupConnection66(t)
defer sendConn.Close()
defer receiveConn.Close()

nextBlock := len(s.chain.blocks)
blockAnnouncement := &NewBlock{
Block: s.fullChain.blocks[nextBlock],
TD: s.fullChain.TD(nextBlock + 1),
}
s.testAnnounce66(t, sendConn, receiveConn, blockAnnouncement)
// update test suite chain
s.chain.blocks = append(s.chain.blocks, s.fullChain.blocks[nextBlock])
// wait for client to update its chain
if err := receiveConn.waitForBlock66(s.chain.Head()); err != nil {
t.Fatal(err)
}
s.sendNextBlock66(t)
}

// TestGetBlockBodies_66 tests whether the given node can respond to
Expand Down Expand Up @@ -426,3 +412,82 @@ func (s *Suite) TestSameRequestID_66(t *utesting.T) {
// check response from first request
headersMatch(t, s.chain, s.getBlockHeaders66(t, conn, req1, reqID))
}

// TestLargeTxRequest_66 tests whether a node can fulfill a large GetPooledTransactions
// request.
func (s *Suite) TestLargeTxRequest_66(t *utesting.T) {
// send the next block to ensure the node is no longer syncing and is able to accept
// txs
s.sendNextBlock66(t)
// send 2000 transactions to the node
hashMap, txs := generateTxs(t, s, 2000)
sendConn := s.setupConnection66(t)
defer sendConn.Close()

sendMultipleSuccessfulTxs(t, s, sendConn, txs)
// set up connection to receive to ensure node is peered with the receiving connection
// before tx request is sent
recvConn := s.setupConnection66(t)
defer recvConn.Close()
// create and send pooled tx request
hashes := make([]common.Hash, 0)
for _, hash := range hashMap {
hashes = append(hashes, hash)
}
getTxReq := &eth.GetPooledTransactionsPacket66{
RequestId: 1234,
GetPooledTransactionsPacket: hashes,
}
if err := recvConn.write66(getTxReq, GetPooledTransactions{}.Code()); err != nil {
t.Fatalf("could not write to conn: %v", err)
}
// check that all received transactions match those that were sent to node
switch msg := recvConn.waitForResponse(s.chain, timeout, getTxReq.RequestId).(type) {
case PooledTransactions:
for _, gotTx := range msg {
if _, exists := hashMap[gotTx.Hash()]; !exists {
t.Fatalf("unexpected tx received: %v", gotTx.Hash())
}
}
default:
t.Fatalf("unexpected %s", pretty.Sdump(msg))
}
}

// TestNewPooledTxs_66 tests whether a node will do a GetPooledTransactions
// request upon receiving a NewPooledTransactionHashes announcement.
func (s *Suite) TestNewPooledTxs_66(t *utesting.T) {
// send the next block to ensure the node is no longer syncing and is able to accept
// txs
s.sendNextBlock66(t)
// generate 50 txs
hashMap, _ := generateTxs(t, s, 50)
// create new pooled tx hashes announcement
hashes := make([]common.Hash, 0)
for _, hash := range hashMap {
hashes = append(hashes, hash)
}
announce := NewPooledTransactionHashes(hashes)
// send announcement
conn := s.setupConnection66(t)
defer conn.Close()
if err := conn.Write(announce); err != nil {
t.Fatalf("could not write to connection: %v", err)
}
// wait for GetPooledTxs request
for {
_, msg := conn.readAndServe66(s.chain, timeout)
switch msg := msg.(type) {
case GetPooledTransactions:
if len(msg) != len(hashes) {
t.Fatalf("unexpected number of txs requested: wanted %d, got %d", len(hashes), len(msg))
}
return
case *NewPooledTransactionHashes:
// ignore propagated txs from old tests
continue
default:
t.Fatalf("unexpected %s", pretty.Sdump(msg))
}
}
}
90 changes: 69 additions & 21 deletions cmd/devp2p/internal/ethtest/eth66_suiteHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ func (c *Conn) read66() (uint64, Message) {
msg = new(Transactions)
case (NewPooledTransactionHashes{}).Code():
msg = new(NewPooledTransactionHashes)
case (GetPooledTransactions{}.Code()):
ethMsg := new(eth.GetPooledTransactionsPacket66)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return 0, errorf("could not rlp decode message: %v", err)
}
return ethMsg.RequestId, GetPooledTransactions(ethMsg.GetPooledTransactionsPacket)
case (PooledTransactions{}.Code()):
ethMsg := new(eth.PooledTransactionsPacket66)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return 0, errorf("could not rlp decode message: %v", err)
}
return ethMsg.RequestId, PooledTransactions(ethMsg.PooledTransactionsPacket)
default:
msg = errorf("invalid message code: %d", code)
}
Expand All @@ -124,6 +136,15 @@ func (c *Conn) read66() (uint64, Message) {
return 0, errorf("invalid message: %s", string(rawData))
}

func (c *Conn) waitForResponse(chain *Chain, timeout time.Duration, requestID uint64) Message {
for {
id, msg := c.readAndServe66(chain, timeout)
if id == requestID {
return msg
}
}
}

// ReadAndServe serves GetBlockHeaders requests while waiting
// on another message from the node.
func (c *Conn) readAndServe66(chain *Chain, timeout time.Duration) (uint64, Message) {
Expand Down Expand Up @@ -173,27 +194,33 @@ func (s *Suite) testAnnounce66(t *utesting.T, sendConn, receiveConn *Conn, block
}

func (s *Suite) waitAnnounce66(t *utesting.T, conn *Conn, blockAnnouncement *NewBlock) {
timeout := 20 * time.Second
_, msg := conn.readAndServe66(s.chain, timeout)
switch msg := msg.(type) {
case *NewBlock:
t.Logf("received NewBlock message: %s", pretty.Sdump(msg.Block))
assert.Equal(t,
blockAnnouncement.Block.Header(), msg.Block.Header(),
"wrong block header in announcement",
)
assert.Equal(t,
blockAnnouncement.TD, msg.TD,
"wrong TD in announcement",
)
case *NewBlockHashes:
blockHashes := *msg
t.Logf("received NewBlockHashes message: %s", pretty.Sdump(blockHashes))
assert.Equal(t, blockAnnouncement.Block.Hash(), blockHashes[0].Hash,
"wrong block hash in announcement",
)
default:
t.Fatalf("unexpected: %s", pretty.Sdump(msg))
for {
_, msg := conn.readAndServe66(s.chain, timeout)
switch msg := msg.(type) {
case *NewBlock:
t.Logf("received NewBlock message: %s", pretty.Sdump(msg.Block))
assert.Equal(t,
blockAnnouncement.Block.Header(), msg.Block.Header(),
"wrong block header in announcement",
)
assert.Equal(t,
blockAnnouncement.TD, msg.TD,
"wrong TD in announcement",
)
return
case *NewBlockHashes:
blockHashes := *msg
t.Logf("received NewBlockHashes message: %s", pretty.Sdump(blockHashes))
assert.Equal(t, blockAnnouncement.Block.Hash(), blockHashes[0].Hash,
"wrong block hash in announcement",
)
return
case *NewPooledTransactionHashes:
// ignore old txs being propagated
continue
default:
t.Fatalf("unexpected: %s", pretty.Sdump(msg))
}
}
}

Expand Down Expand Up @@ -268,3 +295,24 @@ func headersMatch(t *utesting.T, chain *Chain, headers BlockHeaders) {
assert.Equal(t, chain.blocks[int(num)].Header(), header)
}
}

func (s *Suite) sendNextBlock66(t *utesting.T) {
sendConn, receiveConn := s.setupConnection66(t), s.setupConnection66(t)
defer sendConn.Close()
defer receiveConn.Close()

// create new block announcement
nextBlock := len(s.chain.blocks)
blockAnnouncement := &NewBlock{
Block: s.fullChain.blocks[nextBlock],
TD: s.fullChain.TD(nextBlock + 1),
}
// send announcement and wait for node to request the header
s.testAnnounce66(t, sendConn, receiveConn, blockAnnouncement)
// update test suite chain
s.chain.blocks = append(s.chain.blocks, s.fullChain.blocks[nextBlock])
// wait for client to update its chain
if err := receiveConn.waitForBlock66(s.chain.Head()); err != nil {
t.Fatal(err)
}
}
5 changes: 4 additions & 1 deletion cmd/devp2p/internal/ethtest/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func (s *Suite) AllEthTests() []utesting.Test {
{Name: "TestTransaction_66", Fn: s.TestTransaction_66},
{Name: "TestMaliciousTx", Fn: s.TestMaliciousTx},
{Name: "TestMaliciousTx_66", Fn: s.TestMaliciousTx_66},
{Name: "TestLargeTxRequest_66", Fn: s.TestLargeTxRequest_66},
{Name: "TestNewPooledTxs_66", Fn: s.TestNewPooledTxs_66},
}
}

Expand Down Expand Up @@ -129,6 +131,8 @@ func (s *Suite) Eth66Tests() []utesting.Test {
{Name: "TestMaliciousStatus_66", Fn: s.TestMaliciousStatus_66},
{Name: "TestTransaction_66", Fn: s.TestTransaction_66},
{Name: "TestMaliciousTx_66", Fn: s.TestMaliciousTx_66},
{Name: "TestLargeTxRequest_66", Fn: s.TestLargeTxRequest_66},
{Name: "TestNewPooledTxs_66", Fn: s.TestNewPooledTxs_66},
}
}

Expand Down Expand Up @@ -455,7 +459,6 @@ func (s *Suite) testAnnounce(t *utesting.T, sendConn, receiveConn *Conn, blockAn
}

func (s *Suite) waitAnnounce(t *utesting.T, conn *Conn, blockAnnouncement *NewBlock) {
timeout := 20 * time.Second
switch msg := conn.ReadAndServe(s.chain, timeout).(type) {
case *NewBlock:
t.Logf("received NewBlock message: %s", pretty.Sdump(msg.Block))
Expand Down
Loading