feat(sdk): implement document transfers in WASM DPP #4941
tests.yml
on: pull_request
Build JS packages
/
Build JS
4m 5s
Matrix: Build Docker images
Determine changed packages
15s
Rust crates security audit
1m 14s
JS dependency versions check
11s
JS NPM security audit
11s
JS code security audit
/
Run Code QL
2m 11s
Packages functional tests
/
Run functional tests
3m 57s
Matrix: Test Suite
Matrix: Dashmate E2E tests
Matrix: JS packages
Matrix: Rust packages
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 (@dashevo/wasm-dpp) / Linting:
packages/wasm-dpp/test/integration/identity/IdentityFacade.spec.js#L69
Unexpected console statement
|
|
|
|
|
|
|
|
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L8
Missing JSDoc @Property "network" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L38
Missing JSDoc @param "options" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L39
Missing JSDoc @param "createHistoricalSyncStream" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L40
Missing JSDoc @param "createContinuousSyncStream" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L63
Missing JSDoc @param "blockHeadersReader" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L71
Missing JSDoc @param "spvChain" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L107
Missing JSDoc @param "headers" description
|
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L108
Missing JSDoc @param "firstHeaderHeight" description
|
JS packages (@dashevo/dapi-client) / Linting:
packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js#L108
Missing JSDoc @param "firstHeaderHeight" type
|
|
|
|
|
JS packages (@dashevo/wallet-lib) / Linting:
packages/wallet-lib/src/test/mocks/dashcore/block.js#L33
Unexpected console statement
|
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
Dependency cycle via ./Platform:10
|
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
Dependency cycle detected
|
JS packages (dash) / Linting:
packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts#L8
Using exported name 'createAssetLockTransaction' as identifier for default export
|
JS packages (dash) / Linting:
packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts#L10
Dependency cycle detected
|
JS packages (dash) / Linting:
packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts#L11
Dependency cycle detected
|
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 |
|