Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Blockchain ¶
type Blockchain[V types.Hashable[H], H types.Hash, A types.Addr] interface { // types.Height return the current blockchain height Height() types.Height // Commit is called by Tendermint when a block has been decided on and can be committed to the DB. Commit(types.Height, V, []types.Precommit[H, A]) }
type CachedProposal ¶ added in v0.14.4
type StateMachine ¶ added in v0.14.4
type StateMachine[V types.Hashable[H], H types.Hash, A types.Addr] interface { ReplayWAL() ProcessStart(types.Round) []types.Action[V, H, A] ProcessTimeout(types.Timeout) []types.Action[V, H, A] ProcessProposal(types.Proposal[V, H, A]) []types.Action[V, H, A] ProcessPrevote(types.Prevote[H, A]) []types.Action[V, H, A] ProcessPrecommit(types.Precommit[H, A]) []types.Action[V, H, A] }
func New ¶
func New[V types.Hashable[H], H types.Hash, A types.Addr]( db db.TendermintDB[V, H, A], log utils.Logger, nodeAddr A, app Application[V, H], chain Blockchain[V, H, A], vals Validators[A], ) StateMachine[V, H, A]
type Validators ¶
type Validators[A types.Addr] interface { // TotalVotingPower represents N which is required to calculate the thresholds. TotalVotingPower(types.Height) types.VotingPower // ValidatorVotingPower returns the voting power of the a single validator. This is also required to implement // various thresholds. The assumption is that a single validator cannot have voting power more than f. ValidatorVotingPower(A) types.VotingPower // Proposer returns the proposer of the current round and height. Proposer(types.Height, types.Round) A }
Click to show internal directories.
Click to hide internal directories.