Skip to main content

· 3 min read
Jean-Philippe Raynaud

High level overview

This week, the Mithril team continued implementing new succinct proofs. They completed signer authentication for SNARK verification keys, calibrated precision for lottery target value computation, and aligned domain separation tags as part of the SNARK circuit refactoring. Progress also continued on SNARK pre-aggregation primitives, improved error handling within the refactored circuit, the full review of the recursive circuit prototype, and the technical report for the recursive Halo2 circuit.

Additionally, the team finalized proof routes for Cardano blocks and transactions in the aggregator REST API and continued preparations for the next distribution release. They advanced the integration of Mithril into the Cardano Developer documentation site, added support for upgrading the Cardano node without requiring a new Mithril distribution, and completed the upgrade to Cardano node v.10.6.

Finally, they fixed a performance regression in the transaction proof route and worked on a slow import issue on dev aggregators.

Low level overview

Features

  • Completed the issue Support for authenticated signer registration for SNARK #2915
  • Completed the issue Implement proof route for Cardano Blocks and Transactions in aggregator REST API #2988
  • Completed the issue Refactor SNARK circuit - Domain Separation Tag alignment #3022
  • Completed the issue Calibrate precision and Taylor expansion iterations for Lottery Target value computation #3034
  • Worked on the issue Implement SNARK pre-aggregation primitives in STM library - Phase 2 #2943
  • Worked on the issue Full review of recursive SNARK circuit prototype #2982
  • Worked on the issue Prepare technical report for recursive Halo2 circuit #2981
  • Worked on the issue Refactor SNARK circuit - Error handling #3035
  • Worked on the issue Experimental blst-Jubjub #2772
  • Worked on the issue Release 2608 distribution #2967
  • Worked on the issue Integrate Mithril into the Cardano developer documentation website #3012
  • Completed the issue Support upgrade of Cardano node without new Mithril distribution #3058

Protocol maintenance

  • Completed the issue Upgrade to Cardano 10.6 #2790
  • Completed the issue Some unit tests are flaky with future_snark feature #3017
  • Completed the issue Update throttling parameters of Cardano blocks and transactions import #3047
  • Completed the issue Transaction proof route performance regression #3056
  • Worked on the issue Cardano blocks and transaction import very slow in dev aggregators #3050
  • Worked on the issue Enhance protocol security page on website #2703
  • Worked on the issue Improve DMQ node setup documentation #3062

· One min read
Noon van der Silk

What did the team achieve?

  • Fixed a race-condition bug on decommits #2500
  • Fixed bugs/stuck node issue around commits #2491
  • Resolved issues users were having around computing time in contracts on the hydra-node #2162
  • Fixed bug around deposits and chain rollbacks #2488
  • Improve error reporting for missing script witness #2507
  • Fix infinite AckSn loop bug related to decommits/commits #2510
  • Add a few additional logging outputs aroud chain sync status #2483, #2393
  • Great progress on partial fanout #1667

What's next?

  • Continue work on partial fanout
  • Enable running the end-to-end tests on public testnets #2482
  • Continue fixing incremental commit/decommit issues found under high transaction load #2519 (thanks Delta DeFi team!)
  • Get more structure in our benchmarks #2439
  • Support the upcoming Dijkstra Era #2495
  • Release version 1.3.0

· 2 min read
Jean-Philippe Raynaud

High level overview

This week, the Mithril team continued implementing new succinct proofs. The team completed the lottery target value computation for SNARK, updated the protocol parameters to SNARK-friendly values, prepared the SNARK circuit refactoring, and removed the off-circuit module from the Halo2 circuit. They also continued working on SNARK pre-aggregation primitives and on signer authentication for SNARK, on the full review of the recursive circuit prototype, and on the technical report for the recursive Halo2 circuit.

Additionally, the team continued work on the new certification for Cardano blocks and transactions, implementing the transaction membership prover and proof routes in the aggregator REST API. They also started preparing the release of the 2608 distribution.

