Skip to content
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

[Access] Get protocol snapshot by block id and block height #1401

Merged
20 changes: 20 additions & 0 deletions protobuf/flow/access/access.proto
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@ service AccessAPI {
rpc GetLatestProtocolStateSnapshot(GetLatestProtocolStateSnapshotRequest)
returns (ProtocolStateSnapshotResponse);

// GetProtocolStateSnapshotByBlockID retrieves the latest sealed protocol state
// snapshot by block ID. Used by Flow nodes joining the network to bootstrap a
// space-efficient local state.
rpc GetProtocolStateSnapshotByBlockID(GetProtocolStateSnapshotByBlockIDRequest)
returns (ProtocolStateSnapshotResponse);

// GetProtocolStateSnapshotByHeight retrieves the latest sealed protocol state
// snapshot by block height. Used by Flow nodes joining the network to bootstrap a
// space-efficient local state.
rpc GetProtocolStateSnapshotByHeight(GetProtocolStateSnapshotByHeightRequest)
returns (ProtocolStateSnapshotResponse);

// GetExecutionResultForBlockID returns Execution Result for a given block.
// At present, Access Node might not have execution results for every block
// and as usual, until sealed, this data can change
Expand Down Expand Up @@ -348,6 +360,14 @@ message GetNetworkParametersResponse {

message GetLatestProtocolStateSnapshotRequest {}

message GetProtocolStateSnapshotByBlockIDRequest {
bytes block_id = 1;
}

message GetProtocolStateSnapshotByHeightRequest {
uint64 block_height = 1;
}

message ProtocolStateSnapshotResponse {
bytes serializedSnapshot = 1;
entities.Metadata metadata = 2;
Expand Down
Loading
Loading