[{"data":1,"prerenderedAt":2825},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle":3,"docs-kids-\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle":2322,"docs-tracks":2323},{"id":4,"title":5,"body":6,"description":2314,"extension":2315,"meta":2316,"navigation":375,"path":2317,"seo":2318,"source":2319,"stem":2320,"__hash__":2321},"docs\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle.md","Consensus Lifecycle",{"type":7,"value":8,"toc":2296},"minimark",[9,13,16,21,25,28,32,43,47,53,56,169,174,187,191,196,199,205,210,221,225,230,233,443,448,462,466,471,476,554,557,563,568,573,587,592,598,603,621,625,631,636,650,654,659,662,928,933,938,946,951,960,965,971,979,984,1002,1007,1047,1051,1056,1059,1065,1070,1084,1088,1093,1097,1165,1170,1176,1179,1185,1190,1195,1206,1211,1222,1227,1238,1242,1247,1756,1761,1794,1797,1800,1803,1812,1817,1820,1823,1828,1889,1893,1898,1901,1907,1912,1917,1928,1933,1941,1946,1954,1958,1963,1966,1972,1976,1981,1989,1994,2005,2010,2018,2022,2027,2030,2036,2040,2045,2048,2089,2093,2099,2103,2108,2252,2257,2289,2292],[10,11,5],"h1",{"id":12},"consensus-lifecycle",[14,15],"hr",{},[17,18,20],"h2",{"id":19},"introduction","Introduction",[22,23,24],"p",{},"This chapter traces through the complete consensus lifecycle, from the initiation of a new round to the acceptance of a validated ledger. Understanding this flow is essential for debugging consensus issues, implementing protocol changes, and reasoning about network behavior.",[22,26,27],{},"We follow the execution path through the actual codebase, showing how each component interacts to achieve distributed agreement.",[17,29,31],{"id":30},"high-level-flow","High-Level Flow",[33,34,39],"pre",{"className":35,"code":37,"language":38},[36],"language-text","┌──────────────────────────────────────────────────────────────────────┐\n│                     CONSENSUS LIFECYCLE                              │\n│                                                                      │\n│  Application.cpp                                                     │\n│       │                                                              │\n│       ▼                                                              │\n│  NetworkOPs::beginConsensus()                                        │\n│       │                                                              │\n│       ▼                                                              │\n│  ┌─────────────────────────────────────────────────────────────┐     │\n│  │                    CONSENSUS ROUND                          │     │\n│  │                                                             │     │\n│  │   preStartRound() ──► startRound() ──► startRoundInternal() │     │\n│  │         │                                                   │     │\n│  │         ▼                                                   │     │\n│  │   ┌──────────┐    ┌────────────┐    ┌──────────┐            │     │\n│  │   │   OPEN   │───►│ ESTABLISH  │───►│ ACCEPTED │            │     │\n│  │   └──────────┘    └────────────┘    └──────────┘            │     │\n│  │         │               │                │                  │     │\n│  │     timerEntry()    timerEntry()     onAccept()             │     │\n│  └─────────────────────────────────────────────────────────────┘     │\n│       │                                                              │\n│       ▼                                                              │\n│  NetworkOPs::endConsensus()                                          │\n│       │                                                              │\n│       ▼                                                              │\n│  Loop back to beginConsensus()                                       │\n└──────────────────────────────────────────────────────────────────────┘\n","text",[40,41,37],"code",{"__ignoreMap":42},"",[17,44,46],{"id":45},"stage-1-initiating-consensus","Stage 1: Initiating Consensus",[22,48,49],{},[50,51,52],"strong",{},"Entry Point: Application.cpp",[22,54,55],{},"Consensus begins at application startup:",[33,57,61],{"className":58,"code":59,"language":60,"meta":42,"style":42},"language-cpp shiki shiki-themes github-dark-high-contrast","\u002F\u002F Application.cpp line 1385\n\u002F\u002F Start first consensus round\nif (!m_networkOPs->beginConsensus(\n        m_ledgerMaster->getClosedLedger()->header().hash, {}))\n{\n    JLOG(m_journal.fatal()) \u003C\u003C \"Unable to start consensus\";\n    return false;\n}\n","cpp",[40,62,63,72,78,102,120,126,151,163],{"__ignoreMap":42},[64,65,68],"span",{"class":66,"line":67},"line",1,[64,69,71],{"class":70},"sQrFR","\u002F\u002F Application.cpp line 1385\n",[64,73,75],{"class":66,"line":74},2,[64,76,77],{"class":70},"\u002F\u002F Start first consensus round\n",[64,79,81,85,89,92,95,99],{"class":66,"line":80},3,[64,82,84],{"class":83},"sWyjQ","if",[64,86,88],{"class":87},"sMAXC"," (",[64,90,91],{"class":83},"!",[64,93,94],{"class":87},"m_networkOPs->",[64,96,98],{"class":97},"sj_SG","beginConsensus",[64,100,101],{"class":87},"(\n",[64,103,105,108,111,114,117],{"class":66,"line":104},4,[64,106,107],{"class":87},"        m_ledgerMaster->",[64,109,110],{"class":97},"getClosedLedger",[64,112,113],{"class":87},"()->",[64,115,116],{"class":97},"header",[64,118,119],{"class":87},"().hash, {}))\n",[64,121,123],{"class":66,"line":122},5,[64,124,125],{"class":87},"{\n",[64,127,129,132,135,138,141,144,148],{"class":66,"line":128},6,[64,130,131],{"class":97},"    JLOG",[64,133,134],{"class":87},"(m_journal.",[64,136,137],{"class":97},"fatal",[64,139,140],{"class":87},"()) ",[64,142,143],{"class":83},"\u003C\u003C",[64,145,147],{"class":146},"sTRMh"," \"Unable to start consensus\"",[64,149,150],{"class":87},";\n",[64,152,154,157,161],{"class":66,"line":153},7,[64,155,156],{"class":83},"    return",[64,158,160],{"class":159},"sCcAr"," false",[64,162,150],{"class":87},[64,164,166],{"class":66,"line":165},8,[64,167,168],{"class":87},"}\n",[22,170,171],{},[50,172,173],{},"Key Actions:",[175,176,177,181,184],"ul",{},[178,179,180],"li",{},"Passes the hash of the last closed ledger",[178,182,183],{},"NetworkOPs coordinates the consensus initiation",[178,185,186],{},"Failure to start consensus is fatal",[17,188,190],{"id":189},"stage-2-pre-start-preparation","Stage 2: Pre-Start Preparation",[22,192,193],{},[50,194,195],{},"Function: RCLConsensus::Adaptor::preStartRound",[22,197,198],{},"Before a round begins, the system prepares:",[33,200,203],{"className":201,"code":202,"language":38},[36],"┌─────────────────────────────────────────────────────────────┐\n│                   PRE-START ROUND                           │\n│                                                             │\n│   ┌──────────────┐    ┌──────────────┐    ┌─────────────┐   │\n│   │    Verify    │───►│    Clean     │───►│   Prepare   │   │\n│   │    Sync      │    │    State     │    │    Data     │   │\n│   └──────────────┘    └──────────────┘    └─────────────┘   │\n│                                                             │\n│   • Check node synchronization                              │\n│   • Verify ledger integrity                                 │\n│   • Reset previous round state                              │\n│   • Initialize data structures                              │\n└─────────────────────────────────────────────────────────────┘\n",[40,204,202],{"__ignoreMap":42},[22,206,207],{},[50,208,209],{},"Checks Performed:",[175,211,212,215,218],{},[178,213,214],{},"Is the node synchronized with the network?",[178,216,217],{},"Is the previous ledger valid and complete?",[178,219,220],{},"Are all required data structures ready?",[17,222,224],{"id":223},"stage-3-starting-the-round","Stage 3: Starting the Round",[22,226,227],{},[50,228,229],{},"Function: Consensus::startRound",[22,231,232],{},"This function establishes the round parameters:",[33,234,236],{"className":58,"code":235,"language":60,"meta":42,"style":42},"void startRound(\n      NetClock::time_point const& now,\n      typename Ledger_t::ID const& prevLedgerID,\n      Ledger_t prevLedger,\n      hash_set\u003CNodeID_t> const& nowUntrusted,\n      hash_set\u003CNodeID_t> const& nowTrusted)\n  {\n      \u002F\u002F Adaptor determines if we should propose\n      bool proposing = adaptor_.preStartRound(prevLedger, nowTrusted);\n\n      \u002F\u002F Set initial mode\n      ConsensusMode mode = proposing ?\n          ConsensusMode::proposing : ConsensusMode::observing;\n\n      \u002F\u002F Enter internal initialization\n      startRoundInternal(now, prevLedgerID, prevLedger, mode, clog);\n  }\n",[40,237,238,248,269,289,299,321,339,344,349,370,377,383,399,417,422,428,437],{"__ignoreMap":42},[64,239,240,243,246],{"class":66,"line":67},[64,241,242],{"class":83},"void",[64,244,245],{"class":97}," startRound",[64,247,101],{"class":87},[64,249,250,254,257,260,263,266],{"class":66,"line":74},[64,251,253],{"class":252},"s_sBn","      NetClock",[64,255,256],{"class":87},"::",[64,258,259],{"class":252},"time_point",[64,261,262],{"class":83}," const&",[64,264,265],{"class":252}," now",[64,267,268],{"class":87},",\n",[64,270,271,274,277,279,282,284,287],{"class":66,"line":80},[64,272,273],{"class":83},"      typename",[64,275,276],{"class":159}," Ledger_t",[64,278,256],{"class":87},[64,280,281],{"class":252},"ID",[64,283,262],{"class":83},[64,285,286],{"class":252}," prevLedgerID",[64,288,268],{"class":87},[64,290,291,294,297],{"class":66,"line":104},[64,292,293],{"class":159},"      Ledger_t",[64,295,296],{"class":252}," prevLedger",[64,298,268],{"class":87},[64,300,301,304,307,310,313,316,319],{"class":66,"line":122},[64,302,303],{"class":252},"      hash_set",[64,305,306],{"class":87},"\u003C",[64,308,309],{"class":159},"NodeID_t",[64,311,312],{"class":87},"> ",[64,314,315],{"class":83},"const&",[64,317,318],{"class":252}," nowUntrusted",[64,320,268],{"class":87},[64,322,323,325,327,329,331,333,336],{"class":66,"line":128},[64,324,303],{"class":252},[64,326,306],{"class":87},[64,328,309],{"class":159},[64,330,312],{"class":87},[64,332,315],{"class":83},[64,334,335],{"class":252}," nowTrusted",[64,337,338],{"class":87},")\n",[64,340,341],{"class":66,"line":153},[64,342,343],{"class":87},"  {\n",[64,345,346],{"class":66,"line":165},[64,347,348],{"class":70},"      \u002F\u002F Adaptor determines if we should propose\n",[64,350,352,355,358,361,364,367],{"class":66,"line":351},9,[64,353,354],{"class":83},"      bool",[64,356,357],{"class":87}," proposing ",[64,359,360],{"class":83},"=",[64,362,363],{"class":87}," adaptor_.",[64,365,366],{"class":97},"preStartRound",[64,368,369],{"class":87},"(prevLedger, nowTrusted);\n",[64,371,373],{"class":66,"line":372},10,[64,374,376],{"emptyLinePlaceholder":375},true,"\n",[64,378,380],{"class":66,"line":379},11,[64,381,382],{"class":70},"      \u002F\u002F Set initial mode\n",[64,384,386,389,392,394,396],{"class":66,"line":385},12,[64,387,388],{"class":252},"      ConsensusMode",[64,390,391],{"class":87}," mode ",[64,393,360],{"class":83},[64,395,357],{"class":87},[64,397,398],{"class":83},"?\n",[64,400,402,405,408,411,414],{"class":66,"line":401},13,[64,403,404],{"class":252},"          ConsensusMode",[64,406,407],{"class":87},"::proposing ",[64,409,410],{"class":83},":",[64,412,413],{"class":252}," ConsensusMode",[64,415,416],{"class":87},"::observing;\n",[64,418,420],{"class":66,"line":419},14,[64,421,376],{"emptyLinePlaceholder":375},[64,423,425],{"class":66,"line":424},15,[64,426,427],{"class":70},"      \u002F\u002F Enter internal initialization\n",[64,429,431,434],{"class":66,"line":430},16,[64,432,433],{"class":97},"      startRoundInternal",[64,435,436],{"class":87},"(now, prevLedgerID, prevLedger, mode, clog);\n",[64,438,440],{"class":66,"line":439},17,[64,441,442],{"class":87},"  }\n",[22,444,445],{},[50,446,447],{},"Parameters Established:",[175,449,450,453,456,459],{},[178,451,452],{},"Previous ledger hash and object",[178,454,455],{},"Initial mode (proposing or observing)",[178,457,458],{},"Timer initialization",[178,460,461],{},"Peer position tracking",[17,463,465],{"id":464},"stage-4-open-phase","Stage 4: Open Phase",[22,467,468],{},[50,469,470],{},"Function: Consensus::startRoundInternal → ConsensusPhase::open",[22,472,473],{},[50,474,475],{},"Key Timing Parameters:",[477,478,479,495],"table",{},[480,481,482],"thead",{},[483,484,485,489,492],"tr",{},[486,487,488],"th",{},"Parameter",[486,490,491],{},"Value",[486,493,494],{},"Purpose",[496,497,498,510,521,532,543],"tbody",{},[483,499,500,504,507],{},[501,502,503],"td",{},"ledgerIDLE_INTERVAL",[501,505,506],{},"15s",[501,508,509],{},"Max time ledger stays open with no transactions",[483,511,512,515,518],{},[501,513,514],{},"ledgerMIN_CLOSE",[501,516,517],{},"2s",[501,519,520],{},"Minimum time ledger must stay open",[483,522,523,526,529],{},[501,524,525],{},"prevRoundTime\u002F2",[501,527,528],{},"Dynamic",[501,530,531],{},"Must stay open ≥ half of previous consensus time",[483,533,534,537,540],{},[501,535,536],{},"proposeFRESHNESS",[501,538,539],{},"20s",[501,541,542],{},"How long peer proposals remain valid",[483,544,545,548,551],{},[501,546,547],{},"proposeINTERVAL",[501,549,550],{},"12s",[501,552,553],{},"How often we must refresh our proposal",[22,555,556],{},"The ledger opens to accept transactions:",[33,558,561],{"className":559,"code":560,"language":38},[36],"┌─────────────────────────────────────────────────────────────┐\n│                      OPEN PHASE                             │\n│                                                             │\n│   Incoming           ┌──────────────┐       Proposal        │\n│   Transactions ────► │ Open Ledger  │ ────► Playback        │\n│                      └──────────────┘                       │\n│                             │                               │\n│                             ▼                               │\n│                      ┌──────────────┐                       │\n│                      │   timerEntry │                       │\n│                      │     Loop     │                       │\n│                      └──────┬───────┘                       │\n│                             │                               │\n│              shouldCloseLedger() == true?                   │\n│                             │                               │\n│                    YES      │      NO                       │\n│                    ┌────────┴────────┐                      │\n│                    ▼                 ▼                      │\n│              closeLedger()     Continue waiting             │\n└─────────────────────────────────────────────────────────────┘\n",[40,562,560],{"__ignoreMap":42},[22,564,565],{},[50,566,567],{},"Key Activities:",[22,569,570],{},[50,571,572],{},"playbackProposals():",[175,574,575,578,581,584],{},[178,576,577],{},"Replays peer proposals received for this ledger that arrived early",[178,579,580],{},"Recovers proposals from up to 10 recent proposals per peer",[178,582,583],{},"Filters by prevLedgerID to find relevant proposals",[178,585,586],{},"Allows fast catch-up when switching ledgers",[22,588,589],{},[50,590,591],{},"Example:",[33,593,596],{"className":594,"code":595,"language":38},[36],"Node behind network (on ledger 1000, network on 1001):\n    ├─ Peer proposals for 1001 arrive → saved but ignored\n    ├─ Node finishes 1000, startRound(1001) called\n    ├─ playbackProposals() runs:\n    │  └─ Finds saved proposals for 1001\n    │  └─ Processes them immediately\n    └─ Node instantly has peer positions → faster sync!\n",[40,597,595],{"__ignoreMap":42},[22,599,600],{},[50,601,602],{},"timerEntry() in open phase:",[175,604,605,608,614],{},[178,606,607],{},"Called periodically (~1 second via ledgerGRANULARITY)",[178,609,610,611],{},"Evaluates close conditions via ",[40,612,613],{},"checkLedger()",[178,615,616,617,620],{},"Calls ",[40,618,619],{},"shouldCloseLedger()"," to determine if ledger should close",[22,622,623],{},[50,624,591],{},[33,626,629],{"className":627,"code":628,"language":38},[36],"t=0s:  Open phase starts\nt=1s:  timerEntry() → shouldCloseLedger() → NO (too early)\nt=2s:  timerEntry() → shouldCloseLedger() → YES (conditions met)\n └─ closeLedger() → phase = ESTABLISH\n",[40,630,628],{"__ignoreMap":42},[22,632,633],{},[50,634,635],{},"Close conditions checked:",[175,637,638,641,644,647],{},[178,639,640],{},"Minimum time elapsed (2s)",[178,642,643],{},"Has transactions OR idle timeout",[178,645,646],{},"Not opening too fast (≥ prevRoundTime\u002F2)",[178,648,649],{},"Enough peers have closed",[17,651,653],{"id":652},"stage-5-close-decision","Stage 5: Close Decision",[22,655,656],{},[50,657,658],{},"Function: shouldCloseLedger",[22,660,661],{},"Determines if the ledger should close:",[33,663,665],{"className":58,"code":664,"language":60,"meta":42,"style":42},"  \u002F\u002F Key logic from shouldCloseLedger() in Consensus.cpp\n\n  \u002F\u002F If majority of peers already closed, follow them\n  if ((proposersClosed + proposersValidated) > (prevProposers \u002F 2)) {\n      JLOG(j.trace()) \u003C\u003C \"Others have closed\";\n      return true;  \u002F\u002F Close with the network\n  }\n\n  \u002F\u002F No transactions? Only close after idle interval\n  if (!anyTransactions) {\n      return timeSincePrevClose >= idleInterval;  \u002F\u002F Default 15s\n  }\n\n  \u002F\u002F Enforce minimum ledger open time\n  if (openTime \u003C parms.ledgerMIN_CLOSE) {  \u002F\u002F 2 seconds\n      JLOG(j.debug()) \u003C\u003C \"Must wait minimum time before closing\";\n      return false;\n  }\n\n  \u002F\u002F Don't close faster than half the previous consensus time\n  \u002F\u002F (allows slower validators to keep up)\n  if (openTime \u003C (prevRoundTime \u002F 2)) {\n      JLOG(j.debug()) \u003C\u003C \"Ledger has not been open long enough\";\n      return false;\n  }\n\n  return true;  \u002F\u002F All conditions met\n",[40,666,667,672,676,681,710,730,744,748,752,757,768,784,788,792,797,812,830,838,843,848,854,860,878,896,905,910,915],{"__ignoreMap":42},[64,668,669],{"class":66,"line":67},[64,670,671],{"class":70},"  \u002F\u002F Key logic from shouldCloseLedger() in Consensus.cpp\n",[64,673,674],{"class":66,"line":74},[64,675,376],{"emptyLinePlaceholder":375},[64,677,678],{"class":66,"line":80},[64,679,680],{"class":70},"  \u002F\u002F If majority of peers already closed, follow them\n",[64,682,683,686,689,692,695,698,701,704,707],{"class":66,"line":104},[64,684,685],{"class":83},"  if",[64,687,688],{"class":87}," ((proposersClosed ",[64,690,691],{"class":83},"+",[64,693,694],{"class":87}," proposersValidated) ",[64,696,697],{"class":83},">",[64,699,700],{"class":87}," (prevProposers ",[64,702,703],{"class":83},"\u002F",[64,705,706],{"class":159}," 2",[64,708,709],{"class":87},")) {\n",[64,711,712,715,718,721,723,725,728],{"class":66,"line":122},[64,713,714],{"class":97},"      JLOG",[64,716,717],{"class":87},"(j.",[64,719,720],{"class":97},"trace",[64,722,140],{"class":87},[64,724,143],{"class":83},[64,726,727],{"class":146}," \"Others have closed\"",[64,729,150],{"class":87},[64,731,732,735,738,741],{"class":66,"line":128},[64,733,734],{"class":83},"      return",[64,736,737],{"class":159}," true",[64,739,740],{"class":87},";",[64,742,743],{"class":70},"  \u002F\u002F Close with the network\n",[64,745,746],{"class":66,"line":153},[64,747,442],{"class":87},[64,749,750],{"class":66,"line":165},[64,751,376],{"emptyLinePlaceholder":375},[64,753,754],{"class":66,"line":351},[64,755,756],{"class":70},"  \u002F\u002F No transactions? Only close after idle interval\n",[64,758,759,761,763,765],{"class":66,"line":372},[64,760,685],{"class":83},[64,762,88],{"class":87},[64,764,91],{"class":83},[64,766,767],{"class":87},"anyTransactions) {\n",[64,769,770,772,775,778,781],{"class":66,"line":379},[64,771,734],{"class":83},[64,773,774],{"class":87}," timeSincePrevClose ",[64,776,777],{"class":83},">=",[64,779,780],{"class":87}," idleInterval;",[64,782,783],{"class":70},"  \u002F\u002F Default 15s\n",[64,785,786],{"class":66,"line":385},[64,787,442],{"class":87},[64,789,790],{"class":66,"line":401},[64,791,376],{"emptyLinePlaceholder":375},[64,793,794],{"class":66,"line":419},[64,795,796],{"class":70},"  \u002F\u002F Enforce minimum ledger open time\n",[64,798,799,801,804,806,809],{"class":66,"line":424},[64,800,685],{"class":83},[64,802,803],{"class":87}," (openTime ",[64,805,306],{"class":83},[64,807,808],{"class":87}," parms.ledgerMIN_CLOSE) {",[64,810,811],{"class":70},"  \u002F\u002F 2 seconds\n",[64,813,814,816,818,821,823,825,828],{"class":66,"line":430},[64,815,714],{"class":97},[64,817,717],{"class":87},[64,819,820],{"class":97},"debug",[64,822,140],{"class":87},[64,824,143],{"class":83},[64,826,827],{"class":146}," \"Must wait minimum time before closing\"",[64,829,150],{"class":87},[64,831,832,834,836],{"class":66,"line":439},[64,833,734],{"class":83},[64,835,160],{"class":159},[64,837,150],{"class":87},[64,839,841],{"class":66,"line":840},18,[64,842,442],{"class":87},[64,844,846],{"class":66,"line":845},19,[64,847,376],{"emptyLinePlaceholder":375},[64,849,851],{"class":66,"line":850},20,[64,852,853],{"class":70},"  \u002F\u002F Don't close faster than half the previous consensus time\n",[64,855,857],{"class":66,"line":856},21,[64,858,859],{"class":70},"  \u002F\u002F (allows slower validators to keep up)\n",[64,861,863,865,867,869,872,874,876],{"class":66,"line":862},22,[64,864,685],{"class":83},[64,866,803],{"class":87},[64,868,306],{"class":83},[64,870,871],{"class":87}," (prevRoundTime ",[64,873,703],{"class":83},[64,875,706],{"class":159},[64,877,709],{"class":87},[64,879,881,883,885,887,889,891,894],{"class":66,"line":880},23,[64,882,714],{"class":97},[64,884,717],{"class":87},[64,886,820],{"class":97},[64,888,140],{"class":87},[64,890,143],{"class":83},[64,892,893],{"class":146}," \"Ledger has not been open long enough\"",[64,895,150],{"class":87},[64,897,899,901,903],{"class":66,"line":898},24,[64,900,734],{"class":83},[64,902,160],{"class":159},[64,904,150],{"class":87},[64,906,908],{"class":66,"line":907},25,[64,909,442],{"class":87},[64,911,913],{"class":66,"line":912},26,[64,914,376],{"emptyLinePlaceholder":375},[64,916,918,921,923,925],{"class":66,"line":917},27,[64,919,920],{"class":83},"  return",[64,922,737],{"class":159},[64,924,740],{"class":87},[64,926,927],{"class":70},"  \u002F\u002F All conditions met\n",[22,929,930],{},[50,931,932],{},"Close Decision Process:",[22,934,935],{},[50,936,937],{},"Step 1: Safety Checks",[175,939,940],{},[178,941,942,943],{},"If timing is unusual (prevRoundTime or timeSincePrevClose out of range) → ",[50,944,945],{},"CLOSE immediately",[22,947,948],{},[50,949,950],{},"Step 2: Network Coordination",[175,952,953],{},[178,954,955,956,959],{},"If (proposersClosed + proposersValidated) > prevProposers\u002F2 → ",[50,957,958],{},"CLOSE"," (follow majority)",[22,961,962],{},[50,963,964],{},"Step 3: Transaction-Based Decision",[22,966,967],{},[968,969,970],"em",{},"Path A: No Transactions",[175,972,973,976],{},[178,974,975],{},"Close only if: timeSincePrevClose ≥ ledgerIDLE_INTERVAL (15s)",[178,977,978],{},"Purpose: Maintain regular ledger cadence even when idle",[22,980,981],{},[968,982,983],{},"Path B: Has Transactions",[175,985,986,992,997],{},[178,987,988,991],{},[50,989,990],{},"Must satisfy:"," openTime ≥ ledgerMIN_CLOSE (2s)",[178,993,994,996],{},[50,995,990],{}," openTime ≥ prevRoundTime\u002F2",[178,998,999,1000],{},"If both pass → ",[50,1001,958],{},[22,1003,1004],{},[50,1005,1006],{},"Key Parameters:",[477,1008,1009,1019],{},[480,1010,1011],{},[483,1012,1013,1015,1017],{},[486,1014,488],{},[486,1016,491],{},[486,1018,494],{},[496,1020,1021,1029,1038],{},[483,1022,1023,1025,1027],{},[501,1024,514],{},[501,1026,517],{},[501,1028,520],{},[483,1030,1031,1033,1035],{},[501,1032,503],{},[501,1034,506],{},[501,1036,1037],{},"Maximum idle time before forcing close",[483,1039,1040,1042,1044],{},[501,1041,525],{},[501,1043,528],{},[501,1045,1046],{},"Throttle: ledger must stay open ≥ half of previous round time",[17,1048,1050],{"id":1049},"stage-6-closing-the-ledger","Stage 6: Closing the Ledger",[22,1052,1053],{},[50,1054,1055],{},"Function: Consensus::closeLedger",[22,1057,1058],{},"Transitions from open to establish phase:",[33,1060,1063],{"className":1061,"code":1062,"language":38},[36],"┌─────────────────────────────────────────────────────────────┐\n│                    CLOSE LEDGER                             │\n│                                                             │\n│   ┌─────────────────┐                                       │\n│   │   Open Ledger   │                                       │\n│   │   Transactions  │                                       │\n│   └────────┬────────┘                                       │\n│            │                                                │\n│            ▼                                                │\n│   ┌─────────────────┐                                       │\n│   │ Build Initial   │                                       │\n│   │    Proposal     │                                       │\n│   └────────┬────────┘                                       │\n│            │                                                │\n│            ▼                                                │\n│   ┌─────────────────┐                                       │\n│   │ Notify Peers    │                                       │\n│   │ of Closure      │                                       │\n│   └────────┬────────┘                                       │\n│            │                                                │\n│            ▼                                                │\n│   Phase = ESTABLISH                                         │\n└─────────────────────────────────────────────────────────────┘\n",[40,1064,1062],{"__ignoreMap":42},[22,1066,1067],{},[50,1068,1069],{},"Actions:",[175,1071,1072,1075,1078,1081],{},[178,1073,1074],{},"Finalizes transaction set for the ledger",[178,1076,1077],{},"Creates initial consensus proposal",[178,1079,1080],{},"Broadcasts closure to peers",[178,1082,1083],{},"Transitions to establish phase",[17,1085,1087],{"id":1086},"stage-7-establish-phase","Stage 7: Establish Phase",[22,1089,1090],{},[50,1091,1092],{},"Function: Consensus::phaseEstablish",[22,1094,1095],{},[50,1096,475],{},[477,1098,1099,1109],{},[480,1100,1101],{},[483,1102,1103,1105,1107],{},[486,1104,488],{},[486,1106,491],{},[486,1108,494],{},[496,1110,1111,1122,1132,1143,1154],{},[483,1112,1113,1116,1119],{},[501,1114,1115],{},"ledgerMIN_CONSENSUS",[501,1117,1118],{},"1.95s",[501,1120,1121],{},"Minimum time before consensus can be declared",[483,1123,1124,1127,1129],{},[501,1125,1126],{},"ledgerMAX_CONSENSUS",[501,1128,506],{},[501,1130,1131],{},"Maximum time to wait for lagging validators",[483,1133,1134,1137,1140],{},[501,1135,1136],{},"ledgerABANDON_CONSENSUS",[501,1138,1139],{},"120s",[501,1141,1142],{},"Absolute maximum round time",[483,1144,1145,1148,1151],{},[501,1146,1147],{},"ledgerABANDON_CONSENSUS_FACTOR",[501,1149,1150],{},"10×",[501,1152,1153],{},"Dynamic abandonment: min(prevTime × 10, 120s)",[483,1155,1156,1159,1162],{},[501,1157,1158],{},"avMIN_CONSENSUS_TIME",[501,1160,1161],{},"5s",[501,1163,1164],{},"Minimum time used for avalanche calculations",[22,1166,1167],{},[50,1168,1169],{},"Avalanche Threshold Progression:",[33,1171,1174],{"className":1172,"code":1173,"language":38},[36],"convergePercent = (currentRoundTime × 100) \u002F max(prevRoundTime, avMIN_CONSENSUS_TIME)\n\nThresholds by state:\n  init  (0% time):   50% agreement needed\n  mid   (50% time):  65% agreement needed\n  late  (85% time):  70% agreement needed\n  stuck (200% time): 95% agreement needed\n\nExample: If previous round took 4s, use avMIN_CONSENSUS_TIME (5s)\n  At 2.5s: convergePercent = (2500 × 100) \u002F 5000 = 50%\n  → Transition from 'init' to 'mid'\n  → Threshold increases from 50% to 65%\n",[40,1175,1173],{"__ignoreMap":42},[22,1177,1178],{},"The core of consensus—exchanging proposals and resolving disputes:",[33,1180,1183],{"className":1181,"code":1182,"language":38},[36],"┌─────────────────────────────────────────────────────────────┐\n│                   ESTABLISH PHASE                           │\n│                                                             │\n│   ┌───────────────────────────────────────────────────────┐ │\n│   │              ITERATIVE VOTING LOOP                    │ │\n│   │                                                       │ │\n│   │   timerEntry()                                        │ │\n│   │       │                                               │ │\n│   │       ▼                                               │ │\n│   │   updateOurPositions()                                │ │\n│   │       │                                               │ │\n│   │       ├──► Evaluate peer proposals                    │ │\n│   │       ├──► Adjust disputed transaction votes          │ │\n│   │       └──► Broadcast updated position                 │ │\n│   │                                                       │ │\n│   │       │                                               │ │\n│   │       ▼                                               │ │\n│   │   haveConsensus()                                     │ │\n│   │       │                                               │ │\n│   │       ├──► checkConsensus()                           │ │\n│   │       └──► checkConsensusReached()                    │ │\n│   │                                                       │ │\n│   │       │                                               │ │\n│   │   ConsensusState?                                     │ │\n│   │       │                                               │ │\n│   │   No  ┴─► Loop back to timerEntry()                   │ │\n│   │   Yes ──► Proceed to accept                           │ │\n│   └───────────────────────────────────────────────────────┘ │\n└─────────────────────────────────────────────────────────────┘\n",[40,1184,1182],{"__ignoreMap":42},[22,1186,1187],{},[50,1188,1189],{},"Key Functions:",[22,1191,1192],{},[50,1193,1194],{},"updateOurPositions():",[175,1196,1197,1200,1203],{},[178,1198,1199],{},"Processes peer proposals",[178,1201,1202],{},"Adjusts votes on disputed transactions",[178,1204,1205],{},"Updates local candidate transaction set",[22,1207,1208],{},[50,1209,1210],{},"shouldPause():",[175,1212,1213,1216,1219],{},[178,1214,1215],{},"Checks if consensus should pause",[178,1217,1218],{},"Handles lagging or non-participating peers",[178,1220,1221],{},"Prevents premature advancement",[22,1223,1224],{},[50,1225,1226],{},"haveConsensus() → checkConsensus() → checkConsensusReached():",[175,1228,1229,1232,1235],{},[178,1230,1231],{},"Evaluates if agreement threshold met",[178,1233,1234],{},"Considers timing constraints",[178,1236,1237],{},"Returns consensus state (Yes\u002FNo\u002FMovedOn\u002FExpired)",[17,1239,1241],{"id":1240},"stage-8-consensus-checking","Stage 8: Consensus Checking",[22,1243,1244],{},[50,1245,1246],{},"Consensus Evaluation Logic:",[33,1248,1250],{"className":58,"code":1249,"language":60,"meta":42,"style":42},"ConsensusState checkConsensus(\n    std::size_t prevProposers,\n    std::size_t currentProposers,\n    std::size_t currentAgree,\n    std::size_t currentFinished,\n    std::chrono::milliseconds previousAgreeTime,\n    std::chrono::milliseconds currentAgreeTime,\n    bool stalled,\n    ConsensusParms const& parms,\n    bool proposing)\n{\n    \u002F\u002F Check minimum time elapsed\n    if (currentAgreeTime \u003C= parms.ledgerMIN_CONSENSUS)\n        return ConsensusState::No;\n\n    \u002F\u002F Check if we have reduced participation\n    if (currentProposers \u003C prevProposers * 3\u002F4) {\n        if (currentAgreeTime \u003C previousAgreeTime + parms.ledgerMIN_CONSENSUS)\n            return ConsensusState::No;\n    }\n\n    \u002F\u002F Check if we reached 80% agreement on transaction set\n    if (checkConsensusReached(\n            currentAgree,\n            currentProposers,\n            proposing,\n            parms.minCONSENSUS_PCT,  \u002F\u002F Always 80%\n            currentAgreeTime > parms.ledgerMAX_CONSENSUS,\n            stalled))\n        return ConsensusState::Yes;\n\n    \u002F\u002F Check if 80% of peers moved on without us\n    if (checkConsensusReached(\n            currentFinished,\n            currentProposers,\n            false,\n            parms.minCONSENSUS_PCT,  \u002F\u002F Always 80%\n            currentAgreeTime > parms.ledgerMAX_CONSENSUS,\n            false))\n        return ConsensusState::MovedOn;\n\n    \u002F\u002F Check if consensus has taken too long\n    \u002F\u002F Timeout is bounded: min(max(prevTime × 10, 15s), 120s)\n    std::chrono::milliseconds const maxAgreeTime =\n        previousAgreeTime * parms.ledgerABANDON_CONSENSUS_FACTOR;  \u002F\u002F 10\n\n    if (currentAgreeTime > std::clamp(\n                               maxAgreeTime,\n                               parms.ledgerMAX_CONSENSUS,      \u002F\u002F 15s minimum\n                               parms.ledgerABANDON_CONSENSUS)) \u002F\u002F 120s maximum\n        return ConsensusState::Expired;\n\n    return ConsensusState::No;\n}\n",[40,1251,1252,1262,1277,1290,1303,1316,1335,1352,1362,1374,1383,1387,1392,1406,1417,1421,1426,1452,1468,1477,1482,1486,1491,1502,1507,1512,1517,1525,1536,1542,1552,1557,1563,1574,1580,1585,1593,1600,1609,1617,1627,1632,1638,1644,1665,1679,1684,1703,1709,1718,1727,1737,1742,1751],{"__ignoreMap":42},[64,1253,1254,1257,1260],{"class":66,"line":67},[64,1255,1256],{"class":252},"ConsensusState",[64,1258,1259],{"class":97}," checkConsensus",[64,1261,101],{"class":87},[64,1263,1264,1267,1269,1272,1275],{"class":66,"line":74},[64,1265,1266],{"class":252},"    std",[64,1268,256],{"class":87},[64,1270,1271],{"class":83},"size_t",[64,1273,1274],{"class":252}," prevProposers",[64,1276,268],{"class":87},[64,1278,1279,1281,1283,1285,1288],{"class":66,"line":80},[64,1280,1266],{"class":252},[64,1282,256],{"class":87},[64,1284,1271],{"class":83},[64,1286,1287],{"class":252}," currentProposers",[64,1289,268],{"class":87},[64,1291,1292,1294,1296,1298,1301],{"class":66,"line":104},[64,1293,1266],{"class":252},[64,1295,256],{"class":87},[64,1297,1271],{"class":83},[64,1299,1300],{"class":252}," currentAgree",[64,1302,268],{"class":87},[64,1304,1305,1307,1309,1311,1314],{"class":66,"line":122},[64,1306,1266],{"class":252},[64,1308,256],{"class":87},[64,1310,1271],{"class":83},[64,1312,1313],{"class":252}," currentFinished",[64,1315,268],{"class":87},[64,1317,1318,1320,1322,1325,1327,1330,1333],{"class":66,"line":128},[64,1319,1266],{"class":252},[64,1321,256],{"class":87},[64,1323,1324],{"class":252},"chrono",[64,1326,256],{"class":87},[64,1328,1329],{"class":252},"milliseconds",[64,1331,1332],{"class":252}," previousAgreeTime",[64,1334,268],{"class":87},[64,1336,1337,1339,1341,1343,1345,1347,1350],{"class":66,"line":153},[64,1338,1266],{"class":252},[64,1340,256],{"class":87},[64,1342,1324],{"class":252},[64,1344,256],{"class":87},[64,1346,1329],{"class":252},[64,1348,1349],{"class":252}," currentAgreeTime",[64,1351,268],{"class":87},[64,1353,1354,1357,1360],{"class":66,"line":165},[64,1355,1356],{"class":83},"    bool",[64,1358,1359],{"class":252}," stalled",[64,1361,268],{"class":87},[64,1363,1364,1367,1369,1372],{"class":66,"line":351},[64,1365,1366],{"class":252},"    ConsensusParms",[64,1368,262],{"class":83},[64,1370,1371],{"class":252}," parms",[64,1373,268],{"class":87},[64,1375,1376,1378,1381],{"class":66,"line":372},[64,1377,1356],{"class":83},[64,1379,1380],{"class":252}," proposing",[64,1382,338],{"class":87},[64,1384,1385],{"class":66,"line":379},[64,1386,125],{"class":87},[64,1388,1389],{"class":66,"line":385},[64,1390,1391],{"class":70},"    \u002F\u002F Check minimum time elapsed\n",[64,1393,1394,1397,1400,1403],{"class":66,"line":401},[64,1395,1396],{"class":83},"    if",[64,1398,1399],{"class":87}," (currentAgreeTime ",[64,1401,1402],{"class":83},"\u003C=",[64,1404,1405],{"class":87}," parms.ledgerMIN_CONSENSUS)\n",[64,1407,1408,1411,1414],{"class":66,"line":419},[64,1409,1410],{"class":83},"        return",[64,1412,1413],{"class":252}," ConsensusState",[64,1415,1416],{"class":87},"::No;\n",[64,1418,1419],{"class":66,"line":424},[64,1420,376],{"emptyLinePlaceholder":375},[64,1422,1423],{"class":66,"line":430},[64,1424,1425],{"class":70},"    \u002F\u002F Check if we have reduced participation\n",[64,1427,1428,1430,1433,1435,1438,1441,1444,1446,1449],{"class":66,"line":439},[64,1429,1396],{"class":83},[64,1431,1432],{"class":87}," (currentProposers ",[64,1434,306],{"class":83},[64,1436,1437],{"class":87}," prevProposers ",[64,1439,1440],{"class":83},"*",[64,1442,1443],{"class":159}," 3",[64,1445,703],{"class":83},[64,1447,1448],{"class":159},"4",[64,1450,1451],{"class":87},") {\n",[64,1453,1454,1457,1459,1461,1464,1466],{"class":66,"line":840},[64,1455,1456],{"class":83},"        if",[64,1458,1399],{"class":87},[64,1460,306],{"class":83},[64,1462,1463],{"class":87}," previousAgreeTime ",[64,1465,691],{"class":83},[64,1467,1405],{"class":87},[64,1469,1470,1473,1475],{"class":66,"line":845},[64,1471,1472],{"class":83},"            return",[64,1474,1413],{"class":252},[64,1476,1416],{"class":87},[64,1478,1479],{"class":66,"line":850},[64,1480,1481],{"class":87},"    }\n",[64,1483,1484],{"class":66,"line":856},[64,1485,376],{"emptyLinePlaceholder":375},[64,1487,1488],{"class":66,"line":862},[64,1489,1490],{"class":70},"    \u002F\u002F Check if we reached 80% agreement on transaction set\n",[64,1492,1493,1495,1497,1500],{"class":66,"line":880},[64,1494,1396],{"class":83},[64,1496,88],{"class":87},[64,1498,1499],{"class":97},"checkConsensusReached",[64,1501,101],{"class":87},[64,1503,1504],{"class":66,"line":898},[64,1505,1506],{"class":87},"            currentAgree,\n",[64,1508,1509],{"class":66,"line":907},[64,1510,1511],{"class":87},"            currentProposers,\n",[64,1513,1514],{"class":66,"line":912},[64,1515,1516],{"class":87},"            proposing,\n",[64,1518,1519,1522],{"class":66,"line":917},[64,1520,1521],{"class":87},"            parms.minCONSENSUS_PCT,",[64,1523,1524],{"class":70},"  \u002F\u002F Always 80%\n",[64,1526,1528,1531,1533],{"class":66,"line":1527},28,[64,1529,1530],{"class":87},"            currentAgreeTime ",[64,1532,697],{"class":83},[64,1534,1535],{"class":87}," parms.ledgerMAX_CONSENSUS,\n",[64,1537,1539],{"class":66,"line":1538},29,[64,1540,1541],{"class":87},"            stalled))\n",[64,1543,1545,1547,1549],{"class":66,"line":1544},30,[64,1546,1410],{"class":83},[64,1548,1413],{"class":252},[64,1550,1551],{"class":87},"::Yes;\n",[64,1553,1555],{"class":66,"line":1554},31,[64,1556,376],{"emptyLinePlaceholder":375},[64,1558,1560],{"class":66,"line":1559},32,[64,1561,1562],{"class":70},"    \u002F\u002F Check if 80% of peers moved on without us\n",[64,1564,1566,1568,1570,1572],{"class":66,"line":1565},33,[64,1567,1396],{"class":83},[64,1569,88],{"class":87},[64,1571,1499],{"class":97},[64,1573,101],{"class":87},[64,1575,1577],{"class":66,"line":1576},34,[64,1578,1579],{"class":87},"            currentFinished,\n",[64,1581,1583],{"class":66,"line":1582},35,[64,1584,1511],{"class":87},[64,1586,1588,1591],{"class":66,"line":1587},36,[64,1589,1590],{"class":159},"            false",[64,1592,268],{"class":87},[64,1594,1596,1598],{"class":66,"line":1595},37,[64,1597,1521],{"class":87},[64,1599,1524],{"class":70},[64,1601,1603,1605,1607],{"class":66,"line":1602},38,[64,1604,1530],{"class":87},[64,1606,697],{"class":83},[64,1608,1535],{"class":87},[64,1610,1612,1614],{"class":66,"line":1611},39,[64,1613,1590],{"class":159},[64,1615,1616],{"class":87},"))\n",[64,1618,1620,1622,1624],{"class":66,"line":1619},40,[64,1621,1410],{"class":83},[64,1623,1413],{"class":252},[64,1625,1626],{"class":87},"::MovedOn;\n",[64,1628,1630],{"class":66,"line":1629},41,[64,1631,376],{"emptyLinePlaceholder":375},[64,1633,1635],{"class":66,"line":1634},42,[64,1636,1637],{"class":70},"    \u002F\u002F Check if consensus has taken too long\n",[64,1639,1641],{"class":66,"line":1640},43,[64,1642,1643],{"class":70},"    \u002F\u002F Timeout is bounded: min(max(prevTime × 10, 15s), 120s)\n",[64,1645,1647,1649,1651,1653,1656,1659,1662],{"class":66,"line":1646},44,[64,1648,1266],{"class":252},[64,1650,256],{"class":87},[64,1652,1324],{"class":252},[64,1654,1655],{"class":87},"::milliseconds ",[64,1657,1658],{"class":83},"const",[64,1660,1661],{"class":87}," maxAgreeTime ",[64,1663,1664],{"class":83},"=\n",[64,1666,1668,1671,1673,1676],{"class":66,"line":1667},45,[64,1669,1670],{"class":87},"        previousAgreeTime ",[64,1672,1440],{"class":83},[64,1674,1675],{"class":87}," parms.ledgerABANDON_CONSENSUS_FACTOR;",[64,1677,1678],{"class":70},"  \u002F\u002F 10\n",[64,1680,1682],{"class":66,"line":1681},46,[64,1683,376],{"emptyLinePlaceholder":375},[64,1685,1687,1689,1691,1693,1696,1698,1701],{"class":66,"line":1686},47,[64,1688,1396],{"class":83},[64,1690,1399],{"class":87},[64,1692,697],{"class":83},[64,1694,1695],{"class":252}," std",[64,1697,256],{"class":87},[64,1699,1700],{"class":97},"clamp",[64,1702,101],{"class":87},[64,1704,1706],{"class":66,"line":1705},48,[64,1707,1708],{"class":87},"                               maxAgreeTime,\n",[64,1710,1712,1715],{"class":66,"line":1711},49,[64,1713,1714],{"class":87},"                               parms.ledgerMAX_CONSENSUS,",[64,1716,1717],{"class":70},"      \u002F\u002F 15s minimum\n",[64,1719,1721,1724],{"class":66,"line":1720},50,[64,1722,1723],{"class":87},"                               parms.ledgerABANDON_CONSENSUS))",[64,1725,1726],{"class":70}," \u002F\u002F 120s maximum\n",[64,1728,1730,1732,1734],{"class":66,"line":1729},51,[64,1731,1410],{"class":83},[64,1733,1413],{"class":252},[64,1735,1736],{"class":87},"::Expired;\n",[64,1738,1740],{"class":66,"line":1739},52,[64,1741,376],{"emptyLinePlaceholder":375},[64,1743,1745,1747,1749],{"class":66,"line":1744},53,[64,1746,156],{"class":83},[64,1748,1413],{"class":252},[64,1750,1416],{"class":87},[64,1752,1754],{"class":66,"line":1753},54,[64,1755,168],{"class":87},[22,1757,1758],{},[50,1759,1760],{},"Agreement Threshold:",[33,1762,1764],{"className":58,"code":1763,"language":60,"meta":42,"style":42},"    checkConsensusReached():\n      agreement_pct = (agreeing \u002F total) * 100\n",[40,1765,1766,1774],{"__ignoreMap":42},[64,1767,1768,1771],{"class":66,"line":67},[64,1769,1770],{"class":97},"    checkConsensusReached",[64,1772,1773],{"class":87},"():\n",[64,1775,1776,1779,1781,1784,1786,1789,1791],{"class":66,"line":74},[64,1777,1778],{"class":87},"      agreement_pct ",[64,1780,360],{"class":83},[64,1782,1783],{"class":87}," (agreeing ",[64,1785,703],{"class":83},[64,1787,1788],{"class":87}," total) ",[64,1790,1440],{"class":83},[64,1792,1793],{"class":159}," 100\n",[22,1795,1796],{},"Required: 80% (fixed - minCONSENSUS_PCT)",[22,1798,1799],{},"This checks if 80% of validators have the SAME complete transaction set (same hash).",[22,1801,1802],{},"Two checks performed:",[1804,1805,1806,1809],"ol",{},[178,1807,1808],{},"Do 80% agree with OUR position? → Yes",[178,1810,1811],{},"Did 80% move to next ledger? → MovedOn",[22,1813,1814],{},[50,1815,1816],{},"Important Distinction:",[22,1818,1819],{},"The 80% threshold here is for final consensus (comparing complete transaction set hashes).",[22,1821,1822],{},"This is separate from avalanche voting (50%→65%→70%→95%) which determines which individual transactions to include during updateOurPositions().",[22,1824,1825],{},[50,1826,1827],{},"Consensus States:",[477,1829,1830,1843],{},[480,1831,1832],{},[483,1833,1834,1837,1840],{},[486,1835,1836],{},"State",[486,1838,1839],{},"Meaning",[486,1841,1842],{},"Action",[496,1844,1845,1856,1867,1878],{},[483,1846,1847,1850,1853],{},[501,1848,1849],{},"No",[501,1851,1852],{},"Not enough agreement yet",[501,1854,1855],{},"Continue voting",[483,1857,1858,1861,1864],{},[501,1859,1860],{},"Yes",[501,1862,1863],{},"80%+ agree with us",[501,1865,1866],{},"Accept consensus!",[483,1868,1869,1872,1875],{},[501,1870,1871],{},"MovedOn",[501,1873,1874],{},"80%+ moved to next ledger",[501,1876,1877],{},"We're behind, catch up",[483,1879,1880,1883,1886],{},[501,1881,1882],{},"Expired",[501,1884,1885],{},"Took too long",[501,1887,1888],{},"Bow out of consensus",[17,1890,1892],{"id":1891},"stage-9-acceptance","Stage 9: Acceptance",[22,1894,1895],{},[50,1896,1897],{},"Function: RCLConsensus::Adaptor::onAccept",[22,1899,1900],{},"When consensus is reached:",[33,1902,1905],{"className":1903,"code":1904,"language":38},[36],"┌─────────────────────────────────────────────────────────────┐\n│                      ON ACCEPT                              │\n│                                                             │\n│   Consensus          ┌──────────────┐       ┌───────────┐   │\n│   Result ──────────► │   buildLCL   │─────► │  Notify   │   │\n│                      └──────────────┘       │  System   │   │\n│                             │               └───────────┘   │\n│                             ▼                               │\n│                      ┌────────────────┐                     │\n│                      │ LedgerMaster   │                     │\n│                      │::consensusBuilt│                     │\n│                      └────────────────┘                     │\n│                             │                               │\n│                             ▼                               │\n│                      ┌──────────────┐                       │\n│                      │Apply Disputed│                       │\n│                      │ Transactions │                       │\n│                      └──────────────┘                       │\n└─────────────────────────────────────────────────────────────┘\n",[40,1906,1904],{"__ignoreMap":42},[22,1908,1909],{},[50,1910,1911],{},"Sub-Functions:",[22,1913,1914],{},[50,1915,1916],{},"buildLCL():",[175,1918,1919,1922,1925],{},[178,1920,1921],{},"Constructs Last Closed Ledger from agreed transactions",[178,1923,1924],{},"Applies transactions in canonical order",[178,1926,1927],{},"Produces validated ledger object",[22,1929,1930],{},[50,1931,1932],{},"LedgerMaster::consensusBuilt():",[175,1934,1935,1938],{},[178,1936,1937],{},"Updates system's view of current ledger",[178,1939,1940],{},"Triggers downstream processing",[22,1942,1943],{},[50,1944,1945],{},"Apply Disputed Transactions:",[175,1947,1948,1951],{},[178,1949,1950],{},"Attempts to apply transactions that weren't included",[178,1952,1953],{},"Queues for next round if applicable",[17,1955,1957],{"id":1956},"stage-10-final-acceptance","Stage 10: Final Acceptance",[22,1959,1960],{},[50,1961,1962],{},"Function: RCLConsensus::Adaptor::doAccept",[22,1964,1965],{},"Finalizes the acceptance process:",[33,1967,1970],{"className":1968,"code":1969,"language":38},[36],"\n┌─────────────────────────────────────────────────────────────┐\n│                      DO ACCEPT                              │\n│                                                             │\n│   ┌──────────────┐    ┌──────────────┐    ┌─────────────┐  │\n│   │ BuildLedger  │───►│  Process     │───►│  Accept     │  │\n│   │ ::buildLedger│    │  TxQueue     │    │ OpenLedger  │  │\n│   └──────────────┘    └──────────────┘    └─────────────┘  │\n│                                                             │\n│   Constructs the       Updates fee        Finalizes open   │\n│   ledger object        metrics, removes   ledger with      │\n│   from agreed set      included txns      local txns       │\n└─────────────────────────────────────────────────────────────┘\n\n",[40,1971,1969],{"__ignoreMap":42},[22,1973,1974],{},[50,1975,173],{},[22,1977,1978],{},[50,1979,1980],{},"BuildLedger::buildLedger:",[175,1982,1983,1986],{},[178,1984,1985],{},"Final ledger construction",[178,1987,1988],{},"State persistence",[22,1990,1991],{},[50,1992,1993],{},"app_.getTxQ().processClosedLedger:",[175,1995,1996,1999,2002],{},[178,1997,1998],{},"Updates fee metrics",[178,2000,2001],{},"Removes included transactions",[178,2003,2004],{},"Manages deferred transactions",[22,2006,2007],{},[50,2008,2009],{},"app_.openLedger().accept:",[175,2011,2012,2015],{},[178,2013,2014],{},"Applies local transactions not in closed ledger",[178,2016,2017],{},"Prepares open ledger for next round",[17,2019,2021],{"id":2020},"stage-11-end-consensus","Stage 11: End Consensus",[22,2023,2024],{},[50,2025,2026],{},"Function: NetworkOPsImp::endConsensus",[22,2028,2029],{},"Completes the round and prepares for the next:",[33,2031,2034],{"className":2032,"code":2033,"language":38},[36],"\n┌─────────────────────────────────────────────────────────────┐\n│                    END CONSENSUS                            │\n│                                                             │\n│   checkLastClosedLedger()                                   │\n│       │                                                     │\n│       ├─── Match? ──► Continue normally                     │\n│       │                                                     │\n│       └─── Mismatch? ──► switchLastClosedLedger()           │\n│                              │                              │\n│                              ├──► clearNeedNetworkLedger()  │\n│                              ├──► processClosedLedger()     │\n│                              └──► accept open ledger        │\n│                                                             │\n│   m_ledgerMaster.switchLCL()                                │\n│       │                                                     │\n│       ▼                                                     │\n│   setMode() ──► Update operational mode                     │\n│       │                                                     │\n│       ▼                                                     │\n│   Prepare for next round                                    │\n└─────────────────────────────────────────────────────────────┘\n\n",[40,2035,2033],{"__ignoreMap":42},[17,2037,2039],{"id":2038},"stage-12-begin-next-round","Stage 12: Begin Next Round",[22,2041,2042],{},[50,2043,2044],{},"Function: NetworkOPsImp::beginConsensus",[22,2046,2047],{},"The cycle continues:",[33,2049,2051],{"className":58,"code":2050,"language":60,"meta":42,"style":42},"\u002F\u002F Begin next consensus round\nreportConsensusStateChange();  \u002F\u002F Log state change\nRCLConsensus::startRound();    \u002F\u002F Initialize next round\n\u002F\u002F Loop back to Stage 2\n",[40,2052,2053,2058,2069,2084],{"__ignoreMap":42},[64,2054,2055],{"class":66,"line":67},[64,2056,2057],{"class":70},"\u002F\u002F Begin next consensus round\n",[64,2059,2060,2063,2066],{"class":66,"line":74},[64,2061,2062],{"class":97},"reportConsensusStateChange",[64,2064,2065],{"class":87},"();",[64,2067,2068],{"class":70},"  \u002F\u002F Log state change\n",[64,2070,2071,2074,2076,2079,2081],{"class":66,"line":80},[64,2072,2073],{"class":252},"RCLConsensus",[64,2075,256],{"class":87},[64,2077,2078],{"class":97},"startRound",[64,2080,2065],{"class":87},[64,2082,2083],{"class":70},"    \u002F\u002F Initialize next round\n",[64,2085,2086],{"class":66,"line":104},[64,2087,2088],{"class":70},"\u002F\u002F Loop back to Stage 2\n",[17,2090,2092],{"id":2091},"complete-lifecycle-diagram","Complete Lifecycle Diagram",[33,2094,2097],{"className":2095,"code":2096,"language":38},[36],"┌────────────────────────────────────────────────────────────────────┐\n│                  COMPLETE CONSENSUS CYCLE                          │\n│                                                                    │\n│   Application Start                                                │\n│         │                                                          │\n│         ▼                                                          │\n│   ┌──────────────────┐                                             │\n│   │  beginConsensus  │◄─────────────────────────────────────────┐  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐                                          │  │\n│   │  preStartRound   │                                          │  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐                                          │  │\n│   │    startRound    │                                          │  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐    Timer                                 │  │\n│   │   OPEN PHASE     │◄────────────┐                            │  │\n│   │                  │             │                            │  │\n│   │  playbackProposals             │                            │  │\n│   │  timerEntry()    │─────────────┘                            │  │\n│   │  shouldCloseLedger ──► closeLedger()                        │  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐    Timer                                 │  │\n│   │ ESTABLISH PHASE  │◄────────────┐                            │  │\n│   │                  │             │                            │  │\n│   │  timerEntry()    │─────────────┘                            │  │\n│   │  updateOurPositions                                         │  │\n│   │  haveConsensus() ──► onAccept()                             │  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐                                          │  │\n│   │  ACCEPTED PHASE  │                                          │  │\n│   │                  │                                          │  │\n│   │  buildLCL()      │                                          │  │\n│   │  doAccept()      │                                          │  │\n│   └────────┬─────────┘                                          │  │\n│            │                                                    │  │\n│            ▼                                                    │  │\n│   ┌──────────────────┐                                          │  │\n│   │   endConsensus   │──────────────────────────────────────────┘  │\n│   └──────────────────┘                                             │\n│                                                                    │\n└────────────────────────────────────────────────────────────────────┘\n",[40,2098,2096],{"__ignoreMap":42},[17,2100,2102],{"id":2101},"summary","Summary",[22,2104,2105],{},[50,2106,2107],{},"Lifecycle Stages:",[477,2109,2110,2122],{},[480,2111,2112],{},[483,2113,2114,2117,2120],{},[486,2115,2116],{},"Stage",[486,2118,2119],{},"Function",[486,2121,494],{},[496,2123,2124,2135,2145,2155,2165,2176,2187,2198,2209,2220,2231,2242],{},[483,2125,2126,2129,2132],{},[501,2127,2128],{},"1",[501,2130,2131],{},"Application.cpp",[501,2133,2134],{},"Entry point",[483,2136,2137,2140,2142],{},[501,2138,2139],{},"2",[501,2141,366],{},[501,2143,2144],{},"Preparation and validation",[483,2146,2147,2150,2152],{},[501,2148,2149],{},"3",[501,2151,2078],{},[501,2153,2154],{},"Parameter initialization",[483,2156,2157,2159,2162],{},[501,2158,1448],{},[501,2160,2161],{},"Open phase",[501,2163,2164],{},"Transaction collection",[483,2166,2167,2170,2173],{},[501,2168,2169],{},"5",[501,2171,2172],{},"shouldCloseLedger",[501,2174,2175],{},"Close decision",[483,2177,2178,2181,2184],{},[501,2179,2180],{},"6",[501,2182,2183],{},"closeLedger",[501,2185,2186],{},"Transition to establish",[483,2188,2189,2192,2195],{},[501,2190,2191],{},"7",[501,2193,2194],{},"Establish phase",[501,2196,2197],{},"Proposal exchange",[483,2199,2200,2203,2206],{},[501,2201,2202],{},"8",[501,2204,2205],{},"checkConsensus",[501,2207,2208],{},"Agreement evaluation",[483,2210,2211,2214,2217],{},[501,2212,2213],{},"9",[501,2215,2216],{},"onAccept",[501,2218,2219],{},"Consensus acceptance",[483,2221,2222,2225,2228],{},[501,2223,2224],{},"10",[501,2226,2227],{},"doAccept",[501,2229,2230],{},"Final processing",[483,2232,2233,2236,2239],{},[501,2234,2235],{},"11",[501,2237,2238],{},"endConsensus",[501,2240,2241],{},"Round completion",[483,2243,2244,2247,2249],{},[501,2245,2246],{},"12",[501,2248,98],{},[501,2250,2251],{},"Next round",[22,2253,2254],{},[50,2255,2256],{},"Key Takeaways:",[1804,2258,2259,2265,2271,2277,2283],{},[178,2260,2261,2264],{},[50,2262,2263],{},"Timer-driven",": Periodic events drive state transitions",[178,2266,2267,2270],{},[50,2268,2269],{},"Iterative",": Establish phase loops until consensus",[178,2272,2273,2276],{},[50,2274,2275],{},"Convergent",": Avalanche mechanism's rising thresholds force consensus",[178,2278,2279,2282],{},[50,2280,2281],{},"Resilient",": Handles network issues and recovery",[178,2284,2285,2288],{},[50,2286,2287],{},"Continuous",": Rounds follow each other seamlessly",[22,2290,2291],{},"In the next chapter, we'll explore the ledger architecture that stores the results of consensus.",[2293,2294,2295],"style",{},"html pre.shiki code .sQrFR, html code.shiki .sQrFR{--shiki-default:#BDC4CC}html pre.shiki code .sWyjQ, html code.shiki .sWyjQ{--shiki-default:#FF9492}html pre.shiki code .sMAXC, html code.shiki .sMAXC{--shiki-default:#F0F3F6}html pre.shiki code .sj_SG, html code.shiki .sj_SG{--shiki-default:#DBB7FF}html pre.shiki code .sTRMh, html code.shiki .sTRMh{--shiki-default:#ADDCFF}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s_sBn, html code.shiki .s_sBn{--shiki-default:#FFB757}",{"title":42,"searchDepth":74,"depth":74,"links":2297},[2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313],{"id":19,"depth":74,"text":20},{"id":30,"depth":74,"text":31},{"id":45,"depth":74,"text":46},{"id":189,"depth":74,"text":190},{"id":223,"depth":74,"text":224},{"id":464,"depth":74,"text":465},{"id":652,"depth":74,"text":653},{"id":1049,"depth":74,"text":1050},{"id":1086,"depth":74,"text":1087},{"id":1240,"depth":74,"text":1241},{"id":1891,"depth":74,"text":1892},{"id":1956,"depth":74,"text":1957},{"id":2020,"depth":74,"text":2021},{"id":2038,"depth":74,"text":2039},{"id":2091,"depth":74,"text":2092},{"id":2101,"depth":74,"text":2102},"Consensus Lifecycle for Consensus I: Node, Consensus, and Ledger Fundamentals, in the Core Dev Bootcamp: XRPL Commons docs.","md",{},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle",{"title":5,"description":2314},"xrpl-trainings\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle.md","docs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle","6ZlCPTfWe55Rs-7-8naFVCDKFnVWCaEU6kkIj6SaVYc",[],[2324,2365,2379,2399,2422,2814],{"title":2325,"path":2326,"children":2327,"description":2364,"pages":401},"XRPL Basics","\u002Fdocs\u002Fxrpl-basics",[2328,2331,2334,2337,2340,2343,2346,2349,2352,2355,2358,2361],{"title":2329,"path":2330},"Getting Started","\u002Fdocs\u002Fxrpl-basics\u002Fgetting-started",{"title":2332,"path":2333},"Trustline","\u002Fdocs\u002Fxrpl-basics\u002Ftrustline",{"title":2335,"path":2336},"Payments","\u002Fdocs\u002Fxrpl-basics\u002Fpayments",{"title":2338,"path":2339},"Reading and subscribing to Transactions","\u002Fdocs\u002Fxrpl-basics\u002Freading-and-writing-memos",{"title":2341,"path":2342},"Writing and reading memos","\u002Fdocs\u002Fxrpl-basics\u002Fwriting-and-reading-memos",{"title":2344,"path":2345},"Non Fungible Tokens","\u002Fdocs\u002Fxrpl-basics\u002Fnon-fungible-tokens",{"title":2347,"path":2348},"Multi-Purpose Tokens","\u002Fdocs\u002Fxrpl-basics\u002Fmptoken",{"title":2350,"path":2351},"PathFinding","\u002Fdocs\u002Fxrpl-basics\u002Fpath-finding",{"title":2353,"path":2354},"Escrow","\u002Fdocs\u002Fxrpl-basics\u002Fescrow",{"title":2356,"path":2357},"Price Oracles","\u002Fdocs\u002Fxrpl-basics\u002Fprice-oracles",{"title":2359,"path":2360},"Tickets","\u002Fdocs\u002Fxrpl-basics\u002Ftickets",{"title":2362,"path":2363},"Multi-Signature","\u002Fdocs\u002Fxrpl-basics\u002Fmulti-signature","In this section we will cover some of the primary functionality of the XRPL ledger.",{"title":2366,"path":2367,"children":2368,"description":2378,"pages":104},"Token Issuance and Liquidity","\u002Fdocs\u002Ftoken-issuance-and-liquidity",[2369,2372,2375],{"title":2370,"path":2371},"Creating Accounts and Setup","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fcreating-accounts",{"title":2373,"path":2374},"Issuing Tokens","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fissuing-tokens",{"title":2376,"path":2377},"Creating an AMM Pool","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fcreating-an-amm-pool","This session will cover token issuance and providing liquidity for your tokens using the automatic market maker built in to the XRPL",{"title":2380,"path":2381,"children":2382,"description":2398,"pages":128},"Cyphered Chat on XRPL","\u002Fdocs\u002Fcyphered-chat-on-xrpl",[2383,2386,2389,2392,2395],{"title":2384,"path":2385},"Set up","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up",{"title":2387,"path":2388},"Set up Keys","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up-keys",{"title":2390,"path":2391},"Cypher the message","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fcypher-the-message",{"title":2393,"path":2394},"Set up the memo & send the tx","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up-the-memo-and-send-the-tx",{"title":2396,"path":2397},"Get the message and decypher it","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fget-the-message-and-decypher-it","Send encrypted messages over XRPL",{"title":2400,"path":2401,"children":2402,"description":2421,"pages":153},"EVM Sidechain","\u002Fdocs\u002Fevm-sidechain",[2403,2406,2409,2412,2415,2418],{"title":2404,"path":2405},"Connecting Metamask","\u002Fdocs\u002Fevm-sidechain\u002Fconnecting-metamask",{"title":2407,"path":2408},"Set up a Foundry project","\u002Fdocs\u002Fevm-sidechain\u002Fset-up-an-evm-project",{"title":2410,"path":2411},"Bridging Assets","\u002Fdocs\u002Fevm-sidechain\u002Fbridging-assets",{"title":2413,"path":2414},"Remix","\u002Fdocs\u002Fevm-sidechain\u002Fremix",{"title":2416,"path":2417},"Banking App","\u002Fdocs\u002Fevm-sidechain\u002Fbanking-app",{"title":2419,"path":2420},"Banking Contract Key Concepts","\u002Fdocs\u002Fevm-sidechain\u002Fbanking-contract-key-concepts","This workshop will walk you through deploying a smart contract and building a full app on the XRPL EVM sidechain",{"title":2423,"path":2424,"children":2425,"description":2812,"pages":2813},"Core Dev Bootcamp","\u002Fdocs\u002Fcore-dev-bootcamp",[2426,2446,2489,2539,2570,2627,2658,2674,2714,2746,2771,2787],{"title":2427,"path":2428,"children":2429},"Rippled I – Compilation, Configuration, and Launch","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01",[2430,2433,2436,2439],{"title":2431,"path":2432},"Environment & Build Toolchain","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fenvironment-build-toolchain",{"title":2434,"path":2435},"Compilation Process & Generating Binary","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fcompilation-process-generating-binary",{"title":2437,"path":2438},"Local Development & Testing","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Flocal-development-testing",{"title":2440,"path":2441,"children":2442},"Homeworks","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fhomeworks",[2443],{"title":2444,"path":2445},"Homework 1: Rippled Node Setup and Mainnet Synchronization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fhomeworks\u002Fhomework1",{"title":2447,"path":2448,"children":2449},"Rippled II: Deep Dive into the Protocol and Codebase","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02",[2450,2453,2456,2459,2462,2465,2468,2471,2474],{"title":2451,"path":2452},"Protocols: Communication and Interoperability","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fprotocols-communication-and-interoperability",{"title":2454,"path":2455},"Transactors: Transaction Processing Framework","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Ftransactors-transaction-processing-framework",{"title":2457,"path":2458},"Application Layer: Central Orchestration and Coordination","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fapplication-layer-central-orchestration-and-coordination",{"title":2460,"path":2461},"Consensus Engine: XRP Ledger Consensus Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fconsensus-engine-xrp-ledger-consensus-protocol",{"title":2463,"path":2464},"Overlay Network: Peer-to-Peer Networking Layer","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Foverlay-network-peer-to-peer-networking-layer",{"title":2466,"path":2467},"Transaction Lifecycle: Complete Transaction Journey","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Ftransaction-lifecycle-complete-transaction-journey",{"title":2469,"path":2470},"Codebase Navigation: Efficiently Navigating the Rippled Source","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fcodebase-navigation-efficiently-navigating-the-rippled-source",{"title":2472,"path":2473},"Debugging Tools: Development and Debugging Techniques","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fdebugging-tools-development-and-debugging-techniques",{"title":2440,"path":2475,"children":2476},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks",[2477,2480,2483,2486],{"title":2478,"path":2479},"Homework 1: Transaction Flow Analysis","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework1",{"title":2481,"path":2482},"Homework 2: Transactor Code Exploration","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework2",{"title":2484,"path":2485},"Homework 3: Logging and Debugging","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework3",{"title":2487,"path":2488},"Homework 4: Architecture Diagram","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework4",{"title":2490,"path":2491,"children":2492},"Anatomy of Rippled: SHAMap and NodeStore","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03",[2493,2496,2499,2502,2505,2508,2511,2514,2517,2520,2523,2526],{"title":2494,"path":2495},"Foundational Concepts","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fstate-management-challenges",{"title":2497,"path":2498},"Trees, Hashing, and Cryptographic Commitments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Ftree-fundamentals",{"title":2500,"path":2501},"SHAMap Architecture and Node Hierarchy","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-architecture",{"title":2503,"path":2504},"Navigation, Hashing, and Merkle Properties","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-navigation-hashing",{"title":2506,"path":2507},"Traversal, Iteration, and Synchronization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-synchronization",{"title":2509,"path":2510},"The NodeStore","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fnodestore-architecture",{"title":2512,"path":2513},"Storage Abstraction and Backend Implementations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fstorage-backends",{"title":2515,"path":2516},"Cache Layer and Performance Optimization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fcache-layer",{"title":2518,"path":2519},"Database Operations and Lifecycle Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fdatabase-operations",{"title":2521,"path":2522},"Cryptographic Proofs and State Reconstruction","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fproofs-state-reconstruction",{"title":2524,"path":2525},"Resource Management and Performance Characteristics","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fresource-management",{"title":2527,"path":2528,"children":2529},"Appendices","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices",[2530,2533,2536],{"title":2531,"path":2532},"Appendix : Codebase Navigation Guide","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fnavigation",{"title":2534,"path":2535},"Appendix : Configuration Reference","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fconfiguration",{"title":2537,"path":2538},"Appendix : Debugging and Development Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fdebugging",{"title":2540,"path":2541,"children":2542},"Transactors: Understanding the Lifecycle of a Transaction","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis",[2543,2546,2549,2552,2555,2558,2561,2564,2567],{"title":2544,"path":2545},"Transactor Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Ftransactor-architecture",{"title":2547,"path":2548},"Processing Pipeline","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fprocessing-pipeline",{"title":2550,"path":2551},"Fee and Sequence Handling","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Ffee-sequence-handling",{"title":2553,"path":2554},"State Modification Patterns","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fstate-modification",{"title":2556,"path":2557},"TER Result Codes","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fter-result-codes",{"title":2559,"path":2560},"Case Study: CheckCreate Transactor","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fcase-study-checkcreate",{"title":2562,"path":2563},"Homework 1: Trace a Transaction Through All Phases","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework1",{"title":2565,"path":2566},"Homework 2: Implement a Custom Validation Check","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework2",{"title":2568,"path":2569},"Homework 3: Analyze TER Code Paths","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework3",{"title":2571,"path":2572,"children":2573},"Cryptography I: Blockchain Security and Cryptographic Foundations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04",[2574,2577,2580,2583,2586,2589,2592,2595,2598,2601,2604,2607,2610,2621],{"title":2575,"path":2576},"The Four Pillars of Security","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fthe-four-pillars-of-security",{"title":2578,"path":2579},"The Lifecycle of a Cryptographic Key","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fthe-lifecycle-of-a-cryptographic-key",{"title":2581,"path":2582},"Random Number Generation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation",{"title":2584,"path":2585},"Random Number Generation & Entropy","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy",{"title":2587,"path":2588},"Key Generation Pipeline","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fkey-generation-pipeline",{"title":2590,"path":2591},"Transaction Signing & Verification","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Ftransaction-signing-and-verification",{"title":2593,"path":2594},"Hash Functions in XRPL","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhash-functions-in-xrpl",{"title":2596,"path":2597},"Base58Check Encoding","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fbase58check-encoding",{"title":2599,"path":2600},"Peer Handshake Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fpeer-handshake-protocol",{"title":2602,"path":2603},"Secure Memory Handling","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fsecure-memory-handling",{"title":2605,"path":2606},"Common Cryptographic Pitfalls","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fcommon-cryptographic-pitfalls",{"title":2608,"path":2609},"Performance & Optimization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fperformance-and-optimization",{"title":2527,"path":2611,"children":2612},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices",[2613,2615,2618],{"title":2531,"path":2614},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Fcodebase-navigation-guide",{"title":2616,"path":2617},"Appendix : Debugging & Development Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Fdebugging-and-development-tools",{"title":2619,"path":2620},"Appendix : RFCs and Standards Reference","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Frfcs-and-standards-reference",{"title":2440,"path":2622,"children":2623},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhomeworks",[2624],{"title":2625,"path":2626},"Homework 1: Signature Verification Discovery","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhomeworks\u002Fhomework1",{"title":2628,"path":2629,"children":2630},"Cryptography II: Protocol Extensions and Quantum Signatures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05",[2631,2634,2637,2640,2643,2646,2652],{"title":2632,"path":2633},"Overlay Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Foverlay-architecture",{"title":2635,"path":2636},"Connection Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fconnection-lifecycle",{"title":2638,"path":2639},"Handshake Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhandshake-protocol",{"title":2641,"path":2642},"Message Relaying","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fmessage-relaying",{"title":2644,"path":2645},"Peer Discovery","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fpeer-discovery",{"title":2527,"path":2647,"children":2648},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fappendices",[2649],{"title":2650,"path":2651},"XLS-??d Quantum-Resistant Signatures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fappendices\u002Fxls-d",{"title":2440,"path":2653,"children":2654},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhomeworks",[2655],{"title":2656,"path":2657},"Homework 1: Building Quantum-Resistant Signatures for XRPL","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhomeworks\u002Fhomework1",{"title":2659,"path":2660,"children":2661},"Communication I: Understanding XRPL(d) RPC Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06",[2662,2665,2668,2671],{"title":2663,"path":2664},"RPC Handler Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Frpc-handler-architecture",{"title":2666,"path":2667},"Request and Response Flow","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Frequest-response-flow",{"title":2669,"path":2670},"Authentication and Authorization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Fauthentication-authorization",{"title":2672,"path":2673},"Error Handling and Validation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Ferror-handling-validation",{"title":2675,"path":2676,"children":2677},"Communication II: Building and Integrating Custom RPC Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07",[2678,2681,2684,2687,2690,2702],{"title":2679,"path":2680},"Implementing Custom Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fimplementing-custom-handlers",{"title":2682,"path":2683},"Testing RPC Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Ftesting-rpc-handlers",{"title":2685,"path":2686},"Advanced Features","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fadvanced-features",{"title":2688,"path":2689},"Best Practices and Patterns","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fbest-practices-patterns",{"title":2527,"path":2691,"children":2692},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices",[2693,2696,2699],{"title":2694,"path":2695},"Appendix: Handler Examples","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fhandler-examples",{"title":2697,"path":2698},"Appendix: Helper Functions","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fhelper-functions",{"title":2700,"path":2701},"Appendix: Debugging Guide","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fdebugging-guide",{"title":2440,"path":2703,"children":2704},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks",[2705,2708,2711],{"title":2706,"path":2707},"Homework 1: Building a Custom RPC Handler","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fhomework1",{"title":2709,"path":2710},"Hints","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fhints",{"title":2712,"path":2713},"Snippets","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fsnippets",{"title":2715,"path":2716,"children":2717},"Consensus I: Node, Consensus, and Ledger Fundamentals","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08",[2718,2721,2724,2725,2728,2731,2734,2737],{"title":2719,"path":2720},"Consensus Fundamentals","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-fundamentals",{"title":2722,"path":2723},"Consensus Modes and Phases","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-modes-phases",{"title":5,"path":2317},{"title":2726,"path":2727},"Ledger Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-architecture",{"title":2729,"path":2730},"Ledger Data Structures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-data-structures",{"title":2732,"path":2733},"Ledger Acquisition and Validation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-acquisition-validation",{"title":2735,"path":2736},"RPC and Peer Transaction Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Frpc-peer-tx-lifecycle",{"title":2440,"path":2738,"children":2739},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks",[2740,2743],{"title":2741,"path":2742},"Homework 1: Transaction Consensus Journey","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks\u002Fhomework1",{"title":2744,"path":2745},"Homework 2: Consensus Dispute Engineering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks\u002Fhomework2",{"title":2747,"path":2748,"children":2749},"Consensus II: UNLs and Ledger Amendments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09",[2750,2753,2756,2759,2762,2765,2768],{"title":2751,"path":2752},"Transaction Ordering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Ftx-ordering",{"title":2754,"path":2755},"Consensus Validations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fconsensus-validations",{"title":2757,"path":2758},"Amendments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Famendments",{"title":2760,"path":2761},"UNL Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Funl",{"title":2763,"path":2764},"Consensus Peers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fconsensus-peers",{"title":2766,"path":2767},"Homework 1: Validator Keys Setup and Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fhomeworks\u002Fhomework1",{"title":2769,"path":2770},"Homework 2: Negative UNL Engineering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fhomeworks\u002Fhomework2",{"title":2772,"path":2773,"children":2774},"AMM: Automated Market Maker","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis",[2775,2778,2781,2784],{"title":2776,"path":2777},"AMM Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-architecture",{"title":2779,"path":2780},"AMM Transactions","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-transactions",{"title":2782,"path":2783},"AMM Logic","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-logic",{"title":2785,"path":2786},"Pathfinding Integration","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-pathfinding",{"title":2788,"path":2789,"children":2790},"Building Amendments: Lifecycle and Core Protocol Impact","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10",[2791,2794,2797,2800,2803,2806,2809],{"title":2792,"path":2793},"Amendment Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-architecture",{"title":2795,"path":2796},"Amendment Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-lifecycle",{"title":2798,"path":2799},"Voting and Activation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fvoting-and-activation",{"title":2801,"path":2802},"Core Protocol Impact","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fprotocol-impact",{"title":2804,"path":2805},"Network Coordination","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fnetwork-coordination",{"title":2807,"path":2808},"Monitoring and Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-monitoring",{"title":2810,"path":2811},"Homework 1: Amendment Status Analysis","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fhomework\u002Fhomework1","The XRPL Core Dev Bootcamp – Online Edition is a program designed for intermediate to advanced C++ developers looking to deepen their skills in the core of the XRP Ledger.",126,{"title":2815,"path":2816,"children":2817,"description":2824,"pages":80},"Tools","\u002Fdocs\u002Ftools",[2818,2821],{"title":2819,"path":2820},"Xaman Setup","\u002Fdocs\u002Ftools\u002Fxaman-setup",{"title":2822,"path":2823},"Metamask Setup","\u002Fdocs\u002Ftools\u002Fmetamask-setup","In this section you will find instructions on how to setup wallets and tools",1796220774146]