-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat(platform)!: enhance token configuration and validation mechanisms #2439
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis pull request introduces comprehensive enhancements to the token management system in the Dash Platform codebase. The changes span multiple modules and include new error handling mechanisms, expanded authorization capabilities, and improved token configuration update processes. Key modifications include adding new error types for token-related actions, introducing identity-based authorization, and implementing more robust validation for token operations such as minting, burning, freezing, and configuration updates. Changes
Sequence DiagramsequenceDiagram
participant Owner as Token Owner
participant TokenSystem as Token Management System
participant Validator as State Transition Validator
Owner->>TokenSystem: Request Token Action
TokenSystem->>Validator: Validate Action
Validator->>Validator: Check Authorization
Validator->>Validator: Validate Constraints
alt Action Valid
Validator-->>TokenSystem: Approve Transition
TokenSystem-->>Owner: Action Confirmed
else Action Invalid
Validator-->>Owner: Reject with Specific Error
end
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs (1)
Line range hint
59-63
: Type mismatch between getter and setter methods.The
max_supply
getter returnsOption<TokenAmount>
while the correspondingset_max_supply
setter acceptsOption<u64>
. This inconsistency could lead to type conversion issues.Consider updating the setter to match the getter's type:
- fn set_max_supply(&mut self, max_supply: Option<u64>) { + fn set_max_supply(&mut self, max_supply: Option<TokenAmount>) { match self { TokenConfiguration::V0(v0) => v0.set_max_supply(max_supply), } }
🧹 Nitpick comments (21)
packages/rs-dpp/src/errors/consensus/state/token/mod.rs (1)
16-22
: Consider explicit exports instead of glob operators.While using
pub use module::*
is convenient, it can make breaking changes harder to track and might accidentally expose internal implementation details. Consider explicitly listing the exported types:-pub use invalid_group_position_error::*; +pub use invalid_group_position_error::InvalidGroupPositionError;This makes the public API more explicit and helps track breaking changes more effectively.
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs (2)
90-90
: Clarify the comment for accuracy.The comment on line 90 is misleading. It should reflect that the total supply after minting would exceed the
max_supply
, not that a max supply smaller than the current supply is being set.Apply this diff to correct the comment:
- // We are trying to set a max supply smaller than the token total supply + // Minting would exceed the maximum token supply
103-103
: Clarify the comment regarding overflow handling.On line 103, the comment can be more precise. Since
checked_add
returnedNone
, an overflow occurred, indicating that the total supply after minting exceeds the maximum representable value.Consider updating the comment:
- // if we overflow we would also always go over max supply + // Overflow occurred; total supply after minting exceeds maximum valuepackages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs (2)
171-248
: Consider refactoring to reduce code duplication in identity checks.Multiple match arms handle
AuthorizedActionTakers::Identity(identity_id)
and perform similar identity existence checks. Refactoring this repetitive code into a helper function would improve maintainability.Example refactor:
fn validate_identity_exists( platform: &PlatformStateRef, identity_id: &Identifier, block_info: &BlockInfo, execution_context: &mut StateTransitionExecutionContext, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), SimpleConsensusValidationResult> { let (identity_balance, fee) = platform.drive.fetch_identity_balance_with_costs( identity_id.to_buffer(), block_info, true, transaction, platform_version, )?; execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee)); if identity_balance.is_none() { return Err(SimpleConsensusValidationResult::new_with_error( ConsensusError::StateError( StateError::NewAuthorizedActionTakerIdentityDoesNotExistError( NewAuthorizedActionTakerIdentityDoesNotExistError::new(*identity_id), ), ), )); } Ok(()) }Replace the repeated code in the match arms with a call to this function.
249-325
: Consider refactoring to reduce code duplication in group checks.Similar to the identity checks, multiple match arms handle
AuthorizedActionTakers::Group(group_contract_position)
and perform the same group existence validation. Extracting this logic into a helper function would enhance code readability.Example refactor:
fn validate_group_exists( contract: &DataContract, group_contract_position: &GroupContractPosition, ) -> Result<(), SimpleConsensusValidationResult> { if !contract.groups().contains_key(group_contract_position) { return Err(SimpleConsensusValidationResult::new_with_error( ConsensusError::StateError( StateError::NewAuthorizedActionTakerGroupDoesNotExistError( NewAuthorizedActionTakerGroupDoesNotExistError::new(*group_contract_position), ), ), )); } Ok(()) }Call this function in the relevant match arms to avoid repetition.
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs (8)
257-258
: Add missing documentation for new imports.These new imports for
GroupV0
andGroup
should have documentation comments explaining their purpose in the context of token management.
264-264
: Add missing documentation for GroupStateTransitionInfo import.The
GroupStateTransitionInfo
import should have documentation explaining its role in group-based token operations.
10200-10204
: Add missing documentation for token configuration imports.The new imports related to token configuration should have documentation explaining their purpose:
- TokenConfigurationV0Getters
- TokenConfigurationV0Setters
- TokenConfiguration
- TokenConfigurationConventionV0
- TokenConfigurationLocalizationsV0
10208-10210
: Add missing documentation for group and batch transition imports.The imports for
GroupStateTransitionInfoStatus
andDocumentsBatchTransitionMethodsV1
should have documentation explaining their roles in token operations.
10305-10396
: Improve error handling in test_token_mint_by_owner_can_not_mint_past_max_supply.The test verifies that minting tokens beyond the max supply fails, but could be improved:
- Add assertions to verify the exact error message
- Add checks for the token's total supply before and after the failed mint
- Consider testing edge cases like minting exactly at max supply
let processing_result = platform .platform .process_raw_state_transitions( &vec![documents_batch_create_serialized_transition.clone()], &platform_state, &BlockInfo::default(), &transaction, platform_version, false, None, ) .expect("expected to process state transition"); +// Verify exact error message +let error = match &processing_result.execution_results()[0] { + StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError(StateError::TokenMintPastMaxSupplyError(err)), + _ + ) => err, + _ => panic!("Expected TokenMintPastMaxSupplyError"), +}; +assert_eq!(error.max_supply, 1000000); +assert_eq!(error.attempted_mint_amount, 2000000); +// Verify total supply hasn't changed +let total_supply = platform + .drive + .fetch_token_total_supply(token_id.to_buffer(), None, platform_version) + .expect("expected to fetch total supply"); +assert_eq!(total_supply, Some(100000));
14524-14525
: Add missing documentation for non_group test module.The non-group test module should have documentation explaining its purpose and the test scenarios it covers.
+/// Tests for token configuration updates without group authorization +/// +/// These tests verify configuration updates when: +/// - Changes are made by contract owner +/// - Changes are made by authorized identities +/// - Error cases for unauthorized changes mod non_group {
15187-15188
: Add missing documentation for with_group test module.The with_group test module should have documentation explaining its purpose and the test scenarios it covers.
+/// Tests for token configuration updates with group authorization +/// +/// These tests verify configuration updates when: +/// - Changes require group approval +/// - Multiple group members must sign +/// - Error cases for incomplete group approval mod with_group {
15309-15878
: Improve test coverage in test_token_config_update_by_owner_change_admin_to_a_non_existent_group_error.The test verifies error handling for non-existent groups but could be improved:
- Add test cases for edge cases like group ID 0 and max u32
- Add verification of error details
- Test attempting to use a deleted group
#[test] fn test_token_config_update_by_owner_change_admin_to_a_non_existent_group_error() { // Existing test code... + // Test edge case - group ID 0 when no groups exist + let config_update_transition = BatchTransition::new_token_config_update_transition( + token_id, + identity.id(), + contract.id(), + 0, + TokenConfigurationChangeItem::MaxSupplyControlGroup( + AuthorizedActionTakers::Group(0), + ), + None, + None, + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ).expect("expect to create transition"); + + // Process and verify error + let processing_result = platform.platform.process_raw_state_transitions(...); + let error = match &processing_result.execution_results()[0] { + StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError( + StateError::NewAuthorizedActionTakerGroupDoesNotExistError(err) + ), + _ + ) => err, + _ => panic!("Expected NewAuthorizedActionTakerGroupDoesNotExistError"), + }; + assert_eq!(error.group_id, 0); + + // Test max group ID + let config_update_transition = BatchTransition::new_token_config_update_transition( + // Same params but with u32::MAX group + AuthorizedActionTakers::Group(u32::MAX), + ); + // Process and verify errorpackages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_identity_does_not_exist_error.rs (1)
12-16
: Consider adding documentation for the error type.While the implementation is correct, adding documentation comments would improve maintainability by explaining when this error occurs and how to handle it.
Add documentation like this:
+/// Error returned when attempting to set an authorized action taker identity that does not exist. +/// This typically occurs during token configuration updates when the specified identity +/// has not been registered in the platform. #[derive( Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, )]packages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_group_does_not_exist_error.rs (2)
25-27
: Consider adding #[must_use] attribute.The getter method returns a value that shouldn't be ignored. Adding #[must_use] would help catch cases where the return value is accidentally discarded.
+ #[must_use] pub fn group_contract_position(&self) -> GroupContractPosition { self.group_contract_position }
1-8
: Consider creating a common error handling macro.All four error types follow a similar pattern with identical trait derivations and serialization attributes. Consider creating a custom macro to reduce boilerplate and ensure consistency:
/// Create a new error type with standard derive macros and serialization support macro_rules! define_consensus_error { ( $(#[doc = $doc:expr])* $vis:vis struct $name:ident { $( $field_vis:vis $field:ident: $ty:ty ),* } ) => { $(#[doc = $doc])* #[derive(Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize)] #[platform_serialize(unversioned)] $vis struct $name { $( $field_vis $field: $ty ),* } }; }Also applies to: 1-8, 1-8, 1-8
packages/rs-dpp/src/errors/consensus/state/token/token_setting_max_supply_to_less_than_current_supply_error.rs (1)
1-48
: LGTM! Consider adding documentation for error conditions.The implementation is well-structured with proper error handling traits and clear error messaging. The error type effectively captures all necessary information for debugging token supply issues.
Consider adding documentation comments to describe specific scenarios when this error occurs and potential remediation steps. Example:
/// Represents an error when attempting to set a token's maximum supply to a value /// less than its current supply. /// /// # Example /// This error occurs when updating token configuration with a new max supply that /// would invalidate existing tokens in circulation. pub struct TokenSettingMaxSupplyToLessThanCurrentSupplyError {packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs (1)
78-82
: Consider using a constant for the action prefix.The action prefix "action_token_burn" could be defined as a constant to ensure consistency across the codebase.
+const TOKEN_BURN_ACTION_PREFIX: &[u8] = b"action_token_burn"; impl TokenBurnTransition { pub fn calculate_action_id_with_fields( token_id: &[u8; 32], owner_id: &[u8; 32], identity_contract_nonce: IdentityNonce, burn_amount: TokenAmount, ) -> Identifier { - let mut bytes = b"action_token_burn".to_vec(); + let mut bytes = TOKEN_BURN_ACTION_PREFIX.to_vec(); bytes.extend_from_slice(token_id);packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs (1)
77-90
: Consider defining the action prefix as a constant.The implementation looks good, but the byte string
"action_token_config_update"
could be defined as a constant at the module level for better maintainability and reusability.+const TOKEN_CONFIG_UPDATE_ACTION_PREFIX: &[u8] = b"action_token_config_update"; + impl TokenConfigUpdateTransition { pub fn calculate_action_id_with_fields( token_id: &[u8; 32], owner_id: &[u8; 32], identity_contract_nonce: IdentityNonce, update_token_config_item: u8, ) -> Identifier { - let mut bytes = b"action_token_config_update".to_vec(); + let mut bytes = TOKEN_CONFIG_UPDATE_ACTION_PREFIX.to_vec(); bytes.extend_from_slice(token_id);packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs (1)
33-58
: Consider adding error context for fee calculation failures.While the implementation is correct, consider adding context to fee calculation errors to make debugging easier.
let fees = Drive::calculate_fee( None, Some(drive_operations), &block_info.epoch, self.config.epochs_per_era, platform_version, None, - )?; + ).map_err(|e| Error::from(e).context("Failed to calculate fees for token total supply fetch"))?; Ok((token_amount, fees))packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs (1)
34-34
: Consider breaking down the import line for better readability.The import line is quite long and combines multiple token-related types. Consider breaking it into multiple lines for better maintainability.
-use crate::state_transition::batch_transition::{BatchTransitionV1, TokenBurnTransition, TokenConfigUpdateTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition, TokenUnfreezeTransition}; +use crate::state_transition::batch_transition::{ + BatchTransitionV1, + TokenBurnTransition, + TokenConfigUpdateTransition, + TokenDestroyFrozenFundsTransition, + TokenEmergencyActionTransition, + TokenFreezeTransition, + TokenMintTransition, + TokenTransferTransition, + TokenUnfreezeTransition, +};
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (40)
packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs
(1 hunks)packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs
(3 hunks)packages/rs-dpp/src/errors/consensus/basic/basic_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/basic/token/mod.rs
(0 hunks)packages/rs-dpp/src/errors/consensus/codes.rs
(2 hunks)packages/rs-dpp/src/errors/consensus/state/state_error.rs
(2 hunks)packages/rs-dpp/src/errors/consensus/state/token/invalid_group_position_error.rs
(3 hunks)packages/rs-dpp/src/errors/consensus/state/token/mod.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_group_does_not_exist_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_identity_does_not_exist_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_main_group_not_set_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/new_tokens_destination_identity_does_not_exist_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/token_mint_past_max_supply_error.rs
(1 hunks)packages/rs-dpp/src/errors/consensus/state/token/token_setting_max_supply_to_less_than_current_supply_error.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs
(1 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs
(2 hunks)packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs
(3 hunks)packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/state_v0/mod.rs
(1 hunks)packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs
(3 hunks)packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs
(3 hunks)packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs
(4 hunks)packages/rs-drive/src/drive/group/fetch/mod.rs
(0 hunks)packages/rs-drive/src/drive/group/mod.rs
(1 hunks)packages/rs-drive/src/drive/tokens/mod.rs
(0 hunks)packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs
(2 hunks)packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs
(2 hunks)packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs
(2 hunks)packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs
(2 hunks)
💤 Files with no reviewable changes (3)
- packages/rs-drive/src/drive/group/fetch/mod.rs
- packages/rs-dpp/src/errors/consensus/basic/token/mod.rs
- packages/rs-drive/src/drive/tokens/mod.rs
✅ Files skipped from review due to trivial changes (8)
- packages/rs-drive/src/drive/group/mod.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs
- packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs
🧰 Additional context used
📓 Learnings (3)
packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2432
File: packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs:222-225
Timestamp: 2025-01-20T16:20:59.791Z
Learning: In the Dash Platform codebase, TokenAmount from crate::balances::credits is compatible with u64 when used for token base supply.
packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs (2)
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs:42-50
Timestamp: 2025-01-19T07:36:09.383Z
Learning: The `add_estimation_costs_for_token_balances` method in Drive is a properly implemented estimation logic method used for token balance operations, and the warning about incomplete estimation logic was incorrect.
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs:31-71
Timestamp: 2025-01-19T07:36:32.294Z
Learning: Token ID zero validation is not required in the fetch_token_total_supply_v0 method, as confirmed by the maintainer.
packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs (2)
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs:42-50
Timestamp: 2025-01-19T07:36:09.383Z
Learning: The `add_estimation_costs_for_token_balances` method in Drive is a properly implemented estimation logic method used for token balance operations, and the warning about incomplete estimation logic was incorrect.
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs:31-71
Timestamp: 2025-01-19T07:36:32.294Z
Learning: Token ID zero validation is not required in the fetch_token_total_supply_v0 method, as confirmed by the maintainer.
🔇 Additional comments (30)
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs (2)
82-82
: LGTM! Byte extension order matches parameter order.The byte extension order has been correctly updated to maintain consistency with the parameter reordering, preserving the deterministic nature of the action ID calculation.
76-76
: Verify all callers are updated for the breaking parameter reorder.The parameter reordering in
calculate_action_id_with_fields
is a breaking change. While the change appears intentional and consistent with other changes, we should ensure all callers are updated.✅ Verification successful
Parameter reordering is consistently applied across the codebase
The parameter ordering in
calculate_action_id_with_fields
is consistent across all token-related transitions and their respective callers. All implementations and calls follow the same pattern: token_id, owner_id, identity_contract_nonce, followed by the transition-specific parameter.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for all calls to calculate_action_id_with_fields to verify they've been updated ast-grep --pattern 'calculate_action_id_with_fields($$$)'Length of output: 59
Script:
#!/bin/bash # Search for method definition and calls using ripgrep echo "=== Searching for method definition ===" rg -p "fn calculate_action_id_with_fields" -A 5 echo -e "\n=== Searching for method calls ===" rg "calculate_action_id_with_fields\(" -A 2Length of output: 15865
packages/rs-dpp/src/errors/consensus/state/token/mod.rs (1)
4-10
: Well-structured error modules for token validation scenarios!The new error modules provide comprehensive coverage for various token validation scenarios including group positions, authorization checks, token destinations, and supply constraints. The naming is clear and consistent with Rust conventions.
packages/rs-dpp/src/errors/consensus/state/token/invalid_group_position_error.rs (2)
37-38
: Good addition of the getter method formax_group_position
.The new getter method
max_group_position()
properly provides access to themax_group_position
field.
48-48
: Verify the impact of changing the error variant fromBasicError
toStateError
.Changing the error conversion to use
StateError::InvalidGroupPositionError
may affect error handling elsewhere in the codebase. Ensure that all references and handlers for this error are updated accordingly.packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs (1)
76-123
: Implementing max supply validation logic correctly.The added logic appropriately checks that minting does not exceed the
max_supply
defined in the token configuration. It handles potential overflows and corrupted state scenarios effectively.packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs (4)
94-128
: Max supply update validation is correctly implemented.The logic correctly ensures that the new
max_supply
is not less than the currenttoken_total_supply
, preventing inconsistencies in token circulation.
129-148
: Proper validation of new tokens destination identity.The code correctly checks if the specified
NewTokensDestinationIdentity
exists, enhancing security by preventing tokens from being assigned to non-existent identities.
149-170
: Validating the existence of the main control group.The check ensures that the provided
MainControlGroup
exists within the data contract's groups, maintaining data integrity.
326-379
: Validating main control group presence forAuthorizedActionTakers::MainGroup
.The code correctly checks if the
main_control_group
is set before allowing it to be used as anAuthorizedActionTaker
, ensuring proper configuration.packages/rs-dpp/src/errors/consensus/state/token/new_authorized_action_taker_main_group_not_set_error.rs (1)
10-17
: LGTM! Well-structured error type with comprehensive trait implementations.The error type correctly implements all necessary traits for error handling and serialization.
packages/rs-dpp/src/errors/consensus/state/token/new_tokens_destination_identity_does_not_exist_error.rs (1)
23-25
: Consider implementing Copy for Identifier.The getter method returns a copy of the Identifier. If Identifier is small and Copy is cheap, implementing Copy would allow returning by value instead of reference.
Let's check the size and traits of Identifier:
packages/rs-dpp/src/errors/consensus/state/token/token_mint_past_max_supply_error.rs (1)
1-60
: LGTM! Consider adding overflow protection.The error type is well-implemented with proper use of TokenAmount for consistent handling of token values.
Since this error is used in minting validation, we should verify that overflow checks are implemented in the minting logic. Let's check the implementation:
✅ Verification successful
Supply validation is properly implemented with overflow protection
The implementation in
token_mint_transition_action/state_v0/mod.rs
includes both overflow checks and max supply validation:
- Checks for overflow when adding mint_amount to current_supply
- Validates that the resulting total doesn't exceed max_supply
- Provides detailed error information when limits are exceeded
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for overflow checks in minting validation rg -A 5 "fn.*mint.*validate" ast-grep --pattern 'if $amount + $current_supply > $max_supply { $$$'Length of output: 102
Script:
#!/bin/bash # Search for mint-related functions and files rg -l "mint" --type rust rg "fn.*mint" -A 10 --type rustLength of output: 89688
Script:
#!/bin/bash # Search for validation implementation in token mint action rg -A 10 "validate.*token.*mint" --type rust rg -A 10 "fn.*validate" packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_actionLength of output: 14842
Script:
#!/bin/bash # Search for supply validation in token mint state validation rg -A 20 "fn validate_state_v0" packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs # Search for supply-related checks rg -A 5 "current_supply|max_supply|total_supply" --type rustLength of output: 69241
Script:
#!/bin/bash # Search for the validation implementation in token mint state validation rg -A 20 "test_token_mint_by_owner_can_not_mint_past_max_supply" packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs # Search for supply validation in token mint action state validation rg -A 20 "validate_state" packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rsLength of output: 2978
Script:
#!/bin/bash # Search for base validation implementation and supply checks rg -A 20 "impl.*TokenTransitionActionBase" --type rust rg -A 20 "validate_state.*TokenTransitionActionBase" --type rustLength of output: 123
Script:
#!/bin/bash # Search for token mint validation and supply checks rg -A 20 "TokenMintPastMaxSupplyError" --type rust rg -A 20 "max_supply.*current_supply" --type rust rg -A 20 "fn validate" packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/mod.rsLength of output: 37008
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs (1)
68-73
: LGTM! Good refactoring of action ID calculation.The refactoring improves maintainability by centralizing the action ID calculation logic into a dedicated method.
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs (1)
71-86
: LGTM! Robust implementation with proper domain separation.The action ID calculation follows cryptographic best practices by using domain separation and consistent byte ordering.
Let's verify consistency with other action ID calculations:
✅ Verification successful
Verified: Action ID calculation is consistent with all other token actions
The implementation follows the same pattern used across all token-related transitions, with proper domain separation and consistent field ordering.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for consistent domain separation in other action ID calculations rg -A 5 'b"action_token_'Length of output: 7926
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs (1)
79-84
: LGTM! Good refactoring of action ID calculation.The implementation correctly delegates to the new helper method, improving code organization and reusability.
packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs (1)
39-65
: LGTM! Well-structured implementation of cost calculation.The method properly handles versioning and error cases, maintaining consistency with the existing implementation pattern.
packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs (3)
18-18
: LGTM! Identity-based authorization is a good addition.The new
Identity(Identifier)
variant enhances the authorization system by allowing fine-grained access control at the individual identity level.
30-30
: LGTM! Display implementation is consistent.The formatting for the Identity variant follows the established pattern and provides clear output.
56-60
: LGTM! Identity authorization check is properly implemented.The implementation correctly handles both single and multiple identity cases, maintaining consistency with existing authorization patterns.
packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs (1)
82-82
: LGTM! Version increment ensures proper change tracking.The version increment is correctly placed after cloning the contract and before applying configuration changes, maintaining data consistency.
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs (1)
171-188
: LGTM! New token config update transition method is well-defined.The method signature is comprehensive and follows the established pattern of other token transition methods, with proper feature flags and parameter types.
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/state_v0/mod.rs (1)
104-106
: LGTM! Security enhancement for group action validation.Adding
Identity(_)
to the unauthorized cases prevents potential authorization bypass by ensuring identity-based authorizations cannot perform group actions.packages/rs-dpp/src/errors/consensus/state/state_error.rs (1)
233-257
: LGTM! Well-structured error handling additions.The new error variants are properly organized within the token errors section and follow the existing pattern with appropriate transparency attributes.
packages/rs-dpp/src/errors/consensus/codes.rs (1)
250-256
: LGTM! Proper error code assignments.The new error variants are assigned sequential codes (40154-40160) within the token errors range, maintaining consistency with the existing error code structure.
packages/rs-dpp/src/errors/consensus/basic/basic_error.rs (1)
76-77
: LGTM! Clean error handling reorganization.The removal of
InvalidGroupPositionError
fromBasicError
and its relocation toStateError
improves the organization of error handling by grouping related errors together.packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs (2)
864-923
: Review the security level for token configuration updates.The implementation uses
SecurityLevel::CRITICAL
for signing token configuration updates, while other token-related transitions useSecurityLevel::HIGH
. This difference in security levels needs verification.✅ Verification successful
Security level for token configuration updates is correctly set to CRITICAL
The use of
SecurityLevel::CRITICAL
for token configuration updates is appropriate as it aligns with other sensitive system operations like contract updates and identity credit operations, while regular document operations useSecurityLevel::HIGH
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for all security level usages in token-related transitions echo "Searching for security level usage patterns..." rg -A 2 "SecurityLevel::" --type rustLength of output: 64292
866-882
: Verify feature version handling consistency.The method accepts three different feature versions (
batch_feature_version
,config_update_feature_version
,base_feature_version
) but only uses the batch version in the implementation. Ensure this aligns with the versioning strategy.✅ Verification successful
Feature version handling is correctly implemented.
The current implementation follows a deliberate design pattern where:
batch_feature_version
is used for version selection in the batch transition system- Other feature versions are intentionally unused parameters (marked with
_
) to maintain API consistency and future extensibility🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for feature version usage patterns in token transitions rg -A 5 "feature_version: Option<FeatureVersion>" --type rustLength of output: 78104
Script:
#!/bin/bash # Search for the implementation of new_token_config_update_transition ast-grep --pattern 'fn new_token_config_update_transition<$_>($_) { $$$ }'Length of output: 78
Script:
#!/bin/bash # Search for new_token_config_update_transition implementation with context rg -U "new_token_config_update_transition" -A 20 --type rustLength of output: 71791
packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs (1)
918-985
: Verify the error handling for token configuration updates.The implementation needs to handle potential errors when applying token configuration changes. Ensure that all error cases are properly handled and propagated.
✅ Verification successful
Error handling for token configuration updates is properly implemented
The implementation includes comprehensive error handling through:
- Validation of configuration updates via
validate_token_config_update
- Authorization checks through
can_apply_token_configuration_item
- Group existence validation via
validate_token_config_groups_exist
- Proper error propagation using Result types and specific error types
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for error handling patterns in token configuration updates rg "TokenConfigUpdateTransition|TokenConfigurationChangeItem" -A 10 -B 10 --type rustLength of output: 80408
Script:
#!/bin/bash # Search for validation and error handling in token configuration rg "fn validate|fn apply|fn verify" -A 5 -B 5 --type rust packages/rs-dpp/src/data_contract/associated_token/token_configuration_item/ rg "TokenConfigurationChangeItem.*Error" -A 5 -B 5 --type rustLength of output: 318
Script:
#!/bin/bash # Find token configuration related files fd "token.*configuration" --type f # Search for token configuration validation patterns rg "impl.*Token.*Configuration" -A 10 -B 10 --type rust rg "Error.*token.*config" -i -A 5 -B 5 --type rustLength of output: 70750
packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs (1)
321-321
: LGTM! Performance improvement using constant.The change from
SystemDataContract::TokenHistory.id().to_buffer()
toTOKEN_HISTORY_ID_BYTES
constant improves performance by avoiding runtime computation.
packages/rs-dpp/src/errors/consensus/state/token/invalid_group_position_error.rs
Outdated
Show resolved
Hide resolved
commit 6776651 Author: QuantumExplorer <[email protected]> Date: Sat Mar 1 22:23:41 2025 +0700 chore: update to latest dash core 37 (#2483) commit 1501103 Merge: a7c7a0f da17fc5 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 14:21:41 2025 +0700 chore: merge master and resolve conflicts (#2481) commit da17fc5 Author: pshenmic <[email protected]> Date: Thu Feb 27 13:31:51 2025 +0700 feat(js-dash-sdk): fix tests after merge commit c7e40cb Merge: c57e8b2 f9eb069 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:35:02 2025 +0700 Merge remote-tracking branch 'origin/chore/merge-master' into chore/merge-master commit c57e8b2 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:34:40 2025 +0700 test(dpp): fix assertion with the same value commit 045b6fa Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:32:33 2025 +0700 chore(dpp): remove unnecessary type conversion commit 8160ccd Author: Ivan Shumkov <[email protected]> Date: Thu Feb 27 09:31:32 2025 +0700 chore: remove duplicated commented code commit f9eb069 Merge: 05d0085 a7c7a0f Author: pshenmic <[email protected]> Date: Wed Feb 26 20:03:00 2025 +0700 Merge branch 'v2.0-dev' into chore/merge-master commit a7c7a0f Author: pshenmic <[email protected]> Date: Wed Feb 26 19:52:02 2025 +0700 build: bump rust version to 1.85 (#2480) commit 05d0085 Merge: bcf1785 196976c Author: Ivan Shumkov <[email protected]> Date: Wed Feb 26 18:03:38 2025 +0700 Merge branch 'master' into v2.0-dev commit bcf1785 Author: lklimek <[email protected]> Date: Fri Feb 21 08:43:35 2025 +0100 feat: wasm sdk build proof-of-concept (#2405) Co-authored-by: Ivan Shumkov <[email protected]> commit 5e32426 Author: Paul DeLucia <[email protected]> Date: Thu Feb 20 19:22:52 2025 +0700 fix: token already paused unpaused and frozen validation (#2466) commit 374a036 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 20 17:46:57 2025 +0700 test: fix slowdown of JS SDK unit tests (#2475) commit 1fed09b Author: Ivan Shumkov <[email protected]> Date: Thu Feb 20 13:46:36 2025 +0700 fix(dpp): invalid feature flag usage (#2477) commit 33507bb Author: Paul DeLucia <[email protected]> Date: Thu Feb 20 13:18:55 2025 +0700 fix: destroy frozen funds used wrong identity and proof verification (#2467) commit 91a9766 Author: Ivan Shumkov <[email protected]> Date: Wed Feb 19 16:57:32 2025 +0700 feat(sdk): return state transition execution error (#2454) commit cb915a7 Author: Ivan Shumkov <[email protected]> Date: Wed Feb 19 16:46:54 2025 +0700 test: fix token history contract tests (#2470) commit 04276d5 Author: Ivan Shumkov <[email protected]> Date: Tue Feb 18 21:00:05 2025 +0700 fix: xss vulnerability in mocha (#2469) commit 196976c Author: pshenmic <[email protected]> Date: Fri Feb 14 18:50:08 2025 +0700 fix(sdk)!: bigint for uint64 values (#2443) commit 0bd29a6 Author: pshenmic <[email protected]> Date: Fri Feb 14 17:29:35 2025 +0700 feat(dpp): extra methods for state transitions in wasm (#2462) commit 1eae781 Author: pshenmic <[email protected]> Date: Fri Feb 14 15:29:17 2025 +0700 chore(platform): npm audit fix (#2463) commit ddf4e67 Author: Ivan Shumkov <[email protected]> Date: Fri Feb 14 11:28:08 2025 +0700 test: fix `fetchProofForStateTransition` tests and warnings (#2460) commit d88ea46 Author: Ivan Shumkov <[email protected]> Date: Fri Feb 14 09:52:53 2025 +0700 fix(dpp): invalid imports and tests (#2459) commit 82e4d4c Merge: 125cfe7 4becf5f Author: Paul DeLucia <[email protected]> Date: Thu Feb 13 19:05:51 2025 +0700 fix: check if token is paused on token transfers (#2458) commit 4becf5f Author: pauldelucia <[email protected]> Date: Thu Feb 13 18:34:24 2025 +0700 add costs commit 907971d Merge: 9026669 125cfe7 Author: Paul DeLucia <[email protected]> Date: Thu Feb 13 18:05:06 2025 +0700 Merge branch 'v2.0-dev' into feat/token-paused-validation commit 125cfe7 Merge: 91f65c6 c286ec0 Author: Ivan Shumkov <[email protected]> Date: Thu Feb 13 15:51:46 2025 +0700 Merge branch 'v2.0-dev' into v2.0-tokens-dev commit 9026669 Author: pauldelucia <[email protected]> Date: Thu Feb 13 13:41:19 2025 +0700 feat: check if token is paused on token transfers commit c286ec0 Author: pshenmic <[email protected]> Date: Wed Feb 12 15:41:21 2025 +0700 feat(sdk): add option to request all keys (#2445) commit 91f65c6 Merge: d6b40e6 1a1c50b Author: Paul DeLucia <[email protected]> Date: Wed Feb 12 12:04:58 2025 +0700 fix: wrong order of parameters in UnauthorizedTokenActionError (#2456) commit 1a1c50b Author: pauldelucia <[email protected]> Date: Wed Feb 12 11:51:31 2025 +0700 fix: wrong order of parameters in UnauthorizedTokenActionError commit 26aff36 Author: lklimek <[email protected]> Date: Tue Feb 11 13:06:54 2025 +0100 build: bump Alpine version to 3.21 (#2074) commit 9daa195 Author: Ivan Shumkov <[email protected]> Date: Tue Feb 11 14:38:55 2025 +0700 ci: use github-hosted arm runner for release workflow (#2452) commit 2b1c252 Author: Paul DeLucia <[email protected]> Date: Tue Feb 4 16:40:34 2025 +0700 fix: proof result error for credit transfers in sdk (#2451) commit d6b40e6 Author: QuantumExplorer <[email protected]> Date: Tue Feb 4 06:49:03 2025 +0700 feat(platform): token distribution part two (#2450) commit 93f7d44 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 29 14:07:55 2025 +0700 fix(dpp): invalid feature flag instructions (#2448) commit 6d5af88 Author: QuantumExplorer <[email protected]> Date: Mon Jan 27 16:59:39 2025 +0700 feat(dpp): token distribution model (#2447) commit e735313 Author: Ivan Shumkov <[email protected]> Date: Mon Jan 27 14:24:26 2025 +0700 feat: add token transitions to SDK and DAPI (#2434) commit 0743be2 Author: pshenmic <[email protected]> Date: Sun Jan 26 22:00:40 2025 +0700 feat(dpp): extra methods for state transitions in wasm (#2401) commit f609bcf Merge: 3733f56 cbddb8d Author: Ivan Shumkov <[email protected]> Date: Fri Jan 24 18:16:38 2025 +0700 Merge branch 'v2.0-dev' into v2.0-tokens-dev commit cbddb8d Author: QuantumExplorer <[email protected]> Date: Fri Jan 24 17:59:16 2025 +0700 chore(platform): make bls sig compatibility an optional feature (#2440) Co-authored-by: Ivan Shumkov <[email protected]> commit 764684b Author: Ivan Shumkov <[email protected]> Date: Fri Jan 24 17:57:27 2025 +0700 chore: ignore deprecated `lodash.get` (#2441) commit 3733f56 Author: QuantumExplorer <[email protected]> Date: Thu Jan 23 09:16:12 2025 +0700 feat(platform)!: enhance token configuration and validation mechanisms (#2439) commit 2480ceb Author: QuantumExplorer <[email protected]> Date: Wed Jan 22 16:33:13 2025 +0700 chore: dapi grpc queries (#2437) commit c9ab154 Author: QuantumExplorer <[email protected]> Date: Wed Jan 22 15:50:25 2025 +0700 feat(platform)!: improved token validation and token config update transition (#2435) commit d9647cc Author: QuantumExplorer <[email protected]> Date: Tue Jan 21 10:28:58 2025 +0700 feat: get proofs for tokens (#2433) commit e5964b8 Author: QuantumExplorer <[email protected]> Date: Mon Jan 20 23:31:50 2025 +0700 feat: group queries (#2432) commit 0220302 Author: QuantumExplorer <[email protected]> Date: Sun Jan 19 14:43:51 2025 +0700 feat(platform): proof verification for many queries and a few more queries (#2431) commit cd1527d Author: QuantumExplorer <[email protected]> Date: Fri Jan 17 19:39:37 2025 +0700 fix(dpp)!: wrapping overflow issue (#2430) commit fd7ee85 Merge: d7143cc e4e156c Author: Ivan Shumkov <[email protected]> Date: Thu Jan 16 21:45:47 2025 +0700 Merge branch 'master' into v1.9-dev commit e4e156c Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 18:11:57 2025 +0700 chore(release): update change log and release v1.8.0 (#2427) Co-authored-by: Ivan Shumkov <[email protected]> commit 55a1e03 Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 15:30:42 2025 +0700 feat(platform)!: token base support (#2383) commit 59bf0af Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 13:10:39 2025 +0700 chore(release): bump to v1.8.0-rc.2 (#2426) commit 410eb09 Author: QuantumExplorer <[email protected]> Date: Thu Jan 16 06:31:26 2025 +0700 fix(drive-abci): rebroadcasting should not only take first 2 quorums too (#2425) commit 2abce8e Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 22:51:58 2025 +0700 chore(release): update changelog and bump version to 1.8.0-rc.1 (#2423) commit ad5f604 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 22:14:13 2025 +0700 chore: update bls library (#2424) commit c6feb5b Author: QuantumExplorer <[email protected]> Date: Wed Jan 15 18:57:49 2025 +0700 feat(platform)!: distribute prefunded specialized balances after vote (#2422) Co-authored-by: Ivan Shumkov <[email protected]> commit 94dcbb2 Author: Ivan Shumkov <[email protected]> Date: Wed Jan 15 05:51:45 2025 +0700 chore(drive): increase withdrawal limits to 2000 Dash per day (#2287) commit 6a0aede Author: Ivan Shumkov <[email protected]> Date: Tue Jan 14 21:42:59 2025 +0700 chore: fix test suite configuration script (#2402) commit e94b7bb Author: QuantumExplorer <[email protected]> Date: Tue Jan 14 19:23:46 2025 +0700 fix(drive-abci): document purchase on mutable document from different epoch had issue (#2420) commit 4ee57a6 Author: Ivan Shumkov <[email protected]> Date: Tue Jan 14 19:12:20 2025 +0700 fix(drive): more than one key was returned when expecting only one result (#2421) commit be5cd6d Author: Ivan Shumkov <[email protected]> Date: Mon Jan 13 15:12:33 2025 +0700 fix(sdk): failed to deserialize consensus error (#2410) commit e07271e Author: Ivan Shumkov <[email protected]> Date: Mon Jan 13 14:57:08 2025 +0700 chore: resolve NPM audit warnings (#2417) commit a809df7 Author: QuantumExplorer <[email protected]> Date: Sun Jan 12 09:21:48 2025 +0700 test: unify identity versioned cost coverage (#2416) commit 6d637fe Author: Paul DeLucia <[email protected]> Date: Fri Dec 27 09:42:04 2024 -0500 fix: try DriveDocumentQuery from DocumentQuery start field (#2407) commit cfd9c4d Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 18:30:06 2024 +0700 chore(release): update changelog and bump version to 1.8.0-dev.2 (#2404) commit fecda31 Merge: 37d5732 fc7d994 Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 15:33:45 2024 +0700 Merge branch 'master' into v1.8-dev commit fc7d994 Author: Ivan Shumkov <[email protected]> Date: Thu Dec 19 14:40:44 2024 +0700 chore(release): update changelog and bump version to 1.7.1 (#2403) commit adcd3b8 Author: QuantumExplorer <[email protected]> Date: Thu Dec 19 09:54:07 2024 +0300 fix!: emergency hard fork to fix masternode voting (#2397) commit 37d5732 Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 22:24:37 2024 +0700 fix(dashmate): some group commands fail with mtime not found (#2400) commit 01a5b7a Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 20:44:44 2024 +0700 refactor(dpp): using deprecated param to init wasm module (#2399) commit c5f5878 Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 18:04:14 2024 +0700 fix(dashmate): local network starting issues (#2394) commit 71c41ff Author: Ivan Shumkov <[email protected]> Date: Wed Dec 18 18:03:55 2024 +0700 perf(dpp): reduce JS binding size by 3x (#2396) commit 21ec393 Author: lklimek <[email protected]> Date: Wed Dec 18 10:47:58 2024 +0100 build!: update rust to 1.83 - backport #2393 to v1.7 (#2398) commit d7143cc Author: lklimek <[email protected]> Date: Wed Dec 18 08:53:53 2024 +0100 build!: optimize for x86-64-v3 cpu microarchitecture (Haswell+) (#2374) commit d318b1c Author: lklimek <[email protected]> Date: Tue Dec 17 14:56:15 2024 +0100 build: bump wasm-bindgen to 0.2.99 (#2395) commit 889d192 Author: Ivan Shumkov <[email protected]> Date: Tue Dec 17 19:25:58 2024 +0700 chore(release): update changelog and bump version to 1.8.0-dev.1 (#2391) commit 8185d21 Author: lklimek <[email protected]> Date: Tue Dec 17 10:47:53 2024 +0100 feat(sdk)!: allow setting CA cert (#1924) commit 82a6217 Author: lklimek <[email protected]> Date: Tue Dec 17 02:51:18 2024 +0100 build!: update rust to 1.83 (#2393) commit 494054a Author: QuantumExplorer <[email protected]> Date: Mon Dec 16 13:47:58 2024 +0300 refactor(platform): replace bls library (#2257) Co-authored-by: Lukasz Klimek <[email protected]> commit 4c203e4 Author: lklimek <[email protected]> Date: Mon Dec 16 10:38:34 2024 +0100 test(sdk): generate test vectors using testnet (#2381) commit 0ff6b27 Author: lklimek <[email protected]> Date: Mon Dec 16 10:37:35 2024 +0100 chore: remove deprecated check_network_version.sh (#2084) commit b265bb8 Author: lklimek <[email protected]> Date: Fri Dec 13 13:25:40 2024 +0100 ci: fix artifact upload issue on release build (#2389) commit 40ae73f Author: Ivan Shumkov <[email protected]> Date: Fri Dec 13 17:35:40 2024 +0700 chore(release): update changelog and bump version to 1.7.0 (#2387) commit 257e3da Author: Ivan Shumkov <[email protected]> Date: Fri Dec 13 15:44:10 2024 +0700 chore(dashmate)!: update Core to version 22 (#2384) commit 19a4c6d Author: Ivan Shumkov <[email protected]> Date: Thu Dec 12 18:30:14 2024 +0700 chore(dashmate): set tenderdash version to 1 (#2385) commit 0e9d4dc Author: lklimek <[email protected]> Date: Thu Dec 12 11:39:35 2024 +0100 chore: address vulnerabilty GHSA-mwcw-c2x4-8c55 (#2382) Co-authored-by: Ivan Shumkov <[email protected]> commit bdae90c Author: Ivan Shumkov <[email protected]> Date: Thu Dec 12 13:36:04 2024 +0700 chore(dashmate): increase subsidy for devnet (#2353)
Summary by CodeRabbit
Based on the comprehensive summary of changes, here are the release notes:
New Features
Improvements
Error Handling
Checklist:
For repository code-owners and collaborators only