Skip to main content

Performance & Tracing Update

· 7 min read
Michael Karg
Performance and Tracing Team Lead

High level summary​

  • Benchmarking: Node 11.2 release benchmarks; Dijkstra feature benchmarks: Nested Txns, reference script pricing, mempool / EB capacity; Leios Week45 benchmarks.
  • Development: Performance fixes for Node 11.2 closing space leak; locli analysis tool gets new major release 3.0.
  • Tracing: Correctness fixes for Tracing System; Alert manager ongoing work, currently focused on robust test harness.
  • Infrastructure: Dijkstra feature workloads along with tx-generator new major release 3.0 (draft PR); New workbench DuckDB/Parquet layer for compact, queryable logs (in testing); workbench maintenance.
  • Leios: Leios workload generator tx-centrifuge being equipped with Plutus workloads.
  • Node Diversity: Contributions to the London Workshop - Performance Observability Spec and workbench integration.

Low level overview​

Benchmarking​

The Performance & Tracing team has run, analyzed and published benchmarks for the Node 11.2 release. The full comparison against the 11.1 baseline, including our observations and conclusions, is available in the Performance report for 11.2.1.

In parallel, our performance workbench (the benchmarking automation framework) picked up a first round of benchmarks for upcoming Dijkstra-era features - nested transactions, reference script pricing, and mempool / EB (Endorser Block) capacity - to assess their performance characteristics ahead of any hard fork. The reference script results have been shared internally and are under discussion, while raw benchmark data for nested txns and mempool / EB capacity is still under analysis.

We've also continued our cluster benchmarks for Leios, this time on the Week45 build; we were able to empirically validate an important performance optimization, resulting in the certification of almost every EB, even when the network is under permanent, extreme submission pressure.

Development​

While working towards the Node 11.2 release in general, the team was also directly involved in closing two memory regressions. The more severe one had been flagged as a known issue since Node 11.1, with community complaints: writing a ledger snapshot no longer temporarily grows live memory by about the snapshot's own size, and the node's overall memory footprint drops markedly on top of that. See the Performance report for 11.2.1 for the full before/after picture. A second, smaller leak - introduced only in the 11.2.0 pre-release and caught before it reached anyone - retained part of the genesis ledger state for the node's entire lifetime; also fixed (ouroboros-consensus PR#2478).

