syntax = "proto3";
package tendermint.types;

option go_package = "github.com/tendermint/tendermint/proto/tendermint/types";

import "gogoproto/gogo.proto";
import "tendermint/types/types.proto";
import "google/protobuf/timestamp.proto";

message CanonicalBlockID {
  bytes                  hash            = 1;
  CanonicalPartSetHeader part_set_header = 2 [(gogoproto.nullable) = false];
}

message CanonicalPartSetHeader {
  uint32 total = 1;
  bytes  hash  = 2;
}

message CanonicalProposal {
  SignedMsgType             type      = 1;  // type alias for byte
  sfixed64                  height    = 2;  // canonicalization requires fixed size encoding here
  sfixed64                  round     = 3;  // canonicalization requires fixed size encoding here
  int64                     pol_round = 4 [(gogoproto.customname) = "POLRound"];
  CanonicalBlockID          block_id  = 5 [(gogoproto.customname) = "BlockID"];
  google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  string                    chain_id  = 7 [(gogoproto.customname) = "ChainID"];
}

message CanonicalVote {
  SignedMsgType             type      = 1;  // type alias for byte
  sfixed64                  height    = 2;  // canonicalization requires fixed size encoding here
  sfixed64                  round     = 3;  // canonicalization requires fixed size encoding here
  CanonicalBlockID          block_id  = 4 [(gogoproto.customname) = "BlockID"];
  google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  string                    chain_id  = 6 [(gogoproto.customname) = "ChainID"];
}
