Skip to content

Conversation

@bkioshn
Copy link
Contributor

@bkioshn bkioshn commented Jan 6, 2025

Description

  • Implement new error report using catalyst-types - ProblemReport
  • Decode error is now early return since decoding will not be able to process.
  • The error report is now pass through decode context.
  • Change the structure of CIP36 constructor to return Result<Cip36, Cip36Error> where Cip36Error contains error from decode and ProblemReport
  • Remove CIP36Validation struct
  • Add more fields to CIP36

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

bkioshn and others added 22 commits January 2, 2025 18:25
@bkioshn bkioshn marked this pull request as draft January 6, 2025 10:14
@bkioshn bkioshn self-assigned this Jan 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@bkioshn bkioshn changed the title fix(rust/cardano-blockchain-types): implement new error report. fix(rust/cardano-blockchain-types): implement new error report for CIP36 Jan 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Test Report | ${\color{lightgreen}Pass: 279/279}$ | ${\color{red}Fail: 0/279}$ |

Copy link
Collaborator

@stevenj stevenj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevenj stevenj merged commit 1b2b089 into fix/cardano-bc-types-base-change Jan 9, 2025
21 checks passed
@stevenj stevenj deleted the fix/cip36 branch January 9, 2025 08:21
apskhem pushed a commit that referenced this pull request Jan 9, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review me PR is ready for review

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants