Ledger Team Update
High level summary
We continued with Leios work this cycle, with most of the work going into the endorser block and the block header. The endorser block rule gained its real validations, moving it past the placeholder check it started out with. The Leios header hash was corrected so that it covers only the header body and the KES signature. Forecasting was extended with the maximum transaction size, which Leios is the first protocol to have a reason to forecast, and the block header coders were brought back.
CIP-172, self-usable transaction outputs, was implemented, reaching across the Babbage, Conway and Dijkstra eras.
Two protocol-level safety fixes landed. Governance updates that would set the maximum pledge leverage below one are now rejected, since such a value can produce negative pool rewards and abort reward application entirely. Separately, a change to the VRF duplicate counter that had accidentally altered Conway behavior while fixing Dijkstra was reverted, the two code paths having turned out not to be equivalent.
Sub-transaction support was rounded out on the API side. The helper reporting the outputs a transaction produces now includes sub-transaction outputs, where a batch creating three UTxOs previously reported only the top-level one. The timelock upgrade function was also fixed and renamed.
Testing was dominated by Plutus V4 and by conformance. The V4 transaction info translation, which had been merged without unit tests, received a thorough set covering each translated field. The Plutus script decoder is now checked to agree with the Plutus deserializer across every language, PLC version, protocol version and builtin. A transaction-level guard script exercises batch validation, including the phase-2-invalid cases. The formal ledger specification was updated three times over the cycle, each time enabling further tests, and the maximum pool stake calculation is now property-tested against the specification.
Tooling gained a custom git diff driver for CBOR files, wired up automatically through the development shell, so binary CBOR now shows up as readable text in diffs.
Low level summary
Features
- PR-6268 - EB rule validations
- PR-6287 - Hash only header body and signature
- PR-6285 - DijkstraForecast: include maxTxSize
- PR-6282 - Bring back coders for the block header
- PR-6252 - CIP-172: Self-Usable Transaction Outputs
- PR-6277 - Reject maximum pledge leverage updates below one
- PR-6300 - Revert previous behavior of VRF duplicates counter initialization
- PR-6280 - Include Dijkstra subtransaction outputs in producedTxOuts
- PR-6296 - Fix upgradeTimelock and rename it
Testing
- PR-6254 - Add unit tests for the PlutusV4
TxInfotranslation in Dijkstra - PR-6286 - Test that
decodePlutusRunnableuses the correct Plutus ledger language - PR-6294 - Add
inputSpendingGuardPlutusV4 tx-level validation guard test - PR-6291 - Test
maxPoolin conformance - PR-6279 - Make modifyPParams affect future pparams
- PR-6281 - Update formal-ledger-specification and enable tests
- PR-6293 - Update formal-ledger-specifications and enable tests
- PR-6306 - Update formal ledger specification and enable tests
- PR-6299 - Convert Alonzo golden CBOR file from hex to binary
Infrastructure and releasing
- PR-6288 - Auto-setup a custom git diff driver for CBOR files
