# Packages
No description provided by the author
# Functions
FromProto sets a protobuf Block to the given pointer.
FromProto sets a protobuf BlockID to the given pointer.
No description provided by the author
No description provided by the author
CanonicalizeVote transforms the given PartSetHeader to a CanonicalPartSetHeader.
CanonicalizeVote transforms the given Proposal to a CanonicalProposal.
CanonicalizeVote transforms the given Vote to a CanonicalVote, which does not contain ValidatorIndex and ValidatorAddress fields.
CanonicalTime can be used to stringify time in a canonical way.
FromProto sets a protobuf Commit to the given pointer.
CommitToVoteSet constructs a VoteSet from the Commit and validator set.
ComputeProtoSizeForTxs wraps the transactions in tmproto.Data{} and calculates the size.
No description provided by the author
DataFromProto takes a protobuf representation of Data & returns the native type.
DefaultBlockParams returns a default BlockParams.
DefaultConsensusParams returns a default ConsensusParams.
DefaultEvidenceParams returns a default EvidenceParams.
DefaultValidatorParams returns a default ValidatorParams, which allows only ed25519 pubkeys.
No description provided by the author
DuplicateVoteEvidenceFromProto decodes protobuf into DuplicateVoteEvidence.
No description provided by the author
EvidenceFromProto is a generalized function for decoding protobuf into the evidence interface.
EvidenceToProto is a generalized function for encoding evidence that conforms to the evidence interface to protobuf.
GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.
GenesisDocFromJSON unmarshalls JSON data into a GenesisDoc.
FromProto sets a protobuf Header to the given pointer.
IsErrNotEnoughVotingPowerSigned returns true if err is ErrNotEnoughVotingPowerSigned.
No description provided by the author
IsVoteTypeValid returns true if t is a valid vote type.
LightBlockFromProto converts from protobuf back into the Lightblock.
LightClientAttackEvidenceFromProto decodes protobuf.
MakeBlock returns a new block with an empty header, except what can be computed from itself.
No description provided by the author
No description provided by the author
No description provided by the author
MaxDataBytes returns the maximum size of block's data.
MaxDataBytesNoEvidence returns the maximum size of block's data when evidence count is unknown.
NewBlockMeta returns a new BlockMeta.
NewCommit returns a new Commit.
NewCommitSigAbsent returns new CommitSig with BlockIDFlagAbsent.
NewCommitSigForBlock returns new CommitSig with BlockIDFlagCommit.
No description provided by the author
NewDuplicateVoteEvidence creates DuplicateVoteEvidence with right ordering given two conflicting votes.
NewErrEvidenceOverflow returns a new ErrEvidenceOverflow where got > max.
No description provided by the author
No description provided by the author
NewErrInvalidEvidence returns a new EvidenceInvalid with the given err.
No description provided by the author
NewEventBus returns a new event bus.
NewEventBusWithBufferCapacity returns a new event bus with the given buffer capacity.
assumes the round to be 0 and the validator index to be 0.
assumes voting power to be 10 and validator to be the only one in the set.
No description provided by the author
NewMockPVWithParams allows one to create a MockPV instance, but with finer grained control over the operation of the mock validator.
Returns an immutable, full PartSet from the data bytes.
Returns an empty PartSet ready to be populated.
No description provided by the author
NewProposal returns a new Proposal.
NewResults strips non-deterministic fields from ResponseDeliverTx responses and returns ABCIResults.
NewValidator returns a new validator with the given pubkey and voting power.
NewValidatorSet initializes a ValidatorSet by copying over the values from `valz`, a list of Validators.
Constructs a new VoteSet struct used to accumulate votes for given height/round.
No description provided by the author
FromProto sets a protobuf PartSetHeader to the given pointer.
FromProto sets a protobuf Proposal to the given pointer.
ProposalSignBytes returns the proto-encoding of the canonicalized Proposal, for signing.
No description provided by the author
RandValidator returns a randomized validator, useful for testing.
RandValidatorSet returns a randomized validator set (size: +numValidators+), where each validator has a voting power of +votingPower+.
FromProto sets a protobuf SignedHeader to the given pointer.
No description provided by the author
No description provided by the author
ValidateHash returns an error if the hash is not empty, but its size != tmhash.Size.
ValidateTime does a basic time validation ensuring time does not drift too much: +/- one year.
FromProto sets a protobuf Validator to the given pointer.
ValidatorListString returns a prettified validator list for logging purposes.
ValidatorSetFromExistingValidators takes an existing array of validators and rebuilds the exact same validator set that corresponds to it without changing the proposer priority or power if any of the validators fail validate basic then an empty set is returned.
ValidatorSetFromProto sets a protobuf ValidatorSet to the given pointer.
FromProto converts a proto generetad type to a handwritten type return type, nil if everything converts safely, otherwise nil, error.
VoteSignBytes returns the proto-encoding of the canonicalized Vote, for signing.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
BlockHeightKey is a reserved key used for indexing BeginBlock and Endblock events.
BlockIDFlagAbsent - no vote was received from a validator.
BlockIDFlagCommit - voted for the Commit.BlockID.
BlockIDFlagNil - voted for nil.
64kB.
Internal consensus events.
Reserved event types (alphabetically sorted).
Block level events for mass consumption by users.
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
EventTypeKey is a reserved composite key for event name.
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
Reserved event types (alphabetically sorted).
MaxBlockPartsCount is the maximum number of block parts.
100MB.
MaxChainIDLen is a maximum length of the chain ID.
Max size of commit without any commitSigs -> 82 for BlockID, 8 for Height, 4 for Round.
Commit sig size is made up of 64 bytes for the signature, 20 bytes for the address, 1 byte for the flag and 14 bytes for the timestamp.
MaxHeaderBytes is a maximum header size.
MaxOverheadForBlock - maximum overhead to encode a block (up to MaxBlockSizeBytes in size) not including it's parts except Data.
MaxTotalVotingPower - the maximum allowed total voting power.
MaxVotesCount is the maximum number of votes in a set.
PriorityWindowSizeFactor - is a constant that when multiplied with the total voting power gives the maximum allowed distance between validator priorities.
TimeFormat is used for generating the sigs.
TxHashKey is a reserved key, used to specify transaction's hash.
TxHeightKey is a reserved key, used to specify transaction block's height.
TxKeySize is the size of the transaction key index.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrTotalVotingPowerOverflow is returned if the total voting power of the resulting validator set exceeds MaxTotalVotingPower.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxSignatureSize is a maximum allowed signature size for the Proposal and Vote.
PB2TM is used for converting protobuf ABCI to Tendermint ABCI.
UNSTABLE.
TM2PB is used for converting Tendermint ABCI to protobuf ABCI.
# Structs
Block defines the atomic unit of a Tendermint blockchain.
BlockID.
BlockMeta contains meta information.
BlockParams define limits on the block size and gas plus minimum time between blocks.
Commit contains the evidence that a block was committed by a set of validators.
CommitSig is a part of the Vote included in a Commit.
ConsensusParams contains consensus critical parameters that determine the validity of blocks.
Data contains the set of transactions included in the block.
DuplicateVoteEvidence contains evidence of a single validator signing two conflicting votes.
ErrEvidenceOverflow is for when there the amount of evidence exceeds the max bytes.
No description provided by the author
No description provided by the author
ErrInvalidEvidence wraps a piece of evidence and the error denoting how or why it is invalid.
ErrNotEnoughVotingPowerSigned is returned when not enough validators signed a commit.
No description provided by the author
No description provided by the author
EventBus is a common bus for all events going through the system.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NOTE: This goes into the replay WAL.
All txs fire EventDataTx.
No description provided by the author
No description provided by the author
EvidenceData contains any evidence of malicious wrong-doing by validators.
EvidenceParams determine how we handle evidence of malfeasance.
GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set.
GenesisValidator is an initial validator.
Header defines the structure of a Tendermint block header.
LightBlock is a SignedHeader and a ValidatorSet.
LightClientAttackEvidence is a generalized evidence that captures all forms of known attacks on a light client such that a full node can verify, propose and commit the evidence on-chain for punishment of the malicious validators.
MockPV implements PrivValidator without any safety or persistence.
-----------------------------------------------------------------------------.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Proposal defines a block proposal for the consensus.
SignedHeader is a header along with the commits that prove it.
TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
Volatile state for each Validator NOTE: The ProposerPriority is not included in Validator.Hash(); make sure to update that method if changes are made here.
No description provided by the author
ValidatorParams restrict the public key types validators can use.
ValidatorSet represent a set of *Validator at a given height.
No description provided by the author
Vote represents a prevote, precommit, or commit vote from validators for consensus.
VoteSet helps collect signatures from validators at each height+round for a
predefined vote type.
More human readable JSON of the vote set NOTE: insufficient for unmarshalling from (compressed votes) TODO: make the peerMaj23s nicer to read (eg just the block hash).
# Interfaces
BlockEventPublisher publishes all block related events.
No description provided by the author
Evidence represents any provable malicious activity by a validator.
PrivValidator defines the functionality of a local Tendermint validator that signs votes and proposals, and never double signs.
Signable is an interface for all signable things.
No description provided by the author
TMEventData implements events.EventData.
No description provided by the author
Common interface between *consensus.VoteSet and types.Commit.
# Type aliases
ABCIResults wraps the deliver tx results to return a proof.
Address is hex bytes.
BlockIDFlag indicates which BlockID the signature is for.
No description provided by the author
EvidenceList is a list of Evidence.
UNSTABLE XXX: duplicate of p2p.ID to avoid dependence between packages.
No description provided by the author
No description provided by the author
No description provided by the author
Txs is a slice of Tx.
ValidatorsByAddress implements sort.Interface for []*Validator based on the Address field.
ValidatorsByVotingPower implements sort.Interface for []*Validator based on the VotingPower and Address fields.