Skip to content
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

Remove code repetition in Conway era CDDL #4178

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions eras/babbage/impl/cddl-files/babbage.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ header_body =
, block_body_size : uint
, block_body_hash : $hash32 ; merkle triple root
, operational_cert
, [ protocol_version ]
, protocol_version
]

operational_cert =
Expand All @@ -48,7 +48,7 @@ next_major_protocol_version = 9

major_protocol_version = 1..next_major_protocol_version

protocol_version = (major_protocol_version, uint)
protocol_version = [(major_protocol_version, uint)]

transaction_body =
{ 0 : set<transaction_input> ; inputs
Expand Down Expand Up @@ -280,7 +280,7 @@ protocol_param_update =
, ? 9: nonnegative_interval ; pool pledge influence
, ? 10: unit_interval ; expansion rate
, ? 11: unit_interval ; treasury growth rate
, ? 14: [protocol_version] ; protocol version
, ? 14: protocol_version ; protocol version
, ? 16: coin ; min pool cost
, ? 17: coin ; ada per utxo byte
, ? 18: costmdls ; cost models for script languages
Expand Down
6 changes: 3 additions & 3 deletions eras/conway/impl/cddl-files/conway.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ header_body =
, block_body_size : uint
, block_body_hash : $hash32 ; merkle triple root
, operational_cert
, [ protocol_version ]
, protocol_version
]

operational_cert =
Expand All @@ -48,7 +48,7 @@ next_major_protocol_version = 10

major_protocol_version = 1..next_major_protocol_version

protocol_version = (major_protocol_version, uint)
protocol_version = [(major_protocol_version, uint)]

transaction_body =
{ 0 : set<transaction_input> ; inputs
Expand Down Expand Up @@ -105,7 +105,7 @@ policy_hash = scripthash

parameter_change_action = (0, gov_action_id / null, protocol_param_update, policy_hash / null)

hard_fork_initiation_action = (1, gov_action_id / null, [protocol_version])
hard_fork_initiation_action = (1, gov_action_id / null, protocol_version)

treasury_withdrawals_action = (2, { reward_account => coin }, policy_hash / null)

Expand Down