20#include <xrpld/app/consensus/RCLConsensus.h>
21#include <xrpld/app/consensus/RCLValidations.h>
22#include <xrpld/app/ledger/BuildLedger.h>
23#include <xrpld/app/ledger/InboundLedgers.h>
24#include <xrpld/app/ledger/InboundTransactions.h>
25#include <xrpld/app/ledger/Ledger.h>
26#include <xrpld/app/ledger/LedgerMaster.h>
27#include <xrpld/app/ledger/LocalTxs.h>
28#include <xrpld/app/ledger/OpenLedger.h>
29#include <xrpld/app/misc/AmendmentTable.h>
30#include <xrpld/app/misc/HashRouter.h>
31#include <xrpld/app/misc/LoadFeeTrack.h>
32#include <xrpld/app/misc/NegativeUNLVote.h>
33#include <xrpld/app/misc/NetworkOPs.h>
34#include <xrpld/app/misc/TxQ.h>
35#include <xrpld/app/misc/ValidatorKeys.h>
36#include <xrpld/app/misc/ValidatorList.h>
37#include <xrpld/consensus/LedgerTiming.h>
38#include <xrpld/overlay/Overlay.h>
39#include <xrpld/overlay/predicates.h>
40#include <xrpl/basics/random.h>
41#include <xrpl/beast/core/LexicalCast.h>
42#include <xrpl/beast/utility/instrumentation.h>
43#include <xrpl/protocol/BuildInfo.h>
44#include <xrpl/protocol/Feature.h>
45#include <xrpl/protocol/digest.h>
69 , consensus_(clock, adaptor_, journal)
83 , feeVote_(
std::move(feeVote))
86 , inboundTransactions_{inboundTransactions}
88 , validatorKeys_(validatorKeys)
93 std::numeric_limits<
std::uint64_t>::max() - 1))
94 , nUnlVote_(validatorKeys_.nodeID, j_)
97 valCookie_,
"ripple::RCLConsensus::Adaptor::Adaptor : nonzero cookie");
99 JLOG(
j_.
info()) <<
"Consensus engine started (cookie: " +
106 JLOG(
j_.
info()) <<
"Validator identity: "
115 <<
"Validator ephemeral signing key: "
127 auto built = ledgerMaster_.getLedgerByHash(hash);
130 if (acquiringLedger_ != hash)
133 JLOG(
j_.
warn()) <<
"Need consensus ledger " << hash;
136 acquiringLedger_ = hash;
138 app_.getJobQueue().addJob(
140 "getConsensusLedger1",
141 [
id = hash, &app = app_,
this]() {
143 <<
"JOB advanceLedger getConsensusLedger1 started";
144 app.getInboundLedgers().acquireAsync(
152 !built->open() && built->isImmutable(),
153 "ripple::RCLConsensus::Adaptor::acquireLedger : valid ledger state");
155 built->info().hash == hash,
156 "ripple::RCLConsensus::Adaptor::acquireLedger : ledger hash match");
159 inboundTransactions_.newRound(built->info().seq);
167 protocol::TMProposeSet prop;
171 prop.set_proposeseq(
proposal.proposeSeq());
172 prop.set_closetime(
proposal.closeTime().time_since_epoch().count());
174 prop.set_currenttxhash(
176 prop.set_previousledger(
180 prop.set_nodepubkey(pk.data(), pk.size());
183 prop.set_signature(sig.data(), sig.size());
192 if (app_.getHashRouter().shouldRelay(tx.
id()))
194 JLOG(
j_.
debug()) <<
"Relaying disputed tx " << tx.
id();
195 auto const slice = tx.
tx_->slice();
196 protocol::TMTransaction msg;
197 msg.set_rawtransaction(slice.data(), slice.size());
198 msg.set_status(protocol::tsNEW);
199 msg.set_receivetimestamp(
200 app_.timeKeeper().now().time_since_epoch().count());
202 app_.overlay().relay(tx.
id(), msg, skip);
206 JLOG(
j_.
debug()) <<
"Not relaying disputed tx " << tx.
id();
212 JLOG(
j_.
trace()) << (
proposal.isBowOut() ?
"We bow out: " :
"We propose: ")
216 protocol::TMProposeSet prop;
218 prop.set_currenttxhash(
220 prop.set_previousledger(
222 prop.set_proposeseq(
proposal.proposeSeq());
223 prop.set_closetime(
proposal.closeTime().time_since_epoch().count());
225 if (!validatorKeys_.keys)
227 JLOG(
j_.
warn()) <<
"RCLConsensus::Adaptor::propose: ValidatorKeys "
232 auto const& keys = *validatorKeys_.keys;
234 prop.set_nodepubkey(keys.publicKey.data(), keys.publicKey.size());
239 prop.set_signature(sig.data(), sig.size());
249 app_.getHashRouter().addSuppression(suppression);
251 app_.overlay().broadcast(prop);
257 inboundTransactions_.giveSet(txns.
id(), txns.
map_,
false);
263 if (
auto txns = inboundTransactions_.getSet(setId,
true))
273 return !app_.openLedger().empty();
279 return app_.getValidations().numTrustedForLedger(h);
301 ledgerMaster_.getValidLedgerIndex());
303 if (netLgr != ledgerID)
306 app_.getOPs().consensusViewChange();
323 notify(protocol::neCLOSING_LEDGER, ledger, !wrongLCL);
325 auto const& prevLedger = ledger.ledger_;
327 ledgerMaster_.applyHeldTransactions();
329 ledgerMaster_.setBuildingLedger(prevLedger->info().seq + 1);
331 auto initialLedger = app_.openLedger().current();
335 initialSet->setUnbacked();
338 for (
auto const& tx : initialLedger->txs)
340 JLOG(
j_.
trace()) <<
"Adding open ledger TX "
341 << tx.first->getTransactionID();
350 if (app_.config().standalone() || (
proposing && !wrongLCL))
352 if (prevLedger->isFlagLedger())
356 auto validations = app_.validators().negativeUNLFilter(
357 app_.getValidations().getTrustedForLedger(
358 prevLedger->info().parentHash, prevLedger->seq() - 1));
359 if (validations.size() >= app_.validators().quorum())
361 feeVote_->doVoting(prevLedger, validations, initialSet);
362 app_.getAmendmentTable().doVoting(
363 prevLedger, validations, initialSet);
367 prevLedger->isVotingLedger() &&
368 prevLedger->rules().enabled(featureNegativeUNL))
375 app_.validators().getTrustedMasterKeys(),
376 app_.getValidations(),
382 initialSet = initialSet->snapShot(
false);
386 LedgerIndex const seq = prevLedger->info().seq + 1;
389 initialSet->visitLeaves(
391 seq](boost::intrusive_ptr<SHAMapItem const>
const& item) {
395 censorshipDetector_.propose(std::move(proposed));
399 auto const setHash = initialSet->getHash().as_uint256();
402 std::move(initialSet),
404 initialLedger->info().parentHash,
408 app_.timeKeeper().closeTime(),
409 validatorKeys_.nodeID}};
427 std::move(consensusJson));
439 app_.getJobQueue().addJob(
442 [=,
this, cj = std::move(consensusJson)]()
mutable {
455 this->app_.getOPs().endConsensus();
471 bool closeTimeCorrect;
482 using namespace std::chrono_literals;
483 consensusCloseTime = prevLedger.
closeTime() + 1s;
484 closeTimeCorrect =
false;
490 consensusCloseTime, closeResolution, prevLedger.
closeTime());
491 closeTimeCorrect =
true;
495 <<
" val=" << (validating_ ?
"yes" :
"no")
496 <<
" corLCL=" << (haveCorrectLCL ?
"yes" :
"no")
497 <<
" fail=" << (consensusFail ?
"yes" :
"no");
498 JLOG(
j_.
debug()) <<
"Report: Prev = " << prevLedger.
id() <<
":"
510 JLOG(
j_.
debug()) <<
"Building canonical tx set: " << retriableTxs.key();
512 for (
auto const& item : *result.
txns.map_)
517 std::make_shared<STTx const>(
SerialIter{item.slice()}));
518 JLOG(
j_.
debug()) <<
" Tx: " << item.key();
522 failed.
insert(item.key());
524 <<
" Tx: " << item.key() <<
" throws: " << ex.
what();
528 auto built = buildLCL(
537 auto const newLCLHash = built.id();
538 JLOG(
j_.
debug()) <<
"Built ledger #" << built.seq() <<
": " << newLCLHash;
541 notify(protocol::neACCEPTED_LEDGER, built, haveCorrectLCL);
550 result.
txns.map_->visitLeaves(
551 [&
accepted](boost::intrusive_ptr<SHAMapItem const>
const& item) {
556 for (
auto const& r : retriableTxs)
557 failed.
insert(r.first.getTXID());
559 censorshipDetector_.check(
562 j = app_.journal(
"CensorshipDetector"),
564 if (failed.count(id))
567 auto const wait = curr - seq;
569 if (wait && (wait % censorshipWarnInternal == 0))
571 std::ostringstream ss;
572 ss <<
"Potential Censorship: Eligible tx " << id
573 <<
", which we are tracking since ledger " << seq
574 <<
" has not been included as of ledger " << curr <<
".";
576 JLOG(j.warn()) << ss.str();
584 validating_ = ledgerMaster_.isCompatible(
585 *built.ledger_,
j_.
warn(),
"Not validating");
587 if (validating_ && !consensusFail &&
588 app_.getValidations().canValidateSeq(built.seq()))
591 JLOG(
j_.
info()) <<
"CNF Val " << newLCLHash;
594 JLOG(
j_.
info()) <<
"CNF buildLCL " << newLCLHash;
597 ledgerMaster_.consensusBuilt(
598 built.ledger_, result.txns.id(), std::move(consensusJson));
613 bool anyDisputes =
false;
614 for (
auto const& [_, dispute] : result.disputes)
617 if (!dispute.getOurVote())
623 <<
"Test applying disputed transaction that did"
624 <<
" not get in " << dispute.tx().id();
627 auto txn = std::make_shared<STTx const>(sit);
634 retriableTxs.insert(txn);
640 JLOG(
j_.
debug()) <<
"Failed to apply transaction we voted "
652 auto const lastVal = ledgerMaster_.getValidatedLedger();
657 rules.
emplace(app_.config().features);
658 app_.openLedger().accept(
662 localTxs_.getTxSet(),
669 return app_.getTxQ().accept(app_, view);
674 app_.getOPs().reportFeeChange();
679 ledgerMaster_.switchLCL(built.ledger_);
683 ledgerMaster_.getClosedLedger()->info().hash == built.id(),
684 "ripple::RCLConsensus::Adaptor::doAccept : ledger hash match");
686 app_.openLedger().current()->info().parentHash == built.id(),
687 "ripple::RCLConsensus::Adaptor::doAccept : parent hash match");
698 auto closeTime = rawCloseTimes.self;
700 JLOG(
j_.
info()) <<
"We closed at "
701 << closeTime.time_since_epoch().count();
703 usec64_t closeTotal =
704 std::chrono::duration_cast<usec64_t>(closeTime.time_since_epoch());
707 for (
auto const& [t, v] : rawCloseTimes.peers)
713 std::chrono::duration_cast<usec64_t>(t.time_since_epoch()) * v;
716 closeTotal += usec64_t(closeCount / 2);
717 closeTotal /= closeCount;
722 auto offset = time_point{closeTotal} -
723 std::chrono::time_point_cast<duration>(closeTime);
724 JLOG(
j_.
info()) <<
"Our close offset is estimated at " << offset.count()
725 <<
" (" << closeCount <<
")";
727 app_.timeKeeper().adjustCloseTime(offset);
733 protocol::NodeEvent ne,
737 protocol::TMStatusChange s;
740 s.set_newevent(protocol::neLOST_SYNC);
744 s.set_ledgerseq(ledger.
seq());
746 s.set_ledgerhashprevious(
763 s.set_firstseq(uMin);
766 send_always(std::make_shared<Message>(s, protocol::mtSTATUS_CHANGE)));
767 JLOG(
j_.
trace()) <<
"send status change to peer";
775 bool closeTimeCorrect,
781 if (
auto const replayData = ledgerMaster_.releaseReplay())
784 replayData->parent()->info().hash == previousLedger.
id(),
785 "ripple::RCLConsensus::Adaptor::buildLCL : parent hash match");
800 using namespace std::chrono_literals;
801 app_.getTxQ().processClosedLedger(app_, *built, roundTime > 5s);
804 if (ledgerMaster_.storeLedger(built))
805 JLOG(
j_.
debug()) <<
"Consensus built ledger we already had";
806 else if (app_.getInboundLedgers().find(built->info().hash))
807 JLOG(
j_.
debug()) <<
"Consensus built ledger we were acquiring";
809 JLOG(
j_.
debug()) <<
"Consensus built new ledger";
819 using namespace std::chrono_literals;
821 auto validationTime = app_.timeKeeper().closeTime();
822 if (validationTime <= lastValidationTime_)
823 validationTime = lastValidationTime_ + 1s;
824 lastValidationTime_ = validationTime;
826 if (!validatorKeys_.keys)
828 JLOG(
j_.
warn()) <<
"RCLConsensus::Adaptor::validate: ValidatorKeys "
833 auto const& keys = *validatorKeys_.keys;
835 auto v = std::make_shared<STValidation>(
839 validatorKeys_.nodeID,
841 v.setFieldH256(sfLedgerHash, ledger.id());
842 v.setFieldH256(sfConsensusHash, txns.id());
844 v.setFieldU32(sfLedgerSequence, ledger.seq());
847 v.setFlag(vfFullValidation);
849 if (ledger.ledger_->rules().enabled(featureHardenedValidations))
854 if (auto const vl = ledgerMaster_.getValidatedLedger())
855 v.setFieldH256(sfValidatedHash, vl->info().hash);
857 v.setFieldU64(sfCookie, valCookie_);
860 if (ledger.ledger_->isVotingLedger())
862 sfServerVersion, BuildInfo::getEncodedVersion());
867 auto const& ft = app_.getFeeTrack();
868 auto const fee = std::max(ft.getLocalFee(), ft.getClusterFee());
869 if (fee > ft.getLoadBase())
870 v.setFieldU32(sfLoadFee, fee);
875 if (ledger.
ledger_->isVotingLedger())
878 feeVote_->doValidation(
879 ledger.ledger_->fees(), ledger.ledger_->rules(), v);
884 auto const amendments = app_.getAmendmentTable().doValidation(
885 getEnabledAmendments(*ledger.ledger_));
887 if (!amendments.empty())
889 sfAmendments, STVector256(sfAmendments, amendments));
893 auto const serialized = v->getSerialized();
901 protocol::TMValidation val;
902 val.set_validation(serialized.data(), serialized.size());
903 app_.overlay().broadcast(val);
906 app_.getOPs().pubValidation(v);
912 JLOG(
j_.
info()) <<
"Consensus mode change before=" <<
to_string(before)
920 censorshipDetector_.reset();
948 JLOG(
j_.
error()) <<
"During consensus timerEntry: " << mn.
what();
964 JLOG(
j_.
error()) <<
"During consensus gotTxSet: " << mn.
what();
986 return consensus_.peerProposal(now, newProposal);
996 validating_ = validatorKeys_.keys &&
997 prevLgr.
seq() >= app_.getMaxDisallowedLedger() &&
998 !app_.getOPs().isBlocked();
1002 if (validating_ && !app_.config().standalone() && app_.validators().count())
1004 auto const when = app_.validators().expires();
1006 if (!when || *when < app_.timeKeeper().now())
1008 JLOG(
j_.
error()) <<
"Voluntarily bowing out of consensus process "
1009 "because of an expired validator list.";
1010 validating_ =
false;
1018 JLOG(
j_.
info()) <<
"Entering consensus process, validating, synced="
1019 << (synced ?
"yes" :
"no");
1024 JLOG(
j_.
info()) <<
"Entering consensus process, watching, synced="
1025 << (synced ?
"yes" :
"no");
1029 inboundTransactions_.newRound(prevLgr.
seq());
1032 if (prevLgr.
ledger_->rules().enabled(featureNegativeUNL) &&
1033 !nowTrusted.
empty())
1034 nUnlVote_.newValidators(prevLgr.
seq() + 1, nowTrusted);
1037 return validating_ && synced;
1043 return ledgerMaster_.haveValidated();
1049 return ledgerMaster_.getValidLedgerIndex();
1055 return app_.validators().getQuorumKeys();
1063 return app_.getValidations().laggards(seq, trustedKeys);
1069 return validatorKeys_.keys.has_value();
1075 if (!positions && app_.getOPs().isFull())
Decorator for streaming out compact json.
A generic endpoint for log messages.
Stream trace() const
Severity stream access functions.
virtual Overlay & overlay()=0
virtual TimeKeeper & timeKeeper()=0
Holds transactions which were deferred to the next pass of consensus.
static std::uint32_t const seqJoin
NetClock::time_point const & closeTime() const
The current position on the consensus close time.
std::chrono::milliseconds read() const
Manages the acquisition and lifetime of transaction sets.
std::uint32_t getEarliestFetch()
bool getFullValidatedRange(std::uint32_t &minVal, std::uint32_t &maxVal)
void foreach(Function f) const
Visit every active peer.
Slice slice() const noexcept
void propose(RCLCxPeerPos::Proposal const &proposal)
Propose the given position to my peers.
ValidatorKeys const & validatorKeys_
Result onClose(RCLCxLedger const &ledger, NetClock::time_point const &closeTime, ConsensusMode mode)
Close the open ledger and return initial consensus position.
void share(RCLCxPeerPos const &peerPos)
Share the given proposal with all peers.
void doAccept(Result const &result, RCLCxLedger const &prevLedger, NetClock::duration closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson)
Accept a new ledger based on the given transactions.
Adaptor(Application &app, std::unique_ptr< FeeVote > &&feeVote, LedgerMaster &ledgerMaster, LocalTxs &localTxs, InboundTransactions &inboundTransactions, ValidatorKeys const &validatorKeys, beast::Journal journal)
void onModeChange(ConsensusMode before, ConsensusMode after)
Notified of change in consensus mode.
std::size_t laggards(Ledger_t::Seq const seq, hash_set< NodeKey_t > &trustedKeys) const
void onForceAccept(Result const &result, RCLCxLedger const &prevLedger, NetClock::duration const &closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson)
Process the accepted ledger that was a result of simulation/force accept.
bool validator() const
Whether I am a validator.
RCLCxLedger buildLCL(RCLCxLedger const &previousLedger, CanonicalTXSet &retriableTxs, NetClock::time_point closeTime, bool closeTimeCorrect, NetClock::duration closeResolution, std::chrono::milliseconds roundTime, std::set< TxID > &failedTxs)
Build the new last closed ledger.
void onAccept(Result const &result, RCLCxLedger const &prevLedger, NetClock::duration const &closeResolution, ConsensusCloseTimes const &rawCloseTimes, ConsensusMode const &mode, Json::Value &&consensusJson)
Process the accepted ledger.
std::optional< RCLCxLedger > acquireLedger(LedgerHash const &hash)
Attempt to acquire a specific ledger.
LedgerIndex getValidLedgerIndex() const
std::size_t proposersFinished(RCLCxLedger const &ledger, LedgerHash const &h) const
Number of proposers that have validated a ledger descended from requested ledger.
std::optional< RCLTxSet > acquireTxSet(RCLTxSet::ID const &setId)
Acquire the transaction set associated with a proposal.
bool hasOpenTransactions() const
Whether the open ledger has any transactions.
LedgerMaster & ledgerMaster_
bool haveValidated() const
void validate(RCLCxLedger const &ledger, RCLTxSet const &txns, bool proposing)
Validate the given ledger and share with peers as necessary.
std::uint64_t const valCookie_
bool preStartRound(RCLCxLedger const &prevLedger, hash_set< NodeID > const &nowTrusted)
Called before kicking off a new consensus round.
uint256 getPrevLedger(uint256 ledgerID, RCLCxLedger const &ledger, ConsensusMode mode)
Get the ID of the previous ledger/last closed ledger(LCL) on the network.
std::size_t proposersValidated(LedgerHash const &h) const
Number of proposers that have validated the given ledger.
void notify(protocol::NodeEvent ne, RCLCxLedger const &ledger, bool haveCorrectLCL)
Notify peers of a consensus state change.
void updateOperatingMode(std::size_t const positions) const
Update operating mode based on current peer positions.
std::pair< std::size_t, hash_set< NodeKey_t > > getQuorumKeys() const
void startRound(NetClock::time_point const &now, RCLCxLedger::ID const &prevLgrId, RCLCxLedger const &prevLgr, hash_set< NodeID > const &nowUntrusted, hash_set< NodeID > const &nowTrusted)
Adjust the set of trusted validators and kick-off the next round of consensus.
void gotTxSet(NetClock::time_point const &now, RCLTxSet const &txSet)
void simulate(NetClock::time_point const &now, std::optional< std::chrono::milliseconds > consensusDelay)
RCLConsensus(Application &app, std::unique_ptr< FeeVote > &&feeVote, LedgerMaster &ledgerMaster, LocalTxs &localTxs, InboundTransactions &inboundTransactions, Consensus< Adaptor >::clock_type const &clock, ValidatorKeys const &validatorKeys, beast::Journal journal)
Constructor.
void timerEntry(NetClock::time_point const &now)
ConsensusMode mode() const
std::recursive_mutex mutex_
Consensus< Adaptor > consensus_
bool peerProposal(NetClock::time_point const &now, RCLCxPeerPos const &newProposal)
Json::Value getJson(bool full) const
Represents a ledger in RCLConsensus.
Seq const & seq() const
Sequence number of the ledger.
ID const & id() const
Unique identifier (hash) of this ledger.
std::shared_ptr< Ledger const > ledger_
The ledger instance.
NetClock::time_point closeTime() const
The close time of this ledger.
ID const & parentID() const
Unique identifier (hash) of this ledger's parent.
A peer's signed, proposed position for use in RCLConsensus.
Proposal const & proposal() const
PublicKey const & publicKey() const
Public key of peer that sent the proposal.
Slice signature() const
Signature of the proposal (not necessarily verified)
uint256 const & suppressionID() const
Unique id used by hash router to suppress duplicates.
Represents a transaction in RCLConsensus.
ID const & id() const
The unique identifier/hash of the transaction.
boost::intrusive_ptr< SHAMapItem const > tx_
The SHAMapItem that represents the transaction.
Represents a set of transactions in RCLConsensus.
ID id() const
The unique ID/hash of the transaction set.
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
Wraps a ledger instance for use in generic Validations LedgerTrie.
beast::Journal journal() const
Slice slice() const noexcept
time_point now() const override
Returns the current time, using the server's clock.
std::optional< std::pair< Seq, ID > > getPreferred(Ledger const &curr)
Return the sequence number and ID of the preferred working ledger.
Adaptor const & adaptor() const
Return the adaptor instance.
std::size_t getNodesAfter(Ledger const &ledger, ID const &ledgerID)
Count the number of current trusted validators working on a ledger after the specified one.
Validator keys and manifest as set in configuration file.
std::optional< Keys > keys
T emplace_back(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::shared_ptr< Ledger > buildLedger(std::shared_ptr< Ledger const > const &parent, NetClock::time_point closeTime, const bool closeTimeCorrect, NetClock::duration closeResolution, Application &app, CanonicalTXSet &txns, std::set< TxID > &failedTxs, beast::Journal j)
Build a new ledger by applying consensus transactions.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
uint256 proposalUniqueId(uint256 const &proposeHash, uint256 const &previousLedger, std::uint32_t proposeSeq, NetClock::time_point closeTime, Slice const &publicKey, Slice const &signature)
Calculate a unique identifier for a signed proposal.
std::enable_if_t< std::is_integral< Integral >::value, Integral > rand_int()
std::chrono::time_point< Clock, Duration > effCloseTime(std::chrono::time_point< Clock, Duration > closeTime, std::chrono::duration< Rep, Period > resolution, std::chrono::time_point< Clock, Duration > priorCloseTime)
Calculate the effective ledger close time.
bool isPseudoTx(STObject const &tx)
Check whether a transaction is a pseudo-transaction.
ConsensusMode
Represents how a node currently participates in Consensus.
@ wrongLedger
We have the wrong ledger and are attempting to acquire it.
@ proposing
We are normal participant in consensus and propose our position.
@ observing
We are observing peer positions, but not proposing our position.
void handleNewValidation(Application &app, std::shared_ptr< STValidation > const &val, std::string const &source, BypassAccept const bypassAccept, std::optional< beast::Journal > j)
Handle a new validation.
@ CONNECTED
convinced we are talking to the network
@ FULL
we have the ledger and can even validate
csprng_engine & crypto_prng()
The default cryptographically secure PRNG.
@ MovedOn
The network has consensus without us.
@ Yes
We have consensus along with the network.
@ accepted
Manifest is valid.
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
Buffer signDigest(PublicKey const &pk, SecretKey const &sk, uint256 const &digest)
Generate a signature for a message digest.
boost::intrusive_ptr< SHAMapItem > make_shamapitem(uint256 const &tag, Slice data)
Rules makeRulesGivenLedger(DigestAwareReadView const &ledger, Rules const ¤t)
std::string to_string(base_uint< Bits, Tag > const &a)
@ ledgerMaster
ledger master data for signing
@ proposal
proposal for signing
void Rethrow()
Rethrow the exception currently being handled.
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
static bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Stores the set of initial close times.
Encapsulates the result of consensus.
TxSet_t txns
The set of transactions consensus agrees go in the ledger.
Proposal_t position
Our proposed position on transactions/close time.
Sends a message to all peers.