Our analysis tool locli also reached a new major release, 3.0. It drops support for the legacy tracing formats that current node versions no longer emit, and its comparison reports are now Typst-only, so rendering a PDF no longer needs an Emacs/LaTeX toolchain. The release also adds new report sections for ledger snapshots and transaction processing, alongside a number of smaller metric fixes (cardano-node PR#6720).

Tracing​

November brought three correctness fixes across the tracing stack. A node could crash outright if an I/O error occurred while it was writing its own trace output to stdout - including while trying to print that very error - which is now guarded against (hermod-tracing PR#24). Separately, Hermod's Prometheus metrics server could end up permanently refusing a scraping host after a few socket timeouts, because an interrupted connection-close skipped releasing that host's reserved slot; the slot is now always released, even when the close itself is interrupted (hermod-tracing PR#29). And on cardano-node, a block producer could exit with status 1 on a clean, planned shutdown, because its ledger-metrics tracer kept querying the already-closed ChainDB; the tracer now runs in consensus's own resource registry, so it's cancelled before the ChainDB closes - this fix is currently under review (cardano-node PR#6782).

The monitoring/alarm system (cardano-node PR#6664) moved into its second phase in November: log-consumer dispatch now carries a rule's source, id, severity and summary rather than just a consumer name, and the timeseries producer gained a typed configuration and a pure, edge-triggered state machine (inactive / pending / active) with configurable "for" and "repeat every" windows and deterministic series keys. The evaluator thread and value decoding are left for a later iteration.

Last month's trace-filtering optimization work has since been validated and merged, for both Hermod and trace-dispatcher (hermod-tracing PR#27): dropping a filtered-out trace message is now roughly 5x cheaper in time and allocation, with no measurable difference for cardano-node itself, whose own trace volume is too low for the saving to show up.

Infrastructure​

Our performance workbench is getting tx-generator ready for the Dijkstra era: a new major release, 3.0, adds a generator for nested transactions - transactions that themselves carry sub-transactions - script variants and reference scripts for Plutus workloads (so the ledger's script-decoding cache can't hide their true cost), and support for Plutus V4 (cardano-node PR#6776). Transactions are now built through cardano-api's new Compatible interface rather than the deprecated functions it replaces. The PR is currently under review.

Separately, the workbench gained a new DuckDB/Parquet layer for its logs, still in testing (cardano-node feature branch): a run's node, generator and explorer logs are converted once into compact Parquet files, queryable directly with SQL via DuckDB instead of being re-parsed from raw text for every analysis. Beyond faster, ad-hoc queries for our own analysts, it also lets us cross-check locli's own metrics independently over the same data, and query a remote run's logs over SSH without copying them off the benchmark host first.

A smaller workbench maintenance PR has been merged (cardano-node PR#6764): safer handling of a run's metadata (no more silently truncated or placeholder-filled manifests on a fetch), a configurable override for the ledger-snapshot schedule, and a new 6-dense profile family on Protocol Version 10.

Leios​

Our Leios workload generator tx-centrifuge is being equipped with Plutus workloads, catching up to what tx-generator already offers for Praos benchmarks. The goal is to measure the performance impact of different execution-budget limits for EBs - how tightly such a limit can be set before it starts constraining throughput. This is still early-stage work, with no branch yet to point to.

Node Diversity​

At the London Workshop, ICAN's CEO presented the team's work on a Cardano node performance observability specification (cardano-node branch). The branch holds two companion documents. The first specifies which events any Cardano node implementation - not only the Haskell one - has to emit so its performance can be analyzed by our workbench and compared against other implementations under the same workload: for each event, the precise moment it marks and what its payload means, grouped into conformance tiers so an implementation can start with the essentials (block production, diffusion, resource usage) and add detail later. The second document covers everything else a node needs to take part in a workbench benchmark run: delivery as a self-contained executable, a fixed invocation with no node-specific flags from the workbench, and a clearly bounded, self-declared footprint in cores and memory.

Together, the two documents are meant to give the ecosystem one yardstick for all node implementations - a precise, implementation-agnostic way to measure and compare performance across different Cardano clients.

Ledger Team Update

· 4 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary​

We continued with Leios work this cycle, with most of the work going into the endorser block and the block header. The endorser block rule gained its real validations, moving it past the placeholder check it started out with. The Leios header hash was corrected so that it covers only the header body and the KES signature. Forecasting was extended with the maximum transaction size, which Leios is the first protocol to have a reason to forecast, and the block header coders were brought back.

CIP-172, self-usable transaction outputs, was implemented, reaching across the Babbage, Conway and Dijkstra eras.

Two protocol-level safety fixes landed. Governance updates that would set the maximum pledge leverage below one are now rejected, since such a value can produce negative pool rewards and abort reward application entirely. Separately, a change to the VRF duplicate counter that had accidentally altered Conway behavior while fixing Dijkstra was reverted, the two code paths having turned out not to be equivalent.

Sub-transaction support was rounded out on the API side. The helper reporting the outputs a transaction produces now includes sub-transaction outputs, where a batch creating three UTxOs previously reported only the top-level one. The timelock upgrade function was also fixed and renamed.

Testing was dominated by Plutus V4 and by conformance. The V4 transaction info translation, which had been merged without unit tests, received a thorough set covering each translated field. The Plutus script decoder is now checked to agree with the Plutus deserializer across every language, PLC version, protocol version and builtin. A transaction-level guard script exercises batch validation, including the phase-2-invalid cases. The formal ledger specification was updated three times over the cycle, each time enabling further tests, and the maximum pool stake calculation is now property-tested against the specification.

Tooling gained a custom git diff driver for CBOR files, wired up automatically through the development shell, so binary CBOR now shows up as readable text in diffs.

Low level summary​

Features​

  • PR-6268 - EB rule validations
  • PR-6287 - Hash only header body and signature
  • PR-6285 - DijkstraForecast: include maxTxSize
  • PR-6282 - Bring back coders for the block header
  • PR-6252 - CIP-172: Self-Usable Transaction Outputs
  • PR-6277 - Reject maximum pledge leverage updates below one
  • PR-6300 - Revert previous behavior of VRF duplicates counter initialization
  • PR-6280 - Include Dijkstra subtransaction outputs in producedTxOuts
  • PR-6296 - Fix upgradeTimelock and rename it

Testing​

  • PR-6254 - Add unit tests for the PlutusV4 TxInfo translation in Dijkstra
  • PR-6286 - Test that decodePlutusRunnable uses the correct Plutus ledger language
  • PR-6294 - Add inputSpendingGuard PlutusV4 tx-level validation guard test
  • PR-6291 - Test maxPool in conformance
  • PR-6279 - Make modifyPParams affect future pparams
  • PR-6281 - Update formal-ledger-specification and enable tests
  • PR-6293 - Update formal-ledger-specifications and enable tests
  • PR-6306 - Update formal ledger specification and enable tests
  • PR-6299 - Convert Alonzo golden CBOR file from hex to binary

Infrastructure and releasing​

  • PR-6288 - Auto-setup a custom git diff driver for CBOR files

Mithril Team Update

· 3 min read
Jean-Philippe Raynaud
Mithril Tech Lead

High level overview​

This week, the Mithril team completed the managed Kubo node download mode and the support of the Kubo RPC API authentication in the client for IPFS.

The team kept working on the discovery of the facts of the Cardano node, the guessing of the Mithril signer and DMQ node parameters and the terminal user interface of the setup command, and the assessment of the impact of the client Kubo node acting as an IPFS peer. They also worked on the prototypes of the certification adaptation in the Dijkstra era and of the Cardano database snapshot and restoration with the Leios database, and on the deployment of the dev-dijkstranet and dev-musashinet Mithril networks.

Finally, they updated the guild-operators scripts to use the on-chain protocol configuration, and worked on the preparation of the 2650 distribution, the migration of the npm packages publication to trusted publishing, and the upgrade to Cardano node 11.2.

Low level overview​

Features​

  • Completed the issue Implement a managed Kubo node download mode in the client #3655
  • Completed the issue Support the Kubo RPC API authentication in the client #3656
  • Worked on the issue Discover the facts of the Cardano node for the setup command #3677
  • Worked on the issue Guess the Mithril signer and DMQ node parameters for the mithril-setup command #3678
  • Worked on the issue Implement the terminal user interface of the mithril-setup signer command #3699
  • Worked on the issue Assess the impact of the client Kubo node acting as a peer #3701
  • Worked on the issue Prototype the certification adaptation in the Dijkstra era (before Leios) #3687
  • Worked on the issue Prototype the Cardano database snapshot and restoration with the Leios database #3691
  • Worked on the issue Deploy a dev-dijkstranet Mithril network #3689
  • Worked on the issue Deploy a dev-musashinet Mithril network #3690

Protocol maintenance​

  • Completed the issue Update the guild-operators scripts to use the on-chain protocol configuration #3661
  • Worked on the issue Release 2650 distribution #3651
  • Worked on the issue Migrate the npm packages publication to trusted publishing #3654
  • Worked on the issue Upgrade to Cardano 11.2 #3585

Mithril Team Update

· 3 min read
Jean-Philippe Raynaud
Mithril Tech Lead

High level overview​

This week, the Mithril team activated the snark feature by default, completed the prototype of the orchestrator of the setup command, and defined the migration of the existing immutable archives to the deterministic format. They also supported the Kubo RPC API authentication in the aggregator, and published a DNSLink record of the immutable archives IPNS name in the DNS zones of the Mithril networks.

The team kept working on the managed Kubo node download mode and the Kubo RPC API authentication in the client, the discovery of the facts of the Cardano node for the setup command, the prototype of the certification adaptation in the Dijkstra era, and the deployment of a dev-dijkstranet Mithril network.

Finally, they simplified the serialization of the IVC proofs, removed the unused IPFS storage max setting from the infrastructure, and worked on the upgrade to Cardano node 11.2.

Low level overview​

Features​

  • Completed the issue Activate snark feature by default #3573
  • Completed the issue Prototype the orchestrator of the mithril-setup command #3642
  • Completed the issue Skip the PhantomData marker in the serialization of IvcProof #3704
  • Completed the issue Define the migration of the existing immutable archives to the deterministic format #3653
  • Completed the issue Publish a DNSLink record of the immutable archives IPNS name in the Mithril networks DNS zones #3700
  • Completed the issue Support the Kubo RPC API authentication in the aggregator #3657
  • Worked on the issue Implement a managed Kubo node download mode in the client #3655
  • Worked on the issue Support the Kubo RPC API authentication in the client #3656
  • Worked on the issue Discover the facts of the Cardano node for the setup command #3677
  • Worked on the issue Prototype the certification adaptation in the Dijkstra era (before Leios) #3687
  • Worked on the issue Deploy a dev-dijkstranet Mithril network #3689

Protocol maintenance​

  • Completed the issue Remove the unused IPFS storage max setting from the infrastructure #3662
  • Worked on the issue Upgrade to Cardano 11.2 #3585
  • Worked on the issue Update the guild-operators scripts to use the on-chain protocol configuration #3661

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 LeiosDB now stores each endorser block as one row per point, with its body and transactions as stored bytes. Before, it wrote two rows per transaction, so a full endorser block touched tens of thousands of rows (#2424).
    • The LeiosFetch server now sends an endorser block as the bytes that it stored, without a decode. This changes the wire format of MsgLeiosBlock (#2495).
    • The port of the fetch logic from the prototype continues. We added the pure decision logic of LeiosFetch (#2491) and the interface that tells other node components when an endorser block arrives (#2521).
    • The limits on the age of the announcements that a node relays or accepts are now configurable. Test networks need smaller limits, because their immutable tip is only minutes old (#2489).
    • The node now aggregates the votes that it relays into a certificate when they reach quorum. It traces each announcement that misses quorum by its deadline (#2459).
    • The mempool reserves room for an endorser block only when the Leios committee has enough stake with registered voting keys. Until then, the mempool behaves as it does in Praos (#2482, and #2481 for the prototype).
  • Leios prototype (Treasury Funding Initiative 4: Ouroboros Leios Implementation):
    • A second version of adaptive endorsements. If an endorser block misses its quorum, block producers make the next ones smaller. Each endorser block that reaches its quorum adds a small amount of capacity back (#2480).
    • The fetch client now writes to the LeiosDB synchronously, which removes a class of race conditions. Block producers no longer fetch their own endorser blocks from peers (#2477).
    • We fixed a memory spike in the LeiosNotify server (#2500).
  • Maintenance and support (Treasury Funding Initiative 17: Maintenance and Support):
    • Released ouroboros-consensus 5.4.0.0 with support for the new ledger release (#2487).
    • Released ouroboros-consensus 5.4.0.1. In this release, the LSM backend no longer counts its wait time as IOWAIT, so node metrics show the real disk wait (#2518, #2519).