tendermint/types

Table of Contents

tendermint/types/block.proto

Top

Block

FieldTypeLabelDescription
header Header

data Data

evidence EvidenceList

last_commit Commit

tendermint/types/params.proto

Top

BlockParams

BlockParams contains limits on the block size.

FieldTypeLabelDescription
max_bytes int64

Max block size, in bytes. Note: must be greater than 0

max_gas int64

Max gas per block. Note: must be greater or equal to -1

time_iota_ms int64

Minimum time increment between consecutive blocks (in milliseconds) If the block header timestamp is ahead of the system clock, decrease this value. Not exposed to the application.

ConsensusParams

ConsensusParams contains consensus critical parameters that determine the

validity of blocks.

FieldTypeLabelDescription
block BlockParams

evidence EvidenceParams

validator ValidatorParams

version VersionParams

EvidenceParams

EvidenceParams determine how we handle evidence of malfeasance.

FieldTypeLabelDescription
max_age_num_blocks int64

Max age of evidence, in blocks. The basic formula for calculating this is: MaxAgeDuration / {average block time}.

max_age_duration google.protobuf.Duration

Max age of evidence, in time. It should correspond with an app's "unbonding period" or other similar mechanism for handling [Nothing-At-Stake attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).

max_bytes int64

This sets the maximum size of total evidence in bytes that can be committed in a single block. and should fall comfortably under the max block bytes. Default is 1048576 or 1MB

HashedParams

HashedParams is a subset of ConsensusParams.

It is hashed into the Header.ConsensusHash.

FieldTypeLabelDescription
block_max_bytes int64

block_max_gas int64

ValidatorParams

ValidatorParams restrict the public key types validators can use.

NOTE: uses ABCI pubkey naming, not Amino names.

FieldTypeLabelDescription
pub_key_types string repeated

VersionParams

VersionParams contains the ABCI application version.

FieldTypeLabelDescription
app_version uint64

tendermint/types/evidence.proto

Top

DuplicateVoteEvidence

DuplicateVoteEvidence contains evidence of a validator signed two conflicting

votes.

FieldTypeLabelDescription
vote_a Vote

vote_b Vote

total_voting_power int64

validator_power int64

timestamp google.protobuf.Timestamp

Evidence

FieldTypeLabelDescription
duplicate_vote_evidence DuplicateVoteEvidence

light_client_attack_evidence LightClientAttackEvidence

EvidenceList

FieldTypeLabelDescription
evidence Evidence repeated

LightClientAttackEvidence

LightClientAttackEvidence contains evidence of a set of validators attempting

to mislead a light client.

FieldTypeLabelDescription
conflicting_block LightBlock

common_height int64

byzantine_validators Validator repeated

total_voting_power int64

timestamp google.protobuf.Timestamp

tendermint/types/types.proto

Top

BlockID

BlockID

FieldTypeLabelDescription
hash bytes

part_set_header PartSetHeader

BlockMeta

FieldTypeLabelDescription
block_id BlockID

block_size int64

header Header

num_txs int64

Commit

Commit contains the evidence that a block was committed by a set of

validators.

FieldTypeLabelDescription
height int64

round int32

block_id BlockID

signatures CommitSig repeated

CommitSig

CommitSig is a part of the Vote included in a Commit.

FieldTypeLabelDescription
block_id_flag BlockIDFlag

validator_address bytes

timestamp google.protobuf.Timestamp

signature bytes

Data

Data contains the set of transactions included in the block

FieldTypeLabelDescription
txs bytes repeated

Txs that will be applied by state @ block.Height+1. NOTE: not all txs here are valid. We're just agreeing on the order first. This means that block.AppHash does not include these txs.

Header

Header defines the structure of a Tendermint block header.

FieldTypeLabelDescription
version tendermint.version.Consensus

basic block info

chain_id string

height int64

time google.protobuf.Timestamp

last_block_id BlockID

prev block info

last_commit_hash bytes

hashes of block data commit from validators from the last block

data_hash bytes

transactions

validators_hash bytes

hashes from the app output from the prev block validators for the current block

next_validators_hash bytes

validators for the next block

consensus_hash bytes

consensus params for current block

app_hash bytes

state after txs from the previous block

last_results_hash bytes

root hash of all results from the txs from the previous block

evidence_hash bytes

consensus info evidence included in the block

proposer_address bytes

original proposer of the block

LightBlock

FieldTypeLabelDescription
signed_header SignedHeader

validator_set ValidatorSet

Part

FieldTypeLabelDescription
index uint32

bytes bytes

proof tendermint.crypto.Proof

PartSetHeader

PartsetHeader

FieldTypeLabelDescription
total uint32

hash bytes

Proposal

FieldTypeLabelDescription
type SignedMsgType

height int64

round int32

pol_round int32

block_id BlockID

timestamp google.protobuf.Timestamp

signature bytes

SignedHeader

FieldTypeLabelDescription
header Header

commit Commit

TxProof

TxProof represents a Merkle proof of the presence of a transaction in the

Merkle tree.

FieldTypeLabelDescription
root_hash bytes

data bytes

proof tendermint.crypto.Proof

Vote

Vote represents a prevote, precommit, or commit vote from validators for

consensus.

FieldTypeLabelDescription
type SignedMsgType

height int64

round int32

block_id BlockID

zero if vote is nil.

timestamp google.protobuf.Timestamp

validator_address bytes

validator_index int32

signature bytes

BlockIDFlag

BlockIdFlag indicates which BlcokID the signature is for

NameNumberDescription
BLOCK_ID_FLAG_UNKNOWN 0

BLOCK_ID_FLAG_ABSENT 1

BLOCK_ID_FLAG_COMMIT 2

BLOCK_ID_FLAG_NIL 3

SignedMsgType

SignedMsgType is a type of signed message in the consensus.

NameNumberDescription
SIGNED_MSG_TYPE_UNKNOWN 0

SIGNED_MSG_TYPE_PREVOTE 1

Votes

SIGNED_MSG_TYPE_PRECOMMIT 2

SIGNED_MSG_TYPE_PROPOSAL 32

Proposals

tendermint/types/validator.proto

Top

SimpleValidator

FieldTypeLabelDescription
pub_key tendermint.crypto.PublicKey

voting_power int64

Validator

FieldTypeLabelDescription
address bytes

pub_key tendermint.crypto.PublicKey

voting_power int64

proposer_priority int64

ValidatorSet

FieldTypeLabelDescription
validators Validator repeated

proposer Validator

total_voting_power int64

Scalar Value Types

.proto Type Notes Python Type
double float
float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long
uint32 Uses variable-length encoding. int/long
uint64 Uses variable-length encoding. int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long
sfixed32 Always four bytes. int
sfixed64 Always eight bytes. int/long
bool boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode
bytes May contain any arbitrary sequence of bytes. str