Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: udpate & regenerate protobufs #4

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
494 changes: 494 additions & 0 deletions proto/tendermint/abci/types.proto

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions proto/tendermint/blocksync/types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
syntax = "proto3";
package tendermint.blocksync;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/blocksync";

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

// BlockRequest requests a block for a specific height
message BlockRequest {
int64 height = 1;
}

// NoBlockResponse informs the node that the peer does not have block at the requested height
message NoBlockResponse {
int64 height = 1;
}

// 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.
message StatusRequest {
}

// StatusResponse is a peer response to inform their status.
message StatusResponse {
int64 height = 1;
int64 base = 2;
}

message Message {
oneof sum {
BlockRequest block_request = 1;
NoBlockResponse no_block_response = 2;
BlockResponse block_response = 3;
StatusRequest status_request = 4;
StatusResponse status_response = 5;
}
}
92 changes: 92 additions & 0 deletions proto/tendermint/consensus/types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
syntax = "proto3";
package tendermint.consensus;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/consensus";

import "gogoproto/gogo.proto";
import "tendermint/types/types.proto";
import "tendermint/libs/bits/types.proto";

// NewRoundStep is sent for every step taken in the ConsensusState.
// For every height/round/step transition
message NewRoundStep {
int64 height = 1;
int32 round = 2;
uint32 step = 3;
int64 seconds_since_start_time = 4;
int32 last_commit_round = 5;
}

// NewValidBlock is sent when a validator observes a valid block B in some round r,
// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
// In case the block is also committed, then IsCommit flag is set to true.
message NewValidBlock {
int64 height = 1;
int32 round = 2;
tendermint.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false];
tendermint.libs.bits.BitArray block_parts = 4;
bool is_commit = 5;
}

// Proposal is sent when a new block is proposed.
message Proposal {
tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
}

// ProposalPOL is sent when a previous proposal is re-proposed.
message ProposalPOL {
int64 height = 1;
int32 proposal_pol_round = 2;
tendermint.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false];
}

// BlockPart is sent when gossipping a piece of the proposed block.
message BlockPart {
int64 height = 1;
int32 round = 2;
tendermint.types.Part part = 3 [(gogoproto.nullable) = false];
}

// Vote is sent when voting for a proposal (or lack thereof).
message Vote {
tendermint.types.Vote vote = 1;
}

// HasVote is sent to indicate that a particular vote has been received.
message HasVote {
int64 height = 1;
int32 round = 2;
tendermint.types.SignedMsgType type = 3;
int32 index = 4;
}

// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes.
message VoteSetMaj23 {
int64 height = 1;
int32 round = 2;
tendermint.types.SignedMsgType type = 3;
tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
}

// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID.
message VoteSetBits {
int64 height = 1;
int32 round = 2;
tendermint.types.SignedMsgType type = 3;
tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
tendermint.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false];
}

message Message {
oneof sum {
NewRoundStep new_round_step = 1;
NewValidBlock new_valid_block = 2;
Proposal proposal = 3;
ProposalPOL proposal_pol = 4;
BlockPart block_part = 5;
Vote vote = 6;
HasVote has_vote = 7;
VoteSetMaj23 vote_set_maj23 = 8;
VoteSetBits vote_set_bits = 9;
}
}
46 changes: 46 additions & 0 deletions proto/tendermint/consensus/wal.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";
package tendermint.consensus;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/consensus";

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

// MsgInfo are msgs from the reactor which may update the state
message MsgInfo {
Message msg = 1 [(gogoproto.nullable) = false];
string peer_id = 2 [(gogoproto.customname) = "PeerID"];
}

// TimeoutInfo internally generated messages which may update the state
message TimeoutInfo {
google.protobuf.Duration duration = 1
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
int64 height = 2;
int32 round = 3;
uint32 step = 4;
}

// EndHeight marks the end of the given height inside WAL.
// @internal used by scripts/wal2json util.
message EndHeight {
int64 height = 1;
}

message WALMessage {
oneof sum {
tendermint.types.EventDataRoundState event_data_round_state = 1;
MsgInfo msg_info = 2;
TimeoutInfo timeout_info = 3;
EndHeight end_height = 4;
}
}

// TimedWALMessage wraps WALMessage and adds Time for debugging purposes.
message TimedWALMessage {
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
WALMessage msg = 2;
}
17 changes: 17 additions & 0 deletions proto/tendermint/crypto/keys.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";
package tendermint.crypto;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto";

import "gogoproto/gogo.proto";

// PublicKey defines the keys available for use with Validators
message PublicKey {
option (gogoproto.compare) = true;
option (gogoproto.equal) = true;

oneof sum {
bytes ed25519 = 1;
bytes secp256k1 = 2;
}
}
41 changes: 41 additions & 0 deletions proto/tendermint/crypto/proof.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
syntax = "proto3";
package tendermint.crypto;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto";

import "gogoproto/gogo.proto";

message Proof {
int64 total = 1;
int64 index = 2;
bytes leaf_hash = 3;
repeated bytes aunts = 4;
}

message ValueOp {
// Encoded in ProofOp.Key.
bytes key = 1;

// To encode in ProofOp.Data
Proof proof = 2;
}

message DominoOp {
string key = 1;
string input = 2;
string output = 3;
}

// ProofOp defines an operation used for calculating Merkle root
// The data could be arbitrary format, providing nessecary data
// for example neighbouring node hash
message ProofOp {
string type = 1;
bytes key = 2;
bytes data = 3;
}

// ProofOps is Merkle proof defined by the list of ProofOps
message ProofOps {
repeated ProofOp ops = 1 [(gogoproto.nullable) = false];
}
9 changes: 9 additions & 0 deletions proto/tendermint/libs/bits/types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";
package tendermint.libs.bits;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/libs/bits";

message BitArray {
int64 bits = 1;
repeated uint64 elems = 2;
}
14 changes: 14 additions & 0 deletions proto/tendermint/mempool/types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";
package tendermint.mempool;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/mempool";

message Txs {
repeated bytes txs = 1;
}

message Message {
oneof sum {
Txs txs = 1;
}
}
30 changes: 30 additions & 0 deletions proto/tendermint/p2p/conn.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package tendermint.p2p;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p";

import "gogoproto/gogo.proto";
import "tendermint/crypto/keys.proto";

message PacketPing {}

message PacketPong {}

message PacketMsg {
int32 channel_id = 1 [(gogoproto.customname) = "ChannelID"];
bool eof = 2 [(gogoproto.customname) = "EOF"];
bytes data = 3;
}

message Packet {
oneof sum {
PacketPing packet_ping = 1;
PacketPong packet_pong = 2;
PacketMsg packet_msg = 3;
}
}

message AuthSigMessage {
tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
bytes sig = 2;
}
20 changes: 20 additions & 0 deletions proto/tendermint/p2p/pex.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";
package tendermint.p2p;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p";

import "tendermint/p2p/types.proto";
import "gogoproto/gogo.proto";

message PexRequest {}

message PexAddrs {
repeated NetAddress addrs = 1 [(gogoproto.nullable) = false];
}

message Message {
oneof sum {
PexRequest pex_request = 1;
PexAddrs pex_addrs = 2;
}
}
34 changes: 34 additions & 0 deletions proto/tendermint/p2p/types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";
package tendermint.p2p;

option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p";

import "gogoproto/gogo.proto";

message NetAddress {
string id = 1 [(gogoproto.customname) = "ID"];
string ip = 2 [(gogoproto.customname) = "IP"];
uint32 port = 3;
}

message ProtocolVersion {
uint64 p2p = 1 [(gogoproto.customname) = "P2P"];
uint64 block = 2;
uint64 app = 3;
}

message DefaultNodeInfo {
ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false];
string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"];
string listen_addr = 3;
string network = 4;
string version = 5;
bytes channels = 6;
string moniker = 7;
DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false];
}

message DefaultNodeInfoOther {
string tx_index = 1;
string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"];
}
Loading