Skip to main content

· One min read
Sebastian Nagel

High level summary

This week, the hydra team reviewed and addressed several open comments on the new HeadV1 specification, completing a list the of identified gaps between specification and implementation while doing so. In the wake of the recent demonstration of SundaeSwap running their DEX in a Hydra Head, they met with them to capture feature ideas & incorporate their feedback on the roadmap, as well as potential research avenues.

What did the team achieve this week

What are the goals of next week

  • Complete the last two items required for a version 0.8.0.
  • Cut the next release, version 0.8.0
  • Get backup/recovery #187 done with proper event sourcing (ADR18)
  • Have the CI build macos artifacts

· 2 min read
Jordan Millar

2022-10-19 - 2022-11-01

High level summary

This sprint saw the addition of the long awaited tx-mempool command that allows user to query the local node's mempool for the following information:

  • Ask the node about the current mempool's capacity and sizes
  • Request the next transaction from the mempool's current list
  • Query if a particular transaction exists in the mempool

Outside of this feature the team has been focused on responding to user requests (e.g exposing functions, types and implementing instances they need) and refactoring cardano-cli/cardano-api. The metric tx_submit_fail_count has been added to the submit api so users can track how many transactions have failed. Other improvements have been made:

  • Documentation improvments
  • Release 1.35.4 was merged & released
  • Exported various types from cardano-api that were requested by community members

Completed

cardano-cli

cardano-api

cardano-submit-api

cardano-node

cardano-testnet

  • None

In Progress

cardano-cli

cardano-api

cardano-node

· 4 min read
Damian Nadales

High-level summary

During the past two weeks, the consensus team worked on adding property test for different aspects of the UTxO HD prototype: era transitions, mempool, and backing store. Thanks to these tests we were able to uncover a bug in the prototype. On the Genesis front, we benchmarked a different version of the ChainSync jumping prototype to try to improve its performance, but this did not result in any noticeable speedup.

High-level status report

  • Finish the UTxO HD prototype: on track.
    • We focused on increasing test coverage for the UTxO-HD prototype:
      • We started implementing Cadano-eras transition property-tests.
      • We started implementing state-machine property-tests for the mempool.
      • We merged the mempool rewrite.
      • We started working on state-machine tests for the backing store. This uncovered a bug in the range-read implementation of the LMDB backing store.
  • Genesis: on track.
    • We benchmarked a version of the Genesis ChainSync Jumping prototype that spreads out the ChainSync updates over a longer period of time. This did not result in any noticeable speedup.
    • We investigated the overhead introduced by non-ChainSync components, but no conclusions could be drawn from the benchmarks we ran.

Workstreams

Finish the UTxO HD prototype

We focused on increasing test coverage for the UTxO HD prototype. We also merged the mempool rewrite.

Era transition property tests

We started implementing Cardano era transition property tests, which are needed for making sure that the ledger tables get updated in the right way when we move from one era to the next. There are at the moment two important transitions.

  • Byron to Shelley: where all the UTxO is transferred from in-memory Byron state (which has no tables) to the ledger tables of the Shelley state.
  • Shelley to Allegra: where the AVVM addresses must be deleted.

We have tests for the Byron to Shelley transitions. We are working on adding the remaining ones.

Mempool state-machine tests

We started implementing state-machine property tests for the mempool. The mempool is currently tested via pure property tests, and use a ledger state without tables. With the introduction of UTxO HD, testing the concurrent behavior of the mempool became of crucial importance (eg now we have to acquire locks to flush the backing store). In addition, we need to test a ledger state with tables. These needs led to the creation of a new set of property tests. In particular we aim to run parallel state-machine tests that exercise the mempool in a way similar to how the node would make use of it.

Backing store property tests

We started working on state-machine tests for the backing store that UTxO HD uses. The property tests uncovered errors in the range-reads implementation of the LMDB backing store. To facilitate fixing this bug, we made changes to the Haskell LMDB bindings.

Benchmarking the CSJ prototype

