Skip to content

Some fixes to CDDLs based on the Consensus golden examples of blocks #5050

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasagredo
Copy link
Contributor

Description

The examples in consensus have:

  • An empty list of stakeholder ids in a byron block.
  • The metadata hash is 2 bytes long when talking about the "consensus.pool" (just so that it is easier to find where this might come from), but for transaction_body they are 32 bytes long.

Someone should check if this is expected or not, but that is right now the case.

Other things that need fixing are:

  • address is hardcoded
  • reward_account is hardcoded
  • unit_interval is hardcoded
  • distinct_VBytes only allows size 8, 16, ... but the example plutus_v1_script in the Conway example has length 6.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@jasagredo jasagredo requested a review from a team as a code owner May 15, 2025 16:01
@jasagredo
Copy link
Contributor Author

As discussed with Alexey, this is even more wrong than the original version. Quoting:

The problem is that hash for the pool metadata can be of any size. So, it should be just bytes
While auxiliary data hash must be 32 bytes.

Alexey also pointed me to the big CDDL rework PR, indicating that the changes should probably be applied there instead. Could this be something you address in that PR too @Soupstraw ?

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.

Empty list of stakeholderid in byron EBB is forbidden by CDDL but generated by codecs
1 participant