Finally, they fixed a bug related to a breaking change of the snapshot converter in Cardano node v.10.6.2 and fixed flaky unit tests in the SNARK circuit.

Low level overview

Features

  • Completed the issue Compute Lottery Target Value for SNARK #2974
  • Completed the issue Update protocol parameters to SNARK friendly values - Phase 2 #2969
  • Completed the issue Prepare refactoring of SNARK circuit #2990
  • Completed the issue Remove off-circuit module in Halo2 circuit #2945
  • Worked on the issue Implement SNARK pre-aggregation primitives in STM library - Phase 2 #2943
  • Worked on the issue Full review of recursive SNARK circuit prototype #2982
  • Worked on the issue Prepare technical report for recursive Halo2 circuit #2981
  • Worked on the issue Support for authenticated signer registration for SNARK #2915
  • Worked on the issue Calibrate precision and Taylor expansion iterations for Lottery Target value computation #3034
  • Worked on the issue Implement proof route for Cardano Blocks and Transactions in aggregator REST API #2988
  • Worked on the issue Release 2608 distribution #2967

Protocol maintenance

  • Completed the issue Fix snapshot-converter breaking change in 10.6.2 #3010
  • Completed the issue Certification stopped in testing-preview network #3015
  • Completed the issue Aggregator in testing-preview panics at startup #3023
  • Completed the issue Cardano blocks and transaction import fails on dev-mainnet #3028
  • Completed the issue Client CLI proposes to restore a Legacy UTxO-HD snapshot above 10.6.2 #3029
  • Worked on the issue Upgrade to Cardano 10.6 #2790
  • Worked on the issue Some unit tests are flaky with future_snark feature #3017
  • Worked on the issue Enhance protocol security page on website #2703

· 5 min read
Michael Karg

High level summary

  • Benchmarking: Release benchmarks for 10.5.4 and 10.6.2; Parallel GC benchmarks.
  • Development: Preparation of new PlutusV3 baseline.
  • Infrastructure: Performance cluster gets custom, isolated Nix cache - safe benchmarks for security-critical changes.
  • Tracing: Improving robustness by forcing lazy values in controlled sections of code.
  • Leios: LTL Trace Verifier completed, waiting integration.
  • Node Diversity: Formal trace schema definition entering validation phase; Trace forwarding in native Rust entering testing.

Low level overview

Benchmarking

We've performed, analysed and published relase benchmarks for both Node versions 10.5.4 and 10.6.2. We could determine both to be free of performance regressions. The 10.6.2 release contains the new 'Defensive Mempool' feature, which is therefore also covered by our benchmark. The 10.6.2 release has shown to be somewhat more efficient in its use of CPU time, but exhibited a slightly higher tendency to perform Major GC cycles.

To that end, we've reopened an old PR which changes the default / recommended GC settings for the Node process to a parallel, load-balanced GC (cardano-node PR#6222). The motivation is to update the current recommended settings (which are still tuned to GHC8.10) such that the ocurrence of Major GC cycles is greatly reduced (as they may temporarily halt the Node process to complete). We found in our benchmark that, apart from being even slightly more efficient regarding CPU time, the occurrence of Major GCs could be reduced by almost factor 30.

Development

We're performing an overhaul of the plutus-scripts-bench package, a library of benchmarkable Plutus scripts targeting various aspects of the Plutus interpreter, the respective cost model and the execution budgets. The aim is to create up-to-date performance baselines by using exclusively PlutusV3 scripts that have been built with a recent version of the compiler - thus factoring in potential performance improvements in generated code. Currently, the PR cardano-node PR#6440 is work in progress.

Infrastructure

Up to now, a benchmarking deployment required the target commit to be a public item on GitHub; the nix build (or cache retrieval from our CI) would be decentralized, with each cluster instance creating the benchmarking artifact independently. When there's a requirement to benchmark security-critical changes in an isolated, opaque fashion, this approach would reach its limits promptly. Together with SRE, we devised a way to achieve just that: An artifact can be built from a local commit on one cluster instance into its nix store, which in turn will serve as a substituter (i.e. cache) in a centralized manner for all other instances (cardano-node PR#6450).

Tracing

The new tracing system highly encourages trace values to be lazy. Thus, the emitting thread has the lowest possible overhead when doing so - which is highly relevant when you're on a hot code path. Furthermore, this overhead is assumed to be a constant factor - regardless of whether those traces are consumed by any subscriber or not. We're currently exploring an approach to increase robustness, guarding against shaky implementations of trace values themselves. The burden of evaluating a lazy trace still remains with a subscriber, however, this is now decoupled from handing over the trace result (such as a log line, a metric, etc.). By forcing a lazy trace value in a controlled section of code, immediately prior to handover, the system will reliably handle even blatant implementation errors in lazy traces.

Leios

The Linear Temporal Logic (LTL) Trace Verifier Cardano Trace LTL has reached production readiness. It is able to ingest multiple streams of trace evidence, basically multiple Node log files as they're being produced, and continuously evaluate a set of LTL propositions against them. While performant, real-time evaluation is a valuable thing to have, it required some of the LTL operators to be bounded to be able to operate in constant space over a long time. We've discussed our fragment of LTL with Formal Methods to start building a collection of properties worth checking, and to ensure there's provably no disjoint semantics introduced by the bounded operators.

The service is currently being integrated with the existing tooling in the cardano-node project, and will form a regular part of Leios setups / deployments in the future.

Node Diversity

We've reached basic viability of the comprehensive formal schema definition of all the Node's existing trace messages. We're building an automated verification suite that will ensure all definitions are fully compliant with existing JSON schema, as well as the observables implemented in (and the trace messages logged by) the Haskell Node conform to the defined schema. Further manual refinement of types in the schema will be the next step; eventually, this will serve as a basis to automatically derive parsers, and to render a human-readable reference documentation.

The implementation of our trace / metrics forwarding mini-protocol in Rust has completed and is now in testing phase. After cleanup and merge, this allows Rust projects to emit Cardano-style structured traces directly, and forward them to a running cardano-tracer for logging, processing and metrics exposition.

· 3 min read
Alexey Kuleshevich

High level summary

Besides some general improvements and necessary reorganization of testing code here is the list of high level initiatives that we've worked on the last period:

  • Preparation of cardano-node releases:

    We've been working hard on making sure upcoming releases are done in a timely manner. We've identified a couple of issues that needed to be resolved before we could declare cardano-node-10.6.2 a successful mainnet ready release and also discovered a few problems that needed to be taken care of in preparation for the upcoming cardano-node-10.7.0 release and the upcoming intra-era hard fork into protocol version 11. All, but one issue has been resolved. Once the last issue is taken care of, Ledger team will unblock the upcoming cardano-node-10.7.0 release.

  • CIP-118 - Nested Transactions:

    We've made progress on declaring some of the Ledger rules for sub-transactions and restructured the way we deal with UTxO update in the Ledger rules to accommodate support of sub-transactions.

  • CIP-159 - Account Address Enhancement - phase 1:

    Required renaming was done in order to reflect promotion of reward accounts to proper accounts. Also a new "balance intervals" field has been added to the transaction body.

  • CIP-165 - Canonical Ledger State:

    Some nice progress can be reported on implementation of Canonical Ledger State with 3 namespaces getting implemented. There are still many more namespaces to go, but this initial work defines the overall structure that will be adopted for the rest of the Ledger State namespaces.

Low level summary

Features

Testing

  • PR-5547 - Update state of Conway formal spec in the README
  • PR-5558 - Accomodate for costmlds change to a Map in the Ledger spec
  • PR-5505 - Added custom generator to address, enabled some Huddle tests
  • PR-5553 - Move Arbitrary instances to cardano-base
  • PR-5571 - Add Imp test to check failure of phase-1 when bootstrap addr + scripts

Infrastructure and releasing

  • PR-5550 - Fix sha256 of cardano-cls SRP stanza in cabal file
  • PR-5561 - Fix nix shell