Skip to main content

85 posts tagged with "ledger"

View All Tags

Ledger Team Update

· 4 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary

Ledger team has made significant progress on Ledger rules for Nested Transactions as well as translation of newer features to Plutus context. We've also introduced a major change to how Plutus context is prepared for each transaction entering a mempool, which when fully integrated will result in significant performance improvements. On the efforts of expanding Ledger we have transferred all of the ledger state queries from Consensus component to the Ledger component, as well as introduced an initial stage of streaming injection functionality that we'll be needed for testing and benchmarking, especially for on disk storage where huge amount of data needs to be injected into ledger state without any impact on the operating memory.

Aside from features we have fixed a few more cddl bugs that we discovered with our new AntiGen and cuddle tools. Improved examples for golden tests and golden tests facilities.

Low level summary

Features

  • PR-5692 - Adjust Dijkstra UTXOW rule to subtransactions
  • PR-5684 - Remove unused FromCBOR/ToCBOR instances
  • PR-5572 - Add streaming interface to era transition for initial funds injection
  • PR-5737 - Fix treasury donations handling for SubTransactions
  • PR-5755 - Clean up CddlSpec, fix Datum and AccountBalanceIntervals generators
  • PR-5736 - Fix DecCBOR instances to reject ProtVer values exceeding the era maximum
  • PR-5636 - Memoize Plutus related parts of transaction validation
  • PR-5764 - Bring all remaining queries from consensus over to ledger
  • PR-5767 - [Leios Prototype] Backwards compat fix
  • PR-5757 - Remove allowLeftOver flag from binaryGetDecoder and simplify IP address decoders
  • PR-5754 - Fail PlutusV1-V3 translation for direct deposits and balance intervals
  • PR-5770 - Simplify Dijkstra constraints
  • PR-5751 - UTXO with subtransactions
  • PR-5747 - Add gov/proposals/roots/v0 namespace
  • PR-5742 - Add entities/stake_pools/v0 namespace

Testing

  • PR-5749 - Fix and re-enable BbodysSec
  • PR-5687 - Convert pool related CHAINExamples to ImpTests
  • PR-5732 - Expand transaction content in examples in Test.Cardano.Ledger.[era].Examples
  • PR-5753 - Use hspec-golden for Alonzo golden tests
  • PR-5760 - Golden testing facilities for JSON and CBOR
  • PR-5731 - Add negative tests for Metadatum int decoding range
  • PR-5765 - Add a custom generator to cost_models, create Huddle.Gen module

Infrastructure and releasing

  • PR-5750 - Run tests for ghc 9.6.7 only
  • PR-5756 - Bump actions/upload-pages-artifact from 4 to 5 in the actions group
  • PR-5766 - Drop x86_64-darwin from Hydra builds
  • PR-5768 - Bump slackapi/slack-github-action from 3.0.1 to 3.0.2 in the actions group
  • PR-5594 - Test failure summaries in CI
  • PR-5774 - Handle single failing suite case in CI test failure summaries

Ledger Team Update

· 6 min read
Alexey Kuleshevich
Ledger Team Software Engineer

High level summary

These were our main areas of focus last period on the Ledger project:

Maintenance

We worked really hard in order to prepare Ledger for the cardano-node-10.7.0 release that had all of the bug fixes and features needed for the upcoming van Rossem Hard Fork into protocol version 11. Furthermore, we prepared Ledger for a subsequent cardano-node-10.7.1 release that had some of the performance issues resolved, which were identified in the Ledger component of 10.7.0 release.

We've also identified and fixed a few bugs, most of which were in CDDL specification. This was largely thanks to the recently integrated tool AntiGen, that we developed specifically for creating negative property tests for Ledger serialization.

Besides bug fixes, we've added quite a few nice optimizations, which do result in noticeable speed up in chain validation and replay.

Some very nice improvements were implemented for the Ledger API used by Consensus, which will result in clearer and safer boundaries between those two components.

CIP-118 - Nested Transactions:

