-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
core/vm: update gascosts for BLS12-381 + use gnark instead of kilic #29441
core/vm: update gascosts for BLS12-381 + use gnark instead of kilic #29441
Conversation
ef60740
to
0af03ee
Compare
I just realized that the gas costs in the EIP where updated compared to what we had in our implementation. I've updated them (some by using the test vectors from Erigon). The table above does not reflect the current gas costs anymore. I will need to run some more benchmarks to make sure we can safely use the new gas costs |
Re "sg checks" vs "no sg checks". It's not up to us, is it? Doesn't the EIP mandate whether to do subgroup checks or not?? |
Yes, the EIP demands no subgroup checks (for now), but we were in discussions whether that should change, so I added them to the table |
Okay these are the timings with the updated gas costs
Again ecrecover benches at ~48MGas/s on this machine, so all gas costs seem to be well in line with our expectations |
|
||
// Initialize G1 | ||
g := bls12381.NewG1() | ||
points := make([]bls12381.G1Affine, k) |
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.
Any particular reason for making these non-pointers?
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.
g1Affine.MultiExp()
expects them as non-pointers
// Initialize G1 | ||
g := bls12381.NewG1() | ||
points := make([]bls12381.G1Affine, k) | ||
scalars := make([]fr.Element, k) |
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.
And these?
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.
Same here, the gnark library expects values instead of pointers
How come you have both |
@namiloh this is the name of a test we have in the code, thats why I added it to the table. I will do some more exploration around actual worst cases for blocks soon |
d4615eb
to
5c15dd8
Compare
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, iiuc this has no impact on current production code.
…thereum#29441) This PR updates the bls contracts from our internal implementation which is an unmaintained fork of the kilic library to the gnark-crypto library that is actively maintained by consensys. It also updates the gas-costs according to the EIP
commit 94579932b18931115f28aa7f87f02450bda084c9 Author: Mario Vega <[email protected]> Date: Tue Apr 23 07:10:24 2024 -0600 core/vm: fix Prague contracts (#29612) core/vm: fix prague contracts commit 256d4b099cf540ba99181d6e746d4a1eaebef054 Author: Felföldi Zsolt <[email protected]> Date: Tue Apr 23 13:31:32 2024 +0200 beacon/light: request finality update explicitly when necessary (#29567) This PR adds an extra mechanism to sync.HeadSync that tries to retrieve the latest finality update from every server each time it sends an optimistic update in a new epoch (unless we already have a validated finality update attested in the same epoch). Note that this is not necessary and does not happen if the new finality update is delivered before the optimistic update. The spec only mandates light_client_finality_update events when a new epoch is finalized. If the chain does not finalize for a while then we might need an explicit request that returns a finality proof that proves the same finality epoch from the latest attested epoch. commit b2b0e1da8cac279bf0466885d1abdc5d93402f41 Author: haoran <[email protected]> Date: Tue Apr 23 18:09:42 2024 +0800 all: fix various typos (#29600) * core: fix typo * rpc: fix typo * snap: fix typo * trie: fix typo * main: fix typo * abi: fix typo * main: fix field comment for basicOp commit 709e0b399712f113a907936b9f73da8c33afd3f1 Author: Aaron Chen <[email protected]> Date: Tue Apr 23 18:08:02 2024 +0800 metrics: remove librato (#29624) commit 0e380ddaf7d9ccba87d3a3688a3fb419b562451c Author: HAOYUatHZ <[email protected]> Date: Tue Apr 23 18:06:25 2024 +0800 miner: fix typos (#29625) commit 853e0c23f36579423dbac8b4bcb9eeedb53daa9b Author: Martin HS <[email protected]> Date: Tue Apr 23 10:33:36 2024 +0200 eth/catalyst, trie/pathdb: fix flaky tests (#29571) This change fixes three flaky tests `TestEth2AssembleBlock`,`TestEth2NewBlock`, `TestEth2PrepareAndGetPayload` and `TestDisable`. --------- Co-authored-by: Gary Rong <[email protected]> commit acd1eaae2c5006dd7f5ae42455bc7f61e5471013 Author: rjl493456442 <[email protected]> Date: Tue Apr 23 01:00:42 2024 +0800 core: remove bad block checks (#29609) commit e6689fe090cc56cb3f0c1948c5e5356ea1d20c1e Author: Felföldi Zsolt <[email protected]> Date: Mon Apr 22 13:19:42 2024 +0200 beacon/light/sync: print error log if checkpoint retrieval fails (#29532) Co-authored-by: Felix Lange <[email protected]> commit 1ec7af261223d6dad9370ee8263f86347b190bab Author: Ryan Schneider <[email protected]> Date: Mon Apr 22 03:17:06 2024 -0700 eth: Add eth_blobBaseFee RPC and blob fields to eth_feeHistory (#29140) Co-authored-by: lightclient <[email protected]> Co-authored-by: Felix Lange <[email protected]> commit c2dfe7a0c7321615e2524f1c677266de26d30d05 Author: Péter Szilágyi <[email protected]> Date: Mon Apr 22 12:56:54 2024 +0300 go.mod: update golang/x repos (#29604) commit 82b0dec7135b281c1b03064d50959dc992c2f94f Author: Felix Lange <[email protected]> Date: Mon Apr 22 10:31:17 2024 +0200 eth/filters: remove support for pending logs (#29574) This change removes support for subscribing to pending logs. "Pending logs" were always an odd feature, because it can never be fully reliable. When support for it was added many years ago, the intention was for this to be used by wallet apps to show the 'potential future token balance' of accounts, i.e. as a way of notifying the user of incoming transfers before they were mined. In order to generate the pending logs, the node must pick a subset of all public mempool transactions, execute them in the EVM, and then dispatch the resulting logs to API consumers. commit ad3d8cb12a368ea901a2b36b0708480065235308 Author: xiaodong <[email protected]> Date: Mon Apr 22 16:13:03 2024 +0800 cmd/geth: remove unused parameter (#29602) commit 28ccb2bbf82af487da856d459d4daaa7c0d9b064 Author: Aaron Chen <[email protected]> Date: Sun Apr 21 17:14:13 2024 +0800 build: fix string compare for SortFunc (#29595) commit 98f504f69fad798c03ad43a1fc40f243d2fc8215 Author: bugmaker9371 <[email protected]> Date: Sun Apr 21 17:13:36 2024 +0800 p2p/discover: fix test error messages (#29592) commit 2e06fbd409d64a400c19d26d7af383f868e34f11 Author: Marius van der Wijden <[email protected]> Date: Fri Apr 19 13:46:43 2024 +0200 core/vm: add KZG benchmark (#29583) commit cce879b71b772ca9df83ada499127d6ca8e7c8f6 Author: Mario Vega <[email protected]> Date: Fri Apr 19 02:07:52 2024 -0600 tests: define cancun-to-prague at 15K chainconig (#29557) tests: add cancun->prague config commit 81349ff6e53a5bcb7adee210274171c22ae64053 Author: ids <[email protected]> Date: Fri Apr 19 15:58:14 2024 +0800 eth/catalyst: fix typo (#29580) commit 823719b9e1b72174cd8245ae9e6f6f7d7072a8d6 Author: Martin HS <[email protected]> Date: Thu Apr 18 09:08:25 2024 +0200 core/vm: enable bls-precompiles for Prague (#29552) enables the bls-contracts on the "Prague" config, so that the testing-team can activate them to make tests. commit b5902cf595b3d83f6fa96b5a501213daec169f15 Author: rjl493456442 <[email protected]> Date: Thu Apr 18 14:48:50 2024 +0800 core: remove unused fields (#29569) commit 5f9514530818c4436238d4740111bd699470f0f1 Author: ucwong <[email protected]> Date: Thu Apr 18 07:21:23 2024 +0100 eth/ethconfig: regenerate autogen files (#29559) eth/ethconfig/gen_config.go : go generate fix commit 0da69e84c0d481e42f60cecc1562c208525117eb Author: Felföldi Zsolt <[email protected]> Date: Wed Apr 17 17:07:28 2024 +0200 beacon/blsync: proceed with empty finalized hash if proof is not expected soon (#29449) * beacon/blsync: proceed with empty finalized hash if proof is not expected soon * Update beacon/blsync/block_sync.go Co-authored-by: Felix Lange <[email protected]> * beacon/blsync: fixed linter warning * Update beacon/blsync/block_sync.go Co-authored-by: lightclient <[email protected]> --------- Co-authored-by: Felix Lange <[email protected]> Co-authored-by: lightclient <[email protected]> commit 1e9bf2a09ed3d82ac1aa69750a556f3ce127721d Author: Aaron Chen <[email protected]> Date: Wed Apr 17 19:55:31 2024 +0800 core/state: fix bug in statedb.Copy and remove unnecessary preallocation (#29563) This change removes an unnecessary preallocation and fixes a flaw with no-op copies of some parts of the statedb commit 74e8d2da97aacc2589d39584f6af74cb9d62ee3f Author: Aaron Chen <[email protected]> Date: Wed Apr 17 14:24:30 2024 +0800 trie/utils: simplify codeChunkIndex (#29480) minor simplification to the code commit 27de7dec658839722c8d84963d0a9b0c09a25d25 Author: rjl493456442 <[email protected]> Date: Wed Apr 17 13:52:08 2024 +0800 ethdb/pebble: print warning log if pebble performance degrades (#29478) commit 92da96b7d5400f006774e15d154f5fa8ea1ebd9f Author: Devon Bear <[email protected]> Date: Tue Apr 16 08:57:57 2024 -0400 core/vm: refactor push-functions to use `min` builtin (#29515) * optimize-push * revert push1 change * Update instructions.go * core/vm: go format * core/vm: fix nit --------- Co-authored-by: Felix Lange <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]> commit 0a5102881975120b5d321e40c325edba778314d8 Author: persmor <[email protected]> Date: Tue Apr 16 21:44:00 2024 +0900 all: fix various typos (#29542) * core/rawdb: fix typos * accounts/abi: fix typos * metrics: fix typo * beacon: fix typo * crypto: fix typo * rpc: fix typo * rpc: fix typo commit 5ffd940b7e67ba7bb3810a9ed234b5dc45c23cdb Author: ucwong <[email protected]> Date: Tue Apr 16 13:42:16 2024 +0100 core: go fmt (#29544) commit 65e32d47ea336b56d6c4bcfe212c11e8f38032bf Author: ucwong <[email protected]> Date: Tue Apr 16 13:32:50 2024 +0100 go.mod: clean up indirection (#29553) commit 72f69366de1d09fbe4738982fec9948ed5a69892 Author: Chris Ziogas <[email protected]> Date: Tue Apr 16 15:31:19 2024 +0300 c.d/utils: rename vmtrace.config to vmtrace.jsonconfig (#29554) rename vmtrace.config to vmtrace.jsonconfig for consinstency with t8ntool trace.jsonconfig commit fadd9d8b81324b0d4405de2837ac9939b2cef6c5 Author: law wang <[email protected]> Date: Tue Apr 16 17:21:20 2024 +0800 eth/catalyst: fix log (#29549) log:output the correct variable Co-authored-by: steven <[email protected]> commit f437307877f4c8e423f787de5c9636b985d322f5 Author: Marius van der Wijden <[email protected]> Date: Tue Apr 16 10:53:43 2024 +0200 core/vm: update gascosts for BLS12-381 + use gnark instead of kilic (#29441) This PR updates the bls contracts from our internal implementation which is an unmaintained fork of the kilic library to the gnark-crypto library that is actively maintained by consensys. It also updates the gas-costs according to the EIP commit 71c78bf56da29dc8b85cddc9da09eabf18131ee8 Author: Darioush Jalali <[email protected]> Date: Tue Apr 16 01:38:25 2024 -0700 rpc: close Clients in tests (#29512) commit e4ecaf89cf5ee6233094f738c4978020fe63e237 Author: Marcus Baldassarre <[email protected]> Date: Tue Apr 16 04:37:18 2024 -0400 rpc: implement Unwrap() for wsHandshakeError (#29522) commit d3c4466edd43fff9ac30162073795d8776070c5d Author: rjl493456442 <[email protected]> Date: Tue Apr 16 15:05:36 2024 +0800 core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) This pull request defines a gentrie for snap sync purpose. The stackTrie is used to generate the merkle tree nodes upon receiving a state batch. Several additional options have been added into stackTrie to handle incomplete states (either missing states before or after). In this pull request, these options have been relocated from stackTrie to genTrie, which serves as a wrapper for stackTrie specifically for snap sync purposes. Further, the logic for managing incomplete state has been enhanced in this change. Originally, there are two cases handled: - boundary node filtering - internal (covered by extension node) node clearing This changes adds one more: - Clearing leftover nodes on the boundaries. This feature is necessary if there are leftover trie nodes in database, otherwise node inconsistency may break the state healing. commit ef5ac3fb7ae5bf41a465cc32845631f01ff823ef Author: Martin HS <[email protected]> Date: Mon Apr 15 17:35:35 2024 +0200 eth/filters: enforce topic-limit early on filter criterias (#29535) This PR adds a limit of 1000 to the "inner" topics in a filter-criteria commit 67422e2a565784edaeade7d3bb747dc13f6863cf Author: Seungbae Yu <[email protected]> Date: Mon Apr 15 21:58:17 2024 +0900 p2p/nat: fix typos in comments (#29536) commit 84b12df09e0a67e99a3943f26ccf1b6e6c19a85a Author: Martin HS <[email protected]> Date: Mon Apr 15 14:54:51 2024 +0200 core/rawdb: add sanity-limit to header accessor (#29534) commit 3705acd1a97b2cc9bbb092b326a9d8cfbc42037a Author: yudrywet <[email protected]> Date: Mon Apr 15 14:40:42 2024 +0800 cmd/utils: fix typo in comment (#29528) commit b179b7b8e7c9cac7ac21da385dbedc9f24ce3755 Author: Abirdcfly <[email protected]> Date: Mon Apr 15 14:34:31 2024 +0800 all: remove duplicate word in comments (#29531) This change removes some duplicate words in in comments commit bd91810462187086b2715fd343aa427e181d89a2 Author: forestkeeperio.eth <[email protected]> Date: Thu Apr 11 05:06:49 2024 -0600 cmd: fix some typos in readmes (#29405) * Update README.md updated for readability * Update rules.md Updated for readability and typos commit b9010f3e872492c1513c853cb5f3f8ce03eff2b5 Author: Newt6611 <[email protected]> Date: Thu Apr 11 16:30:15 2024 +0800 rpc: fix comment grammar (#29507) commit 9dcf8aae4742cc4220065489a5bdcf045c398616 Author: rjl493456442 <[email protected]> Date: Wed Apr 10 17:02:45 2024 +0800 eth/protocols/snap: skip retrieval for completed storages (#29378) * eth/protocols/snap: skip retrieval for completed storages * eth/protocols/snap: address comments from peter * eth/protocols/snap: add comments commit 34aac1d7562bf141fe6da1d4f3cdea8819e7b23b Author: Aaron Chen <[email protected]> Date: Tue Apr 9 18:14:30 2024 +0800 all: use big.Sign to compare with zero (#29490) commit f202dfdd478467ffa44217fe414ec8c31a793dff Author: Sina M <[email protected]> Date: Tue Apr 9 12:12:02 2024 +0200 core/tracing: add changelog (#29388) Co-authored-by: Matthieu Vachon <[email protected]> commit 0bbd88bda04698c457077318ae8442e2611ea3b0 Author: Bin <[email protected]> Date: Tue Apr 9 14:51:54 2024 +0800 all: use timer instead of time.After in loops, to avoid memleaks (#29241) time.After is equivalent to NewTimer(d).C, and does not call Stop if the timer is no longer needed. This can cause memory leaks. This change changes many such occations to use NewTimer instead, and calling Stop once the timer is no longer needed. commit 1126c6d8a57f1b7d9af0b39ac52f6eeb435f66f9 Author: rjl493456442 <[email protected]> Date: Tue Apr 9 14:37:18 2024 +0800 core: add txlookup lock (#29343) This change adds a lock to the transaction lookup cache, to avoid the case where reorgs make the lookup return inconsistent results. commit 3caf617dcdee9fc1d2e9070bfdba370b20231884 Author: cui <[email protected]> Date: Tue Apr 9 14:33:36 2024 +0800 core/vm: move bls precompiles to correct addresses (#29445) core: make bls precompiled contract use the correct address as in eip commit f447de936c31e6a64470f3c102da85f245fe9640 Author: Mohanson <[email protected]> Date: Tue Apr 9 14:27:13 2024 +0800 rlp: replace reflect.PtrTo with reflect.PointerTo (#29488) reflect.PtrTo has been deprecated and superseded by reflect.PointerTo commit 70bf94c34e4a6320c865a90cbfeec38a0aef7378 Author: Aaron Chen <[email protected]> Date: Tue Apr 9 14:22:53 2024 +0800 internal, signer/core: replace path.Join with filepath.Join (#29489) commit c170cc0ab0a1f60adcde80d0af8e3050ee19da93 Author: rjl493456442 <[email protected]> Date: Mon Apr 8 21:48:37 2024 +0800 core/vm: reject contract creation if the storage is non-empty (#28912) This change implements EIP-7610, which rejects the contract deployment if the destination has non-empty storage. commit 3c75c64e6bbf64f842c6f725a595713262c2f8fe Author: seayyyy <[email protected]> Date: Mon Apr 8 19:02:56 2024 +0800 core: fix typo (#29438) commit c3465cb5ba94e8ee4153319416db9484406084ee Author: Sina M <[email protected]> Date: Mon Apr 8 13:01:22 2024 +0200 core: fix dev mode genesis difficulty (#29469) The dev mode is nowadays in Merge-mode from genesis, hence the difficulty of the first block should be zero. commit ed4bc7f27ba071403484240fa71b4878c4ca9756 Author: Aaron Chen <[email protected]> Date: Mon Apr 8 18:59:17 2024 +0800 all: replace fmt.Errorf() with errors.New() if no param required (#29472) commit cfc7d06cc91122f44d09592ddc616fb189bc4ca4 Author: Aaron Chen <[email protected]> Date: Mon Apr 8 18:58:37 2024 +0800 signer/core/apitypes: use slices.Contains (#29474) commit 0dc09da7db47de4a9a9eb6ea335e2e367fae6015 Author: imalasong <[email protected]> Date: Mon Apr 8 17:29:49 2024 +0800 all: replace path.Join with filepath.Join (#29479) * core/rawdb: replace file.Join with filepath.Join Signed-off-by: xiaochangbai <[email protected]> * internal/build: replace file.Join with filepath.Join Signed-off-by: xiaochangbai <[email protected]> --------- Signed-off-by: xiaochangbai <[email protected]> commit 7aafad2233b676b7beaf56e89f82360704d669d0 Author: Martin HS <[email protected]> Date: Sat Apr 6 12:22:55 2024 +0200 core/vm: better error-info for vm errors (#29354) commit 8876868bb831cef307d7e72c6848bd0943ba1e24 Author: Roberto Bayardo <[email protected]> Date: Sat Apr 6 03:17:41 2024 -0700 log: default JSON log handler should log all verbosity levels (#29471) Co-authored-by: lightclient <[email protected]> commit ccb76c01d7b1ce4d77d2bb309419cc78f42659ca Author: Aaron Chen <[email protected]> Date: Sat Apr 6 18:16:25 2024 +0800 eth/tracers: use slices.Contains (#29461) commit 74995bf8a169bb9d07333e56623ea039b8664710 Author: Aaron Chen <[email protected]> Date: Sat Apr 6 18:05:06 2024 +0800 all: use slices.Contains (#29459) Co-authored-by: Felix Lange <[email protected]> commit cc348a601ee816d6c0e2c4d7246c810f3b61e798 Author: georgehao <[email protected]> Date: Sat Apr 6 17:09:30 2024 +0800 common/prque: fix godoc comments (#29460) Co-authored-by: Felix Lange <[email protected]> commit 4458905f261d5d9ba5fda3d664f9bb80346ab404 Author: Martin HS <[email protected]> Date: Fri Apr 5 21:01:39 2024 +0200 signer/core/apitypes: fix apitypes breakage due to bitrotted PR (#29470) commit 7ee9a6e89f59cee21b5852f5f6ffa2bcfc05a25f Author: Martin HS <[email protected]> Date: Fri Apr 5 19:29:44 2024 +0200 signer: implement blob txs sendtxargs, enable blobtx-signing (#28976) This change makes it possible to sign blob transactions commit 35fcf9c52b806d2a7eba0da4f65c97975200a2b2 Author: Felföldi Zsolt <[email protected]> Date: Thu Apr 4 16:30:27 2024 +0200 beacon/types: enforce fork order based on known forks list (#29380) Co-authored-by: Felix Lange <[email protected]> commit 15ff066a24964ea16742420abecc7e4ae5e9bce0 Author: Aaron Chen <[email protected]> Date: Thu Apr 4 21:52:38 2024 +0800 trie/utils: change Div+Mod to DivMod (#29413) * trie/utils: change Div+Mod to DivMod * trie/utils: gofmt commit e3bdd84e9881041e6004ebc3e78c1211d58ebe83 Author: Péter Szilágyi <[email protected]> Date: Thu Apr 4 16:51:10 2024 +0300 core/txpool: repair the limbo Billy too on unclean shutdowns (#29451) commit a851e39cbecf116ef2dc64f0b37b0300dc762931 Author: lmittmann <[email protected]> Date: Thu Apr 4 15:50:31 2024 +0200 core/types: use new atomic types in caches (#29411) * use generic atomic types in tx caches * use generic atomic types in block caches * eth/catalyst: avoid copying tx in test --------- Co-authored-by: lmittmann <[email protected]> Co-authored-by: Felix Lange <[email protected]> commit 9cb8de87037be7c38343b2f84c534887e7525c5d Author: lightclient <[email protected]> Date: Thu Apr 4 06:26:10 2024 -0400 internal/debug: convert legacy log level value in debug_verbosity (#29356) commit 9dfe728909bc7ff0709c69d3f090804d2516652c Author: cui <[email protected]> Date: Thu Apr 4 18:24:49 2024 +0800 p2p/discover: using slices.Contains (#29395) commit 8bd03341689c992d633f3988b3a7fbc15aec75e6 Author: guangwu <[email protected]> Date: Thu Apr 4 18:20:54 2024 +0800 crypto/signify: close tmp key file in test (#29444) commit 2e0c5e05ba355a722eb6eb9bc338de4949eee20d Author: cui <[email protected]> Date: Thu Apr 4 18:19:48 2024 +0800 p2p/dnsdisc: using clear builtin func (#29418) Co-authored-by: Felix Lange <[email protected]> commit eea0acc54959df779189dbfc972578ae56ac4d33 Author: cui <[email protected]> Date: Thu Apr 4 17:59:54 2024 +0800 log: using maps.Clone (#29392) commit 6b39e9236c278d9c4722505bb88a769fd21ca4b8 Author: cui <[email protected]> Date: Thu Apr 4 17:58:44 2024 +0800 beacon/engine: using slices.Contains (#29396) commit 1f8f1377e62d2ca8aba04f0df7772ed665662bf7 Author: Marius Kjærstad <[email protected]> Date: Thu Apr 4 11:00:27 2024 +0200 build: upgrade -dlgo version to Go 1.22.2 (#29448) commit 7bb3fb1481acbffd91afe19f802c29b1ae6ea60c Author: cui <[email protected]> Date: Wed Apr 3 14:08:52 2024 +0800 eth: simplify peer counting logic (#29420) commit dfb3d46098520e90811c6ada3f8e142789c25832 Author: Ng Wei Han <[email protected]> Date: Wed Apr 3 03:18:28 2024 +0800 p2p: add inbound and outbound peers metric (#29424) commit a83e57666d5a691883ab2890b63bda1b2c3e1c64 Author: cui <[email protected]> Date: Wed Apr 3 03:17:34 2024 +0800 eth/fetcher: using slices.Contains (#29383) commit 12dcc162d05e87b6492c065458f2d7310b3cf791 Author: cui <[email protected]> Date: Tue Apr 2 21:45:25 2024 +0800 common/lru: use clear builtin (#29399) commit ab6419ccd8b11e041e27f8865f59ab111a2c6161 Author: cui <[email protected]> Date: Tue Apr 2 20:56:12 2024 +0800 core/state: use maps.Clone (#29365) core: using maps.Clone commit fe0bf325a68504292f910240f8da6243defffa71 Author: rjl493456442 <[email protected]> Date: Tue Apr 2 20:25:06 2024 +0800 cmd/evm: reopen the statedb for dumping (#29437) commit 0bd03dbc5597175d79067270c0710604cba489cf Author: cui <[email protected]> Date: Tue Apr 2 17:25:57 2024 +0800 eth/filter: using atomic.Pointer instead of atomic.Value (#29435) commit e63f992fed51d5a576ea2890cd7eb3000c9e6884 Author: Miles Chen <[email protected]> Date: Tue Apr 2 17:25:19 2024 +0800 rpc: fix ipc max path size (#29385) commit 31e63fcf66188504e0b1941059394cf5df49bc17 Author: cui <[email protected]> Date: Tue Apr 2 16:47:15 2024 +0800 rlp: using maps.Clone (#29434) commit fde90443a4af0c8a0c0d7bdaf833a223de560cb3 Author: carehabit <[email protected]> Date: Tue Apr 2 15:05:53 2024 +0800 log: replace the outdated link (#29412) commit 8c5576b1ac89473c7ec15c9b03d1ca02e9499dcc Author: Delweng <[email protected]> Date: Mon Apr 1 20:53:56 2024 +0800 eth/tracers: fix base fee and set blob fee in tests (#29376) Signed-off-by: jsvisa <[email protected]> Co-authored-by: Sina Mahmoodi <[email protected]> commit 6c9f7029823cac48291558aa0a76cbd653830f51 Author: cui <[email protected]> Date: Mon Apr 1 11:45:56 2024 +0800 core/types: using maps.Clone (#29398) commit c39d00e316943fa613f10ceff262482ea3aa2c65 Author: cui <[email protected]> Date: Mon Apr 1 11:42:50 2024 +0800 trie: using maps.Clone (#29419) commit a3829178af6cec64d6def9131b9340a3328cc4fc Author: Brandon Liu <[email protected]> Date: Fri Mar 29 00:35:40 2024 +0800 eth/tracers/js: consistent name for method receivers (#29375) commit 0183c7ad8225f82e2c23b9bc6329c19d7f0269c5 Author: cui <[email protected]> Date: Thu Mar 28 21:09:21 2024 +0800 eth/tracers/logger: using maps.Equal (#29384) Co-authored-by: Felix Lange <[email protected]> commit 7481398a2471f52de277627cc473190f0c2569c8 Author: cui <[email protected]> Date: Thu Mar 28 19:13:41 2024 +0800 core/state: using slices.Clone (#29366) commit 3754a6cc922f88f50ed0479cfb836676936384d3 Author: cui <[email protected]> Date: Thu Mar 28 19:07:38 2024 +0800 p2p/dnsdisc: using maps.Copy (#29377) commit 3b77e0ff4bcce8c0c9f18f23625a6fe69d17bbed Author: rjl493456442 <[email protected]> Date: Thu Mar 28 19:06:57 2024 +0800 core: remove unused code (#29381) commit 7aba6511b0cbe910a0db9d345487d2c6ef301e53 Author: cui <[email protected]> Date: Thu Mar 28 19:06:44 2024 +0800 ethdb/dbtest: replace reflect.DeepEqual with slices.Equal (#29382) commit 767b00b0b514771a663f3362dd0310fc28d40c25 Author: Sina M <[email protected]> Date: Wed Mar 27 16:12:57 2024 +0100 t8ntool: add optional call frames to json logger (#29353) Adds a flag `--trace.callframes` to t8n which will log info when entering or exiting a call frame in addition to the execution steps. --------- Co-authored-by: Mario Vega <[email protected]> commit fa5019de196274afd2426d300cab01d60b2a0c56 Author: crazeteam <[email protected]> Date: Wed Mar 27 20:16:29 2024 +0800 accounts/keystore: fix typos in comments (#29336) commit 8bb8f23bb25ab69cfb7065d7dbb3fd6e5f6227a8 Author: Pawan Dhananjay <[email protected]> Date: Wed Mar 27 17:45:57 2024 +0530 beacon/engine: Fix json param name in GetClientVersionV1 (#29351) Fix json param name commit 304879da20200f6912d241ccd471e140d3487093 Author: rjl493456442 <[email protected]> Date: Wed Mar 27 09:35:33 2024 +0800 eth/protocols/snap: check storage root existence for hash scheme (#29341) commit da7469e5c44feec120555c8f697f75b94b2884bb Author: Guillaume Ballet <[email protected]> Date: Tue Mar 26 21:25:41 2024 +0100 core: add an end-to-end verkle test (#29262) core: add a simple verkle test triedb, core: skip hash comparison in verkle core: remove legacy daoFork logic in verkle chain maker fix: nil pointer in tests triedb/pathdb: add blob hex core: less defensive Co-authored-by: Ignacio Hagopian <[email protected]> Co-authored-by: Martin HS <[email protected]> Co-authored-by: Gary Rong <[email protected]> commit 723b1e36ad6a9e998f06f74cc8b11d51635c6402 Author: Aaron Chen <[email protected]> Date: Wed Mar 27 04:01:28 2024 +0800 all: fix mismatched names in comments (#29348) * all: fix mismatched names in comments * metrics: fix mismatched name in UpdateIfGt commit 58a3e2f1802eb7dd8e893a6a7be7f009edeeffd8 Author: jwasinger <[email protected]> Date: Tue Mar 26 07:21:39 2024 -0700 core/state: perform updates before deletions when mutating tries (#29201) This addresses an edge-case (detailed in the code comment) where the computation of the intermediate trie root would force the unnecessary resolution of a hash node. The change makes it so that when we process changes from a block, we first process trie-updates and afterwards process trie-deletions. commit 1dd898c24e85980a3ba9fcc203f00a3ea2f060d6 Author: Martin HS <[email protected]> Date: Tue Mar 26 15:04:15 2024 +0100 tests: fix panic via state test runner using json logger (#29349) * tests: fix panic via state test runner using json logger * tests: also invoke OnTxEnd commit f2a6ac17b255fe037bf528bc8368e61051cd4df4 Author: Aaron Chen <[email protected]> Date: Tue Mar 26 19:26:44 2024 +0800 eth/catalyst: fix flaw in withdrawal-gathering in simulated beacon (#29344) return after reaching maxCount commit 738b5a586e329965539877434b695bb61015d4c7 Author: Matthieu Vachon <[email protected]> Date: Tue Mar 26 00:01:13 2024 -0400 Removes some leftover `err` check (#29339) Before, `ToMessage` was returning both the resulting `Message` and an error while no error is returned now. Those error checks were probably leftover from the past. commit 100c0f47debad7924acefd48382bd799b67693cf Author: Felföldi Zsolt <[email protected]> Date: Mon Mar 25 20:28:55 2024 +0100 beacon/blsync: fixed blsync command line params (#29335) commit eda9cb7b362b02c9c4550d77385997ed86981757 Author: Felix Lange <[email protected]> Date: Mon Mar 25 20:27:50 2024 +0100 beacon/light/api: improve handling of event stream setup failures (#29308) The StartHeadListener method will only be called once. So it can't just make one attempt to connect to the eventsource endpoint, it has to keep trying. Note that once the stream is established, the eventsource implementation itself will keep retrying. commit 5cea7a6230a6f070dd484aa6d883605f148445a4 Author: Roberto Bayardo <[email protected]> Date: Mon Mar 25 10:03:44 2024 -0700 ethclient/simulated: clean up Node resources when simulated backend is closed (#29316) commit 14cc967d1964d3366252193cadd4bfcb4c927ac1 Author: Martin HS <[email protected]> Date: Mon Mar 25 07:50:18 2024 +0100 all: remove dependency on golang.org/exp (#29314) This change includes a leftovers from https://github.com/ethereum/go-ethereum/pull/29307 - using the [new `slices` package](https://go.dev/doc/go1.21#slices) and - using the [new `cmp.Ordered`](https://go.dev/doc/go1.21#cmp) instead of exp `constraints.Ordered` commit ae470044878f15beb67eb7e66c117c9ad48f3a7b Author: deterclosed <[email protected]> Date: Mon Mar 25 10:16:44 2024 +0800 eth: fix typo (#29320) commit 6f1fb0c29ff25318e688c15581d0c28dcefb75ce Author: Nathan <[email protected]> Date: Sun Mar 24 20:51:34 2024 +0800 metrics/influxdb: skip float64-precision-dependent tests on arm64 (#29047) metrics/influxdb: fix failed cases caused by float64 precision on arm64 commit 064f37d6f67a012eea0bf8d410346fb1684004b4 Author: Sina M <[email protected]> Date: Fri Mar 22 18:53:53 2024 +0100 eth/tracers: live chain tracing with hooks (#29189) Here we add a Go API for running tracing plugins within the main block import process. As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within that file register your custom tracer implementation. Then recompile geth and select your tracer on the command line. Hooks defined in the tracer will run whenever a block is processed. The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of requiring an interface, for several reasons: - We plan to keep this API stable long-term. The core/tracing hook API does not depend on on deep geth internals. - There are a lot of hooks, and tracers will only need some of them. Using a struct allows you to implement only the hooks you want to actually use. All existing tracers in eth/tracers/native have been rewritten to use the new hook system. This change breaks compatibility with the vm.EVMLogger interface that we used to have. If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM. --------- Co-authored-by: Matthieu Vachon <[email protected]> Co-authored-by: Delweng <[email protected]> Co-authored-by: Martin HS <[email protected]> commit 38eb8b3e20bf237a78fa57e84fa63c2d05a44635 Author: George Ma <[email protected]> Date: Fri Mar 22 20:29:12 2024 +0800 all: fix docstrings (#29311) commit d9bde37ac3a5a9569a0c0a35f8c872932d640802 Author: Martin HS <[email protected]> Date: Fri Mar 22 13:17:59 2024 +0100 log: use native log/slog instead of golang/exp (#29302) commit 6490d9897ab00290d188b1893d1874e977fb4c66 Author: rjl493456442 <[email protected]> Date: Fri Mar 22 20:12:10 2024 +0800 cmd, triedb: implement history inspection (#29267) This pull request introduces a database tool for inspecting the state history. It can be used for either account history or storage slot history, within a specific block range. The state output format can be chosen either with - the "rlp-encoded" values (those inserted into the merkle trie) - the "rlp-decoded" value (the raw state value) The latter one needs --raw flag. commit f46fe62c5d1d25ce0e9869ecbaf0e5722d2bc2f5 Author: Darioush Jalali <[email protected]> Date: Fri Mar 22 04:38:24 2024 -0700 triedb/hashdb: Avoid setting db.cleans on Close (#29309) commit 14eb8967be7acc54c5dc9a416151ac45c01251b6 Author: Martin HS <[email protected]> Date: Thu Mar 21 13:50:13 2024 +0100 all: use min/max/clear from go1.21 (#29307) commit bca6c407098fefc757c263ae2da6aeff719e17ca Author: Felix Lange <[email protected]> Date: Wed Mar 20 19:22:44 2024 +0100 beacon/blsync: support for deneb fork (#29180) This adds support for the Deneb beacon chain fork, and fork handling in general, to the beacon chain light client implementation. Co-authored-by: Zsolt Felfoldi <[email protected]> commit 04bf1c802ffe9dfc34c34b3e666ee15e96b4a203 Author: Martin HS <[email protected]> Date: Wed Mar 20 15:22:52 2024 +0100 eth/protocols/snap, internal/testlog: fix dataraces (#29301) commit 8f7fbdfedcbaca2a2bffb00badc75c03d58052ec Author: Marius van der Wijden <[email protected]> Date: Wed Mar 20 14:58:47 2024 +0100 core: refactor consensus interface (#29283) This PR modifies the consensus interface to wrap the body fields. commit 0444388c746f99186e086f8ea733ea45e91918ac Author: Aaron Chen <[email protected]> Date: Wed Mar 20 21:51:05 2024 +0800 core/txpool/blobpool: calculate log1.125 faster (#29300) commit 78c102dec5f1c7b5256c466df4421b4818bfe0e6 Author: rjl493456442 <[email protected]> Date: Wed Mar 20 20:11:30 2024 +0800 core: skip the check the statefulness of head block in repair (#29245) commit 22ac46cbdbd0601d2c59a74bb29fb0ceb34dddaa Author: imalasong <[email protected]> Date: Wed Mar 20 20:09:46 2024 +0800 Makefile: update PHONY directive (#29296) commit 9a7e6ce6f593d1284512032d5757a85a15e6d636 Author: Martin HS <[email protected]> Date: Wed Mar 20 10:38:30 2024 +0100 cmd/evm: fix flag-mismatch from #29290 (#29298) commit de08f3d62552531f3fb2fc3a64a4bfdb962900eb Author: Martin HS <[email protected]> Date: Wed Mar 20 09:12:58 2024 +0100 cmd/evm: make staterunner always output stateroot to stderr (#29290) This changes makes it so that when `evm statetest` executes, regardless of whether `--json` is specified or not, the stateroot is printed on `stderr` as a `jsonl` line. This enables speedier execution of testcases in goevmlab, in cases where full execution op-by-op is not required. commit 0ceac8d00e3067b6bb7ddc79670383295ddf7d6d Author: georgehao <[email protected]> Date: Wed Mar 20 15:51:45 2024 +0800 metrics: fix docstrings (#29279) commit 45b88abbde92eab99bab6ac1e55aa88bccccfe80 Author: miles <[email protected]> Date: Wed Mar 20 15:49:38 2024 +0800 all: fix typos (#29288) commit 6f929a0762be92130588779a8535ed0e3fc58d87 Author: zgfzgf <[email protected]> Date: Wed Mar 20 15:46:50 2024 +0800 core/asm: minor code-clarification (#29293) commit 4c1b57856f0f5ebccb6edb83ab755ab114500078 Author: buddho <[email protected]> Date: Tue Mar 19 22:23:55 2024 +0800 miner: modify header before checking time-based fields (#29242) The Prepare-method of consensus engine might modify the time-field in a header, so it should be called prior to checks that rely on it commit eda9c7e36f120a3e4feb3dfa9472084e88e35054 Author: Tien Nguyen <[email protected]> Date: Tue Mar 19 20:05:31 2024 +0700 accounts/abi/bind: check invalid chainID first (#29275) commit 6b3d4d068ac720de1c2edab7d1e1a1311811d747 Author: bitcoin-lightning <[email protected]> Date: Tue Mar 19 21:05:06 2024 +0800 beacon/light/sync: fix typo in comment (#29256) commit ac6060a4c61b99743173c8c88ea1f8f68f6cdbfc Author: Aaron Chen <[email protected]> Date: Tue Mar 19 18:25:30 2024 +0800 log: replace tmp with bytes.Buffer.AvailableBuffer (#29287) commit 15eb9773f9b99c29f3cd17be4e4bbd1bf1b48bb7 Author: rjl493456442 <[email protected]> Date: Tue Mar 19 10:50:08 2024 +0800 triedb/pathdb: improve tests (#29278) commit ab49f228ad6f37ba78be66b34aa5fee740245f57 Author: Martin HS <[email protected]> Date: Mon Mar 18 17:36:50 2024 +0100 all: update to go version 1.22.1 (#28946) Since Go 1.22 has deprecated certain elliptic curve operations, this PR removes references to the affected functions and replaces them with a custom implementation in package crypto. This causes backwards-incompatible changes in some places. --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Felix Lange <[email protected]> commit c6119247271220ce89e76e1b1b2eaeaaa8fbd9d1 Author: Martin HS <[email protected]> Date: Mon Mar 18 08:13:55 2024 +0100 go.mod: update protobuf (#29270) commit ba2dd9385c2a51134e520083dc732787a813b107 Author: SanYe <[email protected]> Date: Fri Mar 15 17:46:22 2024 +0800 accounts/abi/bind: remove unused err set and check (#29269) accounts/abi: remove unused err set and check commit 40cac1d0e2cb37e769c3928cc477efb41124bb60 Author: Martin HS <[email protected]> Date: Fri Mar 15 10:44:41 2024 +0100 eth/catalyst: prettier output on bad new payloads (#29259) When we receive a bad NewPayload, we currently emit a lot of data to the logging facilities. This PR makes it so we print less data. commit 95715fdb0317dc7d6ebbec702fe78257380c95a1 Author: shivhg <[email protected]> Date: Fri Mar 15 14:37:47 2024 +0530 eth/downloader, graphql: fix typos (#29243) commit cffb7c8604d299ac21e0a9714205cc7b52faa501 Author: Haotian <[email protected]> Date: Fri Mar 15 16:14:31 2024 +0800 params: use the same variable name as EIP-4788 (#29195) In https://eips.ethereum.org/EIPS/eip-4788 the name `BEACON_ROOTS_ADDRESS` is used. This change makes geth use the same variable name to avoid confusion. commit d28adb61bf8445f9de58612155c308e5ac3b197a Author: John Xu <[email protected]> Date: Thu Mar 14 21:38:11 2024 +0800 cmd/emv/internal/t8ntool: fix shadowing of `excessBlobGas` (#29263) fix(t8n): unexpected `excessBlobGas` shadowed commit 20d3e0ac06ef2ad2f5f6500402edc5b6f0bf5b7c Author: Ng Wei Han <[email protected]> Date: Thu Mar 14 17:32:49 2024 +0800 cmd/devp2p: fix decoding of raw RLP ENR attributes (#29257) commit 3c26ffeb2968907f68d41faab757dacdcb280941 Author: Haotian <[email protected]> Date: Thu Mar 14 07:26:46 2024 +0800 eth/catalyst: remove error return in delayPayloadImport (#29043) Co-authored-by: tmelhao <[email protected]> commit 57308beecf7040391aee6c3102587063501f6825 Author: Bin <[email protected]> Date: Thu Mar 14 07:25:42 2024 +0800 go.mod: update golang.org/x/crypto from v0.17.0 to v0.21.0 (#29228) commit f3d18d64bf4c026740ee6c8ae8949a8c19391b49 Author: Martin HS <[email protected]> Date: Wed Mar 13 18:12:23 2024 +0100 tests, appveyor: only execute one in four permutations on CI (#29220) tests, appveyor: only execute one in four permutations when flag -short is used Also enable -short flag on all appveyor builds (also ubuntu) commit c170fa277cbf2a9faf9f35665f1ba8f34f94062a Author: rjl493456442 <[email protected]> Date: Wed Mar 13 19:39:30 2024 +0800 core: improve chain rewinding mechanism (#29196) * core: improve chain rewinding mechanism * core: address comment * core: periodically print progress log * core: address comments * core: fix comment * core: fix rewinding in path * core: fix beyondRoot condition * core: polish code * core: polish code * core: extend code comment * core: stop rewinding if chain is gapped or genesis is reached * core: fix broken tests commit b80643b7370075262fd6dfad7ae8aa77710e2ef1 Author: Justin Dhillon <[email protected]> Date: Tue Mar 12 23:54:40 2024 -0700 accounts/usbwallet, common/bitutil: fix broken links in docs (#29078) fixes some links in documentation commit d5bacfa4def558a4c7b261c1a9fbfdbfc295e491 Author: Martin HS <[email protected]> Date: Wed Mar 13 07:51:46 2024 +0100 crypto/kz4844: pass blobs by ref (#29050) This change makes use of the following underlying changes to the kzg-libraries in order to avoid passing large things on the stack: - c-kzg: https://github.com/ethereum/c-kzg-4844/pull/393 and - go-kzg: https://github.com/crate-crypto/go-kzg-4844/pull/63 commit eff424cc302152f3914e3f9c8b49efe92e33353f Author: Sina M <[email protected]> Date: Wed Mar 13 07:40:02 2024 +0100 eth/tracers: fix concurrency issue for JS-tracing a block (#29238) This change fixes a concurrency-issue where JS-tracers were accessing the block-ctx GetHash function in a in parallel, which is not safe. commit 758fce71fab5289e3af711b1fa21a541c77cc435 Author: Felix Lange <[email protected]> Date: Tue Mar 12 19:23:24 2024 +0100 p2p: fix race in dialScheduler (#29235) Co-authored-by: Stefan <[email protected]> commit 6c76b813df6d53b86fac17471e9a31afd20c481e Author: Marius van der Wijden <[email protected]> Date: Tue Mar 12 14:29:35 2024 +0100 miner: add additional log (#29193) Adds a debug level log if the payload building failed for whatever reason commit 4bd55a064ccc804127de09397273d16966fe8a37 Author: Aaron Chen <[email protected]> Date: Tue Mar 12 20:05:31 2024 +0800 common/math: copy result in Exp (#29233) common/math: does not change base parameter commit 99bbbc0277e34fc3a31512a345ba20874ae98e18 Author: Shiming Zhang <[email protected]> Date: Tue Mar 12 19:12:37 2024 +0800 internal/build, rpc: add missing HTTP response body Close() calls (#29223) Co-authored-by: Felix Lange <[email protected]> commit 89cefe240fd22b01e413786e18ad35263c93a61f Author: Bin <[email protected]> Date: Tue Mar 12 17:00:34 2024 +0800 cmd: use package filepath over path for file system operations (#29227) Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths. Package path implements utility routines for manipulating slash-separated paths. The path package should only be used for paths separated by forward slashes, such as the paths in URLs commit 4e1116f9c513961b62dff146a7cce069fe7a36b0 Author: San Ye <[email protected]> Date: Tue Mar 12 16:49:53 2024 +0800 crypto/bn256/cloudflare: fix noescape-directive (#29222) commit ebf9e11af2ff701d0961623e817d37b421b96802 Author: guangwu <[email protected]> Date: Mon Mar 11 18:17:16 2024 +0800 beacon/light/request: fix typos (#29216) commit fa4ade8ecb4e37687b464fdab6986c01cc1e50c2 Author: Sina Mahmoodi <[email protected]> Date: Mon Mar 11 11:05:48 2024 +0100 core: fix deprecation comment for GenesisAccount (#29218) core: fix deprecation comment commit 00c21128ef62be54bef798f3220f79ae2297be66 Author: Lee Bousfield <[email protected]> Date: Mon Mar 11 05:05:17 2024 -0500 core/txpool/blobpool: return ErrAlreadyKnown for duplicate txs (#29210) Signed-off-by: Lee Bousfield <[email protected]> commit b393ad8d29fe002fe6c0329a09d7715b00030c79 Author: Péter Szilágyi <[email protected]> Date: Mon Mar 11 10:06:57 2024 +0200 cmd, core, metrics: always report expensive metrics (#29191) * cmd, core, metrics: always report expensive metrics * core, metrics: report block processing metrics as resetting timer * metrics: update reporter tests commit 3dc549b3d75af790e78ef2d7f63a947efb9b0e95 Author: Kero <[email protected]> Date: Mon Mar 11 03:01:26 2024 +0800 p2p/simulations/adapters: fix error messages in TestTCPPipeBidirections (#29207) commit e31709db6570e302557a9bccd681034ea0dcc246 Author: Haotian <[email protected]> Date: Fri Mar 8 19:15:52 2024 +0800 console: fix the wrong error msg of datadir testcase (#29183) commit d35c8f0c25d3b5781e016252625b582c9553601a Author: colin <[email protected]> Date: Fri Mar 8 19:13:46 2024 +0800 ethclient/gethclient: add blob transaction fields in toCallArg (#29198) commit c41105ce80f12f60ec4bf6c65c4c59c6bf4a86e7 Author: Sebastian Stammler <[email protected]> Date: Fri Mar 8 00:01:31 2024 +0100 log: add Handler getter to Logger interface (#28793) log: Add Handler getter to Logger interface commit cd490608e344e388edd7ef3dd323968d706ccf8c Author: hyhnet <[email protected]> Date: Fri Mar 8 05:56:19 2024 +0800 all: fix typos in comments (#29186) commit 3bebabbd036d4f550e32bb20a92bf7da6e6a2797 Author: cuinix <[email protected]> Date: Fri Mar 8 05:25:08 2024 +0800 accounts: remove redundant string conversion (#29184) commit aadcb886753079d419f966a3bc990f708f8d1c3b Author: Felföldi Zsolt <[email protected]> Date: Wed Mar 6 17:50:22 2024 +0100 cmd/blsync, beacon/light: beacon chain light client (#28822) Here we add a beacon chain light client for use by geth. Geth can now be configured to run against a beacon chain API endpoint, without pointing a CL to it. To set this up, use the `--beacon.api` flag. Information provided by the beacon chain is verified, i.e. geth does not blindly trust the beacon API endpoint in this mode. The root of trust are the beacon chain 'sync committees'. The configured beacon API endpoint must provide light client data. At this time, only Lodestar and Nimbus provide the necessary APIs. There is also a standalone tool, cmd/blsync, which uses the beacon chain light client to drive any EL implementation via its engine API. --------- Co-authored-by: Felix Lange <[email protected]> commit d8e0807da22eb922539d15b0d5d01ccdd58b1267 Author: Marius van der Wijden <[email protected]> Date: Wed Mar 6 13:45:03 2024 +0100 miner: refactor the miner, make the pending block on demand (#28623) * miner: untangle miner * miner: use common.hash instead of *types.header * cmd/geth: deprecate --mine * eth: get rid of most miner api * console: get rid of coinbase in welcome message * miner/stress: get rid of the miner stress test * eth: get rid of miner.setEtherbase * ethstats: remove miner and hashrate flags * ethstats: remove miner and hashrate flags * cmd: rename pendingBlockProducer to miner.pending.feeRecipient flag * miner: use pendingFeeRecipient instead of etherbase * miner: add mutex to protect the pending block * miner: add mutex to protect the pending block * eth: get rid of etherbase mentions * miner: no need to lock the coinbase * eth, miner: fix linter --------- Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]> commit 6e379b6fc776668c9a7db6d5b014d0dd89d7118d Author: Delweng <[email protected]> Date: Wed Mar 6 20:36:12 2024 +0800 eth/tracers: prestate tracer add blob fee (#29168) * eth/tracers: prestate balance add blob fee Signed-off-by: jsvisa <[email protected]> * eth/tracers: prestate test support blob tx Signed-off-by: jsvisa <[email protected]> * eth/tracers: add prestate blob tx test Signed-off-by: jsvisa <[email protected]> --------- Signed-off-by: jsvisa <[email protected]> commit a90fe84971183aa0b6c40d71c6586ae3f2eda4c8 Author: Undefinedor <[email protected]> Date: Wed Mar 6 18:55:44 2024 +0800 accounts: remove deprecated function NewPlaintextKeyStore (#29171) commit e73f55365c458c5185a493935b65dd96bacf6933 Author: Martin HS <[email protected]> Date: Wed Mar 6 11:31:50 2024 +0100 accounts/usbwallet: update hid library (#29176) commit a000acb61114c2a3a74c065f2e61b4d6bca3ae46 Author: Andrei Kostakov <[email protected]> Date: Wed Mar 6 11:53:12 2024 +0200 rpc: add more test cases for arg types (#29006) commit 899bb88a4ba19af2d8fe4874561a9d55355acf48 Author: Martin HS <[email protected]> Date: Wed Mar 6 10:32:17 2024 +0100 accounts/usbwallet: revert #28945 (#29175) commit 588c5480fd1f355a39d3f52a5507ab9d0da334c9 Author: Tom <[email protected]> Date: Wed Mar 6 13:23:35 2024 +0800 internal/ethapi: delete needless error check (#29127) commit 66e1a6ef496e001abc7ae7433282251a557deb2c Author: Devon Bear <[email protected]> Date: Tue Mar 5 09:15:02 2024 -0500 go.mod: bump pebble db to official release (#29038) bump pebble commit f4d53133f6e4b13f0dbcfef3bc45e9650d863b73 Author: Péter Szilágyi <[email protected]> Date: Tue Mar 5 16:13:28 2024 +0200 consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) * eth: drop support for forward sync triggers and head block packets * consensus, eth: enforce always merged network * eth: fix tx looper startup and shutdown * cmd, core: fix some tests * core: remove notion of future blocks * core, eth: drop unused methods and types commit 9a0fa8093ca5f7b896c3f7e849f7ca532d24e2a6 Author: Marius van der Wijden <[email protected]> Date: Tue Mar 5 14:52:44 2024 +0100 node: remove test which doesn't do a lot (#29159) * node: fix test if directory already exists * node: remove test commit 9e129efd7b43242fb5e605065713c27d615e753d Author: zhiqiangxu <[email protected]> Date: Tue Mar 5 21:48:27 2024 +0800 core: remove useless assignments (#29065) commit a970295956d602c348dccce034712c14aedce5e0 Author: cui <[email protected]> Date: Tue Mar 5 21:45:17 2024 +0800 rlp: using unsafe.Slice instead of SliceHeader (#29067) Co-authored-by: Felix Lange <[email protected]> commit a6d6e8ac410170eb1085b9e7b0388b1c67f95548 Author: Undefinedor <[email protected]> Date: Tue Mar 5 21:44:23 2024 +0800 rpc: remove deprecated method "Notifier.Closed" (#29162) commit dfa6c5e9c80e0965d0476909afc26e87aa199e6a Author: Delweng <[email protected]> Date: Tue Mar 5 21:37:26 2024 +0800 internal/jsre: format blob fields from hexdecimal to int (#29166) * internal/jsre: format receipt.{blobGasPrice,blobGasUsed} to int Signed-off-by: jsvisa <[email protected]> * internal/jsre: format tx.maxFeePerBlobGas to int Signed-off-by: jsvisa <[email protected]> * internal/jsre: format blob* in block Signed-off-by: jsvisa <[email protected]> --------- Signed-off-by: jsvisa <[email protected]> commit 96bf23f1ea95d29a32abe8fe2992b86e892b6c4c Author: Martin HS <[email protected]> Date: Tue Mar 5 14:32:47 2024 +0100 accounts/usbwallet: use updated hid (only) library (#28945) * accounts/usbwallet: use updated hid (only) library * deps: update karalabe/hid commit 7b81cf6362b3bb52762b823edf2a31bbbed4aa84 Author: rjl493456442 <[email protected]> Date: Tue Mar 5 21:31:55 2024 +0800 core/state, trie/triedb/pathdb: remove storage incomplete flag (#28940) As SELF-DESTRUCT opcode is disabled in the cancun fork(unless the account is created within the same transaction, nothing to delete in this case). The account will only be deleted in the following cases: - The account is created within the same transaction. In this case the original storage was empty. - The account is empty(zero nonce, zero balance, zero code) and is touched within the transaction. Fortunately this kind of accounts are not-existent on ethereum-mainnet. All in all, after cancun, we are pretty sure there is no large contract deletion and we don't need this mechanism for oom protection. commit e199319fd680aa4b135147f0480549a1c7d95350 Author: buddho <[email protected]> Date: Tue Mar 5 17:47:56 2024 +0800 rlp: remove a moot todo (#29154) commit d89d7ebdec27d8c8fed217767e2f17b09b5460a0 Author: zhiqiangxu <[email protected]> Date: Tue Mar 5 16:47:58 2024 +0800 core: initialize `gasRemaining` with `=` instead of `+=` (#29149) initialize gasRemaining with = instead of += commit 9b3ceb2137df125dd0f6957a362e9f08d6c41b66 Author: Vie <[email protected]> Date: Tue Mar 5 15:33:52 2024 +0800 core/types: reuse signtx (#29152) * core/types: reuse signtx * core/types: inline signtx commit 5d5b384efd0acabe4d808c46fce9700114d2046f Author: Domino Valdano <[email protected]> Date: Mon Mar 4 12:58:25 2024 -0800 .mailmap: remove invalid email address (#29163) commit 19607d1a10d37542ba13ab9db48cf4e501715cce Author: Andrei Silviu Dragnea <[email protected]> Date: Mon Mar 4 20:21:43 2024 +0100 eth/tracers: Fix prestateTracer pre nonce on contract creation (#29099) The prestateTracer was reporting an inaccurate nonce for the contract being created in post EIP-158 transactions. Correct nonce is 0, due to the issue nonce was being reported as 1. commit ca473b81cbe4a96cde4e8424c49b15ab304787bb Author: rjl493456442 <[email protected]> Date: Mon Mar 4 22:25:53 2024 +0800 core: use finalized block as the chain freeze indicator (#28683) * core: use finalized block as the chain freeze indicator * core/rawdb: use max(finality, head-90k) as chain freezing threshold * core/rawdb: fix tests * core/rawdb: fix lint * core/rawdb: address comments from peter * core/rawdb: fix typo commit a97d622588c2b71557c6222b95d487f51b46bd78 Author: Felix Lange <[email protected]> Date: Mon Mar 4 14:07:41 2024 +0100 cmd/devp2p: fix commandHasFlag (#29091) It got broken in some update of the cli library, and thus bootnodes weren't being configured automatically for some of the discovery commands. commit 35cebc16877c4cfbf48b883ab3bfa02b9100a87a Author: psogv0308 <[email protected]> Date: Mon Mar 4 19:03:53 2024 +0900 triedb/pathdb: changed the test code to check for verifying state (#29150) Co-authored-by: this-is-iron <[email protected]> commit 679a27a2b36d4f86e6b49c49c0d51c47a7ef6145 Author: buddho <[email protected]> Date: Mon Mar 4 17:31:18 2024 +0800 all: use EmptyUncleHash, EmptyCodeHash instead of raw value (#29134) commit 5a1e8a6547d6606c7ff1e3f3841fbb1c9f205282 Author: cui <[email protected]> Date: Mon Mar 4 17:30:15 2024 +0800 core: delete unused ErrMaxInitCodeSizeExceeded (#29062) commit b408b3e5fece3524bf7721ac8dd8d9a898f571a8 Author: yzb <[email protected]> Date: Mon Mar 4 17:24:24 2024 +0800 accounts/abi: delete duplicate error check (#29136) commit a732ad036488e3d5db33928f0155ffd66e08c08d Author: yzb <[email protected]> Date: Mon Mar 4 17:16:05 2024 +0800 p2p: remove unused argument 'flags' (#29132) commit 00905f7dc406cfb67f64cd74113777044fb886d8 Author: Undefinedor <[email protected]> Date: Sun Mar 3 04:42:50 2024 +0800 all: remove redundant import aliases (#29144) commit 0b1438c3df5da5551e89dddc683d65f4d48ad3d6 Author: Péter Szilágyi <[email protected]> Date: Sat Mar 2 22:39:22 2024 +0200 eth: make transaction propagation paths in the network deterministic (#29034) * eth: make transaction propagation paths in the network deterministic * eth: avoid potential division by 0 * eth: make tx propagation dependent on local node id too * eth: fix review comments commit 0a2f33946b95989e8ce36e72a88138adceab6a23 Author: Sina Mahmoodi <[email protected]> Date: Thu Feb 29 13:17:32 2024 +0100 eth/catalyst: update simulated beacon for cancun (#28829) * eth/catalyst: update simulated beacon for cancun * validate blob hashes * compute hashes from commitment * fix beacon root and payload version * check commitment conversion * fix random attr * flip dev to cancun commit 865e1e9f577f4fa804d0246f82cbcedc27db9bf6 Author: Péter Szilágyi <[email protected]> Date: Thu Feb 29 12:40:59 2024 +0200 cmd/utils, core/rawdb, triedb/pathdb: flip hash to path scheme (#29108) * cmd/utils, core/rawdb, triedb/pathdb: flip hash to path scheme * graphql: run tests in hash mode as the chain maker needs it commit db4cf6916606e07d908af44e405257925dd9265e Author: yzb <[email protected]> Date: Thu Feb 29 17:56:46 2024 +0800 all: replace fmt.Errorf() with errors.New() if no param required (#29126) replace-fmt-errorf Co-authored-by: [email protected] <[email protected]> commit 28d55218f7d793c184f4220a16a60e309caa70af Author: Ng Wei Han <[email protected]> Date: Thu Feb 29 17:56:17 2024 +0800 cmd/geth: parseDumpConfig should not return closed db (#29100) * cmd: parseDumpConfig should not return closed db * fix lint commit dbc27a199f411fc620eeb8589fd75a144f83ee8c Author: cui fliter <[email protected]> Date: Thu Feb 29 17:29:06 2024 +0800 all: fix function names in docs (#29128) Signed-off-by: cui fliter <[email protected]> commit 1883438964a7a4c68cee1de619526e8bc1e68b30 Author: lightclient <[email protected]> Date: Wed Feb 28 11:59:16 2024 -0700 eth/catalyst: return invalid payload attributes instead of invalid parms for bad fcu payload (#29115) commit 9986a69c25452ff0e7ce323446b215e2d0075185 Author: buddho <[email protected]> Date: Thu Feb 29 01:38:21 2024 +0800 internal/ethapi: pass in accesslist in test (#29089) Co-authored-by: Sina Mahmoodi <[email protected]> commit 5bae14f9df498243091078fc8d3ea6ab99669087 Author: rjl493456442 <[email protected]> Date: Wed Feb 28 20:40:28 2024 +0800 triedb/pathdb: fix panic in recoverable (#29107) * triedb/pathdb: fix panic in recoverable * triedb/pathdb: add todo * triedb/pathdb: rename * triedb/pathdb: rename commit 49623bd4697f5b333ae977968186d0717f918927 Author: rjl493456442 <[email protected]> Date: Wed Feb 28 20:23:52 2024 +0800 core, triedb/pathdb: calculate the size for batch pre-allocation (#29106) * core, triedb/pathdb: calculate the size for batch pre-allocation * triedb/pathdb: address comment commit 170fcd80c6f5d07d7d839e895765de193c34a8b3 Author: Péter Szilágyi <[email protected]> Date: Wed Feb 28 10:01:52 2024 +0200 params: being major version bump cycle commit 02d77c98f9e1efaf3fede313b0e9183dc54562b6 Author: cui <[email protected]> Date: Wed Feb 28 15:25:12 2024 +0800 core: using math.MaxUint64 instead of 0xffffffffffffffff (#29094) commit 57d2b552c74dbd03b9909e6b8cd7b3de1f8b40e9 Author: Péter Szilágyi <[email protected]> Date: Tue Feb 27 13:53:30 2024 +0200 params: begin v1.13.15 cycle commit 9038ba69428a6ecada1f2acace6981854482748b Author: Péter Szilágyi <[email protected]> Date: Tue Feb 27 13:50:30 2024 +0200 params: release Geth v1.13.14 commit 51b479e56459d663a12f95fd8eaba82716c0d5ce Author: Roberto Bayardo <[email protected]> Date: Tue Feb 27 03:27:50 2024 -0800 core/txpool: elevate the 'already reserved' error into a constant (#29095) declare the 'already reserved' error in errors.go commit 5a0f468f8cb15b939bd85445d33c614a36942a8e Author: Andrei Silviu Dragnea <[email protected]> Date: Tue Feb 27 10:29:12 2024 +0100 eth/tracers: Fix callTracer logs on onlyTopCall == true (#29068) commit 45a272c7b96cb260528bbc2e31d657488f97c4b0 Author: Delweng <[email protected]> Date: Tue Feb 27 00:34:45 2024 +0800 core/txpool: no need to log loud rotate if no local txs (#29083) * core/txpool: no need to run rotate if no local txs Signed-off-by: jsvisa <[email protected]> * Revert "core/txpool: no need to run rotate if no local txs" This reverts commit 17fab173883168c586d57ca9c05dfcbd9e7831b4. Signed-off-by: jsvisa <[email protected]> * use Debug if todo is empty Signed-off-by: jsvisa <[email protected]> --------- Signed-off-by: jsvisa <[email protected]> commit 63aaac81007ad46b208570c17cae78b7f60931d4 Author: Péter Szilágyi <[email protected]> Date: Mon Feb 26 14:27:56 2024 +0200 core/txpool/blobpool: reduce default database cap for rollout (#29090) xcore/txpool/blobpool: reduce default database cap for rollout commit c1f59b98f6b0351339767d71953eb4eb5d19c496 Author: cui <[email protected]> Date: Mon Feb 26 20:22:13 2024 +0800 eth/catalyst: remove variable in tx conversion loop (#29076) commit 821d70240d191ff451a813287a377466337a3cee Author: Justin Dhillon <[email protected]> Date: Mon Feb 26 02:03:59 2024 -0800 cmd/clef: add spaces in README.md table (#29077) Add space after links in so they are clickable in vscode. commit 8bca93e82c59d04f23b0237292d17fe728f20a5b Author: maskpp <[email protected]> Date: Mon Feb 26 18:02:18 2024 +0800 internal/ethapi: pass blob hashes to gas estimation (#29085) commit edffacca8f97d23298636e225d477818e58eafe7 Author: cui <[email protected]> Date: Mon Feb 26 17:59:03 2024 +0800 eth/catalyst: enable some commented-out testcases (#29073) commit 26724fc2aaf0cf8711c25ca664c0451f68d977fe Author: Qt <[email protected]> Date: Mon Feb 26 17:25:35 2024 +0800 p2p, log, rpc: use errors.New to replace fmt.Errorf with no parameters (#29074) commit 32d4d6e6160432be1cb9780a43253deda7708ced Author: Roberto Bayardo <[email protected]> Date: Mon Feb 26 01:06:52 2024 -0800 core/txpool: reject blob txs with blob fee cap below the minimum (#29081) * make blobpool reject blob transactions with fee below the minimum * core/txpool: some minot nitpick polishes and unified error formats * core/txpool: do less big.Int constructions with the min blob cap --------- Co-authored-by: Péter Szilágyi <[email protected]> commit 93c541ad563124e81d125c7ebe78938175229b2e Author: Haotian <[email protected]> Date: Fri Feb 23 16:57:47 2024 +0800 eth/catalyst: fix wrong error message of payloadV2 after cancun (#29049) * eth/catalyst: the same error format Signed-off-by: tmelhao <[email protected]> * eth/catalyst: wrong error message for payloadV2 post-cancun Signed-off-by: tmelhao <[email protected]> * eth/catalyst: parentBeaconBlockRoot -> parentBlockBeaconRoot Signed-off-by: tmelhao <[email protected]> * apply commit review Signed-off-by: tmelhao <[email protected]> --------- Signed-off-by: tmelhao <[email protected]> Co-authored-by: tmelhao <[email protected]> commit b87b9b45331f87fb1da379c5f17a81ebc3738c6e Author: colin <[email protected]> Date: Thu Feb 22 23:35:23 2024 +0800 internal/ethapi:fix zero rpc gas cap in eth_createAccessList (#28846) This PR enhances eth_createAccessList RPC call to support scenarios where the node is launched with an unlimited gas cap (--rpc.gascap 0). The eth_createAccessList RPC call returns failure if user doesn't explicitly set a gas limit. commit e47a7c22c40b9037049cb63d74eb1216aabdee60 Author: ArtificialPB <[email protected]> Date: Thu Feb 22 14:39:22 2024 +0100 internal/ethapi: use overriden baseFee for gasPrice (#29051) eth_call and debug_traceCall allow users to override various block fields, among them base fee. However the overriden base fee was not considered for computing the effective gas price of that message, and instead base fee of the base block was used. This has been fixed in this commit. commit b590cae89232299d54aac8aada88c66d00c5b34c Author: Felix Lange <[email protected]> Date: Wed Feb 21 15:49:50 2024 +0100 params: begin v1.13.14 release cycle commit 3b4ede74443a15db27fddbb803a6b0cc4180ca75 Author: Felix Lange <[email protected]> Date: Wed Feb 21 15:44:02 2024 +0100 params: release go-ethereum v1.13.13 stable commit b47cf8fe1de4f97ce38417d8136a58812734a7a9 Author: Sina Mahmoodi <[email protected]> Date: Wed Feb 21 12:46:32 2024 +0100 internal/ethapi: fix defaults for blob fields (#29037) Co-authored-by: Martin HS <[email protected]> commit b9ca38b7358dbf7e236c624043bbab789a8d0389 Author: colin <[email protected]> Date: Wed Feb 21 16:00:01 2024 +0800 core/txpool: fix typo (#29036) * fix typos * address comments commit 79e340fb1276cd5f0bbdc3825f90090488e3b978 Author: Haotian <[email protected]> Date: Wed Feb 21 15:59:21 2024 +0800 params: add cancun upgrade banner (#29042) params: add cancun banner Signed-off-by: tmelhao <[email protected]> Co-authored-by: tmelhao <[email protected]> commit bba3fa9af9709ce6615d994edac7043e064fda0d Author: buddho <[email protected]> Date: Tue Feb 20 19:42:48 2024 +0800 core,eth,internal: fix typo (#29024) commit 7f5e96dc6c0d70f793a6a41c059c5dd660357964 Author: buddho <[email protected]> Date: Tue Feb 20 18:08:56 2024 +0800 core/txpool: fix typo (#29031) commit f4852b8ddc8bef962d34210a4f7774b95767e421 Author: Péter Szilágyi <[email protected]> Date: Tue Feb 20 11:37:23 2024 +0200 core/txpool, eth, miner: retrieve plain and blob txs separately (#29026) * core/txpool, eth, miner: retrieve plain and blob txs separately * core/txpool: fix typo, no farming * miner: farm all the typos Co-authored-by: Martin HS <[email protected]> --------- Co-authored-by: Martin HS <[email protected]> commit ac0ff044606a663eeb47ef60ed5506f8427530…
Cherry pick ethereum/go-ethereum#29441 --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]>
…thereum#29441) This PR updates the bls contracts from our internal implementation which is an unmaintained fork of the kilic library to the gnark-crypto library that is actively maintained by consensys. It also updates the gas-costs according to the EIP
* mdbx: `Batch()` (erigontech#9999) This task is mostly implemented to be used in `erigon/erigon-lib/downloader/mdbx_piece_completion.go` and maybe in `nodesDB` (where we need many parallel RwTx) I was agains adding this "trick"/"api" last years, because thought that we can implement our App to be more 1-big-rwtx-friendly. And we did it in Erigon - StagedSync. TxPool also did, but with a bit less happy face - by "map+mutex with periodic flush to db". But `anacrolix/torrent` is external library and unlikely will survive such big mind-model-change. Maybe it's time to add `db.Batch()`. #### Batch Rw transactions Each `DB.Update()` waits for disk to commit the writes. This overhead can be minimized by combining multiple updates with the `DB.Batch()` function: ```go err := db.Batch(func(tx *bolt.Tx) error { ... return nil }) ``` Concurrent Batch calls are opportunistically combined into larger transactions. Batch is only useful when there are multiple goroutines calling it. The trade-off is that `Batch` can call the given function multiple times, if parts of the transaction fail. The function must be idempotent and side effects must take effect only after a successful return from `DB.Batch()`. For example: don't display messages from inside the function, instead set variables in the enclosing scope: ```go var id uint64 err := db.Batch(func(tx *bolt.Tx) error { // Find last key in bucket, decode as bigendian uint64, increment // by one, encode back to []byte, and add new key. ... id = newValue return nil }) if err != nil { return ... } fmt.Println("Allocated ID %d", id) ``` ---- Implementation mostly taken from https://github.com/etcd-io/bbolt/?tab=readme-ov-file#batch-read-write-transactions Maybe in future can push-down it to https://github.com/erigontech/mdbx-go * downloader: rename TorrentFiles to AtomicTorrentFS (erigontech#10005) * Caplin: indexing to use right buf size (erigontech#9998) - PutUvarint can produce 10 bytes - re-using buffer - faster and less gc * First round of fixes in making gossip publishing good for the validator: See comment (erigontech#9972) * Fixed and simplified unaggregated bits check. * There are 2 bits on, one for the attester and one for the End-of-bitlist, needed to account for end of bitlist bit * Wrong publishing topic for sync_committee_ messages * Added more Ignore by receiving specific errors to avoid forwarding useless data. * Replaced `validateAttestation` with full message processing * Fixed forwarding of sync committee aggregates * Fixed subnet announcements --------- Co-authored-by: kewei <[email protected]> * Downloader: atomic-fs to be less smart. if app called - Create() - don't check .lock. Otherwise can't create .torrent for existing .seg files. (erigontech#10004) * Implement the optional output field on ots_traceTransaction (erigontech#10014) This is for E2. It implements the backward compatible output field for traces on ots_traceTransaction: otterscan/execution-apis#1 It'll be consumed by Otterscan in an upcoming release of this feature: otterscan/otterscan#1530 * polygon/sync: Clean shutdown (erigontech#10017) * re-gen mock files (erigontech#10007) there was error: ``` prog.go:12:2: missing go.sum entry for module providing package github.com/golang/mock/mockgen/model; to add: go mod download github.com/golang/mock ``` * rename aggv3 to agg (erigontech#10011) * chain-config: capital IsOsaka (erigontech#9989) To Follow suit with rest of the naming * move more services out from ForkchoiceStore (erigontech#9981) - voluntary_exit - bls_to_execution_change - proposer_slashing - expirable lru --------- Co-authored-by: Giulio <[email protected]> * WP - dvovk/diagnostics downloader print (erigontech#10000) Added command which prints to console diagnostics data. In this initial version it is possible to print stages list and snapshot download progress. Erigon should be running with --metrics flag There are two available commands: - "downloader" - "stages" "current" There are two possible options for output: text and json Run command - ./build/bin/diag [command] [text | json] --------- Co-authored-by: Mark Holt <[email protected]> * move `temporal` package to erigon-lib (erigontech#10015) Co-authored-by: awskii <[email protected]> * downloader: more durable db mode (erigontech#10010) * Added body close on retry for downloader round trip (erigontech#10008) Add missing body close method when webseed roundtrip is retried * Set block baseFeePerGas value in graphql response (erigontech#9974) Set baseFeePerGas value in graphql resolver for block * vm: Rename stateTransition gas to gasRemaining (erigontech#10025) The `StateTransition` property `gas` actually tracks the remaining gas in the current context. This PR is to improve code readability. Geth also uses similar naming. * chore: fix function names in comment (erigontech#9987) Signed-off-by: fuyangpengqi <[email protected]> * sonar: add test coverage (erigontech#9988) - attempt to integrate sonar with test coverage by following - https://sonarcloud.io/project/configuration/GitHubActions?id=ledgerwatch_erigon - https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/ - adds sonar properties file to specify code coverage output - also properties file can be used to filter out generated code from sonar scan - protobuf - graphql - ignore pedersen hash bindings code - ... there will be more ignores coming in later PRs (e.g. some c/c++ code we dont need to scan, some js code, some contract gen code, etc.) * sonar: disable c/c++ scanning (erigontech#10033) Fixes error in Sonar GitHub action: <img width="1645" alt="Screenshot 2024-04-23 at 17 46 01" src="https://github.com/ledgerwatch/erigon/assets/94537774/3833db1c-6a8a-4db2-8bb7-5de58b57e638"> * Caplin: Added `SyncAggregate` computation to block production (erigontech#10009) This PR allows the computation for the computation of the `SyncAggregate` field in block production: https://sepolia.beaconcha.in/slot/4832922 proof of the code working is that now Caplin validators can include sync aggregates in their blocks. Things modified: * We do not aggregate pre-aggregated `SyncContributionAndProof`s, instead we just listen to the network and pick the most profitable ones for each sub sync committee (4 sync subcommittee on mainnet). profitability == most bits set in `AggregationBits` field. * Separate aggregates set for contribution to be included in a block from the ones constructed from `SyncCommitteeMessage`s, combining the two causes some contributions to be marked as invalid and not aggregable. * Remove SyncContributionMock in favor of gomock * polygon/sync: message listener to preserve peer events ordering (erigontech#10032) Observed the following issue in a long running Astrid sync on bor-mainnet: ``` [DBUG] [04-17|14:25:43.504] [p2p.peerEventObserver] received new peer event id=Disconnect peerId=51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763 [DBUG] [04-17|14:25:43.504] [p2p.peerEventObserver] received new peer event id=Connect peerId=51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763 ``` Note the timestamps are the same on the millisecond level, however the disconnect was processed before the connect which is wrong (connect should always be first). This then got the `PeerTracker` in a bad state - it kept on returning peer `51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763` as a valid peer to download from, which caused repeated `peer not found` errors when sending messages to it. Fix is to have the message listener wait for all observers to finish processing peer event 1 before proceeding to notifying them about peer event 2. * check attestation signature (erigontech#10018) * sonar: fix warnings (erigontech#10034) Fixes Sonar warnings: <img width="550" alt="Screenshot 2024-04-23 at 19 37 53" src="https://github.com/ledgerwatch/erigon/assets/94537774/b85c9607-3800-408d-8a1b-c5bf80da38b2"> * sonar: fix js warnings and exclude mocks (erigontech#10042) - Excludes go mock generated files from analysis - Excludes broken js files (valid as they are used for tracers and test data) to fix below warnings <img width="1658" alt="Screenshot 2024-04-24 at 11 12 04" src="https://github.com/ledgerwatch/erigon/assets/94537774/7925d07f-37f3-43c9-b34a-9a5361e48a8a"> * tests: Support iterations in Heimdall simulator (erigontech#10040) Accept a slice of block numbers that represents the final block number that will be available to the client of the simulator.Any data after the iteration stage end is not accessible to the client. The iteration moves to the next stage under certain conditions: - requesting the latest span via `FetchSpan` - requesting state sync events beyond current last iteration block's timestamp * Fix forward bor snaps (erigontech#10027) This fixes this issue: erigontech#9499 which is caused by restarting erigon during the bor-heimdall stage. Previously after the initial call to bor-heimdall (header 0), forward downloading was disabled, but backward downloading recursively collects headers - holding results in memory until it can roll them forward. This should only be called for a limited number of headers, otherwise it leads to a large amount of memory >45GB for bor main net if the process is stopped at block 1. * Added downloader request count (erigontech#10036) The downloader is not complete until all of its requested files have been downloaded. This changes adds a request count to the downloader stats to be checked for completeness, otherwise the downloader may appear complete before all required torrents have been added. * StageSenders: `--sync.loop.block.limit` support (erigontech#9982) We reverted support of this flag in `updateForkChoice` because implementation was too complex and fragile: erigontech#9900 But it's good-enough if StageSenders will preserve this flag - then next stages (exec) will also follow (because they look at prev stage progress). It's good-enough - because users just want to save some partial progress after restoring node from backup (long downtime). And enforce "all stages progress together" invariant * chore:fix typo (erigontech#9952) * Optimize prune old chunks (erigontech#10019) **Summary** Fixes prune point for log (+index) - Unnecessary to use ETL again for deleting `kv.Log` entries, can just introduce `RwCursor` in the initial loop - Put the last `pruneTo` block number in the `PruneState` - this will begin pruning from that point. Earlier the `pruneFrom` point being passed in was buggy as it used some other assumption for this value * [ots] Fix block rewards calculation on post-merge blocks (erigontech#10038) This is for E2. The block rewards returned by Otterscan API is incorrect since the merge. It replaces very old code with the same calculation used for trace_block. this code probably won't work with Aura consensus, but that's ok since the current one doesn't work as well. It would actually require exposing more code from block execution and I don't want to handle it for now, let's fix only the post-merge calc for now. Co-authored-by: sealer3 <[email protected]> * sonar: use fixed version for sonarcloud-github-action (erigontech#10046) * standardize mock file name (erigontech#10043) * chore: remove repetitive words (erigontech#10044) * mdbx, erigon backup: fix typo (erigontech#10031) * Build Silkworm RpcDaemon settings from Erigon ones (erigontech#10002) This PR introduces support for customising Silkworm RpcDaemon settings in Erigon++. Common RPC settings between Erigon and Silkworm are simply translated from the existing Erigon command-line options. They include: - `--http.addr` - `--http.port` - `--http.compression` - `--http.corsdomain` - `--http.api` - `--ws` - `--ws.compression` Moreover, the following Silkworm-specific command-line options are added: - `--silkworm.verbosity` - `--silkworm.contexts` - `--silkworm.rpc.log` - `--silkworm.rpc.log.maxsize` - `--silkworm.rpc.log.maxfiles` - `--silkworm.rpc.log.response` - `--silkworm.rpc.workers` - `--silkworm.rpc.compatibility` Default values cover the common usages of Erigon++ experimental features, yet such options can be useful for testing some corner cases or collecting information. Finally, this PR adds a new `LogDirPath` function to `logging` module just to determine the log dir path used by Erigon and put there also Silkworm RPC interface logs, when enabled. * Optimized attestation processing (erigontech#10020) * Decrease memory footprint on chain tip * Fix a race * Better times on `Attestation` processing. 1 sec -> 54 ms * Revert "Fix new_heads Events Emission on Block Forks (erigontech#9738)" (erigontech#10055) This reverts commit f4aefdc. See PR erigontech#9738 * chore: fix comments (erigontech#9958) Fix some comments * Revert "Added downloader request count" (erigontech#10053) Reverts erigontech#10036 * drop go 1.20 support (erigontech#10052) drop go 1.20 support use ` github.com/erigontech/torrent v1.54.2-alpha` - to simplify future support and features backport * cmd/integration: print_table_sizes (erigontech#10061) * Revert "StageSenders: `--sync.loop.block.limit` support" (erigontech#10060) Reverts erigontech#9982 * downloader: remove deprecated manual fsync (erigontech#10064) After switching to more durable db mode erigontech#10010 - we don't need manual fsync anymore. * cmd/integration: import erigon-lib/kv to execute init func (erigontech#10065) * Caplin: fixed attestation broadcasting (erigontech#10041) This PR fixes 2 things: * Superset handling (should ignore) * SSZ offset not set for custom ssz in attestation encoding after json unmarshalling * feat: add `fullTx` params to `NewPendingTransactions` (erigontech#9204) feat: add `fullTx` params to `NewPendingTransactions` Closes erigontech#9203 * backward compatibility of .lock (erigontech#10006) In PR: - new .lock format introduced by erigontech#9766 is not backward compatible. In the past “empty .lock” did mean “all prohibited” and it was changed to “all allowed”. - commit Not in PR: I have idea to make .lock also forward compatible - by making it whitelist instead of blacklist: after adding new snap type it will not be downloaded by accident. Will do it in next PR. But I need one more confirmation - why do we need exceptions from .lock? Why we breaking "download once" invariant for some type of files? Can we avoid it? * Make logs subscription channel size configurable (erigontech#9810) This PR makes the channel that is used to send logs to subscriptions configurable so logs are not dropped when the channel gets filled. See issue 9699. This is just an initial version since I wanted to gather some feedback and was unsure if this is the correct approach to solve this. * cmd/integration: print table sizes to filter deprecated tables (erigontech#10066) * [ots] Fix incorrect return type and overflow on total block fees calc (erigontech#10070) For E2: fix incorrect type + overflow in certain blocks Corresponding otterscan issue: otterscan/otterscan#1658 * RPC: `--http.dbg.single=true` and custom HTTP header `dbg: true` (erigontech#10039) - Added method `tx.Context()` - because Tx already bounded to context by `db.BeginRo(ctx)` - Removed ctx parameter from `BlockWithSenders` method in interfaces - Added `dbg.ToContext()` and `dbg.Enabled(ctx)` methods to set/get debugging tag to `ctx`. Added way to debug single http request: To print more detailed logs for 1 request - add `--http.dbg.single=true` flag. Then can send HTTP header `"dbg: true"`: ``` curl -X POST -H "dbg: true" -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id":1}' localhost:8545 ``` --------- Co-authored-by: battlmonstr <[email protected]> * all: use the built-in slices library (erigontech#9842) In the current go 1.21 version used in the project, slices are no longer an experimental feature and have entered the standard library Co-authored-by: alex.sharov <[email protected]> * chore(config): json marshal chainName (erigontech#9865) As the other fields are json marshaled into lowerUpper case, we should use the same style. --------- Signed-off-by: jsvisa <[email protected]> * Fix new_heads Events Emission on Block Forks (erigontech#10072) TL;DR: on a reorg, the common ancestor block is not being published to subscribers of newHeads #### Expected behavior if the reorg's common ancestor is 2, I expect 2 to be republished 1, 2, **2**, **3**, **4** #### Actual behavior 2 is not republished, and 3's parentHash points to a 2 header that was never received 1, 2, **3**, **4** This PR is the same thing as erigontech#9738 except with a test. Note... the test passes, but **this does not actually work in production** (for Ethereum mainnet with prysm as external CL). Why? Because in production, `h.sync.PrevUnwindPoint()` is always nil: https://github.com/ledgerwatch/erigon/blob/a5270bccf5e69a6beaaab9a0663bdad80e989505/turbo/stages/stageloop.go#L291 which means the initial "if block" is never entered, and thus we have **no control** of increment/decrement `notifyFrom` during reorgs https://github.com/ledgerwatch/erigon/blob/a5270bccf5e69a6beaaab9a0663bdad80e989505/eth/stagedsync/stage_finish.go#L137-L146 I don't know why `h.sync.PrevUnwindPoint()` is seemingly always nil, or how the test can pass if it fails in prod. I'm hoping to pass the baton to someone who might. Thank you @indanielo for original fix. If we can figure this bug out, it closes erigontech#8848 and closes erigontech#9568 and closes erigontech#10056 --------- Co-authored-by: Daniel Gimenez <[email protected]> * chore: remove repetitive words with tools (erigontech#10076) use https://github.com/Abirdcfly/dupword to check repetitive words * grafana: configurable datasource (erigontech#10073) * Revert "Fix new_heads Events Emission on Block Forks" (erigontech#10081) Reverts erigontech#10072 * AggregateAndProof put aggregated data into attestationsPool (erigontech#10079) * downloader: docs on MMAP for data-files r/w and experiments with bufio (erigontech#10074) Pros: - it allows to not pre-alloc files: erigontech#8688 - it allows to not "sig-bus" when no space left on disk (return user-friendly error). see: erigontech#8500 - but DB will be MMAP anyway and may get "sig-bus" FYI: - seems no perf difference (but i tested only on cloud drives) - erigon will anyway open it as mmap Cons: - i did implemented `fsync` for mmap ( anacrolix/torrent#755 ) - probably will need implement it for bufio: anacrolix/torrent#937 - no zero-copy: more `alloc` memory will be holded by APP (PageCache starvation). I see 2x mem usage (at `--torrent.download.slots=500` 20gb vs 40gb) - i see "10K threads exchaused" error earlier (on `--torrent.download.slots=500`). - what else? * polygon/p2p: Add blk/s and bytes/s to periodic log (erigontech#9976) * wrong ttl value initialization in expirable lru cache (erigontech#10090) fix issue erigontech#10089 * Fetch and skip sync events (erigontech#10051) For period where there are not many sync events (mostly testnets) sync event fecthing can be slow becuase sync events are fetched at the end of every sprint. Fetching the next and looking at its block number optimizes this because fetches can be skipped until the next known block with sync events. * EIP-2537 (BLS12-381): use gnark instead of kilic (erigontech#10082) Cherry pick ethereum/go-ethereum#29441 --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> * abi: fix abigen issue with make devtools (erigontech#10091) fixes erigontech#7593 it introduced a regression: `"fmt"` and `"reflect"` imports were added for all files generated by `abigen` assuming that they will be used in all cases, however that assumption was wrong for some cases resulting in invalid code being generated (in this case after running `make devtools`): <img width="982" alt="Screenshot 2024-04-27 at 10 50 37" src="https://github.com/ledgerwatch/erigon/assets/94537774/9a1b93a5-2141-40d9-8c9e-01a1ff6c031c"> * Caplin: Inclusion of `VoluntaryExits`, `AttesterSlashing`s, `ProposerSlashing`s, `BlsExecutionToChange`s and `Attestation`s into block production (erigontech#10071) This PR add operations inclusion. ## Normal operations * BlsExecutionChange * VoluntaryExit * Slashings Each of these operations blacklist the index they work on so we do not have repeating indices for the same operations twice. we assume all signatures are pre-validated and just see if it is a good time to produce a block with them (by looking at their slot) ## Aggregated Attestations There is a lot of trash attestations on the network so we separate our algorithm in 3 steps: ### Eligibility We iterate over the entire pool of accumulated attestations and filter out all attestations who cannot be included at the current slot, and compute their expected reward. (filter out if 0). ### Ranking We rank the `Attestation`s by their expected reward (we just sort the array of candidates) by expected reward in ascending order. ### Filtering by superset We may have some supersets left-over, filter attestation which ends up being supersets of other. this process is done from highest reward down to lowest reward. * mdbx: Return err early in iter.Next() (erigontech#10078) `HasNext` will return true even with existing error and the application will expect a next entry. The `Next` function can get into an internal error (such as a `panic()`) while fetching the next cursor item and thus fail to return the error. --------- Co-authored-by: alex.sharov <[email protected]> * make: mocks using mockgen (erigontech#10098) - replaces usages of `moq` in `erigon-lib` with `mockgen` (gomock) - adds a `make mocks` and `mocks-clean` command for `erigon` - updates existing `make mocks` command and adds a `mocks-clean` common for `erigon-lib` * mockgen: use typed mocks for compile time check (erigontech#10103) Use `mockgen -typed=true` to generate mocks with type-safe `Return`, `Do`, `DoAndReturn` function - https://github.com/uber-go/mock?tab=readme-ov-file#flags * make: add gen commands (erigontech#10106) adds: - `make gen` - `make solc` - `make abigen` - `make codecgen` - `make gencodec` - `make graphql` tidies up `make devtools` * added print DBs table sizes (erigontech#10111) Added command to print databases tables basic info. There are two options : - print all info: ./build/bin/diag dbs all - print only populated tables and dbs: ./build/bin/diag dbs pop Here is example output: ![Screenshot 2024-04-28 at 21 38 18](https://github.com/ledgerwatch/erigon/assets/29065143/f0a04931-8d87-4c45-b71a-71d75404f3fc) @taratorio if you want I can add flag which will print specific DB. * nodedb: UpdateNode method to create 1 rwtx instead of 2 (erigontech#10109) * Caplin: tweaks to make staking more stable. (erigontech#10097) Tweaks I did: 1) Decreased attestation expiry down to 30 minutes 2) Removed slot check in committeeSubAggregation 3) More reliable algorithm for the dependent root Results: * Better aggregates * Less strain on the node * No blocks/attestations missed * mdbx: pre-open read pagesize from db (erigontech#10113) Problem: if --pageSize parameter not set - we using `default pagesize` instead of `real pagesize of db`. And it causing different `dirtySpace` size (because it's accounted in "pages") * RPC: Receipts LRU cache (erigontech#10112) for erigontech#10099 for things like `eth_getTransactionReceipt`, `ots_searchTransactionsAfter`, etc... Also moved: - moved `api.chainConfig()` inside `api.getReceipts()` - switched `ots` to use blocks/receipts lru - switched price oracle to use blocks/receipts * use sonar for code coverage badge (erigontech#10107) - use sonar badge for code coverage - remove unnecessary "Coverage" GitHub action and unnecessary duplicate test run on "devel" CI for it - the existing coverage job + badge didn't seem to be accurate (wasn't taking into account `erigon-lib` sub-module) <img width="982" alt="Screenshot 2024-04-29 at 12 06 46" src="https://github.com/ledgerwatch/erigon/assets/94537774/e47367ed-340d-42b5-ad00-2f59edce100c"> * dvovk/limit mem usage (erigontech#10069) Implemented limit for saving peers in an Erigon node memory to be able to turn on diagnostics data collection by default. * chore: fix some function names (erigontech#10117) Signed-off-by: luchenhan <[email protected]> * Revert "backward compatibility of .lock" and Backward compatibility by Giulio (erigontech#10077) Reverts erigontech#10006 and add a proper migration routine * dvovk/enable_dignostic (erigontech#10083) Enabled diagnostics by default to collect data. It will allow to connect to node and get stored data. It includes three new flags: - "diagnostics.disabled" - it's set to "false" by default. Set to "true" if you want to disable diagnostics. - "diagnostics.endpoint.addr" - address of HTTP endpoint to get diagnostics data - "diagnostics.endpoint.port" - port of HTTP endpoint to get diagnostics data [DO NOT MERGE] as it depend on: - erigontech#10069 - update support command - update diagnostics UI * Revert "mdbx: pre-open read pagesize from db" (erigontech#10125) Reverts erigontech#10113 * Bor waypoint storage (erigontech#9793) Implementation of db and snapshot storage for additional synced hiemdall waypoint types * Checkpoint * Milestones This is targeted at the Astrid downloader which uses waypoints to verify headers during syncing and fork choice selection. Post milestones for heimdall these types are currently downloaded by erigon but not persisted locally. This change adds persistence for these types. In addition to the pure persistence changes this PR also contains a refactor step which is part of the process of extracting polygon related types from erigon core into a seperate package which may eventually be extracted to a separate module and possibly repo. The aim is rather than the core `turbo\snapshotsync\freezeblocks` having to know about types it manages and how to exaract and index their contents this can concern it self with a set of macro shard management actions. This process is partially completed by this PR, a final step will be to remove BorSnapshots and to simplify the places in the code which has to remeber to deal with them. This requires further testing so has been left out of this PR to avoid delays in delivering the base types. # Status * Waypont types and storage are complete and integrated in to the BorHeimdall stage, The code has been tested to check that types are inserted into mdbx, extracted and merged correctly * I have verified that when produced from block 0 the new snapshot correctly follow the merging strategy of existing snapshots * The functionality is enables by a **--bor.waypoints=true** this is false by default. # Testing This has been tested as follows: * Run a Mumbai instance to the tip and check current processing for milestones and checkpoints # Post merge steps * Produce and release snapshots for mumbai and bor mainnet * Check existing node upgrades * Remove --bor.waypoints flags * Replace snaptype.AllTypes with local definitions (erigontech#10132) When adding bor waypont types I have removed snaptype.AllTypes because it causes package cross-dependencies. This fixes the places where all types have been used post the merge changes. * Caplin: process new attesting indicies before block comes in to avoid occasiona Reorg (erigontech#10085) * qa-tests: small improvements (erigontech#10127) This PR - avoids installing Golang on every test run, - clean up the testbed datadir at the end of the test * fix some flags parsing (erigontech#10134) * align deps of e35 and devel (erigontech#10136) - upgrade docker - remove tendermint * core/types: disable go:generate codecgen for receipts and logs (erigontech#10105) running `go generate ./...` fails with: ``` codecgen error: error running 'go run codecgen-main-2.generated.go': exit status 1, console: panic: encoding alphabet includes duplicate symbols goroutine 1 [running]: encoding/base64.NewEncoding(...) /usr/local/go/src/encoding/base64/base64.go:82 github.com/ugorji/go/codec.init() /Users/milen/go/pkg/mod/github.com/ugorji/go/[email protected]/gen.go:168 +0xf1c exit status 2 ``` this is a problem when using go1.22 and it has been fixed here: - ugorji/go@8286c2d - issue: ugorji/go#407 * fix concurrent rw on map in operation_pool (erigontech#10140) relates to erigontech#10139 * Refactored types to force runtime registrations to be type dependent (erigontech#10147) This resolves erigontech#10135 All enums are constrained by their owning type which forces package includsion and hence type registration. Added tests for each type to check the construction cycle. * protection from starting e2 git branch on e3 db (erigontech#10150) * Set existing torrent webseeds after download (erigontech#10149) Fix a timing hole where torrents that get created before webseeds have been downloaded don't get webseeds set. * eth, txpool: enforce 30gwei for gas related configs for polygon (erigontech#10158) Cherry-pick PR erigontech#10119 into the release Co-authored-by: Marcello Ardizzone <[email protected]> * make: fix gen issue with mockgen not found in PATH (erigontech#10162) (erigontech#10166) Fixes erigontech#10157 (comment) Problem was: ``` grep -r -l --exclude-dir=erigon-lib "^// Code generated by MockGen. DO NOT EDIT.$" . | xargs rm -r ``` was deleting the `mockgen` binary after it was built 🙃 * abigen: fix duplicate struct definitions (erigontech#10157) (erigontech#10164) fixes a 2nd regression introduced by - erigontech#7593 - it generates duplicate struct types in the same package (check screenshot below) - also found a better way to fix the first regression with unused imports (improvement over erigontech#10091) <img width="1438" alt="Screenshot 2024-04-30 at 17 30 42" src="https://github.com/ledgerwatch/erigon/assets/94537774/154d484b-4b67-4104-8a6e-eac2423e1c0e"> * dvovk/pprof fix (erigontech#10155) (erigontech#10178) Cherry pick PR erigontech#10155 into the release Co-authored-by: Dmytro <[email protected]> * Engine API: NewPayload fails with a "context canceled" error in Current/GetHeader (erigontech#9786) (erigontech#9894) * improved logging * check ctx in ServeHTTP: The context might be cancelled if the client's connection was closed while waiting for ServeHTTP. * If execution API returns ExecutionStatus_Busy, limit retry attempts to 10 seconds. This timeout must be lower than a typical client timeout (30 sec), in order to give the client feedback about the server status. * If execution API returns ExecutionStatus_Busy, increase retry delay from 10 ms to 100 ms to avoid stalling ourselves with multiple busy loops. IMO this delay should be higher (e.g. 1 sec). Ideally we shouldn't do polling at all, but doing a blocking ctx call requires rearchitecting the ExecutionStatus_Busy logic. see erigontech#9786 * torrent v1.54.2-alpha -> v1.54.2-alpha-7 (release/2.60) (erigontech#10183) * Unnecessary Logs in sentry removed (erigontech#10190) Cherry pick PR erigontech#10187 into the release Co-authored-by: Giulio rebuffo <[email protected]> * nil block during execution (erigontech#10193) release cherry pick * qa-tests: updating test workflow on release/2.60 (erigontech#10196) This PR brings the changes of erigontech#10195 to the branch release/2.60 with the necessary modifications * qa-tests: fix workflows for release 2.60 (erigontech#10217) Running a test every day doesn't make sense on an inactive branch. It also seems that the schedule trigger favours the main branch if the test workflow has the same name on the main and other branches. So this PR changes the test trigger to "push events". * Release: fix logs spam (erigontech#10211) for erigontech#10203 * Blocks snaps - see 0 indices after reopen (erigontech#10219) Cherry pick PR erigontech#10214 into the release Co-authored-by: Alex Sharov <[email protected]> * torrent v1.54.2-alpha-7 -> v1.54.2-alpha-8 (release/2.60) (erigontech#10224) This adds torrent fixes that remove bad peers due to non handling of http errs. * fixed start diag server (erigontech#10236) fixed start diag server if metrics address is different from pprof address --------- Co-authored-by: taratorio <[email protected]> * params: version 2.60.0-rc1 (erigontech#10230) * downloader: --seedbox doesn't init snaptypes (erigontech#10245) Cherry pick PR erigontech#10215 into the release Co-authored-by: Alex Sharov <[email protected]> * e2: bor-mainnet fix broken v1-054600-054700-borspans.seg (erigontech#10243) Pick erigontech/erigon-snapshot#160 * test * e2: set dirty-space for chaindb to 512mb (erigontech#10269) * Fix potential index out of bounds in decodeBlobVersionedHashes (erigontech#10294) * remove nils from p2p logs (erigontech#10303) fix for ``` [p2p] Server protocol=68 peers=2 trusted=0 inbound=1 LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= i/o timeout=53 EOF=65 closed by remote=215 too many peers=6 ecies: invalid message=5 ``` * params: version 2.60.0 (erigontech#10330) * Fix tests * fix Consensus specification tests CI (erigontech#10391) (erigontech#10396) Cherry-pick: erigontech@bc5fa6f Need this to get PR CI green for v2.60.1 patches, e.g. - erigontech#10390 Co-authored-by: Andrew Ashikhmin <[email protected]> * rpc/handler: do not append null to stream when json may be valid (erigontech#10390) Cherry-pick: erigontech@4d1c954 Relates to: erigontech#10376 * Remove files that should have been ignored * Bump go version to 1.21 * Add erigon-lib back * Fixed Bor Log appearing on Ethereum Mainnet (erigontech#10405) (erigontech#10420) Cherry-pick: erigontech@be889f6 Co-authored-by: Giulio rebuffo <[email protected]> * Fix dynamic config * Fix APIList * Upstream merge fix Fix txpool and metrics * Fix nil pointer dereference during first stage cycle * fix gas price not right problem (erigontech#10456) Cherry pick PR erigontech#10451 into the release branch Co-authored-by: mars <[email protected]> * eth_estimateGas: default feeCap to base fee (erigontech#10499) Copy PR erigontech#10495 into the release branch * Add flag for bor waypoint types (erigontech#10501) Cherry pick PR erigontech#10281 into the release branch Co-authored-by: Mark Holt <[email protected]> Co-authored-by: alex.sharov <[email protected]> * try to fix 'method handler crashed' for debug_traceCall of erigontech#9090 (erigontech#10502) Cherry pick PR erigontech#10401 into the release branch Co-authored-by: mars <[email protected]> * diagnostics: cherry pick speedtest disable (erigontech#10509) Cherry pick PR erigontech#10449 into the release branch * Enable DNS p2p discovery on holesky (erigontech#10507) Cherry pick PR erigontech#10460 into the release branch Co-authored-by: Willian Mitsuda <[email protected]> * fix eth_call 'method handler crashed' error when tx has set maxFeePerBlobGas (erigontech#10506) Cherry pick PR erigontech#10452 into the release branch Co-authored-by: mars <[email protected]> * e2: remove overlapped files only after merge (erigontech#10487) Otherwise: if start after `kill -9` in the middle of merge - may remove small files of 1 type of file, but leave small files of another type of files (which merge was not finished) - and leave node in un-mergable state: erigontech#10485 --------- Co-authored-by: awskii <[email protected]> * add flag checking for pruning waypoints (erigontech#10508) Cherry pick PR erigontech#10468 into the release branch Co-authored-by: Mark Holt <[email protected]> * p2p/sentry: sentry doesn't start with ErrNoHead (erigontech#10454) (erigontech#10523) cherry-pick erigontech#10494 to release/2.60 * add lock to purgeMilestoneIDsList (erigontech#10524) Cherry pick PR erigontech#10493 into the release branch Co-authored-by: Mark Holt <[email protected]> * polygon/heimdall: fix checkpoint json marshalling (erigontech#10530) Fixes a recent regression causing unwinds due to checkpoints having zero root hash: ``` [WARN] [05-18|23:58:54.662] [bor] Root hash mismatch while whitelisting checkpoint expected=ac1c57270479250af3ce8eee90075cd8b2ba1bac55353105e063d9a4c87c743e got=0000000000000000000000000000000000000000000000000000000000000000 [WARN] [05-18|23:58:54.662] [bor] Rewinding chain due to checkpoint root hash mismatch number=57125727 ``` Note this has already been fixed on Erigon 3 branch but as part of a non-related PR - https://github.com/ledgerwatch/erigon/pull/10124/files#diff-47d4532f399f2d6a45e6f19944a45c80bac573b4d1b5cb51485d0254229d1b16 * Fix capacity for immediate appends (erigontech#10539) Cherry pick PR erigontech#10528 into the release branch Co-authored-by: Shoham Chakraborty <[email protected]> * core/vm: set tracer-observable value of a delegatecall to match parent value (erigontech#10370) requested by erigontech#9549 port of ethereum/go-ethereum#26632 * Remove unused binary * params: version 2.60.1 (erigontech#10555) * remove: externalcl flag from default configs * blobGasPrice should be marshalled as hex (erigontech#10571) Cherry pick PR erigontech#10551 into the release branch * Caplin: Fixed reforwarding of Bls Execution changes (erigontech#10577) Cherry pick PR erigontech#10546 into the release branch Co-authored-by: Giulio rebuffo <[email protected]> * Caplin: Proper "Normalization" of length of ForkVersions to 8 hex characters (erigontech#10578) Cherry pick PR erigontech#10512 into the release branch Co-authored-by: Giulio rebuffo <[email protected]> * Caplin: Update BlobSidecars Beacon API endpoint to the latest specs (erigontech#10580) Cherry pick PR erigontech#10576 into the release branch Co-authored-by: Giulio rebuffo <[email protected]> * wip * resolve conflicts/issues after merge * bor blocks retire: infinity loop fix (erigontech#10596) Problem: `+1` was added to maxBlockNum instead of minBlockNum for: erigontech#10554 * add modes in acl db * refactored code * acl cli * Uts * Revert "Uts" This reverts commit 807bc91. Revert "acl cli" This reverts commit c8eead9. Revert "refactored code" This reverts commit aa4b8a4. Revert "add modes in acl db" This reverts commit 09c512a. Revert "wip" This reverts commit ca6db9e. * bor blocks retire: infinity loop fix (erigontech#10596) Problem: `+1` was added to maxBlockNum instead of minBlockNum for: erigontech#10554 * txpool: EIP-3860 should only apply to create transactions (erigontech#10609) This fixes Issue erigontech#10607 * qa-tests: update 2.60.x test workflows from main (erigontech#10627) * Fix potential p2p shutdown hangup (erigontech#10626) This is a fix for: erigontech#10192 This fixes is a deadlock in v4_udp.go where * Thread A waits on mutex.Lock() in resetTimeout() called after reading listUpdate channel. * Thread B waits on listUpdate <- plist.PushBack(p) called after locking mutex.Lock() This fix decouples the list operations which need locking from the channel operations which don't by storing the changes in local variables. These updates are used for resetting a timeout - which is not order dependent. * downloader: Number of DNS requests seem excessive (erigontech#5145) (erigontech#10739) cherry-pick erigontech#10693 to release * rpc: Fix incorrect txfeecap (erigontech#10643) Cherry pick PR erigontech#10636 to Erigon 2 * downloader: don't block erigon startup if devs deploy new hashes (of same files) (erigontech#10761) * skip hidden files when list files with given extension (erigontech#10654) for erigontech#10644 * qa-tests: backport to release/2.60 improvements made to e3 github action workflows (erigontech#10778) This PR backports improvements that we added to the E3 tests: recording runner name and db version used for testing on MongoDB database. * Fix tests * Fix docker file and make file * Fix configs * Add a dummy flag 'externalcl' for backward compatibility * Enable CI in upstream-merge PRs * Exclude non-buildable targets from CI * e2: more snaps (all networks) (erigontech#10794) * Update ubuntu version in CI * e2: configurable hashers amount (erigontech#10785) * Revert "e2: configurable hashers amount" (erigontech#10834) * diagnostics: move E3 changes to E2 (erigontech#10806) Merged all the work done from main branch to keep diagnostics up to date. * Downloader: fix staticpeers flag (erigontech#10798) Cherry pick erigontech#10792 * Fix NewPayload Validation during header download (erigontech#10837) Cherry pick PR erigontech#10093 into the release branch Co-authored-by: Minhyuk Kim <[email protected]> * e2: mainnet blob 9.3M (erigontech#10842) * Fix gas fee calculation for debug calls (erigontech#10880) Cherry pick PR erigontech#10825 into the release branch Co-authored-by: Minhyuk Kim <[email protected]> * Revert "eth_estimateGas: default feeCap to base fee (erigontech#10499)" (erigontech#10904) This reverts PR erigontech#10499. See erigontech#10495 (comment) and PR erigontech#10901 * Change CI branches * params: version 2.60.2 (erigontech#10905) * Add bridge test to CI * Remove matrix * [bugfix] Fix gas estimation bug where EVM was not correctly used in the interpreter * Changing Caplin Finality Checkpoint API response to match spec (erigontech#10944) Cherry pick PR erigontech#10843 into the release branch Co-authored-by: Angus Scott <[email protected]> * Add zero check in tx.Sender func (erigontech#10737) This is an additional check as erigontech#9990 could not be reliably reproduced. The conjecture is that at some point there is a race condition somewhere related to either storing snapshot file for an older block or updating the DB for a more recent block. Somewhere the code sets sender value directly to zero or overwrites a pointer, leading to sender address being incorrectly assigned to ZERO. * Add Normalcy hardfork (#676) * Add Normalcy fork * Add a few missed functions * eth/tracers: fix prestate tracer bug with create with value (erigontech#10960) fixes erigontech#9531 Changes: - fixes a bug with the prestate tracer where we were incorrectly subtracting the value of a transaction from the "to" address balance in the "pre" state (should not be done for CREATE calls) - fixes a bug with the prestate tracer where we were incorrectly adding the value of a transaction to the "from" address balance in the "pre" state (should not be done for CREATE calls) - fixes a bug with the prestate tracer where we were incorrectly decrementing the nonce value of a transaction's "from" address in the "pre" state (should not be done for CREATE calls) - adds a test generator that can generate the test files for us based on real life transaction hash and node rpc url - check README https://github.com/ledgerwatch/erigon/blob/fix-prestate-tracer-on-create-e2/eth/tracers/internal/tracetest/testgenerator/README.md - adds test cases - fixes some existing test cases that were setup with incorrect data * eth/tracers: add optional includePrecompiles flag to callTracer - default true is preserved (erigontech#10986) relates to erigontech#9784 - Adds support for an optional `"includePrecompiles"` tracer config option for `callTracer` that users can use to control behaviour (previous default of including precompile traces is preserved) - Adds tests for default and for `"includePrecompiles": false` based on https://etherscan.io/tx/0x536434786ace02697118c44abf2835f188bf79902807c61a523ca3a6200bc350 * Cherry-pick: Caplin's past finalization check (erigontech#11006) * turbo/jsonrpc: add optional includePrecompiles flag to trace_* apis (erigontech#10979) relates to erigontech#9784 - Adds support for an optional `"includePrecompiles"` tracer config option for our OeTracer (OpenEthereum) that users can use to match output of debug_* apis with callTracer (by default it includes precompiles). Note default spec for OpenEthereum traces are to not include precompiles - this is preserved by this PR - Note geth has support for `"includePrecompiles"` so we are getting more aligned as well - https://github.com/ethereum/go-ethereum/blob/master/eth/tracers/native/call_flat.go#L124 - Adds tests for OeTracer * eth/tracers: always pop precompiles stack in callTracer (erigontech#11004) made a mistake in previous PR erigontech#10986 should always pop the precompiles stack for correctness * allow to gracefully exit from CL downloading stage (erigontech#10887) (erigontech#11020) Duplicating erigontech#10887 Co-authored-by: awskii <[email protected]> * Less troublesome way of identifying content-type (erigontech#10770) (erigontech#11018) Co-authored-by: Giulio rebuffo <[email protected]> * Diagnostics: loglevel (erigontech#11015) Changed log level * dl: additional pre-check for having info (erigontech#11012) cherry-pick of erigontech#10853 * Diagnostics: Optimize db write (erigontech#11016) Fix for erigontech#10932 * qa-tests: add Tip-Tracking test for Gnosis (erigontech#11053) This add a Tip-Tracking test on Erigon v2 for Gnosis chain/network * params: version 2.60.3 (erigontech#11069) * Fix issues for post-london hardforks * Fix unit test * Add dynamic gas fee tx to CI for post-london * Fix kurtosis in CI * Disable blob opcodes and point evaluation precompile (#1147) * Disable blob tx (#1150) * Avoid log padding when normalcy is enabled * Bump kurtosis version * Remove auto claim * update with feat/zero branch zero.go file (#1109) Co-authored-by: Jerry <[email protected]> * Fix stage_batches bug * Fix unwind ci * Fix RPC doc check ci * Fix unwind ci build --------- Signed-off-by: fuyangpengqi <[email protected]> Signed-off-by: jsvisa <[email protected]> Signed-off-by: luchenhan <[email protected]> Co-authored-by: Alex Sharov <[email protected]> Co-authored-by: Giulio rebuffo <[email protected]> Co-authored-by: kewei <[email protected]> Co-authored-by: Willian Mitsuda <[email protected]> Co-authored-by: Shoham Chakraborty <[email protected]> Co-authored-by: Somnath <[email protected]> Co-authored-by: Dmytro <[email protected]> Co-authored-by: Mark Holt <[email protected]> Co-authored-by: awskii <[email protected]> Co-authored-by: Mark Holt <[email protected]> Co-authored-by: Stuart Corring <[email protected]> Co-authored-by: fuyangpengqi <[email protected]> Co-authored-by: milen <[email protected]> Co-authored-by: goofylfg <[email protected]> Co-authored-by: sealer3 <[email protected]> Co-authored-by: mcfx <[email protected]> Co-authored-by: canepat <[email protected]> Co-authored-by: Andrew Ashikhmin <[email protected]> Co-authored-by: persmor <[email protected]> Co-authored-by: galois <[email protected]> Co-authored-by: adytzu2007 <[email protected]> Co-authored-by: battlmonstr <[email protected]> Co-authored-by: carehabit <[email protected]> Co-authored-by: Delweng <[email protected]> Co-authored-by: Jonathan Otto <[email protected]> Co-authored-by: Daniel Gimenez <[email protected]> Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: luchenhan <[email protected]> Co-authored-by: Michelangelo Riccobene <[email protected]> Co-authored-by: Marcello Ardizzone <[email protected]> Co-authored-by: Anshal Shukla <[email protected]> Co-authored-by: mars <[email protected]> Co-authored-by: awskii <[email protected]> Co-authored-by: Rachit Sonthalia <[email protected]> Co-authored-by: Goran Rojovic <[email protected]> Co-authored-by: Minhyuk Kim <[email protected]> Co-authored-by: Igor Mandrigin <[email protected]> Co-authored-by: Angus Scott <[email protected]> Co-authored-by: VBulikov <[email protected]> Co-authored-by: Arpit Temani <[email protected]> Co-authored-by: Scott Fairclough <[email protected]>
This PR updates the bls contracts from our internal implementation which is an unmaintained fork of the kilic library to the gnark-crypto library that is actively maintained by consensys.
It also updates our fork of kilic to the latest (unmaintained) version.
For comparison: ECRecover on this laptop averages 48 mgas/s, the KZG precompile averages 40mgas/s.
To discuss: it might make sense to just get rid of our vendored fork of kilic imo