Documentation ¶
Index ¶
- type ConsensusConfig
- func (cfg *ConsensusConfig) Commit(t time.Time) time.Time
- func (cfg *ConsensusConfig) Precommit(round int) time.Duration
- func (cfg *ConsensusConfig) Prevote(round int) time.Duration
- func (cfg *ConsensusConfig) Propose(round int) time.Duration
- func (cfg *ConsensusConfig) SetWalFile(walFile string)
- func (cfg *ConsensusConfig) ValidateBasic() error
- func (cfg *ConsensusConfig) WaitForTxs() bool
- func (cfg *ConsensusConfig) WalFile() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusConfig ¶
type ConsensusConfig struct { RootDir string `json:"home" toml:"home"` WALPath string `json:"wal_file" toml:"wal_file"` WALDisabled bool `json:"-" toml:"-"` TimeoutPropose time.Duration `json:"timeout_propose" toml:"timeout_propose"` TimeoutProposeDelta time.Duration `json:"timeout_propose_delta" toml:"timeout_propose_delta"` TimeoutPrevote time.Duration `json:"timeout_prevote" toml:"timeout_prevote"` TimeoutPrevoteDelta time.Duration `json:"timeout_prevote_delta" toml:"timeout_prevote_delta"` TimeoutPrecommit time.Duration `json:"timeout_precommit" toml:"timeout_precommit"` TimeoutPrecommitDelta time.Duration `json:"timeout_precommit_delta" toml:"timeout_precommit_delta"` TimeoutCommit time.Duration `json:"timeout_commit" toml:"timeout_commit"` // Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) SkipTimeoutCommit bool `` /* 141-byte string literal not displayed */ // EmptyBlocks mode and possible interval between empty blocks CreateEmptyBlocks bool `json:"create_empty_blocks" toml:"create_empty_blocks" comment:"EmptyBlocks mode and possible interval between empty blocks"` CreateEmptyBlocksInterval time.Duration `json:"create_empty_blocks_interval" toml:"create_empty_blocks_interval"` // Reactor sleep duration parameters PeerGossipSleepDuration time.Duration `json:"peer_gossip_sleep_duration" toml:"peer_gossip_sleep_duration" comment:"Reactor sleep duration parameters"` PeerQueryMaj23SleepDuration time.Duration `json:"peer_query_maj_23_sleep_duration" toml:"peer_query_maj23_sleep_duration"` // contains filtered or unexported fields }
ConsensusConfig defines the configuration for the Tendermint consensus service, including timeouts and details about the WAL and the block structure.
func DefaultConsensusConfig ¶
func DefaultConsensusConfig() *ConsensusConfig
DefaultConsensusConfig returns a default configuration for the consensus service
func TestConsensusConfig ¶
func TestConsensusConfig() *ConsensusConfig
TestConsensusConfig returns a configuration for testing the consensus service
func (*ConsensusConfig) Commit ¶
func (cfg *ConsensusConfig) Commit(t time.Time) time.Time
Commit returns the amount of time to wait for straggler votes after receiving +2/3 precommits for a single block (ie. a commit).
func (*ConsensusConfig) Precommit ¶
func (cfg *ConsensusConfig) Precommit(round int) time.Duration
Precommit returns the amount of time to wait for straggler votes after receiving any +2/3 precommits
func (*ConsensusConfig) Prevote ¶
func (cfg *ConsensusConfig) Prevote(round int) time.Duration
Prevote returns the amount of time to wait for straggler votes after receiving any +2/3 prevotes
func (*ConsensusConfig) Propose ¶
func (cfg *ConsensusConfig) Propose(round int) time.Duration
Propose returns the amount of time to wait for a proposal
func (*ConsensusConfig) SetWalFile ¶
func (cfg *ConsensusConfig) SetWalFile(walFile string)
SetWalFile sets the path to the write-ahead log file
func (*ConsensusConfig) ValidateBasic ¶
func (cfg *ConsensusConfig) ValidateBasic() error
ValidateBasic performs basic validation (checking param bounds, etc.) and returns an error if any check fails.
func (*ConsensusConfig) WaitForTxs ¶
func (cfg *ConsensusConfig) WaitForTxs() bool
WaitForTxs returns true if the consensus should wait for transactions before entering the propose step
func (*ConsensusConfig) WalFile ¶
func (cfg *ConsensusConfig) WalFile() string
WalFile returns the full path to the write-ahead log file