- 
                Notifications
    
You must be signed in to change notification settings  - Fork 166
 
Even more CDDL #5382
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
base: master
Are you sure you want to change the base?
Even more CDDL #5382
Conversation
c3b9ed7    to
    6fda464      
    Compare
  
    888e696    to
    ea10f9d      
    Compare
  
    * Rename and move metadata, matadatum and metadatum_label definitions to core, along with transaction_index. * Remove metadata_hash and just use auxiliary_data_hash everywhere.
Rename era-name-prefixed definitions with meaningful structural names that are easier to reuse.
* Make native_script fields era-prefixed as and when they are introduced * Add smart constructors for script types in core * Fix script_n_of_k for eras after allegra
ea10f9d    to
    472c126      
    Compare
  
    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.
Looks great! I love it!
Only a couple of minor suggestions
| | 1. metadata (raw) - Supported since Shelley | ||
| | 2. auxiliary_data_array - Array format, introduced in Allegra | ||
| | 3. auxiliary_data_map - Tagged map format, introduced in Alonzo | ||
| | Dijkstra adds plutus_v4_script support at index 5 | 
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.
It is a zero based index: so element 5 but index 4 😉
| | Dijkstra adds plutus_v4_script support at index 5 | |
| | Dijkstra adds plutus_v4_script support at index 4 | 
| mkInvalidBefore :: Named Group | ||
| mkInvalidBefore = | ||
| comment | ||
| [str|Timelock validity intervals are half-open intervals [a, b). | ||
| |This field specifies the left (included) endpoint a. | ||
| |] | ||
| $ "invalid_before" =:~ grp [4, a slot] | ||
| 
               | 
          ||
| mkInvalidHereafter :: Named Group | ||
| mkInvalidHereafter = | ||
| comment | ||
| [str|Timelock validity intervals are half-open intervals [a, b). | ||
| |This field specifies the right (excluded) endpoint b. | ||
| |] | ||
| $ "invalid_hereafter" =:~ grp [5, a slot] | 
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.
For consistency sake we should use the same prefix for CDDL and constructor functions
| mkInvalidBefore :: Named Group | |
| mkInvalidBefore = | |
| comment | |
| [str|Timelock validity intervals are half-open intervals [a, b). | |
| |This field specifies the left (included) endpoint a. | |
| |] | |
| $ "invalid_before" =:~ grp [4, a slot] | |
| mkInvalidHereafter :: Named Group | |
| mkInvalidHereafter = | |
| comment | |
| [str|Timelock validity intervals are half-open intervals [a, b). | |
| |This field specifies the right (excluded) endpoint b. | |
| |] | |
| $ "invalid_hereafter" =:~ grp [5, a slot] | |
| mkScriptInvalidBefore :: Named Group | |
| mkScriptInvalidBefore = | |
| comment | |
| [str|Timelock validity intervals are half-open intervals [a, b). | |
| |This field specifies the left (included) endpoint a. | |
| |] | |
| $ "script_invalid_before" =:~ grp [4, a slot] | |
| mkScriptInvalidHereafter :: Named Group | |
| mkScriptInvalidHereafter = | |
| comment | |
| [str|Timelock validity intervals are half-open intervals [a, b). | |
| |This field specifies the right (excluded) endpoint b. | |
| |] | |
| $ "script_invalid_hereafter" =:~ grp [5, a slot] | 
| 
               | 
          ||
| ### `testlib` | ||
| 
               | 
          ||
| * Add CDDL definitions for `script_hash`, `mkScriptPubkey`, `mkScriptAll`, `mkScriptAny`, `mkScriptNOfK`, `mkInvalidBefore`, `mkInvalidHereafter` | 
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.
Ditto
| * Add CDDL definitions for `script_hash`, `mkScriptPubkey`, `mkScriptAll`, `mkScriptAny`, `mkScriptNOfK`, `mkInvalidBefore`, `mkInvalidHereafter` | |
| * Add CDDL definitions for `script_hash`, `mkScriptPubkey`, `mkScriptAll`, `mkScriptAny`, `mkScriptNOfK`, `mkScriptInvalidBefore`, `mkScriptInvalidHereafter` | 
| metadata = {* metadatum_label => metadatum} | ||
| 
               | 
          ||
| transaction_metadatum_label = uint | ||
| metadatum_label = uint .size 8 | 
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.
Nice catch on fixing the width of this!
Description
Addresses some more of the checklist in #5367 and is the third part of #5194
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).