feat(wasm-dpp): add extra methods for state transitions #4947
tests.yml
on: pull_request
Build JS packages
/
Build JS
1m 52s
Matrix: Build Docker images
Determine changed packages
19s
Rust crates security audit
1m 0s
JS dependency versions check
8s
JS NPM security audit
12s
JS code security audit
/
Run Code QL
Packages functional tests
/
Run functional tests
Matrix: Test Suite
Waiting for pending jobs
Matrix: Dashmate E2E tests
Waiting for pending jobs
Matrix: JS packages
Waiting for pending jobs
Matrix: Rust packages
Annotations
15 errors, 51 warnings, and 20 notices
JS NPM security audit
Process completed with exit code 1.
|
Build JS packages / Build JS
Unable to download artifact(s): Artifact not found for name: js-build-3620a78e4ef5107c1a92a42553cb8d219dac51cf
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
|
Build JS packages / Build JS
Process completed with exit code 1.
|
Build Docker images (DAPI, dapi, dapi) / Build DAPI image
buildx failed with: ERROR: failed to solve: process "/bin/sh -c source /root/env && cp -R /tmp/unplugged /platform/.yarn/ && yarn install --inline-builds && cp -R /platform/.yarn/unplugged /tmp/ && export SKIP_GRPC_PROTO_BUILD=1 && yarn build && if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi && rm -rf target packages/rs-*" did not complete successfully: exit code: 1
|
Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
buildx failed with: ERROR: failed to solve: process "/bin/sh -c source /root/env && cp -R /tmp/unplugged /platform/.yarn/ && yarn install --inline-builds && cp -R /platform/.yarn/unplugged /tmp/ && export SKIP_GRPC_PROTO_BUILD=1 && yarn build && if [[ -x /usr/bin/sccache ]]; then sccache --show-stats; fi && rm -rf target packages/rs-*" did not complete successfully: exit code: 1
|
Rust packages (wasm-dpp) / Formatting
Process completed with exit code 1.
|
duplicate definitions with name `get_revision`:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L91
error[E0592]: duplicate definitions with name `get_revision`
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:91:5
|
83 | pub fn get_revision(&self) -> JsValue {
| ------------------------------------- other definition for `get_revision`
...
91 | pub fn get_revision(&self) -> Vec<u8> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `get_revision`
|
no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentReplaceTransition` in the current scope:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L94
error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentReplaceTransition` in the current scope
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:94:95
|
94 | DocumentTransition::Replace(document_transition) => Vec::from(document_transition.entropy()),
| ^^^^^^^ method not found in `DocumentReplaceTransition`
|
no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentDeleteTransition` in the current scope:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L95
error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentDeleteTransition` in the current scope
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:95:94
|
95 | DocumentTransition::Delete(document_transition) => Vec::from(document_transition.entropy()),
| ^^^^^^^ method not found in `DocumentDeleteTransition`
|
no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition` in the current scope:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L96
error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition` in the current scope
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:96:96
|
96 | DocumentTransition::Transfer(document_transition) => Vec::from(document_transition.entropy()),
| ^^^^^^^ method not found in `DocumentTransferTransition`
|
no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition` in the current scope:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L97
error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition` in the current scope
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:97:99
|
97 | DocumentTransition::UpdatePrice(document_transition) => Vec::from(document_transition.entropy()),
| ^^^^^^^ method not found in `DocumentUpdatePriceTransition`
|
no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition` in the current scope:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L98
error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition` in the current scope
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:98:96
|
98 | DocumentTransition::Purchase(document_transition) => Vec::from(document_transition.entropy()),
| ^^^^^^^ method not found in `DocumentPurchaseTransition`
|
mismatched types:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L35
error[E0308]: mismatched types
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:35:1
|
35 | #[wasm_bindgen(js_class=DocumentTransition)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `Vec<u8>`, found `JsValue`
| arguments to this function are incorrect
|
= note: expected struct `std::vec::Vec<u8>`
found struct `wasm_bindgen::JsValue`
help: the return type of this call is `wasm_bindgen::JsValue` due to the type of the argument passed
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:35:1
|
35 | #[wasm_bindgen(js_class=DocumentTransition)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this argument influences the return type of `wasm_bindgen`
note: method defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.99/src/convert/traits.rs:243:8
|
243 | fn return_abi(self) -> Self::Abi;
| ^^^^^^^^^^
= note: this error originates in the attribute macro `wasm_bindgen::prelude::__wasm_bindgen_class_marker` (in Nightly builds, run with -Z macro-backtrace for more info)
|
Rust packages (wasm-dpp) / Linting
Clippy has exited with exit code 101
|
Rust packages (wasm-dpp) / Tests
Process completed with exit code 101.
|
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
|
the following explicit lifetimes could be elided: 'a:
packages/rs-dpp/src/data_contract/document_type/accessors/mod.rs#L153
warning: the following explicit lifetimes could be elided: 'a
--> packages/rs-dpp/src/data_contract/document_type/accessors/mod.rs:153:6
|
153 | impl<'a> DocumentTypeV0Getters for DocumentTypeRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
153 - impl<'a> DocumentTypeV0Getters for DocumentTypeRef<'a> {
153 + impl DocumentTypeV0Getters for DocumentTypeRef<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
packages/rs-dpp/src/data_contract/document_type/accessors/mod.rs#L287
warning: the following explicit lifetimes could be elided: 'a
--> packages/rs-dpp/src/data_contract/document_type/accessors/mod.rs:287:6
|
287 | impl<'a> DocumentTypeV0Getters for DocumentTypeMutRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
287 - impl<'a> DocumentTypeV0Getters for DocumentTypeMutRef<'a> {
287 + impl DocumentTypeV0Getters for DocumentTypeMutRef<'_> {
|
|
unneeded `return` statement:
packages/rs-dpp/src/data_contract/document_type/property/array.rs#L73
warning: unneeded `return` statement
--> packages/rs-dpp/src/data_contract/document_type/property/array.rs:73:9
|
73 | / return match self {
74 | | ArrayItemType::String(_, _) => {
75 | | let value_as_text = value.as_text().ok_or_else(get_field_type_matching_error)?;
76 | | let vec = value_as_text.as_bytes().to_vec();
... |
118 | | }
119 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
73 ~ match self {
74 + ArrayItemType::String(_, _) => {
75 + let value_as_text = value.as_text().ok_or_else(get_field_type_matching_error)?;
76 + let vec = value_as_text.as_bytes().to_vec();
77 + let mut r_vec = vec.len().encode_var_vec();
78 + r_vec.extend(vec);
79 + Ok(r_vec)
80 + }
81 + ArrayItemType::Date => {
82 + let value_as_f64 = value.to_float().map_err(ProtocolError::ValueError)?;
83 + let value_bytes = value_as_f64.to_be_bytes().to_vec();
84 + Ok(value_bytes)
85 + }
86 + ArrayItemType::Integer => {
87 + let value_as_i64: i64 = value.to_integer().map_err(ProtocolError::ValueError)?;
88 + let value_bytes = value_as_i64.to_be_bytes().to_vec();
89 + Ok(value_bytes)
90 + }
91 + ArrayItemType::Number => {
92 + let value_as_f64 = value.to_float().map_err(ProtocolError::ValueError)?;
93 + let value_bytes = value_as_f64.to_be_bytes().to_vec();
94 + Ok(value_bytes)
95 + }
96 + ArrayItemType::ByteArray(_, _) => {
97 + let mut bytes = value.to_binary_bytes()?;
98 +
99 + let mut r_vec = bytes.len().encode_var_vec();
100 + r_vec.append(&mut bytes);
101 + Ok(r_vec)
102 + }
103 + ArrayItemType::Identifier => {
104 + let mut bytes = value.to_identifier_bytes()?;
105 +
106 + let mut r_vec = bytes.len().encode_var_vec();
107 + r_vec.append(&mut bytes);
108 + Ok(r_vec)
109 + }
110 + ArrayItemType::Boolean => {
111 + let value_as_boolean = value.as_bool().ok_or_else(get_field_type_matching_error)?;
112 + // 0 means does not exist
113 + if value_as_boolean {
114 + Ok(vec![1]) // 1 is true
115 + } else {
116 + Ok(vec![0]) // 2 is false
117 + }
118 + }
119 ~ }
|
|
unneeded `return` statement:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L955
warning: unneeded `return` statement
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:955:9
|
955 | / return match self {
956 | | DocumentPropertyType::String(_) => {
957 | | let value_as_text = value
958 | | .as_text()
... |
1097 | | )),
1098 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
955 ~ match self {
956 + DocumentPropertyType::String(_) => {
957 + let value_as_text = value
958 + .as_text()
959 + .ok_or_else(|| get_field_type_matching_error(value))?;
960 + let vec = value_as_text.as_bytes().to_vec();
961 + let mut r_vec = vec.len().encode_var_vec();
962 + r_vec.extend(vec);
963 + Ok(r_vec)
964 + }
965 + // TODO: Make the same as in https://github.com/dashpay/platform/blob/8d2a9e54d62b77581c44a15a09a2c61864af37d3/packages/rs-dpp/src/document/v0/serialize.rs#L161
966 + // it must be u64 BE. Markers are wrong here as well
967 + DocumentPropertyType::Date => {
968 + let value_as_f64 = value.to_float().map_err(ProtocolError::ValueError)?;
969 + let mut value_bytes = value_as_f64.to_be_bytes().to_vec();
970 + if required {
971 + Ok(value_bytes)
972 + } else {
973 + // if the value wasn't required we need to add a byte to prove it existed
974 + let mut r_vec = vec![255u8];
975 + r_vec.append(&mut value_bytes);
976 + Ok(r_vec)
977 + }
978 + }
979 + DocumentPropertyType::U128 => {
980 + let value_as_u128: u128 = value.to_integer().map_err(ProtocolError::ValueError)?;
981 + Ok(value_as_u128.to_be_bytes().to_vec())
982 + }
983 + DocumentPropertyType::I128 => {
984 + let value_as_i128: i128 = value.to_integer().map_err(ProtocolError::ValueError)?;
985 + Ok(value_as_i128.to_be_bytes().to_vec())
986 + }
987 + DocumentPropertyType::U64 => {
988 + let value_as_u64: u64 = value.to_integer().map_err(ProtocolError::ValueError)?;
989 + Ok(value_as_u64.to_be_bytes().to_vec())
990 + }
991 + DocumentPropertyType::I64 => {
992 + let value_as_i64: i64 = value.to_integer().map_err(ProtocolError::ValueError)?;
993 + Ok(value_as_i64.to_be_bytes().to_vec())
994 + }
995 + DocumentPropertyType::U32 => {
996 + let value_as_u32: u32 = value.to_integer().map_err(ProtocolError::ValueError)?;
997 + Ok(value_as_u32.to_be_bytes().to_vec())
998 + }
999 + DocumentPropertyType::I32 => {
1000 + let value_as_i32: i32 = value.to_integer().map_err(ProtocolError::ValueError)?;
1001 + Ok(value_as_i32.to_be_bytes().to_vec())
1002 + }
1003 + DocumentPropertyType::U16 => {
1004 + let value_as_u16: u16 = value.to_integer().map_err(ProtocolError::ValueError)?;
1005 + Ok(value_as_u16.to_be_bytes().to_vec())
1006 + }
1007 + DocumentPropertyType::I16 => {
1008 + let value_as_i16: i16 = value.to_integer().map_err(ProtocolError::ValueError)?;
1009 + Ok(value_as_i16.to_be_bytes().to_vec())
1010 + }
1011 + DocumentPropertyType::U8 => {
1012 + let value_as_u8: u8 = value.to_integer().map_err(ProtocolError::ValueError)?;
1013 + Ok(value_as_u8.to_be_bytes().to_vec())
1014 + }
1015 + DocumentPropertyType::I8 => {
|
taken reference of right operand:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L1203
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1203:20
|
1203 | if value == &vec![0] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= 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-dpp/src/data_contract/document_type/property/mod.rs#L1294
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1294:20
|
1294 | if value == &vec![0] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
taken reference of right operand:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L1296
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1296:27
|
1296 | } else if value == &vec![1] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
the following explicit lifetimes could be elided: 'de:
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L99
warning: the following explicit lifetimes could be elided: 'de
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:99:14
|
99 | impl<'de> Visitor<'de> for FieldVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
99 - impl<'de> Visitor<'de> for FieldVisitor {
99 + impl Visitor<'_> for FieldVisitor {
|
|
non-canonical implementation of `partial_cmp` on an `Ord` type:
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L157
warning: non-canonical implementation of `partial_cmp` on an `Ord` type
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:157:1
|
157 | / impl PartialOrd for ContestedIndexFieldMatch {
158 | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
| | _____________________________________________________________-
159 | || use ContestedIndexFieldMatch::*;
160 | || match (self, other) {
161 | || // Comparing two integers
... ||
170 | || }
171 | || }
| ||_____- help: change this to: `{ Some(self.cmp(other)) }`
172 | | }
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
= note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default
|
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: `crate::util::type_constants::DEFAULT_HASH_SIZE_U8`:
packages/rs-drive/src/drive/document/paths.rs#L2
warning: unused import: `crate::util::type_constants::DEFAULT_HASH_SIZE_U8`
--> packages/rs-drive/src/drive/document/paths.rs:2:5
|
2 | use crate::util::type_constants::DEFAULT_HASH_SIZE_U8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unused import: `dpp::data_contract::document_type::accessors::DocumentTypeV0Getters`:
packages/rs-drive/src/drive/document/paths.rs#L3
warning: unused import: `dpp::data_contract::document_type::accessors::DocumentTypeV0Getters`
--> packages/rs-drive/src/drive/document/paths.rs:3:5
|
3 | use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `dpp::data_contract::document_type::methods::DocumentTypeV0Methods`:
packages/rs-drive/src/drive/document/paths.rs#L4
warning: unused import: `dpp::data_contract::document_type::methods::DocumentTypeV0Methods`
--> packages/rs-drive/src/drive/document/paths.rs:4:5
|
4 | use dpp::data_contract::document_type::methods::DocumentTypeV0Methods;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `dpp::data_contract::document_type::DocumentTypeRef`:
packages/rs-drive/src/drive/document/paths.rs#L5
warning: unused import: `dpp::data_contract::document_type::DocumentTypeRef`
--> packages/rs-drive/src/drive/document/paths.rs:5:5
|
5 | use dpp::data_contract::document_type::DocumentTypeRef;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
function `contract_documents_primary_key_path` is never used:
packages/rs-drive/src/drive/document/paths.rs#L41
warning: function `contract_documents_primary_key_path` is never used
--> packages/rs-drive/src/drive/document/paths.rs:41:15
|
41 | pub(crate) fn contract_documents_primary_key_path<'a>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0`:
packages/rs-drive/src/drive/identity/key/fetch/mod.rs#L16
warning: unused import: `identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0`
--> packages/rs-drive/src/drive/identity/key/fetch/mod.rs:16:9
|
16 | identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo`:
packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs#L3
warning: unused import: `crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo`
--> packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs:3:5
|
3 | use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::drive::Drive`:
packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs#L6
warning: unused import: `crate::drive::Drive`
--> packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs:6:5
|
6 | use crate::drive::Drive;
| ^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::util::object_size_info::DataContractOwnedResolvedInfo`:
packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs#L11
warning: unused import: `crate::util::object_size_info::DataContractOwnedResolvedInfo`
--> packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs:11:5
|
11 | use crate::util::object_size_info::DataContractOwnedResolvedInfo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
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/src/query/mod.rs#L1324
warning: this `else { if .. }` block can be collapsed
--> packages/rs-drive/src/query/mod.rs:1324:16
|
1324 | } else {
| ________________^
1325 | | if let Some(start_at_key) = start_at_key {
1326 | | inner_query.insert_range_to(..start_at_key);
1327 | | } else {
... |
1331 | | }
1332 | | }
| |_________^
|
= 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
|
1324 ~ } else if let Some(start_at_key) = start_at_key {
1325 + inner_query.insert_range_to(..start_at_key);
1326 + } else {
1327 + //todo: really not sure if this is correct
1328 + // Should investigate more
1329 + inner_query.insert_key(vec![]);
1330 + }
|
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L26
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:26:9
|
26 | /// start fetching the contract's history.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
26 | /// start fetching the contract's history.
| ++
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L29
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:29:9
|
29 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
29 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10.
| ++
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L32
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:32:9
|
32 | /// before starting to return them. If `None`, no entries are skipped.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
32 | /// before starting to return them. If `None`, no entries are skipped.
| ++
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L37
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:37:9
|
37 | /// a `BTreeMap` with Unix timestamp as the key and contract as the value, representing
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
37 | /// a `BTreeMap` with Unix timestamp as the key and contract as the value, representing
| ++
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L38
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:38:9
|
38 | /// the contract's history. The `Err` variant contains an `Error` in case of a failure.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
38 | /// the contract's history. The `Err` variant contains an `Error` in case of a failure.
| ++
|
doc list item without indentation:
packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs#L45
warning: doc list item without indentation
--> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:45:9
|
45 | /// contract history.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
45 | /// contract history.
| ++
|
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
|
unneeded unit return type:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs#L97
warning: unneeded unit return type
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:97:80
|
97 | pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
|
unneeded unit return type:
packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs#L118
warning: unneeded unit return type
--> packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs:118:44
|
118 | pub fn set_nonce(&mut self, nonce: u64) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
|
unneeded unit return type:
packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs#L179
warning: unneeded unit return type
--> packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs:179:71
|
179 | pub fn set_identity_contract_nonce(&mut self, identity_nonce: u64) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
|
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
|
unused variable: `document_delete_transition`:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L58
warning: unused variable: `document_delete_transition`
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:58:40
|
58 | DocumentTransition::Delete(document_delete_transition) => JsValue::null(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_delete_transition`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `document_transfer_transition`:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L59
warning: unused variable: `document_transfer_transition`
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:59:42
|
59 | DocumentTransition::Transfer(document_transfer_transition) => JsValue::null(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_transfer_transition`
|
unused variable: `document_update_price_transition`:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L60
warning: unused variable: `document_update_price_transition`
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:60:45
|
60 | DocumentTransition::UpdatePrice(document_update_price_transition) => JsValue::null(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_update_price_transition`
|
unused variable: `document_purchase_transition`:
packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs#L61
warning: unused variable: `document_purchase_transition`
--> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:61:42
|
61 | DocumentTransition::Purchase(document_purchase_transition) => JsValue::null()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_document_purchase_transition`
|
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
|
sccache stats
99% - 288 hits, 2 misses, 0 errors
|
sccache stats
100% - 60 hits, 0 misses, 0 errors
|
sccache stats
100% - 60 hits, 0 misses, 0 errors
|
sccache stats
100% - 196 hits, 0 misses, 0 errors
|
sccache stats
100% - 204 hits, 0 misses, 0 errors
|
sccache stats
100% - 559 hits, 0 misses, 0 errors
|
sccache stats
100% - 215 hits, 0 misses, 0 errors
|
sccache stats
100% - 441 hits, 0 misses, 0 errors
|
sccache stats
100% - 439 hits, 0 misses, 0 errors
|
sccache stats
100% - 60 hits, 0 misses, 0 errors
|
sccache stats
100% - 422 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
100% - 350 hits, 1 misses, 0 errors
|
sccache stats
100% - 60 hits, 0 misses, 0 errors
|
sccache stats
100% - 1030 hits, 0 misses, 0 errors
|
sccache stats
100% - 443 hits, 0 misses, 0 errors
|
sccache stats
100% - 895 hits, 0 misses, 0 errors
|
sccache stats
100% - 851 hits, 0 misses, 0 errors
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
dashpay~platform~45ALCN.dockerbuild
|
29.8 KB |
|
dashpay~platform~4BXJ3G.dockerbuild
|
30.5 KB |
|
dashpay~platform~MJMUHS.dockerbuild
|
67.5 KB |
|