diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 1900e5cda..6071b1bcc 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -3,6 +3,8 @@ package tendermint.abci; option go_package = "github.com/tendermint/tendermint/abci/types"; +// For more information on gogo.proto, see: +// https://github.com/gogo/protobuf/blob/master/extensions.md import "tendermint/crypto/proof.proto"; import "tendermint/types/types.proto"; import "tendermint/crypto/keys.proto"; @@ -10,14 +12,9 @@ import "tendermint/types/params.proto"; import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; -// This file is a temporary workaround to enable development during the ABCI++ -// project. This file should be deleted and any references to it removed when -// the ongoing work on ABCI++ is completed. -// -// For the duration of ABCI++, this file should be able to build the `abci/types/types.pb.go` -// file. Any changes that update that file must come as a result of a change in -// this .proto file. -// For more information, see https://github.com/tendermint/tendermint/issues/8066 +// This file is copied from http://github.com/tendermint/abci +// NOTE: When using custom types, mind the warnings. +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues //---------------------------------------- // Request types @@ -81,7 +78,6 @@ message RequestBeginBlock { CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; } -} enum CheckTxType { NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; @@ -154,12 +150,16 @@ message RequestProcessProposal { // Extends a vote with application-side injection message RequestExtendVote { - types.Vote vote = 1; + bytes hash = 1; + int64 height = 2; } // Verify the vote extension message RequestVerifyVoteExtension { - types.Vote vote = 1; + bytes hash = 1; + bytes validator_address = 2; + int64 height = 3; + bytes vote_extension = 4; } message RequestFinalizeBlock { @@ -349,9 +349,10 @@ message ResponseProcessProposal { } message ResponseExtendVote { - tendermint.types.VoteExtension vote_extension = 1; + bytes vote_extension = 1; } + message ResponseVerifyVoteExtension { VerifyStatus status = 1; @@ -458,16 +459,26 @@ message ValidatorUpdate { message VoteInfo { Validator validator = 1 [(gogoproto.nullable) = false]; bool signed_last_block = 2; - reserved 3; // Placeholder for tendermint_signed_extension in v0.37 - reserved 4; // Placeholder for app_signed_extension in v0.37 } +// ExtendedVoteInfo message ExtendedVoteInfo { Validator validator = 1 [(gogoproto.nullable) = false]; bool signed_last_block = 2; bytes vote_extension = 3; } +// CanonicalVoteExtension +// TODO: move this to core Tendermint data structures +message CanonicalVoteExtension { + bytes extension = 1; + int64 height = 2; + int32 round = 3; + string chain_id = 4; + bytes address = 5; +} + + enum MisbehaviorType { UNKNOWN = 0; DUPLICATE_VOTE = 1; diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 3855af3d9..bc2c53196 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -9,14 +9,7 @@ import "tendermint/crypto/proof.proto"; import "tendermint/version/types.proto"; import "tendermint/types/validator.proto"; -// This file is a temporary workaround to enable development during the ABCI++ -// project. This file should be deleted and any references to it removed when -// the ongoing work on ABCI++ is completed. -// -// This file supports building of the `tendermint.abci` proto package. -// For more information, see https://github.com/tendermint/tendermint/issues/8066 - -// BlockIdFlag indicates which BlockID the signature is for +// BlockIdFlag indicates which BlcokID the signature is for enum BlockIDFlag { option (gogoproto.goproto_enum_stringer) = true; option (gogoproto.goproto_enum_prefix) = false; @@ -120,19 +113,6 @@ message Vote { 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; } // Commit contains the evidence that a block was committed by a set of @@ -152,7 +132,6 @@ message CommitSig { google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; bytes signature = 4; - VoteExtensionToSign vote_extension = 5; } message Proposal {