Prompted by previous benchmarks showing significant improvements in sync time by using more capabilities, we implemented a way to spread out the ChainSync updates over a larger period instead of firing them all at the same time. This didn't result in a noticeable speedup.

We also benchmarked the prototype with CSJ disabled (such that just the dynamo peer is running ChainSync, but e.g. BlockFetch still sees all peers) to rule out/confirm overhead by non-ChainSync (mainly BlockFetch) related components. This results in era-specific behavior (speed is like the prototype in Byron, but like the baseline in Shelley). This deserves a closer look in the future.

This diagram shows the respective syncing progress, starting at Genesis and continuing a good part into Shelley (with the dashed line indicating the Byron-to-Shelley transition).

  • Red: baseline
  • Green: CSJ prototype, 10 peers, jumps every 3000/f slots, jumps in clumps.
  • Blue: like Green, jumps are spread out.
  • Orange: variant with no jumping, to measure unrelated overhead.

· 2 min read
Sebastian Nagel

High level summary

This week, the hydra team worked on implementing ADR18 to get backup & restore functionality of the hydra-node over the line. Although not fully there yet, an early version of that feature was already needed and succesfully tested by SundaeSwap in their recent demonstration of their DEX running on Hydra. The team also worked on the updated specificaton, met with the researchers and discussed a solution for how to secure rollbacks "past the opening of a Head". We also reponded to recent requests for static executables and prioritized that feature higher, implemented it and merged it.

What did the team achieve this week

  • Last week we thought we were done with ADR18, but were not ...
  • ... instead, SundaeSwap has been preparing their Rare bloom Hydra demo & needed assistence.
  • Implemented a first version for persistence #187 in response.
  • Enhanced CI to publish test results on our website
  • Engineering meeting -> discussed rollbacks and discovered a solution for the rollback past open problem!
  • Pulled static executable feature #200 into scope, implemented it and merged it!
  • Received and read through a project proposal by a vendor (building a Hydra platform).

What are the goals of next week

  • Get backup/recovery #187 done with proper event sourcing (ADR18)
  • Cut the next release, version 0.8.0
  • Address open comments on specification document & complete the list of identified gaps between specification and implementation #452
  • Have the CI build macos artifacts

· 3 min read
Jared Corduan

High level summary

The ledger team is still primarily focused on addressing technical debt. We now have the infrastructure for versioning our serialization schemes, which we continue to put into action. We have made first steps towards getting proper support for the formal ledger repository (in particular, we've added nix builds and continuous integration support). We are wrapping up an investigation of the performance of a critical function used by the consensus layer for leader checks. Finally, we are improving the packaging and versioning of our code.

Lower level summary

Completed Technical Debt

  • Because the Shelley ledger era was a complete re-write of the Byron ledger era, a lot of our code lives in the cardano-ledger-shelley package, though with hindsight we can say that much of it should live in cardano-ledger-core. We continue to move things to cardano-ledger-core, and have much more to come. [pull-3059]
  • We now have the infrastructure to support versioned serialization schemes. The inability to do this has caused us a lot difficulties, such as [issue-3003], [issue-2965] and [issue-2444]. We are still in the process of switching to the versioned serialization scheme (such as [pull-3078]), but the infrastructure was completed in [pull-3063].
  • We now have proper nix and CI support for the formal ledger project. [pull-19]
  • A separate team is helping bring support for CHaP to all the cardano-node repositories. We have been helping out with this effort.
  • A separate team continues working on upgrading all the cardano-node repositories to work with ghc 9.2.4. We have been helping out with this effort.

In-progress Technical Debt

We also have several fairly large pull-requests in review that we are working on.

  • In an on-going attempt to build out a more user-friendly API, we continue to remove HasField instances in place of using micro-lenses. The protocol parameters, in particular, are being worked on. [pull-3045]
  • We are also renaming record fields to be consistent across the repository. [pull-3062]
  • We are now cleaning up all the work we did to understand the performance of the TICKF transition. We have some improvements to the computatation as well. [pull-3068]
  • We are adding more documentation, in particular to our Twiddler functionality. [pull-3073]
  • The formal ledger is adding support for finite set theory. [pull-20]