feature: non-consensus based block-access-list(EIP-7928)#3413
Conversation
4a8d81c to
094fe8c
Compare
dae1cda to
0201f0e
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements batch update functionality for trie structures and adds support for Block Access Lists (BAL) in the Amsterdam fork. The changes include:
- Parallel batch update methods for tries (Merkle Patricia, Secure, Verkle, and Transition tries)
- Configuration support for BAL feature enablement
- Test fixtures and comprehensive test coverage for BAL functionality
- Minor fixes to comment formatting and API signatures
Reviewed Changes
Copilot reviewed 111 out of 140 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| trie/trie.go | Adds concurrent batch update method with parallelism optimization |
| trie/secure_trie.go | Implements batch update methods for account and storage updates |
| trie/verkle.go | Adds batch update wrappers for Verkle trie operations |
| trie/transition.go | New transition trie implementation with batch update stubs |
| trie/dummy_trie.go | Adds no-op batch update methods to empty trie |
| trie/trie_test.go | Adds comprehensive batch update tests and fixes comment formatting |
| tests/state_test_util.go | Updates SetCode call to include tracing parameter |
| tests/init.go | Adds Amsterdam fork configuration |
| tests/gen_btheader.go | Adds BlockAccessListHash field to block header |
| tests/fixtures-amsterdam-bal/* | Comprehensive test fixtures for BAL validation |
| params/config.go | Adds EnableBAL flag and BAL-related helper methods |
| node/config.go | Removes EnableBAL from node config (moved to chain config) |
| miner/miner.go | Fixes type assertion for pending state |
| internal/web3ext/web3ext.go | Adds debug RPC methods for BAL inspection |
| internal/ethapi/simulate.go | Updates system contract processing signatures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4999094 to
2fce784
Compare
e3dc9f4 to
bcf6d5f
Compare
miner/worker.go
Outdated
| select { | ||
| case block := <-w.resultCh: | ||
| // Short circuit when receiving empty result. | ||
| // Short circuit when receiving empty result/core/types/block.go./core/types/block.go |
There was a problem hiding this comment.
?? result/core/types/block.go./core/types/block.go
miner/worker.go
Outdated
| signer types.Signer | ||
| state *state.StateDB // apply state changes here | ||
| tcount int // count of non-system transactions in cycle | ||
| size uint64 // size of the block we are building |
There was a problem hiding this comment.
It's useless. I'll remove it.
| defer release() | ||
|
|
||
| // upgrade built-in system contract before normal txs if Feynman is not enabled | ||
| systemcontracts.TryUpdateBuildInSystemContract(api.backend.ChainConfig(), block.Number(), parent.Time(), block.Time(), statedb, true) |
There was a problem hiding this comment.
why change this file? it will break these apis
There was a problem hiding this comment.
merge from upstream. I'll restore these files.
79b5159 to
602e68f
Compare
core/vm/jump_table_export.go
Outdated
| ) | ||
|
|
||
| // LookupInstructionSet returns the instruction set for the fork configured by | ||
| // the rules. |
There was a problem hiding this comment.
this file is not right for bsc, skip many hardforks
also not used, so remove it is bettor
core/types/block.go
Outdated
| ) | ||
| _, size, _ := s.Kind() | ||
| if err := s.Decode(&eb); err != nil { | ||
| fmt.Println("error here") |
There was a problem hiding this comment.
'fmt.Println("error here")'
need to be improved
core/types.go
Outdated
|
|
||
| // ValidateState validates the given statedb and optionally the process result. | ||
| ValidateState(block *types.Block, state *state.StateDB, res *ProcessResult, stateless bool) error | ||
| ValidateState(block *types.Block, state *state.StateDB, res *ProcessResult, validateState, stateless bool) error |
There was a problem hiding this comment.
define validateState, but never used
There was a problem hiding this comment.
It was originally used to control whether or not root hash calculations were performed inside the validatorstate, as they were already processed in calcAndVerifyRoot in the parallel state processor.
There was a problem hiding this comment.
But anyway, I'll remove it.
9991315 to
4dbddfd
Compare
7bf5637 to
0d28ae1
Compare
0d28ae1 to
a8bdbb0
Compare
Description
This pr impl no consensus based Block-Access-List(EIP-7928).
Cherry-pick from ethereum/go-ethereum#32263 and using the non-consensus method in BEP-592 #3374
Rationale
Deviations from EIP-7928:
Example
Changes
Notable changes:
*