Skip to content

Commit

Permalink
proto changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-mena committed Apr 15, 2022
1 parent 6c1e6d1 commit e73f017
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
2 changes: 2 additions & 0 deletions proto/tendermint/blocksync/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package tendermint.blocksync;
option go_package = "github.com/tendermint/tendermint/proto/tendermint/blocksync";

import "tendermint/types/block.proto";
import "tendermint/types/types.proto";

// BlockRequest requests a block for a specific height
message BlockRequest {
Expand All @@ -19,6 +20,7 @@ message NoBlockResponse {
// BlockResponse returns block to the requested
message BlockResponse {
tendermint.types.Block block = 1;
tendermint.types.ExtendedCommit ext_commit = 2;
}

// StatusRequest requests the status of a peer.
Expand Down
18 changes: 18 additions & 0 deletions proto/tendermint/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,24 @@ message CommitSig {
bytes signature = 4;
}

message ExtendedCommit {
int64 height = 1;
int32 round = 2;
BlockID block_id = 3
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false];
}

message ExtendedCommitSig {
BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
bytes vote_extension = 5;
bytes extension_signature = 6;
}

message Proposal {
SignedMsgType type = 1;
int64 height = 2;
Expand Down
39 changes: 24 additions & 15 deletions proto/tendermint/types/types.proto.intermediate
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,12 @@ message Vote {
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
bytes signature = 8;
VoteExtension vote_extension = 9;
}

// VoteExtension is app-defined additional information to the validator votes.
message VoteExtension {
bytes app_data_to_sign = 1;
bytes app_data_self_authenticating = 2;
}

// VoteExtensionToSign is a subset of VoteExtension that is signed by the validators private key.
// VoteExtensionToSign is extracted from an existing VoteExtension.
message VoteExtensionToSign {
bytes app_data_to_sign = 1;
// Signature by the validator if they participated in consensus for the associated block.
bytes signature = 8;
// Vote extension provided by the application. Only valid for precommit messages.
bytes extension = 9;
// Signature by the validator if they participated in consensus for the associated block.
bytes extension_signature = 10;
}

// Commit contains the evidence that a block was committed by a set of
Expand All @@ -150,7 +142,24 @@ message CommitSig {
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
VoteExtensionToSign vote_extension = 5;
}

message ExtendedCommit {
int64 height = 1;
int32 round = 2;
BlockID block_id = 3
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false];
}

message ExtendedCommitSig {
BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
bytes vote_extension = 5;
bytes extension_signature = 6;
}

message Proposal {
Expand Down

0 comments on commit e73f017

Please sign in to comment.