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

CIP-0036 | Fixed incorrect CDDL notation and incorrect keys in test vectors #426

Merged
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
2 changes: 1 addition & 1 deletion CIP-0036/schema.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $nonce /= uint
$weight /= uint .size 4
$voting_purpose /= uint
legacy_key_registration = $voting_pub_key
delegation = ($voting_pub_key, $weight)
delegation = [$voting_pub_key, $weight]

; May support other stake credentials in the future.
; Such additional credentials should be tagged at the CDDL/CBOR level
Expand Down
12 changes: 6 additions & 6 deletions CIP-0036/test-vector.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test vector for CIP15
# Test vector for CIP36

### Inputs

Expand Down Expand Up @@ -56,7 +56,7 @@ Metadata (CBOR encoding)

Legacy:
```
a119ef64a4015820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d166302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d2
a119ef64a40158200036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a002582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d2
```

New:
Expand All @@ -68,7 +68,7 @@ Blake2b-256 hash of metadata

Legacy:
```
872bcb4a9e2b110a06fd5de04be5924b6c659c28a1665ecc75def13ebca6dfd8
a3d63f26cd94002443bc24f24b0a150f2c7996cd3a3fd247248de396faea6a5f
```

New:
Expand All @@ -83,12 +83,12 @@ Legacy:
{
61284: {
1: '0x0036ef3e1f0d3f5989e2d155ea54bdb2a72c4c456ccb959af4c94868f473f5a0',
2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef',
2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e',
3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef',
4: 1234,
},
61285: {
1: '0xcf8e34db193edc930faf64626a0a759dd9ce654874d4b6f255dc2aa8f52313b6dbb9aa1b162b43ed8946668edca920dd34f5a51a14130814fdc86adb6218b501'
1: '0x6c2312cd49067ecf0920df7e067199c55b3faef4ec0bce1bd2cfb99793972478c45876af2bc271ac759c5ce40ace5a398b9fdb0e359f3c333fe856648804780e'
}
}
```
Expand All @@ -98,7 +98,7 @@ New:
{
61284: {
1: [['0xa6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d1663', 1], ['0x00588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee', 3]],
2: '0x1c5d88aa573da97e5a4667e0f7c4a9c6a3d848934c3b0a5b9296b401540f2aef',
2: '0x86870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e',
3: '0xe0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef',
4: 1234,
5: 0
Expand Down