Skip to main content

57 posts tagged with "ledger"

View All Tags

· 2 min read
Alexey Kuleshevich

High level summary

Aside from more testing and overall quality-of-life improvements on the ledger test suite side, we have implemented a couple of important features that will be enabled after the next intra-era hard fork:

  • Translation of RegTxCert and UnRegTxCert to PlutusV3 scripts context will now be done correctly, which means deposit and refund respectively, will actually be translated.
  • Treasury withdrawals that are empty or sum up to zero will no longer be allowed.

Some performance improvements and a bug fix to a ledger event were also implemented during this period.

Low level summary

Features

  • pull-4623 - Change GovInfoEvent's "unclaimed" field from Set to a Map
  • pull-4627 - Fix Conway implementation of RegTxCert and UnRegTxCert
  • pull-4643 - Improve certificate performance
  • pull-4630 - Disallow empty withdrawals
  • pull-4646 - Don't return ZeroTreasuryWithdrawals failure during bootstrap

Testing

  • pull-4497 - Show coloured tree-diff output in ImpTests
  • pull-4615 - Prevent HSpec from messing with ImpSpec colors
  • pull-4625 - Additional DELEG tests
  • pull-4599 - Move TxInfo golden tests to new package
  • pull-4629 - Add TxInfo golden test for Conway
  • pull-4575 - Ts salvage newtylespecs

Infrastructure and releasing

· One min read
Kevin Hammond

Unexpected Ledger State Replay in the Conway era

An issue was identified shortly before the Chang hard fork: it was found that ledger state snapshots would break ledger replay in the Conway era under mainnet conditions. The ledger and consensus teams worked rapidly to resolve the issue with a hotfix released within 24 hours of the hard fork. In order to avoid pauses in node availability, it was recommended that users should not restart their node process until they had upgraded their node to the hotfix - this included any node type: relays, block producers, DB-Sync nodes, etc.

The issue is documented here. The cause was a slight inconsistency between the ledger state snapshots that were written and those that could be read back; a side effect of the removal of pointer addresses in the Conway era. Nodes version 9.1.1 and later resolve this issue.

Further Details

Node version 9.1.1

GitHub Issue

· 2 min read
Kevin Hammond

Issue Caused by Large Reference Scripts on Cardano Mainnet

On 25th June 2025, a Cardano user inserted a series of transactions, each containing 194 large reference scripts onto the mainnet chain, funded from 3 wallets containing around 20K ada each. High deserialisation costs for these reference scripts impacted the node, resulting in network disruption to block producer nodes, an increase in network load, and some slowdown in transaction throughput.

The direct effect lasted about 12 hours until it was stopped by a community member, at a cost of 4603 ada to the user who had created the transactions. Overall, the network responded extemely well to the increased load, showing a high level of resilience, with some reduction in transaction throughput related to the overall high system load. The community response to the event was positive, praising the speed of response, the robustness of the Cardano network, the cohesion of the Cardano community, and its ability to diagnose and manage issues such as this.

Mitigations Deployed

The general issue had already been identified, and a mitigation (costing for reference scripts) had been prepared as part of the Chang hard fork, but not yet deployed to mainnet. Based on the event, stronger mitigations were prepared, including restricting large reference scripts, and changing the cost model. These mitigations were deployed via node versions 8.9.4, 8.12.1 or 8.12.2, and incorporated into node version 9.0.0 or later for the Chang hard fork.

Public Reports on the Incident

Coindesk Report

Nasdaq Report

· 3 min read
Alexey Kuleshevich

High level summary

One specific Conway feature that received a lot of debate has finally been implemented, namely disallowing stake credentials from withdrawing rewards, that are backed by a key hash and have not delegated to any DRep. This feature will go into effect after the bootstrap phase.

