Open QuantumExplorer opened 1 week ago
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The pull request introduces a series of updates across multiple files, primarily focusing on enhancing the handling of BLS signatures and improving error management within the Dash Platform's codebase. Key changes include updates to dependency versions in Cargo.toml
, modifications to the NativeBlsModule
for public key and signature handling, and enhancements to various validator and quorum structures to utilize a specific BLS implementation. Additionally, several methods and structures have been adapted to improve type safety, particularly regarding private key representations and error handling mechanisms.
File Path | Change Summary |
---|---|
packages/rs-dpp/Cargo.toml | Updated dashcore dependency from 0.32.0 to 0.33.3 , added serde feature, modified chrono and bincode dependencies, updated once_cell , and specified dev-dependencies . |
packages/rs-dpp/src/bls/native_bls.rs | Significant updates to public key validation, signature verification, private key handling, and signing methods, enhancing cryptographic operation specificity. |
packages/rs-dpp/src/core_types/validator/mod.rs | Updated BlsPublicKey type to BlsPublicKey<Bls12381G2Impl> in ValidatorV0Getters and ValidatorV0Setters methods. |
packages/rs-dpp/src/core_types/validator/v0/mod.rs | Changed public_key field type to BlsPublicKey<Bls12381G2Impl> , updated encoding and decoding methods for public keys. |
packages/rs-dpp/src/core_types/validator_set/mod.rs | Updated threshold_public_key type to BlsPublicKey<Bls12381G2Impl> in ValidatorSetV0Getters and ValidatorSetV0Setters . |
packages/rs-dpp/src/core_types/validator_set/v0/mod.rs | Modified threshold_public_key field type to BlsPublicKey<Bls12381G2Impl> , updated encoding and decoding methods. |
packages/rs-dpp/src/errors/protocol_error.rs | Added BlsError variant to ProtocolError enum for improved error handling related to BLS signatures. |
packages/rs-dpp/src/identity/identity_public_key/key_type.rs | Updated methods for handling BLS keys, changing return types to fixed-size arrays and enhancing error management. |
packages/rs-dpp/src/identity/identity_public_key/methods/hash/mod.rs | Introduced address method to IdentityPublicKeyHashMethodsV0 , updated validate_private_key_bytes method to use fixed-size arrays. |
packages/rs-dpp/src/identity/identity_public_key/methods/hash/v0/mod.rs | Added address method to trait, modified validate_private_key_bytes method to use fixed-size arrays. |
packages/rs-dpp/src/identity/identity_public_key/random.rs | Updated return types in multiple methods to fixed-size arrays for private keys. |
packages/rs-dpp/src/identity/identity_public_key/v0/methods/mod.rs | Added address method, modified validate_private_key_bytes method to use fixed-size arrays. |
packages/rs-dpp/src/identity/identity_public_key/v0/random.rs | Changed return types in various methods to fixed-size arrays for private keys. |
packages/rs-dpp/src/identity/random.rs | Updated return types in methods to fixed-size arrays for private keys. |
packages/rs-dpp/src/identity/v0/random.rs | Updated return types in methods to fixed-size arrays for private keys. |
packages/rs-dpp/src/lib.rs | Modified public exports to include bls_signatures , changing from dashcore::bls_signatures to dashcore::blsful . |
packages/rs-drive-abci/Cargo.toml | Updated dashcore-rpc dependency from v0.15.8 to v0.15.12 . |
packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs | Enhanced handling for operator identity updates, refined identity key management. |
packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_quorum_info/v0/mod.rs | Updated error handling for BlsPublicKey conversion. |
packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/mod.rs | Changed parameter type for quorums to BTreeMap<QuorumHash, BlsPublicKey<Bls12381G2Impl>> . |
packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/v0/mod.rs | Updated parameter and return types to BlsPublicKey<Bls12381G2Impl> . |
packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs | Replaced G2Element with Signature type for signature verification. |
packages/rs-drive-abci/src/execution/platform_events/core_instant_send_lock/verify_recent_signature_locally/v0/mod.rs | Changed signature creation to use Signature<Bls12381G2Impl> . |
packages/rs-drive-abci/src/execution/validation/state_transition/common/asset_lock/transaction/fetch_asset_lock_transaction_output_sync/v0/mod.rs | Updated hash type handling in asset lock transaction processing. |
packages/rs-drive-abci/src/mimic/mod.rs | Updated block signing logic to use SignatureSchemes::Basic . |
packages/rs-drive-abci/src/mimic/test_quorum.rs | Updated ValidatorInQuorum and TestQuorumInfo to use Bls12381G2Impl . |
packages/rs-drive-abci/src/platform_types/commit/mod.rs | Changed public_key parameter type in verify_signature method to BlsPublicKey<Bls12381G2Impl> . |
packages/rs-drive-abci/src/platform_types/commit/v0/mod.rs | Updated verify_signature method to use Bls12381G2Impl . |
packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs | Restricted visibility of PlatformStateForSavingV0 struct and updated field types. |
packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs | Introduced new module for managing validator sets. |
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/mod.rs | Added V1 variant to SignatureVerificationQuorumSetForSaving enum. |
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs | Updated public_key field type in QuorumForSavingV0 to bls_signatures::PublicKey . |
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs | Introduced SignatureVerificationQuorumSetForSavingV1 struct with conversion implementations. |
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/mod.rs | Added new module for_saving_v1 . |
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/quorums.rs | Updated public_key field type in VerificationQuorum and modified signing logic. |
packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs | Updated public_key parameter type in NewValidatorIfMasternodeInState trait. |
packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs | Updated error handling logic for threshold_public_key comparisons. |
packages/rs-drive-abci/src/query/document_query/v0/mod.rs | Introduced logging statement in query_documents_v0 method. |
packages/rs-drive-abci/src/query/system/current_quorums_info/v0/mod.rs | Modified how threshold_public_key is constructed from the validator_set . |
packages/rs-drive-abci/tests/strategy_tests/execution.rs | Updated private key handling and signature generation processes. |
packages/rs-drive-abci/tests/strategy_tests/main.rs | Changed import from PrivateKey to SecretKey . |
packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs | Updated private key generation process to use BlsPrivateKey . |
packages/rs-drive-abci/tests/strategy_tests/masternodes.rs | Modified private key generation and import statements. |
packages/rs-drive-abci/tests/strategy_tests/query.rs | Updated ProofVerification struct to use BlsPublicKey<Bls12381G2Impl> . |
packages/rs-drive-proof-verifier/src/unproved.rs | Enhanced error handling in maybe_from_unproved_with_metadata methods. |
packages/rs-drive-proof-verifier/src/verify.rs | Updated public key construction and signature handling processes. |
packages/rs-drive/src/query/mod.rs | Introduced new modules for voting and polling queries. |
packages/rs-drive/tests/query_tests.rs | Added new test cases for various query scenarios. |
packages/rs-drive/tests/supporting_files/contract/withdrawals/withdrawals.json | New JSON schema for withdrawal documents added. |
packages/rs-sdk/Cargo.toml | Updated dashcore-rpc dependency version. |
packages/rs-sdk/src/core/dash_core_client.rs | Added new error codes and enhanced RPC method error handling. |
packages/rs-sdk/src/core/transaction.rs | Removed debug logging from wait_for_asset_lock_proof_for_transaction method. |
packages/rs-sdk/src/lib.rs | Added public export for dapi_grpc module. |
packages/simple-signer/Cargo.toml | Updated dashcore-rpc dependency version. |
packages/simple-signer/src/signer.rs | Changed private key fields to fixed-size arrays and updated signing logic. |
Cargo.toml
file and dependency management are related to the new RPC method getCurrentQuorumsInfo
, which also involves handling quorum data, indicating a connection in terms of functionality and dependency management.Cargo.toml
file and the handling of BLS signatures are relevant to this PR, which moves the import of BLS signatures to the Rust Dash Core, reflecting a shift in how these dependencies are managed across the project.🐰 In the code where rabbits hop,
Changes made, we’ll never stop.
BLS signatures, now so bright,
With error handling, all feels right.
Dependencies updated, oh what a sight!
Hopping forward, coding through the night! 🌙
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
New Features
BlsError
variant for enhanced error handling related to BLS signatures.Improvements
Bug Fixes
Documentation