-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix(rust/cardano-blockchain-types): fix CIP36 #133
Conversation
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
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.
Can we move cip36 into a metadata/cip36
module instead of at the root of the types. This is because we are likely to add more decoded metadata handlers and we should structure that more logically. It does not belong under auxdata
because thats raw aux data whereas this is decoded metadata which uses it.
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
Signed-off-by: bkioshn <[email protected]>
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
✅ Test Report | |
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
Signed-off-by: bkioshn <[email protected]>
✅ Test Report | |
…hange (#123) * feat(rust): add cardano-blockchain-types crate * fix(rust): Remove unused dependencies * fix(cardano-blockchain-types): time_to_slot calculation Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): remove justfile Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): point new should take type Slot and Blake2bHash Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): Fork type Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): point and fuzzy point test Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add Fork increment function Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add comment on tag 259 Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add Fork decrement function Signed-off-by: bkioshn <[email protected]> * test(rust): try earthly no-cache Signed-off-by: bkioshn <[email protected]> * test(rust): try earthly no-cache and fix doc artifact Signed-off-by: bkioshn <[email protected]> * test(rust): remove no-cache Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): expose Fork and Network Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add partailOrd to Fork Signed-off-by: bkioshn <[email protected]> * Update rust/cardano-blockchain-types/src/point.rs Co-authored-by: Stanislav Tkach <[email protected]> * fix(cardano-blockchain-types): cleanup Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): testdoc Signed-off-by: bkioshn <[email protected]> * Update rust/cardano-blockchain-types/src/point.rs * fix(cardano-blockchain-types): cleanup Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format * fix(cardano-blockchain-types): add validate PR title * fix(cardano-blockchain-types): comments * fix(cardano-blockchain-types): fix hash_or_default * fix(cardano-blockchain-types): redundant code * test: no cache * test: revert change * test ci * test ci * test ci * test ci * test ci * test ci * test ci * test ci * test ci * test ci * revert change * test ci * revert change * fix(rust/cardano-blockchain-types): add more functionality to `Slot` (#124) * fix(cardano-blockchain-types): add more trait to slot Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add serde serialize to slot Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): use sat_mul for slot Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> * feat(rust/cardano-blockchain-types): Add CIP36 (#125) * feat(cardano-blockchain-types): add cip36 Signed-off-by: bkioshn <[email protected]> * feat(cardano-blockchain-types): add decode helper utils Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): fix type Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add clone Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): fix type Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): check dup keys Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): fix linter Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): fix visibility and comment Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add validation test Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): key registration decoding test Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): move voting pk to its own file Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): derive debug Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): use .context Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): fix getter Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): check required keys Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): network tag of payment addr Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): linter Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): expose from_saturating (#131) Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): slot bigint conversion Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): txn index conversion Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): conversion Signed-off-by: bkioshn <[email protected]> * fix(rust/cardano-blockchain-types): fix CIP36 (#133) * fix(cardano-blockchain-types): key registration Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): registration witness Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): voting pk Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): validation test Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): move cip36 to be under metadata Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): use decode_helper from cbork-utils Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): visibility, cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): handle unset data Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 err report Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): update cbor-utils tag Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 now contain validation Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 validation implement getter Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): remove validation from cip36 struct Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): improve verifying key error log Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> * fix(rust/cardano-blockchain-types): implement new error report for CIP36 (#142) * fix(cardano-blockchain-types): key registration Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): registration witness Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): voting pk Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): validation test Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): move cip36 to be under metadata Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): use decode_helper from cbork-utils Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): visibility, cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): handle unset data Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 err report Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): update cbor-utils tag Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 now contain validation Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 validation implement getter Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): remove validation from cip36 struct Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): improve verifying key error log Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): implement new error report Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): function name Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): print report Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): version for catalyst-types Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): move found key check to its own function Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): pass cip36 ProblemReport as context Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): key reg redundant code and missing key checking Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): remove cip36validation struct Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add more fileds, fix return error Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): add cip36_from_block function Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): remove serde_json Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): impl display for cip36 error Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): cip36 key reg function Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): problem report conversion err Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): impl display for cip36 Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): err report getter Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): update catalyst-types tag Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): return type for cip36 constructor Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): logic Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): format Signed-off-by: bkioshn <[email protected]> * fix(cardano-blockchain-types): rename ctx Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> --------- Signed-off-by: bkioshn <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: Stanislav Tkach <[email protected]>
Description
CIP36
error handlingdecode_helper.rs
and usecbor-utils
cip36
folder to be undermetadata
Cip36
constructor (new
) to acceptMultiEraBlock
,txn_idx
, andis_catalyst_strict
, all the logic needed to constructCip36
is implemented here instead of incardano-chain-follower
Cip36
struct now containsvalidation
field.Related Pull Requests
As discuss in #125
and #123
Test
Test with
cardano-chain-follower
https://preprod.cardanoscan.io/transaction/5c7cf7bff543447fc1e46c2598380fa08b8d882de2191ef5bc80078b71724217?tab=metadata
3: e0ce4....
whiche0
= Testnet StakeKeyHashhttps://preprod.cardanoscan.io/transaction/3c9f692981e37502f17268e3d54e5a4ab19aa1b110643360f030eb88655d0f03?tab=metadata
https://preprod.cardanoscan.io/transaction/605099f26e6ce48e1678e54ccfda223745a53423d4ba954f34e768427e85f010?tab=metadata
Please confirm the following checks