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.25 #1223

Conversation

quorumbot
Copy link
Collaborator

@quorumbot quorumbot commented Jun 29, 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 lint passes
  • Implement required changes until all unit tests pass
  • Implement required changes until acceptance tests pass
  • Implement extra changes and/or tests
  • Verify any left TODOs in the code

Add any extra changes/tests as comments on this PR.

  • #21356 doesn't pass the type in the signer anymore. code It impacts the GoQuorum implementation.
  • #21672 passes a splitted context to the new EVM and changes on apply transaction
    • #21672 has not been applied completely due to this new way to use the EVM Now only one EVM instance is shared for all Tx, and a Reset() is done to pass the state. For private, at the EVM creation, there is a Push on the stack, so I am afraid it's incompatible. Reset() function is marked to be used scarcely, but in fact it's been used widely. In conclusion I am not confident with this Geth modification.
  • #21919 new run minimal geth function for unit test to adapt
  • #21402 replaces the NewDatabaseWithCache with a NewDatabaseWithConfig

Go-Ethereum Release: Marljeh (v1.9.25)

  • Version: v1.9.25
  • Published: 2020-12-11T08:11:30Z

Release notes

Geth v1.9.25 is a maintenance release.

Notable changes in this release:

  • Geth has a new subcommand, geth version-check, which displays known security issues (#21859)
  • The geth --ws.origins flag now supports more expressive origin rules (#21481)
  • Recording of trie key preimages can now be disabled using the --cache.preimages flag (#21402)
  • The accounts/abi/bind package now offers replay-protected transaction signing (#21356)
  • The GraphQL API now always returns status code 400 if there is an error processing the query (#21882)
  • The devp2p nodeset filter command can now find snap-enabled nodes (#21950)
  • The eth protocol test suite has been extended with tests for transaction announcements and malicious announce behavior (#21857, #21792)
  • Support for 'retesteth' has been removed from geth since it is no longer used for tests. Its replacement, the evm t8n tool, was released in Geth v1.9.16 (#21861)
  • We now offer signify/minisign signatures for Geth binary downloads as an alternative to PGP. This is experimental, and not yet advertised on the downloads page (#21798)

Bug fixes:

  • A crash in LES server handling of the GetProofsV2 message is resolved. See CVE-2020-26264 advisory for more information (#21896)
  • The LES server no longer locks up during geth shutdown (#21927)
  • Clef now correctly derives accounts for Ledger Live devices (#21757)
  • The faucet now ignores URL query parameters in Facebook post URLs (#21838)
  • Light client peer discovery now uses DNS (#21906)
  • go mod vendor of go-ethereum should now work (#21735)
  • The peer connection acceptor doesn't hot-spin anymore when geth runs out of file descriptors (#21878)
  • Using the reexec option for tracing RPC methods no longer crashes the RPC handler (#21830)
  • common.Hash and common.Address now print as hex when using fmt.Println (#21834)
  • A rare deadlock in Discovery v5 message dispatch is fixed (#21858)
  • Failures in internal CPU metrics collection no longer crash geth (#21864)
  • In Go contract bindings generated by abigen, the Raw field of parsed events is now set correctly (#21807)

For a full rundown of the changes please consult the Geth 1.9.25 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

56 Pull Requests

🔍 Link Title File Stats
M/A/R
Packages changed
(files changed)
Line Stats
A/R
Top 5 Changed Files
(lines changed)
#21815 crypto/bn256: improve bn256 fuzzer 2/0/0
crypto/bn256 (1)
crypto/bn256/cloudflare (1)
53/66
crypto/bn256/bn256_fuzz.go (234)
crypto/bn256/cloudflare/bn256.go (4)
#21836 crypto/bn256: better comments for u, P and Order 1/0/0
crypto/bn256/google (1)
3/2
crypto/bn256/google/constants.go (10)
#21829 tests/fuzzers: improve the fuzzers 5/0/0
tests/fuzzers/stacktrie (1)
tests/fuzzers/txfetcher (1)
common/bitutil (1)
tests/fuzzers/keystore (1)
tests/fuzzers/rlp (1)
33/20
tests/fuzzers/txfetcher/txfetcher_fuzzer.go (44)
tests/fuzzers/rlp/rlp_fuzzer.go (32)
tests/fuzzers/stacktrie/trie_fuzzer.go (14)
common/bitutil/compress_fuzz.go (12)
tests/fuzzers/keystore/keystore-fuzzer.go (4)
⚠️ #21607 core/vm, protocol_params: implement eip-2565 modexp repricing 3/1/0
core/vm (2)
core/vm/testdata/precompiles (1)
params (1)
209/20
core/vm/testdata/precompiles/modexp_eip2565.json (242)
core/vm/contracts.go (160)
core/vm/contracts_test.go (54)
params/protocol_params.go (2)
⚠️ #21672 core, all: split vm.Context into BlockContext and TxContext 24/0/0
core/vm (5)
core (4)
eth/tracers (3)
core/vm/runtime (2)
eth (2)
les (2)
tests (2)
cmd/evm/internal/t8ntool (1)
light (1)
accounts/abi/bind/backends (1)
cmd/geth (1)
183/139
eth/api_tracer.go (120)
core/state_processor.go (96)
core/vm/evm.go (82)
eth/tracers/tracers_test.go (42)
core/evm.go (32)
⚠️ #21807 accounts/abi: template: set events Raw field in Parse methods 1/0/0
accounts/abi/bind (1)
1/0
accounts/abi/bind/template.go (2)
⚠️ #21814 common: fix documentation of Address.SetBytes 1/0/0
common (1)
1/1
common/types.go (4)
#21847 crypto/bn256: refine comments according to #19577, #21595, and #21836 3/0/0
crypto/bn256/google (2)
crypto/bn256/cloudflare (1)
12/4
crypto/bn256/cloudflare/bn256.go (18)
crypto/bn256/google/bn256.go (10)
crypto/bn256/google/constants.go (4)
#21372 consensus/ethash: fix usage of *reflect.SliceHeader 1/0/0
consensus/ethash (1)
12/8
consensus/ethash/algorithm.go (40)
#18419 crypto/secp256k1: add checking z sign in affineFromJacobian 1/0/0
crypto/secp256k1 (1)
4/0
crypto/secp256k1/curve.go (8)
⚠️ #21860 cmd/geth: fix les test on windows 1/0/0
cmd/geth (1)
26/2
cmd/geth/les_test.go (56)
#21402 all: disable recording preimage of trie keys 15/0/0
eth (5)
trie (2)
cmd/geth (2)
core (2)
core/state (2)
light (1)
cmd/utils (1)
110/48
trie/database.go (162)
cmd/utils/flags.go (30)
core/blockchain.go (30)
trie/secure_trie.go (22)
core/state/database.go (20)
#21864 metrics: fix the panic for reading empty cpu stats 1/0/0
metrics (1)
4/0
metrics/cpu_enabled.go (8)
#21861 cmd/geth: remove retesteth 1/0/2
cmd/geth (3)
0/1068
cmd/geth/retesteth.go (1836)
cmd/geth/retesteth_copypaste.go (296)
cmd/geth/main.go (4)
⚠️ #21481 node: support expressive origin rules in ws.origins 2/0/0
rpc (1)
node (1)
170/20
node/rpcstack_test.go (250)
rpc/websocket.go (130)
#21871 trie, rpc, cmd/geth: fix tests on 32-bit and windows + minor rpc fixes 7/0/0
cmd/geth (3)
rpc (1)
trie (1)
internal/cmdtest (1)
node (1)
98/61
trie/trie_test.go (114)
cmd/geth/les_test.go (70)
cmd/geth/accountcmd_test.go (58)
internal/cmdtest/test_cmd.go (30)
rpc/endpoints.go (28)
#21872 crypto/bn256: fix bn256Mul fuzzer to not hang on large input 1/0/0
crypto/bn256 (1)
6/0
crypto/bn256/bn256_fuzz.go (12)
⚠️ #21878 p2p: avoid spinning loop on out-of-handles 1/0/0
p2p (1)
8/3
p2p/server.go (22)
#21839 les/utils: protect against WeightedRandomSelect overflow 2/0/0
les/utils (1)
les/flowcontrol (1)
15/0
les/utils/weighted_select.go (22)
les/flowcontrol/control.go (8)
#21796 tests/fuzzers/bls1381: add bls fuzzer 2/10/0
tests/fuzzers/bls12381/testdata (9)
crypto/bls12381 (1)
oss-fuzz.sh (1)
tests/fuzzers/bls12381 (1)
128/1
tests/fuzzers/bls12381/bls_fuzzer.go (202)
oss-fuzz.sh (38)
crypto/bls12381/fp_test.go (18)
#21890 github: Add new style of issue-templates 0/3/1
.github/ISSUE_TEMPLATE (4)
46/5
.github/ISSUE_TEMPLATE/feature.md (34)
.github/ISSUE_TEMPLATE/vulnerability.md (26)
.github/ISSUE_TEMPLATE/bug.md (24)
.github/ISSUE_TEMPLATE/question.md (18)
⚠️ #21838 cmd/faucet: improve handling of facebook post url 1/0/0
cmd/faucet (1)
4/1
cmd/faucet/faucet.go (10)
⚠️ #21896 les: fix GetProofsV2 bug 1/0/0
les (1)
2/4
les/server_handler.go (12)
#21894 github: Remove vulnerability.md 0/0/1
.github/ISSUE_TEMPLATE (1)
0/13
.github/ISSUE_TEMPLATE/vulnerability.md (26)
#21792 cmd/devp2p/internal/ethtest: add 'large announcement' tests 2/1/0
cmd/devp2p/internal/ethtest (3)
284/34
cmd/devp2p/internal/ethtest/suite.go (430)
cmd/devp2p/internal/ethtest/large.go (160)
cmd/devp2p/internal/ethtest/types.go (46)
⚠️ #21897 core/types: fixed typo 1/0/0
core/types (1)
1/1
core/types/transaction.go (4)
#21854 simplify nested complexity and if blocks ending with a return statement 19/0/0
les (4)
les/lespay/server (3)
crypto/bls12381 (2)
rpc (1)
p2p/nat (1)
cmd/clef (1)
cmd/utils (1)
console (1)
core (1)
p2p/nodestate (1)
p2p/simulations (1)
rlp (1)
trie (1)
56/83
les/serverpool_test.go (78)
cmd/utils/flags.go (38)
console/bridge.go (34)
les/benchmark.go (18)
p2p/simulations/network.go (18)
⚠️ #21882 Make sure to return 400 when errors are present in the response 2/0/0
graphql (2)
84/4
graphql/graphql_test.go (104)
graphql/service.go (72)
⚠️ #21903 all: remove redundant conversions and import names 30/0/0
cmd/evm (4)
core/vm (4)
cmd/geth (3)
eth/filters (2)
accounts/abi (2)
accounts/keystore (2)
common/hexutil (1)
consensus/ethash (1)
eth/downloader (1)
accounts/scwallet (1)
cmd/devp2p (1)
cmd/clef (1)
cmd/utils (1)
core/state (1)
core (1)
accounts (1)
accounts/usbwallet (1)
contracts/checkpointoracle (1)
cmd/puppeth (1)
40/40
core/vm/gas_table.go (16)
core/vm/instructions.go (16)
accounts/abi/reflect_test.go (8)
cmd/puppeth/genesis.go (8)
core/state/statedb.go (8)
#21858 p2p/discover: fix deadlock in discv5 message dispatch 1/0/0
p2p/discover (1)
14/3
p2p/discover/v5_udp.go (34)
⚠️ #21798 crypto: signing builds with signify/minisign 4/3/0
crypto/signify (3)
go.mod (1)
go.sum (1)
.travis.yml (1)
build (1)
472/32
crypto/signify/signify_test.go (308)
crypto/signify/signify_fuzz.go (296)
crypto/signify/signify.go (236)
build/ci.go (108)
.travis.yml (52)
⚠️ #21757 accounts, signer: fix Ledger Live account derivation path (clef) 3/0/0
accounts (2)
signer/core (1)
117/47
signer/core/api.go (194)
accounts/hd_test.go (78)
accounts/hd.go (56)
#21914 accounts/keystore: add missing function doc for SignText 1/0/0
accounts/keystore (1)
6/4
accounts/keystore/wallet.go (20)
⚠️ #21919 cmd/geth: make tests run quicker + use less memory and disk 5/0/0
cmd/geth (5)
71/89
cmd/geth/consolecmd_test.go (186)
cmd/geth/accountcmd_test.go (118)
cmd/geth/dao_test.go (8)
cmd/geth/genesis_test.go (4)
cmd/geth/les_test.go (4)
#21857 cmd/devp2p/internal/ethtest: add transaction tests 4/3/2
cmd/devp2p/internal/ethtest/testdata (5)
cmd/devp2p/internal/ethtest (4)
243/24
cmd/devp2p/internal/ethtest/transaction.go (360)
cmd/devp2p/internal/ethtest/types.go (90)
cmd/devp2p/internal/ethtest/suite.go (76)
cmd/devp2p/internal/ethtest/chain_test.go (4)
cmd/devp2p/internal/ethtest/testdata/genesis.json (4)
#21927 p2p/nodestate: fix deadlock 1/0/0
p2p/nodestate (1)
1/1
p2p/nodestate/nodestate.go (4)
#21906 les: fix nodiscover option 5/0/0
eth (2)
les (2)
cmd/utils (1)
9/9
eth/discovery.go (10)
les/enr_entry.go (10)
cmd/utils/flags.go (8)
eth/backend.go (4)
les/client.go (4)
⚠️ #21941 params: update CHTs 1/0/0
params (1)
16/16
params/config.go (64)
⚠️ #21830 eth: fix error in tracing if reexec is set 1/0/0
eth (1)
3/5
eth/api_tracer.go (16)
⚠️ #21934 go.mod: update github.com/golang/snappy 2/0/0
go.mod (1)
go.sum (1)
3/1
go.mod (4)
go.sum (4)
#21950 cmd/devp2p: add node filter for snap + fix arg error 1/0/0
cmd/devp2p (1)
15/4
cmd/devp2p/nodesetcmd.go (38)
#21956 core/vm/runtime: remove duplicate line 1/0/0
core/vm/runtime (1)
0/1
core/vm/runtime/runtime.go (2)
⚠️ #21869 core: improve contextual information on core errors 7/1/0
core (5)
accounts/abi/bind/backends (1)
light (1)
miner (1)
179/20
core/state_processor_test.go (304)
core/state_transition.go (42)
miner/worker.go (20)
core/state_processor.go (8)
core/tx_pool_test.go (8)
⚠️ #21859 cmd/geth: implement vulnerability check 4/15/0
cmd/geth/testdata/vcheck (6)
cmd/geth (4)
cmd/geth/testdata/vcheck/minisig-sigs (3)
cmd/geth/testdata/vcheck/sigs (3)
cmd/geth/testdata/vcheck/signify-sigs (1)
go.mod (1)
go.sum (1)
437/0
cmd/geth/version_check.go (338)
cmd/geth/version_check_test.go (158)
cmd/geth/testdata/vcheck/data2.json (124)
cmd/geth/testdata/vcheck/data.json (122)
cmd/geth/misccmd.go (54)
#21960 les: cosmetic rewrite of the arm64 float bug workaround 1/0/0
les/utils (1)
3/2
les/utils/expiredvalue.go (10)
#21735 crypto/secp256k1: add workaround for go mod vendor 0/8/0
crypto/secp256k1 (1)
crypto/secp256k1/libsecp256k1/contrib (1)
crypto/secp256k1/libsecp256k1 (1)
crypto/secp256k1/libsecp256k1/include (1)
crypto/secp256k1/libsecp256k1/src (1)
crypto/secp256k1/libsecp256k1/src/modules (1)
crypto/secp256k1/libsecp256k1/src/modules/ecdh (1)
crypto/secp256k1/libsecp256k1/src/modules/recovery (1)
69/0
crypto/secp256k1/dummy.go (40)
crypto/secp256k1/libsecp256k1/contrib/dummy.go (14)
crypto/secp256k1/libsecp256k1/dummy.go (14)
crypto/secp256k1/libsecp256k1/include/dummy.go (14)
crypto/secp256k1/libsecp256k1/src/dummy.go (14)
#21356 accounts/abi/bind: allow to specify signer on transactOpts 9/0/0
accounts/abi/bind (3)
accounts/abi/bind/backends (2)
les (2)
contracts/checkpointoracle (1)
mobile (1)
127/40
accounts/abi/bind/auth.go (184)
accounts/abi/bind/bind_test.go (68)
accounts/abi/bind/backends/simulated_test.go (24)
mobile/bind.go (24)
les/sync_test.go (12)
⚠️ #21834 common: improve printing of Hash and Address 2/0/0
common (2)
242/18
common/types_test.go (332)
common/types.go (188)
⚠️ #21471 core,les: headerchain import in batches 3/1/0
core (3)
light (1)
309/140
core/headerchain.go (584)
core/headerchain_test.go (230)
light/lightchain.go (68)
core/blockchain.go (16)
#21962 cmd/geth: add test to verify regexps in version check 1/0/1
cmd/geth/testdata/vcheck (1)
cmd/geth (1)
72/13
cmd/geth/version_check_test.go (126)
cmd/geth/testdata/vcheck/vulnerabilities.json (44)
#21977 crypto/signify, build: fix archive signing with signify 4/0/0
crypto/signify (2)
.travis.yml (1)
build (1)
66/82
crypto/signify/signify.go (200)
.travis.yml (52)
build/ci.go (28)
crypto/signify/signify_test.go (16)
#21981 p2p/enode: avoid crashing for invalid IP 1/0/0
p2p/enode (1)
28/0
p2p/enode/nodedb.go (56)
⚠️ #21907 les, light: remove untrusted header retrieval in ODR 9/0/0
les (6)
light (3)
125/82
les/client_handler.go (124)
les/odr_requests.go (104)
light/odr_util.go (78)
les/odr.go (44)
light/odr.go (22)
#21987 core, trie: speed up some tests with quadratic processing flaw 2/0/0
core/state (1)
trie (1)
16/21
core/state/sync_test.go (60)
trie/sync_test.go (14)
⚠️ #21974 les: introduce forkID 5/0/0
les (5)
68/21
les/client_handler.go (56)
les/peer.go (54)
les/peer_test.go (46)
les/server_handler.go (12)
les/protocol.go (10)
⚠️ #21986 build: upgrade to Go 1.15.6 2/0/0
build (2)
13/9
build/checksums.txt (40)
build/ci.go (4)

229 Changed files

🔍 File Lines Changed Linked PR
⚠️ cmd/geth/retesteth.go 1832 #21861
#21672
core/headerchain.go 590 #21471
#21854
cmd/devp2p/internal/ethtest/suite.go 490 #21792
#21857
cmd/devp2p/internal/ethtest/transaction.go 360 #21857
cmd/geth/version_check.go 338 #21859
⚠️ common/types_test.go 332 #21834
crypto/signify/signify_test.go 308 #21977
#21798
core/state_processor_test.go 304 #21869
crypto/signify/signify_fuzz.go 296 #21798
cmd/geth/retesteth_copypaste.go 296 #21861
cmd/geth/version_check_test.go 260 #21859
#21962
⚠️ node/rpcstack_test.go 250 #21481
crypto/bn256/bn256_fuzz.go 246 #21872
#21815
core/vm/testdata/precompiles/modexp_eip2565.json 242 #21607
core/headerchain_test.go 230 #21471
tests/fuzzers/bls12381/bls_fuzzer.go 202 #21796
crypto/signify/signify.go 200 #21977
#21798
⚠️ signer/core/api.go 194 #21757
⚠️ common/types.go 192 #21814
#21834
⚠️ cmd/geth/consolecmd_test.go 186 #21919
⚠️ accounts/abi/bind/auth.go 184 #21356
les/client_handler.go 180 #21907
#21974
⚠️ trie/database.go 166 #21402
core/vm/contracts.go 160 #21607
cmd/devp2p/internal/ethtest/large.go 160 #21792
⚠️ eth/api_tracer.go 144 #21402
#21672
#21830
cmd/geth/testdata/vcheck/vulnerabilities.json 140 #21962
cmd/devp2p/internal/ethtest/types.go 136 #21792
#21857
⚠️ rpc/websocket.go 130 #21481
⚠️ cmd/geth/les_test.go 126 #21860
#21871
#21919
cmd/geth/testdata/vcheck/data.json 122 #21859
⚠️ cmd/geth/accountcmd_test.go 120 #21871
#21919
⚠️ build/ci.go 116 #21977
#21798
#21986
trie/trie_test.go 114 #21871
les/odr_requests.go 110 #21854
#21907
⚠️ core/state_processor.go 104 #21672
#21869
⚠️ graphql/graphql_test.go 104 #21882
⚠️ core/vm/evm.go 86 #21672
#21903
⚠️ cmd/utils/flags.go 80 #21402
#21854
#21903
#21906
light/odr_util.go 78 #21907
accounts/hd_test.go 78 #21757
les/serverpool_test.go 78 #21854
⚠️ graphql/service.go 72 #21882
⚠️ light/lightchain.go 68 #21471
⚠️ accounts/abi/bind/bind_test.go 68 #21356
⚠️ params/config.go 64 #21941
core/state/sync_test.go 60 #21987
p2p/enode/nodedb.go 60 #21981
⚠️ core/state_transition.go 58 #21672
#21869
accounts/hd.go 56 #21757
core/vm/contracts_test.go 54 #21607
⚠️ cmd/geth/misccmd.go 54 #21859
les/peer.go 54 #21974
.travis.yml 52 #21977
#21798
⚠️ core/vm/instructions.go 48 #21672
#21903
les/peer_test.go 46 #21974
⚠️ core/blockchain.go 46 #21402
#21471
tests/fuzzers/txfetcher/txfetcher_fuzzer.go 44 #21829
les/odr.go 44 #21907
⚠️ eth/tracers/tracers_test.go 42 #21672
build/checksums.txt 40 #21986
crypto/secp256k1/dummy.go 40 #21735
consensus/ethash/algorithm.go 40 #21372
cmd/devp2p/nodesetcmd.go 38 #21950
oss-fuzz.sh 38 #21796
.github/ISSUE_TEMPLATE/feature.md 34 #21890
console/bridge.go 34 #21854
p2p/discover/v5_udp.go 34 #21858
⚠️ graphql/graphql.go 32
core/evm.go 32 #21672
tests/fuzzers/rlp/rlp_fuzzer.go 32 #21829
internal/cmdtest/test_cmd.go 30 #21871
⚠️ core/vm/instructions_test.go 28 #21672
rpc/endpoints.go 28 #21871
.github/ISSUE_TEMPLATE/bug.md 24 #21890
accounts/keystore/wallet.go 24 #21903
#21914
⚠️ les/server_handler.go 24 #21896
#21974
⚠️ accounts/abi/bind/backends/simulated_test.go 24 #21356
mobile/bind.go 24 #21356
crypto/bn256/cloudflare/bn256.go 22 #21847
#21815
⚠️ p2p/server.go 22 #21878
les/utils/weighted_select.go 22 #21839
trie/secure_trie.go 22 #21402
light/odr.go 22 #21907
⚠️ core/vm/runtime/env.go 20 #21672
⚠️ cmd/evm/internal/t8ntool/execution.go 20 #21672
⚠️ les/odr_test.go 20 #21672
⚠️ tests/vm_test_util.go 20 #21672
⚠️ core/state/database.go 20 #21402
event/feed_test.go 20
⚠️ miner/worker.go 20 #21869
crypto/bls12381/fp_test.go 18 #21796
.github/ISSUE_TEMPLATE/question.md 18 #21890
⚠️ accounts/abi/bind/backends/simulated.go 18 #21672
#21356
#21869
les/retrieve.go 18 #21907
p2p/simulations/network.go 18 #21854
les/benchmark.go 18 #21854
⚠️ core/vm/gas_table.go 16 #21903
⚠️ cmd/clef/main.go 16 #21854
#21903
les/sync_test.go 16 #21356
#21907
cmd/geth/run_test.go 16 #21871
trie/sync_test.go 14 #21987
crypto/secp256k1/libsecp256k1/src/modules/recovery/dummy.go 14 #21735
crypto/secp256k1/libsecp256k1/dummy.go 14 #21735
crypto/bn256/google/constants.go 14 #21836
#21847
tests/fuzzers/stacktrie/trie_fuzzer.go 14 #21829
crypto/secp256k1/libsecp256k1/include/dummy.go 14 #21735
crypto/secp256k1/libsecp256k1/src/modules/dummy.go 14 #21735
crypto/secp256k1/libsecp256k1/src/dummy.go 14 #21735
core/vm/runtime/runtime.go 14 #21672
#21956
crypto/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go 14 #21735
crypto/secp256k1/libsecp256k1/contrib/dummy.go 14 #21735
common/bitutil/compress_fuzz.go 12 #21829
⚠️ eth/gen_config.go 12 #21402
⚠️ cmd/geth/main.go 12 #21861
#21402
#21859
#21903
les/sync.go 12 #21907
⚠️ core/tx_pool_test.go 12 #21869
#21903
p2p/nodestate/nodestate_test.go 12 #21854
crypto/bn256/google/bn256.go 10 #21847
⚠️ light/odr_test.go 10 #21672
miner/unconfirmed_test.go 10
les/utils/expiredvalue.go 10 #21960
⚠️ cmd/faucet/faucet.go 10 #21838
⚠️ les/api_backend.go 10 #21672
⚠️ core/state_prefetcher.go 10 #21672
⚠️ go.sum 10 #21859
#21798
#21934
les/enr_entry.go 10 #21906
⚠️ eth/api_backend.go 10 #21672
eth/discovery.go 10 #21906
⚠️ tests/state_test_util.go 10 #21672
les/protocol.go 10 #21974
⚠️ core/vm/gas_table_test.go 8 #21672
accounts/abi/reflect_test.go 8 #21903
⚠️ core/state/statedb.go 8 #21903
cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.2 8 #21859
⚠️ eth/tracers/tracer_test.go 8 #21672
cmd/geth/testdata/vcheck/sigs/vulnerabilities.json.minisig.3 8 #21859
metrics/cpu_enabled.go 8 #21864
⚠️ light/trie.go 8 #21907
⚠️ eth/filters/api.go 8 #21903
cmd/geth/testdata/vcheck/sigs/vulnerabilities.json.minisig.2 8 #21859
les/flowcontrol/control.go 8 #21839
cmd/puppeth/genesis.go 8 #21903
cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.3 8 #21859
⚠️ accounts/abi/bind/base.go 8 #21356
eth/tracers/tracer.go 8 #21672
cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.1 8 #21859
light/postprocess.go 8 #21402
crypto/secp256k1/curve.go 8 #18419
⚠️ core/state/state_test.go 8 #21402
cmd/geth/testdata/vcheck/sigs/vulnerabilities.json.minisig.1 8 #21859
⚠️ cmd/geth/dao_test.go 8 #21919
les/serverpool.go 6 #21854
p2p/nat/nat.go 6 #21854
⚠️ les/test_helper.go 6 #21356
light/lightchain_test.go 6 #21869
⚠️ core/blockchain_test.go 6 #21869
rlp/encode_test.go 6 #21854
crypto/bls12381/g1.go 6 #21854
⚠️ eth/backend.go 6 #21402
#21906
crypto/bls12381/g2.go 6 #21854
les/lespay/server/prioritypool.go 6 #21854
⚠️ go.mod 6 #21859
#21798
#21934
les/lespay/server/balance.go 6 #21854
les/lespay/server/balance_tracker.go 6 #21854
⚠️ cmd/geth/usage.go 6 #21402
#21903
⚠️ rpc/client.go 6 #21854
common/hexutil/json_test.go 4 #21903
⚠️ les/client.go 4 #21906
accounts/keystore/passphrase.go 4 #21903
cmd/geth/testdata/vcheck/signifykey.pub 4 #21859
mobile/ethereum.go 4
⚠️ consensus/ethash/ethash.go 4 #21903
cmd/evm/runner.go 4 #21903
⚠️ core/vm/logger_test.go 4 #21672
accounts/scwallet/wallet.go 4 #21903
⚠️ cmd/geth/genesis_test.go 4 #21919
cmd/geth/testdata/vcheck/signify-sigs/data.json.sig 4 #21859
⚠️ core/types/transaction.go 4 #21897
⚠️ internal/ethapi/api.go 4
trie/iterator.go 4
cmd/devp2p/internal/ethtest/testdata/genesis.json 4 #21857
internal/debug/flags.go 4
eth/api_test.go 4 #21402
signer/core/signed_data.go 4
cmd/geth/testdata/vcheck/minisign.pub 4 #21859
⚠️ eth/filters/filter_system.go 4 #21903
eth/downloader/api.go 4 #21903
⚠️ params/version.go 4
cmd/geth/testdata/vcheck/minisign.sec 4 #21859
cmd/devp2p/internal/ethtest/chain_test.go 4 #21857
cmd/evm/disasm.go 4 #21903
cmd/evm/compiler.go 4 #21903
cmd/geth/testdata/vcheck/signifykey.sec 4 #21859
accounts/accounts.go 4 #21903
cmd/devp2p/dnscmd.go 4 #21903
⚠️ core/genesis.go 4 #21402
accounts/abi/type_test.go 4 #21903
contracts/checkpointoracle/oracle.go 4 #21903
⚠️ accounts/usbwallet/wallet.go 4 #21903
internal/flags/helpers.go 4
⚠️ eth/filters/filter_system_test.go 4
tests/fuzzers/keystore/keystore-fuzzer.go 4 #21829
p2p/nodestate/nodestate.go 4 #21927
cmd/evm/staterunner.go 4 #21903
⚠️ cmd/geth/config.go 4 #21903
contracts/checkpointoracle/oracle_test.go 4 #21356
core/vm/operations_acl.go 4 #21903
event/event_test.go 4
⚠️ accounts/abi/bind/template.go 2 #21807
trie/committer.go 2 #21854
⚠️ node/rpcstack.go 2 #21871
⚠️ eth/config.go 2 #21402
⚠️ params/protocol_params.go 2 #21607
tests/fuzzers/bls12381/testdata/fuzz_g1_mul_seed_corpus.zip 0 #21796
tests/fuzzers/bls12381/testdata/fuzz_g2_multiexp_seed_corpus.zip 0 #21796
tests/fuzzers/bls12381/testdata/fuzz_pairing_seed_corpus.zip 0 #21796
```` 0 #21859
tests/fuzzers/bls12381/testdata/fuzz_g1_add_seed_corpus.zip 0 #21796
tests/fuzzers/bls12381/testdata/fuzz_map_g1_seed_corpus.zip 0 #21796
cmd/devp2p/internal/ethtest/testdata/chain.rlp 0 #21857
cmd/devp2p/internal/ethtest/testdata/halfchain.rlp 0 #21857
tests/fuzzers/bls12381/testdata/fuzz_g2_add_seed_corpus.zip 0 #21796
cmd/devp2p/internal/ethtest/testdata/halfchain.rlp.gz 0 #21857
tests/fuzzers/bls12381/testdata/fuzz_g1_multiexp_seed_corpus.zip 0 #21796
tests/fuzzers/bls12381/testdata/fuzz_map_g2_seed_corpus.zip 0 #21796
tests/fuzzers/bls12381/testdata/fuzz_g2_mul_seed_corpus.zip 0 #21796
cmd/devp2p/internal/ethtest/testdata/fullchain.rlp.gz 0 #21857
```` 0 #21890
#21894

fjl and others added 30 commits November 12, 2020 21:21
* crypto/cloudflare: fix nil deref in random G1/G2 reading

* crypto/bn256: improve fuzzer

* crypto/bn256: fix some flaws in fuzzer
* tests/fuzzers, common/bitutil: make fuzzers use correct returnvalues + remove output

* tests/fuzzers/stacktrie: fix duplicate-key insertion in stacktrie (false positive)

* tests/fuzzers/stacktrie: fix compilation error

* tests/fuzzers: linter nits
* core/vm, protocol_params: implement eip-2565 modexp repricing

* core/vm: fix review concerns
* all: core: split vm.Config into BlockConfig and TxConfig

* core: core/vm: reset EVM between tx in block instead of creating new

* core/vm: added docs
* consensus/ethash: only use *reflect.SliceHeader, not reflect.SliceHeader. See comment here: https://github.com/golang/go/issues/40397\#issuecomment-663748689

* consensus/ethash: pr feedback from @mdempsky, makes a copy of dest such that is not mutated

* consensus/ethash: remove noop assign

* consensus/ethash: apply same fix to another location

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
The z == 0 check is hit whenever we Add two points with the same x1/x2
coordinate. crypto/elliptic uses the same check in their affineFromJacobian
function. This change does not affect block processing or tx signature verification
in any way, because it does not use the Add or Double methods.
* cmd, core, eth, light, trie: disable recording preimage by default

* core, eth: fix unit tests

* core: fix import

* all: change to nopreimage

* cmd, core, eth, trie: use cache.preimages flag

* cmd: enable preimages for archive node

* cmd/utils, trie: simplify preimage tracking a bit

* core: fix linter

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* Only compare hostnames in ws.origins

Also using a helper function for ToLower consolidates all preparation steps in one function for more maintainable consistency.

Spaces => tabs

Remove a semicolon

Add space at start of comment

Remove parens around conditional

Handle case wehre parsed hostname is empty

When passing a single word like "localhost" the parsed hostname is an empty string. Handle this and the error-parsing case together as default, and the nonempty hostname case in the conditional.

Refactor with new originIsAllowed functions

Adds originIsAllowed() & ruleAllowsOrigin(); removes prepOriginForComparison

Remove blank line

Added tests for simple allowed-orign rule

which does not specify a protocol or port, just a hostname

Fix copy-paste: `:=` => `=`

Remove parens around conditional

Remove autoadded whitespace on blank lines

Compare scheme, hostname, and port with rule

if the rule specifies those portions.

Remove one autoadded trailing whitespace

Better handle case where only origin host is given

e.g. "localhost"

Remove parens around conditional

Refactor: attemptWebsocketConnectionFromOrigin DRY

Include return type on helper function

Provide srv obj in helper fn

Provide srv to helper fn

Remove stray underscore

Remove blank line

parent 93e666b4c1e7e49b8406dc83ed93f4a02ea49ac1
author wbt <wbt@users.noreply.github.com> 1598559718 -0400
committer Martin Holst Swende <martin@swende.se> 1605602257 +0100
gpgsig -----BEGIN PGP SIGNATURE-----

 iQFFBAABCAAvFiEEypmrtbNuJK1doP1AaDtDjAWl3fAFAl+zi9ARHG1hcnRpbkBz
 d2VuZGUuc2UACgkQaDtDjAWl3fDRiwgAoMtzU8dwRV7Q9xkCwWEx9Wz2f3n6jUr2
 VWBycDKGKwRkPPOER3oc9kzjGU/P1tFlK07PjfnAKZ9KWzxpDcJZwYM3xCBurG7A
 16y4YsQnzgPNONv3xIkdi3RZtDBIiPFFEmdZFFvZ/jKexfI6JIYPngCAoqdTIFb9
 On/aPvvVWQn1ExfmarsvvJ7kUDUG77tZipuacEH5FfFsfelBWOEYPe+I9ToUHskv
 +qO6rOkV1Ojk8eBc6o0R1PnApwCAlEhJs7aM/SEOg4B4ZJJneiFuEXBIG9+0yS2I
 NOicuDPLGucOB5nBsfIKI3USPeE+3jxdT8go2lN5Nrhm6MimoILDsQ==
 =sgUp
 -----END PGP SIGNATURE-----

Refactor: drop err var for more concise test lines

Add several tests for new WebSocket origin checks

Remove autoadded whitespace on blank lines

Restore TestWebsocketOrigins originally-named test

and rename the others to be helpers rather than full tests

Remove autoadded whitespace on blank line

Temporarily comment out new test sets

Uncomment test around origin rule with scheme

Remove tests without scheme on browser origin

per https://github.com/ethereum/go-ethereum/pull/21481/files#r479371498

Uncomment tests with port; remove some blank lines

Handle when browser does not specify scheme/port

Uncomment test for including scheme & port in rule

Add IP tests

* node: more tests + table-driven, ws origin changes

Co-authored-by: Martin Holst Swende <martin@swende.se>
…s (#21871)

* trie: fix tests to work on 32-bit systems

* les: make test work on 32-bit platform

* cmd/geth: fix windows-issues on tests

* trie: improve balance

* cmd/geth: make account tests less verbose + less mem intense

* rpc: make debug-level log output less verbose

* cmd/geth: lint
* crypto/bn256: fix bn256Mul fuzzer to not hang on large input

* Update crypto/bn256/bn256_fuzz.go

Co-authored-by: ligi <ligi@ligi.de>

Co-authored-by: ligi <ligi@ligi.de>
* p2p: avoid busy-loop on temporary errors

* p2p: address review concerns
Also fixes a bug in les/flowcontrol that caused the overflow.
* added bls fuzzer

* crypto/bls12381: revert bls-changes, fixup fuzzer tests

* fuzzers: split bls fuzzing into 8 different units

* fuzzers/bls: remove (now stale) corpus

* crypto/bls12381: added blsfuzz corpus

* fuzzers/bls12381: fix the bls corpus

* fuzzers: fix oss-fuzz script

* tests/fuzzers: fixups on bls corpus

* test/fuzzers: remove leftover corpus

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
github: Add new style of issue-templates
Resolves #21532

Co-authored-by: roger <dengjun@huobi.com>
This type is automatically offered by github after changing to the new style and a security.md being present
* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: refactored stuff a bit

* cmd/devp2p/internal/ethtest: added TestMaliciousStatus/Handshake

* cmd/devp2p/internal/ethtest: fixed rebasing issue

* happy linter, happy life

* cmd/devp2p/internal/ethtest: used readAndServe

* stuff

* cmd/devp2p/internal/ethtest: fixed test cases
…atement (#21854)

Changes:

    Simplify nested complexity
    If an if blocks ends with a return statement then remove the else nesting.

Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
accounts/abi/bind/base.go Show resolved Hide resolved
accounts/abi/bind/base.go Show resolved Hide resolved
build/checksums.txt Show resolved Hide resolved
cmd/geth/version_check.go Show resolved Hide resolved
consensus/istanbul/backend/engine_test.go Outdated Show resolved Hide resolved
core/state_processor.go Outdated Show resolved Hide resolved
accounts/abi/bind/auth.go Outdated Show resolved Hide resolved
ricardolyn
ricardolyn previously approved these changes Aug 31, 2021
Copy link
Contributor

@ricardolyn ricardolyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

core/blockchain.go Outdated Show resolved Hide resolved
but pass a non nil value
@baptiste-b-pegasys baptiste-b-pegasys merged commit df65151 into Consensys:master Sep 3, 2021
@baptiste-b-pegasys baptiste-b-pegasys deleted the upgrade/go-ethereum/v1.9.25-2021629165723 branch September 3, 2021 08:20
danielporto pushed a commit to danielporto/quorum that referenced this pull request Sep 7, 2021
* params: begin v1.9.25 release cycle

* crypto/bn256: improve bn256 fuzzer (#21815)

* crypto/cloudflare: fix nil deref in random G1/G2 reading

* crypto/bn256: improve fuzzer

* crypto/bn256: fix some flaws in fuzzer

* crypto/bn256: better comments for u, P and Order (#21836)

* tests/fuzzers: improve the fuzzers (#21829)

* tests/fuzzers, common/bitutil: make fuzzers use correct returnvalues + remove output

* tests/fuzzers/stacktrie: fix duplicate-key insertion in stacktrie (false positive)

* tests/fuzzers/stacktrie: fix compilation error

* tests/fuzzers: linter nits

* core/vm, protocol_params: implement eip-2565 modexp repricing (#21607)

* core/vm, protocol_params: implement eip-2565 modexp repricing

* core/vm: fix review concerns

* core, all: split vm.Context into BlockContext and TxContext (#21672)

* all: core: split vm.Config into BlockConfig and TxConfig

* core: core/vm: reset EVM between tx in block instead of creating new

* core/vm: added docs

* accounts/abi: template: set events Raw field in Parse methods (#21807)

* common: fix documentation of Address.SetBytes (#21814)

* crypto/bn256: refine comments according to #19577, #21595, and #21836 (#21847)

* consensus/ethash: fix usage of *reflect.SliceHeader (#21372)

* consensus/ethash: only use *reflect.SliceHeader, not reflect.SliceHeader. See comment here: https://github.com/golang/go/issues/40397\#issuecomment-663748689

* consensus/ethash: pr feedback from @mdempsky, makes a copy of dest such that is not mutated

* consensus/ethash: remove noop assign

* consensus/ethash: apply same fix to another location

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* cmd/geth: remove retesteth

* crypto/secp256k1: add checking z sign in affineFromJacobian (#18419)

The z == 0 check is hit whenever we Add two points with the same x1/x2
coordinate. crypto/elliptic uses the same check in their affineFromJacobian
function. This change does not affect block processing or tx signature verification
in any way, because it does not use the Add or Double methods.

* cmd/geth: improve les test on windows (#21860)

* all: disable recording preimage of trie keys (#21402)

* cmd, core, eth, light, trie: disable recording preimage by default

* core, eth: fix unit tests

* core: fix import

* all: change to nopreimage

* cmd, core, eth, trie: use cache.preimages flag

* cmd: enable preimages for archive node

* cmd/utils, trie: simplify preimage tracking a bit

* core: fix linter

Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* metrics: fix the panic for reading empty cpu stats (#21864)

* node: support expressive origin rules in ws.origins (#21481)

* Only compare hostnames in ws.origins

Also using a helper function for ToLower consolidates all preparation steps in one function for more maintainable consistency.

Spaces => tabs

Remove a semicolon

Add space at start of comment

Remove parens around conditional

Handle case wehre parsed hostname is empty

When passing a single word like "localhost" the parsed hostname is an empty string. Handle this and the error-parsing case together as default, and the nonempty hostname case in the conditional.

Refactor with new originIsAllowed functions

Adds originIsAllowed() & ruleAllowsOrigin(); removes prepOriginForComparison

Remove blank line

Added tests for simple allowed-orign rule

which does not specify a protocol or port, just a hostname

Fix copy-paste: `:=` => `=`

Remove parens around conditional

Remove autoadded whitespace on blank lines

Compare scheme, hostname, and port with rule

if the rule specifies those portions.

Remove one autoadded trailing whitespace

Better handle case where only origin host is given

e.g. "localhost"

Remove parens around conditional

Refactor: attemptWebsocketConnectionFromOrigin DRY

Include return type on helper function

Provide srv obj in helper fn

Provide srv to helper fn

Remove stray underscore

Remove blank line

parent 93e666b4c1e7e49b8406dc83ed93f4a02ea49ac1
author wbt <wbt@users.noreply.github.com> 1598559718 -0400
committer Martin Holst Swende <martin@swende.se> 1605602257 +0100
gpgsig -----BEGIN PGP SIGNATURE-----

 iQFFBAABCAAvFiEEypmrtbNuJK1doP1AaDtDjAWl3fAFAl+zi9ARHG1hcnRpbkBz
 d2VuZGUuc2UACgkQaDtDjAWl3fDRiwgAoMtzU8dwRV7Q9xkCwWEx9Wz2f3n6jUr2
 VWBycDKGKwRkPPOER3oc9kzjGU/P1tFlK07PjfnAKZ9KWzxpDcJZwYM3xCBurG7A
 16y4YsQnzgPNONv3xIkdi3RZtDBIiPFFEmdZFFvZ/jKexfI6JIYPngCAoqdTIFb9
 On/aPvvVWQn1ExfmarsvvJ7kUDUG77tZipuacEH5FfFsfelBWOEYPe+I9ToUHskv
 +qO6rOkV1Ojk8eBc6o0R1PnApwCAlEhJs7aM/SEOg4B4ZJJneiFuEXBIG9+0yS2I
 NOicuDPLGucOB5nBsfIKI3USPeE+3jxdT8go2lN5Nrhm6MimoILDsQ==
 =sgUp
 -----END PGP SIGNATURE-----

Refactor: drop err var for more concise test lines

Add several tests for new WebSocket origin checks

Remove autoadded whitespace on blank lines

Restore TestWebsocketOrigins originally-named test

and rename the others to be helpers rather than full tests

Remove autoadded whitespace on blank line

Temporarily comment out new test sets

Uncomment test around origin rule with scheme

Remove tests without scheme on browser origin

per https://github.com/ethereum/go-ethereum/pull/21481/files#r479371498

Uncomment tests with port; remove some blank lines

Handle when browser does not specify scheme/port

Uncomment test for including scheme & port in rule

Add IP tests

* node: more tests + table-driven, ws origin changes

Co-authored-by: Martin Holst Swende <martin@swende.se>

* trie, rpc, cmd/geth: fix tests on 32-bit and windows + minor rpc fixes (#21871)

* trie: fix tests to work on 32-bit systems

* les: make test work on 32-bit platform

* cmd/geth: fix windows-issues on tests

* trie: improve balance

* cmd/geth: make account tests less verbose + less mem intense

* rpc: make debug-level log output less verbose

* cmd/geth: lint

* crypto/bn256: fix bn256Mul fuzzer to not hang on large input (#21872)

* crypto/bn256: fix bn256Mul fuzzer to not hang on large input

* Update crypto/bn256/bn256_fuzz.go

Co-authored-by: ligi <ligi@ligi.de>

Co-authored-by: ligi <ligi@ligi.de>

* p2p: avoid spinning loop on out-of-handles (#21878)

* p2p: avoid busy-loop on temporary errors

* p2p: address review concerns

* les/utils: protect against WeightedRandomSelect overflow (#21839)

Also fixes a bug in les/flowcontrol that caused the overflow.

* github: Add new style of issue-templates

closes #20024

* tests/fuzzers/bls1381: add bls fuzzer (#21796)

* added bls fuzzer

* crypto/bls12381: revert bls-changes, fixup fuzzer tests

* fuzzers: split bls fuzzing into 8 different units

* fuzzers/bls: remove (now stale) corpus

* crypto/bls12381: added blsfuzz corpus

* fuzzers/bls12381: fix the bls corpus

* fuzzers: fix oss-fuzz script

* tests/fuzzers: fixups on bls corpus

* test/fuzzers: remove leftover corpus

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* cmd/faucet: improve handling of facebook post url (#21838)

Resolves #21532

Co-authored-by: roger <dengjun@huobi.com>

* les: fix GetProofsV2 bug (#21896)

* github: Remove vulnerability.md (#21894)

This type is automatically offered by github after changing to the new style and a security.md being present

* cmd/devp2p/internal/ethtest: add 'large announcement' tests (#21792)

* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: added large announcement tests

* cmd/devp2p/internal/ethtest: refactored stuff a bit

* cmd/devp2p/internal/ethtest: added TestMaliciousStatus/Handshake

* cmd/devp2p/internal/ethtest: fixed rebasing issue

* happy linter, happy life

* cmd/devp2p/internal/ethtest: used readAndServe

* stuff

* cmd/devp2p/internal/ethtest: fixed test cases

* core/types: fixed typo (#21897)

* all: simplify nested complexity and if blocks ending with a return statement (#21854)

Changes:

    Simplify nested complexity
    If an if blocks ends with a return statement then remove the else nesting.

Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint

* graphql: always return 400 if errors are present in the response (#21882)

* Make sure to return 400 when errors are present in the response

* graphql: use less memory in chainconfig for tests

Co-authored-by: Martin Holst Swende <martin@swende.se>

* all: remove redundant conversions and import names (#21903)

* p2p/discover: fix deadlock in discv5 message dispatch (#21858)

This fixes a deadlock that could occur when a response packet arrived
after a call had already received enough responses and was about to
signal completion to the dispatch loop.

Co-authored-by: Felix Lange <fjl@twurst.com>

* crypto: signing builds with signify/minisign (#21798)

* internal/build: implement signify's signing func
* Add signify to the ci utility
* fix output file format
* Add unit test for signify
* holiman's + travis' feedback
* internal/build: verify signify's output
* crypto: move signify to common dir
* use go-minisign to verify binaries
* more holiman feedback
* crypto, ci: support minisign output
* only accept one-line trusted comments
* configurable untrusted comments
* code cleanup in tests
* revert to use ed25519 from the stdlib
* bug: fix for empty untrusted comments
* write timestamp as comment if trusted comment isn't present
* rename line checker to commentHasManyLines
* crypto: added signify fuzzer (Consensys#6)
* crypto: added signify fuzzer
* stuff
* crypto: updated signify fuzzer to fuzz comments
* crypto: repro signify crashes
* rebased fuzzer on build-signify branch
* hide fuzzer behind gofuzz build flag
* extract key data inside a single function
* don't treat \r as a newline
* travis: fix signing command line
* do not use an external binary in tests
* crypto: move signify to crypto/signify
* travis: fix formatting issue
* ci: fix linter build after package move

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* accounts, signer: fix Ledger Live account derivation path (clef) (#21757)

* signer/core/api: fix derivation of ledger live accounts

For ledger hardware wallets, change account iteration as follows:

- ledger legacy: m/44'/60'/0'/X; for 0<=X<5
- ledger live: m/44'/60'/0'/0/X; for 0<=X<5

- ledger legacy: m/44'/60'/0'/X; for 0<=X<10
- ledger live: m/44'/60'/X'/0/0; for 0<=X<10

Non-ledger derivation is unchanged and remains as:
- non-ledger: m/44'/60'/0'/0/X; for 0<=X<10

* signer/core/api: derive ten default paths for all hardware wallets, plus ten legacy and ten live paths for ledger wallets

* signer/core/api: as .../0'/0/0 already included by default paths, do not include it again with ledger live paths

* accounts, signer: implement path iterators for hd wallets

Co-authored-by: Martin Holst Swende <martin@swende.se>

* accounts/keystore: add missing function doc for SignText (#21914)

Co-authored-by: Pascal Dierich <pascal@pascaldierich.com>

* cmd/geth: make tests run quicker + use less memory and disk (#21919)

* cmd/devp2p/internal/ethtest: add transaction tests (#21857)

* p2p/nodestate: fix deadlock during shutdown of les server (#21927)

This PR fixes a deadlock reported here: #21925

The cause is that many operations may be pending, but if the close happens, only one of them gets awoken and exits, the others remain waiting for a signal that never comes.

* les: fix nodiscover option (#21906)

* params: update CHTs (#21941)

* eth: fix error in tracing if reexec is set (#21830)

* eth: fix error in tracing if reexec is set

* eth: change pointer embedding to value-embedding

* go.mod: update github.com/golang/snappy(#21934)

This updates the snappy library depency to include a fix for
a Go 1.16 incompatibility issue.

* cmd/devp2p: add node filter for snap + fix arg error (#21950)

* core/vm/runtime: remove duplicated line (#21956)


This line is duplicated, though it doesn't cause any issues.

* core: improve contextual information on core errors (#21869)

A lot of times when we hit 'core' errors, example: invalid tx, the information provided is
insufficient. We miss several pieces of information: what account has nonce too high,
and what transaction in that block was offending?

This PR adds that information, using the new type of wrapped errors.
It also adds a testcase which (partly) verifies the output from the errors.

The first commit changes all usage of direct equality-checks on core errors, into
using errors.Is. The second commit adds contextual information. This wraps most
of the core errors with more information, and also wraps it one more time in
stateprocessor, to further provide tx index and tx hash, if such a tx is encoutered in
a block. The third commit uses the chainmaker to try to generate chains with such
errors in them, thus triggering the errors and checking that the generated string meets
expectations.

* cmd/geth: implement vulnerability check (#21859)

* cmd/geth: implement vulnerability check

* cmd/geth: use minisign to verify vulnerability feed

* cmd/geth: add the test too

* cmd/geth: more minisig/signify testing

* cmd/geth: support multiple pubfiles for signing

* cmd/geth: add @holiman minisig pubkey

* cmd/geth: polishes on vulnerability check

* cmd/geth: fix ineffassign linter nit

* cmd/geth: add CVE to version check struct

* cmd/geth/testdata: add missing testfile

* cmd/geth: add more keys to versionchecker

* cmd/geth: support file:// URLs in version check

* cmd/geth: improve key ID printing when signature check fails

Co-authored-by: Felix Lange <fjl@twurst.com>

* les: cosmetic rewrite of the arm64 float bug workaround (#21960)

* les: revert arm float bug workaround to check go 1.15

* add traces to reproduce outside travis

* simpler workaround

* crypto/secp256k1: add workaround for go mod vendor (#21735)

Go won't vendor C files if there are no Go files present in the directory.
Workaround is to add dummy Go files.

Fixes: #20232

* accounts/abi/bind: allow specifying signer on transactOpts (#21356)

This commit enables users to specify which signer they want to use while creating their transactOpts.
Previously all contract interactions used the homestead signer. Now a user can specify whether they
want to sign with homestead or EIP155 and specify the chainID which adds another layer of security.

Closes #16484

* common: improve printing of Hash and Address (#21834)

Both Hash and Address have a String method, which returns the value as
hex with 0x prefix. They also had a Format method which tried to print
the value using printf of []byte. The way Format worked was at odds with
String though, leading to a situation where fmt.Sprintf("%v", hash)
returned the decimal notation and hash.String() returned a hex string.

This commit makes it consistent again. Both types now support the %v,
%s, %q format verbs for 0x-prefixed hex output. %x, %X creates
unprefixed hex output. %d is also supported and returns the decimal
notation "[1 2 3...]".

For Address, the case of hex characters in %v, %s, %q output is
determined using the EIP-55 checksum. Using %x, %X with Address
disables checksumming.

Co-authored-by: Felix Lange <fjl@twurst.com>

* core,les: headerchain import in batches (#21471)

* core: add test for headerchain inserts

* core, light: write headerchains in batches

* core: change to one callback per batch of inserted headers + review concerns

* core: error-check on batch write

* core: unexport writeHeaders

* core: remove callback parameter in InsertHeaderChain

The semantics of InsertHeaderChain are now much simpler: it is now an
all-or-nothing operation. The new WriteStatus return value allows
callers to check for the canonicality of the insertion. This change
simplifies use of HeaderChain in package les, where the callback was
previously used to post chain events.

* core: skip some hashing when writing headers

* core: less hashing in header validation

* core: fix headerchain flaw regarding blacklisted hashes

Co-authored-by: Felix Lange <fjl@twurst.com>

* cmd/geth: add test to verify regexps in version check (#21962)

* crypto/signify, build: fix archive signing with signify (#21977)

This fixes some issues in crypto/signify and makes release signing work.

The archive signing step in ci.go used getenvBase64, which decodes the key data.
This is incorrect here because crypto/signify already base64-decodes the key.

* p2p/enode: avoid crashing for invalid IP (#21981)

The database panicked for invalid IPs. This is usually no problem
because all code paths leading to node DB access verify the IP, but it's
dangerous because improper validation can turn this panic into a DoS
vulnerability. The quick fix here is to just turn database accesses
using invalid IP into a noop. This isn't great, but I'm planning to
remove the node DB for discv5 long-term, so it should be fine to have
this quick fix for half a year.

Fixes #21849

* les, light: remove untrusted header retrieval in ODR (#21907)

* les, light: remove untrusted header retrieval in ODR

* les: polish

* light: check the hash equality in odr

* core, trie: speed up some tests with quadratic processing flaw (#21987)

This commit fixes a flaw in two testcases, and brings down the exec-time from ~40s to ~8s for trie/TestIncompleteSync.

The checkConsistency was performed over and over again on the complete set of nodes, not just the recently added, turning it into a quadratic runtime.

* les: introduce forkID (#21974)

* les: introduce forkID

* les: address comment

* build: upgrade to Go 1.15.6 (#21986)

* params: go-ethereum v1.9.25 stable

* fix: merge

* fix: review GoQ versions

* fix: GoQuorum signer

* fix: state processor, missing err formatting

* fix: restore tx GoQ modification

* fix: work with eip155 & psm tests

* fix: cmd geth tests

* fix: format (lint)

* fix: copy default value, don't erase it

* fix: cache config -> trie Config

* fix: unit test restored, check another error

* refactor: remove unused parameters

* fix: configure with default cache config

* fix: merge of master

* go 1.15.6

* fix: for review

* revert: unnecessary change

* fix: remove comment

* fix: review of variable name

* fix: use the ChainContext interface
in state_processor to be aligned with geth

* fix: null pointer

* fix: don't check nil pointer
but pass a non nil value

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Nicolas Feignon <nfeignon@gmail.com>
Co-authored-by: Pascal Dierich <pascal@pascaldierich.com>
Co-authored-by: Sad Pencil <sadpencil@outlook.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Abd ar-Rahman Hamidi <bakhtiyor.h@gmail.com>
Co-authored-by: gary rong <garyrong0905@gmail.com>
Co-authored-by: wbt <wbt@users.noreply.github.com>
Co-authored-by: ligi <ligi@ligi.de>
Co-authored-by: Felföldi Zsolt <zsfelfoldi@gmail.com>
Co-authored-by: LieutenantRoger <dijsky_2015@hotmail.com>
Co-authored-by: roger <dengjun@huobi.com>
Co-authored-by: Alex Prut <1648497+alexprut@users.noreply.github.com>
Co-authored-by: Antoine Toulme <atoulme@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Kristofer Peterson <svenski123@users.noreply.github.com>
Co-authored-by: Pascal Dierich <pascal@merkleplant.xyz>
Co-authored-by: Chris Ziogas <ziogas_chr@hotmail.com>
Co-authored-by: Steve Ruckdashel <steven.ruckdashel@optum.com>
Co-authored-by: Li, Cheng <lob4tt@gmail.com>
Co-authored-by: Baptiste Boussemart <baptiste.boussemart@consensys.net>
Co-authored-by: baptiste-b-pegasys <85155432+baptiste-b-pegasys@users.noreply.github.com>
Co-authored-by: Ricardo Silva <1945557+ricardolyn@users.noreply.github.com>
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.