Two more major Ledger rules UTXO and UTXOW were defined for processing transactions in the Dijkstra era that now take sub-transactions into consideration.

CIP-165 - Canonical Ledger State:

Fixes were applied to canonical ledger state representation for the Constitutional Committee

Low level summary

Features

  • PR-5654 - Normalize StakeRefPtr addresses better and improve UTxO decoding
  • PR-5647 - Change B constructor of Metadatum from ByteString to ByteArray
  • PR-5655 - Add ToJSON/FromJSON instances for NonEmptyMap and NonEmptySet
  • PR-5630 - Remove distinct_bytes hack, make CDDL reflect reality in previous eras
  • PR-5560 - *EraBlockHeader typeclasses deprecating BHeaderView
  • PR-5658 - Optimize Text byte length check in metadata and other places
  • PR-5632 - Forecast API
  • PR-5671 - Remove NoThunks instances for predicate failures and ContextError types
  • PR-5635 - ScriptPurpose aware memoization of TxInfo
  • PR-5676 - Remove state update from UTXOS
  • PR-5641 - Avoid unnecessary computation of PlutusWithContext
  • PR-5672 - Make ContextError constructors from Alonzo to Dijkstra era lazy
  • PR-5614 - SUBUTXO implementation
  • PR-5668 - SUBUTXOW fixes
  • PR-5704 - Backport: revert ConwayAccountState type unrolling
  • PR-5697 - Remove 5 redundant NativeScript era ~ Timelock era constraints (#5319)
  • PR-5665 - Fix metadatum decoder and chain_code CDDL
  • PR-5681 - Add/refactor committee-related canonical namespaces
  • PR-5725 - Revert decoders to a more efficient implementation
  • PR-5716 - Move applyTick into its own ApplyTick typeclass
  • PR-5719 - Add protocol version validation to createInitialState
  • PR-5729 - Fix ConwayAccountState overhead
  • PR-5727 - Add storable instances

Testing

  • PR-5656 - Translate all transaction building examples in our test files to use Lens interface.
  • PR-5609 - Adequate conformance to Version restriction
  • PR-5667 - Fix Proposal generation to generate HardForkInitiation with bounded major version
  • PR-5695 - Update formal-ledger-specifications and re-enable tests
  • PR-5529 - Add simpleRewards reproducer from cardano-db-sync and migrate TwoPools example to an ImpTest
  • PR-5715 - Bump cuddle to 1.5.0.0

Infrastructure and releasing

  • PR-5653 - Add cabal-gild and shellcheck as part of the pre-commit hook in our Nix devShell.
  • PR-5648 - Changelog for cardano-node-10.7
  • PR-5657 - Migrate scripts to cardano-ledger-release-tool
  • PR-5599 - Enable ghc 9.14 to be used for tests in CI and locally
  • PR-5677 - Bump requests from 2.32.4 to 2.33.0 in /doc
  • PR-5675 - Add nixfmt in our Github CI checks
  • PR-5670 - Add CHANGELOG and cabal file updater skill
  • PR-5691 - Bump pygments from 2.19.1 to 2.20.0 in /doc
  • PR-5702 - Update contribution policy to note how contributions should be vetted
  • PR-5703 - Add a CI workflow for checking nix hashes
  • PR-5708 - Bump the actions group with 3 updates
  • PR-5709 - Update slack-github-action configuration for v2 onward
  • PR-5712 - Fix missed version bump for allegra package
  • PR-5713 - Stop running bump-changelogs on release branches
  • PR-5666 - Refactor transaction and transaction body of examples in Test.CardanoLedger.<era>.Examples.hs.
  • PR-5717 - claude: improve changelog update skill
  • PR-5710 - Update microlens dependency
  • PR-5726 - Update ghc-9.12 on CI and Nix to ghc-9.12.4, and cabal-3.16 to cabal-3.16.1.0
  • PR-5728 - Backport of fixes for cardano-node-10.7.1
  • PR-5741 - Fix nix build failure in plutus-preprocessor
  • PR-5721 - Leios: Make the (leios enhanced) block decoding backwards compatible

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