Skip to main content

Consensus Team Update

· 3 min read
Damian Nadales
Consensus Team Lead

High level summary​

  • Leios implementation on main (Treasury Funding Initiative 4: Ouroboros Leios Implementation):
    • The node now fetches endorser blocks and their transactions from peers with the LeiosFetch protocol. It does not fetch the endorser blocks that it forged itself (#2492, #2493, #2503).
    • LeiosFetch now reads ChainSync headers as endorser block announcements. If a header says that its block certifies an endorser block, LeiosFetch knows that the peer holds that endorser block and all its transactions. The node disconnects from a peer that offers certificates for two different endorser blocks in the same election (#2507).
    • Chain selection now tells LeiosFetch which endorser block a block certifies. If a block producer announces two endorser blocks, the node fetches the certified one, even when it saw the other one first (#2506).
    • The node now fetches fewer transactions. The new LeiosTxCache records which transactions the node already holds. LeiosFetch copies these transactions, and transactions from the Mempool, into the LeiosDB instead of fetching them again (#2508, #2516). The LeiosTxCache uses a salted hash table, so peers cannot choose transaction hashes that slow it down (#2509).
    • LeiosFetch now makes a fetch decision every 20 ms instead of every 500 ms. On a 12-node test network, the p99 time for a block producer to get all transactions of an endorser block went down from 1.68 s to 0.36 s (#2549, #2531).
    • Block producers now forge blocks that certify the endorser block of the previous block. A certifying block carries no transactions and announces no endorser block (#2523).
    • The node now validates certified endorser blocks and applies their transactions to the ledger. If a certified endorser block is missing or does not decode, the node shuts down and validates the chain fully on the next start (#2515).
    • In the Dijkstra era, the header hash now covers only the header body and the signature. The hash no longer depends on how the outer array of the header is encoded (#2530).
    • The Mempool now has a time limit to compute the transactions for a new block, so a slow Mempool cannot delay block forging. A new trace, TraceGetSnapshotFor, reports how long the computation takes. This ports a change from the prototype (#2437).
  • Maintenance and support (Treasury Funding Initiative 17: Maintenance and Support):
    • Released ouroboros-consensus 5.5.0.0, which uses ouroboros-network 2.1 (#2550).
    • The node now uses less memory when it writes ledger snapshots. It no longer keeps a snapshot in memory after it writes the snapshot to disk (#2462). While the node syncs, it writes snapshots without the random delay, so it keeps fewer old ledger states in memory (#2464).
    • The fix that stops the forging traces from counting the Mempool snapshot time as block forging time is now also on main (#2473).