Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxNodesFaulty ¶ added in v0.2.0
MaxNodesFaulty calculates maximal number of nodes that can be assumed faulty F given a total number of nodes N.
func MinNodesFair ¶ added in v0.2.0
MinNodesFair returns a minimal number of nodes, that would include at least 1 fair node. It's F+1.
func MinNodesInQuorum ¶ added in v0.2.0
MinNodesInQuorum returns a minimal number T of nodes required for a quorum. If N=3F+1 then T=2F+1, but if if N is arbitrary, then T=N-F.
func New ¶ added in v0.2.0
func New( chainCore chain.ChainCore, mempool mempool_pkg.Mempool, committee chain.Committee, peerGroup peering.GroupProvider, pullMissingRequestsFromCommittee bool, consensusMetrics metrics.ConsensusMetrics, dssNode dss_node.DSSNode, consensusJournal journal.ConsensusJournal, wal chain.WAL, publishTx func(chainID *isc.ChainID, tx *iotago.Transaction) error, timersOpt ...ConsensusTimers, ) chain.Consensus
Types ¶
type BatchProposal ¶ added in v0.2.0
type BatchProposal struct { ValidatorIndex uint16 StateOutputID *iotago.UTXOInput RequestIDs []isc.RequestID RequestHashes [][32]byte TimeData time.Time ConsensusManaPledge identity.ID AccessManaPledge identity.ID FeeDestination isc.AgentID DSSNonceIndexProposal util.BitVector }
func BatchProposalFromBytes ¶ added in v0.2.0
func BatchProposalFromBytes(data []byte) (*BatchProposal, error)
func BatchProposalFromMarshalUtil ¶ added in v0.2.0
func BatchProposalFromMarshalUtil(mu *marshalutil.MarshalUtil) (*BatchProposal, error)
func (*BatchProposal) Bytes ¶ added in v0.2.0
func (b *BatchProposal) Bytes() []byte
func (*BatchProposal) EnsureTimestampConsistent ¶ added in v0.2.0
func (b *BatchProposal) EnsureTimestampConsistent(requests []isc.Request, stateTimestamp time.Time) error
EnsureTimestampConsistent adjusts a batch timestamp, if it is not consistent with the requests in the BatchProposal and the previous transaction. The timestamp is consistent, if it is not bellow the timestamps of all the on-ledger requests and the previous transaction in the chain. This implement the "fixing" part described in IscBatchTimestamp.tla.
type ConsensusTimers ¶ added in v0.2.0
type ConsensusTimers struct { VMRunRetryToWaitForReadyRequests time.Duration BroadcastSignedResultRetry time.Duration PostTxSequenceStep time.Duration PullInclusionStateRetry time.Duration ProposeBatchRetry time.Duration ProposeBatchDelayForNewState time.Duration }
func NewConsensusTimers ¶ added in v0.2.0
func NewConsensusTimers() ConsensusTimers
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package commoncoin implements a common coin abstraction needed by the HoneyBadgerBFT for synchronization and randomness.
|
Package commoncoin implements a common coin abstraction needed by the HoneyBadgerBFT for synchronization and randomness. |