Skip to main content

Ledger Team Update

· 4 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary

Leios support in the ledger took another step forward this cycle: pool parameters now carry an actual BlsKey, replacing the placeholder types introduced previously. On the testing side, block-header serialization - Praos and Leios alike - is now covered by a dedicated round-trip test suite, giving early guard-rails on the wire format as the Leios header evolves.

Work on nested transactions in Dijkstra advanced as well: the withdrawal mechanism for sub-transactions was implemented. Predicate failures around this area were reworked to be more useful and consistent, moved into the layer the specification prescribes and given clearer names. We settled how UTxO state updates should behave under nested transactions and the AdaPots obligations invariant guard-rail was adapted accordingly. A field for the initial account balance was also added to the top-level transaction body.

On the Plutus side, a per-block script cache was introduced so that scripts decoded once for a transaction can be reused by later transactions within the same block. A related optimization now memoizes the computation of the script hashes a transaction needs.

Two CIPs advanced this cycle. CIP-50 (pledge-leverage-based staking rewards) was implemented, and groundwork for CIP-23 began with the addition of the minPoolMargin protocol parameter to the Dijkstra era.

Test coverage was expanded: the Conway conformance suite was enabled in Dijkstra, and new tests were added around stake calculations and sub-transactions - as far as the current test framework allows.

Low level summary

Features

  • PR-5945 - Fix JSON roundtrip for InjectionData
  • PR-5946 - Make AlonzoTx mempool decoder backwards compatible
  • PR-5942 - Optimize plutus script preparation
  • PR-5953 - Reuse script cache for script validation
  • PR-5952 - Add startingAccountBalanceInterval to TopTx body
  • PR-5930 - Fix deposits in AdaPots calculations
  • PR-5941 - Fix updating of UTxOState
  • PR-5947 - Add canonical ledger state CDDL spec and validation tests
  • PR-5938 - Rename isValid to isPhase2Valid
  • PR-5967 - Move network checks of deposits and withdrawals to (SUB)ENTITIES
  • PR-5961 - Remove unnecessary setup of the DRepPulser
  • PR-5960 - Memoize getScriptsHashesNeeded in StanTx
  • PR-5969 - Withdrawals rework in SubEntities
  • PR-5943 - CIP-50 Pledge Leverage-Based Staking Rewards
  • PR-5891 - Add BlsKey in StakePoolParams
  • PR-5854 - Add ToJSON/FromJSON instances for EraTxWits
  • PR-5949 - CIP-23 - Add minPoolMargin protocol parameter to Dijkstra era
  • PR-5950 - Drop EncCBORGroup BlockBody in Dijkstra
  • PR-5909 - Stable type for querySetSnapshotStakePoolDistr

Testing

  • PR-5939 - Enable Conway conformance tests in Dijkstra
  • PR-5959 - Test collateral inputs are in utxo
  • PR-5971 - Add Imp test to test that DReps unregistered and reregistered in the same tx lose vote delegated stake
  • PR-5948 - Add serialization tests for block headers
  • PR-5975 - Add stake calculation tests for conway

Infrastructure and releasing

  • PR-5874 - Update cardano-binary to 1.9.1.0
  • PR-5968 - Restore <2.6 bound for cardano-crypto-class
  • PR-5970 - Bump cardano-data version for release
  • PR-5976 - Correct a bad changlog entry