PrevUpHomeNext

ConsensusProposal

Represents a proposed position taken during a round of consensus.

Synopsis
template<
    class NodeID_t,
    class LedgerID_t,
    class Position_t>
class ConsensusProposal
Types

Name

Description

NodeID

Member Functions

Name

Description

ConsensusProposal

Constructor.

bowOut

Leave consensus.

changePosition

Update the position during the consensus process.

closeTime

The current position on the consensus close time.

getJson

Get JSON representation for debugging.

isBowOut

Get whether this node left the consensus process.

isInitial

Whether this is the first position taken during the current consensus round.

isStale

Get whether this position is stale relative to the provided cutoff.

nodeID

Identifying which peer took this position.

position

Get the proposed position.

prevLedger

Get the prior accepted ledger this position is based on.

proposeSeq

Get the sequence number of this proposal.

seenTime

Get when this position was taken.

Data Members

Name

Description

seqJoin

seqLeave

Description

During consensus, peers seek agreement on a set of transactions to apply to the prior ledger to generate the next ledger. Each peer takes a position on whether to include or exclude potential transactions. The position on the set of transactions is proposed to its peers as an instance of the ConsensusProposal class.

An instance of ConsensusProposal can be either our own proposal or one of our peer's.

As consensus proceeds, peers may change their position on the transaction, or choose to abstain. Each successive proposal includes a strictly monotonically increasing number (or, if a peer is choosing to abstain, the special value seqLeave).

Refer to Consensus for requirements of the template arguments.

Template Parameters

Type

Description

NodeID_t

Type used to uniquely identify nodes/peers

LedgerID_t

Type used to uniquely identify ledgers

Position_t

Type used to represent the position taken on transactions under consideration during this round of consensus

Header

#include <ripple/consensus/ConsensusProposal.h>


PrevUpHomeNext