Skip to main content

83 posts tagged with "ledger"

View All Tags

Ledger Team Update

· 2 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary

This period Ledger has progressed on Nested Transaction by implementing one more Ledger rule. We've also integrated our new testing library AntiGen into Ledger, which allows us to preform negative property testing on our decoders against CDDL specification, consequently improving confidence in the quality of our binary decoders now and for future eras. We've also progressed on Canonical Ledger State by adding one more namespace. Major milestone was releasing of all Ledger packages to CHaP for the upcoming cardano-node-10.7 release, which has all the features in it for the upcoming intra-era hard fork to protocol version 11.

Low level summary

Features

  • PR-5532 - Remove default implementation for the DecCBOR class
  • PR-5612 - Introduce gov/proposals/v0 namespace
  • PR-5611 - Use IPv4 and IPv6 from cardano-base instead of iproute
  • PR-5608 - SUBUTXOW implementation
  • PR-5627 - Remove redundant UTXO predicate failures
  • PR-5629 - Remove default implementation of fromPlutusData in ToPlutusData typeclass
  • PR-5645 - Add PlutusV4 to AlonzoScript decoder

Testing

  • PR-5568 - Add AntiGen tests to Conway CDDL
  • PR-5628 - Implement custom ToExpr instance for Mismatch datatype.
  • PR-5620 - Update formal-ledger-spec and enable Utxos conformance tests

Infrastructure and releasing

  • PR-5615 - Bump markdown from 3.7 to 3.8.1 in /doc
  • PR-5624 - Bump cardano-ledger-alonzo-test package version
  • PR-5622 - Post-release CHANGELOG updates

Ledger Team Update

· 2 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary

Through some extra testing we've identified and fixed a few benign bugs. We've also identified and implemented another restructure in the ledger state that improves performance and will further simplify LedegrHD implementation. Besides that we've also made further progress on these initiatives:

Low level summary

Features

  • PR-5575 - Introduce gov/committee/v0 canonical namespace
  • PR-5584 - Use AccountId for stake pools
  • PR-5566 - Tighten PParam lenses
  • PR-5591 - Extras for working with maps
  • PR-5595 - Version restriction
  • PR-5596 - Remove SUBUTXOS rule
  • PR-5579 - Support gov/canonical/pparams/v0 namespace
  • PR-5589 - add notes on Praos slot leader election for historic reasons
  • PR-5585 - Subsume delegations into active-stake
  • PR-5544 - SUBLEDGER implementation

Testing

  • PR-5587 - Set scriptIntegrityHash to 0 to match the behavior of Agda in conformance tests
  • PR-5590 - Fix nightly nothunks tests for snapshot

Infrastructure and releasing

Ledger Team Update

· 5 min read
Alexey Kuleshevich
Ledger Team Software Engineer

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

  • Preparation for cardano-node releases:

    • PR-5569 - Fixup ledger for next release
    • PR-5565 - Prevent decoding Version higher than 11
    • PR-5580 - Fix preservation of a DRep delegation bug
    • PR-5555 - Add Generic instances for ApplyTxError type family
    • PR-5516 - Improve snapshot creation performance
    • PR-5576 - Remove assertions and no longer needed StakePoolParams from SnapShot
    • PR-5545 - Fix laziness in map and mapWithKey for VMap
  • CIP-118 - Nested Transactions:

    • PR-5531 - SUBGOVCERT rule impementation
    • PR-5534 - SUBDELEG rule implementation
    • PR-5542 - SUBGOV implementation
    • PR-5557 - Update UTxOState in UTXO rule rather than UTXOS
  • CIP-159 - Account Address Enhancement - phase 1:

    • PR-5528 - Rename RewardAccount to AccountAddress
    • PR-5530 - Add Semigroup/Monoid for Withdrawals/DirectDeposits
    • PR-5546 - Add AccountBalanceIntervals to DijkstraEraTxBody
  • CIP-165 - Canonical Ledger State:

    • PR-5540 - Canonical Ledger State: introduce blocks/v0 namespace
    • PR-5570 - Implement gov/constitution/v0 namespace
    • PR-5548 - Introduce utxo/v0 namespace for canonical ledger state
    • PR-5552 - Introduce CanonicalCoin type
  • General maintenance and improvements

    • PR-5536 - Dijkstra:CDDL: Remove (un)registration certs
    • PR-5543 - Change Predicate failure with UTxO to NonEmptyMap
    • PR-5539 - Improving re exports

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

Ledger Team Update

· 7 min read
Alexey Kuleshevich
Ledger Team Software Engineer

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

Ledger Team Update

· 3 min read
Alexey Kuleshevich
Ledger Team Software Engineer

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