A whole lot more tests were added and few minor bug fixes have been implemented as well. In particular GovInfoEvent ledger event has been fixed, which is unlikely to affect anyone, but it is worth pointing out. Ledger state deserialization bug was fixed that was necessary for the cardano-node-9.1.1 release. Some tech dept was taken care of, like cleanup of unnecessary predicate failures and fixing some flaky tests from Byron and Alonzo eras.

Low level summary

Features

  • pull-4218 - Remove maxMajorPV from Globals
  • pull-4589 - Fix deserialization of bad Ptrs in IncrementalStake
  • pull-4555 - Disallow withdrawals to non-delegated keyhashes post-bootstrap
  • pull-4600 - Stop reporting invalid refund when stake credential is not registered
  • pull-4604 - Fix enacted Set in GovInfoEvent
  • pull-4616 - Change ConwayWdrlNotDelegatedToDRep to wrap KeyHashes
  • pull-4609 - Removed DRepAlreadyRegisteredForStakeKeyDELEG

Testing

  • pull-4565 - ENACT conformance
  • pull-4541 - Fix failing tests in cardano-ledger-alonzo-test
  • pull-4585 - Fixes a property test "Ran out of tries on suchThatT"
  • pull-4543 - Increased the probability of generating the same hash more than once
  • pull-4574 - Byron: Force startTime in genesis data to be strict
  • pull-4596 - fix both reproduceable failures
  • pull-4586 - Byron: Fix failing ts_prop_elaboratedCertsValid test by moving mainnet-genesis.json to the appropriate path
  • pull-4584 - Sort Proposals when translating to SpecRep
  • pull-4546 - Ts additions prime spec cert steps
  • pull-4607 - Refactor debug tracing of QuickCheck discards
  • pull-4597 - DELEG Imp spec

Infrastructure and releasing

  • pull-4578 - Stop generation of haddock for internal modules
  • pull-4611 - Fix haddock: remove --show-all to test
  • pull-4569 - Fix fourmolu version for pre-commit shell
  • pull-4587 - docs: update README.md
  • pull-4591 - cardano-node-9.1 backport: Implement a fix for inability to deserialize pointers in Conway
  • pull-4590 - cardano-node-9.2 backport: Implement a fix for inability to deserialize pointers in Conway
  • pull-4593 - Plutus 1.33
  • pull-4614 - Changelog for cardano-node-9.2
  • pull-4608 - Remove dependency bounds on QuickCheck

· 2 min read
Alexey Kuleshevich

High level summary

Ledger team continued working on conformance tests and other improvements to the ledger test suite. There was a lot of communication with community members and other core teams about the upcoming hard fork. Some of the Conway specific changes that could affect DApp developer where documented:

There was a minor bug discovered and fixed in how DRep expiration was initialized, which doesn't have any impact on the upcoming Chang hard fork, since DReps cannot affect ratification during the bootstrap phase.

Low level summary

Features

  • pull-4547 - Drep registration expiration fix
  • pull-4554 - Fix cddl hash data comment
  • pull-4550 - ADR for fee computation changes in Conway
  • pull-4570 - Fix wording in the spec where unclaimed rewards go into treasury

Testing

  • pull-4529 - Alternative Agda cert- steps in conformance tests
  • pull-4528 - Add tools for debugging CBOR dumps
  • pull-4548 - Enable QuerySpec in cardano-ledger-api for both Conway versions
  • pull-4561 - Configure Imp tests with realistic SPO voting thresholds
  • pull-4579 - Added overlooked no registered test for RegCert
  • pull-4576 - Remove minMajorPV and maxMajorPV from Constants

Infrastructure and releasing

  • pull-4534 - Use compression for archiving
  • pull-4551 - Add GHA check for formal spec SRP validity
  • pull-4558 - Stop including VCS directories in data passed to test jobs
  • pull-4562 - Fix incorrect version in Conway CHANGELOG
  • pull-4560 - cardano-node 9.2 release test suite fix
  • pull-4573 - Fixup changelogs and versions