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

[Upgrade] Go-Ethereum release v1.9.17 #1140

Merged
merged 25 commits into from
Mar 1, 2021

Conversation

ricardolyn
Copy link
Contributor

@ricardolyn ricardolyn commented Feb 19, 2021

TODO

Plan & Analyse

  • Review the Release Notes
  • Review PRs in the section below

As you review, list extra changes and/or tests to be implemented to ensure compatibility with GoQuorum specific features.

Build & Test

  • Pull and checkout PR branch locally, then merge GoQuorum master into this branch
  • Resolve conflicts, taking into account the prior analysis
  • Implement required changes until all unit tests pass
  • Implement required changes until acceptance tests pass
  • Implement extra changes and/or tests

Extra Changes & Tests

Go-Ethereum Release: Mount Milgrom (v1.9.17)

  • Version: v1.9.17
  • Published: 2020-07-20T13:02:33Z

Release notes

Geth v1.9.17 is a small maintenance release (trying to get back onto the biweekly schedule), though it does pack a few punches as well!

  • Enable historical garbage collection for light clients (#19570).
  • Apply --rpc.txfeecap to a few missed endpoints (#21231).
  • Drastically reduce allocations in the transaction pool (#21328).
  • Drastically reduce allocations on certain EVM opcodes (#21222).
  • Raise the default gas limit in --dev mode to 12 million (#21323).
  • Fix ethstats reconnect issue and fix constant Görli drops (#21347).
  • Fix gas estimation if balance / price overflown uint64 (#21346).

For a full rundown of the changes please consult the Geth 1.9.17 release milestone


As with all our previous releases, you can find the:

Codebase changes assessment

Legend

File Stats: (A) Added, (M) Modified and (R) Removed

Line Stats: (A) Added and (R) Removed

Assessment:

  • ✅ No conflict expected
  • ⚠ Review required to assess changes
  • ‼️ Conflicts expected and review required

15 Pull Requests

🔍 Link Title File Stats
M/A/R
Packages changed
(files changed)
Line Stats
A/R
Top 5 Changed Files
(lines changed)
⚠️ #19570 les: historical data garbage collection 30/0/0
core (6)
core/rawdb (5)
les (4)
eth (4)
eth/downloader (3)
internal/ethapi (2)
cmd/geth (2)
graphql (1)
cmd/utils (1)
core/state (1)
consensus/clique (1)
246/62
core/rawdb/accessors_indexes_test.go (90)
core/rawdb/accessors_chain.go (66)
core/rawdb/accessors_chain_test.go (66)
internal/ethapi/api.go (50)
core/rawdb/accessors_indexes.go (44)
#21325 light: goimports -w 1/0/0
light (1)
1/1
light/postprocess.go (4)
#21324 p2p/discv5: unset pingEcho on pong timeout 1/0/0
p2p/discv5 (1)
3/0
p2p/discv5/net.go (6)
‼️ #21321 README.md: point Go API reference link to pkg.go.dev 1/0/0
README.md (1)
4/4
README.md (16)
‼️ #21231 internal/ethapi: cap txfee for SignTransaction and Resend 1/0/0
internal/ethapi (1)
39/5
internal/ethapi/api.go (88)
#21326 .github: Change Code Owners 1/0/0
.github (1)
6/6
.github/CODEOWNERS (24)
#21327 core/rawdb: print more log for ancient failure 1/0/0
core/rawdb (1)
4/1
core/rawdb/database.go (10)
#21330 p2p/discover: require table nodes to have an IP 2/0/0
p2p/discover (2)
4/1
p2p/discover/table.go (6)
p2p/discover/table_test.go (4)
#21318 cmd/clef: change --rpcport to --http.port and update docs 9/1/0
cmd/geth (2)
cmd/clef (2)
cmd/ethkey (1)
cmd/evm (1)
cmd/utils (1)
internal/flags (1)
cmd/abigen (1)
cmd/checkpoint-admin (1)
274/136
internal/flags/helpers.go (304)
cmd/clef/main.go (188)
cmd/geth/usage.go (182)
cmd/utils/flags.go (76)
cmd/clef/README.md (20)
‼️ #21328 transaction pool optimizations 3/0/0
core (3)
104/28
core/tx_list.go (212)
core/tx_pool_test.go (36)
core/tx_pool.go (16)
⚠️ #21329 trie: quell linter warnings in commiter.go 1/0/0
trie (1)
6/8
trie/committer.go (28)
#21222 core/vm: less allocations for various call variants 21/0/0
core/vm (10)
cmd/evm (3)
core/vm/runtime (2)
eth/tracers (2)
cmd/evm/internal/t8ntool (2)
core/state (1)
trie (1)
450/191
core/vm/evm.go (386)
core/vm/runtime/runtime_test.go (374)
core/vm/logger.go (70)
core/vm/instructions.go (68)
core/vm/stack.go (68)
⚠️ #21323 core: set gasLimit in '--dev' mode to be 9000000 1/0/0
core (1)
2/1
core/genesis.go (6)
⚠️ #21347 ethstats: fix reconnection issue, implement primus pings 1/0/0
ethstats (1)
19/2
ethstats/ethstats.go (42)
‼️ #21346 internal, accounts: fix funding check when estimate gas 2/0/0
accounts/abi/bind/backends (1)
internal/ethapi (1)
6/4
internal/ethapi/api.go (12)
accounts/abi/bind/backends/simulated.go (8)

85 Changed files

🔍 File Lines Changed Linked PR
light/odr_util.go 424
les/pruner_test.go 394
‼️ core/vm/evm.go 386 #21222
‼️ core/vm/runtime/runtime_test.go 374 #21222
light/postprocess.go 318 #21325
internal/flags/helpers.go 304 #21318
⚠️ core/tx_list.go 212 #21328
les/pruner.go 196
‼️ cmd/clef/main.go 188 #21318
‼️ cmd/geth/usage.go 184 #21318
#19570
‼️ internal/ethapi/api.go 150 #21346
#21231
#19570
‼️ cmd/utils/flags.go 112 #21318
#19570
core/rawdb/accessors_indexes_test.go 90 #19570
‼️ core/vm/logger.go 70 #21222
‼️ core/vm/stack.go 68 #21222
‼️ core/vm/instructions.go 68 #21222
core/rawdb/accessors_chain_test.go 66 #19570
core/rawdb/accessors_chain.go 66 #19570
‼️ core/vm/contracts_test.go 58 #21222
core/rawdb/accessors_indexes.go 44 #19570
⚠️ ethstats/ethstats.go 42 #21347
core/vm/runtime/runtime.go 42 #21222
‼️ eth/downloader/downloader.go 40 #19570
⚠️ light/lightchain.go 40
‼️ core/tx_pool_test.go 36 #21328
‼️ core/vm/contracts.go 34 #21222
⚠️ cmd/evm/main.go 32 #21318
#21222
⚠️ les/test_helper.go 32
⚠️ core/state/statedb.go 30 #21222
⚠️ trie/committer.go 28 #21329
‼️ core/vm/interpreter.go 26 #21222
.github/CODEOWNERS 24 #21326
⚠️ trie/database.go 22
‼️ params/network_params.go 20
‼️ cmd/clef/README.md 20 #21318
‼️ core/vm/gen_structlog.go 20 #21222
les/odr_requests.go 20 #19570
‼️ les/client.go 18 #19570
core/chain_indexer.go 18 #19570
‼️ eth/config.go 18 #19570
light/odr.go 18
‼️ README.md 16 #21321
core/dao_test.go 16 #19570
‼️ core/rawdb/freezer.go 16 #19570
‼️ core/blockchain.go 16 #19570
cmd/evm/runner.go 16 #21222
‼️ core/tx_pool.go 16 #21328
⚠️ cmd/evm/internal/t8ntool/transition.go 14 #21222
‼️ les/api_backend.go 14 #19570
cmd/evm/staterunner.go 12 #21222
⚠️ core/state/statedb_test.go 12 #19570
⚠️ eth/gen_config.go 12 #19570
cmd/ethkey/main.go 12 #21318
cmd/checkpoint-admin/main.go 12 #21318
core/rawdb/database.go 10 #21327
⚠️ core/genesis.go 10 #21323
#19570
‼️ core/vm/logger_json.go 10 #21222
⚠️ eth/bloombits.go 10 #19570
cmd/abigen/main.go 10 #21318
les/sync_test.go 8
‼️ accounts/abi/bind/backends/simulated.go 8 #21346
trie/iterator_test.go 8
‼️ eth/api_backend.go 8 #19570
les/server.go 8
trie/secure_trie.go 8 #21222
⚠️ cmd/evm/internal/t8ntool/flags.go 8 #21222
‼️ eth/tracers/tracer_test.go 8 #21222
‼️ cmd/geth/main.go 8 #21318
#19570
core/chain_indexer_test.go 8 #19570
p2p/discv5/net.go 6 #21324
p2p/discover/table.go 6 #21330
‼️ eth/downloader/downloader_test.go 6 #19570
eth/downloader/testchain_test.go 4 #19570
les/ulc_test.go 4
‼️ params/version.go 4
‼️ consensus/clique/clique.go 4 #19570
‼️ eth/tracers/tracer.go 4 #21222
trie/trie_test.go 4
⚠️ les/odr_test.go 4 #19570
⚠️ graphql/graphql.go 4 #19570
⚠️ core/chain_makers.go 4 #19570
‼️ core/vm/logger_test.go 4 #21222
les/request_test.go 4
‼️ internal/ethapi/backend.go 4 #19570
p2p/discover/table_test.go 4 #21330

fjl and others added 18 commits July 10, 2020 12:40
This change introduces garbage collection for the light client. Historical
chain data is deleted periodically. If you want to disable the GC, use
the --light.nopruning flag.
* modify code owners

* add marius
This fixes a corner case in discv5. The issue cannot happen in discv4
because it performs IP checks on all incoming node information.
* core: added local tx pool test case

* core, crypto: various allocation savings regarding tx handling

* core/txlist, txpool: save a reheap operation, avoid some bigint allocs

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* core/vm/runtime/tests: add more benchmarks

* core/vm: initial work on improving alloc count for calls to precompiles

name                                  old time/op    new time/op    delta
SimpleLoop/identity-precompile-10M-6     117ms ±75%      43ms ± 1%  -63.09%  (p=0.008 n=5+5)
SimpleLoop/loop-10M-6                   79.6ms ± 4%    70.5ms ± 1%  -11.42%  (p=0.008 n=5+5)

name                                  old alloc/op   new alloc/op   delta
SimpleLoop/identity-precompile-10M-6    24.4MB ± 0%     4.9MB ± 0%  -79.94%  (p=0.008 n=5+5)
SimpleLoop/loop-10M-6                   13.2kB ± 0%    13.2kB ± 0%     ~     (p=0.357 n=5+5)

name                                  old allocs/op  new allocs/op  delta
SimpleLoop/identity-precompile-10M-6      382k ± 0%      153k ± 0%  -59.99%  (p=0.000 n=5+4)
SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)

* core/vm: don't allocate big.int for touch

name                                  old time/op    new time/op    delta
SimpleLoop/identity-precompile-10M-6    43.3ms ± 1%    42.4ms ± 7%     ~     (p=0.151 n=5+5)
SimpleLoop/loop-10M-6                   70.5ms ± 1%    76.7ms ± 1%   +8.67%  (p=0.008 n=5+5)

name                                  old alloc/op   new alloc/op   delta
SimpleLoop/identity-precompile-10M-6    4.90MB ± 0%    2.46MB ± 0%  -49.83%  (p=0.008 n=5+5)
SimpleLoop/loop-10M-6                   13.2kB ± 0%    13.2kB ± 1%     ~     (p=0.571 n=5+5)

name                                  old allocs/op  new allocs/op  delta
SimpleLoop/identity-precompile-10M-6      153k ± 0%       76k ± 0%  -49.98%  (p=0.029 n=4+4)
SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)

* core/vm: reduce allocs in staticcall

name                                  old time/op    new time/op    delta
SimpleLoop/identity-precompile-10M-6    42.4ms ± 7%    37.5ms ± 6%  -11.68%  (p=0.008 n=5+5)
SimpleLoop/loop-10M-6                   76.7ms ± 1%    69.1ms ± 1%   -9.82%  (p=0.008 n=5+5)

name                                  old alloc/op   new alloc/op   delta
SimpleLoop/identity-precompile-10M-6    2.46MB ± 0%    0.02MB ± 0%  -99.35%  (p=0.008 n=5+5)
SimpleLoop/loop-10M-6                   13.2kB ± 1%    13.2kB ± 0%     ~     (p=0.143 n=5+5)

name                                  old allocs/op  new allocs/op  delta
SimpleLoop/identity-precompile-10M-6     76.4k ± 0%      0.1k ± 0%     ~     (p=0.079 n=4+5)
SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)

* trie: better use of hasher keccakState

* core/state/statedb: reduce allocations in getDeletedStateObject

* core/vm: reduce allocations in all call derivates

* core/vm: reduce allocations in call variants

- Make returnstack `uint32`
- Use a `sync.Pool` of `stack`s

* core/vm: fix tests

* core/vm: goimports

* core/vm: tracer fix + staticcall gas fix

* core/vm: add back snapshot to staticcall

* core/vm: review concerns + make returnstack pooled + enable returndata in traces

* core/vm: fix some test tracer method signatures

* core/vm: run gencodec, minor comment polish

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* Set gasLimit in --dev mode to be 9m.

* core: Set gasLimit to 11.5 milion and add 1 wei allocation for BLAKE2b
ethstats: fix reconnection issue, implement primus pings
* internal, accounts: fix funding check when estimate gas

* accounts, internal: address comments
@CLAassistant
Copy link

CLAassistant commented Feb 19, 2021

CLA assistant check
All committers have signed the CLA.

@ricardolyn ricardolyn changed the base branch from master to upgrade/go-ethereum/v1.9.16-2021215130719 February 19, 2021 10:59
Base automatically changed from upgrade/go-ethereum/v1.9.16-2021215130719 to master February 23, 2021 16:00
core/vm/evm_test.go Outdated Show resolved Hide resolved
@ricardolyn ricardolyn marked this pull request as ready for review February 24, 2021 16:25
@ricardolyn ricardolyn self-assigned this Feb 25, 2021
core/vm/evm.go Show resolved Hide resolved
core/genesis.go Outdated Show resolved Hide resolved
core/vm/evm_test.go Outdated Show resolved Hide resolved
core/vm/evm.go Show resolved Hide resolved
core/vm/evm.go Show resolved Hide resolved
core/vm/evm_test.go Outdated Show resolved Hide resolved
@ricardolyn ricardolyn merged commit 104c7b6 into master Mar 1, 2021
@ricardolyn ricardolyn deleted the upgrade/go-ethereum/v1.9.17-2021219105839 branch March 1, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.