Skip to content

Commit

Permalink
feat: support 0 height means latest
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Nov 21, 2024
1 parent 46c44b7 commit 6291264
Show file tree
Hide file tree
Showing 5 changed files with 361 additions and 163 deletions.
202 changes: 127 additions & 75 deletions proto/tendermint/rpc/grpc/types.pb.go

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

19 changes: 18 additions & 1 deletion proto/tendermint/rpc/grpc/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,36 @@ message BlockByHashRequest {
}

message BlockByHeightRequest {
// Height the requested block height.
// If height is equal to 0, the latest height stored in the block store
// will be used.
int64 height = 1;
bool prove = 2;
// Prove set to true to return the parts proofs.
bool prove = 2;
}

message BlockMetaByHashRequest {
bytes hash = 1;
}

message BlockMetaByHeightRequest {
// Height the requested block meta height.
// If height is equal to 0, the latest height stored in the block store
// will be used.
int64 height = 1;
}

message CommitRequest {
// Height the requested block commit height.
// If height is equal to 0, the latest height stored in the block store
// will be used.
int64 height = 1;
}

message ValidatorSetRequest {
// Height the requested validator set height.
// If height is equal to 0, the latest height stored in the block store
// will be used.
int64 height = 1;
}

Expand Down Expand Up @@ -94,7 +107,11 @@ message CommitResponse {
}

message ValidatorSetResponse {
// ValidatorSet the requested validator set.
tendermint.types.ValidatorSet validator_set = 1;
// Height the height corresponding to the returned
// validator set.
int64 height = 2;
}

message NewHeightEvent {
Expand Down
Loading

0 comments on commit 6291264

Please sign in to comment.