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

test(rust/rbac-registration): Fix test in CIP509 #160

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

bkioshn
Copy link
Contributor

@bkioshn bkioshn commented Jan 20, 2025

Description

Since structure of CIP509 changes, payment key only reference the output transaction instead of referencing both input and output transaction, the original test failed and need to be fix.

Related Issue(s)

Closes #156

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 bkioshn added the enhancement New feature or request label Jan 20, 2025
@bkioshn bkioshn self-assigned this Jan 20, 2025
Copy link
Contributor

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

Copy link
Contributor

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

@bkioshn bkioshn merged commit d8adc38 into rbac-registration-improvements Jan 20, 2025
22 checks passed
@bkioshn bkioshn deleted the test/rbac branch January 20, 2025 12:58
@bkioshn bkioshn restored the test/rbac branch January 21, 2025 05:54
stanislav-tkach added a commit that referenced this pull request Jan 24, 2025
* Introduce Cip0134UriSet type (#119)

* Store x509 certificates (Cip509RbacMetadata::x509_certs) in the decoded format (#128)

* Store and update certificate URIs in the registration chain (#130)

* Check for presense of purpose and txn_inputs_hash fields

* Use Blake2b256Hash type

* Make Cip509 field private

* Use problem report

* More problem report usage in Cip509RbacMetadata

* Cip0134Uri::try_from(&[u8])

* Move addresses extraction to a function

* Move Cip0134Uri to the cardano-blockchain-types crate

* role data as map

* Role0 constant

* Member functions

* Cip509 constructors

* Validation

* Fix after merge

* Validation tests

* Registration chain

* Fix clippy warnings and some tests

* Test decremented_index

* decode context

* Role data conversion

* Fix clippy lints

* Update the validation tests

* Update chunks decoding tests

* Move payment history types

* Move payment history to Cip509

* Add TODO comments

* Use TxnWitness from cardano-blockchain-types

* Clippy

* Use (more) types from the 'cardano-blockchain-types' crate

* Update the registration chain tests

* Fix clippy (again)

* Fix warnings in the tests

* Use the 'cbork-utils' crate

* Remove MultiEraBlock::new_block

* Fix the 'decode_any' usage

* Split certificates into multiple files

* Fix some review comments

* Remove duplicated hash helpers

* Fix after merge

* Update the payment key logic

* Remove unused dependencies

* More error handling

* Improve role 0 signing key validation

* Error handling

* More error handling

* Fix Clippy

* Improve error handling once again

* update decode_revocation_list

* test(rust/rbac-registration): Fix test in CIP509 (#160)

* test(rbac-registration): fix test and test data

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): name txn_index

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): add more test to registration chain

Signed-off-by: bkioshn <[email protected]>

---------

Signed-off-by: bkioshn <[email protected]>

* Fix after merge

* Add the 'assert_valid' function for the test data

* test(rust/rbac-registration): RBAC None role0 key reference (#163)

* test(rbac-registration): fix test and test data

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): name txn_index

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): add more test to registration chain

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway4 block

Signed-off-by: bkioshn <[email protected]>

---------

Signed-off-by: bkioshn <[email protected]>

* Add/fix certificates/role checks

* Check the encryption key for non-0 roles

* Check for role 0 certificates for other roles

* test(rust/rbac-registration): Fix test data + undefined bug (#168)

* test(rbac-registration): fix test and test data

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): name txn_index

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): add more test to registration chain

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway4 block

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway4 block

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): consume undefined cbor

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): format

Signed-off-by: bkioshn <[email protected]>

---------

Signed-off-by: bkioshn <[email protected]>

* Remove the 'raw_aux_module' because it was moved to cardano-blockchain-types

* Use block.txn_metadata function

* Remove removed params from the documentation

* One more update for  the role data validation

* Remove unused dependency

* Ensure that there is no encryption key for the role 0

* Use the encryption key value in the message

* Use UuidV4

* Remove duplicated check

* Revert UUID changes (temporary)

* Update UUID names

* Use revision for cbork-utils

* Use revisions instead of paths for dependencies

* test(rust/rbac-registration): Fix RBAC test data (#175)

* test(rbac-registration): fix test and test data

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): name txn_index

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): add more test to registration chain

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway4 block

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway4 block

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): consume undefined cbor

Signed-off-by: bkioshn <[email protected]>

* fix(rbac-registration): format

Signed-off-by: bkioshn <[email protected]>

* test(rbac-registration): fix conway1 and 4 test data

Signed-off-by: bkioshn <[email protected]>

---------

Signed-off-by: bkioshn <[email protected]>

* Use tag for dependencies

* Update public key at 0 index error message

---------

Signed-off-by: bkioshn <[email protected]>
Co-authored-by: Steven Johnson <[email protected]>
Co-authored-by: bkioshn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants