Skip to main content

81 posts tagged with "ledger"

View All Tags

· 3 min read
Alexey Kuleshevich

High level summary

Besides some general improvements and necessary reorganization of testing code here is the list of high level initiatives that we've worked on the last period:

  • Preparation of cardano-node releases:

    We've been working hard on making sure upcoming releases are done in a timely manner. We've identified a couple of issues that needed to be resolved before we could declare cardano-node-10.6.2 a successful mainnet ready release and also discovered a few problems that needed to be taken care of in preparation for the upcoming cardano-node-10.7.0 release and the upcoming intra-era hard fork into protocol version 11. All, but one issue has been resolved. Once the last issue is taken care of, Ledger team will unblock the upcoming cardano-node-10.7.0 release.

  • CIP-118 - Nested Transactions:

    We've made progress on declaring some of the Ledger rules for sub-transactions and restructured the way we deal with UTxO update in the Ledger rules to accommodate support of sub-transactions.

  • CIP-159 - Account Address Enhancement - phase 1:

    Required renaming was done in order to reflect promotion of reward accounts to proper accounts. Also a new "balance intervals" field has been added to the transaction body.

  • CIP-165 - Canonical Ledger State:

    Some nice progress can be reported on implementation of Canonical Ledger State with 3 namespaces getting implemented. There are still many more namespaces to go, but this initial work defines the overall structure that will be adopted for the rest of the Ledger State namespaces.

Low level summary

Features

Testing

  • PR-5547 - Update state of Conway formal spec in the README
  • PR-5558 - Accomodate for costmlds change to a Map in the Ledger spec
  • PR-5505 - Added custom generator to address, enabled some Huddle tests
  • PR-5553 - Move Arbitrary instances to cardano-base
  • PR-5571 - Add Imp test to check failure of phase-1 when bootstrap addr + scripts

Infrastructure and releasing

  • PR-5550 - Fix sha256 of cardano-cls SRP stanza in cabal file
  • PR-5561 - Fix nix shell

· 5 min read
Alexey Kuleshevich

High level summary

Currently there are a few important high level tasks that Ledger team is focused on:

  • Continue working on defining Ledger validation rules for CIP-118 - Nested Transactions:

    One of the major milestones in the last month was actually getting the CIP merged, which means we were able to solidify the design as well as identify a few new and very important use cases that Nested Transactions will bring to the table.

    On the implementation side we've had some very nice progress with full definition of binary format and Haskell representation of a Dijkstra era transaction and its sub-transactions. We've also defined the full Ledger rules structure for Nested Transaction, albeit mostly with placeholder logic for now. Implementation for the logic in those rules is one of the main focus points for the upcoming weeks.

  • Started working on the first phase of CIP-159 - Account Address Enhancement

    This is a very much anticipated CIP, because it will finally allow micropayments in ADA, once released with the Dijkstra era. We have so far defined one of the new fields in the transaction and performed some of the necessary code changes in preparation for this work.

  • Improvements on how CDDL specification is defined and how conformance testing against it is performed.

    We had incredible progress on improving how CDDL is defined. We've performed major refactoring of cuddle, which is the tool that we use for defining CDDL specification. We have designed a very nice interface for writing those definitions that drastically reduces duplication from era to era, thus improving safety of new definitions. Removal of a few bugs in the CDDL specification was a good testament to this effort. Moreover, we added the ability to supply custom value generators, which will allow us to test aspects of CDDL specification that were previously impossible to test due to the limited nature of CDDL expressiveness.

    Furthermore, we just released a new tool antigen, which we are in process of integrating into cuddle, which once complete will let us write negative property tests for Ledger decoders. It might not sound like much, but it will in fact protect us from a whole class of deserialization bugs, such as one that happened on mainnet two months ago.

Besides those major points above, since the last update, Ledger team:

Low level summary

Features

  • PR-5458 - Added Dijkstra UTXO rule and collateral Ptr check
  • PR-5439 - Add Peras certificate to the block body
  • PR-5456 - CDDL with typeclasses: conway
  • PR-5467 - Add optional previous epoch Nonce to BHeaderView
  • PR-5471 - CDDL with typeclasses: Dijkstra
  • PR-5478 - CDDL: Switch to using HuddleSpec everywhere
  • PR-5475 - Change all List to NonEmpty in predicate failures
  • PR-5476 - Add Peras Certificate validation
  • PR-5472 - Update to cuddle 1.1
  • PR-5484 - Fix MultiAsset cddl definition in dijkstra
  • PR-5483 - CDDL: Add HuddleRule1 typeclass for set functions
  • PR-5480 - Skip isValid flag in transaction (de)/serialization
  • PR-5479 - Change all error Sets to NonEmptySets in predicate failures
  • PR-5490 - Dijkstra subtx produced and consumed
  • PR-5464 - Switch minFeeA to CoinPerByte and rename minFee parameters
  • PR-5461 - Swap Mempool/Ledger predicate failures in Dijkstra
  • PR-5485 - CDDL typeclasses with implicit naming
  • PR-5496 - Rename policy_hash to guardrails_script_hash
  • PR-5491 - Nested transactions rules
  • PR-5493 - Change all error Maps to NonEmptyMaps in predicate failures
  • PR-5507 - Rename atadPlutus and atadrPlutus
  • PR-5499 - Switch PoolMetadata.pmHash to ByteArray
  • PR-5518 - CDDL: Remove header_body discrepancy
  • PR-5517 - MemoBytes avoid space leaks
  • PR-5506 - Prevent sub-tx-ids to be spent in the same tx.
  • PR-5519 - Change Version from Word64 to Word32.
  • PR-5523 - Add more constraints on ApplyTxError
  • PR-5524 - Add direct-deposits field to transaction body
  • PR-5522 - Implement events and failures in rules running nested transactions
  • PR-5526 - SUBPOOL rule implementation
  • PR-5512 - Move DelegateeNotRegisteredDELEG from DELEGS to DELEG in Shelley

Testing

  • PR-5459 - Add reverse delegations assertion
  • PR-5468 - Arbitrary instance for DijkstraBlockBody
  • PR-5424 - Add CBOR golden tests
  • PR-5404 - Implement block-submitting Imp functions
  • PR-5392 - Translate all tests from AlonzoBBODY to Imp test
  • PR-5466 - Add Imp tests to cover more cases of active/inactive committee
  • PR-5473 - Update formal-ledger-specification and enable tests
  • PR-5521 - Add Imp test to check that SPO votes are validated against tx witnesses

Infrastructure and releasing

  • PR-5469 - Bump urllib3 from 2.5.0 to 2.6.0 in /doc
  • PR-5495 - Upgrade from ghc 9.12.1 to 9.12.2 nix builds
  • PR-5509 - Bump urllib3 from 2.6.0 to 2.6.3 in /doc
  • PR-5504 - Remove ruby cddl

· 2 min read
Alexey Kuleshevich

High level summary

This period Ledger team completed full definion in Haskell and binary representation with CDDL specification of what it means to be a Nested Transaction. Besides this important milestone we've tackled some tech dept, added ability to inject a Cost Model for any Plutus version upon startup for the purpose of testing and benchmarking, optimized memory accounts representation and improved usability of some predicate failures. We made some very nice progress on enhancing CDDL specification with cuddle, which will allow us to reduce quite a bit of code duplication and improve CDDL conformance property testing.

Low level summary

Features

  • PR-5419 - Type-class-based CDDL generation
  • PR-5413 - Subtransactions CBOR deserializer
  • PR-5379 - Add ability to inject any cost models via AlonzoGenesis
  • PR-5416 - Switch to Credential Staking from RewardAccount in StakePoolState
  • PR-5449 - Improve memory representation of ConwayAccountState
  • PR-5442 - Deprecate StakeCredential and PaymentCredential synonyms
  • PR-5429 - Fail PlutusV4 TxInfo translation when Ptr is present in the TxOuts
  • PR-5455 - Make IncompleteWithdrawals more informative
  • PR-5457 - Required top level guards
  • PR-5441 - Redefine predicate failures in Dijkstra without using CBOR group encoding
  • PR-5450 - Remove set-algebra library and all its usage
  • PR-5443 - CDDL with typeclasses: mary, alonzo, babbage
  • PR-5460 - Ensure EraBlockBody instances are not orphans.
  • PR-5451 - Switch to CompactForm Coin in PParams
  • PR-5383 - Remove listLenBound from EncCBORGroup class

Testing

  • PR-5426 - Test "accepted" predicates in conformance
  • PR-5434 - Add Imp test reproducer for #5418
  • PR-5433 - Make ticking a bit more realistic in Imp tests
  • PR-5440 - Bump constrained-generators

Infrastructure and releasing

· 3 min read
Alexey Kuleshevich

High level summary

Ledger team has successfully defined what sub-transaction really means for Nested Transactions in Dijkstra era. We've also reduced quite a bit of duplication with respect to how CDDL is specified with further improvements that are still in progress. We have fixed some serialization issues for Dijkstra era that we couldn't fix for previous eras, which had to do with preventing duplicates being supplied over the wire. Besides these improvements we've also cleaned up some deprecated functionality, reduced memory overhead in ledger state, improved performance of the epoch boundary transition and fixed some issues in conformance tests.

