Skip to content

feat(sdk): implement document transfers in WASM DPP #4941

feat(sdk): implement document transfers in WASM DPP

feat(sdk): implement document transfers in WASM DPP #4941

Triggered via pull request December 24, 2024 20:38
Status Failure
Total duration 13m 37s
Artifacts 4

tests.yml

on: pull_request
Build JS packages  /  Build JS
4m 5s
Build JS packages / Build JS
Matrix: Build Docker images
Determine changed packages
15s
Determine changed packages
Rust crates security audit
1m 14s
Rust crates security audit
JS dependency versions check
11s
JS dependency versions check
JS NPM security audit
11s
JS NPM security audit
JS code security audit  /  Run Code QL
2m 11s
JS code security audit / Run Code QL
Packages functional tests  /  Run functional tests
3m 57s
Packages functional tests / Run functional tests
Matrix: Test Suite
Matrix: Dashmate E2E tests
Matrix: JS packages
Matrix: Rust packages
Fit to window
Zoom out
Zoom in

Annotations

3 errors, 57 warnings, and 9 notices
JS NPM security audit
Process completed with exit code 1.
Rust packages (wasm-dpp) / Formatting
Process completed with exit code 1.
Build JS packages / Build JS
Unable to download artifact(s): Artifact not found for name: js-build-fd88e1d96d62e6c4f5b4b291aee5017dcfbe08a9 Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
Rust crates security audit
2 warnings found!
Rust crates security audit
Unknown warning kind unsound found, please, file a bug
elided lifetime has a name: packages/rs-platform-value/src/inner_value.rs#L364
warning: elided lifetime has a name --> packages/rs-platform-value/src/inner_value.rs:364:66 | 364 | pub fn get_array_slice<'a>(&'a self, key: &'a str) -> Result<&[Value], Error> { | -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default
unused import: `UserFeeIncrease`: packages/wasm-dpp/src/document/extended_document.rs#L5
warning: unused import: `UserFeeIncrease` --> packages/wasm-dpp/src/document/extended_document.rs:5:74 | 5 | use dpp::prelude::{Identifier, IdentityNonce, Revision, TimestampMillis, UserFeeIncrease}; | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
bound is defined in more than one place: packages/wasm-dpp/src/utils.rs#L25
warning: bound is defined in more than one place --> packages/wasm-dpp/src/utils.rs:25:24 | 25 | fn with_serde_into<D: DeserializeOwned>(&self) -> Result<D, JsValue> | ^ 26 | where 27 | D: for<'de> serde::de::Deserialize<'de> + 'static; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
methods `with_serde_to_platform_value_map` and `with_serde_into` are never used: packages/wasm-dpp/src/utils.rs#L24
warning: methods `with_serde_to_platform_value_map` and `with_serde_into` are never used --> packages/wasm-dpp/src/utils.rs:24:8 | 19 | pub trait ToSerdeJSONExt { | -------------- methods in this trait ... 24 | fn with_serde_to_platform_value_map(&self) -> Result<BTreeMap<String, Value>, JsValue>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 25 | fn with_serde_into<D: DeserializeOwned>(&self) -> Result<D, JsValue> | ^^^^^^^^^^^^^^^
methods `into_inner` and `inner_mut` are never used: packages/wasm-dpp/src/utils.rs#L287
warning: methods `into_inner` and `inner_mut` are never used --> packages/wasm-dpp/src/utils.rs:287:8 | 284 | pub(crate) trait Inner { | ----- methods in this trait ... 287 | fn into_inner(self) -> Self::InnerItem; | ^^^^^^^^^^ 288 | fn inner(&self) -> &Self::InnerItem; 289 | fn inner_mut(&mut self) -> &mut Self::InnerItem; | ^^^^^^^^^
unused variable: `js_class`: packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_transfer_transition.rs#L22
warning: unused variable: `js_class` --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_transfer_transition.rs:22:16 | 22 | #[wasm_bindgen(js_class=DocumentTransferTransition)] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_js_class` | = note: `#[warn(unused_variables)]` on by default
field `0` is never read: packages/wasm-dpp/src/identity/identity_facade.rs#L274
warning: field `0` is never read --> packages/wasm-dpp/src/identity/identity_facade.rs:274:34 | 274 | pub struct NonConsensusErrorWasm(NonConsensusError); | --------------------- ^^^^^^^^^^^^^^^^^ | | | field in this struct | = help: consider removing this field = note: `#[warn(dead_code)]` on by default
trait `AssetLockProofLike` is never used: packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs#L48
warning: trait `AssetLockProofLike` is never used --> packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs:48:11 | 48 | pub trait AssetLockProofLike { | ^^^^^^^^^^^^^^^^^^
field `identity_id` is never read: packages/wasm-dpp/src/identity/state_transition/identity_create_transition/to_object.rs#L21
warning: field `identity_id` is never read --> packages/wasm-dpp/src/identity/state_transition/identity_create_transition/to_object.rs:21:9 | 19 | pub struct ToObject { | -------- field in this struct 20 | pub transition_type: u8, 21 | pub identity_id: Identifier, | ^^^^^^^^^^^
field `vote` is never read: packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/to_object.rs#L21
warning: field `vote` is never read --> packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/to_object.rs:21:9 | 18 | pub struct ToObject { | -------- field in this struct ... 21 | pub vote: Vote, | ^^^^
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Client.ts#L10
Dependency cycle via ./Platform:1
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Client.ts#L166
Assignment to function parameter 'options'
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Platform/Fetcher/Fetcher.ts#L143
Returning an awaited value that is not a promise is not allowed
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Platform/Platform.spec.ts#L5
Using exported name 'Client' as identifier for default export
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts#L5
Using exported name 'Client' as identifier for default export
JS packages (dash) / Linting: packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts#L8
Using exported name 'createAssetLockTransaction' as identifier for default export
elided lifetime has a name: packages/rs-platform-value/src/inner_value.rs#L364
warning: elided lifetime has a name --> packages/rs-platform-value/src/inner_value.rs:364:66 | 364 | pub fn get_array_slice<'a>(&'a self, key: &'a str) -> Result<&[Value], Error> { | -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default
unused import: `platform_value::Identifier`: packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs#L11
warning: unused import: `platform_value::Identifier` --> packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs:11:5 | 11 | use platform_value::Identifier; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `crate::state_transition::GetDataContractSecurityLevelRequirementFn`: packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs#L15
warning: unused import: `crate::state_transition::GetDataContractSecurityLevelRequirementFn` --> packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs:15:5 | 15 | use crate::state_transition::GetDataContractSecurityLevelRequirementFn; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
this `else { if .. }` block can be collapsed: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs#L268
warning: this `else { if .. }` block can be collapsed --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:268:24 | 268 | } else { | ________________________^ 269 | | if let Some((_, found_old_key)) = identity_to_enable_old_keys 270 | | .iter() 271 | | .find(|(_, key)| key.purpose() == Purpose::TRANSFER) ... | 282 | | } 283 | | }; | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 268 ~ } else if let Some((_, found_old_key)) = identity_to_enable_old_keys 269 + .iter() 270 + .find(|(_, key)| key.purpose() == Purpose::TRANSFER) 271 + { 272 + Some(found_old_key.data().to_vec().try_into().map_err(|_| { 273 + Error::Execution(ExecutionError::CorruptedDriveResponse( 274 + "old payout address should be 20 bytes".to_string(), 275 + )) 276 + })?) 277 + } else { 278 + // finally we just use the old masternode payout address 279 + // we need to use the old pub_key_operator 280 + old_masternode.state.operator_payout_address 281 ~ }; |
the `Err`-variant returned from this function is very large: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs#L44
warning: the `Err`-variant returned from this function is very large --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:44:10 | 44 | ) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: packages/rs-drive-abci/src/error/mod.rs:28:5 | 28 | Abci(#[from] AbciError), | ----------------------- the largest variant contains at least 208 bytes | = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
taken reference of right operand: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs#L323
warning: taken reference of right operand --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:323:42 | 323 | .find(|(_, key)| key.data().as_slice() == &new_payout_address) | ^^^^^^^^^^^^^^^^^^^^^^^^^------------------- | | | help: use the right value directly: `new_payout_address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref = note: `#[warn(clippy::op_ref)]` on by default
taken reference of right operand: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs#L347
warning: taken reference of right operand --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:347:42 | 347 | .find(|(_, key)| key.data().as_slice() == &new_platform_node_id) | ^^^^^^^^^^^^^^^^^^^^^^^^^--------------------- | | | help: use the right value directly: `new_platform_node_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
unexpected `cfg` condition name: `tokio_unstable`: packages/rs-drive-abci/src/utils/spawn.rs#L13
warning: unexpected `cfg` condition name: `tokio_unstable` --> packages/rs-drive-abci/src/utils/spawn.rs:13:15 | 13 | #[cfg(all(tokio_unstable, feature = "console"))] | ^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
unexpected `cfg` condition name: `tokio_unstable`: packages/rs-drive-abci/src/utils/spawn.rs#L20
warning: unexpected `cfg` condition name: `tokio_unstable` --> packages/rs-drive-abci/src/utils/spawn.rs:20:19 | 20 | #[cfg(not(all(tokio_unstable, feature = "console")))] | ^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
type `platform_types::platform_state::v0::old_structures::OldStructureValidatorSetV0` is more private than the item `platform_types::platform_state::v0::old_structures::OldStructureValidatorSet::V0::0`: packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs#L9
warning: type `platform_types::platform_state::v0::old_structures::OldStructureValidatorSetV0` is more private than the item `platform_types::platform_state::v0::old_structures::OldStructureValidatorSet::V0::0` --> packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs:9:8 | 9 | V0(OldStructureValidatorSetV0), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ field `platform_types::platform_state::v0::old_structures::OldStructureValidatorSet::V0::0` is reachable at visibility `pub` | note: but type `platform_types::platform_state::v0::old_structures::OldStructureValidatorSetV0` is only usable at visibility `pub(v0)` --> packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs:25:1 | 25 | pub(super) struct OldStructureValidatorSetV0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(private_interfaces)]` on by default
JS code security audit / Run Code QL
CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/
sccache stats
100% - 288 hits, 0 misses, 0 errors
sccache stats
100% - 60 hits, 0 misses, 0 errors
sccache stats
100% - 60 hits, 0 misses, 0 errors
sccache stats
100% - 203 hits, 0 misses, 0 errors
sccache stats
100% - 204 hits, 0 misses, 0 errors
sccache stats
99% - 1024 hits, 6 misses, 0 errors
sccache stats
100% - 204 hits, 0 misses, 0 errors
sccache stats
100% - 895 hits, 0 misses, 0 errors
sccache stats
100% - 850 hits, 1 misses, 0 errors

Artifacts

Produced during runtime
Name Size
dashpay~platform~0BAEWV.dockerbuild
85.3 KB
dashpay~platform~PUZAFI.dockerbuild
70.3 KB
dashpay~platform~TR0ARV.dockerbuild
76 KB
js-build-fd88e1d96d62e6c4f5b4b291aee5017dcfbe08a9 Expired
17.5 MB