Skip to content

Conversation

@qnikst
Copy link
Contributor

@qnikst qnikst commented Dec 3, 2025

All CDDL updated so the quickcheck tests in the cardano-ledger passes and we can store and validate all the entries,

@qnikst qnikst requested review from Copilot, joaosreis and nc6 December 3, 2025 20:19
@qnikst qnikst self-assigned this Dec 3, 2025
Copilot finished reviewing on behalf of qnikst December 3, 2025 20:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR applies various fixes to CDDL (Concise Data Definition Language) specifications based on issues discovered through QuickCheck testing of the ledger state.

Key changes:

  • Updated pool metadata hash type from fixed-size hash32 to flexible VBytes
  • Enhanced governance action definitions to allow optional governance action IDs and added constitution field
  • Introduced new gov_params_update rule for governance parameter updates with all fields optional
  • Relaxed major protocol version constraint from bounded range (1-9) to unbounded VUInt

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Cardano/SCLS/Namespace/Snapshots.hs Changed pool_metadata_hash from hash32 to VBytes to allow variable-length hashes
Cardano/SCLS/Namespace/GovProposals.hs Added constitution import, made governance action IDs optional, created gov_params_update rule with all optional fields, and added constitution field to "New constitution" action
Cardano/SCLS/Common.hs Removed bounded protocol version range constraint, allowing any VUInt value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

There is no restriction on hash size in ledger state protocol CDDLs.
It means that we should not restrict hash as well.
We allow all versions in protocol_version so we will not need
to update spec on each release.
If was a bug that requied exactly one commitie member to be removed during
update. Quite an interesting policy and I'm curious how that could work.
But anyway it's a bug and it's fixed now.
Each field in the protocol parameters update may be missing.
Current spec allows that.
@qnikst
Copy link
Contributor Author

qnikst commented Dec 4, 2025

I've updates specs by adding fixes from comments to CIP.
Also I've introduced .ksy specs for the keys

@nc6 nc6 merged commit 51bb74c into main Dec 8, 2025
9 checks passed
@nc6 nc6 deleted the cddl-fixes branch December 8, 2025 15:40
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.

3 participants