Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cbor serialization of TxWits in Conway #3933

Merged
merged 11 commits into from
Jan 5, 2024

Conversation

teodanciu
Copy link
Contributor

@teodanciu teodanciu commented Dec 14, 2023

Description

Solves part of: #3922

  • Tightens the cddl for transaction_witness_set :
    • not allowing empty collections for any field
    • for plutus scripts, also not allowing duplicates
  • Updates the DecCBOR instance of TxWitsRaw to match the cddls changes

Note: still remaining: checking for duplicates in Annotator fields, not possible at the moment with the current Annotator mechanism

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@teodanciu teodanciu changed the title First attempt at improving cbor serialization of TxWits in Conway Improve cbor serialization of TxWits in Conway [WIP] Dec 14, 2023
@teodanciu teodanciu force-pushed the td/witness-cbor-improvements branch 5 times, most recently from 625d7c5 to 55bad91 Compare December 21, 2023 23:53
@teodanciu teodanciu marked this pull request as ready for review December 21, 2023 23:59
@teodanciu teodanciu force-pushed the td/witness-cbor-improvements branch 3 times, most recently from 256f761 to bde3102 Compare December 27, 2023 15:02
@teodanciu teodanciu changed the title Improve cbor serialization of TxWits in Conway [WIP] Improve cbor serialization of TxWits in Conway Dec 29, 2023
@teodanciu teodanciu force-pushed the td/witness-cbor-improvements branch 3 times, most recently from 09171cd to cbc5ca5 Compare January 3, 2024 11:40
@teodanciu teodanciu force-pushed the td/witness-cbor-improvements branch 9 times, most recently from 0b4e6b4 to f4e8667 Compare January 4, 2024 13:02
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Just a few suggestions.

eras/alonzo/impl/CHANGELOG.md Outdated Show resolved Hide resolved
eras/conway/impl/cddl-files/conway.cddl Outdated Show resolved Hide resolved
eras/conway/impl/cddl-files/extra.cddl Outdated Show resolved Hide resolved
eras/conway/impl/cddl-files/extra.cddl Outdated Show resolved Hide resolved
eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxWits.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-binary/CHANGELOG.md Outdated Show resolved Hide resolved
eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxWits.hs Outdated Show resolved Hide resolved
- unnecessarily converting to/from plain decoder
- wrong default in function expecting failure
@lehins lehins force-pushed the td/witness-cbor-improvements branch from 5b4b1b3 to 455eef6 Compare January 5, 2024 17:14
@lehins lehins enabled auto-merge January 5, 2024 17:17
@lehins lehins merged commit 3655d66 into master Jan 5, 2024
10 of 129 checks passed
@lehins lehins mentioned this pull request Jan 9, 2024
4 tasks
@neilmayhew neilmayhew deleted the td/witness-cbor-improvements branch March 8, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants