-
Notifications
You must be signed in to change notification settings - Fork 0
Various CDDL fixes: found based on the QuickCheck testing of the ledger-state #159
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
Conversation
There was a problem hiding this 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
hash32to flexibleVBytes - Enhanced governance action definitions to allow optional governance action IDs and added constitution field
- Introduced new
gov_params_updaterule 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.
|
I've updates specs by adding fixes from comments to CIP. |
All CDDL updated so the quickcheck tests in the cardano-ledger passes and we can store and validate all the entries,