Skip to content

Commit

Permalink
Merge pull request #1401 from AndriiDiachuk/AndriiDiachuk/4869-get-pr…
Browse files Browse the repository at this point in the history
…otocol-snapshot-from-any-block-endpoint
  • Loading branch information
durkmurder authored Nov 21, 2023
2 parents e9e9314 + c3fb628 commit 8e40789
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 122 deletions.
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

0 comments on commit 8e40789

Please sign in to comment.