You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9e135ce
Browse filesBrowse the repository at this point in the historyBrowse files
feat(autobahn): store epoch state rows in the EVM-only app (#4752)
## Summary
Adds the storage side for committing consensus epoch data with an
Autobahn EVM-only block. Consensus will pass two opaque byte values at
the first block of each epoch:
- `epoch_registry`: the consensus registry snapshot.
- `next_epoch`: the canonical `Epoch` bytes for the next epoch, copied
out for dynasty proof construction.
This PR adds:
- `abci.RequestFinalizeBlock.EpochState`, an optional
`abci.EpochState{EpochRegistry, NextEpoch []byte}`.
`RequestFinalizeBlock` is a plain Go struct, so this is not an ABCI
protocol change, and apps that do not commit epoch state ignore the
field.
- The EVM-only app writes copies of both values under the `autobahn`
misc module through the existing block change-set encoder, the same path
as the block cursor. The app does not decode them. An empty value is
committed as an empty row, not a delete. A block finalized without epoch
state writes no `autobahn` rows, and the state applies only to the block
it is passed with.
Nothing sets the field yet, so this PR writes no new rows and does not
change the AppHash. Since #4725, blocks execute in `execution.Executor`,
which does not read epoch state. Producing the two values and setting
the field in the executor is a consensus change, planned together with
populating `epoch_registry`.
State sync restore (the seed step of PR 5) depends on that change. It
needs `epoch_registry`: `next_epoch` holds only the next committee, and
each epoch overwrites it, so it does not give the current committee that
verifies the seed QC.
## Test Plan
- `internal/evmonlyapp/app_test.go`:
- both values are committed unchanged under `autobahn`;
- an empty `EpochRegistry` is committed as an empty row;
- a block without epoch state writes no `autobahn` rows, and epoch state
does not carry over to the next block;
- changing the request bytes after `FinalizeBlock` returns does not
change the committed row.
- `make fmtcheck`
- `go build ./...`
- `scripts/ramtest.sh -race ./sei-tendermint/abci/...
./sei-tendermint/internal/evmonlyapp/...
./sei-tendermint/internal/proxy/...
./sei-tendermint/internal/autobahn/execution/...`
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments