-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(proto): create v2 execution API #1962
Conversation
astria.primitive.v1.RollupId rollup_id = 1; | ||
// The first block height on the sequencer chain to use for rollup transactions. | ||
// This is mapped to `rollup_first_block_number`. | ||
uint32 sequencer_first_block_height = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we did away with sequencer_start_block_height
in favor of sequencer_start_height
before, but somehow sequencer_first_height
feels like it carries less information than sequencer_first_block_height
to me. Happy to change, though
…length, make uint32s uint64s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some notes for discussion on the need for rollup_halt_at_stop_number
.
Going down this rabbit hole - I wonder if we can avoid setting rollup_stop_block_number
entirely in favor of using gRPC error codes?
For example, OUT_OF_RANGE
or RESOURCE_EXHAUSTED
might be valid error codes that can trigger conductor to re-fetch the genesis and/or commitment states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but noting there is one extra file here were we should delete.
Either as a part of this PR or as follow up can we get a execution api v2 spec doc?
proto/executionapis/astria/execution/v2/get_commitment_state_request.proto
Outdated
Show resolved
Hide resolved
Noting that I have made a followup issue here for the spec: #1986. Prefer to get this landed ASAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good overall.
I only have a bunch of naming and field ordering requests (important to get this right because future changes would be breaking).
// Celestia blobs). | ||
string celestia_chain_id = 6; | ||
// The allowed variance in celestia for sequencer blocks to have been posted. | ||
uint64 celestia_block_variance = 7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joroshiba I think we should define a fixed variance here and not perform a calculation inside conductor. Right now it's 6x this value, but I don't see a reason to not just set it here without extra conductor shenanigans.
Co-authored-by: Superfluffy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some thoughts on the block fields in CommitmentState
. I think we should define bespoke SoftRollupBlock
and FirmRollupBlock
(or alternatively, SoftCommitmentState
and FirmCommitmentState
, which we will populate from the executed RollupBlock
conductor side).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments on the response types of the RPCs. We are sometimes relatively strict about naming these things (for example in the auctioneer protos), but here we are loser.
Should we enforce a *Request -> *Response
convention everywhere (where for example GetBlock
responds with a GetBlockResponse { rollup_block: RollupBlock }
(so that the block is just a field of the response)?
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_service.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/rollup_block_identifier.proto
Outdated
Show resolved
Hide resolved
proto/executionapis/astria/execution/v2/execution_session_parameters.proto
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to fix the type of the ExecuteBlock.prev_block_hash
request to match the ExecutedBlockMetadata
.
Summary
Creates v2 execution API to support upcoming v2 changes to Conductor and Geth.
Background
These changes are meant to support the upcoming v2 upgrades to Conductor and astria-geth, which will facilitate the ability to have rollup forks, driven by the need to migrate Forma to Mainnet.
Changes from
v1
GenesisInfo
and associated RPC.BatchGetBlocks
RPC and associated types.GetCommitmentState
RPC.ExecutionSession
and associated RPCCreateExecutionSession
:ExecutionSession
is the execution client-side's current session, which starts at a specific block number and can end at one as well.CreateExecutionSession
should be called, to which the server should respond with the current session, containing an ID for the session, theCommitmentState
, andExecutionSessionParams
.ExecutionSessionParams
, which contains the necessary configuration for the execution client to run for the entirety of the session, consisting of the following:rollup_id
rollup_start_block_number
, the first block to be executed against the rolluprollup_end_block_number
, the final block to be executed against the rollup before ending the current execution session.sequencer_chain_id
sequencer_start_block_height
, the sequencer height to map torollup_start_block_number
.celestia_chain_id
celestia_max_search_height_look_ahead
(formerlycelestia_block_variance
)session_id
toExecuteBlockRequest
andUpdateCommitmentStateRequest
, so that the server can validate the calls are for the correct execution session.Block
toExecutedBlockMetadata
and made corresponding service changes.ExecuteBlockResponse
to follow AIP.CommitmentState.base_celestia_height
tolowest_celestia_search_height
Testing
No testing needed.
Changelogs
Protos have no changelog