Skip to main content

Ledger Team Update

· 3 min read
Jared Corduan

High level summary

The Plutus tools team at IOG has started helping the ledger team to build out a user friendly cardano-ledger-api package! A GitHub project will be filled out in the days ahead, people interested in the API can use it to follow along and join in on the conversations.

The ledger team has started using architectural decision records to leave a record of important decisions that the team makes. We will retroactively go back through past decisions and make ADRs for them.

The logic to track individual deposits is now nearly in place. We are prioritizing correctness with our first pull request, and will follow up with performance optimizations and general cleanup next.

Pointer addresses are being deprecated with the Cardano major protocol version 8. See CPS-0002 for more context.

Lower level summary

Cardano ledger API

The Plutus tools team has taken our minimal cardano-ledger-api package and started filling it out and adding much needed documentation. They have also added doctests! In the days to come, the Plutus tools team will map out a lot more work for the API and record it in this GitHub project.

See

Architectural Decision Records (ADRs)

We are now providing more context and leaving a record of important decisions that are made in the ledger. The first ADR explains the very lightweight process.

See

Tracking individual deposits

See ADR-3 for background. We now have the logic in place to track individual deposits, and a host of property tests to make sure that the logic is correct. The current implementation uses more memory than it needs to, and we will address that next, with our hope being to only use one word (8 bytes) per registered stake credential. There is a fair amount of other cleanup needed for general maintainability.

See

Removing pointer addresses

Pointer addresses, which have never seen any real use (there are something like eleven on mainnet), are being deprecated starting at Cardano major version 9. CPS-0002 gives the context. We are disabling them by first preventing transaction outputs containing them from being serialized by the node at the moment we switch to version 9. At the hard fork after that, we will translate the existing few pointer addresses to enterprise addresses.

See

Technical debt

  • pull-3162 - Sometimes we have to put safeguards in place for hard forks which may never be exercised. After we have passed the given hardfork, we are able to clean up the code and simplify our logic. We removed all of the ones that we are currently easily able to.
  • pull-3165 - We improved the type safety of our code while also discovering and fixing a serialization bug.
  • pull-3172 - We removed dead code.
  • pull-3175 - The Allegra and the Mary code used to be coupled in a particular way the we grew to dislike. We made these two ledger eras now uniform with the rest of our code base.
  • pull-3184 - We organized our property testing code.
  • pull-3200 - The Plutus tools teams fixed an outstanding bug in the translation from the ledger state to the Plutus script context.