Skip to main content

68 posts tagged with "ledger"

View All Tags

· 3 min read
Alexey Kuleshevich

High level summary

Unfortunately, due to the ZuriHac conference, we ended up skipping the Ledger update for the last period, therefore this update contains our accomplishments over the period of four weeks.

Extensive investigation into current CDDL specification and efforts of improving our testing tools lead to discovery and fixes of numerous bugs in CDDL specification dating back all the way to the Byron era. We have also improved readability of Ledger CDDL specification through enhancements to our CDDL generation tool. We have further tackled a whole bunch of tech debt and introduced performance improvements. Thanks to dropping support for ghc-8.10 we were able to add some safety improvements as well, that utilize features of the newer compiler.

Besides improvements to the existing code we have started preparation for an upcoming intra-era hard fork, which is planned to happen some time later this year and the new Dijkstra era that will happen no earlier than next year. We have fixed one more bug in preparation for the intra-era hardfork and started preliminary work for Nested Transactions.

Low level summary

Features

  • PR-4996 - CDDL improvements
  • PR-5073 - CDDL fixes
  • PR-5056 - Reinstate Annotator instances to main libs
  • PR-5079 - Fix RequiresNetworkMagic encoding
  • PR-5038 - Remove MemoBytes from ShelleyTx
  • PR-5085 - Also make Conway's pool metadata_hash be just bytes
  • PR-5090 - Renamed AlonzoTx fields
  • PR-5086 - Protocol version upper bound correction
  • PR-5080 - Remove MissingRequiredSigners
  • PR-5089 - Move era definitions to core:internal
  • PR-5030 - Added Dijkstra era
  • PR-5100 - Untaint era definitions, while preserving the safety warning.
  • PR-5109 - Add PParamUpdate minPoolCost to Shelley/Allegra/Mary CDDL
  • PR-5106 - Introduce KeyValuePairs for easier ToJSON deriving
  • PR-5104 - Dijkstra Era Transition functionality
  • PR-5099 - Fix COMPLETE pragmas for TxCert and NativeScript
  • PR-5116 - Simplify ToJSON instance for TransitionConfig
  • PR-5091 - Move unelected CC votes check to GOV
  • PR-5127 - Pure version of plutusDebug
  • PR-5122 - Memoize block body hash computation
  • PR-5125 - Faster upgradeTxOut for alonzo, babbage and conway

Testing

  • PR-4966 - Remove Pretty from cardano-ledger-test
  • PR-5061 - constrained-generators: Simplify HasSpec instance for Bool and move more things to NumSpec
  • PR-5083 - Remove old version of constrained generators
  • PR-5082 - Add doctests to CI
  • PR-5078 - Fix typos, formatting, and broken references in the shelley-ma formal spec PDF
  • PR-5102 - Add an imp test for checking deposit collection and refunds
  • PR-5118 - Fix stake comparison test
  • PR-5088 - Move upgrade functions for tx, body, auxData and wits to testlib
  • PR-5117 - constrained-generators: Separate generation and internal testing out of common modules

Infrastructure and releasing

  • PR-5074 - Bump .git-blame-ignore-revs
  • PR-5081 - Add script for setting up direnv
  • PR-5092 - Fix hackage nix in flake
  • PR-5110 - Upgrade deprecated Sphinx config option in doc/
  • PR-5107 - doctest in nix develop
  • PR-5112 - Remove ghcid related files
  • PR-5114 - cabal.project: Update index-states and drop un-needed SRPs
  • PR-5113 - Bump requests from 2.32.3 to 2.32.4 in /doc

· 2 min read
Alexey Kuleshevich

High level summary

Last period we were finally able to drop support for older GHC versions. We also made some cleanup that was necessary as preparation work for further refactoring that is underway, which is necessary for both Leios and Nested Transactions. Refactoring definitions of protocol parameters is quite an accomplishment, since it drastically reduces complexity and eliminates unnecessary duplication for all eras. This refactoring not only reduced amount of code around protocol parameters for previous eras, but will also drastically simplify the process of adding new protocol parameters in the future eras.

Low level summary

Features

  • PR-5028 - Deprecate balance in favor of a better named sumUTxO
  • PR-5034 - Rename ppLens and ppuLens to make them more specific
  • PR-5027 - Refactor PParams CBOR, JSON and Plutus Data serialization for reuse across eras and serializers
  • PR-5007 - Remove ConwayNewEpochPredFailure
  • PR-5011 - Ensure BabbageNonDisjointRefInputs is only checked for PlutusV3 scripts
  • PR-5057 - Change Byron EBB stakeholderid to zero-or-more
  • PR-5066 - Fix occurrence of items in maps in byron.cddl
  • PR-5053 - Fix COMPLETE pragma for NativeScript ShelleyEra

