mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 21:54:30 +00:00
## Why this should be merged Support for configurable `core/types.Block` with RLP encoding, including interplay with `Body`. ## How this works `Block` doesn't export most of its fields so relies on an internal type, `extblock`, for RLP encoding. This type is modified to implement the `rlp.Encoder` and `Decoder` methods as a point to inject hooks using `rlp.Fields` (as in #120 for `Body`). `Block` shares the same registered extra type as `Body`. Unlike `Header`, which has its own field in a `Block`, the fields in `Body` are promoted to be carried directly. This suggests that (at least for pure data payloads) the modifications might be equivalent (and `ava-labs/coreth` evidences this). Should different payloads be absolutely required in the future, we can split the types—the `RegisterExtras` signature is already too verbose though 😢. ## How this was tested Explicit inclusion of a backwards-compatibility test for `NOOPBlockBodyHooks` + implicit testing via the multiple upstream tests in `block_test.go`. Re implicit testing: default behaviour is now to use the noop hooks even when no registration is performed, but if we change this then the tests in `block_test.go` can still be called as subtests from a test that explicitly registers noops. --------- Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Co-authored-by: Quentin McGaw <quentin.mcgaw@avalabs.org> |
||
|---|---|---|
| .. | ||
| pruner | ||
| snapshot | ||
| access_list.go | ||
| database.go | ||
| dump.go | ||
| iterator.go | ||
| iterator_test.go | ||
| journal.go | ||
| metrics.go | ||
| state.libevm.go | ||
| state.libevm_test.go | ||
| state_object.go | ||
| state_object.libevm_test.go | ||
| state_object_test.go | ||
| state_test.go | ||
| statedb.go | ||
| statedb.libevm.go | ||
| statedb.libevm_test.go | ||
| statedb_fuzz_test.go | ||
| statedb_test.go | ||
| sync.go | ||
| sync_test.go | ||
| transient_storage.go | ||
| trie_prefetcher.go | ||
| trie_prefetcher.libevm.go | ||
| trie_prefetcher.libevm_test.go | ||
| trie_prefetcher_test.go | ||