Skip to content

Commit

Permalink
feat(rust/rbac-registration): refactoring (#127)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jan 24, 2025
1 parent aabb994 commit ffe23e3
Show file tree
Hide file tree
Showing 42 changed files with 2,800 additions and 2,661 deletions.
7 changes: 4 additions & 3 deletions rust/rbac-registration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ brotli = "7.0.0"
zstd = "0.13.2"
x509-cert = "0.2.5"
der-parser = "9.0.0"
dashmap = "6.1.0"
blake2b_simd = "1.0.2"
tracing = "0.1.40"
ed25519-dalek = "2.1.1"
uuid = "1.11.0"

c509-certificate = { version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git" , tag = "v0.0.3" }
c509-certificate = { version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.3" }
pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
cbork-utils = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250124-00" }
cardano-blockchain-types = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250124-00" }
catalyst-types = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250124-00" }
Loading

0 comments on commit ffe23e3

Please sign in to comment.