Testing

  • PR-5016 - Bump formal-ledger-specifications
  • PR-5012 - constrained-generators: Split abstract syntax out of Base.hs
  • PR-5037 - Some hacking on improving error messages for lists
  • PR-5049 - Golden tests for PParamsUpdate JSON serialization

Infrastructure and releasing

  • PR-5029 - Remove GHC 8.10 from nix-flake and GHA
  • PR-5040 - Update to fourmolu-0.17.0.0
  • PR-5041 - Update ghc versions
  • PR-5039 - Bump base
  • PR-5051 - Update the haskellNix flake input
  • PR-5055 - Update the iohkNix flake input
  • PR-5060 - Move the shellcheck CI into the main workflow file

· One min read
Alexey Kuleshevich

High level summary

Ledger team started preparation for an intra-era hard fork, by bumping support for major protocol version 11 in Conway era. Besides that we've continued addressing tech debt, improving safety of the codebase and enhancing our constraint based testing framework.

Low level summary

Features

  • pull-5001 - Remove heapwords from cardano-ledger-core
  • pull-5013 - Move orphan ToPlutusData instances with their types
  • pull-5005 - Made TxBody a data family
  • pull-5004 - Remove delegators field from conway-genesis JSON
  • pull-5023 - Bumped Conway protocol version max to 11
  • pull-5021 - Add SupportedLanguage

Testing

  • pull-5010 - constrained-generators: Use csongor's trick to make type errors nicer
  • pull-5002 - Add EraTest classes
  • pull-5020 - Update and fix ledger-state benchmarks

Infrastructure and releasing

  • pull-5025 - cardano-ledger-byron: remove Cabal-syntax dependency

· 2 min read
Alexey Kuleshevich

High level summary

Our focus was on fixing technical debt that would affect the definition of a new era, as well as improvements to the CI and tests. We added a check in the MEMPOOL rule that detects duplicate transactions and shortcircuits the rule if encountered.

The team also completed integration work for the node release 10.3.0.

Low level summary

Features

  • pull-4967 - Fail fast when adding a redundant transaction to the mempool
  • pull-4979 - Make it build with ghc 9.12
  • pull-4994 - Add changelog section for cardano-node-10.3

Tehnical debt

  • pull-4981 - Move add/sum functions for CompactCoin to Cardano.Ledger.Coin
  • pull-4993 - Deprecate redundant accessor functions in Alonzo
  • pull-4991 - Fix PParams JSON deserialization
  • pull-4995 - Stop encoding/decoding protocol version as a CBOR group in PParams
  • pull-4997 - Move TxBody Internal modules to public ones

Testing

  • pull-4977 - Fix instant stake calculation test
  • pull-4982 - Use Data-backed api for V0 and V2 scripts
  • pull-4975 - Start to re-refactor contexts and get rid of symbol

Infrastructure and releasing

  • pull-4941 - Added a Github action for checking if CDDL is up-to-date
  • pull-4987 - Update upper-bound ghc variant to 9.12.1
  • pull-4952 - Add release issue template
  • pull-4998 - Added plutus preprocessor check to CI

· 2 min read
Alexey Kuleshevich

High level summary

Major technical debt items have been taken care of during this period:

  • We've finalized the adjustment of mechanism of how we retain the original bytes of a transaction during deserialization, which will have positive impact on performance as well as correctness of our transaction deserializers. This was an especially necessary task to handle for the upcoming work on Nested Transactions
  • We finished adjusting the representation of CertState, which is the part of the ledger state responsible for managing the state of entities that are manipulated with transaction certificates. This representation now more accurately reflects the difference between pre vs post-Conway eras.
  • We did a minor performance improvement of transaction size calculation
  • Improved the MemoBytes interface to disallow unsafe construction and improved the consistency of transaction related modules.
  • Did AccountState type rename as preparation for potential promotion of reward accounts to full blown accounts, which might be needed for Leios later down the road.

We've also accomplished a very nice simplification to our constraint based generation framework. Fixed our example Plutus scripts that we use for testing. Got rid of a couple of redundant Byron test packages, which were causing rebuilds of the same code twice and caused unnecessary maintenance overhead. Besides that we also did some other minor quality of life improvements to the Ledger codebase.

Low level summary

Features

Testing

  • pull-4954 - Add expectTxSuccess to ShelleyEraImp and use it in trySubmitTx
  • pull-4958 - Update spec's code location
  • pull-4921 - Refactor the constrained generators to get rid of the Fn stuff
  • pull-4972 - Fix and bump cardano-ledger-executable-spec
  • pull-4923 - Update V3 scripts in plutus-preprocessor to use the new Data api

Infrastructure and releasing

  • pull-4956 - Convert byron test packages to sublibraries
  • pull-4957 - Add script for bumping CHANGELOGS post-release
  • pull-4965 - Expose Byron CDDLs in Test.Cardano.Chain.Binary.Cddl