Skip to content

Commit

Permalink
Fix evm restart test values, some verbiage changes for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Feb 10, 2025
1 parent 260e24c commit dd16dc3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion crates/astria-conductor/src/executor/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub(super) fn channel(state: State) -> (StateSender, StateReceiver) {
#[derive(Debug, thiserror::Error)]
#[error(
"could not map rollup number to sequencer height for commitment type `{commitment_type}`: the \
operation `{sequencer_start_height} + ({rollup_number} - {rollup_start_block_number}`) \
operation `{sequencer_start_height} + ({rollup_number} - {rollup_start_block_number})` \
failed because `{issue}`"
)]
pub(crate) struct InvalidState {
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core/src/generated/astria.execution.v1.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions dev/values/rollup/evm-restart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ evm-rollup:
addressPrefix: "astria"
# Block height to start syncing rollup from, lowest possible is 2
startHeight: 2
# Block height (on sequencer) to stop syncing rollup at, continuing to next configuration fork
stopHeight: 20
celestia:
# The chain id of the celestia chain
chainId: "celestia-local-0"
Expand All @@ -51,13 +49,14 @@ evm-rollup:
assetPrecision: 9
restart:
height: "19"
halt: true
sequencer:
chainId: "sequencer-test-chain-0"
addressPrefix: "astria"
startHeight: 21
stopHeight: 1000
celestia:
chainId: "celestia-local-0"
startHeight: 21
heightVariance: 10

## These are general configuration values with some recommended defaults

Expand Down
2 changes: 1 addition & 1 deletion proto/executionapis/astria/execution/v1/execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ message GenesisInfo {
uint32 sequencer_start_height = 2;

Check failure on line 17 in proto/executionapis/astria/execution/v1/execution.proto

View workflow job for this annotation

GitHub Actions / proto

Field "2" with name "sequencer_start_height" on message "GenesisInfo" changed option "json_name" from "sequencerGenesisBlockHeight" to "sequencerStartHeight".

Check failure on line 17 in proto/executionapis/astria/execution/v1/execution.proto

View workflow job for this annotation

GitHub Actions / proto

Field "2" on message "GenesisInfo" changed name from "sequencer_genesis_block_height" to "sequencer_start_height".
// The allowed variance in celestia for sequencer blocks to have been posted.
uint64 celestia_block_variance = 4;
// The rollup block number to map to the sequencer start block height.
// The rollup block number to map to the sequencer start block height. Execution will start with the following block number.
uint64 rollup_start_block_number = 5;
// The rollup block number to re-fetch the genesis info and continue executing with new data.
uint64 rollup_stop_block_number = 6;
Expand Down
21 changes: 12 additions & 9 deletions specs/execution-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ behavior upon an unexpected restart. If `geth` receives a `ExecuteBlock` request
before receving *both* `GetGenesisInfo` and `GetCommitmentState` (which will be
the case if the execution layer has restarted), it responds with a `PremissionDenied`
status, prompting the conductor to restart.
2. `GenesisInfo` contains a `sequencer_stop_block_height`, indicating a planned
restart at a given sequencer block height. If the conductor reaches the stop height,
it will perform a restart in one of the following ways corresponding to its mode:
2. `GenesisInfo` contains a `rollup_stop_block_number` and has a `halt_at_rollup_stop_number`
value of `false`, indicating a planned restart after execution of the given block.
Once the conductor reaches the stop height, it will perform a restart in one of the
following ways corresponding to its mode:

- **Firm Only Mode**: Once the stop height is reached for the firm block stream,
the firm block at this height is executed (and commitment state updated) before
Expand Down Expand Up @@ -101,16 +102,18 @@ Note: For our EVM rollup, we map the `CommitmentState` to the `ForkchoiceRule`:
`GetGenesisInfo` returns information which is definitional to the rollup with
regards to how it serves data from the sequencer & celestia networks, along with
optional block heights for initiating a [conductor restart](#restart). This RPC
should **ALWAYS** succeed. The API is agnostic as to how the information is defined
should ***always*** succeed. The API is agnostic as to how the information is defined
in a rollup's genesis, and used by the conductor as configuration on startup *or*
upon a restart.

If the `GenesisInfo` provided by this RPC contains a `sequencer_stop_block_height`,
If the `GenesisInfo` provided by this RPC contains a `rollup_stop_block_number`,
the rollup should be prepared to provide an updated response when the conductor
restarts, including, at minimum, a new `rollup_start_block_height` and `sequencer_start_block_height`.
The updated response can also contain an updated `sequencer_stop_block_height` (if
another restart is desired), `celestia_chain_id`, and/or `sequencer_chain_id` (to
facilitate network migration).
restarts, including, at minimum, a new `rollup_start_block_number` and `sequencer_start_height`.
Note that execution will begin with the block *following* the start number, so
any restarts must provide the same start number as the previous `GenesisInfo`'s
stop number. The updated response can also contain an updated `rollup_stop_block_number`
(if another restart is desired), `celestia_chain_id`, and/or `sequencer_chain_id`
(to facilitate network migration).

### ExecuteBlock

Expand Down

0 comments on commit dd16dc3

Please sign in to comment.