Low level summary

Features

  • PR-5361 - Disable old redeemer deserialization
  • PR-5316 - Store delegators in pool state
  • PR-5375 - More CDDL de-duplication
  • PR-5376 - Remove all deprecated functionality introduced before the latest release
  • PR-5384 - Remove Generic instance from BoundedRatio type
  • PR-5382 - Even more CDDL
  • PR-5391 - Store future pools in PState as StakePoolParams
  • PR-5396 - Replace okeyL method with toOKey
  • PR-5386 - Add a subtransactions field to DijkstraTxBodyRaw
  • PR-5402 - Add custom Show instance for the Mismatch type, to show the Relation between the values
  • PR-5398 - Intern stake credentials in reverse delegations
  • PR-5411 - Switch to using TypeData extension
  • PR-5394 - CDDL: Consolidate certificates and pool params
  • PR-5417 - Fix Monoid instance for VMap
  • PR-5397 - Limit protocol version to Word32 from version 12
  • PR-5373 - Make decoders fail when encountering duplicate elements in TxWits
  • PR-5430 - Reflect subtransactions in dijkstra CDDL

Testing

  • PR-5347 - Move or replace BabbageFeatures tests in cardano-ledger-test
  • PR-5385 - Fix stakepool-test in nightly build
  • PR-5184 - Write an ImpTest to reproduce #5170
  • PR-5370 - Add a golden test for duplicate certificates
  • PR-5406 - Update fls and enable test
  • PR-5415 - Run the specification rules of EPOCH and NEWEPOCH in conformance tests
  • PR-5423 - Clean cardano-ledger-conformance
  • PR-5428 - Update formal-ledger-specifications

Infrastructure and releasing

  • PR-5410 - Use ghc 9.10 for Haddocks in GH Pages CI
  • PR-5422 - Add support for nothunks == 0.3.*
  • PR-5348 - Update SECURITY.md
  • PR-5425 - Upgrade the version of Ruby used in GH CI to match the nix flake

· 3 min read
Alexey Kuleshevich

High level summary

This period marks a very nice milestone for the Ledger team. We have finalized CIP-118 - Nested Transactions with drastic simplifications through reliance on CIP-112 - Observe script type and CDDL specification with changes to the transaction. This step puts it in the ready state for the final reviews. Once merged it will conclude the last point on the first milestone listed in the Nested Transaction proposal. Furthermore we have also implemented the distinction between sub-transactions and the top level transaction in such a way that will allow us reuse most of the existing Ledger functionality for transaction validation, regardless of the level. This point takes us right to the finish line of having the second milestone completed as well for the Nested Transaction proposal that was promised by the Ledger team. We expect this milestone to be finalized in the next couple of days.

Beside significant progress on Nested Transactions we have also: implemented a proper solution for preventing invalid serialization for a few obscure edge cases in a transaction, tackled some outstanding tech dept and expanded our test suite.

Low level summary

Features

  • PR-5350 - Switch role of reqSignerHashes from Witness to Guard
  • PR-5341 - Shelley: Move withdrawals draining from DELEGS to LEDGER
  • PR-5351 - Various minor improvements
  • PR-5357 - Rename PoolParams to StakePoolParams
  • PR-5363 - Make Annotator capable of failing.
  • PR-5366 - Backport of a bugfix in queryPoolState
  • PR-5365 - Fix a bug in queryPoolState
  • PR-5368 - Add DecCBOR for ShelleyBbodyPredFailure
  • PR-5362 - CDDL: Switch to explicit exports and consolidate a few fields
  • PR-5334 - Multi level transaction definition

Testing

  • PR-5330 - Run Imp DELEG tests across eras
  • PR-5344 - Update formal-ledger and enable tests
  • PR-5267 - Remove Deleg.conwayEraSpecificSpec
  • PR-5358 - Update formal-ledger and enable conformance tests
  • PR-5352 - Remove tasty from all test suites except those in Byron

Infrastructure and releasing

  • PR-5311 - Check in CI if changelogs need a bump
  • PR-5335 - Improve error checking in CI changelog linting
  • PR-5354 - Remove LC_ALL from shellHook in flake.nix
  • PR-5353 - Fix broken link in RELEASING.md
  • PR-5359 - Add filename to diagnostics in undefined CI check
  • PR-5369 - Bump hls to 2.12 and cabal to 3.14.2