go-ethereum/core/state
Arran Schlosberg dc7e27aff4
feat: types.HeaderHooks for RLP overrides (#89)
## Why this should be merged

The `types.Header` fields of both
[`coreth`](https://pkg.go.dev/github.com/ava-labs/coreth/core/types#Header)
and
[`subnet-evm`](https://pkg.go.dev/github.com/ava-labs/subnet-evm/core/types#Header)
have been modified such that their RLP encodings (i.e. block hashes)
aren't compatible with vanilla `geth` nor each other. This PR adds
support for arbitrary RLP encoding coupled with type-safe extra
payloads.

## How this works

Equivalent to #1 (`params`) and #44 (`types.StateAccount`) registration
of pseudo-generic payloads. The only major difference is the guarantee
of a non-nil payload pointer, which means that the payload hooks are
never called on nil pointers as this would make it difficult to decode
RLP into them.

## How this was tested

Round-trip RLP {en,de}coding via a registered stub hook.

---------

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
2024-12-17 13:54:58 +00:00
..
pruner [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
snapshot feat: state.SnapshotTree interface for drop-in replacement (#77) 2024-11-26 17:22:13 +00:00
access_list.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
database.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
dump.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
iterator.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
iterator_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
journal.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
metrics.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state.libevm.go feat: types.HeaderHooks for RLP overrides (#89) 2024-12-17 13:54:58 +00:00
state.libevm_test.go feat: types.HeaderHooks for RLP overrides (#89) 2024-12-17 13:54:58 +00:00
state_object.go fix: state.stateObject.empty() with extra payload (#62) 2024-10-28 11:34:19 -07:00
state_object.libevm_test.go feat: types.HeaderHooks for RLP overrides (#89) 2024-12-17 13:54:58 +00:00
state_object_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
statedb.go feat: state.SnapshotTree interface for drop-in replacement (#77) 2024-11-26 17:22:13 +00:00
statedb.libevm.go feat: state.SnapshotTree interface for drop-in replacement (#77) 2024-11-26 17:22:13 +00:00
statedb.libevm_test.go feat: state.SnapshotTree interface for drop-in replacement (#77) 2024-11-26 17:22:13 +00:00
statedb_fuzz_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
statedb_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sync.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sync_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
transient_storage.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
trie_prefetcher.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher.libevm.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher.libevm_test.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00