Ledger
The ledger in Midnight is a public record of contract states and token states, consisting of Zswap’s cryptographic commitments and a mapping of contract addresses to their respective states.
22 January 2025
Midnight 3.0.6 Ledger release notes
Learn about the latest updates and improvements to the Midnight Ledger, including new features, bug fixes, and breaking changes designed to enhance functionality and stability.
New Features
- Introduced
coinCommitmentandcoinNullifierfunctions. - Introduced API separating keys from Zswap local state to Zswap packages.
- Catch breaking change in
midnight-storage-0.3, where the serialization shape ofMapchanged. This required minor version bumps on all types with nestedMapstructures.
Breaking Changes
- Some data structures are no longer directly constructable due to added private fields:
Transactionis no longer a public structured enum. Its components have been extracted intoStandardTransactionandClaimMintTransaction, which are now private.ContractCall,ContractDeploy, andMaintenanceUpdateare now private.- Use the
transaction-constructionfeature and its methods to construct transactions.
- Changes in
midnight-storage-0.3affected serialization, requiring updates for types with nestedMapstructures.
Bug Fixes
- Fixed a security bug in Schnorr proofs using incorrect information in in-memory environments.
- Removed various instances of triggerable panics in the ledger.
- Removed vulnerability in balance checking (breaking change for a minority of transactions).
- Fixed Schnorr proofs not surviving serialization.
- Fixed a security-related issue with Schnorr proofs in in-memory environments.
- Fixed transaction re-serialization issues.
- Fixed WASM
checkProofDataendpoint. - Fixed WASM API
feesendpoint. - Fixed maintenance update Schnorr proofs not persisting after serialization.
- Fixed debug logging removal from the proof server.