-
Notifications
You must be signed in to change notification settings - Fork 319
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-36 test vector CBOR incorrect #425
Comments
Kind of related, but not as big of a deal, is that the CBOR there also has a different stake credential between the human readable final output ( The legacy delegation also differs between the human readable and CBOR parts. In the CBOR it's the same as the 1st one in the non-legacy delegation array ( |
@rooooooooob @Ryun1 perhaps while CIP-0036 is under scrutiny from #373 we could have a corrected CBOR submitted as a PR? I'll watch out for this & get it classified as a "correction" immediately so we can put the change through quickly. |
Yes, this is a good spot from @rooooooooob, this is a mistake in the CDDL and keys used to generate test vectors - I have checked this with Catalyst and one of the authors; @kevinhammond. Tomorrow I will create a PR with the correction. Thanks for the heads up. |
Please see PR with fixes: #426 |
thanks @rooooooooob @Ryun1 @kevinhammond ... closing this so further review can continue in #426. |
as per
schema.cddl
:you can see the non-legacy delegation (key 1) is an array of
delegation
, a basic group that isn't array-encoded where it's defined.However the test vector for the non-legacy format is
a119ef64a50182825820a6a3c0447aeb9cc54cf6422ba32b294e5e1c3ef6d782f2acff4a70694c4d16630182582000588e8e1d18cba576a4d35758069fe94e53f638b6faf7c07b8abd2bc5c5cdee0302582086870efc99c453a873a16492ce87738ec79a0ebd064379a62e2c9cf4e119219e03581de0ae3a0a7aeda4aea522e74e4fe36759fca80789a613a58a4364f6ecef041904d20500
which decoded (using cbor.me) is:likewise the final human-readable part of the test vector says (2 element array with 2 element arrays as the elements):
According to the
schema.cddl
spec that key should actually be (one 4-element array):The test vectors seem to assume that it was instead defined as
delegation = [$voting_pub_key, $weight]
.The text was updated successfully, but these errors were encountered: