Skip to content

Commit

Permalink
naming updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Feb 25, 2025
1 parent 0c2992d commit 738199a
Show file tree
Hide file tree
Showing 14 changed files with 655 additions and 524 deletions.
246 changes: 140 additions & 106 deletions crates/astria-core/src/generated/astria.execution.v2.rs

Large diffs are not rendered by default.

801 changes: 444 additions & 357 deletions crates/astria-core/src/generated/astria.execution.v2.serde.rs

Large diffs are not rendered by default.

25 changes: 10 additions & 15 deletions proto/executionapis/astria/execution/v2/commitment_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = 'proto3';

package astria.execution.v2;

import "astria/execution/v2/rollup_block.proto";
import "astria/execution/v2/executed_block_metadata.proto";

// The CommitmentState holds the block at each stage of sequencer commitment
// level
Expand All @@ -13,19 +13,14 @@ import "astria/execution/v2/rollup_block.proto";
// - The chain defined by soft is the head of the canonical chain the firm block
// must belong to.
message CommitmentState {
// A soft committed rollup block is derived directly from an Astria sequencer
// block.
RollupBlock soft = 1;
// A firm committed rollup block is derived from a Sequencer block that has been
// Soft committed block metadata derived directly from an Astria sequencer block.
ExecutedBlockMetadata soft_executed_block_metadata = 1;
// Firm committed block metadata derived from a Sequencer block that has been
// written to the data availability layer (Celestia).
RollupBlock firm = 2;
// The Celestia height at which the last firm block was written. This is used
// as the starting point to search for the next firm block. If no firm blocks
// have been fetched from Celestia yet, this is the first Celestia height that
// will be fetched.
//
// This information is stored as part of the commitment state so that it will
// be routinely updated as new firm blocks are received, and so that the execution
// client will not need to search from Celestia genesis when it starts up.
uint64 celestia_height = 3;
ExecutedBlockMetadata firm_executed_block_metadata = 2;
// The lowest Celestia height that will be searched for the next firm block.
// This information is stored as part of `CommitmentState` so that it will be
// routinely updated as new firm blocks are received, and so that the execution
// client will not need to search from Celestia genesis.
uint64 lowest_celestia_search_height = 3;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = 'proto3';

package astria.execution.v2;

// CreateExecutionSessionRequest is used to create a new execution session on the
// rollup.
message CreateExecutionSessionRequest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = 'proto3';

package astria.execution.v2;

import "astria/execution/v2/executed_block_metadata.proto";

// ExecuteBlockResponse is the response type for the ExecuteBlock RPC. It contains
// the metadata of the block which was executed against the rollup.
message ExecuteBlockResponse {
ExecutedBlockMetadata executed_block_metadata = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = 'proto3';

package astria.execution.v2;

// Identifiers to select a rollup block by.
message ExecutedBlockIdentifier {
oneof identifier {
// Identifier by block number, corresponding to `ExecutedBlockMetadata.number`.
uint64 number = 1;
// Identifier by block hash, corresponding to `ExecutedBlockMetadata.hash`.
string hash = 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import "google/protobuf/timestamp.proto";

// The set of information which deterministic driver of block production
// must know about a given rollup Block
message RollupBlock {
message ExecutedBlockMetadata {
// The block number
uint64 number = 1;
// The hash of the block
bytes hash = 2;
// The hash of this block's parent block
bytes parent_hash = 3;
// The hash of the block, formatted in the execution node's preferred encoding.
string hash = 2;
// The hash of this block's parent block, formatted in the execution node's preferred
// encoding.
string parent_hash = 3;
// Timestamp of the block, taken from the sequencer block that this rollup block
// was constructed from.
google.protobuf.Timestamp timestamp = 4;
Expand Down
17 changes: 9 additions & 8 deletions proto/executionapis/astria/execution/v2/execution_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ syntax = 'proto3';
package astria.execution.v2;

import "astria/execution/v2/commitment_state.proto";
import "astria/execution/v2/create_execution_session_request.proto";
import "astria/execution/v2/execute_block_request.proto";
import "astria/execution/v2/execute_block_response.proto";
import "astria/execution/v2/executed_block_metadata.proto";
import "astria/execution/v2/execution_session.proto";
import "astria/execution/v2/get_block_request.proto";
import "astria/execution/v2/new_execution_session_request.proto";
import "astria/execution/v2/rollup_block.proto";
import "astria/execution/v2/get_executed_block_metadata_request.proto";
import "astria/execution/v2/update_commitment_state_request.proto";

// ExecutionService is used to drive deterministic production of blocks.
Expand All @@ -16,16 +17,16 @@ import "astria/execution/v2/update_commitment_state_request.proto";
// Astria Shared Sequencer, and will have block production driven via the Astria
// "Conductor".
service ExecutionService {
// GetSequencerInfo returns the necessary information for mapping sequencer block
// CreateExecutionSession returns the necessary information for mapping sequencer block
// height to rollup block number.
rpc NewExecutionSession(NewExecutionSessionRequest) returns (ExecutionSession);
rpc CreateExecutionSession(CreateExecutionSessionRequest) returns (ExecutionSession);

// GetBlock will return a block given an identifier.
rpc GetBlock(GetBlockRequest) returns (RollupBlock);
// GetExecutedBlockMetadata will return a block given an identifier.
rpc GetExecutedBlockMetadata(GetExecutedBlockMetadataRequest) returns (ExecutedBlockMetadata);

// ExecuteBlock is called to deterministically derive a rollup block from
// filtered sequencer block information.
rpc ExecuteBlock(ExecuteBlockRequest) returns (RollupBlock);
rpc ExecuteBlock(ExecuteBlockRequest) returns (ExecuteBlockResponse);

// UpdateCommitmentState replaces the whole CommitmentState with a new
// CommitmentState.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message ExecutionSession {
// An ID for the session.
string session_id = 1;
// The configuration for the execution session.
ExecutionSessionParameters execution_config = 2;
ExecutionSessionParameters execution_session_parameters = 2;
// The commitment state for executing client to start from.
CommitmentState commitment_state = 3;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ message ExecutionSessionParameters {
// connected to have this chain ID (if extracting firm Sequencer blocks from
// Celestia blobs).
string celestia_chain_id = 6;
// The allowed variance in celestia for sequencer blocks to have been posted.
uint64 celestia_block_variance = 7;
// The maximum number of Celestia blocks which can be read above
// `CommitmentState.lowest_celestia_search_height` in search of the next firm
// block.
uint64 celestia_search_height_max_look_ahead = 7;
}
10 changes: 0 additions & 10 deletions proto/executionapis/astria/execution/v2/get_block_request.proto

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = 'proto3';

package astria.execution.v2;

import "astria/execution/v2/executed_block_identifier.proto";

// Used in GetExecutedBlockMetadata to find a single block.
message GetExecutedBlockMetadataRequest {
ExecutedBlockIdentifier identifier = 1;
}

This file was deleted.

This file was deleted.

0 comments on commit 738199a

Please sign in to comment.