Refactor gov/proposals/v0 namespace to include the proposals order#299
Merged
Conversation
4d68c61 to
e54d0b3
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the gov/proposals/v0 namespace CDDL so proposal entries can encode insertion order, enabling deterministic reconstruction of ledger state from stored proposals.
Changes:
- Update
gov/proposals/v0record_entryvalue shape to include an orderingword64alongside the proposal payload. - Clarify the
gov/proposals/v0key-size comment (28-byte tx hash + 4-byte tx index + 2-byte proposal index). - Bump the pinned
tweag/CIPsrevision across Nix flake inputs, lockfile, and CI checkout to match the updated reference specs.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scls-cardano/cddl-src/Cardano/SCLS/Namespace/GovProposals.hs | Encodes proposal insertion order in the namespace entry value. |
| scls-cardano/cddl-src/Cardano/SCLS/CDDL.hs | Updates the key-size comment for gov/proposals/v0 to match the 28/4/2 breakdown. |
| flake.nix | Updates the pinned tweag/CIPs revision used for reference specs. |
| flake.lock | Locks the updated tweag/CIPs revision and narHash. |
| .github/workflows/haskell-ci.yml | Updates CI to checkout the same pinned tweag/CIPs revision. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | | ||
| |] | ||
| $ "record_entry" =:= proposal | ||
| $ "record_entry" =:= arr [a word64, a proposal] |
qnikst
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The order in which proposals were added must be preserved to properly reconstruct the ledger state.
This PR refactors the gov/proposals/v0 canonical namespace definition to also encode the order of each proposal.