feat!: Comet v0.38 Integration (#15519)

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Aleksandr Bezobchuk
2023-05-24 16:09:19 +00:00
committed by GitHub
co-authored by marbar3778 cool-developer Aaron Craelius Matt Kocubinski Julien Robert
parent 166be3766b
commit 6cee22df52
148 changed files with 14747 additions and 15262 deletions
+1 -1
View File
@@ -12,4 +12,4 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 75b4300737fb4efca0831636be94e517
commit: 5ae7f88519b04fe1965da0f8a375a088
+6 -2
View File
@@ -27,7 +27,10 @@ message TxResponse {
// non-deterministic.
string raw_log = 6;
// The output of the application's logger (typed). May be non-deterministic.
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false];
repeated ABCIMessageLog logs = 7 [
(gogoproto.castrepeated) = "ABCIMessageLogs",
(gogoproto.nullable) = false
];
// Additional information. May be non-deterministic.
string info = 8;
// Amount of gas requested for transaction.
@@ -58,7 +61,8 @@ message ABCIMessageLog {
// Events contains a slice of Event objects that were emitted during some
// execution.
repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
repeated StringEvent events = 3
[(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
}
// StringEvent defines en Event object wrapper where all the attributes
+6 -30
View File
@@ -7,34 +7,14 @@ import "cosmos/store/v1beta1/listening.proto";
option go_package = "cosmossdk.io/store/streaming/abci";
// ListenBeginBlockRequest is the request type for the ListenBeginBlock RPC method
message ListenBeginBlockRequest {
tendermint.abci.RequestBeginBlock req = 1;
tendermint.abci.ResponseBeginBlock res = 2;
}
// ListenBeginBlockResponse is the response type for the ListenBeginBlock RPC method
message ListenBeginBlockResponse {}
// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method
message ListenEndBlockRequest {
tendermint.abci.RequestEndBlock req = 1;
tendermint.abci.ResponseEndBlock res = 2;
message ListenFinalizeBlockRequest {
tendermint.abci.RequestFinalizeBlock req = 1;
tendermint.abci.ResponseFinalizeBlock res = 2;
}
// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method
message ListenEndBlockResponse {}
// ListenDeliverTxRequest is the request type for the ListenDeliverTx RPC method
message ListenDeliverTxRequest {
// explicitly pass in block height as neither RequestDeliverTx or ResponseDeliverTx contain it
int64 block_height = 1;
tendermint.abci.RequestDeliverTx req = 2;
tendermint.abci.ResponseDeliverTx res = 3;
}
// ListenDeliverTxResponse is the response type for the ListenDeliverTx RPC method
message ListenDeliverTxResponse {}
message ListenFinalizeBlockResponse {}
// ListenCommitRequest is the request type for the ListenCommit RPC method
message ListenCommitRequest {
@@ -49,12 +29,8 @@ message ListenCommitResponse {}
// ABCIListenerService is the service for the BaseApp ABCIListener interface
service ABCIListenerService {
// ListenBeginBlock is the corresponding endpoint for ABCIListener.ListenBeginBlock
rpc ListenBeginBlock(ListenBeginBlockRequest) returns (ListenBeginBlockResponse);
// ListenEndBlock is the corresponding endpoint for ABCIListener.ListenEndBlock
rpc ListenEndBlock(ListenEndBlockRequest) returns (ListenEndBlockResponse);
// ListenDeliverTx is the corresponding endpoint for ABCIListener.ListenDeliverTx
rpc ListenDeliverTx(ListenDeliverTxRequest) returns (ListenDeliverTxResponse);
// ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock
rpc ListenFinalizeBlock(ListenFinalizeBlockRequest) returns (ListenFinalizeBlockResponse);
// ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit
rpc ListenCommit(ListenCommitRequest) returns (ListenCommitResponse);
}
+7 -13
View File
@@ -11,8 +11,8 @@ option go_package = "cosmossdk.io/store/types";
//
// Since: cosmos-sdk 0.43
message StoreKVPair {
string store_key = 1; // the store key for the KVStore this pair originates from
bool delete = 2; // true indicates a delete operation, false indicates a set operation
string store_key = 1; // the store key for the KVStore this pair originates from
bool delete = 2; // true indicates a delete operation, false indicates a set operation
bytes key = 3;
bytes value = 4;
}
@@ -20,15 +20,9 @@ message StoreKVPair {
// BlockMetadata contains all the abci event data of a block
// the file streamer dump them into files together with the state changes.
message BlockMetadata {
// DeliverTx encapulate deliver tx request and response.
message DeliverTx {
tendermint.abci.RequestDeliverTx request = 1;
tendermint.abci.ResponseDeliverTx response = 2;
}
tendermint.abci.RequestBeginBlock request_begin_block = 1;
tendermint.abci.ResponseBeginBlock response_begin_block = 2;
repeated DeliverTx deliver_txs = 3;
tendermint.abci.RequestEndBlock request_end_block = 4;
tendermint.abci.ResponseEndBlock response_end_block = 5;
tendermint.abci.ResponseCommit response_commit = 6;
tendermint.abci.ResponseCommit response_commit = 6;
tendermint.abci.RequestFinalizeBlock request_finalize_block = 7;
tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; // TODO: should we renumber this?
reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37
}
+163 -121
View File
@@ -6,39 +6,59 @@ option go_package = "github.com/cometbft/cometbft/abci/types";
// For more information on gogo.proto, see:
// https://github.com/cosmos/gogoproto/blob/master/extensions.md
import "tendermint/crypto/proof.proto";
import "tendermint/types/types.proto";
import "tendermint/crypto/keys.proto";
import "tendermint/types/params.proto";
import "tendermint/types/validator.proto";
import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto";
// This file is copied from http://github.com/tendermint/abci
// NOTE: When using custom types, mind the warnings.
// https://github.com/cosmos/gogoproto/blob/master/custom_types.md#warnings-and-issues
service ABCI {
rpc Echo(RequestEcho) returns (ResponseEcho);
rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo);
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
rpc Query(RequestQuery) returns (ResponseQuery);
rpc Commit(RequestCommit) returns (ResponseCommit);
rpc InitChain(RequestInitChain) returns (ResponseInitChain);
rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
rpc LoadSnapshotChunk(RequestLoadSnapshotChunk)
returns (ResponseLoadSnapshotChunk);
rpc ApplySnapshotChunk(RequestApplySnapshotChunk)
returns (ResponseApplySnapshotChunk);
rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal);
rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote);
rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension);
rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock);
}
//----------------------------------------
// Request types
message Request {
oneof value {
RequestEcho echo = 1;
RequestFlush flush = 2;
RequestInfo info = 3;
RequestInitChain init_chain = 5;
RequestQuery query = 6;
RequestBeginBlock begin_block = 7;
RequestCheckTx check_tx = 8;
RequestDeliverTx deliver_tx = 9;
RequestEndBlock end_block = 10;
RequestCommit commit = 11;
RequestListSnapshots list_snapshots = 12;
RequestOfferSnapshot offer_snapshot = 13;
RequestLoadSnapshotChunk load_snapshot_chunk = 14;
RequestApplySnapshotChunk apply_snapshot_chunk = 15;
RequestPrepareProposal prepare_proposal = 16;
RequestProcessProposal process_proposal = 17;
RequestEcho echo = 1;
RequestFlush flush = 2;
RequestInfo info = 3;
RequestInitChain init_chain = 5;
RequestQuery query = 6;
RequestCheckTx check_tx = 8;
RequestCommit commit = 11;
RequestListSnapshots list_snapshots = 12;
RequestOfferSnapshot offer_snapshot = 13;
RequestLoadSnapshotChunk load_snapshot_chunk = 14;
RequestApplySnapshotChunk apply_snapshot_chunk = 15;
RequestPrepareProposal prepare_proposal = 16;
RequestProcessProposal process_proposal = 17;
RequestExtendVote extend_vote = 18;
RequestVerifyVoteExtension verify_vote_extension = 19;
RequestFinalizeBlock finalize_block = 20;
}
reserved 4;
reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock
}
message RequestEcho {
@@ -71,13 +91,6 @@ message RequestQuery {
bool prove = 4;
}
message RequestBeginBlock {
bytes hash = 1;
tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false];
repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false];
}
enum CheckTxType {
NEW = 0 [(gogoproto.enumvalue_customname) = "New"];
RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"];
@@ -88,14 +101,6 @@ message RequestCheckTx {
CheckTxType type = 2;
}
message RequestDeliverTx {
bytes tx = 1;
}
message RequestEndBlock {
int64 height = 1;
}
message RequestCommit {}
// lists available snapshots
@@ -149,30 +154,61 @@ message RequestProcessProposal {
bytes proposer_address = 8;
}
// Extends a vote with application-injected data
message RequestExtendVote {
// the hash of the block that this vote may be referring to
bytes hash = 1;
// the height of the extended vote
int64 height = 2;
}
// Verify the vote extension
message RequestVerifyVoteExtension {
// the hash of the block that this received vote corresponds to
bytes hash = 1;
// the validator that signed the vote extension
bytes validator_address = 2;
int64 height = 3;
bytes vote_extension = 4;
}
message RequestFinalizeBlock {
repeated bytes txs = 1;
CommitInfo decided_last_commit = 2 [(gogoproto.nullable) = false];
repeated Misbehavior misbehavior = 3 [(gogoproto.nullable) = false];
// hash is the merkle root hash of the fields of the decided block.
bytes hash = 4;
int64 height = 5;
google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes next_validators_hash = 7;
// proposer_address is the address of the public key of the original proposer of the block.
bytes proposer_address = 8;
}
//----------------------------------------
// Response types
message Response {
oneof value {
ResponseException exception = 1;
ResponseEcho echo = 2;
ResponseFlush flush = 3;
ResponseInfo info = 4;
ResponseInitChain init_chain = 6;
ResponseQuery query = 7;
ResponseBeginBlock begin_block = 8;
ResponseCheckTx check_tx = 9;
ResponseDeliverTx deliver_tx = 10;
ResponseEndBlock end_block = 11;
ResponseCommit commit = 12;
ResponseListSnapshots list_snapshots = 13;
ResponseOfferSnapshot offer_snapshot = 14;
ResponseLoadSnapshotChunk load_snapshot_chunk = 15;
ResponseApplySnapshotChunk apply_snapshot_chunk = 16;
ResponsePrepareProposal prepare_proposal = 17;
ResponseProcessProposal process_proposal = 18;
ResponseException exception = 1;
ResponseEcho echo = 2;
ResponseFlush flush = 3;
ResponseInfo info = 4;
ResponseInitChain init_chain = 6;
ResponseQuery query = 7;
ResponseCheckTx check_tx = 9;
ResponseCommit commit = 12;
ResponseListSnapshots list_snapshots = 13;
ResponseOfferSnapshot offer_snapshot = 14;
ResponseLoadSnapshotChunk load_snapshot_chunk = 15;
ResponseApplySnapshotChunk apply_snapshot_chunk = 16;
ResponsePrepareProposal prepare_proposal = 17;
ResponseProcessProposal process_proposal = 18;
ResponseExtendVote extend_vote = 19;
ResponseVerifyVoteExtension verify_vote_extension = 20;
ResponseFinalizeBlock finalize_block = 21;
}
reserved 5;
reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock
}
// nondeterministic
@@ -215,11 +251,6 @@ message ResponseQuery {
string codespace = 10;
}
message ResponseBeginBlock {
repeated Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCheckTx {
uint32 code = 1;
bytes data = 2;
@@ -230,38 +261,15 @@ message ResponseCheckTx {
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
string sender = 9;
int64 priority = 10;
// mempool_error is set by CometBFT.
// ABCI applictions creating a ResponseCheckTX should not set mempool_error.
string mempool_error = 11;
}
message ResponseDeliverTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "events,omitempty"
]; // nondeterministic
string codespace = 8;
}
message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
tendermint.types.ConsensusParams consensus_param_updates = 2;
repeated Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
// These reserved fields were used until v0.37 by the priority mempool (now
// removed).
reserved 9 to 11;
reserved "sender", "priority", "mempool_error";
}
message ResponseCommit {
// reserve 1
bytes data = 2;
reserved 1, 2; // data was previously returned here
int64 retain_height = 3;
}
@@ -315,6 +323,40 @@ message ResponseProcessProposal {
}
}
message ResponseExtendVote {
bytes vote_extension = 1;
}
message ResponseVerifyVoteExtension {
VerifyStatus status = 1;
enum VerifyStatus {
UNKNOWN = 0;
ACCEPT = 1;
// Rejecting the vote extension will reject the entire precommit by the sender.
// Incorrectly implementing this thus has liveness implications as it may affect
// CometBFT's ability to receive 2/3+ valid votes to finalize the block.
// Honest nodes should never be rejected.
REJECT = 2;
}
}
message ResponseFinalizeBlock {
// set of block events emmitted as part of executing the block
repeated Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
// the result of executing each transaction including the events
// the particular transction emitted. This should match the order
// of the transactions delivered in the block itself
repeated ExecTxResult tx_results = 2;
// a list of updates to the validator set. These will reflect the validator set at current height + 2.
repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false];
// updates to the consensus params, if any.
tendermint.types.ConsensusParams consensus_param_updates = 4;
// app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was deterministic. It is up to the application to decide which algorithm to use.
bytes app_hash = 5;
}
//----------------------------------------
// Misc.
@@ -323,6 +365,9 @@ message CommitInfo {
repeated VoteInfo votes = 2 [(gogoproto.nullable) = false];
}
// ExtendedCommitInfo is similar to CommitInfo except that it is only used in
// the PrepareProposal request such that CometBFT can provide vote extensions
// to the application.
message ExtendedCommitInfo {
// The round at which the block proposer decided in the previous height.
int32 round = 1;
@@ -332,7 +377,7 @@ message ExtendedCommitInfo {
}
// Event allows application developers to attach additional information to
// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
// ResponseFinalizeBlock and ResponseCheckTx.
// Later, transactions may be queried using these events.
message Event {
string type = 1;
@@ -349,42 +394,63 @@ message EventAttribute {
bool index = 3; // nondeterministic
}
// ExecTxResult contains results of executing one individual transaction.
//
// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted
message ExecTxResult {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
string codespace = 8;
}
// TxResult contains results of executing the transaction.
//
// One usage is indexing transaction results.
message TxResult {
int64 height = 1;
uint32 index = 2;
bytes tx = 3;
ResponseDeliverTx result = 4 [(gogoproto.nullable) = false];
int64 height = 1;
uint32 index = 2;
bytes tx = 3;
ExecTxResult result = 4 [(gogoproto.nullable) = false];
}
//----------------------------------------
// Blockchain Types
// Validator
message Validator {
bytes address = 1; // The first 20 bytes of SHA256(public key)
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3; // The voting power
}
// ValidatorUpdate
message ValidatorUpdate {
tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
int64 power = 2;
}
// VoteInfo
message VoteInfo {
Validator validator = 1 [(gogoproto.nullable) = false];
bool signed_last_block = 2;
tendermint.types.BlockIDFlag block_id_flag = 3;
reserved 2; // signed_last_block
}
message ExtendedVoteInfo {
Validator validator = 1 [(gogoproto.nullable) = false];
bool signed_last_block = 2;
bytes vote_extension = 3; // Reserved for future use
// The validator that sent the vote.
Validator validator = 1 [(gogoproto.nullable) = false];
// Non-deterministic extension provided by the sending validator's application.
bytes vote_extension = 3;
// Vote extension signature created by CometBFT
bytes extension_signature = 4;
// block_id_flag indicates whether the validator voted for a block, nil, or did not vote at all
tendermint.types.BlockIDFlag block_id_flag = 5;
reserved 2; // signed_last_block
}
enum MisbehaviorType {
@@ -418,27 +484,3 @@ message Snapshot {
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
bytes metadata = 5; // Arbitrary application metadata
}
//----------------------------------------
// Service Definition
service ABCIApplication {
rpc Echo(RequestEcho) returns (ResponseEcho);
rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo);
rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
rpc Query(RequestQuery) returns (ResponseQuery);
rpc Commit(RequestCommit) returns (ResponseCommit);
rpc InitChain(RequestInitChain) returns (ResponseInitChain);
rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);
rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
rpc LoadSnapshotChunk(RequestLoadSnapshotChunk)
returns (ResponseLoadSnapshotChunk);
rpc ApplySnapshotChunk(RequestApplySnapshotChunk)
returns (ResponseApplySnapshotChunk);
rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal);
}
+16 -1
View File
@@ -15,6 +15,7 @@ message ConsensusParams {
EvidenceParams evidence = 2;
ValidatorParams validator = 3;
VersionParams version = 4;
ABCIParams abci = 5;
}
// BlockParams contains limits on the block size.
@@ -26,7 +27,7 @@ message BlockParams {
// Note: must be greater or equal to -1
int64 max_gas = 2;
reserved 3; // was TimeIotaMs see https://github.com/cometbft/cometbft/pull/5792
reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792
}
// EvidenceParams determine how we handle evidence of malfeasance.
@@ -75,3 +76,17 @@ message HashedParams {
int64 block_max_bytes = 1;
int64 block_max_gas = 2;
}
// ABCIParams configure functionality specific to the Application Blockchain Interface.
message ABCIParams {
// vote_extensions_enable_height configures the first height during which
// vote extensions will be enabled. During this specified height, and for all
// subsequent heights, precommit messages that do not contain valid extension data
// will be considered invalid. Prior to this height, vote extensions will not
// be used or accepted by validators on the network.
//
// Once enabled, vote extensions will be created by the application in ExtendVote,
// passed to the application for validation in VerifyVoteExtension and given
// to the application to use when proposing a block during PrepareProposal.
int64 vote_extensions_enable_height = 1;
}
+37 -16
View File
@@ -9,17 +9,6 @@ import "tendermint/crypto/proof.proto";
import "tendermint/version/types.proto";
import "tendermint/types/validator.proto";
// BlockIdFlag indicates which BlcokID the signature is for
enum BlockIDFlag {
option (gogoproto.goproto_enum_stringer) = true;
option (gogoproto.goproto_enum_prefix) = false;
BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"];
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"];
BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"];
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"];
}
// SignedMsgType is a type of signed message in the consensus.
enum SignedMsgType {
option (gogoproto.goproto_enum_stringer) = true;
@@ -89,7 +78,7 @@ message Data {
repeated bytes txs = 1;
}
// Vote represents a prevote, precommit, or commit vote from validators for
// Vote represents a prevote or precommit vote from validators for
// consensus.
message Vote {
SignedMsgType type = 1;
@@ -101,7 +90,16 @@ message Vote {
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
bytes signature = 8;
// Vote 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;
// Vote extension signature by the validator if they participated in
// consensus for the associated block.
// Only valid for precommit messages.
bytes extension_signature = 10;
}
// Commit contains the evidence that a block was committed by a set of validators.
@@ -114,13 +112,36 @@ message Commit {
// CommitSig is a part of the Vote included in a Commit.
message CommitSig {
BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
tendermint.types.BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
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];
}
// ExtendedCommitSig retains all the same fields as CommitSig but adds vote
// extension-related fields. We use two signatures to ensure backwards compatibility.
// That is the digest of the original signature is still the same in prior versions
message ExtendedCommitSig {
tendermint.types.BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
// Vote extension data
bytes extension = 5;
// Vote extension signature
bytes extension_signature = 6;
}
message Proposal {
SignedMsgType type = 1;
int64 height = 2;
+12
View File
@@ -6,6 +6,18 @@ option go_package = "github.com/cometbft/cometbft/proto/tendermint/types";
import "gogoproto/gogo.proto";
import "tendermint/crypto/keys.proto";
// BlockIdFlag indicates which BlockID the signature is for
enum BlockIDFlag {
option (gogoproto.goproto_enum_stringer) = true;
option (gogoproto.goproto_enum_prefix) = false;
BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received
BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil
}
message ValidatorSet {
repeated Validator validators = 1;
Validator proposer = 2;