tendermint

package
v0.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application[V types.Hashable[H], H types.Hash] interface {
	// Value returns the value to the Tendermint consensus algorithm which can be proposed to other validators.
	Value() V

	// Valid returns true if the provided value is valid according to the application context.
	Valid(V) bool
}

type CachedProposal added in v0.14.4

type CachedProposal[V types.Hashable[H], H types.Hash, A types.Addr] struct {
	types.Proposal[V, H, A]
	Valid bool
	ID    *H
}

type Slasher

type Slasher[M types.Message[V, H, A], V types.Hashable[H], H types.Hash, A types.Addr] interface {
	// Equivocation informs the slasher that a validator has sent conflicting messages. Thus it can decide whether to
	// slash the validator and by how much.
	Equivocation(msgs ...M)
}

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],
	vals votecounter.Validators[A],
	height types.Height,
) StateMachine[V, H, A]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL