Skip to main content

Mithril Team Update

· 3 min read
Jean-Philippe Raynaud
Mithril Tech Lead

High level overview

This week, the Mithril team completed the full review of the recursive SNARK circuit prototype, the impact assessment of SNARK on Mithril protocol security, and support for multiple proof systems in the STM library. They also completed SNARK proof generation and verification in end-to-end tests. They began work on the recursive SNARK circuit, including creating a new module in the STM library, and worked on a testing plan for the IVC circuit and production readiness for circuit keys and trusted setup. They also supported test mode for the recursive circuit and continued refactoring the STM library's byte codec.

Additionally, they completed the client CLI implementation for Cardano blocks and transactions and made progress on partial block range support, security parameter offset signing, and the explorer update for Cardano blocks and transactions.

Finally, the team completed the reqwest upgrade to 0.13 and continued work on the Cardano node upgrade to 10.7 and the DMQ node update to 0.4.1.0.

Low level overview

Features

  • Completed the issue Full review of recursive SNARK circuit prototype #2982
  • Completed the issue Impact of SNARK on Mithril protocol security #2803
  • Completed the issue Support Multiple proof systems in STM #2550
  • Completed the issue Implement SNARK proof generation and verification in end to end tests #3107
  • Completed the issue Implement Cardano Blocks and Transactions in client CLI #3032
  • Worked on the issue Refactor bytes codec in STM library for forward/backward compatibility #3065
  • Worked on the issue Support test mode for the recursive circuit #2984
  • Worked on the issue Create recursive SNARK circuit new module in STM #3123
  • Worked on the issue Prepare Testing plan for IVC circuit #3124
  • Worked on the issue Prepare production readiness for circuit keys and trusted setup in STM #3165
  • Worked on the issue Support partial block range in Cardano blocks and transactions #3099
  • Worked on the issue Sign security parameter offset in ProtocolMessage for Blocks and Transactions #3098
  • Worked on the issue Update explorer for Cardano Blocks and Transactions #3079

Protocol maintenance

  • Completed the issue Upgrade reqwest to 0.13 #3033
  • Worked on the issue Upgrade to Cardano 10.7 #2894
  • Worked on the issue Update DMQ node to 0.4.1.0 #3114

Plutus Core Team Update

· 2 min read
Ziyang Liu
Software Engineering Lead

High level summary

The Plutus team has recently made a number of significant improvements to Plinth, including:

  • Compiler improvements:
    • Added a type checker plugin that preserves source locations, resulting in significantly clearer error messages (#7640).
    • Added a second type checker plugin to detect unsupported Haskell features, further improving error reporting (#7659).
    • Added a driver plugin that automatically sets the required compiler flags and enables the Strict extension (#7687).
  • Language improvements:
    • AsData now generates a destructor function for the data type (#7664). For matching on sum types, the destructor function is more efficient than the pattern synonyms.

The Plinth user guide will be updated soon. In the meantime, please refer to the linked PR descriptions for further details.

Additionally, a new UPLC optimization has been implemented: applications with three or more arguments are now transformed into case-constr form.

Low level summary

Key Pull Requests Merged

Consensus Team Update

· 2 min read
Damian Nadales
Consensus Team Lead

High level summary

  • Ouroboros Leios (Treasury Funding Initiative 4: Ouroboros Leios Implementation):
    • Implemented Leios Endorser Block (EB) inclusion in the consensus layer, adding EB announcement and certification tracking to blocks, along with a SQLite-based backend for querying EBs and certificates (#1921).
  • UTXO-HD (Treasury Funding Initiative 10: LSM including UTXO-HD):
    • Refactored database initialization by modifying mkOpenState in the ImmutableDB and VolatileDB (#1917).
    • Improved performance by caching transaction differences on first execution, addressing a hotspot observed during transaction revalidation on stressed nodes (#1954).
  • Releases and integration (Treasury Funding Initiative 17: Maintenance and Support):
    • Released ouroboros-consensus-2.0.0.0 (#1947) and ouroboros-consensus-3.0.0.0 (#1964).
    • Integrated ouroboros-network-1.1.* (#1943).
    • Integrated the latest consensus packages into cardano-node for the upcoming Node 10.7 release (cardano-node#6402).
  • Testing and documentation (Treasury Funding Initiative 17: Maintenance and Support):
    • Fixed a flaky ChainDB StateMachine test related to iterators (#1948).
    • Replaced the consensus documentation's Introduction page with a comprehensive System Overview, including a C4 Context diagram and clarifications on code organization and era evolution (#1950).

Mithril Team Update

· 3 min read
Jean-Philippe Raynaud
Mithril Tech Lead

High level overview

This week, the Mithril team completed the wiring of the SNARK proof into the aggregate signature and successfully activated the SNARK prover in a developer Mithril network. They also continued work on the full review of the recursive SNARK circuit prototype, the impact assessment of SNARK on Mithril protocol security, and the SNARK proof generation and verification in end to end tests.

Additionally, the team completed the implementation of examples for Cardano blocks and transactions, and continued progressing on the client CLI implementation, partial block range support, and the signing of the security parameter offset. They also updated the release process to anticipate unreleased Cardano node versions.

Finally, the team completed the removal of the legacy v1 Cardano database backend, the DMQ node update to 0.3.0.0, and they continued work on the upgrade to Cardano 10.7.

Low level overview

Features

  • Completed the issue SNARK aggregation primitives: Wire SNARK proof in aggregate signature #3042
  • Completed the issue Activate SNARK prover in dev network #3104
  • Completed the issue Implement examples for Cardano Blocks and Transactions #3100
  • Completed the issue Update release process to anticipate on unreleased Cardano node #3070
  • Worked on the issue Full review of recursive SNARK circuit prototype #2982
  • Worked on the issue Impact of SNARK on Mithril protocol security #2803
  • Worked on the issue Implement Cardano Blocks and Transactions in client CLI #3032
  • Worked on the issue Support partial block range in Cardano blocks and transactions #3099
  • Worked on the issue Sign security parameter offset in ProtocolMessage for Blocks and Transactions #3098
  • Worked on the issue Implement SNARK proof generation and verification in end to end tests #3107

Protocol maintenance

  • Completed the issue Remove v1 backend for Cardano database in client library and CLI #3080
  • Completed the issue Update DMQ node to 0.3.0.0 #3054
  • Completed the issue SNARK registration is slow #3097
  • Completed the issue Cardano database download fails on preprod: immutable file download broken #3004
  • Completed the issue testing-preview certification stopped #3106
  • Worked on the issue Upgrade to Cardano 10.7 #2894
  • Worked on the issue Enhance protocol security page on website #2703

Performance & Tracing Update

· 5 min read
Michael Karg
Performance and Tracing Team Lead

High level summary

  • Benchmarking: Compiler benchmarks on 10.6.2; Trace evaluation feature benchmarks.
  • Development: Started new project tx-centrifuge: A tx submission service generating extremely high, continuous workload.
  • Infrastructure: Small maintenance items, such as fixing profiled nix builds for local benchmarking.
  • Tracing: New tracing system now its own project: Hermod Tracing; New library cardano-timeseries-io, which accumulates metrics into queryable timeseries, released.
  • Leios: cardano-recon-framework (formerly LTL Trace Verifier) integrated and in use.
  • Node Diversity: Formal trace schema definition nearing merge; Trace forwarding in native Rust on hiatus.

Low level overview

Benchmarking

We've repeated the GHC9.12 compiler benchmarks on Node 10.6.2, which we now know to be completely free of regressions or any space leak. This confirmed our earlier findings that the code generated by GHC9.12 is on par performance-wise as far as block production, diffusion and adoption metrics go, but it exhibits unexplained increases in CPU time used, Allocations & Minor GCs. Several potential suspects for causing this have been identified with a profiled build. However, many of those will be replaced or changed in the 10.7 release, so that this benchmark will have to be re-run on Node 10.7.

The feature for new tracing, which forces a lazy trace value in a controlled section of code, is slated for inclusion in Node 10.7. To that end, we backported it to Node 10.6.2 and performed feature benchmarks for it - to ensure it won't distort the upcoming 10.7 performance baseline. Indeed we found the performance impact of that feature to be negligible in all categories of observed metrics.

Development

We've started a new project - tx-centrifuge - for transaction submission (i.e. workload generation) during benchmarks and other scenarios. It is meant to be complementary to the existing tx-generator. The latter is tailored very much to our Praos benchmarking use case and the implementation is based on a rather monolithic design. tx-centrifuge's approach however is a different one. It's built for seamless scaling, both horizontally and vertically. This means it will be able to saturate a network running Leios over extended periods of time, due to its massive tx output. Furthermore, it's able to cut down the setup phase (where UTxOs are created for benchmarking) and immediately launch into the benchmark phase. This also enables it to function as a potentially long-running, configurable submission service for scenarios other than benchmarking. The implementation is currently in prototype stage.

Infrastructure

As far as infrastructure is concerned, we've addressed various small-sized maintenance tasks. This includes fixing profiled nix builds for local benchmarks, migrating benchmarking profiles and configs to the upcoming Node 10.7 release and increasing robustness of the locli analysis tool in dealing with incomplete / partial trace output.

Tracing

Our new tracing system has been set up as its own project - and named the Hermod Tracing System. As of now, we've only migrated the core package trace-dispatcher. This marks the first step of eventually moving all tracing and metrics related packages out of the cardano-node project, and bundling them with consistent branding, API and documentation. Eventually, the system will be generalized so that it can be used by any Haskell application - not just cardano-node. Seeing that the dmq-node already adopted it, we have reason to assume it might be considered by the broader community as go-to choice to add principled observability to an application.

We've built and released a new Haskell library cardano-timeseries-io (cardano-node PR#6495). The library builds and stores timeseries of metrics from multiple source applications, much like Prometheus. It can process queries over those timeseries in a query language quite similar to PromQL. Integration into cardano-tracer, the trace / metrics processing service, is ongoing work. It will allow for custom monitoring solutions and alerts directly from cardano-tracer, without the need to scrape metrics and maintain them externally. It is not meant to replace existing Prometheus endpoints, rather provide richer functionality out of the box if desired: cardano-node PR#6473.

Leios

We've released cardano-recon-framework, formerly known as the Linear Temporal Logic (LTL) Trace Verifier (cardano-node PR#6454). It's already seen adoption, and is used productively to verify system properties and conformance exclusively based on live trace output. We've been asked by Formal Methods Engineering to extend the LTL fragment the framework uses, such that a wider range of properties can be expressed; work on that is already ongoing.

Node Diversity

The comprehensive formal schema definition of all the Node's existing trace messages is nearing integration / merging. The initial version will be able to extract all definitions from the actual implementation into a fully validated JSON schema. Future work will address completing the automated verification suite, adding a mechanism to amend the extracted schema manually (e.g. with comments or refinement types) and a pipeline to facilitate usage, such as automatic derivation of a parser, or rendering of a human-readable specification PDF.

Due to resourcing issues, the trace / metrics forwarding mini-protocol implementation in native Rust, unfortunately, had to be put on hiatus for the forseeable future.