rippled
|
Classes | |
struct | ServerFeeSummary |
Server fees published on server subscription. More... | |
class | StateAccounting |
State accounting records two attributes for each possible server state: 1) Amount of time spent in each state (in microseconds). More... | |
struct | Stats |
struct | SubAccountHistoryIndex |
struct | SubAccountHistoryInfo |
struct | SubAccountHistoryInfoWeak |
class | TransactionStatus |
Transaction with input flags and results to be applied in batches. More... | |
Public Types | |
enum | FailHard : unsigned char { FailHard::no, FailHard::yes } |
using | clock_type = beast::abstract_clock< std::chrono::steady_clock > |
Public Member Functions | |
NetworkOPsImp (Application &app, NetworkOPs::clock_type &clock, bool standalone, std::size_t minPeerCount, bool start_valid, JobQueue &job_queue, LedgerMaster &ledgerMaster, ValidatorKeys const &validatorKeys, boost::asio::io_service &io_svc, beast::Journal journal, beast::insight::Collector::ptr const &collector) | |
~NetworkOPsImp () override | |
OperatingMode | getOperatingMode () const override |
std::string | strOperatingMode (OperatingMode const mode, bool const admin) const override |
std::string | strOperatingMode (bool const admin=false) const override |
void | submitTransaction (std::shared_ptr< STTx const > const &) override |
void | processTransaction (std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, FailHard failType) override |
Process transactions as they arrive from the network or which are submitted by clients. More... | |
void | doTransactionSync (std::shared_ptr< Transaction > transaction, bool bUnlimited, FailHard failType) |
For transactions submitted directly by a client, apply batch of transactions and wait for this transaction to complete. More... | |
void | doTransactionAsync (std::shared_ptr< Transaction > transaction, bool bUnlimited, FailHard failtype) |
For transactions not submitted by a locally connected client, fire and forget. More... | |
void | transactionBatch () |
Apply transactions in batches. More... | |
void | apply (std::unique_lock< std::mutex > &batchLock) |
Attempt to apply transactions and post-process based on the results. More... | |
Json::Value | getOwnerInfo (std::shared_ptr< ReadView const > lpLedger, AccountID const &account) override |
void | getBookPage (std::shared_ptr< ReadView const > &lpLedger, Book const &, AccountID const &uTakerID, const bool bProof, unsigned int iLimit, Json::Value const &jvMarker, Json::Value &jvResult) override |
bool | processTrustedProposal (RCLCxPeerPos proposal) override |
bool | recvValidation (std::shared_ptr< STValidation > const &val, std::string const &source) override |
void | mapComplete (std::shared_ptr< SHAMap > const &map, bool fromAcquire) override |
bool | beginConsensus (uint256 const &networkClosed) override |
void | endConsensus () override |
void | setStandAlone () override |
void | setStateTimer () override |
Called to initially start our timers. More... | |
void | setNeedNetworkLedger () override |
void | clearNeedNetworkLedger () override |
bool | isNeedNetworkLedger () override |
bool | isFull () override |
void | setMode (OperatingMode om) override |
bool | isBlocked () override |
bool | isAmendmentBlocked () override |
void | setAmendmentBlocked () override |
bool | isAmendmentWarned () override |
void | setAmendmentWarned () override |
void | clearAmendmentWarned () override |
bool | isUNLBlocked () override |
void | setUNLBlocked () override |
void | clearUNLBlocked () override |
void | consensusViewChange () override |
Json::Value | getConsensusInfo () override |
Json::Value | getServerInfo (bool human, bool admin, bool counters) override |
void | clearLedgerFetch () override |
Json::Value | getLedgerFetchInfo () override |
std::uint32_t | acceptLedger (std::optional< std::chrono::milliseconds > consensusDelay) override |
Accepts the current transaction tree, return the new ledger's sequence. More... | |
void | reportFeeChange () override |
void | reportConsensusStateChange (ConsensusPhase phase) |
void | updateLocalTx (ReadView const &view) override |
std::size_t | getLocalTxCount () override |
void | pubLedger (std::shared_ptr< ReadView const > const &lpAccepted) override |
void | pubProposedTransaction (std::shared_ptr< ReadView const > const &ledger, std::shared_ptr< STTx const > const &transaction, TER result) override |
void | pubValidation (std::shared_ptr< STValidation > const &val) override |
void | forwardValidation (Json::Value const &jvObj) override |
void | forwardManifest (Json::Value const &jvObj) override |
void | forwardProposedTransaction (Json::Value const &jvObj) override |
void | forwardProposedAccountTransaction (Json::Value const &jvObj) override |
void | subAccount (InfoSub::ref ispListener, hash_set< AccountID > const &vnaAccountIDs, bool rt) override |
void | unsubAccount (InfoSub::ref ispListener, hash_set< AccountID > const &vnaAccountIDs, bool rt) override |
void | unsubAccountInternal (std::uint64_t seq, hash_set< AccountID > const &vnaAccountIDs, bool rt) override |
error_code_i | subAccountHistory (InfoSub::ref ispListener, AccountID const &account) override |
subscribe an account's new transactions and retrieve the account's historical transactions More... | |
void | unsubAccountHistory (InfoSub::ref ispListener, AccountID const &account, bool historyOnly) override |
unsubscribe an account's transactions More... | |
void | unsubAccountHistoryInternal (std::uint64_t seq, AccountID const &account, bool historyOnly) override |
bool | subLedger (InfoSub::ref ispListener, Json::Value &jvResult) override |
bool | unsubLedger (std::uint64_t uListener) override |
bool | subBookChanges (InfoSub::ref ispListener) override |
bool | unsubBookChanges (std::uint64_t uListener) override |
bool | subServer (InfoSub::ref ispListener, Json::Value &jvResult, bool admin) override |
bool | unsubServer (std::uint64_t uListener) override |
bool | subBook (InfoSub::ref ispListener, Book const &) override |
bool | unsubBook (std::uint64_t uListener, Book const &) override |
bool | subManifests (InfoSub::ref ispListener) override |
bool | unsubManifests (std::uint64_t uListener) override |
void | pubManifest (Manifest const &) override |
bool | subTransactions (InfoSub::ref ispListener) override |
bool | unsubTransactions (std::uint64_t uListener) override |
bool | subRTTransactions (InfoSub::ref ispListener) override |
bool | unsubRTTransactions (std::uint64_t uListener) override |
bool | subValidations (InfoSub::ref ispListener) override |
bool | unsubValidations (std::uint64_t uListener) override |
bool | subPeerStatus (InfoSub::ref ispListener) override |
bool | unsubPeerStatus (std::uint64_t uListener) override |
void | pubPeerStatus (std::function< Json::Value(void)> const &) override |
bool | subConsensus (InfoSub::ref ispListener) override |
bool | unsubConsensus (std::uint64_t uListener) override |
InfoSub::pointer | findRpcSub (std::string const &strUrl) override |
InfoSub::pointer | addRpcSub (std::string const &strUrl, InfoSub::ref) override |
bool | tryRemoveRpcSub (std::string const &strUrl) override |
void | stop () override |
void | stateAccounting (Json::Value &obj) override |
Static Public Member Functions | |
static FailHard | doFailHard (bool noMeansDont) |
Private Types | |
enum | DispatchState : unsigned char { DispatchState::none, DispatchState::scheduled, DispatchState::running } |
Synchronization states for transaction batches. More... | |
enum | SubTypes { sLedger, sManifests, sServer, sTransactions, sRTTransactions, sValidations, sPeerStatus, sConsensusPhase, sBookChanges, sLastEntry = sBookChanges } |
using | SubMapType = hash_map< std::uint64_t, InfoSub::wptr > |
using | SubInfoMapType = hash_map< AccountID, SubMapType > |
using | subRpcMapType = hash_map< std::string, InfoSub::pointer > |
using | SubAccountHistoryMapType = hash_map< AccountID, hash_map< std::uint64_t, SubAccountHistoryInfoWeak > > |
Static Private Attributes | |
static const std::array< char const *, 5 > | states_ = stateNames |
Definition at line 79 of file NetworkOPs.cpp.
|
private |
Definition at line 650 of file NetworkOPs.cpp.
|
private |
Definition at line 651 of file NetworkOPs.cpp.
|
private |
Definition at line 652 of file NetworkOPs.cpp.
|
private |
Definition at line 697 of file NetworkOPs.cpp.
|
inherited |
Definition at line 89 of file NetworkOPs.h.
|
strongprivate |
Synchronization states for transaction batches.
Enumerator | |
---|---|
none | |
scheduled | |
running |
Definition at line 109 of file NetworkOPs.cpp.
|
private |
Enumerator | |
---|---|
sLedger | |
sManifests | |
sServer | |
sTransactions | |
sRTTransactions | |
sValidations | |
sPeerStatus | |
sConsensusPhase | |
sBookChanges | |
sLastEntry |
Definition at line 743 of file NetworkOPs.cpp.
|
stronginherited |
Enumerator | |
---|---|
no | |
yes |
Definition at line 91 of file NetworkOPs.h.
ripple::NetworkOPsImp::NetworkOPsImp | ( | Application & | app, |
NetworkOPs::clock_type & | clock, | ||
bool | standalone, | ||
std::size_t | minPeerCount, | ||
bool | start_valid, | ||
JobQueue & | job_queue, | ||
LedgerMaster & | ledgerMaster, | ||
ValidatorKeys const & | validatorKeys, | ||
boost::asio::io_service & | io_svc, | ||
beast::Journal | journal, | ||
beast::insight::Collector::ptr const & | collector | ||
) |
Definition at line 215 of file NetworkOPs.cpp.
|
override |
Definition at line 253 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 858 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1110 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 864 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1130 of file NetworkOPs.cpp.
|
overridevirtual |
Process transactions as they arrive from the network or which are submitted by clients.
Process local transactions synchronously
transaction | Transaction object |
bUnlimited | Whether a privileged client connection submitted it. |
bLocal | Client submission. |
failType | fail_hard setting from transaction submission. |
Implements ripple::NetworkOPs.
Definition at line 1184 of file NetworkOPs.cpp.
void ripple::NetworkOPsImp::doTransactionSync | ( | std::shared_ptr< Transaction > | transaction, |
bool | bUnlimited, | ||
FailHard | failType | ||
) |
For transactions submitted directly by a client, apply batch of transactions and wait for this transaction to complete.
transaction | Transaction object. |
bUnliimited | Whether a privileged client connection submitted it. |
failType | fail_hard setting from transaction submission. |
Definition at line 1258 of file NetworkOPs.cpp.
void ripple::NetworkOPsImp::doTransactionAsync | ( | std::shared_ptr< Transaction > | transaction, |
bool | bUnlimited, | ||
FailHard | failtype | ||
) |
For transactions not submitted by a locally connected client, fire and forget.
Add to batch and trigger it to be processed if there's no batch currently being applied.
transaction | Transaction object |
bUnlimited | Whether a privileged client connection submitted it. |
failType | fail_hard setting from transaction submission. |
Definition at line 1233 of file NetworkOPs.cpp.
void ripple::NetworkOPsImp::transactionBatch | ( | ) |
Apply transactions in batches.
Continue until none are queued.
Definition at line 1298 of file NetworkOPs.cpp.
void ripple::NetworkOPsImp::apply | ( | std::unique_lock< std::mutex > & | batchLock | ) |
Attempt to apply transactions and post-process based on the results.
Lock | that protects the transaction batching |
Definition at line 1312 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1519 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 4155 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1859 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2273 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1865 of file NetworkOPs.cpp.
|
private |
Definition at line 1746 of file NetworkOPs.cpp.
|
private |
Definition at line 1641 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1800 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1884 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 870 of file NetworkOPs.cpp.
|
overridevirtual |
Called to initially start our timers.
Not called for stand-alone mode.
Implements ripple::NetworkOPs.
Definition at line 919 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 876 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 882 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 888 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 894 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2244 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1585 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1591 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1597 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1604 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1610 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1616 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1622 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1628 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1635 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 1940 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2290 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2296 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2668 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2674 of file NetworkOPs.cpp.
|
overridevirtual |
Accepts the current transaction tree, return the new ledger's sequence.
This API is only used via RPC with the server in STANDALONE mode and performs a virtual consensus round, with all the transactions we are proposing being accepted.
Implements ripple::NetworkOPs.
Definition at line 3880 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2980 of file NetworkOPs.cpp.
void ripple::NetworkOPsImp::reportConsensusStateChange | ( | ConsensusPhase | phase | ) |
Definition at line 3000 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 3009 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 3014 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2868 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2680 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2123 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2742 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2762 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2711 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 2800 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3328 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3365 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3381 of file NetworkOPs.cpp.
|
overridevirtual |
subscribe an account's new transactions and retrieve the account's historical transactions
Implements ripple::InfoSub::Source.
Definition at line 3773 of file NetworkOPs.cpp.
|
overridevirtual |
unsubscribe an account's transactions
historyOnly | if true, only stop historical transactions |
Implements ripple::InfoSub::Source.
Definition at line 3819 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3830 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3900 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3940 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3930 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3948 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3974 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4004 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3861 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3871 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3956 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 3966 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 1949 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4012 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4022 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4030 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4040 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4048 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4064 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4072 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4082 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 2215 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4090 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4100 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4107 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4120 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::InfoSub::Source.
Definition at line 4130 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 564 of file NetworkOPs.cpp.
|
overridevirtual |
Implements ripple::NetworkOPs.
Definition at line 4057 of file NetworkOPs.cpp.
|
private |
Definition at line 929 of file NetworkOPs.cpp.
|
private |
Definition at line 961 of file NetworkOPs.cpp.
|
private |
Definition at line 975 of file NetworkOPs.cpp.
|
private |
Definition at line 1004 of file NetworkOPs.cpp.
|
private |
Definition at line 1062 of file NetworkOPs.cpp.
|
private |
Definition at line 3022 of file NetworkOPs.cpp.
|
private |
Definition at line 3080 of file NetworkOPs.cpp.
|
private |
Definition at line 3135 of file NetworkOPs.cpp.
|
private |
Definition at line 3258 of file NetworkOPs.cpp.
|
private |
Definition at line 2028 of file NetworkOPs.cpp.
|
private |
Definition at line 2096 of file NetworkOPs.cpp.
|
private |
Definition at line 900 of file NetworkOPs.cpp.
|
private |
Definition at line 3729 of file NetworkOPs.cpp.
|
private |
Definition at line 3409 of file NetworkOPs.cpp.
|
private |
Definition at line 991 of file NetworkOPs.cpp.
|
private |
Definition at line 4495 of file NetworkOPs.cpp.
|
staticinherited |
Definition at line 93 of file NetworkOPs.h.
|
staticprivate |
Definition at line 115 of file NetworkOPs.cpp.
|
private |
Definition at line 711 of file NetworkOPs.cpp.
|
private |
Definition at line 712 of file NetworkOPs.cpp.
|
private |
Definition at line 714 of file NetworkOPs.cpp.
|
private |
Definition at line 716 of file NetworkOPs.cpp.
|
private |
Definition at line 718 of file NetworkOPs.cpp.
|
private |
Definition at line 720 of file NetworkOPs.cpp.
|
private |
Definition at line 721 of file NetworkOPs.cpp.
|
private |
Definition at line 722 of file NetworkOPs.cpp.
|
private |
Definition at line 723 of file NetworkOPs.cpp.
|
private |
Definition at line 725 of file NetworkOPs.cpp.
|
private |
Definition at line 726 of file NetworkOPs.cpp.
|
private |
Definition at line 727 of file NetworkOPs.cpp.
|
private |
Definition at line 728 of file NetworkOPs.cpp.
|
private |
Definition at line 730 of file NetworkOPs.cpp.
|
private |
Definition at line 732 of file NetworkOPs.cpp.
|
private |
Definition at line 734 of file NetworkOPs.cpp.
|
private |
Definition at line 736 of file NetworkOPs.cpp.
|
private |
Definition at line 737 of file NetworkOPs.cpp.
|
private |
Definition at line 739 of file NetworkOPs.cpp.
|
private |
Definition at line 741 of file NetworkOPs.cpp.
|
private |
Definition at line 757 of file NetworkOPs.cpp.
|
private |
Definition at line 759 of file NetworkOPs.cpp.
|
private |
Definition at line 761 of file NetworkOPs.cpp.
|
private |
Definition at line 764 of file NetworkOPs.cpp.
|
private |
Definition at line 767 of file NetworkOPs.cpp.
|
private |
Definition at line 770 of file NetworkOPs.cpp.
|
private |
Definition at line 771 of file NetworkOPs.cpp.
|
private |
Definition at line 772 of file NetworkOPs.cpp.
|
private |
Definition at line 773 of file NetworkOPs.cpp.
|
private |
Definition at line 775 of file NetworkOPs.cpp.
|
private |
Definition at line 829 of file NetworkOPs.cpp.
|
private |
Definition at line 830 of file NetworkOPs.cpp.