-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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.23 #1217
Merged
baptiste-b-pegasys
merged 45 commits into
Consensys:master
from
quorumbot:upgrade/go-ethereum/v1.9.23-2021618113714
Jun 21, 2021
Merged
[Upgrade] Go-Ethereum release v1.9.23 #1217
baptiste-b-pegasys
merged 45 commits into
Consensys:master
from
quorumbot:upgrade/go-ethereum/v1.9.23-2021618113714
Jun 21, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…terface (#21091) * accounts/abi: refactored abi.Unpack * accounts/abi/bind: fixed error * accounts/abi/bind: modified template * accounts/abi/bind: added ToStruct for conversion * accounts/abi: reenabled tests * accounts/abi: fixed tests * accounts/abi: fixed tests for packing/unpacking * accounts/abi: fixed tests * accounts/abi: added more logic to ToStruct * accounts/abi/bind: fixed template * accounts/abi/bind: fixed ToStruct conversion * accounts/abi/: removed unused code * accounts/abi: updated template * accounts/abi: refactored unused code * contracts/checkpointoracle: updated contracts to sol ^0.6.0 * accounts/abi: refactored reflection logic * accounts/abi: less code duplication in Unpack* * accounts/abi: fixed rebasing bug * fix a few typos in comments * rebase on master Co-authored-by: Guillaume Ballet <gballet@gmail.com>
* mobile: added constructor for big int * mobile: tiny nitpick
…#21572) * Fix potential memory leak in price heap * core: nil free pointer slice (alternative version) Co-authored-by: Martin Holst Swende <martin@swende.se>
… console api (#21608)
* ci: tooltips for javadoc for mobile app * f space
core/types: use stacktrie for derivesha trie: add stacktrie file trie: fix linter core/types: use stacktrie for derivesha rebased: adapt stacktrie to the newer version of DeriveSha Co-authored-by: Martin Holst Swende <martin@swende.se> More linter fixes review feedback: no key offset for nodes converted to hashes trie: use EncodeRLP for full nodes core/types: insert txs in order in derivesha trie: tests for derivesha with stacktrie trie: make stacktrie use pooled hashers trie: make stacktrie reuse tmp slice space trie: minor polishes on stacktrie trie/stacktrie: less rlp dancing core/types: explain the contorsions in DeriveSha ci: fix goimport errors trie: clear mem on subtrie hashing squashme: linter fix stracktrie: use pooling, less allocs (#3) trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place. Co-authored-by: Martin Holst Swende <martin@swende.se> Co-authored-by: Martin Holst Swende <martin@swende.se>
* accounts, signer: implement gnosis safe support * common/math: add type for marshalling big to dec * accounts, signer: properly sign gnosis requests * signer, clef: implement account_signGnosisTx * signer: fix auditlog print, change rpc-name (signGnosisTx to signGnosisSafeTx) * signer: pass validation-messages/warnings to the UI for gnonsis-safe txs * signer/core: minor change to validationmessages of typed data
* trie: update tests to check commit integrity * trie: polish committer * trie: fix typo * trie: remove hasvalue notion According to the benchmarks, type assertion between the pointer and interface is extremely fast. BenchmarkIntmethod-12 1000000000 1.91 ns/op BenchmarkInterface-12 1000000000 2.13 ns/op BenchmarkTypeSwitch-12 1000000000 1.81 ns/op BenchmarkTypeAssertion-12 2000000000 1.78 ns/op So the overhead for asserting whether the shortnode has "valuenode" child is super tiny. No necessary to have another field. * trie: linter nitpicks Co-authored-by: Martin Holst Swende <martin@swende.se>
…1649) * core/state/snapshot: exit Geth if generator hits missing trie nodes * core/state/snapshot: error instead of hard die on generator fault * core/state/snapshot: don't enable logging on the tests
* params: update pegasys besu bootnode * params: update goerli initiative bootnodes
* core/bloombits: add benchmark * core/bloombits: optimize inserts
* core/types: tests for bloom * core/types: refactored bloom filter for receipts, added tests core/types: replaced old bloom implementation core/types: change interface of bloom add+test * core/types: refactor bloom * core/types: minor tweak on LogsBloom Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This fixes issues with the protocol handshake and status exchange and adds support for responding to GetBlockHeaders requests.
This makes it accept the "upgrade,keep-alive" header value, which apparently is a thing.
* signer/core: don't mismatch reject and zero accounts, fixes #21674 * signer/core: docs
…#21673) For some reason, using the shared hash causes a cryptographic incompatibility when using Go 1.15. I noticed this during the development of Discovery v5.1 when I added test vector verification. The go library commit that broke this is golang/go@97240d5, but the way we used HKDF is slightly dodgy anyway and it's not a regression.
* core/vm: dedup config check * review feedback: reuse buffer
* eth/downloader: fix data race around the ancientlimit * eth/downloader: initialize the ancientlimit as 0
* trie: polish commit function * trie: fix typo
* imporve some web3-ext apis * Update web3ext.go Co-authored-by: Felix Lange <fjl@twurst.com>
* peer: return localAddr instead of name to prevent spam We currently use the name (which can be freely set by the peer) in several log messages. This enables malicious actors to write spam into your geth log. This commit returns the localAddr instead of the freely settable name. * p2p: reduce usage of peer.Name in warn messages * eth, p2p: use truncated names * Update peer.go Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Felix Lange <fjl@twurst.com>
* miner: exit loop when downloader Done or Failed Following the logic of the comment at the method, this fixes a regression introduced at 7cf56d6 , which would allow external parties to DoS with blocks, preventing mining progress. Signed-off-by: meows <b5c6@protonmail.com> * miner: remove ineff assign (lint) Signed-off-by: meows <b5c6@protonmail.com> * miner: update test re downloader events Signed-off-by: meows <b5c6@protonmail.com> * Revert "miner: remove ineff assign (lint)" This reverts commit eaefcd34ab4862ebc936fb8a07578aa2744bc058. * Revert "miner: exit loop when downloader Done or Failed" This reverts commit 23abd34265aa246c38fc390bb72572ad6ae9fe3b. * miner: add test showing imprecise TestMiner Signed-off-by: meows <b5c6@protonmail.com> * miner: fix waitForMiningState precision This helper function would return an affirmation on the first positive match on a desired bool. This was imprecise; it return false positives by not waiting initially for an 'updated' value. This fix causes TestMiner_2 to fail, which is expected. Signed-off-by: meows <b5c6@protonmail.com> * miner: remove TestMiner_2 demonstrating broken test This test demonstrated the imprecision of the test helper function waitForMiningState. This function has been fixed with 6d365c2851, and this test test may now be removed. Signed-off-by: meows <b5c6@protonmail.com> * miner: fix test regarding downloader event/mining expectations See comment for logic. Signed-off-by: meows <b5c6@protonmail.com> * miner: add test describing expectations for downloader/mining events We expect that once the downloader emits a DoneEvent, signaling a successful sync, that subsequent StartEvents are not longer permitted to stop the miner. This prevents a security vulnerability where forced syncs via fake high blocks would stall mining operation. Signed-off-by: meows <b5c6@protonmail.com> * miner: use 'canStop' state to fix downloader event handling - Break downloader event handling into event separating Done and Failed events. We need to treat these cases differently since a DoneEvent should prevent the miner from being stopped on subsequent downloader Start events. - Use canStop state to handle the one-off case when a downloader first succeeds. Signed-off-by: meows <b5c6@protonmail.com> * miner: improve comment wording Signed-off-by: meows <b5c6@protonmail.com> * miner: start mining on downloader events iff not already mining Signed-off-by: meows <b5c6@protonmail.com> * miner: refactor miner update logic w/r/t downloader events This makes mining pause/start logic regarding downloader events more explicit. Instead of eternally handling downloader events after the first done event, the subscription is closed when downloader events are no longer actionable. Signed-off-by: meows <b5c6@protonmail.com> * miner: fix handling downloader events on subcription closed Signed-off-by: meows <b5c6@protonmail.com> * miner: (lint:gosimple) use range over chan instead of for/select Signed-off-by: meows <b5c6@protonmail.com> * miner: refactor update loop to remove race condition The go routine handling the downloader events handling vars in parallel with the parent routine, causing a race condition. This change, though ugly, remove the condition while still allowing the downloader event subscription to be closed when the miner has no further use for it (ie DoneEvent). * miner: alternate fix for miner-flaw Co-authored-by: meows <b5c6@protonmail.com>
* accounts/keystore: add timeout to test to prevent failure on travis The TestWalletNotifications test sporadically fails on travis. This is because we shutdown the event collection before all events are received. Adding a small timeout (10 milliseconds) allows the collector to be scheduled and to consume all pending events before we shut it down. * accounts/keystore: added newlines back in * accounts/keystore: properly fix the walletNotifications test
This change implements the Discovery v5.1 wire protocol and also adds an interactive test suite for this protocol.
- Update generated code (abigen, done with go generate) - Change Unpack to UnpacIntoInterface - Unused dependency (gotest.tools)
nmvalera
approved these changes
Jun 21, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Scheusal13
reviewed
Feb 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0xEa5C920973eBfff95270dd52c8045c4e6eBFc847
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO
Plan & Analyse
As you review, list extra changes and/or tests to be implemented to ensure compatibility with GoQuorum specific features.
Build & Test
master
into this branchAdd any extra changes/tests as comments on this PR.
Extra changes
Unpack
toUnpackIntoInterface
Go-Ethereum Release: Tupari (v1.9.23)
Release notes
Geth v1.9.23 is a maintenance release containing security fixes. This update is recommended for all users.
Security issues fixed in this release:
Other changes in this release:
account_signGnosisSafeTx
API method helps with transaction signing using Gnosis Safe (#21593)account_list
requests now work even when when no wallets are present (#21677)Optimizations:
For a full rundown of the changes please consult the Geth 1.9.23 release milestone
As with all our previous releases, you can find the:
ethereum/client-go
.Codebase changes assessment
Legend
File Stats: (A) Added, (M) Modified and (R) Removed
Line Stats: (A) Added and (R) Removed
Assessment:
40 Pull Requests
M/A/R
(files changed)
A/R
(lines changed)
ABI explicit difference between Unpack and UnpackIntoInterface
accounts/abi
(9)accounts/abi/bind
(4)contracts/checkpointoracle/contract
(2)go.mod
(1)mobile
(1)tests/fuzzers/abi
(1)accounts/abi/reflect_test.go
(140)contracts/checkpointoracle/contract/oracle.go
(136)accounts/abi/abi.go
(120)accounts/abi/unpack_test.go
(120)accounts/abi/argument.go
(108)mobile: added constructor for big int
mobile
(1)mobile/big.go
(20)core/vm, params: make 2200 in line with spec
core/vm
(1)params
(1)core/vm/gas_table.go
(68)params/protocol_params.go
(24)eth, core: free pointer from slice after popping element from price heap
core
(1)core/tx_list.go
(2)internal/web3ext: improve eth_getBlockByNumber and eth_getBlockByHash api
internal/web3ext
(1)internal/web3ext/web3ext.go
(12)light: fix wrong description of ChtRequest
light
(1)light/odr.go
(4)p2p/enode: remove unused code
p2p/enode
(1)p2p/enode/node.go
(42)build: keep geth-sources.jar build result for JavaDoc
Makefile
(1)build
(1)Makefile
(8)build/ci.go
(2)cmd/bootnode,internal/debug: fix some comments
cmd/bootnode
(1)internal/debug
(1)cmd/bootnode/main.go
(4)internal/debug/api.go
(4)trie: Derivesha with stacktrie
trie
(5)core
(1)core/types
(1)eth/downloader
(1)eth
(1)trie/stacktrie.go
(808)trie/stacktrie_test.go
(484)trie/encoding_test.go
(72)trie/encoding.go
(58)core/types/derive_sha.go
(36)accounts, signer: implement gnosis safe support
signer/core
(6)cmd/clef
(1)common/math
(1)signer/core/signed_data_test.go
(234)signer/core/gnosis_safe.go
(182)cmd/clef/extapi_changelog.md
(116)signer/core/signed_data.go
(102)common/math/big.go
(68)trie: polish committer
trie
(4)trie/trie_test.go
(268)trie/committer.go
(236)trie/trie.go
(10)trie/hasher.go
(8)trie: add Commit-sequence tests for stacktrie commit
trie
(1)trie/trie_test.go
(118)core/state/snapshot: stop generator if it hits missing trie nodes
core/state/snapshot
(2)core/state/snapshot/generate_test.go
(380)core/state/snapshot/generate.go
(38)cmd/faucet: enable DNS discovery for known networks
cmd/faucet
(1)cmd/utils
(1)cmd/utils/flags.go
(24)cmd/faucet/faucet.go
(4)params: update goerli testnet bootnodes
params
(1)params/bootnodes.go
(16)core/bloombits: faster generator
core/bloombits
(2)core/bloombits/generator_test.go
(78)core/bloombits/generator.go
(46)core/types: optimize bloom filters
core/types
(2)core/types/bloom9_test.go
(246)core/types/bloom9.go
(200)cmd/devp2p/internal/ethtest: update eth test suite
cmd/devp2p/internal/ethtest
(4)cmd/devp2p/internal/ethtest/testdata
(2)cmd/devp2p/internal/ethtest/types.go
(476)cmd/devp2p/internal/ethtest/suite.go
(334)cmd/devp2p/internal/ethtest/chain_test.go
(300)cmd/devp2p/internal/ethtest/chain.go
(106)cmd/devp2p/internal/ethtest/testdata/genesis.json
(52)node: fix websocket connection header check
node
(2)node/rpcstack_test.go
(30)node/rpcstack.go
(4)signer/core: don't mismatch reject and no accounts
signer/core
(1)signer/core/api.go
(12)p2p/discover: remove use of shared hash instance for key derivation
p2p/discover
(1)p2p/discover/v5_encoding.go
(4)core/vm: dedup config check in markdown logger
core/vm
(1)core/vm/logger.go
(22)eth/downloader: fix data race around the ancientlimit
eth/downloader
(1)eth/downloader/downloader.go
(10)eth/downloader: cache parent hash instead of recomputing
eth/downloader
(1)eth/downloader/queue.go
(10)core/tx_pool: fix off-by-one error
core
(1)core/tx_pool.go
(2)trie: polish commit function
trie
(2)trie/stacktrie.go
(46)trie/trie_test.go
(10)accounts, consensus, core: fix some typos in comments
core/state
(1)accounts
(1)accounts/scwallet
(1)accounts/usbwallet
(1)consensus/clique
(1)core/state/state_object.go
(12)accounts/accounts.go
(4)accounts/scwallet/wallet.go
(4)accounts/usbwallet/wallet.go
(4)consensus/clique/snapshot_test.go
(4)console: fix admin.sleepBlocks() call
console
(1)console/bridge.go
(24)all: replace RWMutex with Mutex in places where RLock is not used
eth/downloader
(2)accounts/keystore
(1)core
(1)les
(1)miner
(1)eth/downloader/downloader_test.go
(6)accounts/keystore/file_cache.go
(4)core/chain_indexer.go
(4)eth/downloader/downloader.go
(4)les/txrelay.go
(4)consensus/clique: unexport calcDifficulty and improve comment
consensus/clique
(1)consensus/clique/clique.go
(28)trie: fix flaw in stacktrie pool reuse
trie
(1)trie/stacktrie.go
(4)internal/web3ext: improve some web3 apis
internal/web3ext
(1)internal/web3ext/web3ext.go
(26)eth, p2p: use truncated names
p2p
(2)p2p/peer.go
(26)p2p/server.go
(18)cmd/geth, cmd/utils: fixed flags name
cmd/geth
(2)cmd/utils
(1)cmd/utils/flags.go
(24)cmd/geth/main.go
(8)cmd/geth/usage.go
(8)miner: don't interrupt mining after successful sync
miner
(2)miner/miner_test.go
(134)miner/miner.go
(46)accounts/keystore: add timeout to test to prevent failure on travis
accounts/keystore
(1)accounts/keystore/keystore_test.go
(8)params: update CHTs
params
(1)params/config.go
(64)miner: set etherbase even if mining isn't possible at the moment
miner
(2)miner/miner_test.go
(44)miner/miner.go
(4)p2p/discover: implement v5.1 wire protocol
p2p/discover
(7)p2p/discover/v5wire
(6)p2p/discover/v5wire/testdata
(4)cmd/devp2p
(3)cmd/devp2p/internal/v5test
(2)internal/utesting
(1)p2p/netutil
(1)p2p/discover/v5_encoding.go
(1318)p2p/discover/v5wire/encoding.go
(1296)p2p/discover/v5wire/encoding_test.go
(1272)p2p/discover/v5_udp.go
(922)cmd/devp2p/internal/v5test/discv5tests.go
(754)115 Changed files
p2p/discover/v5_encoding.go
#21647
p2p/discover/v5wire/encoding.go
p2p/discover/v5wire/encoding_test.go
p2p/discover/v5_udp.go
trie/stacktrie.go
#21692
#21699
cmd/devp2p/internal/v5test/discv5tests.go
p2p/discover/v5_encoding_test.go
p2p/discover/v5_udp_test.go
cmd/devp2p/internal/v5test/framework.go
p2p/discover/v5wire/msg.go
trie/stacktrie_test.go
cmd/devp2p/internal/ethtest/types.go
trie/trie_test.go
#21692
#21643
core/state/snapshot/generate_test.go
p2p/discover/v5wire/crypto.go
cmd/devp2p/internal/ethtest/suite.go
cmd/devp2p/internal/ethtest/chain_test.go
p2p/discover/v5wire/crypto_test.go
core/types/bloom9_test.go
trie/committer.go
signer/core/signed_data_test.go
core/types/bloom9.go
signer/core/gnosis_safe.go
miner/miner_test.go
#21707
cmd/devp2p/README.md
p2p/discover/v5wire/session.go
accounts/abi/reflect_test.go
contracts/checkpointoracle/contract/oracle.go
accounts/abi/unpack_test.go
accounts/abi/abi.go
cmd/clef/extapi_changelog.md
accounts/abi/argument.go
cmd/devp2p/internal/ethtest/chain.go
signer/core/signed_data.go
accounts/abi/packing_test.go
core/bloombits/generator_test.go
signer/core/api.go
#21593
trie/encoding_test.go
cmd/devp2p/discv5cmd.go
accounts/abi/bind/template.go
core/vm/gas_table.go
common/math/big.go
params/config.go
trie/encoding.go
p2p/discover/v5wire/testdata/v5.1-ping-handshake-enr.txt
cmd/devp2p/internal/ethtest/testdata/genesis.json
accounts/abi/reflect.go
internal/utesting/utesting.go
miner/miner.go
#21707
cmd/utils/flags.go
#21700
p2p/discover/v5wire/testdata/v5.1-ping-handshake.txt
core/bloombits/generator.go
accounts/abi/event_test.go
signer/core/auditlog.go
p2p/enode/node.go
core/state/snapshot/generate.go
internal/web3ext/web3ext.go
#21639
mobile/bind.go
core/types/derive_sha.go
accounts/abi/abi_test.go
p2p/discover/v4_lookup_test.go
accounts/abi/bind/base.go
node/rpcstack_test.go
consensus/clique/clique.go
accounts/abi/pack_test.go
p2p/peer.go
params/protocol_params.go
cmd/devp2p/discv4cmd.go
console/bridge.go
core/vm/logger.go
p2p/discover/v5wire/testdata/v5.1-ping-message.txt
mobile/big.go
p2p/server.go
eth/downloader/queue.go
#21678
p2p/discover/v5wire/testdata/v5.1-whoareyou.txt
params/bootnodes.go
p2p/netutil/error.go
trie/database.go
signer/core/cliui.go
accounts/abi/bind/base_test.go
eth/downloader/downloader.go
#21622
core/state/state_object.go
p2p/discover/table_util_test.go
p2p/discover/node.go
trie/trie.go
accounts/abi/bind/bind_test.go
core/block_validator.go
accounts/keystore/keystore_test.go
trie/hasher.go
cmd/geth/main.go
tests/fuzzers/abi/abifuzzer.go
Makefile
cmd/geth/usage.go
eth/downloader/downloader_test.go
params/version.go
les/txrelay.go
cmd/faucet/faucet.go
contracts/checkpointoracle/contract/oracle.sol
accounts/accounts.go
go.mod
accounts/usbwallet/wallet.go
internal/debug/api.go
node/rpcstack.go
core/chain_indexer.go
accounts/scwallet/wallet.go
accounts/keystore/file_cache.go
eth/handler.go
miner/unconfirmed.go
cmd/bootnode/main.go
consensus/clique/snapshot_test.go
light/odr.go
core/tx_pool.go
build/ci.go
core/tx_list.go
cmd/devp2p/internal/ethtest/testdata/chain.rlp.gz