go-ethereum/libevm/stateconf
Arran Schlosberg 3a754099bf
feat: state.SnapshotTree interface for drop-in replacement (#77)
## Why this should be merged

Allows for a drop-in replacement of `snapshot.Tree` (i.e. one that uses
block hashes instead of state roots). This is intended as a temporary
solution while we investigate having the state root affected by the
block hash to remove path ambiguity.

## How this works

Introduction of:
1. `state.SnapshotTree` interface to match methods required on
`snapshot.Tree` as used by `state.StateDB`; and
2. `stateconf` package for variadic options plumbed by
`StateDB.Commit()` through to `SnapshotTree.Update()`.

Although variadic (to maintain function call-signature compatibility)
only the `stateconf.WithUpdatePayload(any)` is expected to be used.
Recipients of the options can access the payload with
`stateconf.ExtractUpdatePayload()`.

## How this was tested

Unit test demonstrating propagation of `stateconf.UpdateOption` payload.
2024-11-26 17:22:13 +00:00
..
conf.go feat: state.SnapshotTree interface for drop-in replacement (#77) 2024-11-26 17:22:13 +00:00