Skip to content

Commit 4c58f1b

Browse files
authored
Merge pull request #5472 from IntersectMBO/td/update-cuddle
Update to cuddle 1.1
2 parents 0f0168b + b81de24 commit 4c58f1b

File tree

29 files changed

+214
-196
lines changed

29 files changed

+214
-196
lines changed

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ source-repository-package
2727
-- NOTE: If you would like to update the above,
2828
-- see CONTRIBUTING.md#to-update-the-referenced-agda-ledger-spec
2929
index-state:
30-
, hackage.haskell.org 2025-09-30T00:00:00Z
31-
, cardano-haskell-packages 2025-12-01T07:41:27Z
30+
, hackage.haskell.org 2025-12-11T11:28:18Z
31+
, cardano-haskell-packages 2025-12-10T11:48:32Z
3232

3333
packages:
3434
-- == Byron era ==

doc/flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
src = lib.sourceFilesBySuffices ./. [".py" ".rst" ".hs" ".png"];
99
buildInputs = with python3Packages; [
1010
sphinx
11-
sphinx_rtd_theme
11+
sphinx-rtd-theme
1212
sphinx-markdown-tables
1313
sphinxemoji
1414
recommonmark

eras/allegra/impl/cardano-ledger-allegra.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ library cddl
104104
base,
105105
cardano-ledger-allegra,
106106
cardano-ledger-shelley:cddl,
107-
cuddle >=0.4,
107+
cuddle >=1.1,
108108
heredoc,
109109

110110
executable generate-cddl

eras/allegra/impl/cddl/data/allegra.cddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ unit_interval = #6.30([1, 2])
199199

200200
; reward_account = bytes
201201
reward_account =
202-
h'E090000000000000000000000000000000000000000000000000000000'
203-
/ h'F0A0000000000000000000000000000000000000000000000000000000'
202+
h'e090000000000000000000000000000000000000000000000000000000'
203+
/ h'f0a0000000000000000000000000000000000000000000000000000000'
204204

205205
relay = [single_host_addr// single_host_name// multi_host_name]
206206

eras/allegra/impl/cddl/lib/Cardano/Ledger/Allegra/HuddleSpec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ scriptNOfKGroup ::
129129
forall era.
130130
HuddleRule "native_script" era =>
131131
Proxy era ->
132-
Named Group
132+
GroupDef
133133
scriptNOfKGroup p =
134134
"script_n_of_k"
135135
=:~ grp
@@ -139,7 +139,7 @@ scriptNOfKGroup p =
139139
]
140140

141141
scriptInvalidBeforeGroup ::
142-
forall era. Era era => Proxy era -> Named Group
142+
forall era. Era era => Proxy era -> GroupDef
143143
scriptInvalidBeforeGroup p =
144144
comment
145145
[str|Timelock validity intervals are half-open intervals [a, b).
@@ -149,7 +149,7 @@ scriptInvalidBeforeGroup p =
149149
=:~ grp [4, a (huddleRule @"slot" p)]
150150

151151
scriptInvalidHereafterGroup ::
152-
forall era. Era era => Proxy era -> Named Group
152+
forall era. Era era => Proxy era -> GroupDef
153153
scriptInvalidHereafterGroup p =
154154
comment
155155
[str|Timelock validity intervals are half-open intervals [a, b).

eras/alonzo/impl/cardano-ledger-alonzo.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ library cddl
124124
base,
125125
cardano-ledger-alonzo,
126126
cardano-ledger-mary:cddl,
127-
cuddle >=0.4,
127+
cuddle >=1.1,
128128
heredoc,
129129

130130
executable generate-cddl

eras/alonzo/impl/cddl/data/alonzo.cddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ unit_interval = #6.30([1, 2])
217217

218218
; reward_account = bytes
219219
reward_account =
220-
h'E090000000000000000000000000000000000000000000000000000000'
221-
/ h'F0A0000000000000000000000000000000000000000000000000000000'
220+
h'e090000000000000000000000000000000000000000000000000000000'
221+
/ h'f0a0000000000000000000000000000000000000000000000000000000'
222222

223223
relay = [single_host_addr// single_host_name// multi_host_name]
224224

eras/babbage/impl/cardano-ledger-babbage.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ library cddl
118118
base,
119119
cardano-ledger-alonzo:cddl,
120120
cardano-ledger-babbage,
121-
cuddle >=0.4,
121+
cuddle >=1.1,
122122
heredoc,
123123

124124
executable generate-cddl

eras/babbage/impl/cddl/data/babbage.cddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ unit_interval = #6.30([1, 2])
338338

339339
; reward_account = bytes
340340
reward_account =
341-
h'E090000000000000000000000000000000000000000000000000000000'
342-
/ h'F0A0000000000000000000000000000000000000000000000000000000'
341+
h'e090000000000000000000000000000000000000000000000000000000'
342+
/ h'f0a0000000000000000000000000000000000000000000000000000000'
343343

344344
relay = [single_host_addr// single_host_name// multi_host_name]
345345

eras/babbage/impl/cddl/lib/Cardano/Ledger/Babbage/HuddleSpec.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ babbageCDDL =
4646
, HIRule $ huddleRule @"signkey_kes" (Proxy @BabbageEra)
4747
]
4848

49-
-- | Babbage changed protocol_version from Named Group to Rule to match actual block
49+
-- | Babbage changed protocol_version from GroupDef to Rule to match actual block
5050
-- serialization. See 'header_body' instance for full explanation.
5151
-- Ref: PR #3762, Issue #3559
5252
babbageProtocolVersionRule ::
5353
forall era. HuddleRule "major_protocol_version" era => Proxy era -> Rule
5454
babbageProtocolVersionRule p =
5555
"protocol_version" =:= arr [a $ huddleRule @"major_protocol_version" p, a VUInt]
5656

57-
-- | Babbage changed operational_cert from Named Group to Rule to match actual block
57+
-- | Babbage changed operational_cert from GroupDef to Rule to match actual block
5858
-- serialization. See 'header_body' instance for full explanation.
5959
-- Ref: PR #3762, Issue #3559
6060
babbageOperationalCertRule :: forall era. Era era => Proxy era -> Rule
@@ -267,16 +267,16 @@ instance HuddleRule "header" BabbageEra where
267267
, "body_signature" ==> huddleRule @"kes_signature" p
268268
]
269269

270-
-- IMPORTANT: Babbage changed operational_cert and protocol_version from Named Group
270+
-- IMPORTANT: Babbage changed operational_cert and protocol_version from GroupDef
271271
-- (grp) to Rule (arr) to match actual block serialization.
272272
--
273273
-- Semantic difference:
274-
-- * Named Group (grp): Fields are inlined directly into parent array.
274+
-- * GroupDef (grp): Fields are inlined directly into parent array.
275275
-- -> header_body becomes a 14-element flat array
276276
-- * Rule (arr): Fields are nested as separate sub-arrays.
277277
-- -> header_body becomes a 10-element array with nested structures
278278
--
279-
-- Pre-Babbage eras (Shelley through Alonzo) used Named Group, but actual Babbage+
279+
-- Pre-Babbage eras (Shelley through Alonzo) used GroupDef, but actual Babbage+
280280
-- blocks serialize with Rule (nested arrays). This change corrects the CDDL spec to
281281
-- match the actual CBOR serialization.
282282
--

0 commit comments

Comments
 (0)