From 78c2aaf90a6d1da998ef0f2e28a2ebd3adc28580 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:05:44 +1300 Subject: [PATCH 001/112] Update substrate deps to point to polkadot-v1.0.0 --- client/Cargo.toml | 84 +++++++-------- ethy-gadget/Cargo.toml | 48 ++++----- ethy-gadget/rpc/Cargo.toml | 12 +-- evm-precompiles/dex/Cargo.toml | 12 +-- evm-precompiles/erc1155/Cargo.toml | 10 +- evm-precompiles/erc20/Cargo.toml | 12 +-- evm-precompiles/erc721/Cargo.toml | 10 +- evm-precompiles/futurepass/Cargo.toml | 12 +-- .../futurepass_registrar/Cargo.toml | 12 +-- evm-precompiles/marketplace/Cargo.toml | 12 +-- evm-precompiles/nft/Cargo.toml | 10 +- evm-precompiles/peg/Cargo.toml | 10 +- evm-precompiles/sft/Cargo.toml | 10 +- evm-precompiles/utils/Cargo.toml | 10 +- pallet/assets-ext/Cargo.toml | 20 ++-- pallet/assets-ext/rpc/Cargo.toml | 16 +-- pallet/assets-ext/rpc/runtime-api/Cargo.toml | 6 +- pallet/common/Cargo.toml | 10 +- pallet/crowdsale/Cargo.toml | 20 ++-- pallet/dex/Cargo.toml | 22 ++-- pallet/dex/rpc/Cargo.toml | 12 +-- pallet/dex/rpc/runtime-api/Cargo.toml | 10 +- pallet/doughnut/Cargo.toml | 24 ++--- pallet/echo/Cargo.toml | 18 ++-- pallet/erc20-peg/Cargo.toml | 18 ++-- pallet/ethy/Cargo.toml | 24 ++--- pallet/evm-chain-id/Cargo.toml | 16 +-- pallet/fee-control/Cargo.toml | 26 ++--- pallet/fee-proxy/Cargo.toml | 22 ++-- pallet/futurepass/Cargo.toml | 24 ++--- pallet/maintenance-mode/Cargo.toml | 26 ++--- pallet/marketplace/Cargo.toml | 20 ++-- pallet/nft-peg/Cargo.toml | 18 ++-- pallet/nft/Cargo.toml | 20 ++-- pallet/nft/rpc/Cargo.toml | 16 +-- pallet/nft/rpc/runtime-api/Cargo.toml | 6 +- pallet/sft/Cargo.toml | 20 ++-- pallet/sft/rpc/Cargo.toml | 16 +-- pallet/sft/rpc/runtime-api/Cargo.toml | 6 +- pallet/token-approvals/Cargo.toml | 18 ++-- pallet/tx-fee-pot/Cargo.toml | 16 +-- pallet/vortex-distribution/Cargo.toml | 32 +++--- pallet/xls20/Cargo.toml | 18 ++-- pallet/xrpl-bridge/Cargo.toml | 22 ++-- pallet/xrpl/Cargo.toml | 22 ++-- primitives/Cargo.toml | 24 ++--- runtime/Cargo.toml | 102 +++++++++--------- runtime/constants/Cargo.toml | 6 +- 48 files changed, 480 insertions(+), 480 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index d9fe66ff1..a48fe3355 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -25,35 +25,35 @@ hex-literal = "0.3.4" hex = "0.4" libsecp256k1 = { version = "0.6.0" } -sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v0.9.30" } -sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v0.9.30" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , branch = "polkadot-v0.9.30" } +sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } +sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , branch = "polkadot-v1.0.0" } # Frontier fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } @@ -67,18 +67,18 @@ fp-storage = { default-features = false, git = "https://github.com/futureverseco # These dependencies are used for the node template's RPCs jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # These dependencies are used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.30" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Local Dependencies ethy-gadget = { path = "../ethy-gadget" } @@ -94,13 +94,13 @@ pallet-assets-ext-rpc = { path = "../pallet/assets-ext/rpc"} log = "0.4.0" # Try Runtime -frame-try-runtime = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.30" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.30" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } # CLI-specific dependencies [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = [] diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index 4f2ee855d..9d6012c5f 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -15,22 +15,22 @@ parking_lot = "0.12.1" thiserror = "1.0" codec = { version = "3.0.0", package = "parity-scale-codec", features = ["derive"] } libsecp256k1 = { version = "0.6.0" } -prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", version = "0.10.0-dev"} -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", version = "0.10.0-dev"} +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } seed-primitives = { path = "../primitives" } xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2" } @@ -41,11 +41,11 @@ serde = "1.0.136" strum = { version = "0.24", features = ["derive"] } tempfile = "3.1.0" tokio = "1.17.0" -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/ethy-gadget/rpc/Cargo.toml b/ethy-gadget/rpc/Cargo.toml index 7b3257e22..affeb7770 100644 --- a/ethy-gadget/rpc/Cargo.toml +++ b/ethy-gadget/rpc/Cargo.toml @@ -15,12 +15,12 @@ serde = { version = "1.0.131", features = ["derive"] } serde_json = "1.0.64" rustc-hex = { version = "2.1.0", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } ethy-gadget = { path = "../." } seed-primitives = { path = "../../primitives" } diff --git a/evm-precompiles/dex/Cargo.toml b/evm-precompiles/dex/Cargo.toml index ea0a7c4d7..072682606 100644 --- a/evm-precompiles/dex/Cargo.toml +++ b/evm-precompiles/dex/Cargo.toml @@ -10,12 +10,12 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive" num_enum = { version = "0.5.3", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/erc1155/Cargo.toml b/evm-precompiles/erc1155/Cargo.toml index ccd5f9fc4..f51f723fd 100644 --- a/evm-precompiles/erc1155/Cargo.toml +++ b/evm-precompiles/erc1155/Cargo.toml @@ -19,11 +19,11 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive" ethereum-types = { version = "0.13.1", default-features = false, features = ["serialize", "codec"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/erc20/Cargo.toml b/evm-precompiles/erc20/Cargo.toml index 3c541f5cf..cbd9845cd 100644 --- a/evm-precompiles/erc20/Cargo.toml +++ b/evm-precompiles/erc20/Cargo.toml @@ -17,12 +17,12 @@ precompile-utils = { path = "../utils", default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/erc721/Cargo.toml b/evm-precompiles/erc721/Cargo.toml index 97c701318..c866ae0be 100644 --- a/evm-precompiles/erc721/Cargo.toml +++ b/evm-precompiles/erc721/Cargo.toml @@ -18,11 +18,11 @@ precompile-utils = { path = "../utils", default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/futurepass/Cargo.toml b/evm-precompiles/futurepass/Cargo.toml index 2dddd4d05..8e33da1a4 100644 --- a/evm-precompiles/futurepass/Cargo.toml +++ b/evm-precompiles/futurepass/Cargo.toml @@ -13,12 +13,12 @@ seed-primitives = { path = "../../primitives", default-features = false } pallet-futurepass = { path = "../../pallet/futurepass", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/futurepass_registrar/Cargo.toml b/evm-precompiles/futurepass_registrar/Cargo.toml index e6d254617..4c80113c3 100644 --- a/evm-precompiles/futurepass_registrar/Cargo.toml +++ b/evm-precompiles/futurepass_registrar/Cargo.toml @@ -13,12 +13,12 @@ seed-primitives = { path = "../../primitives", default-features = false } pallet-futurepass = { path = "../../pallet/futurepass", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/marketplace/Cargo.toml b/evm-precompiles/marketplace/Cargo.toml index b12453d0a..27389361a 100644 --- a/evm-precompiles/marketplace/Cargo.toml +++ b/evm-precompiles/marketplace/Cargo.toml @@ -10,12 +10,12 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive" num_enum = { version = "0.5.3", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/nft/Cargo.toml b/evm-precompiles/nft/Cargo.toml index 5ae5d714c..8b635ed55 100644 --- a/evm-precompiles/nft/Cargo.toml +++ b/evm-precompiles/nft/Cargo.toml @@ -13,11 +13,11 @@ seed-primitives = { path = "../../primitives", default-features = false } pallet-nft = { path = "../../pallet/nft", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/peg/Cargo.toml b/evm-precompiles/peg/Cargo.toml index 4b9311537..4f61ffb32 100644 --- a/evm-precompiles/peg/Cargo.toml +++ b/evm-precompiles/peg/Cargo.toml @@ -14,11 +14,11 @@ pallet-nft-peg = { path = "../../pallet/nft-peg", default-features = false } pallet-erc20-peg = { path = "../../pallet/erc20-peg", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/sft/Cargo.toml b/evm-precompiles/sft/Cargo.toml index 35f8fa5be..ded18aae8 100644 --- a/evm-precompiles/sft/Cargo.toml +++ b/evm-precompiles/sft/Cargo.toml @@ -13,11 +13,11 @@ seed-primitives = { path = "../../primitives", default-features = false } pallet-sft = { path = "../../pallet/sft", default-features = false } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } diff --git a/evm-precompiles/utils/Cargo.toml b/evm-precompiles/utils/Cargo.toml index f505f1098..70c3d9c80 100644 --- a/evm-precompiles/utils/Cargo.toml +++ b/evm-precompiles/utils/Cargo.toml @@ -19,11 +19,11 @@ precompile-utils-macro = { path = "macro" } # Substrate codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } # Frontier evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } diff --git a/pallet/assets-ext/Cargo.toml b/pallet/assets-ext/Cargo.toml index 8586850b1..067c16782 100644 --- a/pallet/assets-ext/Cargo.toml +++ b/pallet/assets-ext/Cargo.toml @@ -14,23 +14,23 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-control = { path = "../fee-control" } [features] diff --git a/pallet/assets-ext/rpc/Cargo.toml b/pallet/assets-ext/rpc/Cargo.toml index 1ae6dcf7e..861506776 100644 --- a/pallet/assets-ext/rpc/Cargo.toml +++ b/pallet/assets-ext/rpc/Cargo.toml @@ -10,14 +10,14 @@ license = "GPL-3.0" codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../" } pallet-assets-ext-rpc-runtime-api = { path = "./runtime-api" } diff --git a/pallet/assets-ext/rpc/runtime-api/Cargo.toml b/pallet/assets-ext/rpc/runtime-api/Cargo.toml index 6612d4ed4..8a41b04c8 100644 --- a/pallet/assets-ext/rpc/runtime-api/Cargo.toml +++ b/pallet/assets-ext/rpc/runtime-api/Cargo.toml @@ -7,9 +7,9 @@ license = "GPL-3.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../../../assets-ext", default-features = false } seed-primitives = { path = "../../../../primitives", default-features = false} diff --git a/pallet/common/Cargo.toml b/pallet/common/Cargo.toml index d9ec11e8c..9126d4772 100644 --- a/pallet/common/Cargo.toml +++ b/pallet/common/Cargo.toml @@ -15,11 +15,11 @@ impl-trait-for-tuples = "0.2.1" scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } seed-primitives = { path = "../../primitives", default-features = false } diff --git a/pallet/crowdsale/Cargo.toml b/pallet/crowdsale/Cargo.toml index 034f216f3..1a4cbe9ea 100644 --- a/pallet/crowdsale/Cargo.toml +++ b/pallet/crowdsale/Cargo.toml @@ -11,22 +11,22 @@ description = "Root Network Crowdsale pallet" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } pallet-assets-ext = { path = "../assets-ext", default-features = false } seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-nft = { path = "../nft" } [features] diff --git a/pallet/dex/Cargo.toml b/pallet/dex/Cargo.toml index cf0860aeb..3a9853db0 100644 --- a/pallet/dex/Cargo.toml +++ b/pallet/dex/Cargo.toml @@ -12,22 +12,22 @@ hex={ version = "0.4.3", default-features= false } serde = { version = "1.0.145", default-features= false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } [features] diff --git a/pallet/dex/rpc/Cargo.toml b/pallet/dex/rpc/Cargo.toml index 400905a17..2290b4004 100644 --- a/pallet/dex/rpc/Cargo.toml +++ b/pallet/dex/rpc/Cargo.toml @@ -10,12 +10,12 @@ license = "Apache-2.0" jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } serde_json = "1.0.64" -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-dex = { path = "../" } pallet-dex-rpc-runtime-api = { path = "./runtime-api" } diff --git a/pallet/dex/rpc/runtime-api/Cargo.toml b/pallet/dex/rpc/runtime-api/Cargo.toml index 4c4db21ee..021c0ae09 100644 --- a/pallet/dex/rpc/runtime-api/Cargo.toml +++ b/pallet/dex/rpc/runtime-api/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" license = "Apache-2.0" [dependencies] -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-dex = { path = "../../", default-features = false } seed-primitives = { path = "../../../../primitives", default-features = false} diff --git a/pallet/doughnut/Cargo.toml b/pallet/doughnut/Cargo.toml index 830433f52..ae24cd9d6 100644 --- a/pallet/doughnut/Cargo.toml +++ b/pallet/doughnut/Cargo.toml @@ -15,25 +15,25 @@ hex-literal = "0.3.4" scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } doughnut-rs = { version = "0.2.2", default-features = false, features = ["crypto"] } seed-pallet-common = { path = "../common", default-features = false } seed-primitives = { path = "../../primitives", default-features = false } [dev-dependencies] -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } pallet-fee-control = { path = "../fee-control" } pallet-fee-proxy = { path = "../fee-proxy" } diff --git a/pallet/echo/Cargo.toml b/pallet/echo/Cargo.toml index c2a7326a4..0993029ec 100644 --- a/pallet/echo/Cargo.toml +++ b/pallet/echo/Cargo.toml @@ -14,18 +14,18 @@ seed-pallet-common = { path = "../common", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } ethabi = { version = "17.1.0", default-features = false} -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/erc20-peg/Cargo.toml b/pallet/erc20-peg/Cargo.toml index 08ae3b34c..3bc850882 100644 --- a/pallet/erc20-peg/Cargo.toml +++ b/pallet/erc20-peg/Cargo.toml @@ -16,20 +16,20 @@ log = "0.4" ethabi = { version = "17.1.0", default-features = false } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [dev-dependencies] pallet-nft = { path = "../nft" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } hex-literal = { version = "0.3.4" } pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index 2a985909f..675cadc91 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -21,23 +21,23 @@ seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } # Substrate packages -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [dev-dependencies] hex-literal = "0.3" parking_lot = "0.12.1" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/evm-chain-id/Cargo.toml b/pallet/evm-chain-id/Cargo.toml index 4a97dc02e..2a64e8f99 100644 --- a/pallet/evm-chain-id/Cargo.toml +++ b/pallet/evm-chain-id/Cargo.toml @@ -18,18 +18,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } seed-pallet-common = { path = "../common" } [features] diff --git a/pallet/fee-control/Cargo.toml b/pallet/fee-control/Cargo.toml index 7b62e1403..e74c367ef 100644 --- a/pallet/fee-control/Cargo.toml +++ b/pallet/fee-control/Cargo.toml @@ -14,14 +14,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } # Frontier fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } @@ -33,11 +33,11 @@ precompile-utils = { path = "../../evm-precompiles/utils", default-features = fa [dev-dependencies] pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-fee-proxy = { path = "../fee-proxy" } pallet-dex = { path = "../dex" } pallet-assets-ext = { path = "../assets-ext" } diff --git a/pallet/fee-proxy/Cargo.toml b/pallet/fee-proxy/Cargo.toml index cb616c21e..33fa6aa6d 100644 --- a/pallet/fee-proxy/Cargo.toml +++ b/pallet/fee-proxy/Cargo.toml @@ -19,22 +19,22 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } ethabi = { version = "17.1.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } hex-literal = { version = "0.3.4" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-control = { path = "../fee-control" } [features] diff --git a/pallet/futurepass/Cargo.toml b/pallet/futurepass/Cargo.toml index b6e596efa..e901c8775 100644 --- a/pallet/futurepass/Cargo.toml +++ b/pallet/futurepass/Cargo.toml @@ -16,15 +16,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } # Custom log = "0.4" @@ -40,16 +40,16 @@ fp-evm = { default-features = false, git = "https://github.com/futureversecom/fr seed-runtime = { path = "../../runtime" } seed-pallet-common= { path = "../common" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } pallet-fee-control = { path = "../fee-control" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-proxy = { path = "../fee-proxy" } pallet-dex = { path = "../dex" } pallet-nft = { path = "../nft" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } hex-literal = { version = "0.3.4" } diff --git a/pallet/maintenance-mode/Cargo.toml b/pallet/maintenance-mode/Cargo.toml index c9b84b9bd..e141ac34d 100644 --- a/pallet/maintenance-mode/Cargo.toml +++ b/pallet/maintenance-mode/Cargo.toml @@ -13,24 +13,24 @@ seed-pallet-common = { path = "../common", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } pallet-ethy = { path = "../ethy" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] diff --git a/pallet/marketplace/Cargo.toml b/pallet/marketplace/Cargo.toml index 83e55b68a..9449a017d 100644 --- a/pallet/marketplace/Cargo.toml +++ b/pallet/marketplace/Cargo.toml @@ -10,13 +10,13 @@ description = "Root Network Marketplace pallet" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } seed-primitives = { path = "../../primitives", default-features = false } @@ -29,10 +29,10 @@ log = { default-features = false, version = "0.4.14"} serde_json = "1.0" pallet-assets-ext = { path = "../assets-ext" } pallet-fee-control = { path = "../fee-control" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/nft-peg/Cargo.toml b/pallet/nft-peg/Cargo.toml index d54007b33..593361c0d 100644 --- a/pallet/nft-peg/Cargo.toml +++ b/pallet/nft-peg/Cargo.toml @@ -17,19 +17,19 @@ ethabi = { version = "17.1.0", default-features = false } pallet-nft = { path = "../nft", default-features = false } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } hex-literal = { version = "0.3.4" } pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/nft/Cargo.toml b/pallet/nft/Cargo.toml index bd7feea42..f87c0c21f 100644 --- a/pallet/nft/Cargo.toml +++ b/pallet/nft/Cargo.toml @@ -11,13 +11,13 @@ description = "Root Network NFT pallet" hex = { version = "0.4.3", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } seed-primitives = { path = "../../primitives", default-features = false } @@ -28,10 +28,10 @@ log = { default-features = false, version = "0.4.14"} [dev-dependencies] serde_json = "1.0" pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-control = { path = "../fee-control" } [features] diff --git a/pallet/nft/rpc/Cargo.toml b/pallet/nft/rpc/Cargo.toml index 15cc4cd45..dd33a5c33 100644 --- a/pallet/nft/rpc/Cargo.toml +++ b/pallet/nft/rpc/Cargo.toml @@ -10,14 +10,14 @@ license = "Apache-2.0" codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-nft = { path = "../" } pallet-nft-rpc-runtime-api = { path = "./runtime-api" } diff --git a/pallet/nft/rpc/runtime-api/Cargo.toml b/pallet/nft/rpc/runtime-api/Cargo.toml index e9ed8ae48..1f65bd241 100644 --- a/pallet/nft/rpc/runtime-api/Cargo.toml +++ b/pallet/nft/rpc/runtime-api/Cargo.toml @@ -7,9 +7,9 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-nft = { path = "../../../nft", default-features = false } seed-primitives = { path = "../../../../primitives", default-features = false} diff --git a/pallet/sft/Cargo.toml b/pallet/sft/Cargo.toml index 141085edc..2d138af31 100644 --- a/pallet/sft/Cargo.toml +++ b/pallet/sft/Cargo.toml @@ -10,13 +10,13 @@ description = "Root Network SFT pallet" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } seed-primitives = { path = "../../primitives", default-features = false } @@ -28,10 +28,10 @@ precompile-utils = { path = "../../evm-precompiles/utils", default-features = fa [dev-dependencies] serde_json = "1.0" pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/sft/rpc/Cargo.toml b/pallet/sft/rpc/Cargo.toml index 9d7dab024..f0f950df1 100644 --- a/pallet/sft/rpc/Cargo.toml +++ b/pallet/sft/rpc/Cargo.toml @@ -10,14 +10,14 @@ license = "Apache-2.0" codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-sft = { path = "../" } pallet-sft-rpc-runtime-api = { path = "./runtime-api" } diff --git a/pallet/sft/rpc/runtime-api/Cargo.toml b/pallet/sft/rpc/runtime-api/Cargo.toml index f9b63d4c1..0b48a6a5c 100644 --- a/pallet/sft/rpc/runtime-api/Cargo.toml +++ b/pallet/sft/rpc/runtime-api/Cargo.toml @@ -7,9 +7,9 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-sft = { path = "../../../sft", default-features = false } seed-primitives = { path = "../../../../primitives", default-features = false} diff --git a/pallet/token-approvals/Cargo.toml b/pallet/token-approvals/Cargo.toml index 2084b1726..f2755e7b4 100644 --- a/pallet/token-approvals/Cargo.toml +++ b/pallet/token-approvals/Cargo.toml @@ -14,19 +14,19 @@ serde = { version = "1.0.145", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } hex-literal = { version = "0.3.4" } pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-nft = { path = "../nft" } [features] diff --git a/pallet/tx-fee-pot/Cargo.toml b/pallet/tx-fee-pot/Cargo.toml index ca5f610f4..56c238d78 100644 --- a/pallet/tx-fee-pot/Cargo.toml +++ b/pallet/tx-fee-pot/Cargo.toml @@ -11,14 +11,14 @@ description = "Maintains a tx fee pot for validator payouts" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-assets-ext = { path = "../assets-ext", default-features = false } seed-pallet-common = { path = "../common", default-features = false } diff --git a/pallet/vortex-distribution/Cargo.toml b/pallet/vortex-distribution/Cargo.toml index 99272d52c..b0b8832a0 100644 --- a/pallet/vortex-distribution/Cargo.toml +++ b/pallet/vortex-distribution/Cargo.toml @@ -11,28 +11,28 @@ description = "Vortex distribution pallet" serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } [dev-dependencies] -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/xls20/Cargo.toml b/pallet/xls20/Cargo.toml index df74ad817..8b5409d78 100644 --- a/pallet/xls20/Cargo.toml +++ b/pallet/xls20/Cargo.toml @@ -14,19 +14,19 @@ pallet-nft = { path = "../nft", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/pallet/xrpl-bridge/Cargo.toml b/pallet/xrpl-bridge/Cargo.toml index 80d91606d..4f68c16fb 100644 --- a/pallet/xrpl-bridge/Cargo.toml +++ b/pallet/xrpl-bridge/Cargo.toml @@ -12,20 +12,20 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.0.0', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } hex-literal = { version = "0.3.4", default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } scale-info = { version = '2.3.0', default-features = false, features = [ 'derive', ] } serde = { version = '1.0.144', features = ['derive'], optional = true } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30", default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2" } seed-primitives = { path = "../../primitives", default-features = false } @@ -35,8 +35,8 @@ pallet-assets-ext = { path = "../../pallet/assets-ext", default-features = false log = { version = "0.4", default-features = false } [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.30" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ['std'] diff --git a/pallet/xrpl/Cargo.toml b/pallet/xrpl/Cargo.toml index 58ac9ee68..d41f8cbce 100644 --- a/pallet/xrpl/Cargo.toml +++ b/pallet/xrpl/Cargo.toml @@ -16,16 +16,16 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } # Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true, default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } # Custom log = "0.4" @@ -41,9 +41,9 @@ seed-primitives = { path = "../../primitives", default-features = false } precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } [dev-dependencies] -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } seed-pallet-common= { path = "../common" } pallet-assets-ext = { path = "../assets-ext" } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 2ba32948a..d6d7bfebd 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -19,24 +19,24 @@ ripemd = { version = "0.1", default-features = false } sha2 = { version = "0.10", default-features = false } hex = { version = "0.4.3", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } [dev-dependencies] hex = "*" hex-literal = "0.3" [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] default = ["std"] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index a6c846efb..65fdf5a2d 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -11,47 +11,47 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive" serde = { version = "1.0.145", default-features = false, optional = true, features = ["derive"] } # Substrate -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-multisig = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-multisig = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # EVM support fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } @@ -116,26 +116,26 @@ seed-runtime-constants = { path = "constants", default-features = false } primitive-types = {version = "0.11.1", default-features = false, features = ["impl-codec", "impl-serde"] } # Try-runtime -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } # Benchmark dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [dev-dependencies] ethereum = { version = "0.12.0", features = ["with-codec"] } seed-client = { path = "../client" } ethabi = { version = "17.1.0" } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } tokio = { version = "1.19.2", features = ["macros"] } -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [features] default = [ "std" ] diff --git a/runtime/constants/Cargo.toml b/runtime/constants/Cargo.toml index 325e89734..ae81263e0 100644 --- a/runtime/constants/Cargo.toml +++ b/runtime/constants/Cargo.toml @@ -5,9 +5,9 @@ authors = ["The Root Network Team"] edition = "2021" [dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } -sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [features] default = ["std"] From d7171ccd57852ed74873b22af249db90fc99399d Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:06:48 +1300 Subject: [PATCH 002/112] Update frontier deps to point to polkadot-v1.0.0-TRN --- client/Cargo.toml | 16 +++++++-------- evm-precompiles/dex/Cargo.toml | 4 ++-- evm-precompiles/erc1155/Cargo.toml | 4 ++-- evm-precompiles/erc20/Cargo.toml | 4 ++-- evm-precompiles/erc721/Cargo.toml | 4 ++-- evm-precompiles/futurepass/Cargo.toml | 4 ++-- .../futurepass_registrar/Cargo.toml | 4 ++-- evm-precompiles/marketplace/Cargo.toml | 4 ++-- evm-precompiles/nft/Cargo.toml | 4 ++-- evm-precompiles/peg/Cargo.toml | 4 ++-- evm-precompiles/sft/Cargo.toml | 4 ++-- evm-precompiles/utils/Cargo.toml | 4 ++-- pallet/assets-ext/Cargo.toml | 2 +- pallet/doughnut/Cargo.toml | 4 ++-- pallet/fee-control/Cargo.toml | 4 ++-- pallet/fee-proxy/Cargo.toml | 2 +- pallet/futurepass/Cargo.toml | 4 ++-- pallet/marketplace/Cargo.toml | 2 +- pallet/nft/Cargo.toml | 2 +- pallet/sft/Cargo.toml | 2 +- pallet/xrpl/Cargo.toml | 2 +- runtime/Cargo.toml | 20 +++++++++---------- 22 files changed, 52 insertions(+), 52 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index a48fe3355..23df9ec7c 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -56,14 +56,14 @@ frame-system = { git = "https://github.com/paritytech/substrate", branch = "polk pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , branch = "polkadot-v1.0.0" } # Frontier -fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fc-db = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fc-mapping-sync = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN", features = [ "rpc_binary_search_estimate" ] } -fc-rpc-core = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fp-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fp-storage = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fc-db = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fc-mapping-sync = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = [ "rpc_binary_search_estimate" ] } +fc-rpc-core = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-storage = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } # These dependencies are used for the node template's RPCs jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } diff --git a/evm-precompiles/dex/Cargo.toml b/evm-precompiles/dex/Cargo.toml index 072682606..720fd30cc 100644 --- a/evm-precompiles/dex/Cargo.toml +++ b/evm-precompiles/dex/Cargo.toml @@ -18,8 +18,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } # TRN precompile-utils = { path = "../utils", default-features = false } diff --git a/evm-precompiles/erc1155/Cargo.toml b/evm-precompiles/erc1155/Cargo.toml index f51f723fd..42708a877 100644 --- a/evm-precompiles/erc1155/Cargo.toml +++ b/evm-precompiles/erc1155/Cargo.toml @@ -26,8 +26,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/erc20/Cargo.toml b/evm-precompiles/erc20/Cargo.toml index cbd9845cd..32bc919e3 100644 --- a/evm-precompiles/erc20/Cargo.toml +++ b/evm-precompiles/erc20/Cargo.toml @@ -25,8 +25,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/erc721/Cargo.toml b/evm-precompiles/erc721/Cargo.toml index c866ae0be..d504ab4ff 100644 --- a/evm-precompiles/erc721/Cargo.toml +++ b/evm-precompiles/erc721/Cargo.toml @@ -25,8 +25,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/futurepass/Cargo.toml b/evm-precompiles/futurepass/Cargo.toml index 8e33da1a4..0b5af8e68 100644 --- a/evm-precompiles/futurepass/Cargo.toml +++ b/evm-precompiles/futurepass/Cargo.toml @@ -21,8 +21,8 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/futurepass_registrar/Cargo.toml b/evm-precompiles/futurepass_registrar/Cargo.toml index 4c80113c3..0157d06e2 100644 --- a/evm-precompiles/futurepass_registrar/Cargo.toml +++ b/evm-precompiles/futurepass_registrar/Cargo.toml @@ -21,8 +21,8 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/marketplace/Cargo.toml b/evm-precompiles/marketplace/Cargo.toml index 27389361a..c892b3b3c 100644 --- a/evm-precompiles/marketplace/Cargo.toml +++ b/evm-precompiles/marketplace/Cargo.toml @@ -18,8 +18,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } # TRN precompile-utils = { path = "../utils", default-features = false } diff --git a/evm-precompiles/nft/Cargo.toml b/evm-precompiles/nft/Cargo.toml index 8b635ed55..40071d43c 100644 --- a/evm-precompiles/nft/Cargo.toml +++ b/evm-precompiles/nft/Cargo.toml @@ -20,8 +20,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/peg/Cargo.toml b/evm-precompiles/peg/Cargo.toml index 4f61ffb32..99519a895 100644 --- a/evm-precompiles/peg/Cargo.toml +++ b/evm-precompiles/peg/Cargo.toml @@ -21,8 +21,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/sft/Cargo.toml b/evm-precompiles/sft/Cargo.toml index ded18aae8..f466883d1 100644 --- a/evm-precompiles/sft/Cargo.toml +++ b/evm-precompiles/sft/Cargo.toml @@ -20,8 +20,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [features] default = ["std"] diff --git a/evm-precompiles/utils/Cargo.toml b/evm-precompiles/utils/Cargo.toml index 70c3d9c80..1d2812636 100644 --- a/evm-precompiles/utils/Cargo.toml +++ b/evm-precompiles/utils/Cargo.toml @@ -27,8 +27,8 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f # Frontier evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [dev-dependencies] hex-literal = "0.3.4" diff --git a/pallet/assets-ext/Cargo.toml b/pallet/assets-ext/Cargo.toml index 067c16782..b511f64e2 100644 --- a/pallet/assets-ext/Cargo.toml +++ b/pallet/assets-ext/Cargo.toml @@ -29,7 +29,7 @@ precompile-utils = { path = "../../evm-precompiles/utils", default-features = fa [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-control = { path = "../fee-control" } diff --git a/pallet/doughnut/Cargo.toml b/pallet/doughnut/Cargo.toml index ae24cd9d6..388478cb9 100644 --- a/pallet/doughnut/Cargo.toml +++ b/pallet/doughnut/Cargo.toml @@ -32,9 +32,9 @@ seed-primitives = { path = "../../primitives", default-features = false } [dev-dependencies] frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-fee-control = { path = "../fee-control" } pallet-fee-proxy = { path = "../fee-proxy" } pallet-dex = { path = "../dex" } diff --git a/pallet/fee-control/Cargo.toml b/pallet/fee-control/Cargo.toml index e74c367ef..fca1f4d08 100644 --- a/pallet/fee-control/Cargo.toml +++ b/pallet/fee-control/Cargo.toml @@ -24,14 +24,14 @@ sp-core = { git = "https://github.com/paritytech/substrate", default-features = frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } [dev-dependencies] -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/pallet/fee-proxy/Cargo.toml b/pallet/fee-proxy/Cargo.toml index 33fa6aa6d..9505da74a 100644 --- a/pallet/fee-proxy/Cargo.toml +++ b/pallet/fee-proxy/Cargo.toml @@ -27,7 +27,7 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } [dev-dependencies] sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/pallet/futurepass/Cargo.toml b/pallet/futurepass/Cargo.toml index e901c8775..aed9cf18f 100644 --- a/pallet/futurepass/Cargo.toml +++ b/pallet/futurepass/Cargo.toml @@ -36,7 +36,7 @@ seed-primitives = { path = "../../primitives", default-features = false } precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } [dev-dependencies] -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } seed-runtime = { path = "../../runtime" } seed-pallet-common= { path = "../common" } @@ -50,7 +50,7 @@ pallet-fee-proxy = { path = "../fee-proxy" } pallet-dex = { path = "../dex" } pallet-nft = { path = "../nft" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } hex-literal = { version = "0.3.4" } diff --git a/pallet/marketplace/Cargo.toml b/pallet/marketplace/Cargo.toml index 9449a017d..5421a00b8 100644 --- a/pallet/marketplace/Cargo.toml +++ b/pallet/marketplace/Cargo.toml @@ -31,7 +31,7 @@ pallet-assets-ext = { path = "../assets-ext" } pallet-fee-control = { path = "../fee-control" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] diff --git a/pallet/nft/Cargo.toml b/pallet/nft/Cargo.toml index f87c0c21f..a4ca80050 100644 --- a/pallet/nft/Cargo.toml +++ b/pallet/nft/Cargo.toml @@ -30,7 +30,7 @@ serde_json = "1.0" pallet-assets-ext = { path = "../assets-ext" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-fee-control = { path = "../fee-control" } diff --git a/pallet/sft/Cargo.toml b/pallet/sft/Cargo.toml index 2d138af31..1657effaf 100644 --- a/pallet/sft/Cargo.toml +++ b/pallet/sft/Cargo.toml @@ -30,7 +30,7 @@ serde_json = "1.0" pallet-assets-ext = { path = "../assets-ext" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] diff --git a/pallet/xrpl/Cargo.toml b/pallet/xrpl/Cargo.toml index d41f8cbce..7543fd2e7 100644 --- a/pallet/xrpl/Cargo.toml +++ b/pallet/xrpl/Cargo.toml @@ -44,7 +44,7 @@ precompile-utils = { path = "../../evm-precompiles/utils", default-features = fa frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } seed-pallet-common= { path = "../common" } pallet-assets-ext = { path = "../assets-ext" } pallet-fee-control = { path = "../fee-control" } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 65fdf5a2d..feb8aabd7 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -54,21 +54,21 @@ sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } # EVM support -fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fp-self-contained = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-self-contained = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } hex = { version = "0.4.3", default-features= false } hex-literal = { version = "0.3.4", default-features = false } -pallet-base-fee = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-ethereum = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-base-fee = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-ethereum = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } pallet-evm-chain-id = { path = "../pallet/evm-chain-id", default-features = false } -pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } -pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v0.9.30-TRN" } +pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } precompile-utils = { path = "../evm-precompiles/utils", default-features = false } pallet-evm-precompiles-erc721 = { path = "../evm-precompiles/erc721", default-features = false } pallet-evm-precompiles-erc1155 = { path = "../evm-precompiles/erc1155", default-features = false } From 79c253dfce6ba53905438b97fb762987ce1e19df Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:22:11 +1300 Subject: [PATCH 003/112] sc-consensus-uncles, sp-authorship removed --- client/Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 23df9ec7c..c16fe5784 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -36,8 +36,6 @@ sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } From 1eef07042a8cb98ed37b1d20964e451082cc313d Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:23:39 +1300 Subject: [PATCH 004/112] sc-finality-grandpa -> sc-consensus-grandpa --- Cargo.toml | 2 +- client/Cargo.toml | 6 +++--- ethy-gadget/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2c43fca0f..ac898592b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ codegen-units = 1 # substrate packages finality-grandpa = { opt-level = 3 } pallet-grandpa = { opt-level = 3 } -sc-finality-grandpa = { opt-level = 3 } +sc-consensus-grandpa = { opt-level = 3 } # end substrate packages aes = { opt-level = 3 } blake2 = { opt-level = 3 } diff --git a/client/Cargo.toml b/client/Cargo.toml index c16fe5784..ba9e49b20 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -40,9 +40,9 @@ sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index 9d6012c5f..b5251afb2 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -45,7 +45,7 @@ sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polk sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } From 80087e383e5d87269fde9f38baf2cd0895ede653 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:27:38 +1300 Subject: [PATCH 005/112] rpc_binary_search_estimate -> rpc-binary-search-estimate --- client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index ba9e49b20..87bd4d5d0 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -57,7 +57,7 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fc-db = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fc-mapping-sync = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = [ "rpc_binary_search_estimate" ] } +fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = [ "rpc-binary-search-estimate" ] } fc-rpc-core = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fp-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } From 5a1c08ce075e9dc88c01c85b5c1df7b1a844aa58 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:29:02 +1300 Subject: [PATCH 006/112] remote-externalities -> frame-remote-externalities --- runtime/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index feb8aabd7..2884f659f 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -132,7 +132,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran ethereum = { version = "0.12.0", features = ["with-codec"] } seed-client = { path = "../client" } ethabi = { version = "17.1.0" } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } tokio = { version = "1.19.2", features = ["macros"] } substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } From e07ccdbfee8a5769670a155a0bc8aed483073c62 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:29:25 +1300 Subject: [PATCH 007/112] remove feat wasmtime --- Cargo.lock | 4315 ++++++++++++++++++++++++--------------------- client/Cargo.toml | 6 +- 2 files changed, 2334 insertions(+), 1987 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1197b7541..16473c711 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.26.2", + "gimli 0.27.3", ] [[package]] @@ -98,6 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -136,6 +137,54 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.79" @@ -153,9 +202,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "4.2.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -163,15 +212,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] - [[package]] name = "arrayvec" version = "0.5.2" @@ -191,82 +231,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.1.1" +name = "asn1-rs" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "concurrent-queue", - "event-listener 4.0.3", - "event-listener-strategy", - "futures-core", - "pin-project-lite 0.2.13", + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", ] [[package]] -name = "async-executor" -version = "1.8.0" +name = "asn1-rs-derive" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "async-lock 3.3.0", - "async-task", - "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", - "slab", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "async-global-executor" -version = "2.4.1" +name = "asn1-rs-impl" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "async-channel 2.1.1", - "async-executor", - "async-io 2.3.1", - "async-lock 3.3.0", - "blocking", - "futures-lite 2.2.0", - "once_cell", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "async-io" -version = "1.13.0" +name = "async-channel" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", + "event-listener 2.5.3", + "futures-core", ] [[package]] @@ -279,9 +290,9 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "parking", - "polling 3.3.2", + "polling", "rustix 0.38.31", "slab", "tracing", @@ -309,88 +320,16 @@ dependencies = [ ] [[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.31", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-signal" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" -dependencies = [ - "async-io 2.3.1", - "async-lock 2.8.0", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 0.38.31", - "signal-hook-registry", - "slab", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 1.13.0", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.13", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.21.2" +name = "async-recursion" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f8a4a203be3325981310ab243a28e6e4ea55b6519bffce05d41ab60e09ad8" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "socket2 0.4.10", - "trust-dns-resolver", + "proc-macro2", + "quote", + "syn 2.0.48", ] -[[package]] -name = "async-task" -version = "4.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" - [[package]] name = "async-trait" version = "0.1.77" @@ -415,12 +354,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "atty" version = "0.2.14" @@ -444,6 +377,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -473,15 +417,9 @@ checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base58" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -516,35 +454,6 @@ dependencies = [ "serde", ] -[[package]] -name = "beefy-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "beefy-primitives", - "sp-api", -] - -[[package]] -name = "beefy-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "bimap" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" - [[package]] name = "bincode" version = "1.3.3" @@ -614,16 +523,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "blake2-rfc" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -dependencies = [ - "arrayvec 0.4.12", - "constant_time_eq 0.1.5", -] - [[package]] name = "blake2b_simd" version = "1.0.2" @@ -632,7 +531,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "constant_time_eq", ] [[package]] @@ -643,7 +542,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "constant_time_eq", ] [[package]] @@ -656,7 +555,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq 0.3.0", + "constant_time_eq", ] [[package]] @@ -699,19 +598,15 @@ dependencies = [ ] [[package]] -name = "blocking" -version = "1.5.1" +name = "bounded-collections" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ - "async-channel 2.1.1", - "async-lock 3.3.0", - "async-task", - "fastrand 2.0.1", - "futures-io", - "futures-lite 2.2.0", - "piper", - "tracing", + "log", + "parity-scale-codec", + "scale-info", + "serde", ] [[package]] @@ -778,6 +673,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +[[package]] +name = "bytemuck" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" + [[package]] name = "byteorder" version = "1.5.0" @@ -821,15 +722,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", "semver 1.0.21", "serde", "serde_json", + "thiserror", ] [[package]] @@ -853,9 +755,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", ] @@ -912,9 +814,9 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", @@ -942,7 +844,7 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", - "libloading 0.8.1", + "libloading", ] [[package]] @@ -953,15 +855,37 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", "bitflags 1.3.2", - "clap_derive", - "clap_lex", + "clap_derive 3.2.25", + "clap_lex 0.2.4", "indexmap 1.9.3", "once_cell", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", ] +[[package]] +name = "clap" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +dependencies = [ + "clap_builder", + "clap_derive 4.5.0", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex 0.7.0", + "strsim 0.11.0", +] + [[package]] name = "clap_derive" version = "3.2.25" @@ -975,6 +899,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "clap_derive" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "clap_lex" version = "0.2.4" @@ -984,6 +920,12 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + [[package]] name = "clear_on_drop" version = "0.2.5" @@ -994,22 +936,29 @@ dependencies = [ ] [[package]] -name = "cmake" -version = "0.1.50" +name = "codespan-reporting" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ - "cc", + "termcolor", + "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] @@ -1031,20 +980,35 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", + "unicode-width", "windows-sys 0.52.0", ] [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.12", + "once_cell", + "tiny-keccak", +] [[package]] name = "constant_time_eq" @@ -1103,27 +1067,27 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1132,33 +1096,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1168,15 +1132,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1185,9 +1149,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1241,9 +1205,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1291,17 +1255,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1339,7 +1292,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.3.0", + "platforms", "rustc_version", "subtle", "zeroize", @@ -1356,6 +1309,50 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "cxx" +version = "1.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.48", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1384,11 +1381,46 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -1402,6 +1434,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.8.1" @@ -1427,6 +1465,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -1473,13 +1512,14 @@ dependencies = [ ] [[package]] -name = "dns-parser" -version = "0.8.0" +name = "displaydoc" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "byteorder", - "quick-error", + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -1491,7 +1531,7 @@ dependencies = [ "blake2", "clear_on_drop", "digest 0.10.7", - "ed25519-dalek", + "ed25519-dalek 1.0.1", "libsecp256k1 0.7.1", "parity-scale-codec", "primitive-types 0.12.2", @@ -1502,10 +1542,10 @@ dependencies = [ ] [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "downcast" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dtoa" @@ -1542,14 +1582,16 @@ checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature", + "signature 2.2.0", + "spki", ] [[package]] @@ -1558,7 +1600,17 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature", + "signature 1.4.0", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature 2.2.0", ] [[package]] @@ -1568,13 +1620,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", + "ed25519 1.5.3", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -1597,16 +1664,17 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", + "digest 0.10.7", "ff", "generic-array 0.14.7", "group", + "pkcs8", "rand_core 0.6.4", "sec1", "subtle", @@ -1621,9 +1689,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "enum-as-inner" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ "heck", "proc-macro2", @@ -1651,19 +1719,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.2" @@ -1689,17 +1744,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.8" @@ -1710,23 +1754,13 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "ethabi" version = "17.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4966fba78396ff92db3b817ee71143eccd98acf0f876b8d600e585a670c5d1b" dependencies = [ - "ethereum-types", + "ethereum-types 0.13.1", "hex", "once_cell", "regex", @@ -1752,6 +1786,21 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde 0.4.0", + "scale-info", + "tiny-keccak", +] + [[package]] name = "ethereum" version = "0.12.0" @@ -1759,8 +1808,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" dependencies = [ "bytes", - "ethereum-types", - "hash-db", + "ethereum-types 0.13.1", + "hash-db 0.15.2", "hash256-std-hasher", "parity-scale-codec", "rlp", @@ -1771,13 +1820,31 @@ dependencies = [ "triehash", ] +[[package]] +name = "ethereum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +dependencies = [ + "bytes", + "ethereum-types 0.14.1", + "hash-db 0.15.2", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "sha3 0.10.8", + "triehash", +] + [[package]] name = "ethereum-types" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ - "ethbloom", + "ethbloom 0.12.1", "fixed-hash 0.7.0", "impl-codec", "impl-rlp", @@ -1787,6 +1854,22 @@ dependencies = [ "uint", ] +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde 0.4.0", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + [[package]] name = "ethy-gadget" version = "0.1.0" @@ -1818,13 +1901,13 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-keyring", "sp-keystore", "sp-runtime", "sp-tracing", - "strum", + "strum 0.24.1", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -1839,7 +1922,7 @@ version = "0.1.0" dependencies = [ "ethy-gadget", "futures", - "jsonrpsee", + "jsonrpsee 0.15.1", "libsecp256k1 0.6.0", "log", "parity-scale-codec", @@ -1861,17 +1944,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite 0.2.13", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -1899,12 +1971,12 @@ version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d388bbd18050623b996cc4ba0643971e2978693ad56ca8b7603080cfa5eaf738" dependencies = [ - "auto_impl", + "auto_impl 0.5.0", "environmental", - "ethereum", - "evm-core", - "evm-gasometer", - "evm-runtime", + "ethereum 0.12.0", + "evm-core 0.36.0", + "evm-gasometer 0.36.0", + "evm-runtime 0.36.0", "log", "parity-scale-codec", "primitive-types 0.11.1", @@ -1914,6 +1986,26 @@ dependencies = [ "sha3 0.10.8", ] +[[package]] +name = "evm" +version = "0.39.1" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "auto_impl 1.2.0", + "environmental", + "ethereum 0.14.0", + "evm-core 0.39.0", + "evm-gasometer 0.39.0", + "evm-runtime 0.39.0", + "log", + "parity-scale-codec", + "primitive-types 0.12.2", + "rlp", + "scale-info", + "serde", + "sha3 0.10.8", +] + [[package]] name = "evm-core" version = "0.36.0" @@ -1926,6 +2018,17 @@ dependencies = [ "serde", ] +[[package]] +name = "evm-core" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "parity-scale-codec", + "primitive-types 0.12.2", + "scale-info", + "serde", +] + [[package]] name = "evm-gasometer" version = "0.36.0" @@ -1933,24 +2036,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "170a27b6e49b8279016afffcdc6ebae9225d5acff3a546ad8589929b091e7ac5" dependencies = [ "environmental", - "evm-core", - "evm-runtime", + "evm-core 0.36.0", + "evm-runtime 0.36.0", "primitive-types 0.11.1", ] +[[package]] +name = "evm-gasometer" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "environmental", + "evm-core 0.39.0", + "evm-runtime 0.39.0", + "primitive-types 0.12.2", +] + [[package]] name = "evm-runtime" version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d48c2545a02e3a4d1a5184a96af11037334dce947b6bdb389b3503b3a6f8dcd" dependencies = [ - "auto_impl", + "auto_impl 0.5.0", "environmental", - "evm-core", + "evm-core 0.36.0", "primitive-types 0.11.1", "sha3 0.10.8", ] +[[package]] +name = "evm-runtime" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "auto_impl 1.2.0", + "environmental", + "evm-core 0.39.0", + "primitive-types 0.12.2", + "sha3 0.10.8", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -1960,6 +2086,19 @@ dependencies = [ "futures", ] +[[package]] +name = "expander" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -1972,15 +2111,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -1990,17 +2120,14 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "async-trait", - "fc-db", "fp-consensus", "fp-rpc", - "sc-client-api", "sc-consensus", "sp-api", "sp-block-builder", - "sp-blockchain", "sp-consensus", "sp-runtime", "thiserror", @@ -2009,10 +2136,10 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ + "async-trait", "fp-storage", - "kvdb-rocksdb", "log", "parity-db", "parity-scale-codec", @@ -2027,77 +2154,110 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fc-db", + "fc-storage", "fp-consensus", "fp-rpc", "futures", "futures-timer", "log", + "parking_lot 0.12.1", "sc-client-api", + "sc-utils", "sp-api", "sp-blockchain", + "sp-consensus", "sp-runtime", ] [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", - "ethereum-types", - "evm", + "ethereum 0.14.0", + "ethereum-types 0.14.1", + "evm 0.39.1", "fc-db", + "fc-mapping-sync", "fc-rpc-core", + "fc-storage", "fp-ethereum", "fp-evm", "fp-rpc", "fp-storage", "futures", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "libsecp256k1 0.7.1", "log", - "lru 0.8.1", + "pallet-evm", "parity-scale-codec", "prometheus", "rand 0.8.5", "rlp", "sc-client-api", + "sc-consensus-aura", "sc-network", "sc-network-common", + "sc-network-sync", "sc-rpc", "sc-service", "sc-transaction-pool", "sc-transaction-pool-api", + "sc-utils", + "schnellru", + "serde", "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus", + "sp-consensus-aura", "sp-core", + "sp-inherents", "sp-io", "sp-runtime", + "sp-state-machine", "sp-storage", + "sp-timestamp", "substrate-prometheus-endpoint", + "thiserror", "tokio", ] [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", - "ethereum-types", - "jsonrpsee", - "rlp", + "ethereum 0.14.0", + "ethereum-types 0.14.1", + "jsonrpsee 0.16.3", "rustc-hex", "serde", "serde_json", ] +[[package]] +name = "fc-storage" +version = "1.0.0-dev" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" +dependencies = [ + "ethereum 0.14.0", + "ethereum-types 0.14.1", + "fp-rpc", + "fp-storage", + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-io", + "sp-runtime", + "sp-storage", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -2109,9 +2269,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.11.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", @@ -2129,7 +2289,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.2", + "env_logger", "log", ] @@ -2179,6 +2339,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", "static_assertions", ] @@ -2199,6 +2362,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2208,7 +2380,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", ] @@ -2222,12 +2394,31 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fp-account" +version = "1.0.0-dev" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" +dependencies = [ + "hex", + "impl-serde 0.4.0", + "libsecp256k1 0.7.1", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", +] + [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", + "ethereum 0.14.0", "parity-scale-codec", "sp-core", "sp-runtime", @@ -2237,57 +2428,56 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", - "ethereum-types", + "ethereum 0.14.0", + "ethereum-types 0.14.1", "fp-evm", "frame-support", - "num_enum", + "num_enum 0.6.1", "parity-scale-codec", - "sp-core", "sp-std", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "evm", + "evm 0.39.1", "frame-support", "parity-scale-codec", + "scale-info", "serde", "sp-core", + "sp-runtime", "sp-std", ] [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", - "ethereum-types", + "ethereum 0.14.0", + "ethereum-types 0.14.1", "fp-evm", "parity-scale-codec", "scale-info", "sp-api", "sp-core", - "sp-io", "sp-runtime", + "sp-state-machine", "sp-std", ] [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", "frame-support", "parity-scale-codec", - "parity-util-mem", "scale-info", "serde", "sp-runtime", @@ -2296,18 +2486,25 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "parity-scale-codec", "serde", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", + "frame-support-procedural", "frame-system", "linregress", "log", @@ -2323,33 +2520,31 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "array-bytes", "chrono", - "clap", + "clap 4.5.2", "comfy-table", "frame-benchmarking", "frame-support", "frame-system", "gethostname", "handlebars", - "hash-db", "itertools", - "kvdb", "lazy_static", "linked-hash-map", "log", - "memory-db", "parity-scale-codec", "rand 0.8.5", - "rand_pcg 0.3.1", + "rand_pcg", "sc-block-builder", "sc-cli", "sc-client-api", @@ -2359,19 +2554,19 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "serde_nanos", "sp-api", "sp-blockchain", "sp-core", "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", "sp-storage", "sp-trie", - "tempfile", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -2379,18 +2574,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2398,6 +2593,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2406,7 +2602,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -2422,9 +2618,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -2432,18 +2628,40 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "async-recursion", + "futures", + "indicatif", + "jsonrpsee 0.16.3", + "log", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "spinners", + "substrate-rpc-client", + "tokio", + "tokio-retry", +] + [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bitflags 1.3.2", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", @@ -2453,6 +2671,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", @@ -2467,44 +2686,49 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "cfg-expr", + "derive-syn-parse", + "expander", "frame-support-procedural-tools", "itertools", + "macro_magic", + "proc-macro-warning", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -2521,7 +2745,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2536,7 +2760,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-api", @@ -2545,7 +2769,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "parity-scale-codec", @@ -2555,15 +2779,12 @@ dependencies = [ ] [[package]] -name = "fs-swap" -version = "0.2.6" +name = "fs-err" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" dependencies = [ - "lazy_static", - "libc", - "libloading 0.5.2", - "winapi", + "autocfg", ] [[package]] @@ -2576,12 +2797,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "funty" version = "2.0.0" @@ -2637,31 +2852,13 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.13", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "fastrand 2.0.1", "futures-core", - "futures-io", - "parking", "pin-project-lite 0.2.13", ] @@ -2683,7 +2880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls", + "rustls 0.20.9", "webpki", ] @@ -2749,6 +2946,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2768,10 +2966,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2807,9 +3003,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -2841,23 +3037,11 @@ dependencies = [ "regex-syntax 0.8.2", ] -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "group" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", @@ -2903,6 +3087,12 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + [[package]] name = "hash256-std-hasher" version = "0.15.2" @@ -2921,6 +3111,15 @@ dependencies = [ "ahash 0.7.7", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + [[package]] name = "hashbrown" version = "0.14.3" @@ -2969,12 +3168,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -2995,6 +3188,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -3048,6 +3250,12 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -3092,17 +3300,19 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "log", - "rustls", + "rustls 0.21.10", "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots 0.25.4", ] [[package]] @@ -3116,7 +3326,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -3151,21 +3361,21 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "1.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 1.13.0", + "async-io", "core-foundation", "fnv", "futures", @@ -3174,6 +3384,7 @@ dependencies = [ "log", "rtnetlink", "system-configuration", + "tokio", "windows", ] @@ -3245,6 +3456,19 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -3272,12 +3496,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3363,25 +3581,39 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" dependencies = [ - "jsonrpsee-core", + "jsonrpsee-core 0.15.1", "jsonrpsee-http-server", - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", + "jsonrpsee-proc-macros 0.15.1", + "jsonrpsee-types 0.15.1", "jsonrpsee-ws-server", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +dependencies = [ + "jsonrpsee-core 0.16.3", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros 0.16.3", + "jsonrpsee-server", + "jsonrpsee-types 0.16.3", + "jsonrpsee-ws-client", + "tracing", +] + [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "pin-project", "rustls-native-certs", "soketto", @@ -3390,7 +3622,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.4", ] [[package]] @@ -3401,16 +3633,14 @@ checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock 2.8.0", "async-trait", "beef", "futures-channel", - "futures-timer", "futures-util", "globset", "http", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", @@ -3421,10 +3651,56 @@ dependencies = [ "thiserror", "tokio", "tracing", - "tracing-futures", "unicase", ] +[[package]] +name = "jsonrpsee-core" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +dependencies = [ + "anyhow", + "arrayvec 0.7.4", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types 0.16.3", + "parking_lot 0.12.1", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "jsonrpsee-http-server" version = "0.15.1" @@ -3434,8 +3710,8 @@ dependencies = [ "futures-channel", "futures-util", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", "serde", "serde_json", "tokio", @@ -3455,6 +3731,41 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +dependencies = [ + "heck", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +dependencies = [ + "futures-channel", + "futures-util", + "http", + "hyper", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + [[package]] name = "jsonrpsee-types" version = "0.15.1" @@ -3469,16 +3780,30 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", ] [[package]] @@ -3490,8 +3815,8 @@ dependencies = [ "futures-channel", "futures-util", "http", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", "serde_json", "soketto", "tokio", @@ -3503,14 +3828,15 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sec1", + "once_cell", + "sha2 0.10.8", ] [[package]] @@ -3522,48 +3848,33 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "kvdb" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.15.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ - "fs-swap", "kvdb", - "log", "num_cpus", - "owning_ref", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -3588,16 +3899,6 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -[[package]] -name = "libloading" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -dependencies = [ - "cc", - "winapi", -] - [[package]] name = "libloading" version = "0.8.1" @@ -3608,128 +3909,97 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "libp2p" -version = "0.46.1" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.12", "instant", - "lazy_static", - "libp2p-autonat", + "libp2p-allow-block-list", + "libp2p-connection-limits", "libp2p-core", - "libp2p-deflate", "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-rendezvous", + "libp2p-quic", "libp2p-request-response", "libp2p-swarm", - "libp2p-swarm-derive", "libp2p-tcp", - "libp2p-uds", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", - "smallvec", ] [[package]] -name = "libp2p-autonat" -version = "0.5.0" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "async-trait", - "futures", - "futures-timer", - "instant", "libp2p-core", - "libp2p-request-response", + "libp2p-identity", "libp2p-swarm", - "log", - "prost 0.10.4", - "prost-build 0.10.4", - "rand 0.8.5", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] name = "libp2p-core" -version = "0.34.0" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ - "asn1_der", - "bs58 0.4.0", - "ed25519-dalek", "either", "fnv", "futures", "futures-timer", "instant", - "lazy_static", - "libsecp256k1 0.7.1", + "libp2p-identity", "log", "multiaddr", "multihash", "multistream-select", + "once_cell", "parking_lot 0.12.1", "pin-project", - "prost 0.10.4", - "prost-build 0.10.4", + "quick-protobuf", "rand 0.8.5", - "ring 0.16.20", "rw-stream-sink", - "sha2 0.10.8", "smallvec", "thiserror", "unsigned-varint", "void", - "zeroize", -] - -[[package]] -name = "libp2p-deflate" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71" -dependencies = [ - "flate2", - "futures", - "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.34.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "async-std-resolver", "futures", "libp2p-core", "log", @@ -3739,77 +4009,50 @@ dependencies = [ ] [[package]] -name = "libp2p-floodsub" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231" -dependencies = [ - "cuckoofilter", - "fnv", - "futures", - "libp2p-core", - "libp2p-swarm", - "log", - "prost 0.10.4", - "prost-build 0.10.4", - "rand 0.7.3", - "smallvec", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.39.0" +name = "libp2p-identify" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", - "base64 0.13.1", - "byteorder", - "bytes", - "fnv", + "either", "futures", - "hex_fmt", - "instant", + "futures-timer", "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prometheus-client", - "prost 0.10.4", - "prost-build 0.10.4", - "rand 0.7.3", - "regex", - "sha2 0.10.8", + "lru", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", - "unsigned-varint", - "wasm-timer", + "thiserror", + "void", ] [[package]] -name = "libp2p-identify" -version = "0.37.0" +name = "libp2p-identity" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "asynchronous-codec", - "futures", - "futures-timer", - "libp2p-core", - "libp2p-swarm", + "bs58 0.4.0", + "ed25519-dalek 2.1.1", "log", - "lru 0.7.8", - "prost 0.10.4", - "prost-build 0.10.4", - "prost-codec", - "smallvec", + "multiaddr", + "multihash", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", "thiserror", - "void", + "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.38.0" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -3820,11 +4063,11 @@ dependencies = [ "futures-timer", "instant", "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prost 0.10.4", - "prost-build 0.10.4", - "rand 0.7.3", + "quick-protobuf", + "rand 0.8.5", "sha2 0.10.8", "smallvec", "thiserror", @@ -3835,136 +4078,68 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.38.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ - "async-io 1.13.0", "data-encoding", - "dns-parser", "futures", "if-watch", - "lazy_static", "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", "socket2 0.4.10", + "tokio", + "trust-dns-proto", "void", ] [[package]] name = "libp2p-metrics" -version = "0.7.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ "libp2p-core", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-relay", "libp2p-swarm", "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.7.3", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.37.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "lazy_static", "libp2p-core", + "libp2p-identity", "log", - "prost 0.10.4", - "prost-build 0.10.4", + "once_cell", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", "snow", "static_assertions", + "thiserror", "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925" -dependencies = [ - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core", - "log", - "prost 0.10.4", - "prost-build 0.10.4", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6468f382568da936b4fa1cff273ce59b1debf873ff5f4ca412c3b91d0b37442c" -dependencies = [ - "futures", - "log", - "pin-project", - "rand 0.8.5", - "salsa20", - "sha3 0.10.8", -] - -[[package]] -name = "libp2p-relay" -version = "0.10.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ - "asynchronous-codec", - "bytes", "either", "futures", "futures-timer", @@ -3972,63 +4147,53 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "pin-project", - "prost 0.10.4", - "prost-build 0.10.4", - "prost-codec", "rand 0.8.5", - "smallvec", - "static_assertions", - "thiserror", "void", ] [[package]] -name = "libp2p-rendezvous" -version = "0.7.0" +name = "libp2p-quic" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ - "asynchronous-codec", - "bimap", + "bytes", "futures", "futures-timer", - "instant", + "if-watch", "libp2p-core", - "libp2p-swarm", + "libp2p-identity", + "libp2p-tls", "log", - "prost 0.10.4", - "prost-build 0.10.4", + "parking_lot 0.12.1", + "quinn-proto", "rand 0.8.5", - "sha2 0.10.8", + "rustls 0.20.9", "thiserror", - "unsigned-varint", - "void", + "tokio", ] [[package]] name = "libp2p-request-response" -version = "0.19.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", "futures", "instant", "libp2p-core", + "libp2p-identity", "libp2p-swarm", - "log", - "rand 0.7.3", + "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.37.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", @@ -4036,58 +4201,66 @@ dependencies = [ "futures-timer", "instant", "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", "log", - "pin-project", - "rand 0.7.3", + "rand 0.8.5", "smallvec", - "thiserror", + "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.28.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ + "heck", "quote", "syn 1.0.109", ] [[package]] name = "libp2p-tcp" -version = "0.34.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "async-io 1.13.0", "futures", "futures-timer", "if-watch", - "ipnet", "libc", "libp2p-core", "log", "socket2 0.4.10", + "tokio", ] [[package]] -name = "libp2p-uds" -version = "0.33.0" +name = "libp2p-tls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "async-std", "futures", + "futures-rustls", "libp2p-core", - "log", + "libp2p-identity", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", + "thiserror", + "webpki", + "x509-parser", + "yasna", ] [[package]] name = "libp2p-wasm-ext" -version = "0.34.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", @@ -4099,9 +4272,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.36.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", @@ -4113,18 +4286,18 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "libp2p-yamux" -version = "0.38.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", "libp2p-core", - "parking_lot 0.12.1", + "log", "thiserror", "yamux", ] @@ -4142,9 +4315,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.6.3+6.28.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184ce2a189a817be2731070775ad053b6804a340fee05c6686d711db27455917" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -4262,6 +4435,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +dependencies = [ + "cc", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -4279,25 +4461,18 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", - "statrs", ] [[package]] name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" @@ -4320,26 +4495,14 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] [[package]] name = "lru" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -4380,6 +4543,60 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "match_cfg" version = "0.1.0" @@ -4437,30 +4654,22 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "memory-db" -version = "0.29.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "hash-db", - "hashbrown 0.12.3", - "parity-util-mem", + "hash-db 0.16.0", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -4511,16 +4720,44 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "multiaddr" -version = "0.14.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", - "bs58 0.4.0", "byteorder", "data-encoding", + "log", + "multibase", "multihash", "percent-encoding", "serde", @@ -4542,9 +4779,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -4579,9 +4816,9 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", "futures", @@ -4593,27 +4830,25 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.27.1" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" dependencies = [ "approx", "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.1", + "num-rational", "num-traits", - "rand 0.8.5", - "rand_distr", "simba", "typenum", ] [[package]] name = "nalgebra-macros" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -4688,11 +4923,11 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "async-io 1.13.0", "bytes", "futures", "libc", "log", + "tokio", ] [[package]] @@ -4706,12 +4941,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4728,28 +4957,23 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "num" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-complex", "num-integer", "num-iter", - "num-rational 0.4.1", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", + "num-rational", "num-traits", ] @@ -4773,6 +4997,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-format" version = "0.4.4" @@ -4804,18 +5034,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint 0.2.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -4823,7 +5041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", ] @@ -4835,7 +5053,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -4854,7 +5071,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -4869,14 +5095,32 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "indexmap 1.9.3", "memchr", ] @@ -4890,6 +5134,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -4920,25 +5173,17 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -4970,7 +5215,7 @@ dependencies = [ name = "pallet-assets-ext-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.15.1", "pallet-assets-ext", "pallet-assets-ext-rpc-runtime-api", "parity-scale-codec", @@ -5000,14 +5245,13 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-authorship", "sp-runtime", "sp-std", ] @@ -5015,7 +5259,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5028,7 +5272,7 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", + "sp-core", "sp-io", "sp-runtime", "sp-session", @@ -5039,7 +5283,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5059,7 +5303,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5074,14 +5318,13 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fp-evm", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-runtime", ] @@ -5135,7 +5378,7 @@ name = "pallet-dex-rpc" version = "0.0.1" dependencies = [ "frame-system", - "jsonrpsee", + "jsonrpsee 0.15.1", "pallet-dex", "pallet-dex-rpc-runtime-api", "seed-primitives", @@ -5214,7 +5457,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5223,7 +5466,7 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "sp-arithmetic", "sp-core", @@ -5231,14 +5474,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "static_assertions", - "strum", + "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5276,25 +5518,21 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ - "ethereum", - "ethereum-types", - "evm", + "ethereum 0.14.0", + "ethereum-types 0.14.1", + "evm 0.39.1", "fp-consensus", "fp-ethereum", "fp-evm", "fp-rpc", - "fp-self-contained", "fp-storage", "frame-support", "frame-system", "pallet-evm", - "pallet-timestamp", "parity-scale-codec", - "rlp", "scale-info", - "serde", "sp-io", "sp-runtime", "sp-std", @@ -5305,7 +5543,7 @@ name = "pallet-ethy" version = "1.0.1" dependencies = [ "ethabi", - "ethereum-types", + "ethereum-types 0.13.1", "frame-support", "frame-system", "hex", @@ -5333,22 +5571,22 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "environmental", - "evm", + "evm 0.39.1", + "fp-account", "fp-evm", "frame-benchmarking", "frame-support", "frame-system", "hex", + "hex-literal 0.4.1", + "impl-trait-for-tuples", "log", - "pallet-timestamp", "parity-scale-codec", - "primitive-types 0.11.1", "rlp", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -5376,7 +5614,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fp-evm", ] @@ -5384,7 +5622,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fp-evm", "num", @@ -5393,7 +5631,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fp-evm", "tiny-keccak", @@ -5402,7 +5640,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v0.9.30-TRN#c3c874fff9d23261ae5c2f40d086fa1924a79bcd" +source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "fp-evm", "ripemd", @@ -5416,7 +5654,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-assets", "pallet-dex", "pallet-evm", @@ -5432,11 +5670,11 @@ dependencies = [ name = "pallet-evm-precompiles-erc1155" version = "2.0.0" dependencies = [ - "ethereum-types", + "ethereum-types 0.13.1", "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-nft", "pallet-sft", @@ -5458,7 +5696,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-assets", "pallet-assets-ext", "pallet-evm", @@ -5480,7 +5718,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-nft", "pallet-token-approvals", @@ -5502,7 +5740,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-futurepass", "pallet-proxy", @@ -5521,7 +5759,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-futurepass", "pallet-proxy", @@ -5540,7 +5778,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-assets", "pallet-evm", "pallet-marketplace", @@ -5559,7 +5797,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-nft", "precompile-utils", @@ -5577,7 +5815,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-erc20-peg", "pallet-evm", "pallet-nft-peg", @@ -5596,7 +5834,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "pallet-sft", "precompile-utils", @@ -5702,7 +5940,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5713,8 +5951,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-io", "sp-runtime", "sp-session", @@ -5725,7 +5963,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5797,11 +6035,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", @@ -5866,7 +6105,7 @@ dependencies = [ name = "pallet-nft-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.15.1", "pallet-nft", "pallet-nft-rpc-runtime-api", "parity-scale-codec", @@ -5896,7 +6135,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5913,7 +6152,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -5930,11 +6169,12 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -5946,7 +6186,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5961,7 +6201,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5976,7 +6216,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5987,12 +6227,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6013,14 +6254,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.7.3", + "rand 0.8.5", "sp-runtime", "sp-session", "sp-std", @@ -6057,7 +6298,7 @@ dependencies = [ name = "pallet-sft-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.15.1", "pallet-sft", "pallet-sft-rpc-runtime-api", "parity-scale-codec", @@ -6087,7 +6328,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6110,19 +6351,20 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -6135,7 +6377,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6176,7 +6418,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -6192,9 +6434,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -6202,17 +6444,19 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", "sp-runtime", + "sp-weights", ] [[package]] @@ -6237,7 +6481,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6360,11 +6604,11 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.17" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ - "blake2-rfc", + "blake2", "crc32fast", "fs2", "hex", @@ -6374,7 +6618,9 @@ dependencies = [ "memmap2", "parking_lot 0.12.1", "rand 0.8.5", + "siphasher", "snap", + "winapi", ] [[package]] @@ -6410,44 +6656,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -[[package]] -name = "parity-util-mem" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" -dependencies = [ - "cfg-if", - "ethereum-types", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "lru 0.7.8", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types 0.11.1", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "parity-wasm" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" -dependencies = [ - "byteorder", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -6508,6 +6716,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" version = "1.0.14" @@ -6516,20 +6730,20 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.4.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac 0.11.0", ] [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac 0.11.0", + "digest 0.10.7", ] [[package]] @@ -6538,6 +6752,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -6637,26 +6860,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" -dependencies = [ - "atomic-waker", - "fastrand 2.0.1", - "futures-io", -] - [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -6665,34 +6876,12 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - [[package]] name = "platforms" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.13", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.3.2" @@ -6730,6 +6919,18 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -6741,7 +6942,7 @@ name = "precompile-utils" version = "0.1.0" dependencies = [ "affix", - "evm", + "evm 0.36.0", "fp-evm", "frame-support", "frame-system", @@ -6749,7 +6950,7 @@ dependencies = [ "hex-literal 0.3.4", "impl-trait-for-tuples", "log", - "num_enum", + "num_enum 0.5.11", "pallet-evm", "parity-scale-codec", "precompile-utils-macro", @@ -6764,13 +6965,43 @@ dependencies = [ name = "precompile-utils-macro" version = "0.1.0" dependencies = [ - "num_enum", + "num_enum 0.5.11", "proc-macro2", "quote", "sha3 0.8.2", "syn 1.0.109", ] +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "prettyplease" version = "0.1.25" @@ -6812,6 +7043,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde 0.4.0", + "scale-info", "uint", ] @@ -6822,7 +7057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", - "toml", + "toml 0.5.11", ] [[package]] @@ -6832,7 +7067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" dependencies = [ "toml_datetime", - "toml_edit", + "toml_edit 0.20.2", ] [[package]] @@ -6859,6 +7094,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-warning" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "proc-macro2" version = "1.0.78" @@ -6884,35 +7130,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.16.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", - "owning_ref", - "prometheus-client-derive-text-encode", + "parking_lot 0.12.1", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.2.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e12d01b9d66ad9eb4529c57666b6263fc1993cb30261d83ead658fdd932652" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" -dependencies = [ - "bytes", - "prost-derive 0.10.1", + "syn 2.0.48", ] [[package]] @@ -6922,29 +7158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost-build" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" -dependencies = [ - "bytes", - "cfg-if", - "cmake", - "heck", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost 0.10.4", - "prost-types 0.10.1", - "regex", - "tempfile", - "which", + "prost-derive", ] [[package]] @@ -6961,40 +7175,14 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost 0.11.9", - "prost-types 0.11.9", + "prost", + "prost-types", "regex", "syn 1.0.109", "tempfile", "which", ] -[[package]] -name = "prost-codec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost 0.10.4", - "thiserror", - "unsigned-varint", -] - -[[package]] -name = "prost-derive" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -7008,23 +7196,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prost-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" -dependencies = [ - "bytes", - "prost 0.10.4", -] - [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", + "prost", ] [[package]] @@ -7042,6 +7220,28 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -7053,6 +7253,24 @@ dependencies = [ "pin-project-lite 0.1.12", ] +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + [[package]] name = "quote" version = "1.0.35" @@ -7079,7 +7297,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg 0.2.1", ] [[package]] @@ -7123,38 +7340,19 @@ dependencies = [ ] [[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.12", -] - -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "rand_core 0.5.1", + "getrandom 0.2.12", ] [[package]] -name = "rand_pcg" -version = "0.2.1" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ "rand_core 0.5.1", ] @@ -7194,6 +7392,18 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -7245,9 +7455,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.3.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -7299,23 +7509,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "env_logger 0.9.3", - "jsonrpsee", - "log", - "parity-scale-codec", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -7328,13 +7521,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", - "hmac 0.11.0", - "zeroize", + "hmac 0.12.1", + "subtle", ] [[package]] @@ -7382,6 +7574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] @@ -7398,9 +7591,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.18.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -7423,13 +7616,13 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "async-global-executor", "futures", "log", "netlink-packet-route", "netlink-proto", "nix", "thiserror", + "tokio", ] [[package]] @@ -7470,31 +7663,26 @@ dependencies = [ ] [[package]] -name = "rustix" -version = "0.35.16" +name = "rusticata-macros" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5363f616a5244fd47fc1dd0a0b24c28a5c0154f5010c16332a7ad6f78f2e8b62" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", + "nom", ] [[package]] name = "rustix" -version = "0.37.27" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", - "errno 0.3.8", - "io-lifetimes 1.0.11", + "errno", + "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] @@ -7504,7 +7692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.2", - "errno 0.3.8", + "errno", "libc", "linux-raw-sys 0.4.13", "windows-sys 0.52.0", @@ -7522,6 +7710,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -7543,6 +7743,16 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -7567,12 +7777,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] -name = "salsa20" -version = "0.10.2" +name = "safe_arch" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ - "cipher", + "bytemuck", ] [[package]] @@ -7587,7 +7797,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-core", @@ -7598,7 +7808,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "futures-timer", @@ -7621,7 +7831,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7631,59 +7841,59 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", "sc-chain-spec-derive", - "sc-network-common", + "sc-client-api", + "sc-executor", + "sc-network", "sc-telemetry", "serde", "serde_json", + "sp-blockchain", "sp-core", "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "chrono", - "clap", + "clap 4.5.2", "fdlimit", "futures", - "libp2p", + "libp2p-identity", "log", "names", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -7705,11 +7915,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fnv", "futures", - "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -7722,20 +7931,19 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", - "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "hash-db", + "hash-db 0.16.0", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", @@ -7746,6 +7954,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-state-db", + "schnellru", "sp-arithmetic", "sp-blockchain", "sp-core", @@ -7758,13 +7967,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -7779,30 +7989,56 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "fork-tree", "futures", "log", - "merlin 2.0.1", - "num-bigint 0.2.6", - "num-rational 0.2.4", + "num-bigint", + "num-rational", "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", - "schnorrkel 0.9.1", - "serde", + "sc-transaction-pool-api", + "scale-info", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -7810,13 +8046,10 @@ dependencies = [ "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -7824,10 +8057,10 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", @@ -7846,7 +8079,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7857,193 +8090,152 @@ dependencies = [ ] [[package]] -name = "sc-consensus-slots" +name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "ahash 0.8.6", + "array-bytes", "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", "futures", "futures-timer", "log", "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-slots", + "sp-consensus-grandpa", "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "thiserror", -] - -[[package]] -name = "sc-consensus-uncles" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "sc-client-api", - "sp-authorship", + "sp-keystore", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] -name = "sc-executor" +name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "lazy_static", - "lru 0.7.8", + "finality-grandpa", + "futures", + "jsonrpsee 0.16.3", + "log", "parity-scale-codec", - "parking_lot 0.12.1", - "sc-executor-common", - "sc-executor-wasmi", - "sc-executor-wasmtime", - "sp-api", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", + "sp-blockchain", "sp-core", - "sp-core-hashing-proc-macro", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-tasks", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "tracing", - "wasmi", -] - -[[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "environmental", - "parity-scale-codec", - "sc-allocator", - "sp-maybe-compressed-blob", - "sp-sandbox", - "sp-wasm-interface", + "sp-runtime", "thiserror", - "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "log", - "parity-scale-codec", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-sandbox", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "cfg-if", - "libc", - "log", - "once_cell", - "parity-scale-codec", - "parity-wasm 0.45.0", - "rustix 0.35.16", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-sandbox", - "sp-wasm-interface", - "wasmtime", ] [[package]] -name = "sc-finality-grandpa" +name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.7.7", - "array-bytes", "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", "futures", "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", "sp-core", - "sp-finality-grandpa", - "sp-keystore", + "sp-inherents", "sp-runtime", - "substrate-prometheus-endpoint", + "sp-state-machine", +] + +[[package]] +name = "sc-executor" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor-common", + "sc-executor-wasmtime", + "schnellru", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-trie", + "sp-version", + "sp-wasm-interface", + "tracing", +] + +[[package]] +name = "sc-executor-common" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "sc-allocator", + "sp-maybe-compressed-blob", + "sp-wasm-interface", "thiserror", + "wasm-instrument", ] [[package]] -name = "sc-finality-grandpa-rpc" +name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee", + "anyhow", + "cfg-if", + "libc", "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", + "rustix 0.36.17", + "sc-allocator", + "sc-executor-common", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmtime", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "futures", "futures-timer", "log", - "parity-util-mem", "sc-client-api", + "sc-network", "sc-network-common", - "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -8051,10 +8243,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", - "async-trait", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -8066,109 +8257,94 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", + "async-channel", "async-trait", "asynchronous-codec", - "bitflags 1.3.2", "bytes", - "cid", "either", "fnv", - "fork-tree", "futures", "futures-timer", "ip_network", "libp2p", - "linked-hash-map", "linked_hash_set", "log", - "lru 0.7.8", + "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", - "prost 0.10.4", - "rand 0.7.3", - "sc-block-builder", + "rand 0.8.5", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-channel", "cid", "futures", - "libp2p", + "libp2p-identity", "log", - "prost 0.11.9", - "prost-build 0.11.9", + "prost", + "prost-build", "sc-client-api", - "sc-network-common", + "sc-network", "sp-blockchain", "sp-runtime", "thiserror", "unsigned-varint", - "void", ] [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "bitflags 1.3.2", - "bytes", "futures", - "futures-timer", - "libp2p", - "linked_hash_set", + "libp2p-identity", "parity-scale-codec", - "prost-build 0.10.4", + "prost-build", "sc-consensus", - "sc-peerset", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.7.7", + "ahash 0.8.6", "futures", "futures-timer", "libp2p", "log", - "lru 0.7.8", + "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -8177,18 +8353,18 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", + "async-channel", "futures", - "libp2p", + "libp2p-identity", "log", "parity-scale-codec", - "prost 0.10.4", - "prost-build 0.10.4", + "prost", + "prost-build", "sc-client-api", - "sc-network-common", - "sc-peerset", + "sc-network", "sp-blockchain", "sp-core", "sp-runtime", @@ -8198,44 +8374,49 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", + "async-channel", + "async-trait", "fork-tree", "futures", + "futures-timer", "libp2p", "log", - "lru 0.7.8", + "mockall", "parity-scale-codec", - "prost 0.10.4", - "prost-build 0.10.4", + "prost", + "prost-build", "sc-client-api", "sc-consensus", + "sc-network", "sc-network-common", - "sc-peerset", + "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-test" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "async-std", "async-trait", "futures", "futures-timer", "libp2p", "log", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -8244,30 +8425,30 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-service", + "sc-utils", "sp-blockchain", "sp-consensus", - "sp-consensus-babe", "sp-core", "sp-runtime", "sp-tracing", "substrate-test-runtime", "substrate-test-runtime-client", + "tokio", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "futures", - "hex", "libp2p", "log", "parity-scale-codec", - "pin-project", + "sc-network", "sc-network-common", - "sc-peerset", + "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", @@ -8276,7 +8457,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "bytes", @@ -8286,40 +8467,31 @@ dependencies = [ "hyper", "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "futures", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8328,11 +8500,10 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", - "hash-db", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8352,19 +8523,18 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", + "tokio", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures", - "jsonrpsee", - "log", + "jsonrpsee 0.16.3", "parity-scale-codec", - "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -8373,7 +8543,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", "sp-version", "thiserror", ] @@ -8381,34 +8550,60 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures", - "jsonrpsee", + "http", + "jsonrpsee 0.16.3", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", +] + +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "array-bytes", + "futures", + "futures-util", + "hex", + "jsonrpsee 0.16.3", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec", + "sc-client-api", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-version", + "thiserror", + "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "directories", "exit-future", "futures", "futures-timer", - "hash-db", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8423,9 +8618,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -8435,19 +8630,15 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-application-crypto", - "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", "sp-storage", - "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -8464,27 +8655,24 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "parity-scale-codec", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", - "sc-client-api", "sp-core", ] [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "libc", "log", - "rand 0.7.3", - "rand_pcg 0.2.1", + "rand 0.8.5", + "rand_pcg", "regex", "sc-telemetry", "serde", @@ -8497,7 +8685,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "chrono", "futures", @@ -8505,7 +8693,8 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", + "sc-utils", "serde", "serde_json", "thiserror", @@ -8515,7 +8704,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "atty", @@ -8523,12 +8712,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -8546,25 +8733,25 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-trait", "futures", "futures-timer", "linked-hash-map", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -8583,12 +8770,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-trait", "futures", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -8596,14 +8786,16 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-channel", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", + "sp-arithmetic", ] [[package]] @@ -8641,6 +8833,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.6", + "cfg-if", + "hashbrown 0.13.2", +] + [[package]] name = "schnorrkel" version = "0.9.1" @@ -8684,6 +8887,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scratch" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" + [[package]] name = "sct" version = "0.7.1" @@ -8696,10 +8905,11 @@ dependencies = [ [[package]] name = "sec1" -version = "0.2.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ + "base16ct", "der", "generic-array 0.14.7", "pkcs8", @@ -8761,7 +8971,7 @@ dependencies = [ name = "seed-client" version = "5.0.0" dependencies = [ - "clap", + "clap 3.2.25", "ethy-gadget", "ethy-gadget-rpc", "fc-consensus", @@ -8779,7 +8989,7 @@ dependencies = [ "futures", "hex", "hex-literal 0.3.4", - "jsonrpsee", + "jsonrpsee 0.15.1", "libsecp256k1 0.6.0", "log", "pallet-assets-ext-rpc", @@ -8796,10 +9006,9 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-babe-rpc", "sc-consensus-epochs", - "sc-consensus-uncles", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-executor", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", "sc-keystore", "sc-network", "sc-rpc", @@ -8811,13 +9020,12 @@ dependencies = [ "seed-primitives", "seed-runtime", "sp-api", - "sp-authorship", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-keyring", "sp-keystore", @@ -8879,14 +9087,15 @@ version = "0.1.0" dependencies = [ "doughnut-rs", "ethabi", - "ethereum", - "evm", + "ethereum 0.12.0", + "evm 0.36.0", "fp-evm", "fp-rpc", "fp-self-contained", "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -8965,7 +9174,6 @@ dependencies = [ "parity-scale-codec", "precompile-utils", "primitive-types 0.11.1", - "remote-externalities", "rustc-hex", "scale-info", "seed-client", @@ -9069,10 +9277,10 @@ dependencies = [ ] [[package]] -name = "serde_nanos" -version = "0.1.3" +name = "serde_spanned" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae801b7733ca8d6a2b580debe99f67f36826a0f5b8a36055dc6bc40f8d6bc71" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -9178,21 +9386,28 @@ name = "signature" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.9.0", + "digest 0.10.7", "rand_core 0.6.4", ] [[package]] name = "simba" -version = "0.5.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", "num-traits", "paste", + "wide", ] [[package]] @@ -9215,6 +9430,12 @@ dependencies = [ "similar", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" version = "0.4.9" @@ -9289,6 +9510,7 @@ dependencies = [ "bytes", "flate2", "futures", + "http", "httparse", "log", "rand 0.8.5", @@ -9298,13 +9520,16 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "hash-db", + "hash-db 0.16.0", "log", "parity-scale-codec", + "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", + "sp-metadata-ir", "sp-runtime", "sp-state-machine", "sp-std", @@ -9316,19 +9541,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "Inflector", "blake2", + "expander", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -9340,37 +9567,23 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "16.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", "sp-std", "static_assertions", ] -[[package]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -9380,13 +9593,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", - "lru 0.7.8", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -9398,33 +9611,28 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", - "futures-timer", "log", - "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-version", "thiserror", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -9435,79 +9643,77 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "merlin 2.0.1", "parity-scale-codec", "scale-info", "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", ] [[package]] -name = "sp-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "finality-grandpa", + "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", "sp-runtime", "sp-std", - "sp-timestamp", ] [[package]] -name = "sp-consensus-vrf" +name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", - "schnorrkel 0.9.1", - "sp-core", - "sp-runtime", + "serde", "sp-std", + "sp-timestamp", ] [[package]] name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "21.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", - "base58", "bitflags 1.3.2", "blake2", - "byteorder", + "bounded-collections", + "bs58 0.4.0", "dyn-clonable", "ed25519-zebra", "futures", - "hash-db", + "hash-db 0.16.0", "hash256-std-hasher", - "impl-serde 0.3.2", + "impl-serde 0.4.0", "lazy_static", "libsecp256k1 0.7.1", "log", "merlin 2.0.1", - "num-traits", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", - "primitive-types 0.11.1", - "rand 0.7.3", + "paste", + "primitive-types 0.12.2", + "rand 0.8.5", "regex", "scale-info", "schnorrkel 0.9.1", @@ -9524,39 +9730,37 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", "sha3 0.10.8", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "9.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -9564,52 +9768,34 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "0.19.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "environmental", "parity-scale-codec", "sp-std", - "sp-storage", -] - -[[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-storage", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", - "sp-core", + "scale-info", "sp-runtime", "sp-std", "thiserror", @@ -9617,16 +9803,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "23.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", - "futures", - "hash-db", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "libsecp256k1 0.7.1", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "rustversion", "secp256k1", "sp-core", "sp-externalities", @@ -9636,34 +9822,28 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "0.27.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "async-trait", - "futures", - "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", - "schnorrkel 0.9.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -9672,16 +9852,27 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "thiserror", - "zstd", + "zstd 0.12.4", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -9695,7 +9886,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-core", @@ -9704,8 +9895,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "backtrace", "lazy_static", @@ -9715,7 +9906,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "rustc-hash", "serde", @@ -9724,17 +9915,16 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "24.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", @@ -9747,13 +9937,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "17.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "primitive-types 0.11.1", + "primitive-types 0.12.2", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", @@ -9765,39 +9955,26 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "11.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "log", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", + "syn 2.0.48", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -9806,25 +9983,27 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", + "serde", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "0.28.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "hash-db", + "hash-db 0.16.0", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", @@ -9833,20 +10012,37 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-root", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", ] [[package]] name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "13.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-serde 0.3.2", + "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", @@ -9854,29 +10050,13 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", - "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -9885,8 +10065,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "10.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-std", @@ -9898,7 +10078,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-runtime", @@ -9907,10 +10087,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", @@ -9922,19 +10101,19 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "ahash 0.7.7", - "hash-db", - "hashbrown 0.12.3", + "ahash 0.8.6", + "hash-db 0.16.0", + "hashbrown 0.13.2", "lazy_static", - "lru 0.7.8", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", + "schnellru", "sp-core", "sp-std", "thiserror", @@ -9945,12 +10124,12 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "22.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-serde 0.3.2", + "impl-serde 0.4.0", "parity-scale-codec", - "parity-wasm 0.45.0", + "parity-wasm", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -9962,34 +10141,33 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "14.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +version = "20.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -10012,11 +10190,22 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spinners" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + [[package]] name = "spki" -version = "0.5.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -10078,23 +10267,16 @@ dependencies = [ ] [[package]] -name = "statrs" -version = "0.15.0" +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" -dependencies = [ - "approx", - "lazy_static", - "nalgebra", - "num-traits", - "rand 0.8.5", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" @@ -10102,9 +10284,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -10118,6 +10306,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", +] + [[package]] name = "substrate-bip39" version = "0.4.5" @@ -10134,25 +10335,20 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", - "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -10163,9 +10359,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures-util", "hyper", "log", "prometheus", @@ -10173,10 +10368,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-rpc-client" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "async-trait", + "jsonrpsee 0.16.3", + "log", + "sc-rpc-api", + "serde", + "sp-runtime", +] + [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "array-bytes", "async-trait", @@ -10202,37 +10410,33 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "beefy-merkle-tree", - "beefy-primitives", - "cfg-if", + "array-bytes", + "frame-executive", "frame-support", "frame-system", "frame-system-rpc-runtime-api", "log", - "memory-db", "pallet-babe", + "pallet-balances", "pallet-timestamp", "parity-scale-codec", - "parity-util-mem", "sc-service", "scale-info", - "serde", "sp-api", "sp-application-crypto", "sp-block-builder", "sp-consensus-aura", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", "sp-externalities", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-keyring", "sp-offchain", "sp-runtime", - "sp-runtime-interface", "sp-session", "sp-state-machine", "sp-std", @@ -10246,10 +10450,9 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", - "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -10265,18 +10468,19 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", - "toml", + "toml 0.7.8", "walkdir", - "wasm-gc-api", + "wasm-opt", ] [[package]] @@ -10359,7 +10563,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", "rustix 0.38.31", "windows-sys 0.52.0", @@ -10374,6 +10578,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + [[package]] name = "textwrap" version = "0.16.0" @@ -10427,28 +10637,58 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", - "fs_extra", "libc", ] +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ "anyhow", - "hmac 0.8.1", + "hmac 0.12.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.11.0", + "rand 0.8.5", "rustc-hash", - "sha2 0.9.9", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -10509,15 +10749,25 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", +] + [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.10", "tokio", - "webpki", ] [[package]] @@ -10529,6 +10779,7 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.13", "tokio", + "tokio-util", ] [[package]] @@ -10547,30 +10798,93 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.5.11" +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.2", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.2.2", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "serde", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "toml_datetime" -version = "0.6.3" +name = "tower-http" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +dependencies = [ + "bitflags 2.4.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.13", + "tower-layer", + "tower-service", +] [[package]] -name = "toml_edit" -version = "0.20.2" +name = "tower-layer" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.2.2", - "toml_datetime", - "winnow", -] +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" @@ -10584,6 +10898,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", @@ -10666,12 +10981,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ - "hash-db", - "hashbrown 0.12.3", + "hash-db 0.16.0", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -10679,11 +10994,11 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ - "hash-db", + "hash-db 0.16.0", ] [[package]] @@ -10692,7 +11007,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" dependencies = [ - "hash-db", + "hash-db 0.15.2", "rlp", ] @@ -10707,9 +11022,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" +checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", "cfg-if", @@ -10721,30 +11036,33 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "log", "rand 0.8.5", "smallvec", + "socket2 0.4.10", "thiserror", "tinyvec", + "tokio", + "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" +checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ "cfg-if", "futures-util", "ipconfig", "lazy_static", - "log", "lru-cache", "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", + "tokio", + "tracing", "trust-dns-proto", ] @@ -10757,27 +11075,36 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "clap", - "frame-try-runtime", - "jsonrpsee", + "async-trait", + "clap 4.5.2", + "frame-remote-externalities", + "hex", "log", "parity-scale-codec", - "remote-externalities", - "sc-chain-spec", "sc-cli", "sc-executor", - "sc-service", "serde", + "serde_json", + "sp-api", + "sp-consensus-aura", + "sp-consensus-babe", "sp-core", + "sp-debug-derive", "sp-externalities", + "sp-inherents", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", + "sp-timestamp", + "sp-transaction-storage-proof", "sp-version", - "zstd", + "sp-weights", + "substrate-rpc-client", + "zstd 0.12.4", ] [[package]] @@ -10916,16 +11243,16 @@ dependencies = [ ] [[package]] -name = "valuable" -version = "0.1.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] -name = "value-bag" -version = "1.7.0" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" @@ -10945,12 +11272,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "2.4.0" @@ -11048,88 +11369,85 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" -[[package]] -name = "wasm-gc-api" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" -dependencies = [ - "log", - "parity-wasm 0.32.0", - "rustc-demangle", -] - [[package]] name = "wasm-instrument" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "parity-wasm 0.45.0", + "parity-wasm", ] [[package]] -name = "wasm-timer" -version = "0.2.5" +name = "wasm-opt" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "anyhow", + "libc", + "strum 0.24.1", + "strum_macros 0.24.3", + "tempfile", + "thiserror", + "wasm-opt-cxx-sys", + "wasm-opt-sys", ] [[package]] -name = "wasmi" -version = "0.13.2" +name = "wasm-opt-cxx-sys" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ - "parity-wasm 0.45.0", - "wasmi-validation", - "wasmi_core", + "anyhow", + "cxx", + "cxx-build", + "wasm-opt-sys", ] [[package]] -name = "wasmi-validation" -version = "0.5.0" +name = "wasm-opt-sys" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ - "parity-wasm 0.45.0", + "anyhow", + "cc", + "cxx", + "cxx-build", ] [[package]] -name = "wasmi_core" -version = "0.2.1" +name = "wasm-timer" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational 0.4.1", - "num-traits", + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap 1.9.3", + "url", ] [[package]] name = "wasmtime" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -11137,7 +11455,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -11150,43 +11468,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.16", + "rustix 0.36.17", "serde", - "sha2 0.9.9", - "toml", - "windows-sys 0.36.1", - "zstd", + "sha2 0.10.8", + "toml 0.5.11", + "windows-sys 0.45.0", + "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -11194,27 +11512,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", + "gimli 0.27.3", "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -11224,45 +11558,55 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", - "rustix 0.35.16", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", - "rustix 0.35.16", + "rustix 0.36.17", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", @@ -11275,19 +11619,18 @@ dependencies = [ "memoffset", "paste", "rand 0.8.5", - "rustix 0.35.16", - "thiserror", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -11324,6 +11667,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "which" version = "4.4.2" @@ -11336,6 +11685,16 @@ dependencies = [ "rustix 0.38.31", ] +[[package]] +name = "wide" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "widestring" version = "1.0.2" @@ -11375,52 +11734,39 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core 0.51.1", + "windows-targets 0.48.5", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.48.5", ] [[package]] -name = "windows-sys" -version = "0.36.1" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.52.0", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.42.2", ] [[package]] @@ -11441,6 +11787,21 @@ dependencies = [ "windows-targets 0.52.0", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -11489,18 +11850,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -11519,18 +11868,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -11549,18 +11886,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -11579,18 +11904,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -11627,18 +11940,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -11696,6 +11997,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + [[package]] name = "xrpl-codec" version = "0.1.2" @@ -11761,6 +12080,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + [[package]] name = "zerocopy" version = "0.7.32" @@ -11807,7 +12135,16 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", ] [[package]] @@ -11820,6 +12157,16 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + [[package]] name = "zstd-sys" version = "2.0.9+zstd.1.5.5" diff --git a/client/Cargo.toml b/client/Cargo.toml index 87bd4d5d0..9cd2aefa8 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -25,11 +25,11 @@ hex-literal = "0.3.4" hex = "0.4" libsecp256k1 = { version = "0.6.0" } -sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } -sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"] , branch = "polkadot-v1.0.0" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } From 79220782612a65d7ac37234f95d7ee7643b7f6e4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:09:55 +1300 Subject: [PATCH 008/112] update toolchain file to nightly-2023-05-22 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 055b6ad6e..be5341847 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-03-20" +channel = "nightly-2023-05-22" targets = ["wasm32-unknown-unknown"] profile = "default" # include rustfmt, clippy From f3ffce5f81c25d339714c6832e5ce5bf76091193 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:11:06 +1300 Subject: [PATCH 009/112] point clap to 4.4.18 precise --- Cargo.lock | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16473c711..00b5c982c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,31 +859,31 @@ dependencies = [ "clap_lex 0.2.4", "indexmap 1.9.3", "once_cell", - "strsim 0.10.0", + "strsim", "termcolor", "textwrap", ] [[package]] name = "clap" -version = "4.5.2" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", - "clap_derive 4.5.0", + "clap_derive 4.4.7", ] [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.0", - "strsim 0.11.0", + "clap_lex 0.6.0", + "strsim", ] [[package]] @@ -901,9 +901,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", @@ -922,9 +922,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "clear_on_drop" @@ -2531,7 +2531,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.5.2", + "clap 4.4.18", "comfy-table", "frame-benchmarking", "frame-support", @@ -7880,7 +7880,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "array-bytes", "chrono", - "clap 4.5.2", + "clap 4.4.18", "fdlimit", "futures", "libp2p-identity", @@ -10272,12 +10272,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strsim" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" - [[package]] name = "strum" version = "0.24.1" @@ -11078,7 +11072,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "clap 4.5.2", + "clap 4.4.18", "frame-remote-externalities", "hex", "log", @@ -12035,7 +12029,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.48", + "syn 1.0.109", ] [[package]] From 93ac6c8e9bb33cc1bde6944aa3fa23825b96dd04 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:12:09 +1300 Subject: [PATCH 010/112] Update block_weights.rs to weight v2 manually for now --- runtime/constants/src/weights/block_weights.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/constants/src/weights/block_weights.rs b/runtime/constants/src/weights/block_weights.rs index d8ccd2be2..d71fdfb49 100644 --- a/runtime/constants/src/weights/block_weights.rs +++ b/runtime/constants/src/weights/block_weights.rs @@ -19,7 +19,7 @@ // --weight-path=./output use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_PER_NANOS, Weight}; +use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; parameter_types! { /// Time to execute an empty block. @@ -35,7 +35,8 @@ parameter_types! { /// 99th: 3_282_732 /// 95th: 3_187_359 /// 75th: 3_133_756 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(3_119_707); + pub const BlockExecutionWeight: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(3_119_707), 0); } #[cfg(test)] @@ -51,12 +52,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, "Weight should be at most 50 ms." ); } From e086466c6cd77e7b7d6cf414d113776d50a16212 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:31:37 +1300 Subject: [PATCH 011/112] Update code to support PrecompileSet::is_precompile() gas return changes. --- evm-precompiles/utils/src/precompile_set.rs | 73 ++++++++++++++------- 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/evm-precompiles/utils/src/precompile_set.rs b/evm-precompiles/utils/src/precompile_set.rs index 45ffc1095..a13264671 100644 --- a/evm-precompiles/utils/src/precompile_set.rs +++ b/evm-precompiles/utils/src/precompile_set.rs @@ -18,7 +18,10 @@ //! default and must be disabled explicely throught type annotations. use crate::{revert, StatefulPrecompile}; -use fp_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet}; +use fp_evm::{ + ExitError, IsPrecompileResult, Precompile, PrecompileFailure, PrecompileHandle, + PrecompileResult, PrecompileSet, +}; use frame_support::pallet_prelude::Get; use impl_trait_for_tuples::impl_for_tuples; use pallet_evm::AddressMapping; @@ -28,8 +31,22 @@ use sp_std::{ vec::Vec, }; -// CONFIGURATION TYPES +/// Result returning an EVM precompile error. +pub type EvmResult = Result; + +pub fn is_precompile( + precompile_set: &P, + address: H160, + remaining_gas: u64, +) -> EvmResult { + match precompile_set.is_precompile(address, remaining_gas) { + IsPrecompileResult::Answer { is_precompile, .. } => Ok(is_precompile), + IsPrecompileResult::OutOfGas => + Err(PrecompileFailure::Error { exit_status: ExitError::OutOfGas }), + } +} +// CONFIGURATION TYPES mod sealed { pub trait Sealed {} } @@ -113,7 +130,7 @@ pub trait PrecompileSetFragment { fn execute(&self, handle: &mut impl PrecompileHandle) -> Option; /// Is the provided address a precompile in this fragment? - fn is_precompile(&self, address: H160) -> bool; + fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult; /// Return the list of addresses covered by this fragment. fn used_addresses(&self) -> Vec; @@ -191,8 +208,8 @@ where } #[inline(always)] - fn is_precompile(&self, address: H160) -> bool { - address == A::get() + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { is_precompile: address == A::get(), extra_cost: 0 } } #[inline(always)] @@ -278,8 +295,8 @@ where } #[inline(always)] - fn is_precompile(&self, address: H160) -> bool { - address == A::get() + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { is_precompile: address == A::get(), extra_cost: 0 } } #[inline(always)] @@ -319,7 +336,7 @@ where fn execute(&self, handle: &mut impl PrecompileHandle) -> Option { let code_address = handle.code_address(); - if !self.is_precompile(code_address) { + if !is_precompile(&self.precompile_set, code_address, handle.remaining_gas()).ok()? { return None } @@ -369,8 +386,12 @@ where } #[inline(always)] - fn is_precompile(&self, address: H160) -> bool { - address.as_bytes().starts_with(A::get()) && self.precompile_set.is_precompile(address) + fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult { + if address.as_bytes().starts_with(A::get()) { + self.precompile_set.is_precompile(address, remaining_gas) + } else { + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } + } } #[inline(always)] @@ -403,8 +424,8 @@ where } #[inline(always)] - fn is_precompile(&self, address: H160) -> bool { - address == A::get() + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { is_precompile: address == A::get(), extra_cost: 0 } } #[inline(always)] @@ -435,14 +456,20 @@ impl PrecompileSetFragment for Tuple { } #[inline(always)] - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult { for_tuples!(#( - if self.Tuple.is_precompile(address) { - return true; - } + match self.Tuple.is_precompile(address, remaining_gas) { + IsPrecompileResult::Answer { + is_precompile: true, + .. + } => return IsPrecompileResult::Answer { + is_precompile: true, + extra_cost: 0, + }, + _ => {} + }; )*); - - false + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } } #[inline(always)] @@ -488,11 +515,11 @@ where } } - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult { if self.range.contains(&address) { - self.inner.is_precompile(address) + self.inner.is_precompile(address, remaining_gas) } else { - false + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } } } @@ -512,8 +539,8 @@ impl PrecompileSet for PrecompileSetBuilder { self.inner.execute(handle) } - fn is_precompile(&self, address: H160) -> bool { - self.inner.is_precompile(address) + fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult { + self.inner.is_precompile(address, remaining_gas) } } From 8a7c6a9c0609e1e48bbe9a1f3bf86db940bd2be0 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:11:31 +1300 Subject: [PATCH 012/112] Remove BlockNumber, Header from frame_system::Config, Add Block inside the config. --- primitives/src/test_utils.rs | 1 - runtime/src/lib.rs | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/primitives/src/test_utils.rs b/primitives/src/test_utils.rs index 647dda4fb..d1f330df5 100644 --- a/primitives/src/test_utils.rs +++ b/primitives/src/test_utils.rs @@ -60,7 +60,6 @@ where impl TestExt where T: frame_system::Config + pallet_balances::Config + pallet_assets::Config, - ::BlockNumber: From, ::Balance: From, ::Balance: From, T::AccountId: From, diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0a87ebc8a..526a050ff 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -274,6 +274,8 @@ pub type SlowAdjustingFeeUpdate = TargetedFeeAdjustment; impl frame_system::Config for Runtime { + /// The block type for the runtime. + type Block = Block; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. @@ -282,14 +284,10 @@ impl frame_system::Config for Runtime { type Lookup = IdentityLookup; /// The index type for storing how many extrinsics an account has signed. type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256Hash; - /// The header type. - type Header = Header; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -1314,15 +1312,8 @@ impl pallet_crowdsale::Config for Runtime { type WeightInfo = weights::pallet_crowdsale::WeightInfo; } -/// Block header type as expected by this runtime. -pub type Header = generic::Header; - -construct_runtime! { - pub enum Runtime where - Block = Block, - NodeBlock = generic::Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { +construct_runtime!( + pub enum Runtime { System: frame_system = 0, Babe: pallet_babe = 1, Timestamp: pallet_timestamp = 2, @@ -1382,7 +1373,10 @@ construct_runtime! { Proxy: pallet_proxy = 32, Futurepass: pallet_futurepass = 34, } -} +); + +/// Block header type as expected by this runtime. +pub type Header = generic::Header; /// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification From eb89ecaa2bb3fedd9f9fc8c5b96ef36020b4243b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:16:38 +1300 Subject: [PATCH 013/112] Update code to support AssetId trait removals #12740, new type aliases in pallet_assets::Config --- primitives/src/ethy.rs | 2 +- primitives/src/test_utils.rs | 27 +++++++++++++++------------ runtime/src/lib.rs | 7 +++++++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/primitives/src/ethy.rs b/primitives/src/ethy.rs index 7a2892b4c..0b19fb24e 100644 --- a/primitives/src/ethy.rs +++ b/primitives/src/ethy.rs @@ -88,7 +88,7 @@ pub type EventProofId = u64; pub type ValidatorSetId = u64; /// A set of ETHY authorities, a.k.a. validators. -#[derive(Decode, Encode, Debug, PartialEq, Clone)] +#[derive(Decode, Encode, Debug, PartialEq, Clone, TypeInfo)] pub struct ValidatorSet { /// Public keys of the validator set elements pub validators: Vec, diff --git a/primitives/src/test_utils.rs b/primitives/src/test_utils.rs index d1f330df5..9608867c3 100644 --- a/primitives/src/test_utils.rs +++ b/primitives/src/test_utils.rs @@ -14,19 +14,19 @@ // You may obtain a copy of the License at the root of this project source code use crate::*; -use frame_support::{sp_io, traits::GenesisBuild}; +use frame_support::sp_io; use sp_core::H160; +use sp_runtime::BuildStorage; -#[derive(Default)] struct AssetsFixture { - pub id: ::AssetId, + pub id: ::AssetIdParameter, pub symbol: Vec, pub endowments: Vec<(T::AccountId, ::Balance)>, } impl AssetsFixture { fn new( - id: ::AssetId, + id: ::AssetIdParameter, symbol: &[u8], endowments: &[(T::AccountId, ::Balance)], ) -> Self { @@ -38,7 +38,7 @@ impl AssetsFixture { pub struct TestExt { balances: Vec<(T::AccountId, ::Balance)>, xrp_balances: Vec<( - ::AssetId, + ::AssetIdParameter, T::AccountId, ::Balance, )>, @@ -63,7 +63,8 @@ where ::Balance: From, ::Balance: From, T::AccountId: From, - ::AssetId: From, + ::AssetIdParameter: From, + ::AssetId: From, ::Hash: From<[u8; 32]>, { /// Configure some native token balances @@ -79,7 +80,7 @@ where /// total supply = sum(endowments) pub fn with_asset( mut self, - id: ::AssetId, + id: ::AssetIdParameter, name: &str, endowments: &[(T::AccountId, ::Balance)], ) -> Self { @@ -108,7 +109,7 @@ where /// Build the Text Externalities for general use across all pallets pub fn build(self) -> sp_io::TestExternalities { - let mut ext = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut ext = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut assets = Vec::default(); let mut metadata = Vec::default(); let mut accounts = Vec::default(); @@ -117,10 +118,10 @@ where // add assets if !self.assets.is_empty() { for AssetsFixture { id, symbol, endowments } in self.assets { - assets.push((id, default_owner.clone(), true, 1.into())); - metadata.push((id, symbol.clone(), symbol, 6)); + assets.push((id.into(), default_owner.clone(), true, 1.into())); + metadata.push((id.into(), symbol.clone(), symbol, 6)); for (payee, balance) in endowments { - accounts.push((id, payee, balance)); + accounts.push((id.into(), payee, balance)); } } } @@ -129,7 +130,9 @@ where if !self.xrp_balances.is_empty() { assets.push((2.into(), default_owner, true, 1.into())); metadata.push((2.into(), b"XRP".to_vec(), b"XRP".to_vec(), 6_u8)); - accounts.extend(self.xrp_balances); + for (_, payee, balance) in self.xrp_balances { + accounts.push((2.into(), payee, balance)); + } } // Configure pallet_assets Genesis Config with assets diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 526a050ff..3433328d6 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -391,6 +391,13 @@ impl pallet_assets::Config for Runtime { type Extra = (); type WeightInfo = weights::pallet_assets::WeightInfo; type AssetAccountDeposit = AssetAccountDeposit; + type RemoveItemsLimit = ConstU32<100>; + type AssetIdParameter = AssetId; + type CreateOrigin = (); + type CallbackHandle = (); + pallet_assets::runtime_benchmarks_enabled! { + type BenchmarkHelper = BenchmarkHelper; + } } parameter_types! { From 9cbefedd3f4d7d8a06ccb83c302e6da910e9f17f Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:28:19 +1300 Subject: [PATCH 014/112] temp - get rid of weight v2 errors for now --- pallet/assets-ext/src/weights.rs | 8 +- pallet/crowdsale/src/weights.rs | 40 ++++----- pallet/dex/src/weights.rs | 28 +++--- pallet/doughnut/src/weights.rs | 16 ++-- pallet/echo/src/weights.rs | 4 +- pallet/erc20-peg/src/weights.rs | 32 +++---- pallet/ethy/src/mock.rs | 2 +- pallet/ethy/src/tests.rs | 4 +- pallet/evm-chain-id/src/weights.rs | 4 +- pallet/fee-control/src/weights.rs | 8 +- pallet/fee-proxy/src/lib.rs | 2 +- pallet/futurepass/src/weights.rs | 36 ++++---- pallet/maintenance-mode/src/weights.rs | 20 ++--- pallet/marketplace/src/weights.rs | 76 ++++++++-------- pallet/nft-peg/src/weights.rs | 12 +-- pallet/nft/src/weights.rs | 48 +++++----- pallet/sft/src/weights.rs | 52 +++++------ pallet/token-approvals/src/weights.rs | 24 ++--- pallet/vortex-distribution/src/weights.rs | 40 ++++----- pallet/xls20/src/weights.rs | 20 ++--- pallet/xrpl-bridge/src/tests.rs | 46 +++++----- pallet/xrpl-bridge/src/weights.rs | 60 ++++++------- pallet/xrpl/src/tests.rs | 2 +- pallet/xrpl/src/weights.rs | 4 +- runtime/src/lib.rs | 4 +- runtime/src/migrations/mod.rs | 2 +- runtime/src/tests/multiplier.rs | 18 ++-- runtime/src/weights/frame_benchmarking.rs | 24 ++--- runtime/src/weights/frame_system.rs | 22 ++--- runtime/src/weights/pallet_assets.rs | 56 ++++++------ runtime/src/weights/pallet_assets_ext.rs | 4 +- runtime/src/weights/pallet_bags_list.rs | 6 +- runtime/src/weights/pallet_balances.rs | 14 +-- runtime/src/weights/pallet_crowdsale.rs | 20 ++--- runtime/src/weights/pallet_dex.rs | 14 +-- runtime/src/weights/pallet_doughnut.rs | 8 +- runtime/src/weights/pallet_echo.rs | 2 +- .../pallet_election_provider_multi_phase.rs | 32 +++---- runtime/src/weights/pallet_erc20_peg.rs | 16 ++-- runtime/src/weights/pallet_evm_chain_id.rs | 2 +- runtime/src/weights/pallet_fee_control.rs | 4 +- runtime/src/weights/pallet_futurepass.rs | 18 ++-- runtime/src/weights/pallet_im_online.rs | 6 +- .../src/weights/pallet_maintenance_mode.rs | 10 +-- runtime/src/weights/pallet_marketplace.rs | 38 ++++---- runtime/src/weights/pallet_multisig.rs | 50 +++++------ runtime/src/weights/pallet_nft.rs | 24 ++--- runtime/src/weights/pallet_nft_peg.rs | 6 +- runtime/src/weights/pallet_preimage.rs | 30 +++---- runtime/src/weights/pallet_proxy.rs | 48 +++++----- runtime/src/weights/pallet_recovery.rs | 28 +++--- runtime/src/weights/pallet_scheduler.rs | 56 ++++++------ runtime/src/weights/pallet_session.rs | 4 +- runtime/src/weights/pallet_sft.rs | 26 +++--- runtime/src/weights/pallet_staking.rs | 90 +++++++++---------- runtime/src/weights/pallet_timestamp.rs | 4 +- runtime/src/weights/pallet_token_approvals.rs | 12 +-- runtime/src/weights/pallet_utility.rs | 16 ++-- runtime/src/weights/pallet_vortex.rs | 20 ++--- runtime/src/weights/pallet_xls20.rs | 10 +-- runtime/src/weights/pallet_xrpl.rs | 2 +- runtime/src/weights/pallet_xrpl_bridge.rs | 30 +++---- scripts/pallet_template.hbs | 8 +- 63 files changed, 686 insertions(+), 686 deletions(-) diff --git a/pallet/assets-ext/src/weights.rs b/pallet/assets-ext/src/weights.rs index 04e1d80b4..a3f7c3375 100644 --- a/pallet/assets-ext/src/weights.rs +++ b/pallet/assets-ext/src/weights.rs @@ -62,13 +62,13 @@ impl WeightInfo for SubstrateWeight { // Storage: Futurepass DefaultProxy (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn create_asset() -> Weight { - Weight::from_ref_time(175_374_000 as u64) + Weight::from_all(175_374_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetsExt AssetDeposit (r:0 w:1) fn set_asset_deposit() -> Weight { - Weight::from_ref_time(9_969_000 as u64) + Weight::from_all(9_969_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -82,13 +82,13 @@ impl WeightInfo for () { // Storage: Futurepass DefaultProxy (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn create_asset() -> Weight { - Weight::from_ref_time(175_374_000 as u64) + Weight::from_all(175_374_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: AssetsExt AssetDeposit (r:0 w:1) fn set_asset_deposit() -> Weight { - Weight::from_ref_time(9_969_000 as u64) + Weight::from_all(9_969_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/crowdsale/src/weights.rs b/pallet/crowdsale/src/weights.rs index e197280ca..fbab34ed0 100644 --- a/pallet/crowdsale/src/weights.rs +++ b/pallet/crowdsale/src/weights.rs @@ -73,14 +73,14 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:1 w:1) // Storage: Crowdsale SaleInfo (r:0 w:1) fn initialize() -> Weight { - Weight::from_ref_time(243_613_000 as u64) + Weight::from_all(243_613_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleEndBlocks (r:1 w:1) fn enable() -> Weight { - Weight::from_ref_time(71_177_000 as u64) + Weight::from_all(71_177_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -90,7 +90,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleParticipation (r:1 w:1) fn participate() -> Weight { - Weight::from_ref_time(158_737_000 as u64) + Weight::from_all(158_737_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -103,7 +103,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) // Storage: Crowdsale NextUnsignedAt (r:0 w:1) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_ref_time(244_482_000 as u64) + Weight::from_all(244_482_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -115,7 +115,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn claim_voucher() -> Weight { - Weight::from_ref_time(239_613_000 as u64) + Weight::from_all(239_613_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -126,14 +126,14 @@ impl WeightInfo for SubstrateWeight { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: Nft PublicMintInfo (r:1 w:0) fn redeem_voucher() -> Weight { - Weight::from_ref_time(177_082_000 as u64) + Weight::from_all(177_082_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn try_force_distribution() -> Weight { - Weight::from_ref_time(66_937_000 as u64) + Weight::from_all(66_937_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -146,9 +146,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Crowdsale SaleDistribution (r:1 w:1) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_ref_time(209_808_000 as u64) + Weight::from_all(209_808_000 as u64) // Standard Error: 945_171 - .saturating_add(Weight::from_ref_time(96_603_123 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(96_603_123 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().reads((6 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(11 as u64)) @@ -156,7 +156,7 @@ impl WeightInfo for SubstrateWeight { } // Storage: Crowdsale SaleEndBlocks (r:1 w:0) fn on_initialize_empty() -> Weight { - Weight::from_ref_time(10_200_000 as u64) + Weight::from_all(10_200_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } @@ -174,14 +174,14 @@ impl WeightInfo for () { // Storage: Assets Account (r:1 w:1) // Storage: Crowdsale SaleInfo (r:0 w:1) fn initialize() -> Weight { - Weight::from_ref_time(243_613_000 as u64) + Weight::from_all(243_613_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleEndBlocks (r:1 w:1) fn enable() -> Weight { - Weight::from_ref_time(71_177_000 as u64) + Weight::from_all(71_177_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -191,7 +191,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleParticipation (r:1 w:1) fn participate() -> Weight { - Weight::from_ref_time(158_737_000 as u64) + Weight::from_all(158_737_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -204,7 +204,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Storage: Crowdsale NextUnsignedAt (r:0 w:1) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_ref_time(244_482_000 as u64) + Weight::from_all(244_482_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -216,7 +216,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn claim_voucher() -> Weight { - Weight::from_ref_time(239_613_000 as u64) + Weight::from_all(239_613_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -227,14 +227,14 @@ impl WeightInfo for () { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: Nft PublicMintInfo (r:1 w:0) fn redeem_voucher() -> Weight { - Weight::from_ref_time(177_082_000 as u64) + Weight::from_all(177_082_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn try_force_distribution() -> Weight { - Weight::from_ref_time(66_937_000 as u64) + Weight::from_all(66_937_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -247,9 +247,9 @@ impl WeightInfo for () { // Storage: Crowdsale SaleDistribution (r:1 w:1) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_ref_time(209_808_000 as u64) + Weight::from_all(209_808_000 as u64) // Standard Error: 945_171 - .saturating_add(Weight::from_ref_time(96_603_123 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(96_603_123 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().reads((6 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(11 as u64)) @@ -257,7 +257,7 @@ impl WeightInfo for () { } // Storage: Crowdsale SaleEndBlocks (r:1 w:0) fn on_initialize_empty() -> Weight { - Weight::from_ref_time(10_200_000 as u64) + Weight::from_all(10_200_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } } diff --git a/pallet/dex/src/weights.rs b/pallet/dex/src/weights.rs index ca3768be7..2a578cb92 100644 --- a/pallet/dex/src/weights.rs +++ b/pallet/dex/src/weights.rs @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_with_exact_supply() -> Weight { - Weight::from_ref_time(212_601_000 as u64) + Weight::from_all(212_601_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -74,7 +74,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_with_exact_target() -> Weight { - Weight::from_ref_time(214_052_000 as u64) + Weight::from_all(214_052_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -91,7 +91,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Dex FeeTo (r:1 w:0) // Storage: Dex TradingPairStatuses (r:0 w:1) fn add_liquidity() -> Weight { - Weight::from_ref_time(418_386_000 as u64) + Weight::from_all(418_386_000 as u64) .saturating_add(T::DbWeight::get().reads(23 as u64)) .saturating_add(T::DbWeight::get().writes(20 as u64)) } @@ -103,27 +103,27 @@ impl WeightInfo for SubstrateWeight { // Storage: Dex LiquidityPoolLastK (r:1 w:1) // Storage: Dex FeeTo (r:1 w:0) fn remove_liquidity() -> Weight { - Weight::from_ref_time(338_661_000 as u64) + Weight::from_all(338_661_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn reenable_trading_pair() -> Weight { - Weight::from_ref_time(70_315_000 as u64) + Weight::from_all(70_315_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn disable_trading_pair() -> Weight { - Weight::from_ref_time(70_865_000 as u64) + Weight::from_all(70_865_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Dex FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(41_952_000 as u64) + Weight::from_all(41_952_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -135,7 +135,7 @@ impl WeightInfo for () { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_with_exact_supply() -> Weight { - Weight::from_ref_time(212_601_000 as u64) + Weight::from_all(212_601_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -144,7 +144,7 @@ impl WeightInfo for () { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_with_exact_target() -> Weight { - Weight::from_ref_time(214_052_000 as u64) + Weight::from_all(214_052_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -161,7 +161,7 @@ impl WeightInfo for () { // Storage: Dex FeeTo (r:1 w:0) // Storage: Dex TradingPairStatuses (r:0 w:1) fn add_liquidity() -> Weight { - Weight::from_ref_time(418_386_000 as u64) + Weight::from_all(418_386_000 as u64) .saturating_add(RocksDbWeight::get().reads(23 as u64)) .saturating_add(RocksDbWeight::get().writes(20 as u64)) } @@ -173,27 +173,27 @@ impl WeightInfo for () { // Storage: Dex LiquidityPoolLastK (r:1 w:1) // Storage: Dex FeeTo (r:1 w:0) fn remove_liquidity() -> Weight { - Weight::from_ref_time(338_661_000 as u64) + Weight::from_all(338_661_000 as u64) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn reenable_trading_pair() -> Weight { - Weight::from_ref_time(70_315_000 as u64) + Weight::from_all(70_315_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn disable_trading_pair() -> Weight { - Weight::from_ref_time(70_865_000 as u64) + Weight::from_all(70_865_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Dex FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(41_952_000 as u64) + Weight::from_all(41_952_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/doughnut/src/weights.rs b/pallet/doughnut/src/weights.rs index 4a97cbb7d..3cdf5f69c 100644 --- a/pallet/doughnut/src/weights.rs +++ b/pallet/doughnut/src/weights.rs @@ -63,22 +63,22 @@ impl WeightInfo for SubstrateWeight { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(209_000_000 as u64) + Weight::from_all(209_000_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) } // Storage: Doughnut BlockedDoughnuts (r:0 w:1) fn revoke_doughnut() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Doughnut BlockedHolders (r:0 w:1) fn revoke_holder() -> Weight { - Weight::from_ref_time(5_000_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Doughnut WhitelistedHolders (r:0 w:1) fn update_whitelisted_holders() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -91,22 +91,22 @@ impl WeightInfo for () { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(209_000_000 as u64) + Weight::from_all(209_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } // Storage: Doughnut BlockedDoughnuts (r:0 w:1) fn revoke_doughnut() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Doughnut BlockedHolders (r:0 w:1) fn revoke_holder() -> Weight { - Weight::from_ref_time(5_000_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Doughnut WhitelistedHolders (r:0 w:1) fn update_whitelisted_holders() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/echo/src/weights.rs b/pallet/echo/src/weights.rs index 7880892e3..d0316a340 100644 --- a/pallet/echo/src/weights.rs +++ b/pallet/echo/src/weights.rs @@ -61,7 +61,7 @@ impl WeightInfo for SubstrateWeight { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn ping() -> Weight { - Weight::from_ref_time(85_832_000 as u64) + Weight::from_all(85_832_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -76,7 +76,7 @@ impl WeightInfo for () { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn ping() -> Weight { - Weight::from_ref_time(85_832_000 as u64) + Weight::from_all(85_832_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/erc20-peg/src/weights.rs b/pallet/erc20-peg/src/weights.rs index 9e8dd7104..092f8b617 100644 --- a/pallet/erc20-peg/src/weights.rs +++ b/pallet/erc20-peg/src/weights.rs @@ -63,12 +63,12 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Erc20Peg DepositsActive (r:0 w:1) fn activate_deposits() -> Weight { - Weight::from_ref_time(18_206_000 as u64) + Weight::from_all(18_206_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) fn activate_withdrawals() -> Weight { - Weight::from_ref_time(17_749_000 as u64) + Weight::from_all(17_749_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) @@ -83,34 +83,34 @@ impl WeightInfo for SubstrateWeight { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(164_469_000 as u64) + Weight::from_all(164_469_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Erc20Peg ContractAddress (r:0 w:1) fn set_erc20_peg_address() -> Weight { - Weight::from_ref_time(44_122_000 as u64) + Weight::from_all(44_122_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) fn set_root_peg_address() -> Weight { - Weight::from_ref_time(11_772_000 as u64) + Weight::from_all(11_772_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) fn set_erc20_asset_map() -> Weight { - Weight::from_ref_time(5_891_000 as u64) + Weight::from_all(5_891_000 as u64) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Erc20Peg Erc20Meta (r:0 w:1) fn set_erc20_meta() -> Weight { - Weight::from_ref_time(21_600_000 as u64) + Weight::from_all(21_600_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(43_768_000 as u64) + Weight::from_all(43_768_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -119,12 +119,12 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Erc20Peg DepositsActive (r:0 w:1) fn activate_deposits() -> Weight { - Weight::from_ref_time(18_206_000 as u64) + Weight::from_all(18_206_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) fn activate_withdrawals() -> Weight { - Weight::from_ref_time(17_749_000 as u64) + Weight::from_all(17_749_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) @@ -139,34 +139,34 @@ impl WeightInfo for () { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(164_469_000 as u64) + Weight::from_all(164_469_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Erc20Peg ContractAddress (r:0 w:1) fn set_erc20_peg_address() -> Weight { - Weight::from_ref_time(44_122_000 as u64) + Weight::from_all(44_122_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) fn set_root_peg_address() -> Weight { - Weight::from_ref_time(11_772_000 as u64) + Weight::from_all(11_772_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) fn set_erc20_asset_map() -> Weight { - Weight::from_ref_time(5_891_000 as u64) + Weight::from_all(5_891_000 as u64) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Erc20Peg Erc20Meta (r:0 w:1) fn set_erc20_meta() -> Weight { - Weight::from_ref_time(21_600_000 as u64) + Weight::from_all(21_600_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(43_768_000 as u64) + Weight::from_all(43_768_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/ethy/src/mock.rs b/pallet/ethy/src/mock.rs index ac2da1135..6ac591312 100644 --- a/pallet/ethy/src/mock.rs +++ b/pallet/ethy/src/mock.rs @@ -454,7 +454,7 @@ impl MockValidatorSet { pub struct MockEventRouter; impl EthereumEventRouter for MockEventRouter { fn route(_source: &H160, _destination: &H160, _data: &[u8]) -> EventRouterResult { - Ok(Weight::from_ref_time(1000)) + Ok(Weight::from_all(1000)) } } diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index fb12d54c5..354a84a3b 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -625,7 +625,7 @@ fn process_valid_challenged_event() { // Weight returned should include the 1000 that we specified in our mock assert_eq!( EthBridge::on_initialize(process_at), - DbWeight::get().reads(2u64) + Weight::from_ref_time(1000u64) + DbWeight::get().reads(2u64) + Weight::from_all(1000u64) ); // Storage should now be fully cleared @@ -720,7 +720,7 @@ fn process_valid_challenged_event_delayed() { // Weight returned should include the 1000 that we specified in our mock assert_eq!( EthBridge::on_initialize(process_at_extended), - DbWeight::get().reads(2u64) + Weight::from_ref_time(1000u64) + DbWeight::get().reads(2u64) + Weight::from_all(1000u64) ); // Storage should now be fully cleared diff --git a/pallet/evm-chain-id/src/weights.rs b/pallet/evm-chain-id/src/weights.rs index 8a61db78d..15060e6af 100644 --- a/pallet/evm-chain-id/src/weights.rs +++ b/pallet/evm-chain-id/src/weights.rs @@ -56,7 +56,7 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: EVMChainId ChainId (r:0 w:1) fn set_chain_id() -> Weight { - Weight::from_ref_time(35_950_000 as u64) + Weight::from_all(35_950_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: EVMChainId ChainId (r:0 w:1) fn set_chain_id() -> Weight { - Weight::from_ref_time(35_950_000 as u64) + Weight::from_all(35_950_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/fee-control/src/weights.rs b/pallet/fee-control/src/weights.rs index f35411666..6e02245e6 100644 --- a/pallet/fee-control/src/weights.rs +++ b/pallet/fee-control/src/weights.rs @@ -57,13 +57,13 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: FeeControl Data (r:1 w:1) fn set_evm_base_fee() -> Weight { - Weight::from_ref_time(19_761_000 as u64) + Weight::from_all(19_761_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: FeeControl Data (r:1 w:1) fn set_weight_multiplier() -> Weight { - Weight::from_ref_time(19_275_000 as u64) + Weight::from_all(19_275_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -73,13 +73,13 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: FeeControl Data (r:1 w:1) fn set_evm_base_fee() -> Weight { - Weight::from_ref_time(19_761_000 as u64) + Weight::from_all(19_761_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: FeeControl Data (r:1 w:1) fn set_weight_multiplier() -> Weight { - Weight::from_ref_time(19_275_000 as u64) + Weight::from_all(19_275_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/fee-proxy/src/lib.rs b/pallet/fee-proxy/src/lib.rs index 2c7b8d5df..1722f778c 100644 --- a/pallet/fee-proxy/src/lib.rs +++ b/pallet/fee-proxy/src/lib.rs @@ -108,7 +108,7 @@ pub mod pallet { /// call: The inner call to be performed after the exchange #[pallet::weight({ let dispatch_info = call.get_dispatch_info(); - (dispatch_info.weight.saturating_add(Weight::from_ref_time(10_000u64)), dispatch_info.class) + (dispatch_info.weight.saturating_add(Weight::from_all(10_000u64)), dispatch_info.class) })] pub fn call_with_fee_preferences( origin: OriginFor, diff --git a/pallet/futurepass/src/weights.rs b/pallet/futurepass/src/weights.rs index d4b42f925..d0d395dac 100644 --- a/pallet/futurepass/src/weights.rs +++ b/pallet/futurepass/src/weights.rs @@ -63,7 +63,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Proxy Proxies (r:1 w:1) // Storage: System Account (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(146_058_000 as u64) + Weight::from_all(146_058_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -72,9 +72,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_ref_time(220_928_000 as u64) + Weight::from_all(220_928_000 as u64) // Standard Error: 4_617 - .saturating_add(Weight::from_ref_time(306_992 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(306_992 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -83,9 +83,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_ref_time(146_646_000 as u64) + Weight::from_all(146_646_000 as u64) // Standard Error: 3_409 - .saturating_add(Weight::from_ref_time(290_417 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(290_417 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -94,9 +94,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_ref_time(200_511_000 as u64) + Weight::from_all(200_511_000 as u64) // Standard Error: 76_919 - .saturating_add(Weight::from_ref_time(50_389_234 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(50_389_234 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -105,9 +105,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_ref_time(90_896_000 as u64) + Weight::from_all(90_896_000 as u64) // Standard Error: 3_422 - .saturating_add(Weight::from_ref_time(192_298 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(192_298 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) } } @@ -119,7 +119,7 @@ impl WeightInfo for () { // Storage: Proxy Proxies (r:1 w:1) // Storage: System Account (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(146_058_000 as u64) + Weight::from_all(146_058_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -128,9 +128,9 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_ref_time(220_928_000 as u64) + Weight::from_all(220_928_000 as u64) // Standard Error: 4_617 - .saturating_add(Weight::from_ref_time(306_992 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(306_992 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -139,9 +139,9 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_ref_time(146_646_000 as u64) + Weight::from_all(146_646_000 as u64) // Standard Error: 3_409 - .saturating_add(Weight::from_ref_time(290_417 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(290_417 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -150,9 +150,9 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_ref_time(200_511_000 as u64) + Weight::from_all(200_511_000 as u64) // Standard Error: 76_919 - .saturating_add(Weight::from_ref_time(50_389_234 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(50_389_234 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -161,9 +161,9 @@ impl WeightInfo for () { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_ref_time(90_896_000 as u64) + Weight::from_all(90_896_000 as u64) // Standard Error: 3_422 - .saturating_add(Weight::from_ref_time(192_298 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(192_298 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } } diff --git a/pallet/maintenance-mode/src/weights.rs b/pallet/maintenance-mode/src/weights.rs index 13bb11eb7..af848ddac 100644 --- a/pallet/maintenance-mode/src/weights.rs +++ b/pallet/maintenance-mode/src/weights.rs @@ -60,27 +60,27 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) fn enable_maintenance_mode() -> Weight { - Weight::from_ref_time(37_073_000 as u64) + Weight::from_all(37_073_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) fn block_account() -> Weight { - Weight::from_ref_time(39_394_000 as u64) + Weight::from_all(39_394_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) fn block_evm_target() -> Weight { - Weight::from_ref_time(40_700_000 as u64) + Weight::from_all(40_700_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedCalls (r:0 w:1) fn block_call() -> Weight { - Weight::from_ref_time(43_340_000 as u64) + Weight::from_all(43_340_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedPallets (r:0 w:1) fn block_pallet() -> Weight { - Weight::from_ref_time(42_282_000 as u64) + Weight::from_all(42_282_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -89,27 +89,27 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) fn enable_maintenance_mode() -> Weight { - Weight::from_ref_time(37_073_000 as u64) + Weight::from_all(37_073_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) fn block_account() -> Weight { - Weight::from_ref_time(39_394_000 as u64) + Weight::from_all(39_394_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) fn block_evm_target() -> Weight { - Weight::from_ref_time(40_700_000 as u64) + Weight::from_all(40_700_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedCalls (r:0 w:1) fn block_call() -> Weight { - Weight::from_ref_time(43_340_000 as u64) + Weight::from_all(43_340_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedPallets (r:0 w:1) fn block_pallet() -> Weight { - Weight::from_ref_time(42_282_000 as u64) + Weight::from_all(42_282_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/marketplace/src/weights.rs b/pallet/marketplace/src/weights.rs index be55bbc6a..5694a9f63 100644 --- a/pallet/marketplace/src/weights.rs +++ b/pallet/marketplace/src/weights.rs @@ -71,7 +71,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace NextMarketplaceId (r:1 w:1) // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) fn register_marketplace() -> Weight { - Weight::from_ref_time(17_443_000 as u64) + Weight::from_all(17_443_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -84,9 +84,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_ref_time(35_287_000 as u64) + Weight::from_all(35_287_000 as u64) // Standard Error: 5_772 - .saturating_add(Weight::from_ref_time(4_321_028 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(4_321_028 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -101,9 +101,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_ref_time(30_478_000 as u64) + Weight::from_all(30_478_000 as u64) // Standard Error: 10_308 - .saturating_add(Weight::from_ref_time(3_429_769 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_429_769 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -118,7 +118,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn buy() -> Weight { - Weight::from_ref_time(67_648_000 as u64) + Weight::from_all(67_648_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -132,9 +132,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Nft TokenLocks (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_ref_time(68_079_000 as u64) + Weight::from_all(68_079_000 as u64) // Standard Error: 35_746 - .saturating_add(Weight::from_ref_time(49_491_228 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(49_491_228 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(9 as u64)) @@ -149,9 +149,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_ref_time(32_782_000 as u64) + Weight::from_all(32_782_000 as u64) // Standard Error: 5_794 - .saturating_add(Weight::from_ref_time(4_306_919 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(4_306_919 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -166,9 +166,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_ref_time(29_696_000 as u64) + Weight::from_all(29_696_000 as u64) // Standard Error: 2_973 - .saturating_add(Weight::from_ref_time(3_287_061 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_287_061 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -182,7 +182,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) // Storage: Marketplace ListingEndSchedule (r:0 w:2) fn bid() -> Weight { - Weight::from_ref_time(63_710_000 as u64) + Weight::from_all(63_710_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -191,13 +191,13 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn cancel_sale() -> Weight { - Weight::from_ref_time(20_930_000 as u64) + Weight::from_all(20_930_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Marketplace Listings (r:1 w:1) fn update_fixed_price() -> Weight { - Weight::from_ref_time(16_702_000 as u64) + Weight::from_all(16_702_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -211,7 +211,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: Marketplace Offers (r:0 w:1) fn make_simple_offer() -> Weight { - Weight::from_ref_time(60_865_000 as u64) + Weight::from_all(60_865_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -222,7 +222,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Marketplace TokenOffers (r:1 w:1) fn cancel_offer() -> Weight { - Weight::from_ref_time(55_595_000 as u64) + Weight::from_all(55_595_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -237,13 +237,13 @@ impl WeightInfo for SubstrateWeight { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn accept_offer() -> Weight { - Weight::from_ref_time(91_674_000 as u64) + Weight::from_all(91_674_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Marketplace FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(10_069_000 as u64) + Weight::from_all(10_069_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -253,7 +253,7 @@ impl WeightInfo for () { // Storage: Marketplace NextMarketplaceId (r:1 w:1) // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) fn register_marketplace() -> Weight { - Weight::from_ref_time(17_443_000 as u64) + Weight::from_all(17_443_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -266,9 +266,9 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_ref_time(35_287_000 as u64) + Weight::from_all(35_287_000 as u64) // Standard Error: 5_772 - .saturating_add(Weight::from_ref_time(4_321_028 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(4_321_028 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(5 as u64)) @@ -283,9 +283,9 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_ref_time(30_478_000 as u64) + Weight::from_all(30_478_000 as u64) // Standard Error: 10_308 - .saturating_add(Weight::from_ref_time(3_429_769 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_429_769 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(5 as u64)) @@ -300,7 +300,7 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn buy() -> Weight { - Weight::from_ref_time(67_648_000 as u64) + Weight::from_all(67_648_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -314,9 +314,9 @@ impl WeightInfo for () { // Storage: Nft TokenLocks (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_ref_time(68_079_000 as u64) + Weight::from_all(68_079_000 as u64) // Standard Error: 35_746 - .saturating_add(Weight::from_ref_time(49_491_228 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(49_491_228 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(9 as u64)) @@ -331,9 +331,9 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_ref_time(32_782_000 as u64) + Weight::from_all(32_782_000 as u64) // Standard Error: 5_794 - .saturating_add(Weight::from_ref_time(4_306_919 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(4_306_919 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(5 as u64)) @@ -348,9 +348,9 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_ref_time(29_696_000 as u64) + Weight::from_all(29_696_000 as u64) // Standard Error: 2_973 - .saturating_add(Weight::from_ref_time(3_287_061 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_287_061 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(5 as u64)) @@ -364,7 +364,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Storage: Marketplace ListingEndSchedule (r:0 w:2) fn bid() -> Weight { - Weight::from_ref_time(63_710_000 as u64) + Weight::from_all(63_710_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } @@ -373,13 +373,13 @@ impl WeightInfo for () { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn cancel_sale() -> Weight { - Weight::from_ref_time(20_930_000 as u64) + Weight::from_all(20_930_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Marketplace Listings (r:1 w:1) fn update_fixed_price() -> Weight { - Weight::from_ref_time(16_702_000 as u64) + Weight::from_all(16_702_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -393,7 +393,7 @@ impl WeightInfo for () { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: Marketplace Offers (r:0 w:1) fn make_simple_offer() -> Weight { - Weight::from_ref_time(60_865_000 as u64) + Weight::from_all(60_865_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -404,7 +404,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Marketplace TokenOffers (r:1 w:1) fn cancel_offer() -> Weight { - Weight::from_ref_time(55_595_000 as u64) + Weight::from_all(55_595_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -419,13 +419,13 @@ impl WeightInfo for () { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn accept_offer() -> Weight { - Weight::from_ref_time(91_674_000 as u64) + Weight::from_all(91_674_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Marketplace FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(10_069_000 as u64) + Weight::from_all(10_069_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/nft-peg/src/weights.rs b/pallet/nft-peg/src/weights.rs index 01f301c63..9aafd11ba 100644 --- a/pallet/nft-peg/src/weights.rs +++ b/pallet/nft-peg/src/weights.rs @@ -58,7 +58,7 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: NftPeg ContractAddress (r:0 w:1) fn set_contract_address() -> Weight { - Weight::from_ref_time(38_330_000 as u64) + Weight::from_all(38_330_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) @@ -72,7 +72,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Digest (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:3) fn withdraw() -> Weight { - Weight::from_ref_time(156_373_000 as u64) + Weight::from_all(156_373_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -86,7 +86,7 @@ impl WeightInfo for SubstrateWeight { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn reclaim_blocked_nfts() -> Weight { - Weight::from_ref_time(126_019_000 as u64) + Weight::from_all(126_019_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -96,7 +96,7 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: NftPeg ContractAddress (r:0 w:1) fn set_contract_address() -> Weight { - Weight::from_ref_time(38_330_000 as u64) + Weight::from_all(38_330_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) @@ -110,7 +110,7 @@ impl WeightInfo for () { // Storage: System Digest (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:3) fn withdraw() -> Weight { - Weight::from_ref_time(156_373_000 as u64) + Weight::from_all(156_373_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -124,7 +124,7 @@ impl WeightInfo for () { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn reclaim_blocked_nfts() -> Weight { - Weight::from_ref_time(126_019_000 as u64) + Weight::from_all(126_019_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/nft/src/weights.rs b/pallet/nft/src/weights.rs index 68187054e..e3efb4a4f 100644 --- a/pallet/nft/src/weights.rs +++ b/pallet/nft/src/weights.rs @@ -67,37 +67,37 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Nft CollectionInfo (r:1 w:1) fn claim_unowned_collection() -> Weight { - Weight::from_ref_time(58_034_000 as u64) + Weight::from_all(58_034_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(60_339_000 as u64) + Weight::from_all(60_339_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(59_770_000 as u64) + Weight::from_all(59_770_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(61_298_000 as u64) + Weight::from_all(61_298_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(62_263_000 as u64) + Weight::from_all(62_263_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(68_177_000 as u64) + Weight::from_all(68_177_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -107,27 +107,27 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Nft CollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(96_939_000 as u64) + Weight::from_all(96_939_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(30_057_000 as u64) + Weight::from_all(30_057_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(30_177_000 as u64) + Weight::from_all(30_177_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(67_673_000 as u64) + Weight::from_all(67_673_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -135,7 +135,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Nft TokenLocks (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn transfer() -> Weight { - Weight::from_ref_time(72_799_000 as u64) + Weight::from_all(72_799_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -143,7 +143,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn burn() -> Weight { - Weight::from_ref_time(71_347_000 as u64) + Weight::from_all(71_347_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -153,37 +153,37 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Nft CollectionInfo (r:1 w:1) fn claim_unowned_collection() -> Weight { - Weight::from_ref_time(58_034_000 as u64) + Weight::from_all(58_034_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(60_339_000 as u64) + Weight::from_all(60_339_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(59_770_000 as u64) + Weight::from_all(59_770_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(61_298_000 as u64) + Weight::from_all(61_298_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(62_263_000 as u64) + Weight::from_all(62_263_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(68_177_000 as u64) + Weight::from_all(68_177_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -193,27 +193,27 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Nft CollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(96_939_000 as u64) + Weight::from_all(96_939_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(30_057_000 as u64) + Weight::from_all(30_057_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(30_177_000 as u64) + Weight::from_all(30_177_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(67_673_000 as u64) + Weight::from_all(67_673_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -221,7 +221,7 @@ impl WeightInfo for () { // Storage: Nft TokenLocks (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn transfer() -> Weight { - Weight::from_ref_time(72_799_000 as u64) + Weight::from_all(72_799_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -229,7 +229,7 @@ impl WeightInfo for () { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn burn() -> Weight { - Weight::from_ref_time(71_347_000 as u64) + Weight::from_all(71_347_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/pallet/sft/src/weights.rs b/pallet/sft/src/weights.rs index 3d656f061..999c01de6 100644 --- a/pallet/sft/src/weights.rs +++ b/pallet/sft/src/weights.rs @@ -71,30 +71,30 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Sft SftCollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(96_589_000 as u64) + Weight::from_all(96_589_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) // Storage: Sft TokenInfo (r:0 w:1) fn create_token() -> Weight { - Weight::from_ref_time(66_702_000 as u64) + Weight::from_all(66_702_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(67_408_000 as u64) + Weight::from_all(67_408_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft TokenInfo (r:1 w:1) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_ref_time(62_718_000 as u64) + Weight::from_all(62_718_000 as u64) // Standard Error: 3_822 - .saturating_add(Weight::from_ref_time(3_381_220 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -102,52 +102,52 @@ impl WeightInfo for SubstrateWeight { } // Storage: Sft TokenInfo (r:1 w:1) fn burn() -> Weight { - Weight::from_ref_time(66_107_000 as u64) + Weight::from_all(66_107_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(59_368_000 as u64) + Weight::from_all(59_368_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(61_021_000 as u64) + Weight::from_all(61_021_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(56_065_000 as u64) + Weight::from_all(56_065_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(55_452_000 as u64) + Weight::from_all(55_452_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(68_177_000 as u64) + Weight::from_all(68_177_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(30_057_000 as u64) + Weight::from_all(30_057_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(30_177_000 as u64) + Weight::from_all(30_177_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -161,30 +161,30 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Sft SftCollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(96_589_000 as u64) + Weight::from_all(96_589_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) // Storage: Sft TokenInfo (r:0 w:1) fn create_token() -> Weight { - Weight::from_ref_time(66_702_000 as u64) + Weight::from_all(66_702_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(67_408_000 as u64) + Weight::from_all(67_408_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft TokenInfo (r:1 w:1) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_ref_time(62_718_000 as u64) + Weight::from_all(62_718_000 as u64) // Standard Error: 3_822 - .saturating_add(Weight::from_ref_time(3_381_220 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -192,38 +192,38 @@ impl WeightInfo for () { } // Storage: Sft TokenInfo (r:1 w:1) fn burn() -> Weight { - Weight::from_ref_time(66_107_000 as u64) + Weight::from_all(66_107_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(59_368_000 as u64) + Weight::from_all(59_368_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(61_021_000 as u64) + Weight::from_all(61_021_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(56_065_000 as u64) + Weight::from_all(56_065_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(55_452_000 as u64) + Weight::from_all(55_452_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(68_177_000 as u64) + Weight::from_all(68_177_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -231,14 +231,14 @@ impl WeightInfo for () { // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(30_057_000 as u64) + Weight::from_all(30_057_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(30_177_000 as u64) + Weight::from_all(30_177_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/token-approvals/src/weights.rs b/pallet/token-approvals/src/weights.rs index 90337e04f..16908e8d3 100644 --- a/pallet/token-approvals/src/weights.rs +++ b/pallet/token-approvals/src/weights.rs @@ -63,36 +63,36 @@ impl WeightInfo for SubstrateWeight { // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn erc721_approval() -> Weight { - Weight::from_ref_time(40_691_000 as u64) + Weight::from_all(40_691_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721Approvals (r:1 w:1) // Storage: Nft CollectionInfo (r:1 w:0) fn erc721_remove_approval() -> Weight { - Weight::from_ref_time(42_393_000 as u64) + Weight::from_all(42_393_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:0 w:1) fn erc20_approval() -> Weight { - Weight::from_ref_time(21_233_000 as u64) + Weight::from_all(21_233_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:1 w:1) fn erc20_update_approval() -> Weight { - Weight::from_ref_time(32_323_000 as u64) + Weight::from_all(32_323_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) fn erc721_approval_for_all() -> Weight { - Weight::from_ref_time(21_540_000 as u64) + Weight::from_all(21_540_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) fn erc1155_approval_for_all() -> Weight { - Weight::from_ref_time(21_639_000 as u64) + Weight::from_all(21_639_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -103,36 +103,36 @@ impl WeightInfo for () { // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn erc721_approval() -> Weight { - Weight::from_ref_time(40_691_000 as u64) + Weight::from_all(40_691_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721Approvals (r:1 w:1) // Storage: Nft CollectionInfo (r:1 w:0) fn erc721_remove_approval() -> Weight { - Weight::from_ref_time(42_393_000 as u64) + Weight::from_all(42_393_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:0 w:1) fn erc20_approval() -> Weight { - Weight::from_ref_time(21_233_000 as u64) + Weight::from_all(21_233_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:1 w:1) fn erc20_update_approval() -> Weight { - Weight::from_ref_time(32_323_000 as u64) + Weight::from_all(32_323_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) fn erc721_approval_for_all() -> Weight { - Weight::from_ref_time(21_540_000 as u64) + Weight::from_all(21_540_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) fn erc1155_approval_for_all() -> Weight { - Weight::from_ref_time(21_639_000 as u64) + Weight::from_all(21_639_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/vortex-distribution/src/weights.rs b/pallet/vortex-distribution/src/weights.rs index 83376639c..71f96a74b 100644 --- a/pallet/vortex-distribution/src/weights.rs +++ b/pallet/vortex-distribution/src/weights.rs @@ -68,33 +68,33 @@ impl WeightInfo for SubstrateWeight { // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) // Storage: VortexDistribution TotalVortex (r:0 w:1) fn create_vtx_dist() -> Weight { - Weight::from_ref_time(10_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) fn disable_vtx_dist() -> Weight { - Weight::from_ref_time(11_000_000 as u64) + Weight::from_all(11_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) fn start_vtx_dist() -> Weight { - Weight::from_ref_time(13_000_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution VtxDistEras (r:0 w:1) fn set_vtx_dist_eras() -> Weight { - Weight::from_ref_time(8_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution AssetPrices (r:0 w:1) /// The range of component `b` is `[1, 1000]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_ref_time(9_000_000 as u64) + Weight::from_all(9_000_000 as u64) // Standard Error: 1_608 - .saturating_add(Weight::from_ref_time(743_068 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_all(743_068 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } @@ -102,7 +102,7 @@ impl WeightInfo for SubstrateWeight { // Storage: VortexDistribution TotalVortex (r:1 w:0) // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) fn register_rewards() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -113,7 +113,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: System Account (r:3 w:3) fn trigger_vtx_distribution() -> Weight { - Weight::from_ref_time(47_000_000 as u64) + Weight::from_all(47_000_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -122,7 +122,7 @@ impl WeightInfo for SubstrateWeight { // Storage: VortexDistribution AssetPrices (r:2 w:0) // Storage: System Account (r:1 w:0) fn redeem_tokens_from_vault() -> Weight { - Weight::from_ref_time(33_000_000 as u64) + Weight::from_all(33_000_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -134,7 +134,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) fn pay_unsigned() -> Weight { - Weight::from_ref_time(35_000_000 as u64) + Weight::from_all(35_000_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -146,33 +146,33 @@ impl WeightInfo for () { // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) // Storage: VortexDistribution TotalVortex (r:0 w:1) fn create_vtx_dist() -> Weight { - Weight::from_ref_time(10_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) fn disable_vtx_dist() -> Weight { - Weight::from_ref_time(11_000_000 as u64) + Weight::from_all(11_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) fn start_vtx_dist() -> Weight { - Weight::from_ref_time(13_000_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution VtxDistEras (r:0 w:1) fn set_vtx_dist_eras() -> Weight { - Weight::from_ref_time(8_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution AssetPrices (r:0 w:1) /// The range of component `b` is `[1, 1000]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_ref_time(9_000_000 as u64) + Weight::from_all(9_000_000 as u64) // Standard Error: 1_608 - .saturating_add(Weight::from_ref_time(743_068 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_all(743_068 as u64).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } @@ -180,7 +180,7 @@ impl WeightInfo for () { // Storage: VortexDistribution TotalVortex (r:1 w:0) // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) fn register_rewards() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -191,7 +191,7 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: System Account (r:3 w:3) fn trigger_vtx_distribution() -> Weight { - Weight::from_ref_time(47_000_000 as u64) + Weight::from_all(47_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -200,7 +200,7 @@ impl WeightInfo for () { // Storage: VortexDistribution AssetPrices (r:2 w:0) // Storage: System Account (r:1 w:0) fn redeem_tokens_from_vault() -> Weight { - Weight::from_ref_time(33_000_000 as u64) + Weight::from_all(33_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -212,7 +212,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) fn pay_unsigned() -> Weight { - Weight::from_ref_time(35_000_000 as u64) + Weight::from_all(35_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } diff --git a/pallet/xls20/src/weights.rs b/pallet/xls20/src/weights.rs index 660a011a9..0232d7841 100644 --- a/pallet/xls20/src/weights.rs +++ b/pallet/xls20/src/weights.rs @@ -60,17 +60,17 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Xls20 Relayer (r:0 w:1) fn set_relayer() -> Weight { - Weight::from_ref_time(36_424_000 as u64) + Weight::from_all(36_424_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Xls20 Xls20MintFee (r:0 w:1) fn set_xls20_fee() -> Weight { - Weight::from_ref_time(36_004_000 as u64) + Weight::from_all(36_004_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn enable_xls20_compatibility() -> Weight { - Weight::from_ref_time(54_993_000 as u64) + Weight::from_all(54_993_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -78,14 +78,14 @@ impl WeightInfo for SubstrateWeight { // Storage: Xls20 Xls20TokenMap (r:1 w:0) // Storage: Xls20 Xls20MintFee (r:1 w:0) fn re_request_xls20_mint() -> Weight { - Weight::from_ref_time(70_711_000 as u64) + Weight::from_all(70_711_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Xls20 Relayer (r:1 w:0) // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Xls20 Xls20TokenMap (r:1 w:1) fn fulfill_xls20_mint() -> Weight { - Weight::from_ref_time(73_952_000 as u64) + Weight::from_all(73_952_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,17 +95,17 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Xls20 Relayer (r:0 w:1) fn set_relayer() -> Weight { - Weight::from_ref_time(36_424_000 as u64) + Weight::from_all(36_424_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Xls20 Xls20MintFee (r:0 w:1) fn set_xls20_fee() -> Weight { - Weight::from_ref_time(36_004_000 as u64) + Weight::from_all(36_004_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn enable_xls20_compatibility() -> Weight { - Weight::from_ref_time(54_993_000 as u64) + Weight::from_all(54_993_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -113,14 +113,14 @@ impl WeightInfo for () { // Storage: Xls20 Xls20TokenMap (r:1 w:0) // Storage: Xls20 Xls20MintFee (r:1 w:0) fn re_request_xls20_mint() -> Weight { - Weight::from_ref_time(70_711_000 as u64) + Weight::from_all(70_711_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } // Storage: Xls20 Relayer (r:1 w:0) // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Xls20 Xls20TokenMap (r:1 w:1) fn fulfill_xls20_mint() -> Weight { - Weight::from_ref_time(73_952_000 as u64) + Weight::from_all(73_952_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/xrpl-bridge/src/tests.rs b/pallet/xrpl-bridge/src/tests.rs index 2c0b99ba6..6d8c1c082 100644 --- a/pallet/xrpl-bridge/src/tests.rs +++ b/pallet/xrpl-bridge/src/tests.rs @@ -584,7 +584,7 @@ fn settle_new_higher_ledger_index_brings_submission_window_forward() { let block_number = System::block_number() + XrpTxChallengePeriod::get() as u64; XRPLBridge::on_initialize(block_number); System::set_block_number(block_number); - XRPLBridge::on_idle(block_number, Weight::from_ref_time(1_000_000_000u64)); + XRPLBridge::on_idle(block_number, Weight::from_all(1_000_000_000u64)); // data outside the previous submission window end should be cleaned now assert!(>::get(2).is_none()); @@ -690,7 +690,7 @@ fn reset_settled_xrpl_tx_data_success() { XRPLBridge::on_initialize(block_number); System::set_block_number(block_number); // Call on idle to prune the settled data - XRPLBridge::on_idle(block_number, Weight::from_ref_time(1_000_000_000u64)); + XRPLBridge::on_idle(block_number, Weight::from_all(1_000_000_000u64)); // all previous settled data should be pruned by now assert!(>::get(current_submission_window_end).is_none()); @@ -834,7 +834,7 @@ fn clear_storages_works() { XRPLBridge::on_initialize(XrpTxChallengePeriod::get() as u64); System::set_block_number(XrpTxChallengePeriod::get() as u64); // Call on idle to prune the settled data with enough weight to settle both - let idle_weight = XRPLBridge::clear_storages(Weight::from_ref_time(10_000_000_000u64)); + let idle_weight = XRPLBridge::clear_storages(Weight::from_all(10_000_000_000u64)); let expected_weight = DbWeight::get().reads_writes(4, 4); assert_eq!(idle_weight, expected_weight); @@ -858,7 +858,7 @@ fn clear_storages_doesnt_exceed_max() { SubmissionWindowWidth::::put(288_000); // Call clear storages to prune the settled data with plenty of weight - let idle_weight = XRPLBridge::clear_storages(Weight::from_ref_time(10_000_000_000_000u64)); + let idle_weight = XRPLBridge::clear_storages(Weight::from_all(10_000_000_000_000u64)); // Expected weight should be 5000 reads + 3 and 1 write for the highest pruned ledger index let expected_weight = DbWeight::get().reads_writes(3 + MaxPrunedTransactionsPerBlock::get() as u64, 1); @@ -896,7 +896,7 @@ fn clear_storages_returns_zero_if_not_enough_weight() { // Call on idle to prune the settled data with not enough weight to settle one tx let remaining_weight = DbWeight::get().reads_writes(4, 3); let idle_weight = XRPLBridge::clear_storages(remaining_weight); - assert_eq!(idle_weight, Weight::from_ref_time(0)); + assert_eq!(idle_weight, Weight::from_all(0)); // Data remains in place assert!(>::get(ledger_index).is_some()); assert!(>::get(tx_hash).is_some()); @@ -905,7 +905,7 @@ fn clear_storages_returns_zero_if_not_enough_weight() { // Call on idle to prune the settled data with JUST enough weight to settle one tx let remaining_weight = DbWeight::get().reads_writes(4, 3); let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1u64)); + XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // Data updated assert!(>::get(ledger_index).is_none()); @@ -945,7 +945,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear only 1 tx let remaining_weight = DbWeight::get().reads_writes(4, 2 + 1); let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1u64)); + XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); // We subtract 1 from as we did not end up updating HighestPrunedLedgerIndex assert_eq!(idle_weight, remaining_weight - DbWeight::get().writes(1)); // One settledXRPTransaction should have been removed @@ -966,7 +966,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear 4 more txs let remaining_weight = DbWeight::get().reads_writes(4, 2 + 4); let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1u64)); + XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); // We subtract 1 from as we did not end up updating HighestPrunedLedgerIndex assert_eq!(idle_weight, remaining_weight - DbWeight::get().writes(1)); // 5 settledXRPTransaction should have been removed total @@ -987,7 +987,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear the last 5 txs let remaining_weight = DbWeight::get().reads_writes(4, 2 + 5); let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1u64)); + XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // SettledXRPTransactionDetails should now be cleared assert!(>::get(ledger_index).is_none()); @@ -1042,7 +1042,7 @@ fn clear_storages_across_multiple_ledger_indices() { let weight_per_hash = DbWeight::get().writes(1); let remaining_weight = base_weight + (weight_per_index * 2) + (weight_per_hash * 10); let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1u64)); + XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // SettledXRPTransactionDetails should now be cleared @@ -1069,7 +1069,7 @@ fn clear_storages_nothing_to_prune() { HighestPrunedLedgerIndex::::put(3); // 8 - 5 // Call on idle and only use enough weight to read the 3 storage values - let idle_weight = XRPLBridge::clear_storages(Weight::from_ref_time(10_000_000_000u64)); + let idle_weight = XRPLBridge::clear_storages(Weight::from_all(10_000_000_000u64)); // 3 reads for the base storage values let expected_weight = DbWeight::get().reads(3); assert_eq!(idle_weight, expected_weight); @@ -1082,7 +1082,7 @@ fn clear_storages_nothing_to_prune() { // Call on idle and only use enough weight to read the 3 storage values // We have one additional write to update the HighestPrunedLedgerIndex - let idle_weight = XRPLBridge::clear_storages(Weight::from_ref_time(10_000_000_000u64)); + let idle_weight = XRPLBridge::clear_storages(Weight::from_all(10_000_000_000u64)); // Extra read and write: // read: SettledXRPTransactionDetails // write: HighestPrunedLedgerIndex @@ -1105,7 +1105,7 @@ fn clear_storages_nothing_to_prune_increases_ledger_index() { // enough weight to write the data in the case that there is data to write // So we need to give it enough weight to theoretically write if it can let remaining_weight = DbWeight::get().reads_writes(3 + 5000, 3); - let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_ref_time(1)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1)); // It uses only enough weight to read all 5000 let expected_weight = DbWeight::get().reads_writes(3 + 5000, 1); assert_eq!(idle_weight, expected_weight); @@ -1113,7 +1113,7 @@ fn clear_storages_nothing_to_prune_increases_ledger_index() { // Call on idle with plenty of weight to cover the last 5000 ledger indices // It should only use as much as it needs and no more - let idle_weight = XRPLBridge::clear_storages(Weight::from_ref_time(u64::MAX)); + let idle_weight = XRPLBridge::clear_storages(Weight::from_all(u64::MAX)); // It uses only enough weight to read all 5000 let expected_weight = DbWeight::get().reads_writes(3 + 5000, 1); assert_eq!(idle_weight, expected_weight); @@ -1490,7 +1490,7 @@ fn process_delayed_payments_works() { // Call process delayed payments with enough weight to process the delayed payment let weight_used = XRPLBridge::process_delayed_payments( 1001, - Weight::from_ref_time(1_000_000_000_000), + Weight::from_all(1_000_000_000_000), ); // Assert weight used is as expected assert_eq!(weight_used, DbWeight::get().reads_writes(6, 4)); @@ -1555,7 +1555,7 @@ fn process_delayed_payments_works_in_on_idle() { // Set next process block to this block NextDelayProcessBlock::::put(1001); // Call process delayed payments with enough weight to process the delayed payment - XRPLBridge::on_idle(1001, Weight::from_ref_time(1_000_000_000_000)); + XRPLBridge::on_idle(1001, Weight::from_all(1_000_000_000_000)); // Ensure event is thrown System::assert_last_event( @@ -1631,13 +1631,13 @@ fn process_delayed_payments_multiple_withdrawals() { // Call process delayed payments with enough weight to process all delayed payments let weight_used = XRPLBridge::process_delayed_payments( 1001, - Weight::from_ref_time(1_000_000_000_000), + Weight::from_all(1_000_000_000_000), ); // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(3u64, 2u64); let base_weight = DbWeight::get().reads_writes(7u64, 1u64); let total_weight = base_weight + - Weight::from_ref_time(weight_per_tx.ref_time() * withdrawal_count as u64); + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); assert_eq!(weight_used, total_weight); // Storage should now be updated @@ -1704,13 +1704,13 @@ fn process_delayed_payments_multiple_withdrawals_across_multiple_blocks() { // Set block number to the last block we need to process let weight_used = XRPLBridge::process_delayed_payments( 1101, - Weight::from_ref_time(1_000_000_000_000), + Weight::from_all(1_000_000_000_000), ); // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(4u64, 3u64); let base_weight = DbWeight::get().reads_writes(3u64, 1u64); let total_weight = base_weight + - Weight::from_ref_time(weight_per_tx.ref_time() * withdrawal_count as u64); + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); assert_eq!(weight_used, total_weight); // Storage should now be updated @@ -1731,7 +1731,7 @@ fn process_delayed_payments_nothing_to_process_works() { // Call process delayed payments with enough weight to process 1000 blocks let weight_used = XRPLBridge::process_delayed_payments( delayed_payment_block_limit, - Weight::from_ref_time(1_000_000_000_000_000), + Weight::from_all(1_000_000_000_000_000), ); // Assert weight used is as expected assert_eq!(weight_used, DbWeight::get().reads_writes(3 + delayed_payment_block_limit, 1)); @@ -1742,7 +1742,7 @@ fn process_delayed_payments_nothing_to_process_works() { // Call process delayed payments for the next block, should only process one block let weight_used = XRPLBridge::process_delayed_payments( delayed_payment_block_limit + 1, - Weight::from_ref_time(1_000_000_000_000_000), + Weight::from_all(1_000_000_000_000_000), ); // Assert weight used is as expected assert_eq!(weight_used, DbWeight::get().reads_writes(3, 1)); @@ -1763,7 +1763,7 @@ fn process_delayed_payments_does_not_exceed_max_delayed_payments() { // Call process delayed payments with more than max_payments_per_block let weight_used = XRPLBridge::process_delayed_payments( delayed_payment_block_limit + 10000, - Weight::from_ref_time(1_000_000_000_000_000), + Weight::from_all(1_000_000_000_000_000), ); // Assert weight used is as expected assert_eq!(weight_used, DbWeight::get().reads_writes(3 + delayed_payment_block_limit, 1)); diff --git a/pallet/xrpl-bridge/src/weights.rs b/pallet/xrpl-bridge/src/weights.rs index efe80f289..ec92a82fe 100644 --- a/pallet/xrpl-bridge/src/weights.rs +++ b/pallet/xrpl-bridge/src/weights.rs @@ -72,18 +72,18 @@ impl WeightInfo for SubstrateWeight { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) fn submit_transaction() -> Weight { - Weight::from_ref_time(25_000_000 as u64) + Weight::from_all(25_000_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) fn submit_challenge() -> Weight { - Weight::from_ref_time(6_000_000 as u64) + Weight::from_all(6_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(10_560_000 as u64) + Weight::from_all(10_560_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:1 w:0) @@ -98,36 +98,36 @@ impl WeightInfo for SubstrateWeight { // Storage: System Digest (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn withdraw_xrp() -> Weight { - Weight::from_ref_time(51_000_000 as u64) + Weight::from_all(51_000_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: XRPLBridge Relayer (r:0 w:1) fn add_relayer() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:1) fn remove_relayer() -> Weight { - Weight::from_ref_time(19_000_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:0 w:1) fn set_door_tx_fee() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge XRPSourceTag (r:0 w:1) fn set_xrp_source_tag() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorAddress (r:0 w:1) fn set_door_address() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:0) @@ -135,7 +135,7 @@ impl WeightInfo for SubstrateWeight { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_ref_time(18_000_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,7 +143,7 @@ impl WeightInfo for SubstrateWeight { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_ref_time(17_000_000 as u64) + Weight::from_all(17_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -154,9 +154,9 @@ impl WeightInfo for SubstrateWeight { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_ref_time(10_841_000 as u64) + Weight::from_all(10_841_000 as u64) // Standard Error: 4_892 - .saturating_add(Weight::from_ref_time(6_292_671 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -167,9 +167,9 @@ impl WeightInfo for SubstrateWeight { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_ref_time(16_281_000 as u64) + Weight::from_all(16_281_000 as u64) // Standard Error: 4_806 - .saturating_add(Weight::from_ref_time(916_903 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) @@ -184,18 +184,18 @@ impl WeightInfo for () { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) fn submit_transaction() -> Weight { - Weight::from_ref_time(25_000_000 as u64) + Weight::from_all(25_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) fn submit_challenge() -> Weight { - Weight::from_ref_time(6_000_000 as u64) + Weight::from_all(6_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(10_560_000 as u64) + Weight::from_all(10_560_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:1 w:0) @@ -210,34 +210,34 @@ impl WeightInfo for () { // Storage: System Digest (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn withdraw_xrp() -> Weight { - Weight::from_ref_time(51_000_000 as u64) + Weight::from_all(51_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: XRPLBridge Relayer (r:0 w:1) fn add_relayer() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:1) fn remove_relayer() -> Weight { - Weight::from_ref_time(19_000_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:0 w:1) fn set_door_tx_fee() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge XRPSourceTag (r:0 w:1) fn set_xrp_source_tag() -> Weight { - Weight::from_ref_time(4_000_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorAddress (r:0 w:1) fn set_door_address() -> Weight { - Weight::from_ref_time(14_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:0) @@ -245,7 +245,7 @@ impl WeightInfo for () { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_ref_time(18_000_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -253,7 +253,7 @@ impl WeightInfo for () { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_ref_time(17_000_000 as u64) + Weight::from_all(17_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -264,9 +264,9 @@ impl WeightInfo for () { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_ref_time(10_841_000 as u64) + Weight::from_all(10_841_000 as u64) // Standard Error: 4_892 - .saturating_add(Weight::from_ref_time(6_292_671 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -277,9 +277,9 @@ impl WeightInfo for () { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_ref_time(16_281_000 as u64) + Weight::from_all(16_281_000 as u64) // Standard Error: 4_806 - .saturating_add(Weight::from_ref_time(916_903 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) diff --git a/pallet/xrpl/src/tests.rs b/pallet/xrpl/src/tests.rs index dc7760129..8f14acd28 100644 --- a/pallet/xrpl/src/tests.rs +++ b/pallet/xrpl/src/tests.rs @@ -224,7 +224,7 @@ mod self_contained_call { System::assert_last_event(mock::RuntimeEvent::System( frame_system::Event::ExtrinsicSuccess { dispatch_info: DispatchInfo { - weight: Weight::from_ref_time(311_960_000), + weight: Weight::from_all(311_960_000), class: DispatchClass::Normal, pays_fee: Pays::Yes, }, diff --git a/pallet/xrpl/src/weights.rs b/pallet/xrpl/src/weights.rs index 51d7646cf..f7c2ab643 100644 --- a/pallet/xrpl/src/weights.rs +++ b/pallet/xrpl/src/weights.rs @@ -57,7 +57,7 @@ impl WeightInfo for SubstrateWeight { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(174_662_000 as u64) + Weight::from_all(174_662_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) } } @@ -67,7 +67,7 @@ impl WeightInfo for () { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(174_662_000 as u64) + Weight::from_all(174_662_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 3433328d6..a3454a206 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1072,7 +1072,7 @@ impl pallet_evm::GasWeightMapping for FutureverseGasWeightMapping { ); } - Weight::from_ref_time(weight) + Weight::from_all(weight) } fn weight_to_gas(weight: Weight) -> u64 { weight.div(WEIGHT_PER_GAS).ref_time() @@ -1083,7 +1083,7 @@ parameter_types! { pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO.mul(MAXIMUM_BLOCK_WEIGHT.ref_time()) / WEIGHT_PER_GAS); pub PrecompilesValue: FutureversePrecompiles = FutureversePrecompiles::<_>::new(); - pub WeightPerGas: Weight = Weight::from_ref_time(WEIGHT_PER_GAS); + pub WeightPerGas: Weight = Weight::from_all(WEIGHT_PER_GAS); } impl pallet_evm::Config for Runtime { diff --git a/runtime/src/migrations/mod.rs b/runtime/src/migrations/mod.rs index 5f5efd872..8cd573187 100644 --- a/runtime/src/migrations/mod.rs +++ b/runtime/src/migrations/mod.rs @@ -34,7 +34,7 @@ impl OnRuntimeUpgrade for AllMigrations { } fn on_runtime_upgrade() -> Weight { - Weight::from_ref_time(0_u64) + Weight::from_all(0_u64) } #[cfg(feature = "try-runtime")] diff --git a/runtime/src/tests/multiplier.rs b/runtime/src/tests/multiplier.rs index 1c03c51be..6b2a5ec85 100644 --- a/runtime/src/tests/multiplier.rs +++ b/runtime/src/tests/multiplier.rs @@ -92,9 +92,9 @@ where fn truth_value_update_poc_works() { let fm = Multiplier::saturating_from_rational(1, 2); let test_set = vec![ - (Weight::from_ref_time(0), fm), - (Weight::from_ref_time(100), fm), - (Weight::from_ref_time(1000), fm), + (Weight::from_all(0), fm), + (Weight::from_all(100), fm), + (Weight::from_all(1000), fm), (target(), fm), (max_normal() / 2, fm), (max_normal(), fm), @@ -167,23 +167,23 @@ fn weight_mul_decrease_on_small_block() { #[test] fn weight_to_fee_should_not_overflow_on_large_weights() { - let kb = Weight::from_ref_time(1024u64); + let kb = Weight::from_all(1024u64); let mb = kb.mul(kb.ref_time()); let max_fm = Multiplier::saturating_from_integer(i128::MAX); // check that for all values it can compute, correctly. vec![ Weight::zero(), - Weight::from_ref_time(1u64), - Weight::from_ref_time(10u64), - Weight::from_ref_time(1000u64), + Weight::from_all(1u64), + Weight::from_all(10u64), + Weight::from_all(1000u64), kb, kb.mul(10u64), kb.mul(100u64), mb, mb.mul(10u64), - Weight::from_ref_time(2147483647u64), - Weight::from_ref_time(4294967295u64), + Weight::from_all(2147483647u64), + Weight::from_all(4294967295u64), RuntimeBlockWeights::get().max_block.div(2u64), RuntimeBlockWeights::get().max_block, Weight::MAX.div(2u64), diff --git a/runtime/src/weights/frame_benchmarking.rs b/runtime/src/weights/frame_benchmarking.rs index 3ab3273c2..6de2a5dd2 100644 --- a/runtime/src/weights/frame_benchmarking.rs +++ b/runtime/src/weights/frame_benchmarking.rs @@ -33,46 +33,46 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_ref_time(1_108_000 as u64) + Weight::from_all(1_108_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_ref_time(1_186_000 as u64) + Weight::from_all(1_186_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_ref_time(1_117_000 as u64) + Weight::from_all(1_117_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_ref_time(1_105_000 as u64) + Weight::from_all(1_105_000 as u64) } /// The range of component `i` is `[0, 100]`. fn hashing(i: u32, ) -> Weight { - Weight::from_ref_time(47_984_099_000 as u64) + Weight::from_all(47_984_099_000 as u64) // Standard Error: 51_804 - .saturating_add(Weight::from_ref_time(1_127_898 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(1_127_898 as u64).saturating_mul(i as u64)) } /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_ref_time(90_350_000 as u64) + Weight::from_all(90_350_000 as u64) // Standard Error: 29_923 - .saturating_add(Weight::from_ref_time(81_520_475 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(81_520_475 as u64).saturating_mul(i as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - Weight::from_ref_time(1_147_000 as u64) + Weight::from_all(1_147_000 as u64) // Standard Error: 9_407 - .saturating_add(Weight::from_ref_time(4_548_237 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(4_548_237 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> Weight { - Weight::from_ref_time(1_236_000 as u64) + Weight::from_all(1_236_000 as u64) // Standard Error: 748 - .saturating_add(Weight::from_ref_time(962_791 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(962_791 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } } diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index 68cedd31e..61db528ac 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -33,47 +33,47 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - Weight::from_ref_time(12_219_000 as u64) + Weight::from_all(12_219_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(624 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_all(624 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_ref_time(35_386_000 as u64) + Weight::from_all(35_386_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_387 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_all(2_387 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_ref_time(24_466_000 as u64) + Weight::from_all(24_466_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_ref_time(14_970_000 as u64) + Weight::from_all(14_970_000 as u64) // Standard Error: 1_601 - .saturating_add(Weight::from_ref_time(1_392_580 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(1_392_580 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_ref_time(15_403_000 as u64) + Weight::from_all(15_403_000 as u64) // Standard Error: 2_122 - .saturating_add(Weight::from_ref_time(1_139_191 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(1_139_191 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_ref_time(23_362_000 as u64) + Weight::from_all(23_362_000 as u64) // Standard Error: 2_293 - .saturating_add(Weight::from_ref_time(2_257_564 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(2_257_564 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } diff --git a/runtime/src/weights/pallet_assets.rs b/runtime/src/weights/pallet_assets.rs index b988a38cb..1a61859cc 100644 --- a/runtime/src/weights/pallet_assets.rs +++ b/runtime/src/weights/pallet_assets.rs @@ -33,13 +33,13 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(83_915_000 as u64) + Weight::from_all(83_915_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - Weight::from_ref_time(53_967_000 as u64) + Weight::from_all(53_967_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -52,11 +52,11 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, _a: u32, ) -> Weight { - Weight::from_ref_time(182_474_283_000 as u64) + Weight::from_all(182_474_283_000 as u64) // Standard Error: 333_416 - .saturating_add(Weight::from_ref_time(19_004_318 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_all(19_004_318 as u64).saturating_mul(c as u64)) // Standard Error: 333_416 - .saturating_add(Weight::from_ref_time(28_796_262 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(28_796_262 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(10505 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) @@ -67,14 +67,14 @@ impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(100_217_000 as u64) + Weight::from_all(100_217_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - Weight::from_ref_time(112_935_000 as u64) + Weight::from_all(112_935_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -82,7 +82,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(143_730_000 as u64) + Weight::from_all(143_730_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,7 +90,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(120_350_000 as u64) + Weight::from_all(120_350_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -98,46 +98,46 @@ impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - Weight::from_ref_time(144_361_000 as u64) + Weight::from_all(144_361_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - Weight::from_ref_time(69_952_000 as u64) + Weight::from_all(69_952_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - Weight::from_ref_time(70_135_000 as u64) + Weight::from_all(70_135_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - Weight::from_ref_time(60_594_000 as u64) + Weight::from_all(60_594_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - Weight::from_ref_time(60_444_000 as u64) + Weight::from_all(60_444_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - Weight::from_ref_time(68_986_000 as u64) + Weight::from_all(68_986_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - Weight::from_ref_time(64_014_000 as u64) + Weight::from_all(64_014_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -146,16 +146,16 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(n: u32, _s: u32, ) -> Weight { - Weight::from_ref_time(104_108_000 as u64) + Weight::from_all(104_108_000 as u64) // Standard Error: 1_807 - .saturating_add(Weight::from_ref_time(93_510 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(93_510 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - Weight::from_ref_time(109_434_000 as u64) + Weight::from_all(109_434_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -164,31 +164,31 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(n: u32, s: u32, ) -> Weight { - Weight::from_ref_time(66_067_000 as u64) + Weight::from_all(66_067_000 as u64) // Standard Error: 1_634 - .saturating_add(Weight::from_ref_time(50_246 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(50_246 as u64).saturating_mul(n as u64)) // Standard Error: 1_634 - .saturating_add(Weight::from_ref_time(44_117 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(44_117 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - Weight::from_ref_time(107_570_000 as u64) + Weight::from_all(107_570_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - Weight::from_ref_time(62_467_000 as u64) + Weight::from_all(62_467_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - Weight::from_ref_time(105_592_000 as u64) + Weight::from_all(105_592_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -197,21 +197,21 @@ impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - Weight::from_ref_time(182_236_000 as u64) + Weight::from_all(182_236_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - Weight::from_ref_time(118_850_000 as u64) + Weight::from_all(118_850_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - Weight::from_ref_time(120_042_000 as u64) + Weight::from_all(120_042_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/src/weights/pallet_assets_ext.rs b/runtime/src/weights/pallet_assets_ext.rs index d4e6e0f54..1d0d59155 100644 --- a/runtime/src/weights/pallet_assets_ext.rs +++ b/runtime/src/weights/pallet_assets_ext.rs @@ -38,13 +38,13 @@ impl pallet_assets_ext::WeightInfo for WeightInfo { // Storage: Futurepass DefaultProxy (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn create_asset() -> Weight { - Weight::from_ref_time(173_306_000 as u64) + Weight::from_all(173_306_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetsExt AssetDeposit (r:0 w:1) fn set_asset_deposit() -> Weight { - Weight::from_ref_time(9_969_000 as u64) + Weight::from_all(9_969_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_bags_list.rs b/runtime/src/weights/pallet_bags_list.rs index 7c26a8ff7..e67067e19 100644 --- a/runtime/src/weights/pallet_bags_list.rs +++ b/runtime/src/weights/pallet_bags_list.rs @@ -36,7 +36,7 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:4 w:4) // Storage: VoterList ListBags (r:1 w:1) fn rebag_non_terminal() -> Weight { - Weight::from_ref_time(159_302_000 as u64) + Weight::from_all(159_302_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -45,7 +45,7 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn rebag_terminal() -> Weight { - Weight::from_ref_time(155_787_000 as u64) + Weight::from_all(155_787_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -55,7 +55,7 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: VoterList ListBags (r:1 w:1) fn put_in_front_of() -> Weight { - Weight::from_ref_time(160_935_000 as u64) + Weight::from_all(160_935_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index e76989c75..28652f1f0 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -33,43 +33,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(95_263_000 as u64) + Weight::from_all(95_263_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(86_834_000 as u64) + Weight::from_all(86_834_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(64_293_000 as u64) + Weight::from_all(64_293_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(71_988_000 as u64) + Weight::from_all(71_988_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - Weight::from_ref_time(94_704_000 as u64) + Weight::from_all(94_704_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(99_652_000 as u64) + Weight::from_all(99_652_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(56_653_000 as u64) + Weight::from_all(56_653_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_crowdsale.rs b/runtime/src/weights/pallet_crowdsale.rs index 73ed39795..054e7a5b0 100644 --- a/runtime/src/weights/pallet_crowdsale.rs +++ b/runtime/src/weights/pallet_crowdsale.rs @@ -42,14 +42,14 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: Assets Account (r:1 w:1) // Storage: Crowdsale SaleInfo (r:0 w:1) fn initialize() -> Weight { - Weight::from_ref_time(242_201_000 as u64) + Weight::from_all(242_201_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleEndBlocks (r:1 w:1) fn enable() -> Weight { - Weight::from_ref_time(69_876_000 as u64) + Weight::from_all(69_876_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,7 +59,7 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleParticipation (r:1 w:1) fn participate() -> Weight { - Weight::from_ref_time(157_983_000 as u64) + Weight::from_all(157_983_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -72,7 +72,7 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Crowdsale NextUnsignedAt (r:0 w:1) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_ref_time(244_465_000 as u64) + Weight::from_all(244_465_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -84,7 +84,7 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn claim_voucher() -> Weight { - Weight::from_ref_time(238_375_000 as u64) + Weight::from_all(238_375_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -95,14 +95,14 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: Nft PublicMintInfo (r:1 w:0) fn redeem_voucher() -> Weight { - Weight::from_ref_time(176_790_000 as u64) + Weight::from_all(176_790_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) // Storage: Crowdsale SaleDistribution (r:1 w:1) fn try_force_distribution() -> Weight { - Weight::from_ref_time(66_053_000 as u64) + Weight::from_all(66_053_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -115,9 +115,9 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: Crowdsale SaleDistribution (r:1 w:1) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_ref_time(212_761_000 as u64) + Weight::from_all(212_761_000 as u64) // Standard Error: 953_527 - .saturating_add(Weight::from_ref_time(97_043_987 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(97_043_987 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().reads((6 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(11 as u64)) @@ -125,7 +125,7 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { } // Storage: Crowdsale SaleEndBlocks (r:1 w:0) fn on_initialize_empty() -> Weight { - Weight::from_ref_time(9_826_000 as u64) + Weight::from_all(9_826_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } diff --git a/runtime/src/weights/pallet_dex.rs b/runtime/src/weights/pallet_dex.rs index 9211c24d0..6eaf4df7d 100644 --- a/runtime/src/weights/pallet_dex.rs +++ b/runtime/src/weights/pallet_dex.rs @@ -39,7 +39,7 @@ impl pallet_dex::WeightInfo for WeightInfo { // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex LiquidityPoolLastK (r:1 w:1) fn swap_with_exact_supply() -> Weight { - Weight::from_ref_time(241_774_000 as u64) + Weight::from_all(241_774_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -51,7 +51,7 @@ impl pallet_dex::WeightInfo for WeightInfo { // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex LiquidityPoolLastK (r:1 w:1) fn swap_with_exact_target() -> Weight { - Weight::from_ref_time(249_416_000 as u64) + Weight::from_all(249_416_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -68,7 +68,7 @@ impl pallet_dex::WeightInfo for WeightInfo { // Storage: Dex LiquidityPoolLastK (r:1 w:1) // Storage: Dex TradingPairStatuses (r:0 w:1) fn add_liquidity() -> Weight { - Weight::from_ref_time(409_994_000 as u64) + Weight::from_all(409_994_000 as u64) .saturating_add(T::DbWeight::get().reads(23 as u64)) .saturating_add(T::DbWeight::get().writes(20 as u64)) } @@ -80,27 +80,27 @@ impl pallet_dex::WeightInfo for WeightInfo { // Storage: Dex FeeTo (r:1 w:0) // Storage: Dex LiquidityPoolLastK (r:1 w:1) fn remove_liquidity() -> Weight { - Weight::from_ref_time(333_350_000 as u64) + Weight::from_all(333_350_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn reenable_trading_pair() -> Weight { - Weight::from_ref_time(70_400_000 as u64) + Weight::from_all(70_400_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Dex TradingPairLPToken (r:1 w:0) // Storage: Dex TradingPairStatuses (r:1 w:1) fn disable_trading_pair() -> Weight { - Weight::from_ref_time(69_817_000 as u64) + Weight::from_all(69_817_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Dex FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(42_312_000 as u64) + Weight::from_all(42_312_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_doughnut.rs b/runtime/src/weights/pallet_doughnut.rs index 7006cbe67..91939b445 100644 --- a/runtime/src/weights/pallet_doughnut.rs +++ b/runtime/src/weights/pallet_doughnut.rs @@ -37,22 +37,22 @@ impl pallet_doughnut::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(504_337_000 as u64) + Weight::from_all(504_337_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) } // Storage: Doughnut BlockedDoughnuts (r:0 w:1) fn revoke_doughnut() -> Weight { - Weight::from_ref_time(68_652_000 as u64) + Weight::from_all(68_652_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Doughnut BlockedHolders (r:0 w:1) fn revoke_holder() -> Weight { - Weight::from_ref_time(41_219_000 as u64) + Weight::from_all(41_219_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Doughnut WhitelistedHolders (r:0 w:1) fn update_whitelisted_holders() -> Weight { - Weight::from_ref_time(39_451_000 as u64) + Weight::from_all(39_451_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_echo.rs b/runtime/src/weights/pallet_echo.rs index 9fb7eb7e5..0eda615ab 100644 --- a/runtime/src/weights/pallet_echo.rs +++ b/runtime/src/weights/pallet_echo.rs @@ -38,7 +38,7 @@ impl pallet_echo::WeightInfo for WeightInfo { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn ping() -> Weight { - Weight::from_ref_time(87_226_000 as u64) + Weight::from_all(87_226_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/src/weights/pallet_election_provider_multi_phase.rs b/runtime/src/weights/pallet_election_provider_multi_phase.rs index 91ccc6808..6cbea3426 100644 --- a/runtime/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/src/weights/pallet_election_provider_multi_phase.rs @@ -40,33 +40,33 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: Staking ForceEra (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) fn on_initialize_nothing() -> Weight { - Weight::from_ref_time(42_951_000 as u64) + Weight::from_all(42_951_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_signed() -> Weight { - Weight::from_ref_time(45_085_000 as u64) + Weight::from_all(45_085_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ElectionProviderMultiPhase Round (r:1 w:0) // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) fn on_initialize_open_unsigned() -> Weight { - Weight::from_ref_time(44_953_000 as u64) + Weight::from_all(44_953_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_ref_time(86_504_000 as u64) + Weight::from_all(86_504_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:2 w:2) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_ref_time(102_875_000 as u64) + Weight::from_all(102_875_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -76,9 +76,9 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { - Weight::from_ref_time(940_302_000 as u64) + Weight::from_all(940_302_000 as u64) // Standard Error: 4_670 - .saturating_add(Weight::from_ref_time(324_279 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(324_279 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -94,9 +94,9 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(1_323_337_000 as u64) + Weight::from_all(1_323_337_000 as u64) // Standard Error: 8_871 - .saturating_add(Weight::from_ref_time(624_058 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(624_058 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -108,7 +108,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - Weight::from_ref_time(151_199_000 as u64) + Weight::from_all(151_199_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -124,11 +124,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. fn submit_unsigned(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(11_261_392_000 as u64) + Weight::from_all(11_261_392_000 as u64) // Standard Error: 33_342 - .saturating_add(Weight::from_ref_time(1_146_340 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(1_146_340 as u64).saturating_mul(v as u64)) // Standard Error: 98_805 - .saturating_add(Weight::from_ref_time(5_995_651 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(5_995_651 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -141,11 +141,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { - Weight::from_ref_time(9_990_998_000 as u64) + Weight::from_all(9_990_998_000 as u64) // Standard Error: 26_953 - .saturating_add(Weight::from_ref_time(911_703 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(911_703 as u64).saturating_mul(v as u64)) // Standard Error: 79_872 - .saturating_add(Weight::from_ref_time(5_176_479 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(5_176_479 as u64).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) } } diff --git a/runtime/src/weights/pallet_erc20_peg.rs b/runtime/src/weights/pallet_erc20_peg.rs index 3ee40ecdb..5589389f7 100644 --- a/runtime/src/weights/pallet_erc20_peg.rs +++ b/runtime/src/weights/pallet_erc20_peg.rs @@ -33,12 +33,12 @@ pub struct WeightInfo(PhantomData); impl pallet_erc20_peg::WeightInfo for WeightInfo { // Storage: Erc20Peg DepositsActive (r:0 w:1) fn activate_deposits() -> Weight { - Weight::from_ref_time(17_003_000 as u64) + Weight::from_all(17_003_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) fn activate_withdrawals() -> Weight { - Weight::from_ref_time(17_081_000 as u64) + Weight::from_all(17_081_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) @@ -53,34 +53,34 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn withdraw() -> Weight { - Weight::from_ref_time(161_654_000 as u64) + Weight::from_all(161_654_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Erc20Peg ContractAddress (r:0 w:1) fn set_erc20_peg_address() -> Weight { - Weight::from_ref_time(41_085_000 as u64) + Weight::from_all(41_085_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) fn set_root_peg_address() -> Weight { - Weight::from_ref_time(41_437_000 as u64) + Weight::from_all(41_437_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) fn set_erc20_asset_map() -> Weight { - Weight::from_ref_time(21_866_000 as u64) + Weight::from_all(21_866_000 as u64) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Erc20Peg Erc20Meta (r:0 w:1) fn set_erc20_meta() -> Weight { - Weight::from_ref_time(20_333_000 as u64) + Weight::from_all(20_333_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(42_383_000 as u64) + Weight::from_all(42_383_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_evm_chain_id.rs b/runtime/src/weights/pallet_evm_chain_id.rs index e0ef4530f..6bad72c94 100644 --- a/runtime/src/weights/pallet_evm_chain_id.rs +++ b/runtime/src/weights/pallet_evm_chain_id.rs @@ -33,7 +33,7 @@ pub struct WeightInfo(PhantomData); impl pallet_evm_chain_id::WeightInfo for WeightInfo { // Storage: EVMChainId ChainId (r:0 w:1) fn set_chain_id() -> Weight { - Weight::from_ref_time(36_737_000 as u64) + Weight::from_all(36_737_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_fee_control.rs b/runtime/src/weights/pallet_fee_control.rs index b8e6923fb..1c6228749 100644 --- a/runtime/src/weights/pallet_fee_control.rs +++ b/runtime/src/weights/pallet_fee_control.rs @@ -33,13 +33,13 @@ pub struct WeightInfo(PhantomData); impl pallet_fee_control::WeightInfo for WeightInfo { // Storage: FeeControl Data (r:1 w:1) fn set_evm_base_fee() -> Weight { - Weight::from_ref_time(20_501_000 as u64) + Weight::from_all(20_501_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: FeeControl Data (r:1 w:1) fn set_weight_multiplier() -> Weight { - Weight::from_ref_time(19_789_000 as u64) + Weight::from_all(19_789_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_futurepass.rs b/runtime/src/weights/pallet_futurepass.rs index 9b3ada879..c0e8c3113 100644 --- a/runtime/src/weights/pallet_futurepass.rs +++ b/runtime/src/weights/pallet_futurepass.rs @@ -36,7 +36,7 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) // Storage: System Account (r:1 w:1) fn create() -> Weight { - Weight::from_ref_time(151_035_000 as u64) + Weight::from_all(151_035_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -45,9 +45,9 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_ref_time(225_223_000 as u64) + Weight::from_all(225_223_000 as u64) // Standard Error: 6_389 - .saturating_add(Weight::from_ref_time(320_135 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(320_135 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -56,9 +56,9 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_ref_time(150_724_000 as u64) + Weight::from_all(150_724_000 as u64) // Standard Error: 4_528 - .saturating_add(Weight::from_ref_time(342_256 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(342_256 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -67,9 +67,9 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_ref_time(205_036_000 as u64) + Weight::from_all(205_036_000 as u64) // Standard Error: 76_809 - .saturating_add(Weight::from_ref_time(51_031_323 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(51_031_323 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -78,9 +78,9 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_ref_time(92_606_000 as u64) + Weight::from_all(92_606_000 as u64) // Standard Error: 4_129 - .saturating_add(Weight::from_ref_time(248_098 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(248_098 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) } } diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index 603d2a3a8..3337d0565 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -39,11 +39,11 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - Weight::from_ref_time(259_324_000 as u64) + Weight::from_all(259_324_000 as u64) // Standard Error: 571 - .saturating_add(Weight::from_ref_time(28_460 as u64).saturating_mul(k as u64)) + .saturating_add(Weight::from_all(28_460 as u64).saturating_mul(k as u64)) // Standard Error: 5_721 - .saturating_add(Weight::from_ref_time(501_673 as u64).saturating_mul(e as u64)) + .saturating_add(Weight::from_all(501_673 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_maintenance_mode.rs b/runtime/src/weights/pallet_maintenance_mode.rs index d34ae8cfd..ad113c2fb 100644 --- a/runtime/src/weights/pallet_maintenance_mode.rs +++ b/runtime/src/weights/pallet_maintenance_mode.rs @@ -33,27 +33,27 @@ pub struct WeightInfo(PhantomData); impl pallet_maintenance_mode::WeightInfo for WeightInfo { // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) fn enable_maintenance_mode() -> Weight { - Weight::from_ref_time(37_105_000 as u64) + Weight::from_all(37_105_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) fn block_account() -> Weight { - Weight::from_ref_time(39_698_000 as u64) + Weight::from_all(39_698_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) fn block_evm_target() -> Weight { - Weight::from_ref_time(40_250_000 as u64) + Weight::from_all(40_250_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedCalls (r:0 w:1) fn block_call() -> Weight { - Weight::from_ref_time(42_341_000 as u64) + Weight::from_all(42_341_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: MaintenanceMode BlockedPallets (r:0 w:1) fn block_pallet() -> Weight { - Weight::from_ref_time(42_924_000 as u64) + Weight::from_all(42_924_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_marketplace.rs b/runtime/src/weights/pallet_marketplace.rs index baf14f09b..8a342b0d4 100644 --- a/runtime/src/weights/pallet_marketplace.rs +++ b/runtime/src/weights/pallet_marketplace.rs @@ -34,7 +34,7 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace NextMarketplaceId (r:1 w:1) // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) fn register_marketplace() -> Weight { - Weight::from_ref_time(54_893_000 as u64) + Weight::from_all(54_893_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -47,9 +47,9 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_ref_time(114_457_000 as u64) + Weight::from_all(114_457_000 as u64) // Standard Error: 8_169 - .saturating_add(Weight::from_ref_time(11_313_760 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(11_313_760 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -64,9 +64,9 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_ref_time(103_871_000 as u64) + Weight::from_all(103_871_000 as u64) // Standard Error: 6_979 - .saturating_add(Weight::from_ref_time(8_215_707 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(8_215_707 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -81,7 +81,7 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn buy() -> Weight { - Weight::from_ref_time(214_610_000 as u64) + Weight::from_all(214_610_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -95,9 +95,9 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Nft TokenLocks (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_ref_time(214_929_000 as u64) + Weight::from_all(214_929_000 as u64) // Standard Error: 149_332 - .saturating_add(Weight::from_ref_time(143_823_942 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(143_823_942 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(9 as u64)) @@ -112,9 +112,9 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_ref_time(114_630_000 as u64) + Weight::from_all(114_630_000 as u64) // Standard Error: 7_983 - .saturating_add(Weight::from_ref_time(11_305_102 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(11_305_102 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -129,9 +129,9 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_ref_time(102_552_000 as u64) + Weight::from_all(102_552_000 as u64) // Standard Error: 7_049 - .saturating_add(Weight::from_ref_time(8_159_046 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(8_159_046 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -145,7 +145,7 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Marketplace ListingEndSchedule (r:0 w:2) fn bid() -> Weight { - Weight::from_ref_time(198_371_000 as u64) + Weight::from_all(198_371_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -154,13 +154,13 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace OpenCollectionListings (r:0 w:1) // Storage: Nft TokenLocks (r:0 w:1) fn cancel_sale() -> Weight { - Weight::from_ref_time(77_516_000 as u64) + Weight::from_all(77_516_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Marketplace Listings (r:1 w:1) fn update_fixed_price() -> Weight { - Weight::from_ref_time(63_733_000 as u64) + Weight::from_all(63_733_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -174,7 +174,7 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: Marketplace Offers (r:0 w:1) fn make_simple_offer() -> Weight { - Weight::from_ref_time(193_035_000 as u64) + Weight::from_all(193_035_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -185,7 +185,7 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Marketplace TokenOffers (r:1 w:1) fn cancel_offer() -> Weight { - Weight::from_ref_time(176_013_000 as u64) + Weight::from_all(176_013_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -200,13 +200,13 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Storage: Marketplace TokenOffers (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn accept_offer() -> Weight { - Weight::from_ref_time(288_646_000 as u64) + Weight::from_all(288_646_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Marketplace FeeTo (r:0 w:1) fn set_fee_to() -> Weight { - Weight::from_ref_time(37_843_000 as u64) + Weight::from_all(37_843_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 57608c46e..1c5e25c64 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -33,20 +33,20 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - Weight::from_ref_time(43_675_000 as u64) + Weight::from_all(43_675_000 as u64) // Standard Error: 6 - .saturating_add(Weight::from_ref_time(1_120 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(1_120 as u64).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - Weight::from_ref_time(116_760_000 as u64) + Weight::from_all(116_760_000 as u64) // Standard Error: 1_981 - .saturating_add(Weight::from_ref_time(72_399 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(72_399 as u64).saturating_mul(s as u64)) // Standard Error: 19 - .saturating_add(Weight::from_ref_time(1_160 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(1_160 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -56,11 +56,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - Weight::from_ref_time(121_460_000 as u64) + Weight::from_all(121_460_000 as u64) // Standard Error: 2_349 - .saturating_add(Weight::from_ref_time(88_289 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(88_289 as u64).saturating_mul(s as u64)) // Standard Error: 23 - .saturating_add(Weight::from_ref_time(2_197 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(2_197 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,11 +68,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - Weight::from_ref_time(84_507_000 as u64) + Weight::from_all(84_507_000 as u64) // Standard Error: 1_562 - .saturating_add(Weight::from_ref_time(67_329 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(67_329 as u64).saturating_mul(s as u64)) // Standard Error: 15 - .saturating_add(Weight::from_ref_time(1_280 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(1_280 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -81,11 +81,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - Weight::from_ref_time(119_095_000 as u64) + Weight::from_all(119_095_000 as u64) // Standard Error: 1_700 - .saturating_add(Weight::from_ref_time(75_042 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(75_042 as u64).saturating_mul(s as u64)) // Standard Error: 17 - .saturating_add(Weight::from_ref_time(2_045 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(2_045 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -95,11 +95,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - Weight::from_ref_time(147_886_000 as u64) + Weight::from_all(147_886_000 as u64) // Standard Error: 2_224 - .saturating_add(Weight::from_ref_time(74_525 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(74_525 as u64).saturating_mul(s as u64)) // Standard Error: 22 - .saturating_add(Weight::from_ref_time(2_396 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_all(2_396 as u64).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -107,9 +107,9 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - Weight::from_ref_time(90_484_000 as u64) + Weight::from_all(90_484_000 as u64) // Standard Error: 2_392 - .saturating_add(Weight::from_ref_time(279_909 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(279_909 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -117,9 +117,9 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Calls (r:1 w:0) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - Weight::from_ref_time(63_903_000 as u64) + Weight::from_all(63_903_000 as u64) // Standard Error: 892 - .saturating_add(Weight::from_ref_time(210_558 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(210_558 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -128,9 +128,9 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_complete(s: u32, ) -> Weight { - Weight::from_ref_time(146_785_000 as u64) + Weight::from_all(146_785_000 as u64) // Standard Error: 1_622 - .saturating_add(Weight::from_ref_time(274_156 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(274_156 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -138,9 +138,9 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - Weight::from_ref_time(124_026_000 as u64) + Weight::from_all(124_026_000 as u64) // Standard Error: 1_684 - .saturating_add(Weight::from_ref_time(260_658 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(260_658 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/src/weights/pallet_nft.rs b/runtime/src/weights/pallet_nft.rs index 4452e376c..d5332ff61 100644 --- a/runtime/src/weights/pallet_nft.rs +++ b/runtime/src/weights/pallet_nft.rs @@ -33,37 +33,37 @@ pub struct WeightInfo(PhantomData); impl pallet_nft::WeightInfo for WeightInfo { // Storage: Nft CollectionInfo (r:1 w:1) fn claim_unowned_collection() -> Weight { - Weight::from_ref_time(57_640_000 as u64) + Weight::from_all(57_640_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(60_803_000 as u64) + Weight::from_all(60_803_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(60_691_000 as u64) + Weight::from_all(60_691_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(61_645_000 as u64) + Weight::from_all(61_645_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(60_914_000 as u64) + Weight::from_all(60_914_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(61_244_000 as u64) + Weight::from_all(61_244_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -73,28 +73,28 @@ impl pallet_nft::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Nft CollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(98_100_000 as u64) + Weight::from_all(98_100_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(62_779_000 as u64) + Weight::from_all(62_779_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Nft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(63_055_000 as u64) + Weight::from_all(63_055_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) // Storage: Nft PublicMintInfo (r:1 w:0) fn mint() -> Weight { - Weight::from_ref_time(71_057_000 as u64) + Weight::from_all(71_057_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -102,7 +102,7 @@ impl pallet_nft::WeightInfo for WeightInfo { // Storage: Nft TokenLocks (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn transfer() -> Weight { - Weight::from_ref_time(73_346_000 as u64) + Weight::from_all(73_346_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -110,7 +110,7 @@ impl pallet_nft::WeightInfo for WeightInfo { // Storage: Nft CollectionInfo (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn burn() -> Weight { - Weight::from_ref_time(71_205_000 as u64) + Weight::from_all(71_205_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/src/weights/pallet_nft_peg.rs b/runtime/src/weights/pallet_nft_peg.rs index 3ccd767f7..d49cc0253 100644 --- a/runtime/src/weights/pallet_nft_peg.rs +++ b/runtime/src/weights/pallet_nft_peg.rs @@ -33,7 +33,7 @@ pub struct WeightInfo(PhantomData); impl pallet_nft_peg::WeightInfo for WeightInfo { // Storage: NftPeg ContractAddress (r:0 w:1) fn set_contract_address() -> Weight { - Weight::from_ref_time(37_983_000 as u64) + Weight::from_all(37_983_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) @@ -47,7 +47,7 @@ impl pallet_nft_peg::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: TokenApprovals ERC721Approvals (r:0 w:3) fn withdraw() -> Weight { - Weight::from_ref_time(156_387_000 as u64) + Weight::from_all(156_387_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -61,7 +61,7 @@ impl pallet_nft_peg::WeightInfo for WeightInfo { // Storage: EthBridge BridgePaused (r:1 w:0) // Storage: System Digest (r:1 w:1) fn reclaim_blocked_nfts() -> Weight { - Weight::from_ref_time(125_473_000 as u64) + Weight::from_all(125_473_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/src/weights/pallet_preimage.rs b/runtime/src/weights/pallet_preimage.rs index 3db559d40..1d31d5732 100644 --- a/runtime/src/weights/pallet_preimage.rs +++ b/runtime/src/weights/pallet_preimage.rs @@ -35,9 +35,9 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(86_217_000 as u64) + Weight::from_all(86_217_000 as u64) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(2_824 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(2_824 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -45,9 +45,9 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(56_931_000 as u64) + Weight::from_all(56_931_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_798 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(2_798 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -55,67 +55,67 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(53_528_000 as u64) + Weight::from_all(53_528_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_801 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(2_801 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(111_854_000 as u64) + Weight::from_all(111_854_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(67_604_000 as u64) + Weight::from_all(67_604_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(92_443_000 as u64) + Weight::from_all(92_443_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(65_081_000 as u64) + Weight::from_all(65_081_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(50_653_000 as u64) + Weight::from_all(50_653_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(27_502_000 as u64) + Weight::from_all(27_502_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(70_399_000 as u64) + Weight::from_all(70_399_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(55_509_000 as u64) + Weight::from_all(55_509_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(27_227_000 as u64) + Weight::from_all(27_227_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index b75cfc657..2c0168343 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -36,9 +36,9 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedPallets (r:1 w:0) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_ref_time(72_038_000 as u64) + Weight::from_all(72_038_000 as u64) // Standard Error: 2_950 - .saturating_add(Weight::from_ref_time(172_231 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(172_231 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -49,11 +49,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(119_520_000 as u64) + Weight::from_all(119_520_000 as u64) // Standard Error: 2_174 - .saturating_add(Weight::from_ref_time(287_165 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(287_165 as u64).saturating_mul(a as u64)) // Standard Error: 2_166 - .saturating_add(Weight::from_ref_time(63_952 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(63_952 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -62,11 +62,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(74_742_000 as u64) + Weight::from_all(74_742_000 as u64) // Standard Error: 1_460 - .saturating_add(Weight::from_ref_time(293_515 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(293_515 as u64).saturating_mul(a as u64)) // Standard Error: 1_455 - .saturating_add(Weight::from_ref_time(42_459 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(42_459 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -75,11 +75,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(74_968_000 as u64) + Weight::from_all(74_968_000 as u64) // Standard Error: 1_532 - .saturating_add(Weight::from_ref_time(291_855 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(291_855 as u64).saturating_mul(a as u64)) // Standard Error: 1_526 - .saturating_add(Weight::from_ref_time(38_198 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(38_198 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,38 +89,38 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_ref_time(94_416_000 as u64) + Weight::from_all(94_416_000 as u64) // Standard Error: 1_714 - .saturating_add(Weight::from_ref_time(330_877 as u64).saturating_mul(a as u64)) + .saturating_add(Weight::from_all(330_877 as u64).saturating_mul(a as u64)) // Standard Error: 1_707 - .saturating_add(Weight::from_ref_time(111_571 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(111_571 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(80_745_000 as u64) + Weight::from_all(80_745_000 as u64) // Standard Error: 1_796 - .saturating_add(Weight::from_ref_time(153_336 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(153_336 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_ref_time(80_442_000 as u64) + Weight::from_all(80_442_000 as u64) // Standard Error: 2_920 - .saturating_add(Weight::from_ref_time(209_086 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(209_086 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_ref_time(71_639_000 as u64) + Weight::from_all(71_639_000 as u64) // Standard Error: 1_962 - .saturating_add(Weight::from_ref_time(138_291 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(138_291 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -128,18 +128,18 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { - Weight::from_ref_time(90_001_000 as u64) + Weight::from_all(90_001_000 as u64) // Standard Error: 2_403 - .saturating_add(Weight::from_ref_time(125_318 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(125_318 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Proxy Proxies (r:1 w:1) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_ref_time(74_261_000 as u64) + Weight::from_all(74_261_000 as u64) // Standard Error: 2_140 - .saturating_add(Weight::from_ref_time(134_788 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(134_788 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_recovery.rs b/runtime/src/weights/pallet_recovery.rs index 4ef4294a4..7bb3c43f6 100644 --- a/runtime/src/weights/pallet_recovery.rs +++ b/runtime/src/weights/pallet_recovery.rs @@ -35,27 +35,27 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn as_recovered() -> Weight { - Weight::from_ref_time(39_795_000 as u64) + Weight::from_all(39_795_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Recovery Proxy (r:0 w:1) fn set_recovered() -> Weight { - Weight::from_ref_time(41_958_000 as u64) + Weight::from_all(41_958_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Recovery Recoverable (r:1 w:1) /// The range of component `n` is `[1, 3]`. fn create_recovery(n: u32, ) -> Weight { - Weight::from_ref_time(76_749_000 as u64) + Weight::from_all(76_749_000 as u64) // Standard Error: 10_879 - .saturating_add(Weight::from_ref_time(427_761 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(427_761 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Recovery Recoverable (r:1 w:0) // Storage: Recovery ActiveRecoveries (r:1 w:1) fn initiate_recovery() -> Weight { - Weight::from_ref_time(87_814_000 as u64) + Weight::from_all(87_814_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -63,9 +63,9 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Storage: Recovery ActiveRecoveries (r:1 w:1) /// The range of component `n` is `[1, 3]`. fn vouch_recovery(n: u32, ) -> Weight { - Weight::from_ref_time(62_347_000 as u64) + Weight::from_all(62_347_000 as u64) // Standard Error: 10_571 - .saturating_add(Weight::from_ref_time(749_873 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(749_873 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -74,9 +74,9 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Storage: Recovery Proxy (r:1 w:1) /// The range of component `n` is `[1, 3]`. fn claim_recovery(n: u32, ) -> Weight { - Weight::from_ref_time(81_946_000 as u64) + Weight::from_all(81_946_000 as u64) // Standard Error: 12_095 - .saturating_add(Weight::from_ref_time(626_761 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(626_761 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -84,9 +84,9 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `n` is `[1, 3]`. fn close_recovery(n: u32, ) -> Weight { - Weight::from_ref_time(90_525_000 as u64) + Weight::from_all(90_525_000 as u64) // Standard Error: 15_736 - .saturating_add(Weight::from_ref_time(473_706 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(473_706 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -94,15 +94,15 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Storage: Recovery Recoverable (r:1 w:1) /// The range of component `n` is `[1, 3]`. fn remove_recovery(n: u32, ) -> Weight { - Weight::from_ref_time(90_367_000 as u64) + Weight::from_all(90_367_000 as u64) // Standard Error: 15_559 - .saturating_add(Weight::from_ref_time(467_866 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(467_866 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Recovery Proxy (r:1 w:1) fn cancel_recovered() -> Weight { - Weight::from_ref_time(45_173_000 as u64) + Weight::from_all(45_173_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index 08db3524b..c82e6078f 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -37,9 +37,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - Weight::from_ref_time(97_039_000 as u64) + Weight::from_all(97_039_000 as u64) // Standard Error: 36_233 - .saturating_add(Weight::from_ref_time(46_935_636 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(46_935_636 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(5 as u64)) @@ -51,9 +51,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_named_resolved(s: u32, ) -> Weight { - Weight::from_ref_time(85_657_000 as u64) + Weight::from_all(85_657_000 as u64) // Standard Error: 31_134 - .saturating_add(Weight::from_ref_time(37_300_713 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(37_300_713 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -64,9 +64,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - Weight::from_ref_time(86_779_000 as u64) + Weight::from_all(86_779_000 as u64) // Standard Error: 32_688 - .saturating_add(Weight::from_ref_time(38_924_364 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(38_924_364 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -77,9 +77,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_resolved(s: u32, ) -> Weight { - Weight::from_ref_time(81_839_000 as u64) + Weight::from_all(81_839_000 as u64) // Standard Error: 26_631 - .saturating_add(Weight::from_ref_time(34_023_234 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(34_023_234 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -90,9 +90,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_named_aborted(s: u32, ) -> Weight { - Weight::from_ref_time(41_718_000 as u64) + Weight::from_all(41_718_000 as u64) // Standard Error: 9_923 - .saturating_add(Weight::from_ref_time(12_359_648 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(12_359_648 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -102,9 +102,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:1 w:0) /// The range of component `s` is `[1, 50]`. fn on_initialize_aborted(s: u32, ) -> Weight { - Weight::from_ref_time(32_279_000 as u64) + Weight::from_all(32_279_000 as u64) // Standard Error: 4_860 - .saturating_add(Weight::from_ref_time(5_935_860 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(5_935_860 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -113,9 +113,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic_named(s: u32, ) -> Weight { - Weight::from_ref_time(65_878_000 as u64) + Weight::from_all(65_878_000 as u64) // Standard Error: 14_004 - .saturating_add(Weight::from_ref_time(22_226_424 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(22_226_424 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -124,9 +124,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:2 w:2) /// The range of component `s` is `[1, 50]`. fn on_initialize_periodic(s: u32, ) -> Weight { - Weight::from_ref_time(56_353_000 as u64) + Weight::from_all(56_353_000 as u64) // Standard Error: 8_363 - .saturating_add(Weight::from_ref_time(14_815_877 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(14_815_877 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -136,9 +136,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize_named(s: u32, ) -> Weight { - Weight::from_ref_time(54_443_000 as u64) + Weight::from_all(54_443_000 as u64) // Standard Error: 6_685 - .saturating_add(Weight::from_ref_time(13_564_076 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(13_564_076 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -146,18 +146,18 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn on_initialize(s: u32, ) -> Weight { - Weight::from_ref_time(51_457_000 as u64) + Weight::from_all(51_457_000 as u64) // Standard Error: 4_597 - .saturating_add(Weight::from_ref_time(10_751_635 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(10_751_635 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(48_281_000 as u64) + Weight::from_all(48_281_000 as u64) // Standard Error: 5_985 - .saturating_add(Weight::from_ref_time(428_425 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(428_425 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -165,9 +165,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Lookup (r:0 w:1) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_ref_time(53_998_000 as u64) + Weight::from_all(53_998_000 as u64) // Standard Error: 2_662 - .saturating_add(Weight::from_ref_time(1_323_278 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(1_323_278 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -175,9 +175,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_ref_time(56_276_000 as u64) + Weight::from_all(56_276_000 as u64) // Standard Error: 8_503 - .saturating_add(Weight::from_ref_time(608_966 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(608_966 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -185,9 +185,9 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_ref_time(56_560_000 as u64) + Weight::from_all(56_560_000 as u64) // Standard Error: 6_118 - .saturating_add(Weight::from_ref_time(1_491_672 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(1_491_672 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/src/weights/pallet_session.rs b/runtime/src/weights/pallet_session.rs index ca0a99f16..824c84e69 100644 --- a/runtime/src/weights/pallet_session.rs +++ b/runtime/src/weights/pallet_session.rs @@ -35,7 +35,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:4 w:4) fn set_keys() -> Weight { - Weight::from_ref_time(123_148_000 as u64) + Weight::from_all(123_148_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -43,7 +43,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:4) fn purge_keys() -> Weight { - Weight::from_ref_time(101_373_000 as u64) + Weight::from_all(101_373_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } diff --git a/runtime/src/weights/pallet_sft.rs b/runtime/src/weights/pallet_sft.rs index d5590890d..08415346e 100644 --- a/runtime/src/weights/pallet_sft.rs +++ b/runtime/src/weights/pallet_sft.rs @@ -37,30 +37,30 @@ impl pallet_sft::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Sft SftCollectionInfo (r:0 w:1) fn create_collection() -> Weight { - Weight::from_ref_time(97_485_000 as u64) + Weight::from_all(97_485_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) // Storage: Sft TokenInfo (r:0 w:1) fn create_token() -> Weight { - Weight::from_ref_time(68_303_000 as u64) + Weight::from_all(68_303_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn mint() -> Weight { - Weight::from_ref_time(69_085_000 as u64) + Weight::from_all(69_085_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft TokenInfo (r:1 w:1) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_ref_time(62_718_000 as u64) + Weight::from_all(62_718_000 as u64) // Standard Error: 3_822 - .saturating_add(Weight::from_ref_time(3_381_220 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -68,38 +68,38 @@ impl pallet_sft::WeightInfo for WeightInfo { } // Storage: Sft TokenInfo (r:1 w:1) fn burn() -> Weight { - Weight::from_ref_time(67_249_000 as u64) + Weight::from_all(67_249_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_owner() -> Weight { - Weight::from_ref_time(60_343_000 as u64) + Weight::from_all(60_343_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:0) // Storage: Sft TokenInfo (r:1 w:1) fn set_max_issuance() -> Weight { - Weight::from_ref_time(62_071_000 as u64) + Weight::from_all(62_071_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_base_uri() -> Weight { - Weight::from_ref_time(56_389_000 as u64) + Weight::from_all(56_389_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft SftCollectionInfo (r:1 w:1) fn set_name() -> Weight { - Weight::from_ref_time(56_311_000 as u64) + Weight::from_all(56_311_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:1) fn set_royalties_schedule() -> Weight { - Weight::from_ref_time(68_177_000 as u64) + Weight::from_all(68_177_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -107,14 +107,14 @@ impl pallet_sft::WeightInfo for WeightInfo { // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn toggle_public_mint() -> Weight { - Weight::from_ref_time(62_779_000 as u64) + Weight::from_all(62_779_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Sft CollectionInfo (r:1 w:0) // Storage: Sft PublicMintInfo (r:1 w:1) fn set_mint_fee() -> Weight { - Weight::from_ref_time(63_055_000 as u64) + Weight::from_all(63_055_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index c274b78dc..5ddb94119 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -37,7 +37,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - Weight::from_ref_time(124_513_000 as u64) + Weight::from_all(124_513_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -47,7 +47,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - Weight::from_ref_time(210_180_000 as u64) + Weight::from_all(210_180_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -61,7 +61,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - Weight::from_ref_time(222_249_000 as u64) + Weight::from_all(222_249_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -71,9 +71,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_ref_time(105_106_000 as u64) + Weight::from_all(105_106_000 as u64) // Standard Error: 794 - .saturating_add(Weight::from_ref_time(113_516 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(113_516 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -92,9 +92,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Payee (r:0 w:1) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(s: u32, ) -> Weight { - Weight::from_ref_time(193_766_000 as u64) + Weight::from_all(193_766_000 as u64) // Standard Error: 1_711 - .saturating_add(Weight::from_ref_time(38_899 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(38_899 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -110,7 +110,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - Weight::from_ref_time(154_123_000 as u64) + Weight::from_all(154_123_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -118,9 +118,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Nominators (r:1 w:1) /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - Weight::from_ref_time(93_055_000 as u64) + Weight::from_all(93_055_000 as u64) // Standard Error: 11_620 - .saturating_add(Weight::from_ref_time(15_212_704 as u64).saturating_mul(k as u64)) + .saturating_add(Weight::from_all(15_212_704 as u64).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -139,9 +139,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_ref_time(165_602_000 as u64) + Weight::from_all(165_602_000 as u64) // Standard Error: 14_193 - .saturating_add(Weight::from_ref_time(5_437_281 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(5_437_281 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(6 as u64)) @@ -154,50 +154,50 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - Weight::from_ref_time(143_595_000 as u64) + Weight::from_all(143_595_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - Weight::from_ref_time(44_472_000 as u64) + Weight::from_all(44_472_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(62_994_000 as u64) + Weight::from_all(62_994_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - Weight::from_ref_time(15_413_000 as u64) + Weight::from_all(15_413_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - Weight::from_ref_time(15_349_000 as u64) + Weight::from_all(15_349_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - Weight::from_ref_time(15_651_000 as u64) + Weight::from_all(15_651_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - Weight::from_ref_time(20_227_000 as u64) + Weight::from_all(20_227_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - Weight::from_ref_time(15_435_000 as u64) + Weight::from_all(15_435_000 as u64) // Standard Error: 101 - .saturating_add(Weight::from_ref_time(20_270 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(20_270 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Bonded (r:1 w:1) @@ -215,9 +215,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - Weight::from_ref_time(181_038_000 as u64) + Weight::from_all(181_038_000 as u64) // Standard Error: 5_013 - .saturating_add(Weight::from_ref_time(2_761_600 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(2_761_600 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -225,9 +225,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - Weight::from_ref_time(206_124_000 as u64) + Weight::from_all(206_124_000 as u64) // Standard Error: 56_954 - .saturating_add(Weight::from_ref_time(8_070_082 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(8_070_082 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -242,9 +242,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System Account (r:3 w:2) /// The range of component `n` is `[1, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - Weight::from_ref_time(423_132_000 as u64) + Weight::from_all(423_132_000 as u64) // Standard Error: 27_272 - .saturating_add(Weight::from_ref_time(52_434_686 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(52_434_686 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -262,9 +262,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Balances Locks (r:2 w:2) /// The range of component `n` is `[1, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - Weight::from_ref_time(457_966_000 as u64) + Weight::from_all(457_966_000 as u64) // Standard Error: 45_072 - .saturating_add(Weight::from_ref_time(71_850_733 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(71_850_733 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes(6 as u64)) @@ -278,9 +278,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - Weight::from_ref_time(209_695_000 as u64) + Weight::from_all(209_695_000 as u64) // Standard Error: 4_324 - .saturating_add(Weight::from_ref_time(119_279 as u64).saturating_mul(l as u64)) + .saturating_add(Weight::from_all(119_279 as u64).saturating_mul(l as u64)) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -299,9 +299,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - Weight::from_ref_time(209_631_000 as u64) + Weight::from_all(209_631_000 as u64) // Standard Error: 2_556 - .saturating_add(Weight::from_ref_time(2_617_822 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_all(2_617_822 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(13 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) @@ -327,11 +327,11 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `v` is `[1, 10]`. /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - Weight::from_ref_time(1_323_912_000 as u64) + Weight::from_all(1_323_912_000 as u64) // Standard Error: 2_550_625 - .saturating_add(Weight::from_ref_time(75_353_445 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(75_353_445 as u64).saturating_mul(v as u64)) // Standard Error: 253_922 - .saturating_add(Weight::from_ref_time(28_315_922 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(28_315_922 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(262 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) @@ -351,11 +351,11 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[500, 1000]`. /// The range of component `s` is `[1, 20]`. fn get_npos_voters(v: u32, n: u32, _s: u32, ) -> Weight { - Weight::from_ref_time(52_897_035_000 as u64) + Weight::from_all(52_897_035_000 as u64) // Standard Error: 412_068 - .saturating_add(Weight::from_ref_time(11_532_618 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(11_532_618 as u64).saturating_mul(v as u64)) // Standard Error: 412_068 - .saturating_add(Weight::from_ref_time(10_969_107 as u64).saturating_mul(n as u64)) + .saturating_add(Weight::from_all(10_969_107 as u64).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(6723 as u64)) .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(v as u64))) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) @@ -366,9 +366,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: System BlockWeight (r:1 w:1) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - Weight::from_ref_time(9_288_786_000 as u64) + Weight::from_all(9_288_786_000 as u64) // Standard Error: 102_881 - .saturating_add(Weight::from_ref_time(6_695_809 as u64).saturating_mul(v as u64)) + .saturating_add(Weight::from_all(6_695_809 as u64).saturating_mul(v as u64)) .saturating_add(T::DbWeight::get().reads(503 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -379,7 +379,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - Weight::from_ref_time(26_540_000 as u64) + Weight::from_all(26_540_000 as u64) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking MinCommission (r:0 w:1) @@ -389,7 +389,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - Weight::from_ref_time(24_869_000 as u64) + Weight::from_all(24_869_000 as u64) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking Ledger (r:1 w:0) @@ -403,14 +403,14 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - Weight::from_ref_time(184_604_000 as u64) + Weight::from_all(184_604_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - Weight::from_ref_time(48_456_000 as u64) + Weight::from_all(48_456_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index 6c3755a44..57b85c785 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -34,11 +34,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - Weight::from_ref_time(29_190_000 as u64) + Weight::from_all(29_190_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(14_458_000 as u64) + Weight::from_all(14_458_000 as u64) } } diff --git a/runtime/src/weights/pallet_token_approvals.rs b/runtime/src/weights/pallet_token_approvals.rs index 9ebe437b6..5754d97c8 100644 --- a/runtime/src/weights/pallet_token_approvals.rs +++ b/runtime/src/weights/pallet_token_approvals.rs @@ -35,36 +35,36 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) // Storage: TokenApprovals ERC721Approvals (r:0 w:1) fn erc721_approval() -> Weight { - Weight::from_ref_time(41_824_000 as u64) + Weight::from_all(41_824_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721Approvals (r:1 w:1) // Storage: Nft CollectionInfo (r:1 w:0) fn erc721_remove_approval() -> Weight { - Weight::from_ref_time(42_988_000 as u64) + Weight::from_all(42_988_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:0 w:1) fn erc20_approval() -> Weight { - Weight::from_ref_time(21_470_000 as u64) + Weight::from_all(21_470_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC20Approvals (r:1 w:1) fn erc20_update_approval() -> Weight { - Weight::from_ref_time(32_760_000 as u64) + Weight::from_all(32_760_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) fn erc721_approval_for_all() -> Weight { - Weight::from_ref_time(21_398_000 as u64) + Weight::from_all(21_398_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) fn erc1155_approval_for_all() -> Weight { - Weight::from_ref_time(21_109_000 as u64) + Weight::from_all(21_109_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/src/weights/pallet_utility.rs b/runtime/src/weights/pallet_utility.rs index 94bd53d63..35658dd5e 100644 --- a/runtime/src/weights/pallet_utility.rs +++ b/runtime/src/weights/pallet_utility.rs @@ -35,33 +35,33 @@ impl pallet_utility::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedPallets (r:1 w:0) /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(36_940_000 as u64) + Weight::from_all(36_940_000 as u64) // Standard Error: 2_666 - .saturating_add(Weight::from_ref_time(14_113_912 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_all(14_113_912 as u64).saturating_mul(c as u64)) } // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn as_derivative() -> Weight { - Weight::from_ref_time(32_466_000 as u64) + Weight::from_all(32_466_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(36_342_000 as u64) + Weight::from_all(36_342_000 as u64) // Standard Error: 2_193 - .saturating_add(Weight::from_ref_time(14_550_568 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_all(14_550_568 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(43_678_000 as u64) + Weight::from_all(43_678_000 as u64) } // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(36_175_000 as u64) + Weight::from_all(36_175_000 as u64) // Standard Error: 2_551 - .saturating_add(Weight::from_ref_time(14_050_984 as u64).saturating_mul(c as u64)) + .saturating_add(Weight::from_all(14_050_984 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index 6d888270b..c317c3ccc 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -34,34 +34,34 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Storage: VortexDistribution NextVortexId (r:1 w:1) // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) fn create_vtx_dist() -> Weight { - Weight::from_ref_time(53_641_000 as u64) + Weight::from_all(53_641_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) fn disable_vtx_dist() -> Weight { - Weight::from_ref_time(55_311_000 as u64) + Weight::from_all(55_311_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) // Storage: VortexDistribution TotalVortex (r:1 w:1) fn start_vtx_dist() -> Weight { - Weight::from_ref_time(77_840_000 as u64) + Weight::from_all(77_840_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: VortexDistribution VtxDistEras (r:0 w:1) fn set_vtx_dist_eras() -> Weight { - Weight::from_ref_time(44_888_000 as u64) + Weight::from_all(44_888_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: VortexDistribution AssetPrices (r:0 w:1) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_ref_time(53_257_000 as u64) + Weight::from_all(53_257_000 as u64) // Standard Error: 4_448 - .saturating_add(Weight::from_ref_time(3_512_910 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_all(3_512_910 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } @@ -69,7 +69,7 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) // Storage: VortexDistribution TotalVortex (r:1 w:1) fn register_rewards() -> Weight { - Weight::from_ref_time(60_788_000 as u64) + Weight::from_all(60_788_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,7 +79,7 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: System Account (r:3 w:3) fn trigger_vtx_distribution() -> Weight { - Weight::from_ref_time(236_875_000 as u64) + Weight::from_all(236_875_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -88,7 +88,7 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Storage: VortexDistribution AssetPrices (r:2 w:0) // Storage: System Account (r:1 w:0) fn redeem_tokens_from_vault() -> Weight { - Weight::from_ref_time(153_985_000 as u64) + Weight::from_all(153_985_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -100,7 +100,7 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) fn pay_unsigned() -> Weight { - Weight::from_ref_time(206_154_000 as u64) + Weight::from_all(206_154_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } diff --git a/runtime/src/weights/pallet_xls20.rs b/runtime/src/weights/pallet_xls20.rs index 1c46c7e81..d167fdac1 100644 --- a/runtime/src/weights/pallet_xls20.rs +++ b/runtime/src/weights/pallet_xls20.rs @@ -33,17 +33,17 @@ pub struct WeightInfo(PhantomData); impl pallet_xls20::WeightInfo for WeightInfo { // Storage: Xls20 Relayer (r:0 w:1) fn set_relayer() -> Weight { - Weight::from_ref_time(38_720_000 as u64) + Weight::from_all(38_720_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Xls20 Xls20MintFee (r:0 w:1) fn set_xls20_fee() -> Weight { - Weight::from_ref_time(37_570_000 as u64) + Weight::from_all(37_570_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Nft CollectionInfo (r:1 w:1) fn enable_xls20_compatibility() -> Weight { - Weight::from_ref_time(55_656_000 as u64) + Weight::from_all(55_656_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -51,14 +51,14 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Storage: Xls20 Xls20TokenMap (r:1 w:0) // Storage: Xls20 Xls20MintFee (r:1 w:0) fn re_request_xls20_mint() -> Weight { - Weight::from_ref_time(70_778_000 as u64) + Weight::from_all(70_778_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Xls20 Relayer (r:1 w:0) // Storage: Nft CollectionInfo (r:1 w:0) // Storage: Xls20 Xls20TokenMap (r:1 w:1) fn fulfill_xls20_mint() -> Weight { - Weight::from_ref_time(73_595_000 as u64) + Weight::from_all(73_595_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_xrpl.rs b/runtime/src/weights/pallet_xrpl.rs index c280772bb..93eaf1aa3 100644 --- a/runtime/src/weights/pallet_xrpl.rs +++ b/runtime/src/weights/pallet_xrpl.rs @@ -34,7 +34,7 @@ impl pallet_xrpl::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn transact() -> Weight { - Weight::from_ref_time(184_324_000 as u64) + Weight::from_all(184_324_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) } } diff --git a/runtime/src/weights/pallet_xrpl_bridge.rs b/runtime/src/weights/pallet_xrpl_bridge.rs index 166f61f9a..dd3a4cfb5 100644 --- a/runtime/src/weights/pallet_xrpl_bridge.rs +++ b/runtime/src/weights/pallet_xrpl_bridge.rs @@ -37,18 +37,18 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) fn submit_transaction() -> Weight { - Weight::from_ref_time(77_253_000 as u64) + Weight::from_all(77_253_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) fn submit_challenge() -> Weight { - Weight::from_ref_time(19_668_000 as u64) + Weight::from_all(19_668_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge PaymentDelay (r:0 w:1) fn set_payment_delay() -> Weight { - Weight::from_ref_time(10_560_000 as u64) + Weight::from_all(10_560_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:1 w:0) @@ -63,29 +63,29 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: System Digest (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn withdraw_xrp() -> Weight { - Weight::from_ref_time(151_314_000 as u64) + Weight::from_all(151_314_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: XRPLBridge Relayer (r:0 w:1) fn add_relayer() -> Weight { - Weight::from_ref_time(45_426_000 as u64) + Weight::from_all(45_426_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:1) fn remove_relayer() -> Weight { - Weight::from_ref_time(56_024_000 as u64) + Weight::from_all(56_024_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorTxFee (r:0 w:1) fn set_door_tx_fee() -> Weight { - Weight::from_ref_time(15_240_000 as u64) + Weight::from_all(15_240_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge DoorAddress (r:0 w:1) fn set_door_address() -> Weight { - Weight::from_ref_time(43_177_000 as u64) + Weight::from_all(43_177_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge Relayer (r:1 w:0) @@ -93,7 +93,7 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_ref_time(55_596_000 as u64) + Weight::from_all(55_596_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -101,7 +101,7 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_ref_time(51_718_000 as u64) + Weight::from_all(51_718_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -112,16 +112,16 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_ref_time(10_841_000 as u64) + Weight::from_all(10_841_000 as u64) // Standard Error: 4_892 - .saturating_add(Weight::from_ref_time(6_292_671 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) } // Storage: XRPLBridge SourceTag (r:0 w:1) fn set_xrp_source_tag() -> Weight { - Weight::from_ref_time(15_240_000 as u64) + Weight::from_all(15_240_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) @@ -130,9 +130,9 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_ref_time(16_281_000 as u64) + Weight::from_all(16_281_000 as u64) // Standard Error: 4_806 - .saturating_add(Weight::from_ref_time(916_903 as u64).saturating_mul(i as u64)) + .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) diff --git a/scripts/pallet_template.hbs b/scripts/pallet_template.hbs index 2c4fbd603..012915912 100644 --- a/scripts/pallet_template.hbs +++ b/scripts/pallet_template.hbs @@ -64,10 +64,10 @@ impl WeightInfo for SubstrateWeight { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}} as u64) + Weight::from_all({{underscore benchmark.base_weight}} as u64) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) + .saturating_add(Weight::from_all({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64)) @@ -99,10 +99,10 @@ impl WeightInfo for () { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}} as u64) + Weight::from_all({{underscore benchmark.base_weight}} as u64) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) + .saturating_add(Weight::from_all({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64)) From 8b6ac6c764b057947e9aebe8a576f7b8f15087a4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:05:50 +1300 Subject: [PATCH 015/112] use BlockNumberFor instead of BlockNumber, #14437 --- pallet/crowdsale/src/benchmarking.rs | 6 ++--- pallet/crowdsale/src/impls.rs | 4 ++-- pallet/crowdsale/src/lib.rs | 28 +++++++++++----------- pallet/dex/rpc/src/lib.rs | 2 +- pallet/dex/src/lib.rs | 18 +++++++-------- pallet/doughnut/src/lib.rs | 4 ++-- pallet/erc20-peg/src/benchmarking.rs | 2 +- pallet/erc20-peg/src/lib.rs | 22 +++++++++--------- pallet/ethy/src/impls.rs | 4 ++-- pallet/ethy/src/lib.rs | 20 ++++++++-------- pallet/futurepass/src/lib.rs | 4 ++-- pallet/marketplace/src/impls.rs | 10 ++++---- pallet/marketplace/src/lib.rs | 18 +++++++-------- pallet/marketplace/src/types.rs | 4 ++-- pallet/nft-peg/src/lib.rs | 2 +- pallet/vortex-distribution/src/lib.rs | 12 +++++----- pallet/xrpl-bridge/src/benchmarking.rs | 2 +- pallet/xrpl-bridge/src/lib.rs | 32 +++++++++++++------------- pallet/xrpl/src/lib.rs | 4 ++-- 19 files changed, 99 insertions(+), 99 deletions(-) diff --git a/pallet/crowdsale/src/benchmarking.rs b/pallet/crowdsale/src/benchmarking.rs index 7ca061bca..def647ccf 100644 --- a/pallet/crowdsale/src/benchmarking.rs +++ b/pallet/crowdsale/src/benchmarking.rs @@ -40,7 +40,7 @@ fn initialize_crowdsale(owner: T::AccountId) -> (SaleId, AssetId, Col let collection_id = build_collection::(owner.clone()); let soft_cap_price = 50_000_000; - let sale_duration: T::BlockNumber = 1000_u32.into(); + let sale_duration: BlockNumberFor = 1000_u32.into(); let sale_id = NextSaleId::::get(); CrowdSale::::initialize( @@ -62,7 +62,7 @@ benchmarks! { let payment_asset_id = T::MultiCurrency::create(&acc, None).unwrap(); let collection_id = build_collection::(acc.clone()); let soft_cap_price = 50_000_000; - let sale_duration: T::BlockNumber = 1000_u32.into(); + let sale_duration: BlockNumberFor = 1000_u32.into(); }: _(RawOrigin::Signed(acc.clone()), payment_asset_id, collection_id, soft_cap_price, sale_duration) verify { // validate NextSaleId @@ -76,7 +76,7 @@ benchmarks! { let collection_id = build_collection::(acc.clone()); let soft_cap_price = 50_000_000; - let sale_duration: T::BlockNumber = 1000_u32.into(); + let sale_duration: BlockNumberFor = 1000_u32.into(); CrowdSale::::initialize(RawOrigin::Signed(acc.clone()).into(), payment_asset_id, collection_id, soft_cap_price, sale_duration).unwrap(); let sale_id = 0; diff --git a/pallet/crowdsale/src/impls.rs b/pallet/crowdsale/src/impls.rs index 5e4fffe6b..4a839ea0c 100644 --- a/pallet/crowdsale/src/impls.rs +++ b/pallet/crowdsale/src/impls.rs @@ -91,7 +91,7 @@ impl Pallet { // Transfers vouchers from the vault account into a users wallet and returns the amount minted. pub fn transfer_user_vouchers( who: T::AccountId, - sale_info: &SaleInformation, + sale_info: &SaleInformation>, contribution: Balance, voucher_max_supply: Balance, ) -> Result { @@ -124,7 +124,7 @@ impl Pallet { } /// Close all crowdsales that are scheduled to end this block. - pub(crate) fn close_sales_at(now: T::BlockNumber) -> Result { + pub(crate) fn close_sales_at(now: BlockNumberFor) -> Result { let mut removed = 0_u32; let Some(sales_to_close) = SaleEndBlocks::::take(now) else { diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index c7aa105ee..e0933b1af 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -105,11 +105,11 @@ pub mod pallet { /// The maximum duration of a sale #[pallet::constant] - type MaxSaleDuration: Get; + type MaxSaleDuration: Get>; /// Unsigned transaction interval #[pallet::constant] - type UnsignedInterval: Get; + type UnsignedInterval: Get>; /// Interface to access weight values type WeightInfo: WeightInfo; @@ -122,7 +122,7 @@ pub mod pallet { /// Map from sale id to its information #[pallet::storage] pub type SaleInfo = - StorageMap<_, Twox64Concat, SaleId, SaleInformation>; + StorageMap<_, Twox64Concat, SaleId, SaleInformation>>; /// User participation in the sale /// sale_id -> user -> payment_asset contribution amount @@ -136,7 +136,7 @@ pub mod pallet { pub type SaleEndBlocks = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, OptionQuery, >; @@ -148,18 +148,18 @@ pub mod pallet { /// Stores next unsigned tx block number #[pallet::storage] - pub(super) type NextUnsignedAt = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type NextUnsignedAt = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Crowdsale created - CrowdsaleCreated { sale_id: SaleId, info: SaleInformation }, + CrowdsaleCreated { sale_id: SaleId, info: SaleInformation> }, /// Crowdsale enabled CrowdsaleEnabled { sale_id: SaleId, - info: SaleInformation, - end_block: T::BlockNumber, + info: SaleInformation>, + end_block: BlockNumberFor, }, /// Crowdsale participated CrowdsaleParticipated { @@ -176,11 +176,11 @@ pub mod pallet { quantity: TokenCount, }, /// Crowdsale closed - CrowdsaleClosed { sale_id: SaleId, info: SaleInformation }, + CrowdsaleClosed { sale_id: SaleId, info: SaleInformation> }, /// Crowdsale distribution was manually triggered CrowdsaleManualDistribution { sale_id: SaleId, - info: SaleInformation, + info: SaleInformation>, who: T::AccountId, }, /// Crowdsale vouchers claimed @@ -232,7 +232,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { /// Check and close all expired listings - fn on_initialize(now: T::BlockNumber) -> Weight { + fn on_initialize(now: BlockNumberFor) -> Weight { let total_closed: u32 = match Self::close_sales_at(now) { Ok(total_closed) => total_closed, Err(e) => { @@ -250,7 +250,7 @@ pub mod pallet { } /// Offchain worker processes closed sales to distribute voucher rewards to participants - fn offchain_worker(now: T::BlockNumber) { + fn offchain_worker(now: BlockNumberFor) { if !sp_io::offchain::is_validator() { log!( error, @@ -318,7 +318,7 @@ pub mod pallet { payment_asset_id: AssetId, collection_id: CollectionUuid, soft_cap_price: Balance, - sale_duration: T::BlockNumber, + sale_duration: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -357,7 +357,7 @@ pub mod pallet { let voucher_asset_id = Self::create_voucher_asset(&vault, sale_id, max_issuance)?; // store the sale information - let sale_info = SaleInformation:: { + let sale_info = SaleInformation::> { status: SaleStatus::Pending(>::block_number()), admin: who.clone(), vault, diff --git a/pallet/dex/rpc/src/lib.rs b/pallet/dex/rpc/src/lib.rs index e869c7f0a..09e68a616 100644 --- a/pallet/dex/rpc/src/lib.rs +++ b/pallet/dex/rpc/src/lib.rs @@ -96,7 +96,7 @@ where impl DexApiServer for Dex where Block: BlockT, - T: Config + Send + Sync, + T: Config + Send + Sync, ::AccountId: From, C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: DexRuntimeApi, diff --git a/pallet/dex/src/lib.rs b/pallet/dex/src/lib.rs index a09e22e7a..a28969ed3 100644 --- a/pallet/dex/src/lib.rs +++ b/pallet/dex/src/lib.rs @@ -249,7 +249,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::hooks] - impl Hooks for Pallet where + impl Hooks> for Pallet where ::AccountId: From { } @@ -297,7 +297,7 @@ pub mod pallet { #[pallet::compact] amount_out_min: Balance, path: Vec, to: Option, - deadline: Option, + deadline: Option>, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -332,7 +332,7 @@ pub mod pallet { #[pallet::compact] amount_in_max: Balance, path: Vec, to: Option, - deadline: Option, + deadline: Option>, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -379,7 +379,7 @@ pub mod pallet { #[pallet::compact] amount_a_min: Balance, #[pallet::compact] amount_b_min: Balance, to: Option, - deadline: Option, + deadline: Option>, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -422,7 +422,7 @@ pub mod pallet { #[pallet::compact] amount_a_min: Balance, #[pallet::compact] amount_b_min: Balance, to: Option, - deadline: Option, + deadline: Option>, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -578,7 +578,7 @@ where amount_a_min: Balance, amount_b_min: Balance, to: T::AccountId, - deadline: Option, + deadline: Option>, ) -> sp_std::result::Result<(Balance, Balance, Balance), DispatchError> { const MINIMUM_LIQUIDITY_AMOUNT: u128 = 1000_u128; // for 18 decimals -> 1000; hence for 6 decimals -> 10 @@ -738,7 +738,7 @@ where amount_a_min: Balance, amount_b_min: Balance, to: T::AccountId, - deadline: Option, + deadline: Option>, ) -> sp_std::result::Result<(Balance, Balance), DispatchError> { // Check if the deadline is met when the `deadline` parameter is not None if let Some(deadline_block) = deadline { @@ -1152,7 +1152,7 @@ where min_amount_out: Balance, path: &[AssetId], to: T::AccountId, - deadline: Option, + deadline: Option>, ) -> sp_std::result::Result< (Vec, Vec<(Balance, Balance, Balance, Balance)>), DispatchError, @@ -1192,7 +1192,7 @@ where amount_in_max: Balance, path: &[AssetId], to: T::AccountId, - deadline: Option, + deadline: Option>, ) -> sp_std::result::Result< (Vec, Vec<(Balance, Balance, Balance, Balance)>), DispatchError, diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index e3caf9fdb..a7e8cb876 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -259,7 +259,7 @@ impl Call call: &::RuntimeCall, ) -> Result { // Genesis hash check - let genesis_hash_onchain: T::Hash = frame_system::Pallet::::block_hash(T::BlockNumber::zero()); + let genesis_hash_onchain: T::Hash = frame_system::Pallet::::block_hash(BlockNumberFor::zero()); if *genesis_hash != genesis_hash_onchain { log!(info,"🍩 genesis hash mismatch: {:?}", genesis_hash); return Err("🍩 genesis hash mismatch".into()) @@ -401,7 +401,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet where + impl Hooks> for Pallet where ::AccountId: From { } diff --git a/pallet/erc20-peg/src/benchmarking.rs b/pallet/erc20-peg/src/benchmarking.rs index 9df12626f..647196849 100644 --- a/pallet/erc20-peg/src/benchmarking.rs +++ b/pallet/erc20-peg/src/benchmarking.rs @@ -124,7 +124,7 @@ benchmarks! { set_payment_delay { let asset_id: AssetId = 0x1A4u32.into(); let min_balance: Balance = 10u32.into(); - let delay: T::BlockNumber = 20u32.into(); + let delay: BlockNumberFor = 20u32.into(); // Sanity check assert_eq!(PaymentDelay::::get(asset_id), None); diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index ddfd1a8b8..07b726f92 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -85,13 +85,13 @@ decl_storage! { /// Metadata for well-known erc20 tokens (symbol, decimals) Erc20Meta get(fn erc20_meta): map hasher(twox_64_concat) EthAddress => Option<(Vec, u8)>; /// Map from asset_id to minimum amount and delay - PaymentDelay get(fn payment_delay): map hasher(twox_64_concat) AssetId => Option<(Balance, T::BlockNumber)>; + PaymentDelay get(fn payment_delay): map hasher(twox_64_concat) AssetId => Option<(Balance, BlockNumberFor)>; /// Map from DelayedPaymentId to PendingPayment DelayedPayments get(fn delayed_payments): map hasher(twox_64_concat) DelayedPaymentId => Option; /// Map from block number to DelayedPaymentIds scheduled for that block - DelayedPaymentSchedule get(fn delayed_payment_schedule): map hasher(twox_64_concat) T::BlockNumber => Vec; + DelayedPaymentSchedule get(fn delayed_payment_schedule): map hasher(twox_64_concat) BlockNumberFor => Vec; /// The blocks with payments that are ready to be processed - ReadyBlocks get(fn ready_blocks): Vec; + ReadyBlocks get(fn ready_blocks): Vec>; /// The next available payment id for withdrawals and deposits NextDelayedPaymentId get(fn next_delayed_payment_id): DelayedPaymentId; /// The peg contract address on Ethereum @@ -112,7 +112,7 @@ decl_storage! { decl_event! { pub enum Event where AccountId = ::AccountId, - BlockNumber = ::BlockNumber, + BlockNumber = BlockNumberFor, { /// An erc20 deposit has been delayed.(payment_id, scheduled block, amount, beneficiary) Erc20DepositDelayed(DelayedPaymentId, BlockNumber, Balance, AccountId), @@ -169,7 +169,7 @@ decl_module! { fn deposit_event() = default; /// Check and process outstanding payments - fn on_initialize(now: T::BlockNumber) -> Weight { + fn on_initialize(now: BlockNumberFor) -> Weight { let mut weight: Weight = DbWeight::get().reads(1u64); if DelayedPaymentSchedule::::contains_key(now) { ReadyBlocks::::append(now); @@ -179,7 +179,7 @@ decl_module! { } /// Check and process outstanding payments - fn on_idle(_now: T::BlockNumber, remaining_weight: Weight) -> Weight { + fn on_idle(_now: BlockNumberFor, remaining_weight: Weight) -> Weight { let initial_read_cost = DbWeight::get().reads(1u64); // Ensure we have enough weight to perform the initial read if remaining_weight.all_lte(initial_read_cost) { @@ -194,7 +194,7 @@ decl_module! { // Process as many payments as we can let weight_each: Weight = DbWeight::get().reads(8u64).saturating_add(DbWeight::get().writes(10u64)); let max_payments = remaining_weight.sub(initial_read_cost.ref_time()).div(weight_each.ref_time()).ref_time().saturated_into::(); - let ready_blocks: Vec = Self::ready_blocks(); + let ready_blocks: Vec> = Self::ready_blocks(); // Total payments processed in this block let mut processed_payment_count: u8 = 0; // Count of blocks where all payments have been processed @@ -282,7 +282,7 @@ decl_module! { #[weight = T::WeightInfo::set_payment_delay()] /// Sets the payment delay for a given AssetId - pub fn set_payment_delay(origin, asset_id: AssetId, min_balance: Balance, delay: T::BlockNumber) { + pub fn set_payment_delay(origin, asset_id: AssetId, min_balance: Balance, delay: BlockNumberFor) { ensure_root(origin)?; PaymentDelay::::insert(asset_id, (min_balance, delay)); Self::deposit_event(>::PaymentDelaySet(asset_id, min_balance, delay)); @@ -314,7 +314,7 @@ impl Module { let message = WithdrawMessage { token_address, amount: amount.into(), beneficiary }; // Check if there is a delay on the asset - let payment_delay: Option<(Balance, T::BlockNumber)> = Self::payment_delay(asset_id); + let payment_delay: Option<(Balance, BlockNumberFor)> = Self::payment_delay(asset_id); if let Some((min_amount, delay)) = payment_delay { if min_amount <= amount { return match call_origin { @@ -419,7 +419,7 @@ impl Module { } /// Delay a withdrawal or deposit until a later block - pub fn delay_payment(delay: T::BlockNumber, pending_payment: PendingPayment) { + pub fn delay_payment(delay: BlockNumberFor, pending_payment: PendingPayment) { let payment_id = NextDelayedPaymentId::get(); if !payment_id.checked_add(One::one()).is_some() { Self::deposit_event(Event::::NoAvailableDelayedPaymentIds); @@ -476,7 +476,7 @@ impl Module { ensure!(source == &Self::contract_address(), Error::::InvalidSourceAddress); } // Asset exists, check if there are delays on this deposit - let payment_delay: Option<(Balance, T::BlockNumber)> = Self::payment_delay(asset_id); + let payment_delay: Option<(Balance, BlockNumberFor)> = Self::payment_delay(asset_id); if let Some((min_amount, delay)) = payment_delay { if U256::from(min_amount) <= deposit_event.amount { Self::delay_payment(delay, PendingPayment::Deposit(deposit_event.clone())); diff --git a/pallet/ethy/src/impls.rs b/pallet/ethy/src/impls.rs index 15003ca69..6e0220320 100644 --- a/pallet/ethy/src/impls.rs +++ b/pallet/ethy/src/impls.rs @@ -913,8 +913,8 @@ impl OneSessionHandler for Module { // Next authority change is 5 minutes before this session ends // (Just before the start of the next epoch) // next_block = current_block + epoch_duration - AuthorityChangeDelay - let epoch_duration: T::BlockNumber = T::EpochDuration::get().saturated_into(); - let next_block: T::BlockNumber = >::block_number() + let epoch_duration: BlockNumberFor = T::EpochDuration::get().saturated_into(); + let next_block: BlockNumberFor = >::block_number() .saturating_add(epoch_duration.saturating_sub(T::AuthorityChangeDelay::get())); >::put(next_block); } diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index b06b7a3d6..f6ae8984d 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -94,7 +94,7 @@ const SUBMIT_BRIDGE_EVENT_SELECTOR: [u8; 32] = /// This is the pallet's configuration trait pub trait Config: frame_system::Config + CreateSignedTransaction> { /// Length of time the bridge will be paused while the authority set changes - type AuthorityChangeDelay: Get; + type AuthorityChangeDelay: Get>; /// Knows the active authority set (validator stash addresses) type AuthoritySet: ValidatorSetT; /// The pallet bridge address (destination for incoming messages, source for outgoing) @@ -134,7 +134,7 @@ pub trait Config: frame_system::Config + CreateSignedTransaction> { /// Bond required for an account to act as relayer type RelayerBond: Get; /// The Scheduler. - type Scheduler: Anon::RuntimeCall, Self::PalletsOrigin>; + type Scheduler: Anon, ::RuntimeCall, Self::PalletsOrigin>; /// Overarching type of all pallets origins. type PalletsOrigin: From>; /// Returns the block timestamp @@ -154,7 +154,7 @@ decl_storage! { /// Maps from event claim id to challenger and bond amount paid ChallengerAccount get(fn challenger_account): map hasher(twox_64_concat) EventClaimId => Option<(T::AccountId, Balance)>; /// The (optimistic) challenge period after which a submitted event is considered valid - ChallengePeriod get(fn challenge_period): T::BlockNumber = T::BlockNumber::from(150_u32); // 10 Minutes + ChallengePeriod get(fn challenge_period): BlockNumberFor = BlockNumberFor::from(150_u32); // 10 Minutes /// The bridge contract address on Ethereum pub ContractAddress get(fn contract_address): EthAddress; /// The minimum number of block confirmations needed to notarize an Ethereum event @@ -193,9 +193,9 @@ decl_storage! { /// Tracks processed message Ids (prevent replay) ProcessedMessageIds get(fn processed_message_ids): Vec; /// The block in which we process the next authority change - NextAuthorityChange get(fn next_authority_change): Option; + NextAuthorityChange get(fn next_authority_change): Option>; /// Map from block number to list of EventClaims that will be considered valid and should be forwarded to handlers (i.e after the optimistic challenge period has passed without issue) - MessagesValidAt get(fn messages_valid_at): map hasher(twox_64_concat) T::BlockNumber => Vec; + MessagesValidAt get(fn messages_valid_at): map hasher(twox_64_concat) BlockNumberFor => Vec; // State Oracle /// Subscription Id for EthCall requests NextEthCallId: EthCallId; @@ -233,7 +233,7 @@ decl_storage! { decl_event! { pub enum Event where AccountId = ::AccountId, - BlockNumber = ::BlockNumber, + BlockNumber = BlockNumberFor, { /// Verifying an event succeeded Verified(EventClaimId), @@ -326,7 +326,7 @@ decl_module! { /// 1) Handle change in authorities 5 minutes before the end of an epoch /// 2) Process any newly valid event claims (incoming) /// 3) Process any deferred event proofs that were submitted while the bridge was paused (should only happen on the first few blocks in a new era) (outgoing) - fn on_initialize(block_number: T::BlockNumber) -> Weight { + fn on_initialize(block_number: BlockNumberFor) -> Weight { let mut consumed_weight = Weight::zero(); // 1) Handle authority change @@ -478,7 +478,7 @@ decl_module! { #[weight = DbWeight::get().writes(1)] /// Set challenge period, this is the window in which an event can be challenged before processing - pub fn set_challenge_period(origin, blocks: T::BlockNumber) { + pub fn set_challenge_period(origin, blocks: BlockNumberFor) { ensure_root(origin)?; >::put(blocks); } @@ -544,7 +544,7 @@ decl_module! { PendingClaimStatus::insert(event_id, EventClaimStatus::Pending); // TODO: there should be some limit per block - let process_at: T::BlockNumber = >::block_number() + Self::challenge_period(); + let process_at: BlockNumberFor = >::block_number() + Self::challenge_period(); >::append(process_at, event_id); Self::deposit_event(Event::::EventSubmit(event_id, event_claim, process_at)); @@ -605,7 +605,7 @@ decl_module! { } } - fn offchain_worker(block_number: T::BlockNumber) { + fn offchain_worker(block_number: BlockNumberFor) { log!(trace, "💎 entering off-chain worker: {:?}", block_number); log!(trace, "💎 active notaries: {:?}", Self::notary_keys()); diff --git a/pallet/futurepass/src/lib.rs b/pallet/futurepass/src/lib.rs index 5ad64e105..e5aabc803 100644 --- a/pallet/futurepass/src/lib.rs +++ b/pallet/futurepass/src/lib.rs @@ -252,7 +252,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet where + impl Hooks> for Pallet where ::AccountId: From { } @@ -338,7 +338,7 @@ pub mod pallet { Error::::DelegateAlreadyExists ); - let deadline_block_number: T::BlockNumber = deadline.into(); + let deadline_block_number: BlockNumberFor = deadline.into(); ensure!( deadline_block_number >= frame_system::Pallet::::block_number(), Error::::ExpiredDeadline diff --git a/pallet/marketplace/src/impls.rs b/pallet/marketplace/src/impls.rs index 61644509b..c7fa272e8 100644 --- a/pallet/marketplace/src/impls.rs +++ b/pallet/marketplace/src/impls.rs @@ -54,7 +54,7 @@ impl Pallet { buyer: Option, payment_asset: AssetId, fixed_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> Result { // Validate tokens @@ -176,7 +176,7 @@ impl Pallet { tokens: ListingTokens, payment_asset: AssetId, reserve_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> Result { // Validate tokens and get collection_id @@ -251,8 +251,8 @@ impl Pallet { let listing_end_block = listing.close; let current_block = >::block_number(); let blocks_till_close = listing_end_block - current_block; - let new_closing_block = current_block + T::BlockNumber::from(AUCTION_EXTENSION_PERIOD); - if blocks_till_close <= T::BlockNumber::from(AUCTION_EXTENSION_PERIOD) { + let new_closing_block = current_block + BlockNumberFor::from(AUCTION_EXTENSION_PERIOD); + if blocks_till_close <= BlockNumberFor::from(AUCTION_EXTENSION_PERIOD) { ListingEndSchedule::::remove(listing_end_block, listing_id); ListingEndSchedule::::insert(new_closing_block, listing_id, true); listing.close = new_closing_block; @@ -426,7 +426,7 @@ impl Pallet { /// Close all listings scheduled to close at this block `now`, ensuring payments and ownerships /// changes are made for winning bids Metadata for listings will be removed from storage /// Returns the number of listings removed - pub(crate) fn close_listings_at(now: T::BlockNumber) -> u32 { + pub(crate) fn close_listings_at(now: BlockNumberFor) -> u32 { let mut removed = 0_u32; for (listing_id, _) in ListingEndSchedule::::drain_prefix(now).into_iter() { let Some(listing_outer) = Listings::::get(listing_id) else { diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index 0236744c7..da19cd042 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -90,7 +90,7 @@ pub mod pallet { + GetDispatchInfo; /// Default auction / sale length in blocks #[pallet::constant] - type DefaultListingDuration: Get; + type DefaultListingDuration: Get>; /// The system event type type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The default account which collects network fees from marketplace sales @@ -163,7 +163,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn listing_end_schedule)] pub type ListingEndSchedule = - StorageDoubleMap<_, Twox64Concat, T::BlockNumber, Twox64Concat, ListingId, bool>; + StorageDoubleMap<_, Twox64Concat, BlockNumberFor, Twox64Concat, ListingId, bool>; /// Map from offer_id to the information related to the offer #[pallet::storage] @@ -196,7 +196,7 @@ pub mod pallet { price: Balance, payment_asset: AssetId, seller: T::AccountId, - close: T::BlockNumber, + close: BlockNumberFor, }, /// A fixed price sale has completed FixedPriceSaleComplete { @@ -230,7 +230,7 @@ pub mod pallet { payment_asset: AssetId, reserve_price: Balance, seller: T::AccountId, - close: T::BlockNumber, + close: BlockNumberFor, }, /// An auction has sold AuctionSold { @@ -333,7 +333,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { /// Check and close all expired listings - fn on_initialize(now: T::BlockNumber) -> Weight { + fn on_initialize(now: BlockNumberFor) -> Weight { // TODO: this is unbounded and could become costly // https://github.com/cennznet/cennznet/issues/444 let removed_count = Self::close_listings_at(now); @@ -380,7 +380,7 @@ pub mod pallet { buyer: Option, payment_asset: AssetId, fixed_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -418,7 +418,7 @@ pub mod pallet { buyer: Option, payment_asset: AssetId, fixed_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -492,7 +492,7 @@ pub mod pallet { serial_numbers: BoundedVec, payment_asset: AssetId, reserve_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -520,7 +520,7 @@ pub mod pallet { tokens: ListingTokens, payment_asset: AssetId, reserve_price: Balance, - duration: Option, + duration: Option>, marketplace_id: Option, ) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/pallet/marketplace/src/types.rs b/pallet/marketplace/src/types.rs index bf56a2923..a2b346c9e 100644 --- a/pallet/marketplace/src/types.rs +++ b/pallet/marketplace/src/types.rs @@ -236,7 +236,7 @@ pub struct AuctionListing { /// The threshold amount for a successful bid pub reserve_price: Balance, /// When the listing closes - pub close: T::BlockNumber, + pub close: BlockNumberFor, /// The seller of the tokens pub seller: T::AccountId, /// The tokens contained within the listing @@ -256,7 +256,7 @@ pub struct FixedPriceListing { /// The requested amount for a succesful sale pub fixed_price: Balance, /// When the listing closes - pub close: T::BlockNumber, + pub close: BlockNumberFor, /// The authorised buyer. If unset, any buyer is authorised pub buyer: Option, /// The seller of the tokens diff --git a/pallet/nft-peg/src/lib.rs b/pallet/nft-peg/src/lib.rs index 0492a474b..bcc6641a8 100644 --- a/pallet/nft-peg/src/lib.rs +++ b/pallet/nft-peg/src/lib.rs @@ -53,7 +53,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; type PalletId: Get; #[pallet::constant] - type DelayLength: Get; + type DelayLength: Get>; type MaxAddresses: Get; type MaxTokensPerMint: Get; type EthBridge: EthereumBridge; diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex-distribution/src/lib.rs index a77d9e9ec..4b0bfa44c 100644 --- a/pallet/vortex-distribution/src/lib.rs +++ b/pallet/vortex-distribution/src/lib.rs @@ -122,7 +122,7 @@ pub mod pallet { /// Unsigned transaction interval #[pallet::constant] - type UnsignedInterval: Get; + type UnsignedInterval: Get>; /// Payout batch size #[pallet::constant] @@ -223,7 +223,7 @@ pub mod pallet { /// Stores next unsigned tx block number #[pallet::storage] - pub(super) type NextUnsignedAt = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type NextUnsignedAt = StorageValue<_, BlockNumberFor, ValueQuery>; /// Stores payout pivot block for each vortex distribution #[pallet::storage] @@ -276,9 +276,9 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { + impl Hooks> for Pallet { // incentive calculation - fn offchain_worker(now: T::BlockNumber) { + fn offchain_worker(now: BlockNumberFor) { if let Err(e) = Self::vtx_dist_offchain_worker(now) { log::info!( target: "vtx-dist", @@ -420,7 +420,7 @@ pub mod pallet { pub fn pay_unsigned( origin: OriginFor, id: T::VtxDistIdentifier, - _current_block: T::BlockNumber, + _current_block: BlockNumberFor, ) -> DispatchResult { ensure_none(origin)?; if let VtxDistStatus::Paying = VtxDistStatuses::::get(id) { @@ -731,7 +731,7 @@ pub mod pallet { } /// offchain worker for unsigned tx - fn vtx_dist_offchain_worker(now: T::BlockNumber) -> Result<(), OffchainErr> { + fn vtx_dist_offchain_worker(now: BlockNumberFor) -> Result<(), OffchainErr> { if !sp_io::offchain::is_validator() { return Err(OffchainErr::NotAValidator) } diff --git a/pallet/xrpl-bridge/src/benchmarking.rs b/pallet/xrpl-bridge/src/benchmarking.rs index 7725cf126..9329058c4 100644 --- a/pallet/xrpl-bridge/src/benchmarking.rs +++ b/pallet/xrpl-bridge/src/benchmarking.rs @@ -60,7 +60,7 @@ benchmarks! { } set_payment_delay { - let payment_delay: (u128, T::BlockNumber) = (100, T::BlockNumber::from(1000u32)); + let payment_delay: (u128, BlockNumberFor) = (100, BlockNumberFor::from(1000u32)); }: _(RawOrigin::Root, Some(payment_delay)) verify { assert_eq!(PaymentDelay::::get(), Some(payment_delay)); diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index eadf429d2..240cbb015 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -106,7 +106,7 @@ pub mod pallet { /// Upper limit to the number of blocks we can check per block for delayed payments #[pallet::constant] - type DelayedPaymentBlockLimit: Get; + type DelayedPaymentBlockLimit: Get>; /// Unix time type UnixTime: UnixTime; @@ -170,7 +170,7 @@ pub mod pallet { /// The payment delay was set PaymentDelaySet { payment_threshold: Balance, - delay: T::BlockNumber, + delay: BlockNumberFor, }, /// The payment delay was removed PaymentDelayRemoved, @@ -193,7 +193,7 @@ pub mod pallet { amount: Balance, destination: XrplAccountId, delayed_payment_id: DelayedPaymentId, - payment_block: T::BlockNumber, + payment_block: BlockNumberFor, }, RelayerAdded(T::AccountId), RelayerRemoved(T::AccountId), @@ -215,15 +215,15 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet + impl Hooks> for Pallet where ::AccountId: From, { - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(n: BlockNumberFor) -> Weight { Self::process_xrp_tx(n) } - fn on_idle(now: T::BlockNumber, remaining_weight: Weight) -> Weight { + fn on_idle(now: BlockNumberFor, remaining_weight: Weight) -> Weight { let delay_weight = Self::process_delayed_payments(now, remaining_weight); let prune_weight = Self::clear_storages(remaining_weight.saturating_sub(delay_weight)); delay_weight.saturating_add(prune_weight) @@ -244,7 +244,7 @@ pub mod pallet { #[pallet::getter(fn process_xrp_transaction)] /// Temporary storage to set the transactions ready to be processed at specified block number pub type ProcessXRPTransaction = - StorageMap<_, Twox64Concat, T::BlockNumber, BoundedVec>; + StorageMap<_, Twox64Concat, BlockNumberFor, BoundedVec>; #[pallet::storage] #[pallet::getter(fn process_xrp_transaction_details)] @@ -290,7 +290,7 @@ pub mod pallet { #[pallet::storage] /// Payment delay for any withdraw over the specified Balance threshold - pub type PaymentDelay = StorageValue<_, (Balance, T::BlockNumber), OptionQuery>; + pub type PaymentDelay = StorageValue<_, (Balance, BlockNumberFor), OptionQuery>; #[pallet::storage] /// Map from DelayedPaymentId to (sender, WithdrawTx) @@ -302,13 +302,13 @@ pub mod pallet { pub type DelayedPaymentSchedule = StorageMap< _, Identity, - T::BlockNumber, + BlockNumberFor, BoundedVec, >; #[pallet::storage] /// The highest block number that has had all delayed payments processed - pub type NextDelayProcessBlock = StorageValue<_, T::BlockNumber, ValueQuery>; + pub type NextDelayProcessBlock = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::storage] /// The next available delayedPaymentId @@ -436,7 +436,7 @@ pub mod pallet { #[pallet::weight((T::WeightInfo::set_payment_delay(), DispatchClass::Operational))] pub fn set_payment_delay( origin: OriginFor, - payment_delay: Option<(Balance, T::BlockNumber)>, + payment_delay: Option<(Balance, BlockNumberFor)>, ) -> DispatchResult { ensure_root(origin)?; match payment_delay { @@ -667,7 +667,7 @@ impl Pallet { } } - pub fn process_xrp_tx(n: T::BlockNumber) -> Weight + pub fn process_xrp_tx(n: BlockNumberFor) -> Weight where ::AccountId: From, { @@ -733,7 +733,7 @@ impl Pallet { /// Process any transactions that have been delayed due to the min_payment threshold pub fn process_delayed_payments( - block_number: T::BlockNumber, + block_number: BlockNumberFor, remaining_weight: Weight, ) -> Weight { // Initial reads for the following: @@ -784,7 +784,7 @@ impl Pallet { used_weight = used_weight.saturating_add(DbWeight::get().reads(1)); let Some(delayed_payment_ids) = >::get(new_highest) else { // No delayed payments to process for this block - new_highest = new_highest.saturating_add(T::BlockNumber::one()); + new_highest = new_highest.saturating_add(BlockNumberFor::one()); continue; }; // Add weight for writing DelayedPaymentSchedule @@ -821,7 +821,7 @@ impl Pallet { break } else { >::remove(new_highest); - new_highest = new_highest.saturating_add(T::BlockNumber::one()); + new_highest = new_highest.saturating_add(BlockNumberFor::one()); } } @@ -1003,7 +1003,7 @@ impl Pallet { /// Delay a withdrawal until a later block. Called if the withdrawal amount is over the /// PaymentDelay threshold fn delay_payment( - delay: T::BlockNumber, + delay: BlockNumberFor, sender: T::AccountId, withdrawal: XrpWithdrawTransaction, destination_tag: Option, diff --git a/pallet/xrpl/src/lib.rs b/pallet/xrpl/src/lib.rs index 72bc87d79..6c48e4d9a 100644 --- a/pallet/xrpl/src/lib.rs +++ b/pallet/xrpl/src/lib.rs @@ -287,7 +287,7 @@ where })?; // check if genesis hash matches chain genesis hash - if >::block_hash(T::BlockNumber::zero()).as_ref() != + if >::block_hash(BlockNumberFor::zero()).as_ref() != genesis_hash.as_ref() { return Err("⛔️ genesis hash mismatch".into()) @@ -404,7 +404,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet where + impl Hooks> for Pallet where ::AccountId: From { } From 93fe6cf5f90e63aa9c6f98b685c63bca989f8e68 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:32:08 +1300 Subject: [PATCH 016/112] Use explicit call index #12891 --- pallet/assets-ext/src/lib.rs | 7 ++++++- pallet/crowdsale/src/lib.rs | 9 ++++++++- pallet/dex/src/lib.rs | 9 ++++++++- pallet/doughnut/src/lib.rs | 6 +++++- pallet/echo/src/lib.rs | 3 ++- pallet/evm-chain-id/src/lib.rs | 3 ++- pallet/fee-control/src/lib.rs | 5 ++++- pallet/fee-control/src/mock.rs | 3 ++- pallet/fee-proxy/src/lib.rs | 3 ++- pallet/futurepass/src/lib.rs | 9 ++++++++- pallet/maintenance-mode/src/lib.rs | 7 ++++++- pallet/marketplace/src/lib.rs | 16 +++++++++++++++- pallet/nft-peg/src/lib.rs | 5 ++++- pallet/nft/src/lib.rs | 14 +++++++++++++- pallet/sft/src/lib.rs | 14 +++++++++++++- pallet/token-approvals/src/lib.rs | 8 +++++++- pallet/vortex-distribution/src/lib.rs | 12 +++++++++++- pallet/xls20/src/lib.rs | 7 ++++++- pallet/xrpl-bridge/src/lib.rs | 16 +++++++++++++++- pallet/xrpl/src/lib.rs | 3 ++- 20 files changed, 139 insertions(+), 20 deletions(-) diff --git a/pallet/assets-ext/src/lib.rs b/pallet/assets-ext/src/lib.rs index 9fdda7300..3e440da10 100644 --- a/pallet/assets-ext/src/lib.rs +++ b/pallet/assets-ext/src/lib.rs @@ -214,6 +214,7 @@ pub mod pallet { /// Sudo call to set the asset deposit for creating assets /// Note, this does not change the deposit when calling create within the assets pallet /// However that call is filtered + #[pallet::call_index(0)] #[pallet::weight(< T as Config >::WeightInfo::set_asset_deposit())] pub fn set_asset_deposit( origin: OriginFor, @@ -228,6 +229,7 @@ pub mod pallet { /// Creates a new asset with unique ID according to the network asset id scheme. /// Decimals cannot be higher than 18 due to a restriction in the conversion function /// scale_wei_to_correct_decimals + #[pallet::call_index(1)] #[pallet::weight(< T as Config >::WeightInfo::create_asset())] #[transactional] pub fn create_asset( @@ -250,6 +252,7 @@ pub mod pallet { /// Mints an asset to an account if the caller is the asset owner /// Attempting to mint ROOT token will throw an error + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::mint())] pub fn mint( origin: OriginFor, @@ -267,6 +270,7 @@ pub mod pallet { } /// Transfers either ROOT or an asset + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::transfer())] pub fn transfer( origin: OriginFor, @@ -288,6 +292,7 @@ pub mod pallet { /// Burns an asset from an account. Caller must be the asset owner /// Attempting to burn ROOT token will throw an error + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::burn())] pub fn burn_from( origin: OriginFor, @@ -681,4 +686,4 @@ impl fungibles::InspectMetadata for Pallet { fn decimals(asset: &Self::AssetId) -> u8 { as fungibles::InspectMetadata>::decimals(asset) } -} +} \ No newline at end of file diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index e0933b1af..1d7f69761 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -311,6 +311,7 @@ pub mod pallet { /// - `sale_duration`: How many blocks will the sale last once enabled /// /// Emits `CrowdsaleCreated` event when successful. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::initialize())] #[transactional] pub fn initialize( @@ -384,6 +385,7 @@ pub mod pallet { /// - `sale_id`: The id of the sale to enable /// /// Emits `CrowdsaleEnabled` event when successful. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::enable())] #[transactional] pub fn enable(origin: OriginFor, sale_id: SaleId) -> DispatchResult { @@ -440,6 +442,7 @@ pub mod pallet { /// - `amount`: The amount of tokens to participate with /// /// Emits `CrowdsaleParticipated` event when successful. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::participate())] #[transactional] pub fn participate( @@ -504,6 +507,7 @@ pub mod pallet { /// /// Emits `CrowdsaleVouchersDistributed` event when successful. // TODO: update weight based on participants processable + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::distribute_crowdsale_rewards())] #[transactional] pub fn distribute_crowdsale_rewards(origin: OriginFor) -> DispatchResult { @@ -604,6 +608,7 @@ pub mod pallet { /// - `sale_id`: The id of the sale to claim the vouchers from /// /// Emits `CrowdsaleVouchersClaimed` event when successful. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::claim_voucher())] #[transactional] pub fn claim_voucher(origin: OriginFor, sale_id: SaleId) -> DispatchResult { @@ -701,6 +706,7 @@ pub mod pallet { /// - `quantity`: The amount of NFT(s) to redeem /// /// Emits `CrowdsaleNFTRedeemed` event when successful. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::redeem_voucher())] #[transactional] pub fn redeem_voucher( @@ -747,6 +753,7 @@ pub mod pallet { /// In the very unlikely case that a sale was blocked from automatic distribution within /// the on_initialise step. This function allows a manual trigger of distribution /// callable by anyone to kickstart the sale distribution process. + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::try_force_distribution())] pub fn try_force_distribution(origin: OriginFor, sale_id: SaleId) -> DispatchResult { let who = ensure_signed(origin)?; @@ -782,4 +789,4 @@ pub mod pallet { Ok(()) } } -} +} \ No newline at end of file diff --git a/pallet/dex/src/lib.rs b/pallet/dex/src/lib.rs index a28969ed3..93d07bb09 100644 --- a/pallet/dex/src/lib.rs +++ b/pallet/dex/src/lib.rs @@ -263,6 +263,7 @@ pub mod pallet { /// - note: analogous to Uniswapv2 `setFeeTo` /// /// - `fee_to`: the new account or None assigned to FeeTo. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::set_fee_to())] #[transactional] pub fn set_fee_to( @@ -289,6 +290,7 @@ pub mod pallet { /// it is set to None. /// - `deadline`: The deadline of executing this extrinsic. The deadline won't be checked if /// it is set to None + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::swap_with_exact_supply())] #[transactional] pub fn swap_with_exact_supply( @@ -324,6 +326,7 @@ pub mod pallet { /// it is set to None. /// - `deadline`: The deadline of executing this extrinsic. The deadline won't be checked if /// it is set to None + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::swap_with_exact_target())] #[transactional] pub fn swap_with_exact_target( @@ -368,6 +371,7 @@ pub mod pallet { /// to None. /// - `deadline`: The deadline of executing this extrinsic. The deadline won't be checked if /// it is set to None + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::add_liquidity())] #[transactional] pub fn add_liquidity( @@ -412,6 +416,7 @@ pub mod pallet { /// if it is set to None. /// - `deadline`: The deadline of executing this extrinsic. The deadline won't be checked if /// it is set to None + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::remove_liquidity())] #[transactional] pub fn remove_liquidity( @@ -446,6 +451,7 @@ pub mod pallet { /// /// - `token_a`: Asset id A. /// - `token_b`: Asset id B. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::reenable_trading_pair())] #[transactional] pub fn reenable_trading_pair( @@ -479,6 +485,7 @@ pub mod pallet { /// /// - `token_a`: Asset id A. /// - `token_b`: Asset id B. + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::disable_trading_pair())] #[transactional] pub fn disable_trading_pair( @@ -1260,4 +1267,4 @@ where Ok(false) } } -} +} \ No newline at end of file diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index a7e8cb876..bf7d9570e 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -412,6 +412,7 @@ pub mod pallet { ::AccountId: From, ::RuntimeCall: GetCallMetadata, { + #[pallet::call_index(0)] #[pallet::weight({ let call_weight = call.get_dispatch_info().weight; T::WeightInfo::transact().saturating_add(call_weight) @@ -478,6 +479,7 @@ pub mod pallet { } /// Block a specific doughnut to be used + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::revoke_doughnut())] pub fn revoke_doughnut( origin: OriginFor, @@ -504,6 +506,7 @@ pub mod pallet { } /// Block a holder from executing any doughnuts from a specific issuer + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::revoke_holder())] pub fn revoke_holder( origin: OriginFor, @@ -525,6 +528,7 @@ pub mod pallet { /// Update whitelisted holders list // Note: this is for temporary purpose. Might change in the future + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::update_whitelisted_holders())] pub fn update_whitelisted_holders( origin: OriginFor, @@ -569,4 +573,4 @@ where Ok(doughnut_decoded) } -} +} \ No newline at end of file diff --git a/pallet/echo/src/lib.rs b/pallet/echo/src/lib.rs index 101fdae39..341d797e9 100644 --- a/pallet/echo/src/lib.rs +++ b/pallet/echo/src/lib.rs @@ -103,6 +103,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Ping extrinsic sends an event to the bridge containing a message + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::ping())] pub fn ping(origin: OriginFor, destination: H160) -> DispatchResult { let source: H160 = ensure_signed(origin)?.into(); @@ -214,4 +215,4 @@ impl EthereumEventSubscriber for Pallet { Ok(Weight::zero()) } } -} +} \ No newline at end of file diff --git a/pallet/evm-chain-id/src/lib.rs b/pallet/evm-chain-id/src/lib.rs index 629229c1b..1795d4fae 100644 --- a/pallet/evm-chain-id/src/lib.rs +++ b/pallet/evm-chain-id/src/lib.rs @@ -85,6 +85,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::set_chain_id())] pub fn set_chain_id( origin: OriginFor, @@ -96,4 +97,4 @@ pub mod pallet { Ok(()) } } -} +} \ No newline at end of file diff --git a/pallet/fee-control/src/lib.rs b/pallet/fee-control/src/lib.rs index df6909538..fe1403c12 100644 --- a/pallet/fee-control/src/lib.rs +++ b/pallet/fee-control/src/lib.rs @@ -91,6 +91,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::set_evm_base_fee())] pub fn set_evm_base_fee(origin: OriginFor, value: U256) -> DispatchResult { ensure_root(origin)?; @@ -102,6 +103,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::set_weight_multiplier())] pub fn set_weight_multiplier(origin: OriginFor, value: Perbill) -> DispatchResult { ensure_root(origin)?; @@ -113,6 +115,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::set_weight_multiplier())] pub fn set_length_multiplier(origin: OriginFor, value: Balance) -> DispatchResult { ensure_root(origin)?; @@ -158,4 +161,4 @@ impl fp_evm::FeeCalculator for Pallet { fn min_gas_price() -> (U256, Weight) { (Self::base_fee_per_gas(), T::DbWeight::get().reads(1)) } -} +} \ No newline at end of file diff --git a/pallet/fee-control/src/mock.rs b/pallet/fee-control/src/mock.rs index f66aed506..a6fd31823 100644 --- a/pallet/fee-control/src/mock.rs +++ b/pallet/fee-control/src/mock.rs @@ -97,10 +97,11 @@ pub mod mock_pallet { #[pallet::call] impl Pallet { // For tests. Charge some expected fee amount + #[pallet::call_index(0)] #[pallet::weight(WEIGHT)] pub fn mock_charge_fee(_origin: OriginFor) -> DispatchResult { Ok(()) } } } -} +} \ No newline at end of file diff --git a/pallet/fee-proxy/src/lib.rs b/pallet/fee-proxy/src/lib.rs index 1722f778c..38a6c87e2 100644 --- a/pallet/fee-proxy/src/lib.rs +++ b/pallet/fee-proxy/src/lib.rs @@ -106,6 +106,7 @@ pub mod pallet { /// OnChargeTransaction::withdraw_fee() /// max_payment: The limit of how many tokens will be used to perform the exchange /// call: The inner call to be performed after the exchange + #[pallet::call_index(0)] #[pallet::weight({ let dispatch_info = call.get_dispatch_info(); (dispatch_info.weight.saturating_add(Weight::from_all(10_000u64)), dispatch_info.class) @@ -131,4 +132,4 @@ pub mod pallet { Ok(()) } } -} +} \ No newline at end of file diff --git a/pallet/futurepass/src/lib.rs b/pallet/futurepass/src/lib.rs index e5aabc803..efbdaef26 100644 --- a/pallet/futurepass/src/lib.rs +++ b/pallet/futurepass/src/lib.rs @@ -269,6 +269,7 @@ pub mod pallet { /// /// Parameters: /// - `account`: The delegated account for the futurepass. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::create())] #[transactional] pub fn create(origin: OriginFor, account: T::AccountId) -> DispatchResult { @@ -301,6 +302,7 @@ pub mod pallet { /// # /// Weight is a function of the number of proxies the user has. /// # + #[pallet::call_index(1)] #[pallet::weight({ let delegate_count = T::Proxy::delegates(&futurepass).len() as u32; T::WeightInfo::register_delegate_with_signature(delegate_count) @@ -385,6 +387,7 @@ pub mod pallet { /// # /// Weight is a function of the number of proxies the user has. /// # + #[pallet::call_index(2)] #[pallet::weight({ let delegate_count = T::Proxy::delegates(&futurepass).len() as u32; T::WeightInfo::unregister_delegate(delegate_count) @@ -438,6 +441,7 @@ pub mod pallet { /// # /// Weight is a function of the number of proxies the user has. /// # + #[pallet::call_index(3)] #[pallet::weight({ match Holders::::get(current_owner) { Some(futurepass) => { @@ -506,6 +510,7 @@ pub mod pallet { /// # /// Weight is a function of the number of proxies the user has. /// # + #[pallet::call_index(4)] #[pallet::weight({ let di = call.get_dispatch_info(); let delegate_count = T::Proxy::delegates(&futurepass).len() as u32; @@ -555,6 +560,7 @@ pub mod pallet { /// /// Parameters: /// - `migrator`: The new account that will become the futurepass asset migrator. + #[pallet::call_index(5)] #[pallet::weight((RocksDbWeight::get().writes(1), DispatchClass::Operational))] pub fn set_futurepass_migrator( origin: OriginFor, @@ -579,6 +585,7 @@ pub mod pallet { /// # /// Weight is a function of the number of collections migrated; not the tokens migrated. /// # + #[pallet::call_index(6)] #[pallet::weight((RocksDbWeight::get().writes(collection_ids.len() as u64), DispatchClass::Operational))] #[transactional] pub fn migrate_evm_futurepass( @@ -732,4 +739,4 @@ where fn primary_proxy(who: &T::AccountId) -> Option { >::get(who) } -} +} \ No newline at end of file diff --git a/pallet/maintenance-mode/src/lib.rs b/pallet/maintenance-mode/src/lib.rs index 7cd573203..58046a312 100644 --- a/pallet/maintenance-mode/src/lib.rs +++ b/pallet/maintenance-mode/src/lib.rs @@ -145,6 +145,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Enable maintenance mode which prevents all non sudo calls + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::enable_maintenance_mode())] pub fn enable_maintenance_mode(origin: OriginFor, enabled: bool) -> DispatchResult { ensure_root(origin)?; @@ -156,6 +157,7 @@ pub mod pallet { } /// Blocks an account from transacting on the network + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::block_account())] pub fn block_account( origin: OriginFor, @@ -176,6 +178,7 @@ pub mod pallet { /// Blocks an account from transacting on the network /// Can be used to block individual precompile addresses or contracts + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::block_evm_target())] pub fn block_evm_target( origin: OriginFor, @@ -198,6 +201,7 @@ pub mod pallet { /// pallet_name: The name of the pallet as per the runtime file. i.e. FeeProxy /// call_name: The snake_case name for the call. i.e. set_fee /// Both pallet and call names are not case sensitive + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::block_call())] pub fn block_call( origin: OriginFor, @@ -232,6 +236,7 @@ pub mod pallet { /// Blocks an entire pallets calls from being executed /// pallet_name: The name of the pallet as per the runtime file. i.e. FeeProxy /// Pallet names are not case sensitive + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::block_pallet())] pub fn block_pallet( origin: OriginFor, @@ -401,4 +406,4 @@ where ) -> Result { self.validate(who, call, info, len).map(|_| ()) } -} +} \ No newline at end of file diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index da19cd042..c37bf4065 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -349,6 +349,7 @@ pub mod pallet { /// `marketplace_account` - if specified, this account will be registered /// `entitlement` - Permill, percentage of sales to go to the marketplace /// If no marketplace is specified the caller will be registered + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::register_marketplace())] pub fn register_marketplace( origin: OriginFor, @@ -370,6 +371,7 @@ pub mod pallet { /// `fixed_price` ask price /// `duration` listing duration time in blocks from now /// Caller must be the token owner + #[pallet::call_index(1)] #[pallet::weight({ T::WeightInfo::sell_nft(serial_numbers.len() as u32) })] @@ -406,6 +408,7 @@ pub mod pallet { /// `fixed_price` ask price /// `duration` listing duration time in blocks from now /// Caller must be the token owner + #[pallet::call_index(2)] #[pallet::weight({ match &tokens { ListingTokens::Nft(nft) => T::WeightInfo::sell_nft(nft.serial_numbers.len() as u32), @@ -439,6 +442,7 @@ pub mod pallet { /// `listing_id` id of the fixed price listing /// `new_price` new fixed price /// Caller must be the token owner + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::update_fixed_price())] pub fn update_fixed_price( origin: OriginFor, @@ -450,6 +454,7 @@ pub mod pallet { } /// Buy a token listing for its specified price + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::buy())] #[transactional] pub fn buy(origin: OriginFor, listing_id: ListingId) -> DispatchResult { @@ -459,6 +464,7 @@ pub mod pallet { } /// Buy multiple listings, each for their respective price + #[pallet::call_index(5)] #[pallet::weight({ T::WeightInfo::buy_multi(listing_ids.len() as u32) })] @@ -483,6 +489,7 @@ pub mod pallet { /// - `reserve_price` winning bid must be over this threshold /// - `duration` length of the auction (in blocks), uses default duration if unspecified /// Caller must be the token owner + #[pallet::call_index(6)] #[pallet::weight({ T::WeightInfo::auction_nft(serial_numbers.len() as u32) })] @@ -509,6 +516,7 @@ pub mod pallet { /// - `payment_asset` fungible asset Id to receive payment with /// - `reserve_price` winning bid must be over this threshold /// - `duration` length of the auction (in blocks), uses default duration if unspecified + #[pallet::call_index(7)] #[pallet::weight({ match &tokens { ListingTokens::Nft(nft) => T::WeightInfo::auction_nft(nft.serial_numbers.len() as u32), @@ -530,6 +538,7 @@ pub mod pallet { /// Place a bid on an open auction /// - `amount` to bid (in the seller's requested payment asset) + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::bid())] #[transactional] pub fn bid(origin: OriginFor, listing_id: ListingId, amount: Balance) -> DispatchResult { @@ -540,6 +549,7 @@ pub mod pallet { /// Close a sale or auction returning tokens /// Requires no successful bids have been made for an auction. /// Caller must be the listed seller + #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::cancel_sale())] #[transactional] pub fn cancel_sale(origin: OriginFor, listing_id: ListingId) -> DispatchResult { @@ -552,6 +562,7 @@ pub mod pallet { /// An offer can't be made on a token currently in an auction /// (This follows the behaviour of Opensea and forces the buyer to bid rather than create an /// offer) + #[pallet::call_index(10)] #[pallet::weight(T::WeightInfo::make_simple_offer())] #[transactional] pub fn make_simple_offer( @@ -568,6 +579,7 @@ pub mod pallet { /// Cancels an offer on a token /// Caller must be the offer buyer + #[pallet::call_index(11)] #[pallet::weight(T::WeightInfo::cancel_offer())] pub fn cancel_offer(origin: OriginFor, offer_id: OfferId) -> DispatchResult { let who = ensure_signed(origin)?; @@ -576,6 +588,7 @@ pub mod pallet { /// Accepts an offer on a token /// Caller must be token owner + #[pallet::call_index(12)] #[pallet::weight(T::WeightInfo::accept_offer())] #[transactional] pub fn accept_offer(origin: OriginFor, offer_id: OfferId) -> DispatchResult { @@ -585,10 +598,11 @@ pub mod pallet { /// Set the `FeeTo` account /// This operation requires root access + #[pallet::call_index(13)] #[pallet::weight(T::WeightInfo::set_fee_to())] pub fn set_fee_to(origin: OriginFor, fee_to: Option) -> DispatchResult { ensure_root(origin)?; Self::do_set_fee_to(fee_to) } } -} +} \ No newline at end of file diff --git a/pallet/nft-peg/src/lib.rs b/pallet/nft-peg/src/lib.rs index bcc6641a8..7d3958a94 100644 --- a/pallet/nft-peg/src/lib.rs +++ b/pallet/nft-peg/src/lib.rs @@ -150,6 +150,7 @@ pub mod pallet { where ::AccountId: From + Into, { + #[pallet::call_index(0)] #[pallet::weight(T::NftPegWeightInfo::set_contract_address())] pub fn set_contract_address(origin: OriginFor, contract: H160) -> DispatchResult { ensure_root(origin)?; @@ -158,6 +159,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::NftPegWeightInfo::withdraw())] #[transactional] pub fn withdraw( @@ -175,6 +177,7 @@ pub mod pallet { } /// Withdraw blocked tokens, must be called by the destination defined in `BlockedTokens` + #[pallet::call_index(2)] #[pallet::weight(T::NftPegWeightInfo::reclaim_blocked_nfts())] #[transactional] pub fn reclaim_blocked_nfts( @@ -524,4 +527,4 @@ where return Err((weight, Error::::InvalidAbiPrefix.into())) } } -} +} \ No newline at end of file diff --git a/pallet/nft/src/lib.rs b/pallet/nft/src/lib.rs index 87b1a7400..351f7998d 100644 --- a/pallet/nft/src/lib.rs +++ b/pallet/nft/src/lib.rs @@ -270,6 +270,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::claim_unowned_collection())] /// Bridged collections from Ethereum will initially lack an owner. These collections will /// be assigned to the pallet. This allows for claiming those collections assuming they were @@ -299,6 +300,7 @@ pub mod pallet { /// Set the owner of a collection /// Caller must be the current collection owner + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::set_owner())] pub fn set_owner( origin: OriginFor, @@ -311,6 +313,7 @@ pub mod pallet { /// Set the max issuance of a collection /// Caller must be the current collection owner + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::set_max_issuance())] pub fn set_max_issuance( origin: OriginFor, @@ -336,6 +339,7 @@ pub mod pallet { /// Set the base URI of a collection /// Caller must be the current collection owner + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::set_base_uri())] pub fn set_base_uri( origin: OriginFor, @@ -368,6 +372,7 @@ pub mod pallet { /// `metadata_scheme` - The off-chain metadata referencing scheme for tokens in this /// `royalties_schedule` - defacto royalties plan for secondary sales, this will /// apply to all tokens in the collection by default. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::create_collection())] #[transactional] pub fn create_collection( @@ -395,6 +400,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::toggle_public_mint())] pub fn toggle_public_mint( origin: OriginFor, @@ -424,6 +430,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::set_mint_fee())] pub fn set_mint_fee( origin: OriginFor, @@ -471,6 +478,7 @@ pub mod pallet { /// Caller must be the collection owner /// ----------- /// Weight is O(N) where N is `quantity` + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::mint())] #[transactional] pub fn mint( @@ -537,6 +545,7 @@ pub mod pallet { /// Transfer ownership of an NFT /// Caller must be the token owner + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::transfer())] #[transactional] pub fn transfer( @@ -553,6 +562,7 @@ pub mod pallet { /// Burn a token 🔥 /// /// Caller must be the token owner + #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::burn())] #[transactional] pub fn burn(origin: OriginFor, token_id: TokenId) -> DispatchResult { @@ -566,6 +576,7 @@ pub mod pallet { /// Set the name of a collection /// Caller must be the current collection owner + #[pallet::call_index(10)] #[pallet::weight(T::WeightInfo::set_name())] pub fn set_name( origin: OriginFor, @@ -588,6 +599,7 @@ pub mod pallet { /// Set the royalties schedule of a collection /// Caller must be the current collection owner + #[pallet::call_index(11)] #[pallet::weight(T::WeightInfo::set_royalties_schedule())] pub fn set_royalties_schedule( origin: OriginFor, @@ -626,4 +638,4 @@ impl From for Error { TokenOwnershipError::TokenLimitExceeded => Error::::TokenLimitExceeded, } } -} +} \ No newline at end of file diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index 1fdf04fd3..0302e07c5 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -246,6 +246,7 @@ pub mod pallet { /// The collectionUuid used to store the SFT CollectionInfo is retrieved from the NFT /// pallet. This is so that CollectionUuids are unique across all collections, regardless /// of if they are SFT or NFT collections. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::create_collection())] #[transactional] pub fn create_collection( @@ -270,6 +271,7 @@ pub mod pallet { /// Create additional tokens for an existing collection /// These tokens act similar to tokens within an ERC1155 contract /// Each token has individual issuance, max_issuance, + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::create_token())] #[transactional] pub fn create_token( @@ -301,6 +303,7 @@ pub mod pallet { /// `serial_numbers` - A list of serial numbers to mint into /// `quantities` - A list of quantities to mint into each serial number /// `token_owner` - The owner of the tokens, defaults to the caller + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::mint())] #[transactional] pub fn mint( @@ -315,6 +318,7 @@ pub mod pallet { /// Transfer ownership of an SFT /// Caller must be the token owner + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::transfer(serial_numbers.len() as u32))] #[transactional] pub fn transfer( @@ -330,6 +334,7 @@ pub mod pallet { /// Burn a token 🔥 /// /// Caller must be the token owner + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::burn())] #[transactional] pub fn burn( @@ -343,6 +348,7 @@ pub mod pallet { /// Set the owner of a collection /// Caller must be the current collection owner + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::set_owner())] #[transactional] pub fn set_owner( @@ -356,6 +362,7 @@ pub mod pallet { /// Set the max issuance of a collection /// Caller must be the current collection owner + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::set_max_issuance())] pub fn set_max_issuance( origin: OriginFor, @@ -368,6 +375,7 @@ pub mod pallet { /// Set the base URI of a collection (MetadataScheme) /// Caller must be the current collection owner + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::set_base_uri())] pub fn set_base_uri( origin: OriginFor, @@ -380,6 +388,7 @@ pub mod pallet { /// Set the name of a collection /// Caller must be the current collection owner + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::set_name())] pub fn set_name( origin: OriginFor, @@ -392,6 +401,7 @@ pub mod pallet { /// Set the royalties schedule of a collection /// Caller must be the current collection owner + #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::set_royalties_schedule())] pub fn set_royalties_schedule( origin: OriginFor, @@ -402,6 +412,7 @@ pub mod pallet { Self::do_set_royalties_schedule(who, collection_id, royalties_schedule) } + #[pallet::call_index(10)] #[pallet::weight(T::WeightInfo::toggle_public_mint())] pub fn toggle_public_mint( origin: OriginFor, @@ -431,6 +442,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(11)] #[pallet::weight(T::WeightInfo::set_mint_fee())] pub fn set_mint_fee( origin: OriginFor, @@ -466,4 +478,4 @@ pub mod pallet { Ok(()) } } -} +} \ No newline at end of file diff --git a/pallet/token-approvals/src/lib.rs b/pallet/token-approvals/src/lib.rs index d7a4f822f..0d634f887 100644 --- a/pallet/token-approvals/src/lib.rs +++ b/pallet/token-approvals/src/lib.rs @@ -124,6 +124,7 @@ pub mod pallet { /// Mapping from token_id to operator /// clears approval on transfer /// mapping(uint256 => address) private _tokenApprovals; + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::erc721_approval())] pub fn erc721_approval( origin: OriginFor, @@ -151,6 +152,7 @@ pub mod pallet { } /// Public method which allows users to remove approvals on a token they own + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::erc721_remove_approval())] pub fn erc721_remove_approval(origin: OriginFor, token_id: TokenId) -> DispatchResult { let origin = ensure_signed(origin)?; @@ -166,6 +168,7 @@ pub mod pallet { /// Set approval for an account to transfer an amount of tokens on behalf of the caller /// Mapping from caller to spender and amount /// mapping(address => mapping(address => uint256)) private _allowances; + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::erc20_approval())] pub fn erc20_approval( origin: OriginFor, @@ -182,6 +185,7 @@ pub mod pallet { /// Removes an approval over an account and asset_id /// mapping(address => mapping(address => uint256)) private _allowances; + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::erc20_update_approval())] pub fn erc20_update_approval( origin: OriginFor, @@ -205,6 +209,7 @@ pub mod pallet { /// Set approval for an account (or contract) to transfer any tokens from a collection /// mapping(address => mapping(address => bool)) private _operatorApprovals; + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::erc721_approval_for_all())] pub fn erc721_approval_for_all( origin: OriginFor, @@ -229,6 +234,7 @@ pub mod pallet { /// Set approval for an account (or contract) to transfer any tokens from an SFT collection /// mapping(address => mapping(address => bool)) private _operatorApprovals; + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::erc1155_approval_for_all())] pub fn erc1155_approval_for_all( origin: OriginFor, @@ -290,4 +296,4 @@ impl OnTransferSubscriber for Pallet { // Set approval to none Self::remove_erc721_approval(token_id); } -} +} \ No newline at end of file diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex-distribution/src/lib.rs index 4b0bfa44c..52fe50dce 100644 --- a/pallet/vortex-distribution/src/lib.rs +++ b/pallet/vortex-distribution/src/lib.rs @@ -346,6 +346,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(1000)] pub fn set_admin(origin: OriginFor, new: AccountIdLookupOf) -> DispatchResult { ensure_root(origin)?; @@ -361,6 +362,7 @@ pub mod pallet { } /// List a vortex distribution + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::create_vtx_dist())] #[transactional] pub fn create_vtx_dist(origin: OriginFor) -> DispatchResult { @@ -381,6 +383,7 @@ pub mod pallet { /// Disable a distribution /// /// `id` - The distribution id + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::disable_vtx_dist())] #[transactional] pub fn disable_vtx_dist(origin: OriginFor, id: T::VtxDistIdentifier) -> DispatchResult { @@ -397,6 +400,7 @@ pub mod pallet { /// Start distributing vortex /// /// `id` - The distribution id + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::start_vtx_dist())] #[transactional] pub fn start_vtx_dist(origin: OriginFor, id: T::VtxDistIdentifier) -> DispatchResult { @@ -415,6 +419,7 @@ pub mod pallet { /// /// `id` - The distribution id /// `current_block` - Current block number + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::pay_unsigned().saturating_mul(T::PayoutBatchSize::get().into()))] #[transactional] pub fn pay_unsigned( @@ -490,6 +495,7 @@ pub mod pallet { /// `id` - The distribution id /// `start_era` - Start era /// `end_era` - End era + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::set_vtx_dist_eras())] #[transactional] pub fn set_vtx_dist_eras( @@ -510,6 +516,7 @@ pub mod pallet { /// /// `asset_prices` - List of asset prices /// `id` - The distribution id + #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::set_asset_prices(asset_prices.len() as u32))] #[transactional] pub fn set_asset_prices( @@ -525,6 +532,7 @@ pub mod pallet { /// /// `id` - The distribution id /// `rewards` - Rewards list + #[pallet::call_index(7)] #[pallet::weight(::WeightInfo::register_rewards())] pub fn register_rewards( origin: OriginFor, @@ -557,6 +565,7 @@ pub mod pallet { /// Trigger distribution /// /// `id` - The distribution id + #[pallet::call_index(8)] #[pallet::weight(::WeightInfo::trigger_vtx_distribution())] #[transactional] pub fn trigger_vtx_distribution( @@ -577,6 +586,7 @@ pub mod pallet { /// /// `id` - The distribution id /// `vortex_token_amount` - Amount of vortex to redeem + #[pallet::call_index(9)] #[pallet::weight(::WeightInfo::redeem_tokens_from_vault())] #[transactional] pub fn redeem_tokens_from_vault( @@ -784,4 +794,4 @@ pub mod pallet { } } } -} +} \ No newline at end of file diff --git a/pallet/xls20/src/lib.rs b/pallet/xls20/src/lib.rs index 180009553..a7a3e2bf5 100644 --- a/pallet/xls20/src/lib.rs +++ b/pallet/xls20/src/lib.rs @@ -137,6 +137,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Set the relayer address + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::set_relayer())] pub fn set_relayer(origin: OriginFor, relayer: T::AccountId) -> DispatchResult { ensure_root(origin)?; @@ -149,6 +150,7 @@ pub mod pallet { /// This covers the additional costs incurred by the relayer for the following: /// - Minting the token on XRPL /// - Calling fulfill_xls20_mint on The Root Network + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::set_xls20_fee())] pub fn set_xls20_fee(origin: OriginFor, new_fee: Balance) -> DispatchResult { ensure_root(origin)?; @@ -160,6 +162,7 @@ pub mod pallet { /// Enables XLS-20 compatibility on a collection /// - Collection must not have any tokens minted /// - Caller must be collection owner + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::enable_xls20_compatibility())] pub fn enable_xls20_compatibility( origin: OriginFor, @@ -172,6 +175,7 @@ pub mod pallet { } // Collection owners can re-request XLS-20 mints on tokens that have failed + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::re_request_xls20_mint())] #[transactional] pub fn re_request_xls20_mint( @@ -214,6 +218,7 @@ pub mod pallet { /// Submit XLS-20 token ids to The Root Network /// Only callable by the trusted relayer account /// Can apply multiple mappings from the same collection in one transaction + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::fulfill_xls20_mint())] #[transactional] pub fn fulfill_xls20_mint( @@ -316,4 +321,4 @@ impl Xls20MintRequest for Pallet { Self::send_xls20_requests(collection_id, serial_numbers, metadata_scheme); Ok(()) } -} +} \ No newline at end of file diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index 240cbb015..a442e340b 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -391,6 +391,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Submit xrp transaction + #[pallet::call_index(0)] #[pallet::weight((T::WeightInfo::submit_transaction(), DispatchClass::Operational))] #[transactional] pub fn submit_transaction( @@ -420,6 +421,7 @@ pub mod pallet { } /// Submit xrp transaction challenge + #[pallet::call_index(1)] #[pallet::weight((T::WeightInfo::submit_challenge(), DispatchClass::Operational))] #[transactional] pub fn submit_challenge( @@ -433,6 +435,7 @@ pub mod pallet { /// Sets the payment delay /// payment_delay is a tuple of payment_threshold and delay in blocks + #[pallet::call_index(2)] #[pallet::weight((T::WeightInfo::set_payment_delay(), DispatchClass::Operational))] pub fn set_payment_delay( origin: OriginFor, @@ -453,6 +456,7 @@ pub mod pallet { } /// Withdraw xrp transaction + #[pallet::call_index(3)] #[pallet::weight((T::WeightInfo::withdraw_xrp(), DispatchClass::Operational))] #[transactional] pub fn withdraw_xrp( @@ -465,6 +469,7 @@ pub mod pallet { } /// Withdraw xrp transaction + #[pallet::call_index(4)] #[pallet::weight((T::WeightInfo::withdraw_xrp(), DispatchClass::Operational))] #[transactional] pub fn withdraw_xrp_with_destination_tag( @@ -478,6 +483,7 @@ pub mod pallet { } /// add a relayer + #[pallet::call_index(5)] #[pallet::weight((T::WeightInfo::add_relayer(), DispatchClass::Operational))] #[transactional] pub fn add_relayer(origin: OriginFor, relayer: T::AccountId) -> DispatchResult { @@ -488,6 +494,7 @@ pub mod pallet { } /// remove a relayer + #[pallet::call_index(6)] #[pallet::weight((T::WeightInfo::remove_relayer(), DispatchClass::Operational))] #[transactional] pub fn remove_relayer(origin: OriginFor, relayer: T::AccountId) -> DispatchResult { @@ -502,6 +509,7 @@ pub mod pallet { } /// Set the door tx fee amount + #[pallet::call_index(7)] #[pallet::weight((::WeightInfo::set_door_tx_fee(), DispatchClass::Operational))] pub fn set_door_tx_fee(origin: OriginFor, fee: u64) -> DispatchResult { ensure_root(origin)?; @@ -510,6 +518,7 @@ pub mod pallet { } /// Set the xrp source tag + #[pallet::call_index(8)] #[pallet::weight((::WeightInfo::set_xrp_source_tag(), DispatchClass::Operational))] pub fn set_xrp_source_tag(origin: OriginFor, source_tag: u32) -> DispatchResult { ensure_root(origin)?; @@ -518,6 +527,7 @@ pub mod pallet { } /// Set XRPL door address managed by this pallet + #[pallet::call_index(9)] #[pallet::weight((T::WeightInfo::set_door_address(), DispatchClass::Operational))] #[transactional] pub fn set_door_address( @@ -531,6 +541,7 @@ pub mod pallet { } /// Set the door account ticket sequence params for the next allocation + #[pallet::call_index(10)] #[pallet::weight((T::WeightInfo::set_ticket_sequence_next_allocation(), DispatchClass::Operational))] pub fn set_ticket_sequence_next_allocation( origin: OriginFor, @@ -562,6 +573,7 @@ pub mod pallet { } /// Set the door account current ticket sequence params for current allocation - force set + #[pallet::call_index(11)] #[pallet::weight((T::WeightInfo::set_ticket_sequence_current_allocation(), DispatchClass::Operational))] pub fn set_ticket_sequence_current_allocation( origin: OriginFor, @@ -594,6 +606,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(12)] #[pallet::weight(T::WeightInfo::reset_settled_xrpl_tx_data(settled_tx_data.as_ref().unwrap_or(&vec![]).len() as u32))] #[transactional] pub fn reset_settled_xrpl_tx_data( @@ -630,6 +643,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(13)] #[pallet::weight({ let ledger_count = SettledXRPTransactionDetails::::get(ledger_index).unwrap_or_default().len() as u32; (T::WeightInfo::prune_settled_ledger_index(ledger_count), DispatchClass::Operational) @@ -1158,4 +1172,4 @@ impl EthyToXrplBridgeAdapter for Pallet { T::EthyAdapter::sign_xrpl_transaction(tx_blob.as_slice()) } -} +} \ No newline at end of file diff --git a/pallet/xrpl/src/lib.rs b/pallet/xrpl/src/lib.rs index 6c48e4d9a..16b4ef108 100644 --- a/pallet/xrpl/src/lib.rs +++ b/pallet/xrpl/src/lib.rs @@ -423,6 +423,7 @@ pub mod pallet { /// - `signature`: The signature of the XRPL transaction; ignored since it's verified in /// self-contained call trait impl. /// - `call`: The call to dispatch by the XRPL transaction signer (pubkey). + #[pallet::call_index(0)] #[pallet::weight({ let dispatch_info = call.get_dispatch_info(); T::WeightInfo::transact().saturating_add(dispatch_info.weight) @@ -481,4 +482,4 @@ pub mod pallet { Ok(().into()) } } -} +} \ No newline at end of file From 78c610c8efbe3cc904ced1faca92817e2591a812 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:44:05 +1300 Subject: [PATCH 017/112] BlockNumber -> BlockNumberFor round 2 --- pallet/doughnut/src/lib.rs | 2 +- pallet/ethy/src/lib.rs | 2 +- pallet/marketplace/src/impls.rs | 4 ++-- pallet/xrpl-bridge/src/benchmarking.rs | 2 +- pallet/xrpl-bridge/src/lib.rs | 4 ++-- pallet/xrpl/src/lib.rs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index bf7d9570e..7c62ec506 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -259,7 +259,7 @@ impl Call call: &::RuntimeCall, ) -> Result { // Genesis hash check - let genesis_hash_onchain: T::Hash = frame_system::Pallet::::block_hash(BlockNumberFor::zero()); + let genesis_hash_onchain: T::Hash = frame_system::Pallet::::block_hash(BlockNumberFor::::zero()); if *genesis_hash != genesis_hash_onchain { log!(info,"🍩 genesis hash mismatch: {:?}", genesis_hash); return Err("🍩 genesis hash mismatch".into()) diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index f6ae8984d..ffb93c22e 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -154,7 +154,7 @@ decl_storage! { /// Maps from event claim id to challenger and bond amount paid ChallengerAccount get(fn challenger_account): map hasher(twox_64_concat) EventClaimId => Option<(T::AccountId, Balance)>; /// The (optimistic) challenge period after which a submitted event is considered valid - ChallengePeriod get(fn challenge_period): BlockNumberFor = BlockNumberFor::from(150_u32); // 10 Minutes + ChallengePeriod get(fn challenge_period): BlockNumberFor = BlockNumberFor::::from(150_u32); // 10 Minutes /// The bridge contract address on Ethereum pub ContractAddress get(fn contract_address): EthAddress; /// The minimum number of block confirmations needed to notarize an Ethereum event diff --git a/pallet/marketplace/src/impls.rs b/pallet/marketplace/src/impls.rs index c7fa272e8..7879f7e1f 100644 --- a/pallet/marketplace/src/impls.rs +++ b/pallet/marketplace/src/impls.rs @@ -251,8 +251,8 @@ impl Pallet { let listing_end_block = listing.close; let current_block = >::block_number(); let blocks_till_close = listing_end_block - current_block; - let new_closing_block = current_block + BlockNumberFor::from(AUCTION_EXTENSION_PERIOD); - if blocks_till_close <= BlockNumberFor::from(AUCTION_EXTENSION_PERIOD) { + let new_closing_block = current_block + BlockNumberFor::::from(AUCTION_EXTENSION_PERIOD); + if blocks_till_close <= BlockNumberFor::::from(AUCTION_EXTENSION_PERIOD) { ListingEndSchedule::::remove(listing_end_block, listing_id); ListingEndSchedule::::insert(new_closing_block, listing_id, true); listing.close = new_closing_block; diff --git a/pallet/xrpl-bridge/src/benchmarking.rs b/pallet/xrpl-bridge/src/benchmarking.rs index 9329058c4..513c164f9 100644 --- a/pallet/xrpl-bridge/src/benchmarking.rs +++ b/pallet/xrpl-bridge/src/benchmarking.rs @@ -60,7 +60,7 @@ benchmarks! { } set_payment_delay { - let payment_delay: (u128, BlockNumberFor) = (100, BlockNumberFor::from(1000u32)); + let payment_delay: (u128, BlockNumberFor) = (100, BlockNumberFor::::from(1000u32)); }: _(RawOrigin::Root, Some(payment_delay)) verify { assert_eq!(PaymentDelay::::get(), Some(payment_delay)); diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index a442e340b..a959d22af 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -798,7 +798,7 @@ impl Pallet { used_weight = used_weight.saturating_add(DbWeight::get().reads(1)); let Some(delayed_payment_ids) = >::get(new_highest) else { // No delayed payments to process for this block - new_highest = new_highest.saturating_add(BlockNumberFor::one()); + new_highest = new_highest.saturating_add(BlockNumberFor::::one()); continue; }; // Add weight for writing DelayedPaymentSchedule @@ -835,7 +835,7 @@ impl Pallet { break } else { >::remove(new_highest); - new_highest = new_highest.saturating_add(BlockNumberFor::one()); + new_highest = new_highest.saturating_add(BlockNumberFor::::one()); } } diff --git a/pallet/xrpl/src/lib.rs b/pallet/xrpl/src/lib.rs index 16b4ef108..6d378aa43 100644 --- a/pallet/xrpl/src/lib.rs +++ b/pallet/xrpl/src/lib.rs @@ -287,7 +287,7 @@ where })?; // check if genesis hash matches chain genesis hash - if >::block_hash(BlockNumberFor::zero()).as_ref() != + if >::block_hash(BlockNumberFor::::zero()).as_ref() != genesis_hash.as_ref() { return Err("⛔️ genesis hash mismatch".into()) From 30fb8ff3830b75b1bbb588779f1246305838cff9 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:27:32 +1300 Subject: [PATCH 018/112] GenesisBuild -> BuildGenesisConfig --- pallet/assets-ext/src/lib.rs | 3 +-- pallet/fee-control/src/mock.rs | 3 +-- pallet/marketplace/src/lib.rs | 3 +-- pallet/nft/src/lib.rs | 3 +-- pallet/xrpl-bridge/src/lib.rs | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pallet/assets-ext/src/lib.rs b/pallet/assets-ext/src/lib.rs index 3e440da10..dad7b85b7 100644 --- a/pallet/assets-ext/src/lib.rs +++ b/pallet/assets-ext/src/lib.rs @@ -90,7 +90,6 @@ pub mod pallet { _phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { _phantom: Default::default() } @@ -98,7 +97,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { NextAssetId::::put(1_u32); } diff --git a/pallet/fee-control/src/mock.rs b/pallet/fee-control/src/mock.rs index a6fd31823..ed2e5d6b4 100644 --- a/pallet/fee-control/src/mock.rs +++ b/pallet/fee-control/src/mock.rs @@ -77,7 +77,6 @@ pub mod mock_pallet { _marker: PhantomData, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { _marker: Default::default() } @@ -85,7 +84,7 @@ pub mod mock_pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { unimplemented!() } diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index c37bf4065..825714765 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -66,7 +66,6 @@ pub mod pallet { _phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { _phantom: Default::default() } @@ -74,7 +73,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { NextMarketplaceId::::put(1 as MarketplaceId); NextListingId::::put(1 as ListingId); diff --git a/pallet/nft/src/lib.rs b/pallet/nft/src/lib.rs index 351f7998d..778afce79 100644 --- a/pallet/nft/src/lib.rs +++ b/pallet/nft/src/lib.rs @@ -87,7 +87,6 @@ pub mod pallet { _phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { _phantom: Default::default() } @@ -95,7 +94,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { NextCollectionId::::put(1_u32); } diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index a959d22af..555a542fe 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -374,7 +374,6 @@ pub mod pallet { pub xrp_relayers: Vec, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { xrp_relayers: vec![] } @@ -382,7 +381,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { Pallet::::initialize_relayer(&self.xrp_relayers); } From b58e6e7a878120371d68a0c6be2282f86c575f9c Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:15:28 +1300 Subject: [PATCH 019/112] Index -> Nonce, #14290 --- pallet/doughnut/src/lib.rs | 4 ++-- pallet/xrpl/src/lib.rs | 4 ++-- runtime/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index 7c62ec506..510125c8a 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -76,13 +76,13 @@ impl Call where T: Send + Sync + Config, ::RuntimeCall: Dispatchable, - ::Index : Into, + ::Nonce : Into, T::AccountId: From + Into, T: pallet_transaction_payment::Config, <::OnChargeTransaction as OnChargeTransaction>::Balance: Send + Sync + FixedPointOperand + From, ::RuntimeCall: From<::RuntimeCall>, PostDispatchInfo: From<<::RuntimeCall as Dispatchable>::PostInfo>, - ::Index: From, + ::Nonce: From, ::RuntimeCall: GetCallMetadata, { pub fn is_self_contained(&self) -> bool { diff --git a/pallet/xrpl/src/lib.rs b/pallet/xrpl/src/lib.rs index 6d378aa43..1fddc40a1 100644 --- a/pallet/xrpl/src/lib.rs +++ b/pallet/xrpl/src/lib.rs @@ -77,13 +77,13 @@ impl Call where T: Send + Sync + Config, ::RuntimeCall: Dispatchable, - ::Index: Into, + ::Nonce: Into, T::AccountId: From, T: pallet_transaction_payment::Config, <::OnChargeTransaction as OnChargeTransaction>::Balance: Send + Sync + FixedPointOperand + From, ::RuntimeCall: From<::RuntimeCall>, PostDispatchInfo: From<<::RuntimeCall as Dispatchable>::PostInfo>, - ::Index: From, + ::Nonce: From, { pub fn is_self_contained(&self) -> bool { diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index a3454a206..42477ca20 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -282,8 +282,8 @@ impl frame_system::Config for Runtime { type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; + /// The nonce type for storing how many extrinsics an account has signed. + type Nonce = Index; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. From 3cab93361ca19f97bef799e47070cf8864783502 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:48:28 +1300 Subject: [PATCH 020/112] Bump ethabi v18.0.0, ethereum v14.0.0, ethereum-types v0.14.1 --- Cargo.lock | 16 +++++++--------- ethy-gadget/Cargo.toml | 2 +- evm-precompiles/erc1155/Cargo.toml | 2 +- pallet/echo/Cargo.toml | 2 +- pallet/erc20-peg/Cargo.toml | 2 +- pallet/ethy/Cargo.toml | 4 ++-- pallet/fee-proxy/Cargo.toml | 2 +- pallet/nft-peg/Cargo.toml | 2 +- runtime/Cargo.toml | 4 ++-- 9 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00b5c982c..ed5bdc6d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1756,11 +1756,11 @@ dependencies = [ [[package]] name = "ethabi" -version = "17.2.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4966fba78396ff92db3b817ee71143eccd98acf0f876b8d600e585a670c5d1b" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ - "ethereum-types 0.13.1", + "ethereum-types 0.14.1", "hex", "once_cell", "regex", @@ -1781,7 +1781,6 @@ dependencies = [ "fixed-hash 0.7.0", "impl-codec", "impl-rlp", - "impl-serde 0.3.2", "scale-info", "tiny-keccak", ] @@ -1848,7 +1847,6 @@ dependencies = [ "fixed-hash 0.7.0", "impl-codec", "impl-rlp", - "impl-serde 0.3.2", "primitive-types 0.11.1", "scale-info", "uint", @@ -5543,7 +5541,7 @@ name = "pallet-ethy" version = "1.0.1" dependencies = [ "ethabi", - "ethereum-types 0.13.1", + "ethereum-types 0.14.1", "frame-support", "frame-system", "hex", @@ -5670,7 +5668,7 @@ dependencies = [ name = "pallet-evm-precompiles-erc1155" version = "2.0.0" dependencies = [ - "ethereum-types 0.13.1", + "ethereum-types 0.14.1", "fp-evm", "frame-support", "frame-system", @@ -9087,7 +9085,7 @@ version = "0.1.0" dependencies = [ "doughnut-rs", "ethabi", - "ethereum 0.12.0", + "ethereum 0.14.0", "evm 0.36.0", "fp-evm", "fp-rpc", @@ -12029,7 +12027,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index b5251afb2..5139df87e 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" [dependencies] -ethabi = { version = "17.1.0" } +ethabi = { version = "18.0.0" } futures = "0.3.25" futures-timer = "3.0.1" hex = "0.4" diff --git a/evm-precompiles/erc1155/Cargo.toml b/evm-precompiles/erc1155/Cargo.toml index 42708a877..0817d0dd3 100644 --- a/evm-precompiles/erc1155/Cargo.toml +++ b/evm-precompiles/erc1155/Cargo.toml @@ -16,7 +16,7 @@ codec = { version = "3.0.0", package = "parity-scale-codec", default-features = num_enum = { version = "0.5.3", default-features = false } precompile-utils = { path = "../utils", default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -ethereum-types = { version = "0.13.1", default-features = false, features = ["serialize", "codec"] } +ethereum-types = { version = "0.14.1", default-features = false } # Substrate frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } diff --git a/pallet/echo/Cargo.toml b/pallet/echo/Cargo.toml index 0993029ec..298131972 100644 --- a/pallet/echo/Cargo.toml +++ b/pallet/echo/Cargo.toml @@ -12,7 +12,7 @@ seed-primitives = { path = "../../primitives", default-features = false } seed-pallet-common = { path = "../common", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -ethabi = { version = "17.1.0", default-features = false} +ethabi = { version = "18.0.0", default-features = false} sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallet/erc20-peg/Cargo.toml b/pallet/erc20-peg/Cargo.toml index 3bc850882..1ded5d46e 100644 --- a/pallet/erc20-peg/Cargo.toml +++ b/pallet/erc20-peg/Cargo.toml @@ -13,7 +13,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = serde = { version = "1.0.145", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } log = "0.4" -ethabi = { version = "17.1.0", default-features = false } +ethabi = { version = "18.0.0", default-features = false } # Substrate frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index 675cadc91..dac3fb7cd 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -8,8 +8,8 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -ethabi = { version = "17.1.0", default-features = false} -ethereum-types = { version = "0.13.1", default-features = false, features = ["serialize", "codec"] } +ethabi = { version = "18.0.0", default-features = false} +ethereum-types = { version = "0.14.1", default-features = false } hex = { version = "0.4.3", default-features = false } hex-literal = { version = "0.3.4", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } diff --git a/pallet/fee-proxy/Cargo.toml b/pallet/fee-proxy/Cargo.toml index 9505da74a..cef878f5c 100644 --- a/pallet/fee-proxy/Cargo.toml +++ b/pallet/fee-proxy/Cargo.toml @@ -17,7 +17,7 @@ precompile-utils = { path = "../../evm-precompiles/utils", default-features = fa codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -ethabi = { version = "17.1.0", default-features = false } +ethabi = { version = "18.0.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v1.0.0" } diff --git a/pallet/nft-peg/Cargo.toml b/pallet/nft-peg/Cargo.toml index 593361c0d..55dc69537 100644 --- a/pallet/nft-peg/Cargo.toml +++ b/pallet/nft-peg/Cargo.toml @@ -13,7 +13,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = serde = { version = "1.0.145", optional = true, default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } log = "0.4" -ethabi = { version = "17.1.0", default-features = false } +ethabi = { version = "18.0.0", default-features = false } pallet-nft = { path = "../nft", default-features = false } # Substrate diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 2884f659f..7d9df2b2a 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -129,9 +129,9 @@ pallet-election-provider-support-benchmarking = { git = "https://github.com/pari substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [dev-dependencies] -ethereum = { version = "0.12.0", features = ["with-codec"] } +ethereum = { version = "0.14.0", features = ["with-codec"] } seed-client = { path = "../client" } -ethabi = { version = "17.1.0" } +ethabi = { version = "18.0.0" } frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } tokio = { version = "1.19.2", features = ["macros"] } substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } From 924c7de1241802c074218880e4a661224c2f0390 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 25 Mar 2024 08:55:38 +0800 Subject: [PATCH 021/112] Multicurrency handling updates to support #12951 (#823) * GenesisBuild -> BuildGenesisConfig * Index -> Nonce, #14290 * Bump ethabi v18.0.0, ethereum v14.0.0, ethereum-types v0.14.1 * Transfer merge to Mutate, use of fungibles::metadata::Inspect instead of fungibles::InspectMetadata round 1. * Update Inspect, Mutate, Unbalanced, TransferExt trait implementations for pallet-assets-ext, update the extrinsics to use new trait updates. * Update fungible::Inspect, Currency trait implementations for AssetCurrency. * Update mocks and tests * Update Multicurrency usage * fmt * Update Multicurrency use tests --- pallet/assets-ext/src/impls.rs | 63 ++++++++--- pallet/assets-ext/src/lib.rs | 150 ++++++++++++++++++------- pallet/assets-ext/src/mock.rs | 6 +- pallet/assets-ext/src/tests.rs | 77 ++++++++----- pallet/common/src/lib.rs | 4 +- pallet/crowdsale/src/lib.rs | 2 +- pallet/dex/src/lib.rs | 84 +++++++++++--- pallet/dex/src/mock.rs | 3 +- pallet/dex/src/tests.rs | 20 ++-- pallet/doughnut/src/lib.rs | 2 +- pallet/echo/src/lib.rs | 2 +- pallet/erc20-peg/src/lib.rs | 30 ++++- pallet/ethy/src/lib.rs | 4 +- pallet/evm-chain-id/src/lib.rs | 2 +- pallet/fee-control/src/lib.rs | 2 +- pallet/fee-control/src/mock.rs | 2 +- pallet/fee-proxy/src/lib.rs | 2 +- pallet/futurepass/src/lib.rs | 2 +- pallet/maintenance-mode/src/lib.rs | 2 +- pallet/marketplace/src/lib.rs | 2 +- pallet/nft-peg/src/lib.rs | 2 +- pallet/nft/src/impls.rs | 14 ++- pallet/nft/src/lib.rs | 6 +- pallet/sft/src/impls.rs | 10 +- pallet/sft/src/lib.rs | 2 +- pallet/token-approvals/src/lib.rs | 2 +- pallet/vortex-distribution/src/lib.rs | 32 ++++-- pallet/vortex-distribution/src/mock.rs | 7 +- pallet/xls20/src/lib.rs | 2 +- pallet/xrpl-bridge/src/lib.rs | 10 +- pallet/xrpl-bridge/src/tests.rs | 41 +++---- pallet/xrpl/src/lib.rs | 2 +- runtime/src/impls.rs | 4 +- 33 files changed, 409 insertions(+), 186 deletions(-) diff --git a/pallet/assets-ext/src/impls.rs b/pallet/assets-ext/src/impls.rs index 3a035b793..e67d8e3b7 100644 --- a/pallet/assets-ext/src/impls.rs +++ b/pallet/assets-ext/src/impls.rs @@ -23,8 +23,10 @@ use sp_std::marker::PhantomData; use frame_support::traits::{ fungible, - fungibles::{self, Inspect, Transfer, Unbalanced}, - tokens::{DepositConsequence, WithdrawConsequence}, + fungibles::{self, Inspect, Mutate, Unbalanced}, + tokens::{ + DepositConsequence, Fortitude, Precision, Preservation, Provenance, WithdrawConsequence, + }, }; use seed_primitives::{AssetId, Balance}; @@ -48,24 +50,41 @@ where >::total_issuance(U::get()) } + fn active_issuance() -> Self::Balance { + >::active_issuance(U::get()) + } + fn minimum_balance() -> Balance { >::minimum_balance(U::get()) } + fn total_balance(who: &T::AccountId) -> Self::Balance { + >::total_balance(U::get(), who) + } + fn balance(who: &T::AccountId) -> Balance { >::balance(U::get(), who) } - fn reducible_balance(who: &T::AccountId, keep_alive: bool) -> Balance { + fn reducible_balance( + who: &T::AccountId, + preservation: Preservation, + force: Fortitude, + ) -> Balance { as fungibles::Inspect<_>>::reducible_balance( U::get(), who, - keep_alive, + preservation, + force, ) } - fn can_deposit(who: &T::AccountId, amount: Balance, mint: bool) -> DepositConsequence { - >::can_deposit(U::get(), who, amount, mint) + fn can_deposit( + who: &T::AccountId, + amount: Balance, + provenance: Provenance, + ) -> DepositConsequence { + >::can_deposit(U::get(), who, amount, provenance) } fn can_withdraw(who: &T::AccountId, amount: Balance) -> WithdrawConsequence { @@ -83,7 +102,12 @@ where type PositiveImbalance = imbalances::PositiveImbalance; fn free_balance(who: &T::AccountId) -> Self::Balance { - >::reducible_balance(U::get(), who, false) + >::reducible_balance( + U::get(), + who, + Preservation::Expendable, + Fortitude::Polite, + ) } fn total_issuance() -> Self::Balance { >::total_issuance(U::get()) @@ -101,11 +125,11 @@ where req: ExistenceRequirement, ) -> DispatchResult { // used by evm - let keep_alive = match req { - ExistenceRequirement::KeepAlive => true, - ExistenceRequirement::AllowDeath => false, + let preservation = match req { + ExistenceRequirement::KeepAlive => Preservation::Preserve, + ExistenceRequirement::AllowDeath => Preservation::Expendable, }; - as Transfer>::transfer(U::get(), from, to, value, keep_alive) + as Mutate>::transfer(U::get(), from, to, value, preservation) .map(|_| ()) } fn ensure_can_withdraw( @@ -128,10 +152,21 @@ where who: &T::AccountId, value: Self::Balance, _reasons: WithdrawReasons, - _req: ExistenceRequirement, + req: ExistenceRequirement, ) -> Result { + let preservation = match req { + ExistenceRequirement::KeepAlive => Preservation::Preserve, + ExistenceRequirement::AllowDeath => Preservation::Expendable, + }; // used by pallet-transaction payment & pallet-evm - >::decrease_balance(U::get(), who, value)?; + >::decrease_balance( + U::get(), + who, + value, + Precision::Exact, + preservation, + Fortitude::Polite, + )?; >::deposit_event(Event::InternalWithdraw { asset_id: U::get(), @@ -151,7 +186,7 @@ where if value.is_zero() { return Ok(PositiveImbalance::new(0, U::get())) } - >::increase_balance(U::get(), who, value)?; + >::increase_balance(U::get(), who, value, Precision::Exact)?; >::deposit_event(Event::InternalDeposit { asset_id: U::get(), who: who.clone(), diff --git a/pallet/assets-ext/src/lib.rs b/pallet/assets-ext/src/lib.rs index dad7b85b7..a984c3661 100644 --- a/pallet/assets-ext/src/lib.rs +++ b/pallet/assets-ext/src/lib.rs @@ -33,8 +33,10 @@ use frame_support::{ pallet_prelude::*, traits::{ fungible::{self, Inspect as _, Mutate as _}, - fungibles::{self, roles::Inspect as InspectRole, Inspect, Mutate, Transfer}, - tokens::{DepositConsequence, WithdrawConsequence}, + fungibles::{self, roles::Inspect as InspectRole, Dust, Inspect, Mutate, Unbalanced}, + tokens::{ + DepositConsequence, Fortitude, Precision, Preservation, Provenance, WithdrawConsequence, + }, Currency, ReservableCurrency, }, transactional, PalletId, @@ -136,7 +138,7 @@ pub mod pallet { AssetId, Blake2_128Concat, T::AccountId, - BoundedVec<(PalletIdValue, Balance), T::MaxHolds>, + BoundedVec<(PalletIdValue, Balance), ::MaxHolds>, ValueQuery, >; @@ -263,7 +265,7 @@ pub mod pallet { // We do not allow minting of the ROOT token Err(Error::::NoPermission)?; } else { - >::mint(origin, asset_id, beneficiary, amount)?; + >::mint(origin, asset_id.into(), beneficiary, amount)?; } Ok(()) } @@ -279,12 +281,16 @@ pub mod pallet { keep_alive: bool, ) -> DispatchResult { let who = ensure_signed(origin)?; - >::transfer( + let preservation = match keep_alive { + true => Preservation::Preserve, + false => Preservation::Expendable, + }; + >::transfer( asset_id, &who, &destination, amount, - keep_alive, + preservation, )?; Ok(()) } @@ -303,7 +309,7 @@ pub mod pallet { // We do not allow burning of the ROOT token Err(Error::::NoPermission)?; } else { - >::burn(origin, asset_id, who, amount)?; + >::burn(origin, asset_id.into(), who, amount)?; } Ok(()) } @@ -360,6 +366,14 @@ impl Inspect for Pallet { } } + fn total_balance(asset_id: Self::AssetId, who: &T::AccountId) -> Self::Balance { + if asset_id == T::NativeAssetId::get() { + as fungible::Inspect<_>>::total_balance(who) + } else { + >::total_balance(asset_id, who) + } + } + fn balance(asset_id: AssetId, who: &T::AccountId) -> Balance { if asset_id == T::NativeAssetId::get() { >::balance(who) @@ -368,14 +382,24 @@ impl Inspect for Pallet { } } - fn reducible_balance(asset_id: AssetId, who: &T::AccountId, keep_alive: bool) -> Balance { + fn reducible_balance( + asset_id: AssetId, + who: &T::AccountId, + preservation: Preservation, + force: Fortitude, + ) -> Balance { if asset_id == T::NativeAssetId::get() { as fungible::Inspect<_>>::reducible_balance( - who, keep_alive, + who, + preservation, + force, ) } else { as fungibles::Inspect<_>>::reducible_balance( - asset_id, who, keep_alive, + asset_id, + who, + preservation, + force, ) } } @@ -384,12 +408,12 @@ impl Inspect for Pallet { asset_id: AssetId, who: &T::AccountId, amount: Balance, - mint: bool, + provenance: Provenance, ) -> DepositConsequence { if asset_id == T::NativeAssetId::get() { - >::can_deposit(who, amount, mint) + >::can_deposit(who, amount, provenance) } else { - >::can_deposit(asset_id, who, amount, mint) + >::can_deposit(asset_id, who, amount, provenance) } } @@ -404,10 +428,41 @@ impl Inspect for Pallet { >::can_withdraw(asset_id, who, amount) } } + + fn asset_exists(asset: Self::AssetId) -> bool { + if asset == T::NativeAssetId::get() { + // native token always exists + true + } else { + >::asset_exists(asset) + } + } +} + +impl Unbalanced for Pallet { + fn handle_dust(dust: Dust) { + >::handle_dust(Dust(dust.0, dust.1)) + } + + fn write_balance( + asset: Self::AssetId, + who: &T::AccountId, + amount: Self::Balance, + ) -> Result, DispatchError> { + >::write_balance(asset, who, amount) + } + + fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { + >::set_total_issuance(asset, amount) + } } impl Mutate for Pallet { - fn mint_into(asset_id: AssetId, who: &T::AccountId, amount: Balance) -> DispatchResult { + fn mint_into( + asset_id: AssetId, + who: &T::AccountId, + amount: Balance, + ) -> Result { if asset_id == T::NativeAssetId::get() { >::mint_into(who, amount) } else { @@ -419,33 +474,42 @@ impl Mutate for Pallet { asset_id: AssetId, who: &T::AccountId, amount: Balance, + precision: Precision, + force: Fortitude, ) -> Result { if asset_id == T::NativeAssetId::get() { - >::burn_from(who, amount) + >::burn_from(who, amount, precision, force) } else { - >::burn_from(asset_id, who, amount) + >::burn_from(asset_id, who, amount, precision, force) } } -} -impl Transfer for Pallet { fn transfer( asset_id: AssetId, source: &T::AccountId, dest: &T::AccountId, amount: Balance, - keep_alive: bool, + preservation: Preservation, ) -> Result { if asset_id == T::NativeAssetId::get() { - as fungible::Transfer<_>>::transfer( - source, dest, amount, keep_alive, + as fungible::Mutate<_>>::transfer( + source, + dest, + amount, + preservation, ) } else { - as fungibles::Transfer>::transfer( - asset_id, source, dest, amount, keep_alive, + as fungibles::Mutate>::transfer( + asset_id, + source, + dest, + amount, + preservation, ) } } + + // TODO - implement callback functions? } impl TransferExt for Pallet { @@ -458,10 +522,20 @@ impl TransferExt for Pallet { ) -> DispatchResult { let total = transfers.iter().map(|x| x.1).sum::(); // This check will fail before making any transfers to restrict partial transfers - ensure!(Self::reducible_balance(asset_id, who, false) >= total, Error::::BalanceLow); + ensure!( + Self::reducible_balance(asset_id, who, Preservation::Expendable, Fortitude::Polite) >= + total, + Error::::BalanceLow + ); for (payee, amount) in transfers.into_iter() { - >::transfer(asset_id, who, payee, *amount, false)?; + >::transfer( + asset_id, + who, + payee, + *amount, + Preservation::Expendable, + )?; } Self::deposit_event(Event::SplitTransfer { @@ -501,12 +575,12 @@ impl Hold for Pallet { }, } - let _ = >::transfer( + let _ = >::transfer( asset_id, who, &T::PalletId::get().into_account_truncating(), amount, - false, + Preservation::Expendable, )?; Holds::::insert(asset_id, who.clone(), holds); @@ -537,12 +611,12 @@ impl Hold for Pallet { holds[index].1 = decreased_hold; } - let _ = >::transfer( + let _ = >::transfer( asset_id, &T::PalletId::get().into_account_truncating(), who, amount, - false, + Preservation::Expendable, ) .map(|_| ())?; @@ -663,7 +737,7 @@ impl CreateExt for Pallet { // set metadata for new asset - as root origin >::force_set_metadata( frame_system::RawOrigin::Root.into(), - new_asset_id, + new_asset_id.into(), name, symbol, decimals, @@ -673,16 +747,16 @@ impl CreateExt for Pallet { } } -impl fungibles::InspectMetadata for Pallet { - fn name(asset: &Self::AssetId) -> Vec { - as fungibles::InspectMetadata>::name(asset) +impl fungibles::metadata::Inspect for Pallet { + fn name(asset: Self::AssetId) -> Vec { + as fungibles::metadata::Inspect>::name(asset) } - fn symbol(asset: &Self::AssetId) -> Vec { - as fungibles::InspectMetadata>::symbol(asset) + fn symbol(asset: Self::AssetId) -> Vec { + as fungibles::metadata::Inspect>::symbol(asset) } - fn decimals(asset: &Self::AssetId) -> u8 { - as fungibles::InspectMetadata>::decimals(asset) + fn decimals(asset: Self::AssetId) -> u8 { + as fungibles::metadata::Inspect>::decimals(asset) } -} \ No newline at end of file +} diff --git a/pallet/assets-ext/src/mock.rs b/pallet/assets-ext/src/mock.rs index a06652376..e0dd712b7 100644 --- a/pallet/assets-ext/src/mock.rs +++ b/pallet/assets-ext/src/mock.rs @@ -15,10 +15,10 @@ //! A mock runtime for integration testing common runtime functionality use crate::{self as pallet_assets_ext}; -use frame_support::traits::FindAuthor; +use frame_support::{pallet_prelude::BuildGenesisConfig, traits::FindAuthor}; use pallet_evm::{AddressMapping, BlockHashMapping, EnsureAddressNever, GasWeightMapping}; use seed_pallet_common::test_prelude::*; -use sp_runtime::ConsensusEngineId; +use sp_runtime::{BuildStorage, ConsensusEngineId}; use std::marker::PhantomData; construct_runtime!( @@ -100,7 +100,7 @@ impl TestExt { self } pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); if !self.assets.is_empty() { let mut metadata = Vec::with_capacity(self.assets.len()); diff --git a/pallet/assets-ext/src/tests.rs b/pallet/assets-ext/src/tests.rs index 9820bfeb6..9698bca22 100644 --- a/pallet/assets-ext/src/tests.rs +++ b/pallet/assets-ext/src/tests.rs @@ -17,7 +17,13 @@ use crate::{ mock::{test_ext, AssetsExt, AssetsExtPalletId, Balances, NativeAssetId, System, Test}, AssetDeposit, Config, Error, Holds, NextAssetId, }; -use frame_support::traits::fungibles::{Inspect, InspectMetadata, Transfer}; +use frame_support::{ + macro_magic::__private::syn::token::For, + traits::{ + fungibles::{metadata::Inspect as InspectMetadata, Inspect, Mutate}, + tokens::{Fortitude, Preservation}, + }, +}; use seed_pallet_common::{test_prelude::*, CreateExt, Hold, TransferExt}; use sp_runtime::traits::{AccountIdConversion, Zero}; @@ -32,23 +38,23 @@ fn transfer() { .execute_with(|| { // native token transfer let alice_balance = AssetsExt::balance(NativeAssetId::get(), &alice()); - assert_ok!(>::transfer( + assert_ok!(>::transfer( NativeAssetId::get(), &alice(), &bob(), 100, - true + Preservation::Preserve )); assert_eq!(alice_balance - 100, AssetsExt::balance(NativeAssetId::get(), &alice()),); assert_eq!(100, AssetsExt::balance(NativeAssetId::get(), &bob()),); // XRP transfer - assert_ok!(>::transfer( + assert_ok!(>::transfer( XRP_ASSET_ID, &alice(), &bob(), 100, - true + Preservation::Preserve )); assert_eq!(alice_balance - 100, AssetsExt::balance(XRP_ASSET_ID, &alice()),); assert_eq!(100, AssetsExt::balance(XRP_ASSET_ID, &bob()),); @@ -82,7 +88,7 @@ fn transfer_extrinsic() { ); // XRP transfer - assert_ok!(AssetsExt::transfer(Some(alice()).into(), XRP_ASSET_ID, bob(), 100, false)); + assert_ok!(AssetsExt::transfer(Some(alice()).into(), XRP_ASSET_ID, bob(), 100, false,)); assert_eq!(alice_balance - 100, AssetsExt::balance(XRP_ASSET_ID, &alice()),); assert_eq!(100, AssetsExt::balance(XRP_ASSET_ID, &bob()),); @@ -108,13 +114,13 @@ fn transfer_extrinsic_low_balance() { .execute_with(|| { // native token transfer with insufficient balance assert_noop!( - AssetsExt::transfer(Some(alice()).into(), NativeAssetId::get(), bob(), 100, false), + AssetsExt::transfer(Some(alice()).into(), NativeAssetId::get(), bob(), 100, false,), pallet_balances::Error::::InsufficientBalance ); // XRP transfer with insufficient balance assert_noop!( - AssetsExt::transfer(Some(alice()).into(), XRP_ASSET_ID, bob(), 100, false), + AssetsExt::transfer(Some(alice()).into(), XRP_ASSET_ID, bob(), 100, false,), pallet_assets::Error::::BalanceLow ); }); @@ -224,7 +230,7 @@ fn mint_extrinsic() { pallet_assets::Event::::Issued { asset_id: XRP_ASSET_ID, owner: xrp_owner, - total_supply: 100, + amount: 100, } .into(), ); @@ -345,22 +351,22 @@ fn transfer_insufficient_funds() { .build() .execute_with(|| { assert_noop!( - >::transfer( + >::transfer( NativeAssetId::get(), &alice(), &bob(), initial_balance + 1, - true + Preservation::Preserve ), pallet_balances::Error::::InsufficientBalance ); assert_noop!( - >::transfer( + >::transfer( XRP_ASSET_ID, &alice(), &bob(), initial_balance + 1, - true + Preservation::Preserve ), pallet_assets::Error::::BalanceLow ); @@ -384,12 +390,12 @@ fn transfer_held_funds() { hold_amount )); assert_noop!( - >::transfer( + >::transfer( NativeAssetId::get(), &alice(), &bob(), hold_amount, - true + Preservation::Preserve ), pallet_balances::Error::::InsufficientBalance ); @@ -402,12 +408,12 @@ fn transfer_held_funds() { hold_amount )); assert_noop!( - >::transfer( + >::transfer( XRP_ASSET_ID, &alice(), &bob(), hold_amount, - true + Preservation::Preserve ), pallet_assets::Error::::BalanceLow ); @@ -571,7 +577,12 @@ fn release_hold_partial() { 5 )); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &alice(), false), + AssetsExt::reducible_balance( + NativeAssetId::get(), + &alice(), + Preservation::Expendable, + Fortitude::Polite, + ), initial_balance - hold_amount + 5 + 5, ); @@ -595,7 +606,12 @@ fn release_hold_partial() { 5 )); assert_eq!( - AssetsExt::reducible_balance(XRP_ASSET_ID, &alice(), false), + AssetsExt::reducible_balance( + XRP_ASSET_ID, + &alice(), + Preservation::Expendable, + Fortitude::Polite + ), initial_balance - hold_amount + 5 + 5, ); assert_eq!( @@ -1047,12 +1063,12 @@ fn place_hold_asset_does_not_exist() { fn transfer_asset_does_not_exist() { test_ext().build().execute_with(|| { assert_noop!( - >::transfer( + >::transfer( NativeAssetId::get() + 1, &alice(), &bob(), 100, - true, + Preservation::Preserve, ), pallet_assets::Error::::Unknown, ); @@ -1152,9 +1168,9 @@ fn create_asset() { )); assert_eq!(AssetsExt::minimum_balance(usdc), min_balance); assert_eq!(AssetsExt::total_issuance(usdc), 0); - assert_eq!(>::name(&usdc), name); - assert_eq!(>::symbol(&usdc), symbol); - assert_eq!(>::decimals(&usdc), decimals); + assert_eq!(>::name(usdc), name); + assert_eq!(>::symbol(usdc), symbol); + assert_eq!(>::decimals(usdc), decimals); // create Weth token and verify metadata let name: Vec = b"Wrapd-Eth".to_vec(); @@ -1171,9 +1187,9 @@ fn create_asset() { )); assert_eq!(AssetsExt::minimum_balance(weth), 1); // Defaults to 1 if None is set assert_eq!(AssetsExt::total_issuance(weth), 0); - assert_eq!(>::name(&weth), name); - assert_eq!(>::symbol(&weth), symbol); - assert_eq!(>::decimals(&weth), decimals); + assert_eq!(>::name(weth), name); + assert_eq!(>::symbol(weth), symbol); + assert_eq!(>::decimals(weth), decimals); }); } @@ -1286,7 +1302,12 @@ fn set_asset_deposit_reserves_the_correct_amount() { )); // Alice balance should now be reduced by deposit amount - let alice_balance = AssetsExt::reducible_balance(NativeAssetId::get(), &alice(), false); + let alice_balance = AssetsExt::reducible_balance( + NativeAssetId::get(), + &alice(), + Preservation::Expendable, + Fortitude::Polite, + ); assert_eq!(alice_balance, initial_balance - deposit); // The deposit should be reserved diff --git a/pallet/common/src/lib.rs b/pallet/common/src/lib.rs index 388371a86..e20125f4e 100644 --- a/pallet/common/src/lib.rs +++ b/pallet/common/src/lib.rs @@ -22,7 +22,7 @@ pub use frame_support::log as logger; use frame_support::{ dispatch::{DispatchError, DispatchResult, GetCallMetadata}, sp_runtime::{traits::AccountIdConversion, Perbill}, - traits::{fungibles::Transfer, Get}, + traits::{fungibles::Mutate, Get}, weights::{constants::RocksDbWeight as DbWeight, Weight}, PalletId, }; @@ -55,7 +55,7 @@ macro_rules! log { } /// Extended transfer functionality for assets -pub trait TransferExt: Transfer { +pub trait TransferExt: Mutate { /// The ID type for an account in the system type AccountId; /// Perform a split transfer from `source` to many destinations diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index 1d7f69761..fd7ec1f55 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -789,4 +789,4 @@ pub mod pallet { Ok(()) } } -} \ No newline at end of file +} diff --git a/pallet/dex/src/lib.rs b/pallet/dex/src/lib.rs index 93d07bb09..0b765492f 100644 --- a/pallet/dex/src/lib.rs +++ b/pallet/dex/src/lib.rs @@ -24,7 +24,10 @@ pub use pallet::*; use alloc::string::ToString; use frame_support::{ pallet_prelude::*, - traits::fungibles::{self, Inspect, InspectMetadata, Mutate, Transfer}, + traits::{ + fungibles::{self, metadata::Inspect as MetadataInspect, Inspect, Mutate}, + tokens::{Fortitude, Precision, Preservation}, + }, transactional, PalletId, }; use frame_system::pallet_prelude::*; @@ -126,10 +129,9 @@ pub mod pallet { /// Currency implementation to deal with assets on DEX. type MultiCurrency: CreateExt - + fungibles::Transfer + fungibles::Inspect - + fungibles::InspectMetadata - + fungibles::Mutate; + + fungibles::metadata::Inspect + + fungibles::Mutate; } #[pallet::error] @@ -541,9 +543,9 @@ where fn create_lp_token(trading_pair: &TradingPair) -> Result { let symbol_a_truncated: Vec = - T::MultiCurrency::symbol(&trading_pair.0).into_iter().take(20).collect(); + T::MultiCurrency::symbol(trading_pair.0).into_iter().take(20).collect(); let symbol_b_truncated: Vec = - T::MultiCurrency::symbol(&trading_pair.1).into_iter().take(20).collect(); + T::MultiCurrency::symbol(trading_pair.1).into_iter().take(20).collect(); // name: b"LP " + symbol_a_truncated + b" " + symbol_b_truncated let mut lp_token_name = @@ -664,8 +666,20 @@ where }; let pool_address = trading_pair.pool_address(); - T::MultiCurrency::transfer(token_a, who, &pool_address, amount_a.saturated_into(), false)?; - T::MultiCurrency::transfer(token_b, who, &pool_address, amount_b.saturated_into(), false)?; + T::MultiCurrency::transfer( + token_a, + who, + &pool_address, + amount_a.saturated_into(), + Preservation::Expendable, + )?; + T::MultiCurrency::transfer( + token_b, + who, + &pool_address, + amount_b.saturated_into(), + Preservation::Expendable, + )?; let balance_0 = T::MultiCurrency::balance(token_a, &pool_address); let balance_1 = T::MultiCurrency::balance(token_b, &pool_address); @@ -761,7 +775,13 @@ where // transfer lp tokens to dex let pool_address = trading_pair.pool_address(); - T::MultiCurrency::transfer(lp_share_asset_id, &who, &pool_address, liquidity, false)?; + T::MultiCurrency::transfer( + lp_share_asset_id, + &who, + &pool_address, + liquidity, + Preservation::Expendable, + )?; // match trading-pair to inputs - to match reserves in liquidity pool let (token_a, token_b, amount_a_min, amount_b_min, is_swapped) = @@ -793,9 +813,27 @@ where ensure!(amount_0 >= amount_a_min, Error::::InsufficientWithdrawnAmountA); ensure!(amount_1 >= amount_b_min, Error::::InsufficientWithdrawnAmountB); - T::MultiCurrency::burn_from(lp_share_asset_id, &pool_address, liquidity)?; - T::MultiCurrency::transfer(token_a, &pool_address, &to, amount_0, false)?; - T::MultiCurrency::transfer(token_b, &pool_address, &to, amount_1, false)?; + T::MultiCurrency::burn_from( + lp_share_asset_id, + &pool_address, + liquidity, + Precision::Exact, + Fortitude::Polite, + )?; + T::MultiCurrency::transfer( + token_a, + &pool_address, + &to, + amount_0, + Preservation::Expendable, + )?; + T::MultiCurrency::transfer( + token_b, + &pool_address, + &to, + amount_1, + Preservation::Expendable, + )?; balance_0 = T::MultiCurrency::balance(token_a, &pool_address); balance_1 = T::MultiCurrency::balance(token_b, &pool_address); @@ -1047,7 +1085,7 @@ where &pool_address, &to, amount_0_out, - false, + Preservation::Expendable, )?; } if amount_1_out > 0 { @@ -1057,7 +1095,7 @@ where &pool_address, &to, amount_1_out, - false, + Preservation::Expendable, )?; } @@ -1178,7 +1216,13 @@ where // transfer tokens to module account (uniswapv2 trading pair) let pool_address = trading_pair.pool_address(); - T::MultiCurrency::transfer(path[0], who, &pool_address, amounts[0], false)?; + T::MultiCurrency::transfer( + path[0], + who, + &pool_address, + amounts[0], + Preservation::Expendable, + )?; let swap_res = Self::_swap(&amounts, &path, &to)?; Self::deposit_event(Event::Swap( @@ -1216,7 +1260,13 @@ where ensure!(amounts[0] <= amount_in_max, Error::::ExcessiveSupplyAmount); let trading_pair = TradingPair::new(path[0], path[1]); let pool_address = trading_pair.pool_address(); - T::MultiCurrency::transfer(path[0], who, &pool_address, amounts[0], false)?; + T::MultiCurrency::transfer( + path[0], + who, + &pool_address, + amounts[0], + Preservation::Expendable, + )?; let swap_res = Self::_swap(&amounts, &path, &to)?; Self::deposit_event(Event::Swap(who.clone(), path.to_vec(), amounts[0], amount_out, to)); @@ -1267,4 +1317,4 @@ where Ok(false) } } -} \ No newline at end of file +} diff --git a/pallet/dex/src/mock.rs b/pallet/dex/src/mock.rs index baff4fbf7..e3580179d 100644 --- a/pallet/dex/src/mock.rs +++ b/pallet/dex/src/mock.rs @@ -18,6 +18,7 @@ use super::*; use crate::{self as pallet_dex}; use seed_pallet_common::test_prelude::*; +use sp_runtime::BuildStorage; construct_runtime!( pub enum Test where @@ -62,7 +63,7 @@ pub struct TestExt; impl TestExt { pub fn build(self) -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext: sp_io::TestExternalities = storage.into(); ext.execute_with(|| System::initialize(&1, &[0u8; 32].into(), &Default::default())); diff --git a/pallet/dex/src/tests.rs b/pallet/dex/src/tests.rs index bd30c8015..b08ae6f9d 100644 --- a/pallet/dex/src/tests.rs +++ b/pallet/dex/src/tests.rs @@ -214,8 +214,8 @@ fn create_lp_token() { assert_eq!(usdc, 1124); assert_eq!(weth, 2148); - let usdc_symbol_bytes = AssetsExt::symbol(&usdc); - let weth_symbol_bytes = AssetsExt::symbol(&weth); + let usdc_symbol_bytes = AssetsExt::symbol(usdc); + let weth_symbol_bytes = AssetsExt::symbol(weth); let usdc_symbol = sp_std::str::from_utf8(&usdc_symbol_bytes).unwrap(); let weth_symbol = sp_std::str::from_utf8(&weth_symbol_bytes).unwrap(); @@ -228,10 +228,10 @@ fn create_lp_token() { assert_eq!(lp_token, 3172); let lp_token_name_bytes = - >::name( - &lp_token, + >::name( + lp_token, ); - let lp_token_symbol_bytes = AssetsExt::symbol(&lp_token); + let lp_token_symbol_bytes = AssetsExt::symbol(lp_token); let lp_token_name = sp_std::str::from_utf8(&lp_token_name_bytes).unwrap(); let lp_token_symbol = sp_std::str::from_utf8(&lp_token_symbol_bytes).unwrap(); @@ -265,8 +265,8 @@ fn create_lp_token_long_symbol() { assert_eq!(usdc, 1124); assert_eq!(weth, 2148); - let usdc_symbol_bytes = AssetsExt::symbol(&usdc); - let weth_symbol_bytes = AssetsExt::symbol(&weth); + let usdc_symbol_bytes = AssetsExt::symbol(usdc); + let weth_symbol_bytes = AssetsExt::symbol(weth); let usdc_symbol = sp_std::str::from_utf8(&usdc_symbol_bytes).unwrap(); let weth_symbol = sp_std::str::from_utf8(&weth_symbol_bytes).unwrap(); @@ -279,10 +279,10 @@ fn create_lp_token_long_symbol() { assert_eq!(lp_token, 3172); let lp_token_name_bytes = - >::name( - &lp_token, + >::name( + lp_token, ); - let lp_token_symbol_bytes = AssetsExt::symbol(&lp_token); + let lp_token_symbol_bytes = AssetsExt::symbol(lp_token); let lp_token_name = sp_std::str::from_utf8(&lp_token_name_bytes).unwrap(); let lp_token_symbol = sp_std::str::from_utf8(&lp_token_symbol_bytes).unwrap(); diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index 510125c8a..a378d9575 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -573,4 +573,4 @@ where Ok(doughnut_decoded) } -} \ No newline at end of file +} diff --git a/pallet/echo/src/lib.rs b/pallet/echo/src/lib.rs index 341d797e9..1fac82074 100644 --- a/pallet/echo/src/lib.rs +++ b/pallet/echo/src/lib.rs @@ -215,4 +215,4 @@ impl EthereumEventSubscriber for Pallet { Ok(Weight::zero()) } } -} \ No newline at end of file +} diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index 07b726f92..49c89e449 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -22,7 +22,8 @@ use frame_support::{ pallet_prelude::*, traits::{ fungibles, - fungibles::{Mutate, Transfer}, + fungibles::Mutate, + tokens::{Fortitude, Precision, Preservation}, Get, IsType, }, transactional, @@ -60,8 +61,7 @@ pub trait Config: frame_system::Config { /// Currency functions type MultiCurrency: CreateExt + fungibles::Inspect - + fungibles::Transfer - + fungibles::Mutate; + + fungibles::Mutate; /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -346,10 +346,22 @@ impl Module { if asset_id == T::NativeAssetId::get() { // transfer all ROOT tokens to the peg address let pallet_address: T::AccountId = T::PegPalletId::get().into_account_truncating(); - T::MultiCurrency::transfer(asset_id, origin, &pallet_address, amount, false)?; + T::MultiCurrency::transfer( + asset_id, + origin, + &pallet_address, + amount, + Preservation::Expendable, + )?; } else { // burn all other tokens - T::MultiCurrency::burn_from(asset_id, origin, amount)?; + T::MultiCurrency::burn_from( + asset_id, + origin, + amount, + Precision::Exact, + Fortitude::Polite, + )?; } Ok(()) } @@ -540,7 +552,13 @@ impl Module { if asset_id == T::NativeAssetId::get() { // Transfer all ROOT tokens from the peg address let pallet_address: T::AccountId = T::PegPalletId::get().into_account_truncating(); - T::MultiCurrency::transfer(asset_id, &pallet_address, beneficiary, amount, false)?; + T::MultiCurrency::transfer( + asset_id, + &pallet_address, + beneficiary, + amount, + Preservation::Expendable, + )?; } else { // Mint all other tokens T::MultiCurrency::mint_into(asset_id, beneficiary, amount)?; diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index ffb93c22e..8d3216282 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -41,7 +41,7 @@ use frame_support::{ decl_error, decl_event, decl_module, decl_storage, pallet_prelude::*, traits::{ - fungibles::Transfer, + fungibles::Mutate, schedule::{Anon, DispatchTime}, UnixTime, ValidatorSet as ValidatorSetT, }, @@ -126,7 +126,7 @@ pub trait Config: frame_system::Config + CreateSignedTransaction> { /// Max amount of new signers that can be set an in extrinsic type MaxNewSigners: Get; /// Handles a multi-currency fungible asset system - type MultiCurrency: Transfer + Hold; + type MultiCurrency: Mutate + Hold; /// The native token asset Id (managed by pallet-balances) type NativeAssetId: Get; /// The threshold of notarizations required to approve an Ethereum event diff --git a/pallet/evm-chain-id/src/lib.rs b/pallet/evm-chain-id/src/lib.rs index 1795d4fae..51a8b48dd 100644 --- a/pallet/evm-chain-id/src/lib.rs +++ b/pallet/evm-chain-id/src/lib.rs @@ -97,4 +97,4 @@ pub mod pallet { Ok(()) } } -} \ No newline at end of file +} diff --git a/pallet/fee-control/src/lib.rs b/pallet/fee-control/src/lib.rs index fe1403c12..477fef336 100644 --- a/pallet/fee-control/src/lib.rs +++ b/pallet/fee-control/src/lib.rs @@ -161,4 +161,4 @@ impl fp_evm::FeeCalculator for Pallet { fn min_gas_price() -> (U256, Weight) { (Self::base_fee_per_gas(), T::DbWeight::get().reads(1)) } -} \ No newline at end of file +} diff --git a/pallet/fee-control/src/mock.rs b/pallet/fee-control/src/mock.rs index ed2e5d6b4..c30f02d4c 100644 --- a/pallet/fee-control/src/mock.rs +++ b/pallet/fee-control/src/mock.rs @@ -103,4 +103,4 @@ pub mod mock_pallet { } } } -} \ No newline at end of file +} diff --git a/pallet/fee-proxy/src/lib.rs b/pallet/fee-proxy/src/lib.rs index 38a6c87e2..33d4dc023 100644 --- a/pallet/fee-proxy/src/lib.rs +++ b/pallet/fee-proxy/src/lib.rs @@ -132,4 +132,4 @@ pub mod pallet { Ok(()) } } -} \ No newline at end of file +} diff --git a/pallet/futurepass/src/lib.rs b/pallet/futurepass/src/lib.rs index efbdaef26..7c21830fa 100644 --- a/pallet/futurepass/src/lib.rs +++ b/pallet/futurepass/src/lib.rs @@ -739,4 +739,4 @@ where fn primary_proxy(who: &T::AccountId) -> Option { >::get(who) } -} \ No newline at end of file +} diff --git a/pallet/maintenance-mode/src/lib.rs b/pallet/maintenance-mode/src/lib.rs index 58046a312..d642ef48e 100644 --- a/pallet/maintenance-mode/src/lib.rs +++ b/pallet/maintenance-mode/src/lib.rs @@ -406,4 +406,4 @@ where ) -> Result { self.validate(who, call, info, len).map(|_| ()) } -} \ No newline at end of file +} diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index 825714765..11d588020 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -604,4 +604,4 @@ pub mod pallet { Self::do_set_fee_to(fee_to) } } -} \ No newline at end of file +} diff --git a/pallet/nft-peg/src/lib.rs b/pallet/nft-peg/src/lib.rs index 7d3958a94..91bb8599f 100644 --- a/pallet/nft-peg/src/lib.rs +++ b/pallet/nft-peg/src/lib.rs @@ -527,4 +527,4 @@ where return Err((weight, Error::::InvalidAbiPrefix.into())) } } -} \ No newline at end of file +} diff --git a/pallet/nft/src/impls.rs b/pallet/nft/src/impls.rs index ac6ea434d..2d2c54da1 100644 --- a/pallet/nft/src/impls.rs +++ b/pallet/nft/src/impls.rs @@ -14,7 +14,11 @@ // You may obtain a copy of the License at the root of this project source code use crate::{traits::NFTCollectionInfo, *}; -use frame_support::{ensure, traits::Get, weights::Weight}; +use frame_support::{ + ensure, + traits::{tokens::Preservation, Get}, + weights::Weight, +}; use frame_system::RawOrigin; use precompile_utils::constants::ERC721_PRECOMPILE_ADDRESS_PREFIX; use seed_pallet_common::{ @@ -258,7 +262,13 @@ impl Pallet { }; // Charge the fee if there is a fee set if let Some((asset, total_fee)) = total_fee { - T::MultiCurrency::transfer(asset, who, &collection_owner, total_fee, false)?; + T::MultiCurrency::transfer( + asset, + who, + &collection_owner, + total_fee, + Preservation::Expendable, + )?; // Deposit event Self::deposit_event(Event::::MintFeePaid { who: who.clone(), diff --git a/pallet/nft/src/lib.rs b/pallet/nft/src/lib.rs index 778afce79..38bf32e54 100644 --- a/pallet/nft/src/lib.rs +++ b/pallet/nft/src/lib.rs @@ -30,7 +30,7 @@ use frame_support::{ ensure, - traits::{fungibles::Transfer, Get}, + traits::{fungibles::Mutate, Get}, transactional, PalletId, }; use seed_pallet_common::{OnNewAssetSubscriber, OnTransferSubscriber, Xls20MintRequest}; @@ -113,7 +113,7 @@ pub mod pallet { /// Handler for when an NFT collection has been created type OnNewAssetSubscription: OnNewAssetSubscriber; /// Handles a multi-currency fungible asset system - type MultiCurrency: Transfer; + type MultiCurrency: Mutate; /// This pallet's Id, used for deriving a sovereign account ID #[pallet::constant] type PalletId: Get; @@ -637,4 +637,4 @@ impl From for Error { TokenOwnershipError::TokenLimitExceeded => Error::::TokenLimitExceeded, } } -} \ No newline at end of file +} diff --git a/pallet/sft/src/impls.rs b/pallet/sft/src/impls.rs index 68d0788fd..5aa64ba25 100644 --- a/pallet/sft/src/impls.rs +++ b/pallet/sft/src/impls.rs @@ -14,7 +14,7 @@ // You may obtain a copy of the License at the root of this project source code use crate::*; -use frame_support::ensure; +use frame_support::{ensure, traits::tokens::Preservation}; use precompile_utils::constants::ERC1155_PRECOMPILE_ADDRESS_PREFIX; use seed_pallet_common::{utils::PublicMintInformation, SFTExt}; use seed_primitives::{CollectionUuid, MAX_COLLECTION_ENTITLEMENTS}; @@ -147,7 +147,13 @@ impl Pallet { }; // Charge the fee if there is a fee set if let Some((asset, total_fee)) = total_fee { - T::MultiCurrency::transfer(asset, who, &collection_owner, total_fee, false)?; + T::MultiCurrency::transfer( + asset, + who, + &collection_owner, + total_fee, + Preservation::Expendable, + )?; // Deposit event Self::deposit_event(Event::::MintFeePaid { who: who.clone(), diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index 0302e07c5..f9f3c219d 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -478,4 +478,4 @@ pub mod pallet { Ok(()) } } -} \ No newline at end of file +} diff --git a/pallet/token-approvals/src/lib.rs b/pallet/token-approvals/src/lib.rs index 0d634f887..82898288f 100644 --- a/pallet/token-approvals/src/lib.rs +++ b/pallet/token-approvals/src/lib.rs @@ -296,4 +296,4 @@ impl OnTransferSubscriber for Pallet { // Set approval to none Self::remove_erc721_approval(token_id); } -} \ No newline at end of file +} diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex-distribution/src/lib.rs index 52fe50dce..ff6a5a8e4 100644 --- a/pallet/vortex-distribution/src/lib.rs +++ b/pallet/vortex-distribution/src/lib.rs @@ -34,7 +34,7 @@ use frame_support::{ log, pallet_prelude::*, traits::{ - tokens::fungibles::{self, Inspect, Mutate, Transfer}, + tokens::fungibles::{self, Inspect, Mutate}, Get, }, PalletId, @@ -77,8 +77,10 @@ type AccountIdLookupOf = <::Lookup as StaticLookup #[frame_support::pallet] pub mod pallet { - - use frame_support::transactional; + use frame_support::{ + traits::tokens::{Fortitude, Precision, Preservation}, + transactional, + }; use sp_runtime::traits::AtLeast32BitUnsigned; use super::*; @@ -95,10 +97,9 @@ pub mod pallet { /// Multi currency type MultiCurrency: CreateExt - + fungibles::Transfer> + fungibles::Inspect - + fungibles::InspectMetadata - + fungibles::Mutate; + + fungibles::metadata::Inspect + + fungibles::Mutate>; /// The native token asset Id (managed by pallet-balances) #[pallet::constant] @@ -620,7 +621,13 @@ pub mod pallet { } // Burn the vortex token - T::MultiCurrency::burn_from(T::VtxAssetId::get(), &who, vortex_token_amount)?; + T::MultiCurrency::burn_from( + T::VtxAssetId::get(), + &who, + vortex_token_amount, + Precision::Exact, + Fortitude::Polite, + )?; Ok(()) } } @@ -773,8 +780,13 @@ pub mod pallet { amount: BalanceOf, _keep_live: bool, ) -> DispatchResult { - let transfer_result = - T::MultiCurrency::transfer(asset_id, source, dest, amount, false)?; + let transfer_result = T::MultiCurrency::transfer( + asset_id, + source, + dest, + amount, + Preservation::Expendable, + )?; ensure!(transfer_result == amount, Error::::InvalidAmount); Ok(()) } @@ -794,4 +806,4 @@ pub mod pallet { } } } -} \ No newline at end of file +} diff --git a/pallet/vortex-distribution/src/mock.rs b/pallet/vortex-distribution/src/mock.rs index 980ef7896..0eb9bea0c 100644 --- a/pallet/vortex-distribution/src/mock.rs +++ b/pallet/vortex-distribution/src/mock.rs @@ -16,7 +16,10 @@ use crate as pallet_vortex; use frame_support::traits::{ConstU32, Hooks}; use seed_pallet_common::test_prelude::*; -use sp_runtime::testing::{Header, TestXt}; +use sp_runtime::{ + testing::{Header, TestXt}, + BuildStorage, +}; pub type Extrinsic = TestXt; pub const MILLISECS_PER_BLOCK: u64 = 4_000; @@ -194,7 +197,7 @@ impl TestExt { } pub fn build(self) -> sp_io::TestExternalities { - let mut ext = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut ext = frame_system::GenesisConfig::::default().build_storage().unwrap(); if !self.assets.is_empty() { let mut metadata = Vec::with_capacity(self.assets.len()); diff --git a/pallet/xls20/src/lib.rs b/pallet/xls20/src/lib.rs index a7a3e2bf5..9bb839d21 100644 --- a/pallet/xls20/src/lib.rs +++ b/pallet/xls20/src/lib.rs @@ -321,4 +321,4 @@ impl Xls20MintRequest for Pallet { Self::send_xls20_requests(collection_id, serial_numbers, metadata_scheme); Ok(()) } -} \ No newline at end of file +} diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index 555a542fe..e4b0a5911 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -243,8 +243,12 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn process_xrp_transaction)] /// Temporary storage to set the transactions ready to be processed at specified block number - pub type ProcessXRPTransaction = - StorageMap<_, Twox64Concat, BlockNumberFor, BoundedVec>; + pub type ProcessXRPTransaction = StorageMap< + _, + Twox64Concat, + BlockNumberFor, + BoundedVec, + >; #[pallet::storage] #[pallet::getter(fn process_xrp_transaction_details)] @@ -1171,4 +1175,4 @@ impl EthyToXrplBridgeAdapter for Pallet { T::EthyAdapter::sign_xrpl_transaction(tx_blob.as_slice()) } -} \ No newline at end of file +} diff --git a/pallet/xrpl-bridge/src/tests.rs b/pallet/xrpl-bridge/src/tests.rs index 6d8c1c082..ade23c7c9 100644 --- a/pallet/xrpl-bridge/src/tests.rs +++ b/pallet/xrpl-bridge/src/tests.rs @@ -904,8 +904,7 @@ fn clear_storages_returns_zero_if_not_enough_weight() { // Call on idle to prune the settled data with JUST enough weight to settle one tx let remaining_weight = DbWeight::get().reads_writes(4, 3); - let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // Data updated assert!(>::get(ledger_index).is_none()); @@ -944,8 +943,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear only 1 tx let remaining_weight = DbWeight::get().reads_writes(4, 2 + 1); - let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); // We subtract 1 from as we did not end up updating HighestPrunedLedgerIndex assert_eq!(idle_weight, remaining_weight - DbWeight::get().writes(1)); // One settledXRPTransaction should have been removed @@ -965,8 +963,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear 4 more txs let remaining_weight = DbWeight::get().reads_writes(4, 2 + 4); - let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); // We subtract 1 from as we did not end up updating HighestPrunedLedgerIndex assert_eq!(idle_weight, remaining_weight - DbWeight::get().writes(1)); // 5 settledXRPTransaction should have been removed total @@ -986,8 +983,7 @@ fn clear_storages_doesnt_exceed_on_idle_weight() { // Call on idle with enough weight to clear the last 5 txs let remaining_weight = DbWeight::get().reads_writes(4, 2 + 5); - let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // SettledXRPTransactionDetails should now be cleared assert!(>::get(ledger_index).is_none()); @@ -1041,8 +1037,7 @@ fn clear_storages_across_multiple_ledger_indices() { let weight_per_index = DbWeight::get().reads_writes(1, 1); let weight_per_hash = DbWeight::get().writes(1); let remaining_weight = base_weight + (weight_per_index * 2) + (weight_per_hash * 10); - let idle_weight = - XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); + let idle_weight = XRPLBridge::clear_storages(remaining_weight + Weight::from_all(1u64)); assert_eq!(idle_weight, remaining_weight); // SettledXRPTransactionDetails should now be cleared @@ -1488,10 +1483,8 @@ fn process_delayed_payments_works() { // Set next process block to this block NextDelayProcessBlock::::put(1001); // Call process delayed payments with enough weight to process the delayed payment - let weight_used = XRPLBridge::process_delayed_payments( - 1001, - Weight::from_all(1_000_000_000_000), - ); + let weight_used = + XRPLBridge::process_delayed_payments(1001, Weight::from_all(1_000_000_000_000)); // Assert weight used is as expected assert_eq!(weight_used, DbWeight::get().reads_writes(6, 4)); @@ -1629,15 +1622,13 @@ fn process_delayed_payments_multiple_withdrawals() { // Set next process block to this block NextDelayProcessBlock::::put(1001); // Call process delayed payments with enough weight to process all delayed payments - let weight_used = XRPLBridge::process_delayed_payments( - 1001, - Weight::from_all(1_000_000_000_000), - ); + let weight_used = + XRPLBridge::process_delayed_payments(1001, Weight::from_all(1_000_000_000_000)); // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(3u64, 2u64); let base_weight = DbWeight::get().reads_writes(7u64, 1u64); - let total_weight = base_weight + - Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); + let total_weight = + base_weight + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); assert_eq!(weight_used, total_weight); // Storage should now be updated @@ -1702,15 +1693,13 @@ fn process_delayed_payments_multiple_withdrawals_across_multiple_blocks() { NextDelayProcessBlock::::put(1001); // Call process delayed payments with enough weight to process all delayed payments // Set block number to the last block we need to process - let weight_used = XRPLBridge::process_delayed_payments( - 1101, - Weight::from_all(1_000_000_000_000), - ); + let weight_used = + XRPLBridge::process_delayed_payments(1101, Weight::from_all(1_000_000_000_000)); // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(4u64, 3u64); let base_weight = DbWeight::get().reads_writes(3u64, 1u64); - let total_weight = base_weight + - Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); + let total_weight = + base_weight + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); assert_eq!(weight_used, total_weight); // Storage should now be updated diff --git a/pallet/xrpl/src/lib.rs b/pallet/xrpl/src/lib.rs index 1fddc40a1..b63e9fe48 100644 --- a/pallet/xrpl/src/lib.rs +++ b/pallet/xrpl/src/lib.rs @@ -482,4 +482,4 @@ pub mod pallet { Ok(().into()) } } -} \ No newline at end of file +} diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index f7ae9886b..99ff46050 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -783,9 +783,9 @@ where let amount = as fungibles::Inspect< ::AccountId, >>::reducible_balance(asset_id, current_owner, false); - as fungibles::Transfer< + as fungibles::Mutate< ::AccountId, - >>::transfer(asset_id, current_owner, new_owner, amount, false)?; + >>::transfer(asset_id, current_owner, new_owner, amount, Preservation::Expendable)?; Ok(()) } From e16df2d1fb54017dc6c9f8ae68e37028a16c288f Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 25 Mar 2024 17:55:39 +1300 Subject: [PATCH 022/112] weight 2 arithmatic. --- pallet/erc20-peg/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index 49c89e449..469e24f0f 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -193,7 +193,7 @@ decl_module! { // Process as many payments as we can let weight_each: Weight = DbWeight::get().reads(8u64).saturating_add(DbWeight::get().writes(10u64)); - let max_payments = remaining_weight.sub(initial_read_cost.ref_time()).div(weight_each.ref_time()).ref_time().saturated_into::(); + let max_payments = remaining_weight.sub_ref_time(initial_read_cost.ref_time()).div(weight_each.ref_time()).ref_time().saturated_into::(); let ready_blocks: Vec> = Self::ready_blocks(); // Total payments processed in this block let mut processed_payment_count: u8 = 0; @@ -220,7 +220,7 @@ decl_module! { } ReadyBlocks::::put(&ready_blocks[processed_block_count as usize..]); - initial_read_cost.add(weight_each.mul(processed_payment_count as u64).ref_time()) + initial_read_cost.add_ref_time(weight_each.mul(processed_payment_count as u64).ref_time()) } /// Activate/deactivate deposits (root only) From f1800b00e1ec2a3cb83b5f2327866969d337cc6a Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:39:25 +1300 Subject: [PATCH 023/112] Multicurrency more. --- evm-precompiles/erc20/src/lib.rs | 12 +++++++----- pallet/crowdsale/src/impls.rs | 14 +++++++++----- pallet/crowdsale/src/lib.rs | 28 ++++++++++++++++++---------- pallet/fee-proxy/src/runner.rs | 6 ++++-- pallet/marketplace/src/impls.rs | 1 + pallet/marketplace/src/lib.rs | 7 +++---- pallet/nft/src/impls.rs | 2 +- pallet/sft/src/lib.rs | 10 +++------- pallet/xls20/src/lib.rs | 6 +++--- pallet/xrpl-bridge/src/lib.rs | 15 ++++++++++----- runtime/src/lib.rs | 2 +- 11 files changed, 60 insertions(+), 43 deletions(-) diff --git a/evm-precompiles/erc20/src/lib.rs b/evm-precompiles/erc20/src/lib.rs index 5359fdba3..24b0533aa 100644 --- a/evm-precompiles/erc20/src/lib.rs +++ b/evm-precompiles/erc20/src/lib.rs @@ -20,7 +20,8 @@ use fp_evm::{PrecompileHandle, PrecompileOutput}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, traits::{ - fungibles::{Inspect, InspectMetadata}, + fungibles::{metadata::Inspect as InspectMetadata, Inspect}, + tokens::{Fortitude, Preservation}, OriginTrait, }, }; @@ -189,7 +190,8 @@ where as Inspect>::reducible_balance( asset_id, &owner.into(), - false, + Preservation::Expendable, + Fortitude::Polite, ) .into(); @@ -365,7 +367,7 @@ where .write::( as InspectMetadata< Runtime::AccountId, - >>::name(&asset_id) + >>::name(asset_id) .as_slice() .into(), ) @@ -387,7 +389,7 @@ where .write::( as InspectMetadata< Runtime::AccountId, - >>::symbol(&asset_id) + >>::symbol(asset_id) .as_slice() .into(), ) @@ -407,7 +409,7 @@ where EvmDataWriter::new() .write::( as InspectMetadata< Runtime::AccountId, - >>::decimals(&asset_id)) + >>::decimals(asset_id)) .build(), )) } diff --git a/pallet/crowdsale/src/impls.rs b/pallet/crowdsale/src/impls.rs index 4a839ea0c..ae83d97e4 100644 --- a/pallet/crowdsale/src/impls.rs +++ b/pallet/crowdsale/src/impls.rs @@ -13,7 +13,10 @@ use crate::*; use alloc::format; use frame_support::{ sp_runtime::traits::{BlakeTwo256, Hash}, - traits::fungibles::Inspect, + traits::{ + fungibles::Inspect, + tokens::{Fortitude, Preservation}, + }, }; use sp_core::U256; @@ -107,7 +110,8 @@ impl Pallet { let vault_balance = T::MultiCurrency::reducible_balance( sale_info.voucher_asset_id, &sale_info.vault, - false, + Preservation::Expendable, + Fortitude::Polite, ); let vouchers = u128::min(vault_balance, claimable_vouchers); @@ -117,7 +121,7 @@ impl Pallet { &sale_info.vault, &who, vouchers, - false, + Preservation::Expendable, )?; Ok(claimable_vouchers) @@ -147,7 +151,7 @@ impl Pallet { &sale_info.vault, &sale_info.admin, sale_info.funds_raised, - false, + Preservation::Expendable, )?; let collection_max_issuance = @@ -178,7 +182,7 @@ impl Pallet { &sale_info.vault, &sale_info.admin, refunded_vouchers, - false, + Preservation::Expendable, )?; } diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index fd7ec1f55..f43e3f346 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -31,7 +31,7 @@ use frame_support::{ traits::{AccountIdConversion, Zero}, SaturatedConversion, Saturating, }, - traits::fungibles::{self, Inspect, Mutate, Transfer}, + traits::fungibles::{self, Inspect, Mutate}, transactional, PalletId, }; use frame_system::{ @@ -66,6 +66,7 @@ pub const CROWDSALE_DIST_UNSIGNED_PRIORITY: TransactionPriority = #[frame_support::pallet] pub mod pallet { use super::*; + use frame_support::traits::tokens::{Fortitude, Precision, Preservation}; #[pallet::pallet] #[pallet::generate_store(pub (super) trait Store)] @@ -83,10 +84,9 @@ pub mod pallet { /// Currency implementation to deal with assets. type MultiCurrency: InspectExt + CreateExt - + fungibles::Transfer + fungibles::Inspect - + fungibles::InspectMetadata - + fungibles::Mutate; + + fungibles::metadata::Inspect + + fungibles::Mutate; /// NFT Extension, used to retrieve collection data type NFTExt: NFTExt; @@ -469,7 +469,7 @@ pub mod pallet { &who, &sale_info.vault, amount, - false, + Preservation::Expendable, )?; // update the sale funds @@ -570,7 +570,8 @@ pub mod pallet { let vault_balance = T::MultiCurrency::reducible_balance( sale_info.voucher_asset_id, &sale_info.vault, - false, + Preservation::Expendable, + Fortitude::Polite, ); if vault_balance > 0 { let _ = T::MultiCurrency::transfer( @@ -578,7 +579,7 @@ pub mod pallet { &sale_info.vault, &sale_info.admin, vault_balance, - false, + Preservation::Expendable, ); } sale_info.status = SaleStatus::Ended(block_number); @@ -658,7 +659,8 @@ pub mod pallet { let vault_balance = T::MultiCurrency::reducible_balance( sale_info.voucher_asset_id, &sale_info.vault, - false, + Preservation::Expendable, + Fortitude::Polite, ); if vault_balance > 0 { let _ = T::MultiCurrency::transfer( @@ -666,7 +668,7 @@ pub mod pallet { &sale_info.vault, &sale_info.admin, vault_balance, - false, + Preservation::Expendable, ); } sale_info.status = SaleStatus::Ended(block_number); @@ -730,7 +732,13 @@ pub mod pallet { // vouchers since 1:1 mapping between vouchers and NFTs, we can use the quantity // * decimals as the amount burned let voucher_amount = quantity.saturating_mul(10u32.pow(VOUCHER_DECIMALS as u32)); - T::MultiCurrency::burn_from(sale_info.voucher_asset_id, &who, voucher_amount.into())?; + T::MultiCurrency::burn_from( + sale_info.voucher_asset_id, + &who, + voucher_amount.into(), + Precision::Exact, + Fortitude::Polite, + )?; // mint the NFT(s) to the user T::NFTExt::do_mint( diff --git a/pallet/fee-proxy/src/runner.rs b/pallet/fee-proxy/src/runner.rs index 520c61fa3..0cc5cc71c 100644 --- a/pallet/fee-proxy/src/runner.rs +++ b/pallet/fee-proxy/src/runner.rs @@ -15,7 +15,9 @@ use crate::Config; use ethabi::{ParamType, Token}; -use frame_support::{dispatch::Weight, ensure, traits::fungibles::InspectMetadata}; +use frame_support::{ + dispatch::Weight, ensure, traits::fungibles::metadata::Inspect as InspectMetadata, +}; use pallet_evm::{ runner::stack::Runner, AddressMapping, CallInfo, CreateInfo, EvmConfig, FeeCalculator, Runner as RunnerT, RunnerError, @@ -110,7 +112,7 @@ where let gas_token_asset_id = ::FeeAssetId::get(); let decimals = - as InspectMetadata>::decimals(&gas_token_asset_id); + as InspectMetadata>::decimals(gas_token_asset_id); let total_fee_scaled = scale_wei_to_correct_decimals(total_fee, decimals); let max_fee_scaled = scale_wei_to_correct_decimals(max_fee, decimals); diff --git a/pallet/marketplace/src/impls.rs b/pallet/marketplace/src/impls.rs index 7879f7e1f..3483439f9 100644 --- a/pallet/marketplace/src/impls.rs +++ b/pallet/marketplace/src/impls.rs @@ -11,6 +11,7 @@ use crate::*; use frame_support::{ensure, traits::Get, transactional}; +use frame_system::pallet_prelude::BlockNumberFor; use seed_pallet_common::{log, Hold, NFTExt, TransferExt}; use seed_primitives::{AssetId, Balance, RoyaltiesSchedule, SerialNumber, TokenId}; use sp_runtime::{ diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index 11d588020..b5ae25b54 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -24,7 +24,7 @@ use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, - traits::fungibles::{Mutate, Transfer}, + traits::fungibles::Mutate, transactional, PalletId, }; pub use pallet::*; @@ -98,9 +98,8 @@ pub mod pallet { /// Handles a multi-currency fungible asset system type MultiCurrency: TransferExt + Hold - + Mutate - + CreateExt - + Transfer; + + Mutate + + CreateExt; /// NFT Extension type NFTExt: NFTExt; /// SFT Extension diff --git a/pallet/nft/src/impls.rs b/pallet/nft/src/impls.rs index 2d2c54da1..57b78c395 100644 --- a/pallet/nft/src/impls.rs +++ b/pallet/nft/src/impls.rs @@ -168,7 +168,7 @@ impl Pallet { }) .collect::>(); - let serial_numbers: Result, ()> = + let serial_numbers: Result, Vec<_>> = BoundedVec::try_from(serial_numbers_trimmed); match serial_numbers { Ok(serial_numbers) => { diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index f9f3c219d..d26c0e585 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -17,10 +17,7 @@ #![recursion_limit = "256"] //! # SFT Module -use frame_support::{ - traits::tokens::fungibles::{Mutate, Transfer}, - transactional, PalletId, -}; +use frame_support::{traits::tokens::fungibles::Mutate, transactional, PalletId}; use seed_pallet_common::{ CreateExt, Hold, NFTExt, OnNewAssetSubscriber, OnTransferSubscriber, TransferExt, }; @@ -71,9 +68,8 @@ pub mod pallet { /// Handles a multi-currency fungible asset system type MultiCurrency: TransferExt + Hold - + Mutate - + CreateExt - + Transfer; + + Mutate + + CreateExt; /// NFT Extension, used to retrieve nextCollectionUuid type NFTExt: NFTExt; /// Handler for when an SFT has been transferred diff --git a/pallet/xls20/src/lib.rs b/pallet/xls20/src/lib.rs index 9bb839d21..30a5594b3 100644 --- a/pallet/xls20/src/lib.rs +++ b/pallet/xls20/src/lib.rs @@ -24,7 +24,7 @@ use frame_support::{ ensure, pallet_prelude::*, - traits::{fungibles::Transfer, Get}, + traits::{fungibles::Mutate, tokens::Preservation, Get}, transactional, }; use frame_system::pallet_prelude::*; @@ -70,7 +70,7 @@ pub mod pallet { /// Max amount of tokens that can be minted in a single XLS-20 mint request type MaxTokensPerXls20Mint: Get; /// Handles a multi-currency fungible asset system - type MultiCurrency: Transfer; + type MultiCurrency: Mutate; /// Interface to access weight values type WeightInfo: WeightInfo; /// NFT ownership interface @@ -273,7 +273,7 @@ impl Pallet { who, &relayer, mint_fee, - false, + Preservation::Expendable, )?; Self::deposit_event(Event::::Xls20MintFeePaid { collection_owner: who.clone(), diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index e4b0a5911..285b5bcf1 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -23,7 +23,8 @@ use frame_support::{ fail, pallet_prelude::*, traits::{ - fungibles::{Inspect, Mutate, Transfer}, + fungibles::{Inspect, Mutate}, + tokens::{Fortitude, Precision}, UnixTime, }, transactional, @@ -78,9 +79,8 @@ pub mod pallet { type EthyAdapter: XrplBridgeToEthyAdapter; type MultiCurrency: CreateExt - + Transfer + Inspect - + Mutate; + + Mutate; /// Allowed origins to add/remove the relayers type ApproveOrigin: EnsureOrigin; @@ -992,8 +992,13 @@ impl Pallet { // the door address pays the tx fee on XRPL. Therefore the withdrawn amount must include the // tx fee to maintain an accurate door balance - let _ = - T::MultiCurrency::burn_from(T::XrpAssetId::get(), &who, amount + tx_fee as Balance)?; + let _ = T::MultiCurrency::burn_from( + T::XrpAssetId::get(), + &who, + amount + tx_fee as Balance, + Precision::Exact, + Fortitude::Polite, + )?; let ticket_sequence = Self::get_door_ticket_sequence()?; let tx_data = XrpWithdrawTransaction { diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 42477ca20..bf5362db6 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -67,7 +67,7 @@ pub use frame_support::{ dispatch::{DispatchClass, GetDispatchInfo}, ensure, parameter_types, traits::{ - fungibles::{Inspect, InspectMetadata}, + fungibles::{metadata::Inspect as InspectMetadata, Inspect}, ConstU128, ConstU32, CurrencyToVote, Everything, Get, IsInVec, KeyOwnerProofSystem, Randomness, }, From 1810470c95d8c6da9874b64edf5872bc9a7c75d1 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:31:43 +1300 Subject: [PATCH 024/112] Precompile remaining_gas more changes --- evm-precompiles/erc1155/src/lib.rs | 11 +++++++---- evm-precompiles/erc20/src/lib.rs | 11 +++++++---- evm-precompiles/erc721/src/lib.rs | 11 +++++++---- evm-precompiles/futurepass/src/lib.rs | 11 ++++++++--- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/evm-precompiles/erc1155/src/lib.rs b/evm-precompiles/erc1155/src/lib.rs index 082d09e89..a5ac8a08d 100644 --- a/evm-precompiles/erc1155/src/lib.rs +++ b/evm-precompiles/erc1155/src/lib.rs @@ -18,7 +18,7 @@ extern crate alloc; use core::convert::{TryFrom, TryInto}; use ethereum_types::BigEndianHash; -use fp_evm::{PrecompileHandle, PrecompileOutput}; +use fp_evm::{IsPrecompileResult, PrecompileHandle, PrecompileOutput}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, ensure, @@ -212,14 +212,17 @@ where None } - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { if let Some(collection_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC1155_PRECOMPILE_ADDRESS_PREFIX) { // Check whether the collection exists - pallet_sft::Pallet::::collection_exists(collection_id) + IsPrecompileResult::Answer { + is_precompile: pallet_sft::Pallet::::collection_exists(collection_id), + extra_cost: 0, // TODO: account gas for above storage read? + } } else { - false + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } } } } diff --git a/evm-precompiles/erc20/src/lib.rs b/evm-precompiles/erc20/src/lib.rs index 24b0533aa..14651160f 100644 --- a/evm-precompiles/erc20/src/lib.rs +++ b/evm-precompiles/erc20/src/lib.rs @@ -16,7 +16,7 @@ #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc; -use fp_evm::{PrecompileHandle, PrecompileOutput}; +use fp_evm::{IsPrecompileResult, PrecompileHandle, PrecompileOutput}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, traits::{ @@ -123,14 +123,17 @@ where None } - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { if let Some(asset_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC20_PRECOMPILE_ADDRESS_PREFIX) { // Check if the asset exists - >::asset_exists(asset_id) + IsPrecompileResult::Answer { + is_precompile: >::asset_exists(asset_id), + extra_cost: 0, // TODO: account gas for above storage read? + } } else { - false + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } } } } diff --git a/evm-precompiles/erc721/src/lib.rs b/evm-precompiles/erc721/src/lib.rs index df953c36b..b3ba246fb 100644 --- a/evm-precompiles/erc721/src/lib.rs +++ b/evm-precompiles/erc721/src/lib.rs @@ -17,7 +17,7 @@ extern crate alloc; use core::convert::TryFrom; -use fp_evm::{PrecompileHandle, PrecompileOutput}; +use fp_evm::{IsPrecompileResult, PrecompileHandle, PrecompileOutput}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, traits::OriginTrait, @@ -224,14 +224,17 @@ where None } - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { if let Some(collection_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC721_PRECOMPILE_ADDRESS_PREFIX) { // Check whether the collection exists - pallet_nft::Pallet::::collection_exists(collection_id) + IsPrecompileResult::Answer { + is_precompile: pallet_nft::Pallet::::collection_exists(collection_id), + extra_cost: 0, // TODO: account gas for above storage read? + } } else { - false + IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } } } } diff --git a/evm-precompiles/futurepass/src/lib.rs b/evm-precompiles/futurepass/src/lib.rs index d93af4c8a..a127cf558 100644 --- a/evm-precompiles/futurepass/src/lib.rs +++ b/evm-precompiles/futurepass/src/lib.rs @@ -17,7 +17,9 @@ #![allow(dead_code)] extern crate alloc; -use fp_evm::{Context, PrecompileHandle, PrecompileOutput, PrecompileResult, Transfer}; +use fp_evm::{ + Context, IsPrecompileResult, PrecompileHandle, PrecompileOutput, PrecompileResult, Transfer, +}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, ensure, @@ -174,9 +176,12 @@ where return Some(result) } - fn is_precompile(&self, address: H160) -> bool { + fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { // check if the address starts with futurepass precompile prefix - address.as_bytes().starts_with(FUTUREPASS_PRECOMPILE_ADDRESS_PREFIX) + IsPrecompileResult::Answer { + is_precompile: address.as_bytes().starts_with(FUTUREPASS_PRECOMPILE_ADDRESS_PREFIX), + extra_cost: 0, + } } } From 5398845a412df6e90ae9808d481d4af20e9debeb Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:11:08 +1300 Subject: [PATCH 025/112] BlockNumber -> BlockHash in runtime apis --- ethy-gadget/src/worker.rs | 10 ++++------ pallet/assets-ext/rpc/src/lib.rs | 3 +-- pallet/dex/rpc/src/lib.rs | 18 ++++++------------ pallet/marketplace/src/impls.rs | 2 +- pallet/marketplace/src/types.rs | 1 + pallet/nft/rpc/src/lib.rs | 11 ++++------- pallet/sft/rpc/src/lib.rs | 7 +++---- 7 files changed, 20 insertions(+), 32 deletions(-) diff --git a/ethy-gadget/src/worker.rs b/ethy-gadget/src/worker.rs index 5b1505474..5cffd98f2 100644 --- a/ethy-gadget/src/worker.rs +++ b/ethy-gadget/src/worker.rs @@ -114,7 +114,7 @@ where } = worker_params; let last_finalized_header = client - .expect_header(BlockId::number(client.info().finalized_number)) + .expect_header(client.info().finalized_hash) .expect("latest block always has header available; qed."); EthyWorker { @@ -150,8 +150,7 @@ where /// Such a failure is usually an indication that the Ethy pallet has not been deployed (yet). fn validator_set(&self, header: &B::Header) -> Option> { // queries the Ethy pallet to get the active validator set public keys - let at = BlockId::hash(header.hash()); - let validator_set = self.runtime.runtime_api().validator_set(&at).ok(); + let validator_set = self.runtime.runtime_api().validator_set(header.hash()).ok(); info!(target: "ethy", "💎 active validator set: {:?}", validator_set); validator_set @@ -164,8 +163,7 @@ where /// /// Always query the chain state incase the authorized list changed fn xrpl_validator_set(&self, header: &B::Header) -> Option> { - let at = BlockId::hash(header.hash()); - let xrpl_signers = self.runtime.runtime_api().xrpl_signers(&at).ok(); + let xrpl_signers = self.runtime.runtime_api().xrpl_signers(header.hash()).ok(); info!(target: "ethy", "💎 xrpl validator set: {:?}", xrpl_signers); xrpl_signers @@ -257,7 +255,7 @@ where // block by ethy and the new finalized block notification if number > *self.best_grandpa_block_header.number() + One::one() { debug!(target: "ethy", "💎 finality notification for non-sequential future block #{:?}", number); - match self.backend.blockchain().header(BlockId::Number(number - One::one())) { + match self.backend.blockchain().header(*new_header.parent_hash()) { Ok(Some(parent_header)) => { let n = FinalityNotification { hash: parent_header.hash(), diff --git a/pallet/assets-ext/rpc/src/lib.rs b/pallet/assets-ext/rpc/src/lib.rs index 399152504..8aeab5f94 100644 --- a/pallet/assets-ext/rpc/src/lib.rs +++ b/pallet/assets-ext/rpc/src/lib.rs @@ -63,8 +63,7 @@ where fn free_balance(&self, asset_id: AssetId, who: AccountId) -> RpcResult { let api = self.client.runtime_api(); let best = self.client.info().best_hash; - let at = BlockId::hash(best); - api.free_balance(&at, asset_id, who, false) + api.free_balance(best, asset_id, who, false) .map_err(|e| RpcError::to_call_error(e)) } } diff --git a/pallet/dex/rpc/src/lib.rs b/pallet/dex/rpc/src/lib.rs index 09e68a616..d26571a06 100644 --- a/pallet/dex/rpc/src/lib.rs +++ b/pallet/dex/rpc/src/lib.rs @@ -108,8 +108,7 @@ where reserve_b: u128, ) -> RpcResult> { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.quote(&at, amount_a, reserve_a, reserve_b) + api.quote(self.client.info().best_hash, amount_a, reserve_a, reserve_b) .map_err(|e| RpcError::to_call_error(e)) } @@ -119,8 +118,7 @@ where path: Vec, ) -> RpcResult, DispatchError>> { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.get_amounts_out(&at, amount_in.0.into(), path) + api.get_amounts_out(self.client.info().best_hash, amount_in.0.into(), path) .map_err(|e| RpcError::to_call_error(e)) } @@ -130,8 +128,7 @@ where path: Vec, ) -> RpcResult, DispatchError>> { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.get_amounts_in(&at, amount_out.0.into(), path) + api.get_amounts_in(self.client.info().best_hash, amount_out.0.into(), path) .map_err(|e| RpcError::to_call_error(e)) } @@ -141,8 +138,7 @@ where asset_id_b: AssetId, ) -> RpcResult> { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.get_lp_token_id(&at, asset_id_a, asset_id_b) + api.get_lp_token_id(self.client.info().best_hash, asset_id_a, asset_id_b) .map_err(|e| RpcError::to_call_error(e)) } @@ -152,8 +148,7 @@ where asset_id_b: AssetId, ) -> RpcResult<(Balance, Balance)> { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.get_liquidity(&at, asset_id_a, asset_id_b) + api.get_liquidity(self.client.info().best_hash, asset_id_a, asset_id_b) .map_err(|e| RpcError::to_call_error(e)) } @@ -163,8 +158,7 @@ where asset_id_b: AssetId, ) -> RpcResult { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); - api.get_trading_pair_status(&at, asset_id_a, asset_id_b) + api.get_trading_pair_status(self.client.info().best_hash, asset_id_a, asset_id_b) .map_err(|e| RpcError::to_call_error(e)) } } diff --git a/pallet/marketplace/src/impls.rs b/pallet/marketplace/src/impls.rs index 3483439f9..c7724102e 100644 --- a/pallet/marketplace/src/impls.rs +++ b/pallet/marketplace/src/impls.rs @@ -253,7 +253,7 @@ impl Pallet { let current_block = >::block_number(); let blocks_till_close = listing_end_block - current_block; let new_closing_block = current_block + BlockNumberFor::::from(AUCTION_EXTENSION_PERIOD); - if blocks_till_close <= BlockNumberFor::::from(AUCTION_EXTENSION_PERIOD) { + if blocks_till_close <= BlockNumberFor::::from(AUCTION_EXTENSION_PERIOD).into() { ListingEndSchedule::::remove(listing_end_block, listing_id); ListingEndSchedule::::insert(new_closing_block, listing_id, true); listing.close = new_closing_block; diff --git a/pallet/marketplace/src/types.rs b/pallet/marketplace/src/types.rs index a2b346c9e..cdd2e1217 100644 --- a/pallet/marketplace/src/types.rs +++ b/pallet/marketplace/src/types.rs @@ -15,6 +15,7 @@ use crate::{Config, Error}; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{dispatch::DispatchResult, ensure, RuntimeDebugNoBound}; +use frame_system::pallet_prelude::BlockNumberFor; use scale_info::TypeInfo; use seed_pallet_common::{NFTExt, SFTExt}; use seed_primitives::{ diff --git a/pallet/nft/rpc/src/lib.rs b/pallet/nft/rpc/src/lib.rs index c3bd8e51d..0f82bbd1b 100644 --- a/pallet/nft/rpc/src/lib.rs +++ b/pallet/nft/rpc/src/lib.rs @@ -62,7 +62,7 @@ impl Nft { impl NftApiServer for Nft where Block: BlockT, - T: Config + Send + Sync, + T: Config + Send + Sync, C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: NftRuntimeApi, AccountId: Codec, @@ -75,16 +75,13 @@ where limit: u16, ) -> RpcResult<(SerialNumber, TokenCount, Vec)> { let api = self.client.runtime_api(); - let best = self.client.info().best_hash; - let at = BlockId::hash(best); - api.owned_tokens(&at, collection_id, who, cursor, limit) + api.owned_tokens(self.client.info().best_hash, collection_id, who, cursor, limit) .map_err(|e| RpcError::to_call_error(e)) } fn token_uri(&self, token_id: TokenId) -> RpcResult> { let api = self.client.runtime_api(); - let best = self.client.info().best_hash; - let at = BlockId::hash(best); - api.token_uri(&at, token_id).map_err(|e| RpcError::to_call_error(e)) + api.token_uri(self.client.info().best_hash, token_id) + .map_err(|e| RpcError::to_call_error(e)) } } diff --git a/pallet/sft/rpc/src/lib.rs b/pallet/sft/rpc/src/lib.rs index f1f67cb17..8a186cac7 100644 --- a/pallet/sft/rpc/src/lib.rs +++ b/pallet/sft/rpc/src/lib.rs @@ -48,14 +48,13 @@ impl Sft { impl SftApiServer for Sft where Block: BlockT, - T: Config + Send + Sync, + T: Config + Send + Sync, C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: SftRuntimeApi, { fn token_uri(&self, token_id: TokenId) -> RpcResult> { let api = self.client.runtime_api(); - let best = self.client.info().best_hash; - let at = BlockId::hash(best); - api.token_uri(&at, token_id).map_err(|e| RpcError::to_call_error(e)) + api.token_uri(self.client.info().best_hash, token_id) + .map_err(|e| RpcError::to_call_error(e)) } } From 94080a49bb67a38e0e2c2f7de0dea5cde53d63d4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:37:28 +1300 Subject: [PATCH 026/112] Weight 2 introduction in evm changes, frontier-#1039 --- evm-precompiles/futurepass/src/lib.rs | 10 ++++++++-- pallet/fee-proxy/src/runner.rs | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/evm-precompiles/futurepass/src/lib.rs b/evm-precompiles/futurepass/src/lib.rs index a127cf558..88d31ae6d 100644 --- a/evm-precompiles/futurepass/src/lib.rs +++ b/evm-precompiles/futurepass/src/lib.rs @@ -448,7 +448,10 @@ where None, // handled by EVM alloc::vec![], false, - false, + false, // TODO: check why this is not true + // TODO: adjust accordingly + None, + None, ::config(), ) .map_err(|_| RevertReason::custom("Futurepass: create failed"))?; @@ -492,7 +495,10 @@ where None, // handled by EVM alloc::vec![], false, - false, + false, // TODO: check why this is not true + // TODO: adjust accordingly + None, + None, ::config(), ) .map_err(|_| RevertReason::custom("Futurepass: create2 failed"))?; diff --git a/pallet/fee-proxy/src/runner.rs b/pallet/fee-proxy/src/runner.rs index 0cc5cc71c..d372aacc6 100644 --- a/pallet/fee-proxy/src/runner.rs +++ b/pallet/fee-proxy/src/runner.rs @@ -238,6 +238,8 @@ where nonce: Option, access_list: Vec<(H160, Vec)>, is_transactional: bool, + weight_limit: Option, + proof_size_base_cost: Option, evm_config: &EvmConfig, ) -> Result<(), RunnerError> { as RunnerT>::validate( @@ -251,6 +253,8 @@ where nonce, access_list, is_transactional, + weight_limit, + proof_size_base_cost, evm_config, ) } @@ -267,6 +271,8 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, + weight_limit: Option, + proof_size_base_cost: Option, config: &EvmConfig, ) -> Result> { // Futurepass v2 code, should not have any impact @@ -371,6 +377,8 @@ where access_list, is_transactional, validate, + weight_limit, + proof_size_base_cost, config, ) } @@ -386,6 +394,8 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, + weight_limit: Option, + proof_size_base_cost: Option, config: &EvmConfig, ) -> Result> { // @todo check source, proxy request if needed @@ -410,6 +420,8 @@ where access_list, is_transactional, validate, + weight_limit, + proof_size_base_cost, config, ) } @@ -426,6 +438,8 @@ where access_list: Vec<(H160, Vec)>, is_transactional: bool, validate: bool, + weight_limit: Option, + proof_size_base_cost: Option, config: &EvmConfig, ) -> Result> { // @todo check source, proxy request if needed @@ -451,6 +465,8 @@ where access_list, is_transactional, validate, + weight_limit, + proof_size_base_cost, config, ) } From f98b68ae73ac35f7147ac05c5e5693f85b108919 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:38:26 +1300 Subject: [PATCH 027/112] pallet_evm::Config, pallet_ethereum::Config add new type aliases. --- runtime/src/lib.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index bf5362db6..40f47fa8c 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1084,6 +1084,8 @@ parameter_types! { = U256::from(NORMAL_DISPATCH_RATIO.mul(MAXIMUM_BLOCK_WEIGHT.ref_time()) / WEIGHT_PER_GAS); pub PrecompilesValue: FutureversePrecompiles = FutureversePrecompiles::<_>::new(); pub WeightPerGas: Weight = Weight::from_all(WEIGHT_PER_GAS); + // TRN is a solo chain. Otherwise -> https://github.com/polkadot-evm/frontier/pull/1039 + pub GasLimitPovSizeRatio: u64 = 0; } impl pallet_evm::Config for Runtime { @@ -1104,11 +1106,21 @@ impl pallet_evm::Config for Runtime { type FindAuthor = EthereumFindAuthor; type HandleTxValidation = HandleTxValidation>; type WeightPerGas = WeightPerGas; + type OnCreate = (); + type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type Timestamp = Timestamp; + type WeightInfo = pallet_evm::weights::SubstrateWeight; +} + +parameter_types! { + pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; } impl pallet_ethereum::Config for Runtime { type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; + type PostLogContent = PostBlockAndTxnHashes; + type ExtraDataLength = ConstU32<30>; type HandleTxValidation = HandleTxValidation; } @@ -1723,7 +1735,10 @@ impl_runtime_apis! { nonce, access_list.unwrap_or_default(), false, - false, + false, // TODO: check why this is not true + // TODO: adjust accordingly + None, + None, config.as_ref().unwrap_or(::config()), ).map_err(|err| err.error.into()) } @@ -1757,7 +1772,10 @@ impl_runtime_apis! { nonce, access_list.unwrap_or_default(), false, - false, + false, // TODO: check why this is not true + // TODO: adjust accordingly + None, + None, config.as_ref().unwrap_or(::config()), ).map_err(|err| err.error.into()) } From e28639b8898d4c5abe51e43db3f86487e56542de Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:39:18 +1300 Subject: [PATCH 028/112] Updates for Keystore overhaul. --- client/src/rpc.rs | 4 +-- client/src/service.rs | 11 +++--- ethy-gadget/src/keystore.rs | 69 +++++++++++++++---------------------- ethy-gadget/src/lib.rs | 4 +-- ethy-gadget/src/testing.rs | 4 +-- ethy-gadget/src/tests.rs | 6 ++-- pallet/ethy/src/mock.rs | 6 ++-- pallet/ethy/src/tests.rs | 12 +++---- 8 files changed, 50 insertions(+), 66 deletions(-) diff --git a/client/src/rpc.rs b/client/src/rpc.rs index ee2760bd5..34dd6ebaa 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -43,7 +43,7 @@ use sp_blockchain::{ }; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use sp_runtime::traits::BlakeTwo256; // Frontier use fc_rpc::{EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride}; @@ -70,7 +70,7 @@ pub struct BabeDeps { /// BABE pending epoch changes. pub shared_epoch_changes: SharedEpochChanges, /// The keystore that manages the keys of the node. - pub keystore: SyncCryptoStorePtr, + pub keystore: KeystorePtr, } /// Extra dependencies for GRANDPA diff --git a/client/src/service.rs b/client/src/service.rs index ecc0040db..58612291c 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -233,7 +233,7 @@ pub fn new_partial( fn remote_keystore(_url: &String) -> Result, &'static str> { // FIXME: here would the concrete keystore be built, // must return a concrete type (NOT `LocalKeystore`) that - // implements `CryptoStore` and `SyncCryptoStore` + // implements `CryptoStore` and `Keystore` Err("Remote Keystore not supported.") } @@ -354,7 +354,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result Result Result); +pub(crate) struct EthyKeystore(Option); impl EthyKeystore { /// Check if the keystore contains a private key for one of the public keys @@ -41,7 +41,7 @@ impl EthyKeystore { let store = self.0.clone()?; for key in keys { - if SyncCryptoStore::has_keys(&*store, &[(key.to_raw_vec(), ETHY_KEY_TYPE)]) { + if Keystore::has_keys(&*store, &[(key.to_raw_vec(), ETHY_KEY_TYPE)]) { return Some(key.clone()) } } @@ -63,7 +63,7 @@ impl EthyKeystore { // Sign the message (it is already) // use `_prehashed` to avoid any changes to the message - let sig = SyncCryptoStore::ecdsa_sign_prehashed(&*store, ETHY_KEY_TYPE, public, message) + let sig = Keystore::ecdsa_sign_prehashed(&*store, ETHY_KEY_TYPE, public, message) .map_err(|e| error::Error::Keystore(e.to_string()))? .ok_or_else(|| error::Error::Signature("ecdsa_sign_prehashed() failed".to_string()))?; @@ -81,7 +81,7 @@ impl EthyKeystore { pub fn public_keys(&self) -> Result, error::Error> { let store = self.0.clone().ok_or_else(|| error::Error::Keystore("no Keystore".into()))?; - let pk: Vec = SyncCryptoStore::ecdsa_public_keys(&*store, ETHY_KEY_TYPE) + let pk: Vec = Keystore::ecdsa_public_keys(&*store, ETHY_KEY_TYPE) .drain(..) .map(Public::from) .collect(); @@ -109,8 +109,8 @@ impl EthyKeystore { } } -impl From> for EthyKeystore { - fn from(store: Option) -> EthyKeystore { +impl From> for EthyKeystore { + fn from(store: Option) -> EthyKeystore { EthyKeystore(store) } } @@ -119,7 +119,7 @@ impl From> for EthyKeystore { mod tests { use sp_application_crypto::Pair as _PairT; use sp_core::{ecdsa, keccak_256}; - use sp_keystore::SyncCryptoStore; + use sp_keystore::Keystore; use seed_primitives::ethy::{ crypto::{AuthorityId as Public, AuthorityPair as Pair}, @@ -197,14 +197,11 @@ mod tests { fn authority_id_works() { let store = keystore(); - let alice: Public = SyncCryptoStore::ecdsa_generate_new( - &*store, - ETHY_KEY_TYPE, - Some(&Keyring::Alice.to_seed()), - ) - .ok() - .unwrap() - .into(); + let alice: Public = + Keystore::ecdsa_generate_new(&*store, ETHY_KEY_TYPE, Some(&Keyring::Alice.to_seed())) + .ok() + .unwrap() + .into(); let bob = Keyring::Bob.public(); let charlie = Keyring::Charlie.public(); @@ -226,14 +223,11 @@ mod tests { fn sign_works() { let store = keystore(); - let alice: Public = SyncCryptoStore::ecdsa_generate_new( - &*store, - ETHY_KEY_TYPE, - Some(&Keyring::Alice.to_seed()), - ) - .ok() - .unwrap() - .into(); + let alice: Public = + Keystore::ecdsa_generate_new(&*store, ETHY_KEY_TYPE, Some(&Keyring::Alice.to_seed())) + .ok() + .unwrap() + .into(); let store: EthyKeystore = Some(store).into(); @@ -248,13 +242,9 @@ mod tests { fn sign_error() { let store = keystore(); - let _ = SyncCryptoStore::ecdsa_generate_new( - &*store, - ETHY_KEY_TYPE, - Some(&Keyring::Bob.to_seed()), - ) - .ok() - .unwrap(); + let _ = Keystore::ecdsa_generate_new(&*store, ETHY_KEY_TYPE, Some(&Keyring::Bob.to_seed())) + .ok() + .unwrap(); let store: EthyKeystore = Some(store).into(); @@ -282,14 +272,11 @@ mod tests { fn verify_works() { let store = keystore(); - let alice: Public = SyncCryptoStore::ecdsa_generate_new( - &*store, - ETHY_KEY_TYPE, - Some(&Keyring::Alice.to_seed()), - ) - .ok() - .unwrap() - .into(); + let alice: Public = + Keystore::ecdsa_generate_new(&*store, ETHY_KEY_TYPE, Some(&Keyring::Alice.to_seed())) + .ok() + .unwrap() + .into(); let store: EthyKeystore = Some(store).into(); @@ -312,7 +299,7 @@ mod tests { let store = keystore(); let add_key = |key_type, seed: Option<&str>| { - SyncCryptoStore::ecdsa_generate_new(&*store, key_type, seed).unwrap() + Keystore::ecdsa_generate_new(&*store, key_type, seed).unwrap() }; // test keys diff --git a/ethy-gadget/src/lib.rs b/ethy-gadget/src/lib.rs index ba888cfbb..6bc5a8e56 100644 --- a/ethy-gadget/src/lib.rs +++ b/ethy-gadget/src/lib.rs @@ -36,7 +36,7 @@ use seed_primitives::ethy::EthyApi; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus::SyncOracle; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use sp_runtime::traits::Block; mod error; @@ -131,7 +131,7 @@ where /// Runtime pub runtime: Arc, /// Local key store - pub key_store: Option, + pub key_store: Option, /// Gossip network pub network: N, /// ETHY signed witness sender diff --git a/ethy-gadget/src/testing.rs b/ethy-gadget/src/testing.rs index 1808faa70..c7afcbcc2 100644 --- a/ethy-gadget/src/testing.rs +++ b/ethy-gadget/src/testing.rs @@ -18,7 +18,7 @@ use std::sync::Arc; use sc_keystore::LocalKeystore; use sp_application_crypto::Pair as _PairT; use sp_core::{ecdsa, keccak_256}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use seed_primitives::ethy::crypto::{ AuthorityId as Public, AuthorityPair as Pair, AuthoritySignature as Signature, @@ -73,6 +73,6 @@ impl From for ecdsa::Pair { } } -pub fn keystore() -> SyncCryptoStorePtr { +pub fn keystore() -> KeystorePtr { Arc::new(LocalKeystore::in_memory()) } diff --git a/ethy-gadget/src/tests.rs b/ethy-gadget/src/tests.rs index 66e4bd0a9..04325fd32 100644 --- a/ethy-gadget/src/tests.rs +++ b/ethy-gadget/src/tests.rs @@ -26,7 +26,7 @@ use sc_network_test::{ use seed_primitives::ethy::{crypto::AuthorityId, EthyApi, ValidatorSet, ETHY_KEY_TYPE}; use serde::{Deserialize, Serialize}; use sp_api::{ApiRef, ProvideRuntimeApi}; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; +use sp_keystore::{Keystore, KeystorePtr}; use sp_runtime::{BuildStorage, Storage}; use std::sync::Arc; @@ -190,9 +190,9 @@ pub(crate) fn make_ethy_ids(keys: &[EthyKeyring]) -> Vec { keys.iter().map(|key| key.clone().public().into()).collect() } -pub(crate) fn create_ethy_keystore(authority: EthyKeyring) -> SyncCryptoStorePtr { +pub(crate) fn create_ethy_keystore(authority: EthyKeyring) -> KeystorePtr { let keystore = Arc::new(LocalKeystore::in_memory()); - SyncCryptoStore::ecdsa_generate_new(&*keystore, ETHY_KEY_TYPE, Some(&authority.to_seed())) + Keystore::ecdsa_generate_new(&*keystore, ETHY_KEY_TYPE, Some(&authority.to_seed())) .expect("Creates authority key"); keystore } diff --git a/pallet/ethy/src/mock.rs b/pallet/ethy/src/mock.rs index 6ac591312..c075d347b 100644 --- a/pallet/ethy/src/mock.rs +++ b/pallet/ethy/src/mock.rs @@ -36,7 +36,7 @@ use seed_primitives::{ }; use sp_application_crypto::RuntimeAppPublic; use sp_core::ByteArray; -use sp_keystore::{testing::KeyStore, KeystoreExt, SyncCryptoStore}; +use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; use sp_runtime::{ testing::{Header, TestXt}, traits::{BlakeTwo256, Convert, Extrinsic as ExtrinsicT, IdentityLookup, Verify}, @@ -618,8 +618,8 @@ impl ExtBuilder { } if self.with_keystore { - let keystore = KeyStore::new(); - SyncCryptoStore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); + let keystore = MemoryKeystore::new(); + Keystore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); ext.register_extension(KeystoreExt(Arc::new(keystore))); } diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index 354a84a3b..db7d811ae 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -40,7 +40,7 @@ use seed_primitives::{ xrpl::XrplAccountId, }; use sp_core::ByteArray; -use sp_keystore::{testing::KeyStore, SyncCryptoStore}; +use sp_keystore::{testing::MemoryKeystore, Keystore}; use sp_runtime::{ generic::DigestItem, traits::{AccountIdConversion, Convert}, @@ -875,12 +875,10 @@ fn do_event_notarization_ocw_doesnt_change_storage() { assert_eq!(EthBridge::pending_claim_challenges(), vec![event_id_1]); // Generate public key using same authority id and seed as the mock - let keystore = KeyStore::new(); - SyncCryptoStore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); - let public_key = SyncCryptoStore::ecdsa_public_keys(&keystore, AuthorityId::ID) - .get(0) - .unwrap() - .clone(); + let keystore = MemoryKeystore::new(); + Keystore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); + let public_key = + Keystore::ecdsa_public_keys(&keystore, AuthorityId::ID).get(0).unwrap().clone(); let current_set_id = EthBridge::notary_set_id(); // Check no storage is changed From 0d5cda40fbcb34ee1da96a7001c1967d4882712b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:30:29 +1300 Subject: [PATCH 029/112] Updates for Syncing protocol extraction from sc-network --- client/src/service.rs | 12 ++++++++---- ethy-gadget/src/lib.rs | 14 ++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/client/src/service.rs b/client/src/service.rs index 58612291c..2d92e2d52 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -233,7 +233,7 @@ pub fn new_partial( fn remote_keystore(_url: &String) -> Result, &'static str> { // FIXME: here would the concrete keystore be built, // must return a concrete type (NOT `LocalKeystore`) that - // implements `CryptoStore` and `Keystore` + // implements `Keystore` Err("Remote Keystore not supported.") } @@ -310,7 +310,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result Result Result Result Result +pub struct EthyParams where B: Block, BE: Backend, @@ -123,6 +123,7 @@ where R: ProvideRuntimeApi, R::Api: EthyApi, N: GossipNetwork + Clone + SyncOracle + Send + 'static, + S: Syncing + Send + Clone + 'static, { /// ETHY client pub client: Arc, @@ -134,6 +135,8 @@ where pub key_store: Option, /// Gossip network pub network: N, + /// Gossip network + pub sync_service: S, /// ETHY signed witness sender pub event_proof_sender: notification::EthyEventProofSender, /// Prometheus metric registry @@ -146,7 +149,7 @@ where /// Start the ETHY gadget. /// /// This is a thin shim around running and awaiting a ETHY worker. -pub async fn start_ethy_gadget(ethy_params: EthyParams) +pub async fn start_ethy_gadget(ethy_params: EthyParams) where B: Block, BE: Backend, @@ -154,6 +157,7 @@ where R: ProvideRuntimeApi, R::Api: EthyApi, N: GossipNetwork + Clone + SyncOracle + Sync + Send + 'static, + S: Syncing + Send + Clone + 'static, { let EthyParams { client, @@ -161,6 +165,7 @@ where runtime, key_store, network, + sync_service, event_proof_sender, prometheus_registry, protocol_name, @@ -169,7 +174,8 @@ where let sync_oracle = network.clone(); let gossip_validator = Arc::new(gossip::GossipValidator::new(Default::default())); - let gossip_engine = GossipEngine::new(network, protocol_name, gossip_validator.clone(), None); + let gossip_engine = + GossipEngine::new(network, sync_service, protocol_name, gossip_validator.clone(), None); let metrics = prometheus_registry.as_ref().map(metrics::Metrics::register).and_then( From a408c914904f450073ed8a0b502c603b88e342eb Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:04:03 +1200 Subject: [PATCH 030/112] fix iterative FinalityNotification dispatch due to introduction of UnpinHandle #13157 --- ethy-gadget/src/worker.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ethy-gadget/src/worker.rs b/ethy-gadget/src/worker.rs index 5cffd98f2..fb9ea4ef1 100644 --- a/ethy-gadget/src/worker.rs +++ b/ethy-gadget/src/worker.rs @@ -257,13 +257,12 @@ where debug!(target: "ethy", "💎 finality notification for non-sequential future block #{:?}", number); match self.backend.blockchain().header(*new_header.parent_hash()) { Ok(Some(parent_header)) => { - let n = FinalityNotification { - hash: parent_header.hash(), - header: parent_header.clone(), - // these fields are unused by ethy - tree_route: Arc::new([]), - stale_heads: Arc::new([]), - }; + let mut n = notification.clone(); + n.hash = parent_header.hash(); + n.header = parent_header.clone(); + n.tree_route = Arc::new([]); + n.stale_heads = Arc::new([]); + self.handle_finality_notification(n); }, Ok(None) => { From 771b2dbefcda8bbf4d99a6789ef947b96a1ec085 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:04:31 +1200 Subject: [PATCH 031/112] Fix other errors in ethy-gadget --- ethy-gadget/rpc/src/lib.rs | 16 ++++++---------- ethy-gadget/src/lib.rs | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ethy-gadget/rpc/src/lib.rs b/ethy-gadget/rpc/src/lib.rs index 64dd6b13a..b5bdbd23d 100644 --- a/ethy-gadget/rpc/src/lib.rs +++ b/ethy-gadget/rpc/src/lib.rs @@ -28,7 +28,7 @@ use sc_rpc::SubscriptionTaskExecutor; use sp_api::{BlockId, ProvideRuntimeApi}; use sp_core::{Bytes, H256}; use sp_runtime::traits::{Block, Convert}; -use std::{marker::PhantomData, ops::Deref, sync::Arc}; +use std::{hash::Hash, marker::PhantomData, ops::Deref, sync::Arc}; use ethy_gadget::{notification::EthyEventProofStream, EthyEcdsaToEthereum}; use seed_primitives::{ @@ -112,7 +112,7 @@ where let runtime_handle = self.runtime.clone(); let stream = self .event_proof_stream - .subscribe() + .subscribe(100_000) .map(move |p| build_event_proof_response::(&runtime_handle, p)); let fut = async move { @@ -182,10 +182,8 @@ where { match versioned_event_proof { VersionedEventProof::V1(event_proof) => { - let proof_validator_set = runtime - .runtime_api() - .validator_set(&BlockId::hash(event_proof.block.into())) - .ok()?; + let proof_validator_set = + runtime.runtime_api().validator_set(event_proof.block.into()).ok()?; let validator_addresses: Vec = proof_validator_set .validators @@ -222,11 +220,9 @@ where { match versioned_event_proof { VersionedEventProof::V1(EventProof { signatures, event_id, block, .. }) => { - let xrpl_validator_set = - runtime.runtime_api().xrpl_signers(&BlockId::hash(block.into())).ok()?; + let xrpl_validator_set = runtime.runtime_api().xrpl_signers(block.into()).ok()?; - let validator_set = - runtime.runtime_api().validator_set(&BlockId::hash(block.into())).ok()?; + let validator_set = runtime.runtime_api().validator_set(block.into()).ok()?; let mut xrpl_signer_set: Vec = Default::default(); Some(XrplEventProofResponse { diff --git a/ethy-gadget/src/lib.rs b/ethy-gadget/src/lib.rs index 0b85d46f7..f242b68d6 100644 --- a/ethy-gadget/src/lib.rs +++ b/ethy-gadget/src/lib.rs @@ -81,8 +81,8 @@ pub(crate) mod ethy_protocol_name { /// [`sc_network::config::NetworkConfiguration::extra_sets`]. pub fn ethy_peers_set_config( protocol_name: ProtocolName, -) -> sc_network_common::config::NonDefaultSetConfig { - let mut cfg = sc_network_common::config::NonDefaultSetConfig::new(protocol_name, 1024 * 1024); +) -> sc_network::config::NonDefaultSetConfig { + let mut cfg = sc_network::config::NonDefaultSetConfig::new(protocol_name, 1024 * 1024); cfg.allow_non_reserved(25, 25); cfg } From 96f8ba27f161ee3c71ed17ab0b0c6e3f54ccb4ac Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:16:43 +1200 Subject: [PATCH 032/112] Fix pallet_evm::AccountCodes access --- evm-precompiles/erc1155/src/lib.rs | 4 ++-- evm-precompiles/erc721/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evm-precompiles/erc1155/src/lib.rs b/evm-precompiles/erc1155/src/lib.rs index a5ac8a08d..1dea4c847 100644 --- a/evm-precompiles/erc1155/src/lib.rs +++ b/evm-precompiles/erc1155/src/lib.rs @@ -419,7 +419,7 @@ where data: Bytes, ) -> Result<(), PrecompileFailure> { handle.record_cost(RuntimeHelper::::db_read_gas_cost())?; - let caller_code = pallet_evm::Pallet::::account_codes(to); + let caller_code = pallet_evm::AccountCodes::::get(to); if !(caller_code.is_empty()) { let operator = handle.context().caller; // Setup input for onErc1155Received call @@ -524,7 +524,7 @@ where data: Bytes, ) -> Result<(), PrecompileFailure> { handle.record_cost(RuntimeHelper::::db_read_gas_cost())?; - let caller_code = pallet_evm::Pallet::::account_codes(to); + let caller_code = pallet_evm::AccountCodes::::get(to); if !(caller_code.is_empty()) { let operator = handle.context().caller; // Setup input for onErc1155BatchReceived call diff --git a/evm-precompiles/erc721/src/lib.rs b/evm-precompiles/erc721/src/lib.rs index b3ba246fb..c73625789 100644 --- a/evm-precompiles/erc721/src/lib.rs +++ b/evm-precompiles/erc721/src/lib.rs @@ -444,7 +444,7 @@ where // Check that caller is not a smart contract s.t. no code is inserted into // pallet_evm::AccountCodes except if the caller is another precompile i.e. CallPermit handle.record_cost(RuntimeHelper::::db_read_gas_cost())?; - let caller_code = pallet_evm::Pallet::::account_codes(to); + let caller_code = pallet_evm::AccountCodes::::get(to); if !(caller_code.is_empty()) { // Setup input for onErc721Received call let sub_context = Context { From 179c4daafa085a7807b7646e0a063a93b8314a6b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:32:46 +1200 Subject: [PATCH 033/112] Fix Percent::from_rational for usize --- pallet/ethy/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index 8d3216282..809b43c6e 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -621,7 +621,7 @@ decl_module! { let supports = NotaryKeys::::decode_len().unwrap_or(0); let needed = T::NotarizationThreshold::get(); // TODO: check every session change not block - if Percent::from_rational(supports, T::AuthoritySet::validators().len()) < needed { + if Percent::from_rational(supports as u32, T::AuthoritySet::validators().len() as u32) < needed { log!(info, "💎 waiting for validator support to activate eth-bridge: {:?}/{:?}", supports, needed); return; } From 4a278e3f963f5e7f6b9d85db90d89901bb993f33 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:11:00 +1200 Subject: [PATCH 034/112] Fix pallet-erc20-peg build errors. --- pallet/erc20-peg/src/lib.rs | 77 +++++++++++++++++++++++---------- pallet/erc20-peg/src/weights.rs | 8 ++-- 2 files changed, 57 insertions(+), 28 deletions(-) diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index 8cb7a7815..d872b1e42 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -22,7 +22,8 @@ use frame_support::{ pallet_prelude::*, traits::{ fungibles, - fungibles::{Mutate, Transfer}, + fungibles::Mutate, + tokens::{Fortitude, Precision, Preservation}, Get, IsType, }, transactional, @@ -66,7 +67,6 @@ pub mod pallet { _phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { erc20s: vec![], _phantom: Default::default() } @@ -74,7 +74,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { for (address, symbol, decimals) in self.erc20s.iter() { Erc20Meta::::insert(address, (symbol, decimals)); @@ -91,8 +91,7 @@ pub mod pallet { /// Currency functions type MultiCurrency: CreateExt + fungibles::Inspect - + fungibles::Transfer - + fungibles::Mutate; + + fungibles::Mutate; /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Interface to generate weights @@ -149,7 +148,7 @@ pub mod pallet { /// Map from asset_id to minimum amount and delay #[pallet::storage] pub type PaymentDelay = - StorageMap<_, Twox64Concat, AssetId, (Balance, T::BlockNumber)>; + StorageMap<_, Twox64Concat, AssetId, (Balance, BlockNumberFor)>; /// Map from DelayedPaymentId to PendingPayment #[pallet::storage] @@ -161,7 +160,7 @@ pub mod pallet { pub type DelayedPaymentSchedule = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, ValueQuery, >; @@ -169,7 +168,7 @@ pub mod pallet { /// The blocks with payments that are ready to be processed #[pallet::storage] pub type ReadyBlocks = - StorageValue<_, BoundedVec, ValueQuery>; + StorageValue<_, BoundedVec, T::MaxReadyBlocks>, ValueQuery>; /// The next available payment id for withdrawals and deposits #[pallet::storage] @@ -189,7 +188,7 @@ pub mod pallet { /// An erc20 deposit has been delayed. Erc20DepositDelayed { payment_id: DelayedPaymentId, - scheduled_block: T::BlockNumber, + scheduled_block: BlockNumberFor, amount: Balance, beneficiary: T::AccountId, asset_id: AssetId, @@ -197,7 +196,7 @@ pub mod pallet { /// A withdrawal has been delayed. Erc20WithdrawalDelayed { payment_id: DelayedPaymentId, - scheduled_block: T::BlockNumber, + scheduled_block: BlockNumberFor, amount: Balance, beneficiary: EthAddress, asset_id: AssetId, @@ -206,7 +205,7 @@ pub mod pallet { /// An ERC20 delay has failed due to storage bounds. Erc20DelayFailed { payment_id: DelayedPaymentId, - scheduled_block: T::BlockNumber, + scheduled_block: BlockNumberFor, asset_id: AssetId, source: T::AccountId, }, @@ -225,7 +224,7 @@ pub mod pallet { /// The ROOT peg contract address has been set. SetRootPegContract { address: EthAddress }, /// A delay was added for an asset_id. - PaymentDelaySet { asset_id: AssetId, min_balance: Balance, delay: T::BlockNumber }, + PaymentDelaySet { asset_id: AssetId, min_balance: Balance, delay: BlockNumberFor }, /// There are no more payment ids available, they've been exhausted. NoAvailableDelayedPaymentIds, /// Toggle deposit delay. @@ -263,7 +262,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { /// Check and process outstanding payments - fn on_idle(_now: T::BlockNumber, remaining_weight: Weight) -> Weight { + fn on_idle(_now: BlockNumberFor, remaining_weight: Weight) -> Weight { let initial_read_cost = DbWeight::get().reads(1u64); // Ensure we have enough weight to perform the initial read if remaining_weight.all_lte(initial_read_cost) { @@ -279,11 +278,11 @@ pub mod pallet { let weight_each: Weight = DbWeight::get().reads(8u64).saturating_add(DbWeight::get().writes(10u64)); let max_payments = remaining_weight - .sub(initial_read_cost.ref_time()) + .sub_ref_time(initial_read_cost.ref_time()) .div(weight_each.ref_time()) .ref_time() .saturated_into::(); - let ready_blocks: Vec = ReadyBlocks::::get().into_inner(); + let ready_blocks: Vec> = ReadyBlocks::::get().into_inner(); // Total payments processed in this block let mut processed_payment_count: u8 = 0; // Count of blocks where all payments have been processed @@ -314,11 +313,12 @@ pub mod pallet { let ready_blocks = BoundedVec::truncate_from(ready_blocks[processed_block_count as usize..].to_vec()); ReadyBlocks::::put(ready_blocks); - initial_read_cost.add(weight_each.mul(processed_payment_count as u64).ref_time()) + initial_read_cost + .add_ref_time(weight_each.mul(processed_payment_count as u64).ref_time()) } /// Check and process outstanding payments - fn on_initialize(now: T::BlockNumber) -> Weight { + fn on_initialize(now: BlockNumberFor) -> Weight { let mut weight: Weight = DbWeight::get().reads(1u64); if DelayedPaymentSchedule::::contains_key(now) { let _ = ReadyBlocks::::try_append(now).map_err(|_| { @@ -333,6 +333,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Activate/deactivate deposits (root only) + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::activate_deposits())] pub fn activate_deposits(origin: OriginFor, activate: bool) -> DispatchResult { ensure_root(origin)?; @@ -342,6 +343,7 @@ pub mod pallet { } /// Activate/deactivate withdrawals (root only) + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::activate_withdrawals())] pub fn activate_withdrawals(origin: OriginFor, activate: bool) -> DispatchResult { ensure_root(origin)?; @@ -351,6 +353,7 @@ pub mod pallet { } /// Activate/deactivate delay deposits (root only) + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::activate_deposits_delay())] pub fn activate_deposits_delay(origin: OriginFor, activate: bool) -> DispatchResult { ensure_root(origin)?; @@ -360,6 +363,7 @@ pub mod pallet { } /// Activate/deactivate withdrawals (root only) + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::activate_withdrawals_delay())] pub fn activate_withdrawals_delay(origin: OriginFor, activate: bool) -> DispatchResult { ensure_root(origin)?; @@ -368,6 +372,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::withdraw())] /// Tokens will be transferred to peg account and a proof generated to allow redemption of /// tokens on Ethereum @@ -389,6 +394,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::set_erc20_peg_address())] /// Set the ERC20 peg contract address on Ethereum (requires governance) pub fn set_erc20_peg_address( @@ -401,6 +407,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::set_root_peg_address())] /// Set the ROOT peg contract address on Ethereum (requires governance) pub fn set_root_peg_address( @@ -413,6 +420,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::set_erc20_meta())] /// Set the metadata details for a given ERC20 address (requires governance) /// details: `[(contract address, symbol, decimals)]` @@ -427,6 +435,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::set_erc20_asset_map())] /// Sets the mapping for an asset to an ERC20 address (requires governance) /// Sets both Erc20ToAssetId and AssetIdToErc20 @@ -441,13 +450,14 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::set_payment_delay())] /// Sets the payment delay for a given AssetId pub fn set_payment_delay( origin: OriginFor, asset_id: AssetId, min_balance: Balance, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> DispatchResult { ensure_root(origin)?; PaymentDelay::::insert(asset_id, (min_balance, delay)); @@ -481,7 +491,7 @@ impl Pallet { let message = WithdrawMessage { token_address, amount: amount.into(), beneficiary }; // Check if there is a delay on the asset - let payment_delay: Option<(Balance, T::BlockNumber)> = PaymentDelay::::get(asset_id); + let payment_delay: Option<(Balance, BlockNumberFor)> = PaymentDelay::::get(asset_id); if WithdrawalsDelayActive::::get() { if let Some((min_amount, delay)) = payment_delay { if min_amount <= amount { @@ -520,10 +530,22 @@ impl Pallet { if asset_id == T::NativeAssetId::get() { // transfer all ROOT tokens to the peg address let pallet_address: T::AccountId = T::PegPalletId::get().into_account_truncating(); - T::MultiCurrency::transfer(asset_id, origin, &pallet_address, amount, false)?; + T::MultiCurrency::transfer( + asset_id, + origin, + &pallet_address, + amount, + Preservation::Expendable, + )?; } else { // burn all other tokens - T::MultiCurrency::burn_from(asset_id, origin, amount)?; + T::MultiCurrency::burn_from( + asset_id, + origin, + amount, + Precision::Exact, + Fortitude::Polite, + )?; } Ok(()) } @@ -594,7 +616,7 @@ impl Pallet { /// Delay a withdrawal or deposit until a later block pub fn delay_payment( - delay: T::BlockNumber, + delay: BlockNumberFor, pending_payment: PendingPayment, asset_id: AssetId, source: T::AccountId, @@ -669,7 +691,8 @@ impl Pallet { ensure!(source == &ContractAddress::::get(), Error::::InvalidSourceAddress); } // Asset exists, check if there are delays on this deposit - let payment_delay: Option<(Balance, T::BlockNumber)> = PaymentDelay::::get(asset_id); + let payment_delay: Option<(Balance, BlockNumberFor)> = + PaymentDelay::::get(asset_id); if DepositsDelayActive::::get() { if let Some((min_amount, delay)) = payment_delay { if U256::from(min_amount) <= deposit_event.amount { @@ -740,7 +763,13 @@ impl Pallet { if asset_id == T::NativeAssetId::get() { // Transfer all ROOT tokens from the peg address let pallet_address: T::AccountId = T::PegPalletId::get().into_account_truncating(); - T::MultiCurrency::transfer(asset_id, &pallet_address, beneficiary, amount, false)?; + T::MultiCurrency::transfer( + asset_id, + &pallet_address, + beneficiary, + amount, + Preservation::Expendable, + )?; } else { // Mint all other tokens T::MultiCurrency::mint_into(asset_id, beneficiary, amount)?; diff --git a/pallet/erc20-peg/src/weights.rs b/pallet/erc20-peg/src/weights.rs index 3b8884427..0d074f98d 100644 --- a/pallet/erc20-peg/src/weights.rs +++ b/pallet/erc20-peg/src/weights.rs @@ -75,12 +75,12 @@ impl WeightInfo for SubstrateWeight { } // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) fn activate_deposits_delay() -> Weight { - Weight::from_ref_time(37_675_000 as u64) + Weight::from_all(37_675_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) fn activate_withdrawals_delay() -> Weight { - Weight::from_ref_time(37_428_000 as u64) + Weight::from_all(37_428_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) @@ -142,12 +142,12 @@ impl WeightInfo for () { } // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) fn activate_deposits_delay() -> Weight { - Weight::from_ref_time(37_675_000 as u64) + Weight::from_all(37_675_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) fn activate_withdrawals_delay() -> Weight { - Weight::from_ref_time(37_428_000 as u64) + Weight::from_all(37_428_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) From fb134e1ff0fb85166c5fedc946ed63ddb6e3c005 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:22:07 +1200 Subject: [PATCH 035/112] Fix pallet-ethy build errors. --- pallet/ethy/Cargo.toml | 2 +- pallet/ethy/src/lib.rs | 60 ++++++++++++++++++++++++++-------------- pallet/ethy/src/mock.rs | 8 +++--- pallet/ethy/src/tests.rs | 16 +++++------ 4 files changed, 52 insertions(+), 34 deletions(-) diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index dac3fb7cd..2c79bb539 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } ethabi = { version = "18.0.0", default-features = false} -ethereum-types = { version = "0.14.1", default-features = false } +ethereum-types = { version = "0.14.1", default-features = false, features = ["serialize", "codec"] } hex = { version = "0.4.3", default-features = false } hex-literal = { version = "0.3.4", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index 5ef84c5d0..89c95a8f1 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -41,7 +41,7 @@ use ethabi::{ParamType, Token}; use frame_support::{ pallet_prelude::*, traits::{ - fungibles::Transfer, + fungibles::Mutate, schedule::{Anon, DispatchTime}, UnixTime, ValidatorSet as ValidatorSetT, }, @@ -109,7 +109,6 @@ pub mod pallet { pub xrp_door_signers: Vec, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { GenesisConfig { xrp_door_signers: Default::default() } @@ -117,7 +116,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { for new_signer in self.xrp_door_signers.iter() { XrplDoorSigners::::insert(new_signer, true); @@ -137,7 +136,7 @@ pub mod pallet { pub trait Config: frame_system::Config + CreateSignedTransaction> { /// Length of time the bridge will be paused while the authority set changes #[pallet::constant] - type AuthorityChangeDelay: Get; + type AuthorityChangeDelay: Get>; /// Knows the active authority set (validator stash addresses) type AuthoritySet: ValidatorSetT; /// The pallet bridge address (destination for incoming messages, source for outgoing) @@ -174,7 +173,7 @@ pub mod pallet { #[pallet::constant] type MaxNewSigners: Get; /// Handles a multi-currency fungible asset system - type MultiCurrency: Transfer + Hold; + type MultiCurrency: Mutate + Hold; /// The native token asset Id (managed by pallet-balances) #[pallet::constant] type NativeAssetId: Get; @@ -185,7 +184,11 @@ pub mod pallet { #[pallet::constant] type RelayerBond: Get; /// The Scheduler. - type Scheduler: Anon::RuntimeCall, Self::PalletsOrigin>; + type Scheduler: Anon< + BlockNumberFor, + ::RuntimeCall, + Self::PalletsOrigin, + >; /// Overarching type of all pallets origins. type PalletsOrigin: From>; /// Returns the block timestamp @@ -226,14 +229,14 @@ pub mod pallet { StorageMap<_, Twox64Concat, EventClaimId, (T::AccountId, Balance), OptionQuery>; #[pallet::type_value] - pub fn DefaultChallengePeriod() -> T::BlockNumber { - T::BlockNumber::from(150_u32) // block time (4s) * 150 = 10 Minutes + pub fn DefaultChallengePeriod() -> BlockNumberFor { + BlockNumberFor::::from(150_u32) // block time (4s) * 150 = 10 Minutes } /// The (optimistic) challenge period after which a submitted event is considered valid #[pallet::storage] pub type ChallengePeriod = - StorageValue<_, T::BlockNumber, ValueQuery, DefaultChallengePeriod>; + StorageValue<_, BlockNumberFor, ValueQuery, DefaultChallengePeriod>; /// The bridge contract address on Ethereum #[pallet::storage] @@ -336,7 +339,7 @@ pub mod pallet { /// The block in which we process the next authority change #[pallet::storage] - pub type NextAuthorityChange = StorageValue<_, T::BlockNumber, OptionQuery>; + pub type NextAuthorityChange = StorageValue<_, BlockNumberFor, OptionQuery>; /// Map from block number to list of EventClaims that will be considered valid and should be /// forwarded to handlers (i.e after the optimistic challenge period has passed without issue) @@ -344,7 +347,7 @@ pub mod pallet { pub type MessagesValidAt = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, WeakBoundedVec, ValueQuery, >; @@ -412,7 +415,7 @@ pub mod pallet { /// An event has been challenged Challenged { event_claim_id: EventClaimId, challenger: T::AccountId }, /// The event is still awaiting consensus. Process block pushed out - ProcessAtExtended { event_claim_id: EventClaimId, process_at: T::BlockNumber }, + ProcessAtExtended { event_claim_id: EventClaimId, process_at: BlockNumberFor }, /// An event proof has been sent for signing by ethy-gadget EventSend { event_proof_id: EventProofId, @@ -422,7 +425,7 @@ pub mod pallet { EventSubmit { event_claim_id: EventClaimId, event_claim: EventClaim, - process_at: T::BlockNumber, + process_at: BlockNumberFor, }, /// An account has deposited a relayer bond RelayerBondDeposit { relayer: T::AccountId, bond: Balance }, @@ -433,7 +436,7 @@ pub mod pallet { /// Xrpl Door signers are set XrplDoorSignersSet { new_signers: Vec<(T::EthyId, bool)> }, /// The schedule to unpause the bridge has failed - FinaliseScheduleFail { scheduled_block: T::BlockNumber }, + FinaliseScheduleFail { scheduled_block: BlockNumberFor }, /// The bridge contract address has been set SetContractAddress { address: EthAddress }, /// Xrpl authority set change request failed @@ -443,7 +446,7 @@ pub mod pallet { /// DelayedEventProofsPerBlock was set DelayedEventProofsPerBlockSet { count: u8 }, /// A new challenge period was set - ChallengePeriodSet { period: T::BlockNumber }, + ChallengePeriodSet { period: BlockNumberFor }, /// The bridge has been manually paused or unpaused BridgeManualPause { paused: bool }, } @@ -499,7 +502,7 @@ pub mod pallet { /// 2) Process any newly valid event claims (incoming) /// 3) Process any deferred event proofs that were submitted while the bridge was paused /// (should only happen on the first few blocks in a new era) (outgoing) - fn on_initialize(block_number: T::BlockNumber) -> Weight { + fn on_initialize(block_number: BlockNumberFor) -> Weight { let mut consumed_weight = Weight::zero(); // 1) Handle authority change @@ -586,7 +589,7 @@ pub mod pallet { consumed_weight } - fn offchain_worker(block_number: T::BlockNumber) { + fn offchain_worker(block_number: BlockNumberFor) { let active_notaries = NotaryKeys::::get().into_inner(); log!(debug, "💎 entering off-chain worker: {:?}", block_number); log!(debug, "💎 active notaries: {:?}", active_notaries); @@ -603,7 +606,11 @@ pub mod pallet { let supports = active_notaries.len(); let needed = T::NotarizationThreshold::get(); // TODO: check every session change not block - if Percent::from_rational(supports, T::AuthoritySet::validators().len()) < needed { + if Percent::from_rational( + supports as u32, + T::AuthoritySet::validators().len() as u32, + ) < needed + { log!( info, "💎 waiting for validator support to activate eth-bridge: {:?}/{:?}", @@ -626,6 +633,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Set new XRPL door signers + #[pallet::call_index(0)] #[pallet::weight(DbWeight::get().writes(new_signers.len() as u64).saturating_add(DbWeight::get().reads_writes(4, 3)))] pub fn set_xrpl_door_signers( origin: OriginFor, @@ -647,6 +655,7 @@ pub mod pallet { } /// Set the relayer address + #[pallet::call_index(1)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_relayer(origin: OriginFor, relayer: T::AccountId) -> DispatchResult { ensure_root(origin)?; @@ -661,6 +670,7 @@ pub mod pallet { } /// Submit bond for relayer account + #[pallet::call_index(2)] #[pallet::weight(DbWeight::get().reads_writes(5, 6))] pub fn deposit_relayer_bond(origin: OriginFor) -> DispatchResult { let origin = ensure_signed(origin)?; @@ -685,6 +695,7 @@ pub mod pallet { } /// Withdraw relayer bond amount + #[pallet::call_index(3)] #[pallet::weight(DbWeight::get().reads_writes(3, 3))] pub fn withdraw_relayer_bond(origin: OriginFor) -> DispatchResult { let origin = ensure_signed(origin)?; @@ -714,6 +725,7 @@ pub mod pallet { /// Set event confirmations (blocks). Required block confirmations for an Ethereum event to /// be notarized by Seed + #[pallet::call_index(4)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_event_block_confirmations( origin: OriginFor, @@ -726,6 +738,7 @@ pub mod pallet { } /// Set max number of delayed events that can be processed per block + #[pallet::call_index(5)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_delayed_event_proofs_per_block( origin: OriginFor, @@ -739,10 +752,11 @@ pub mod pallet { /// Set challenge period, this is the window in which an event can be challenged before /// processing + #[pallet::call_index(6)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_challenge_period( origin: OriginFor, - blocks: T::BlockNumber, + blocks: BlockNumberFor, ) -> DispatchResult { ensure_root(origin)?; ChallengePeriod::::put(blocks); @@ -751,6 +765,7 @@ pub mod pallet { } /// Set the bridge contract address on Ethereum (requires governance) + #[pallet::call_index(7)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_contract_address( origin: OriginFor, @@ -763,6 +778,7 @@ pub mod pallet { } /// Pause or unpause the bridge (requires governance) + #[pallet::call_index(8)] #[pallet::weight(DbWeight::get().writes(1))] pub fn set_bridge_paused(origin: OriginFor, paused: bool) -> DispatchResult { ensure_root(origin)?; @@ -776,6 +792,7 @@ pub mod pallet { /// Finalise authority changes, unpauses bridge and sets new notary keys /// Called internally after force new era + #[pallet::call_index(9)] #[pallet::weight(DbWeight::get().writes(1))] pub fn finalise_authorities_change( origin: OriginFor, @@ -789,6 +806,7 @@ pub mod pallet { /// Submit ABI encoded event data from the Ethereum bridge contract /// - tx_hash The Ethereum transaction hash which triggered the event /// - event ABI encoded bridge event + #[pallet::call_index(10)] #[pallet::weight(DbWeight::get().writes(1))] pub fn submit_event(origin: OriginFor, tx_hash: H256, event: Vec) -> DispatchResult { let origin = ensure_signed(origin)?; @@ -837,7 +855,7 @@ pub mod pallet { PendingClaimStatus::::insert(event_id, EventClaimStatus::Pending); // TODO: there should be some limit per block - let process_at: T::BlockNumber = + let process_at: BlockNumberFor = >::block_number() + ChallengePeriod::::get(); MessagesValidAt::::mutate(process_at.clone(), |v| { let mut message_ids = v.clone().into_inner(); @@ -864,6 +882,7 @@ pub mod pallet { /// Submit a challenge for an event /// Challenged events won't be processed until verified by validators /// An event can only be challenged once + #[pallet::call_index(11)] #[pallet::weight(DbWeight::get().writes(1) + DbWeight::get().reads(2))] #[transactional] pub fn submit_challenge( @@ -903,6 +922,7 @@ pub mod pallet { /// Internal only /// Validators will submit inherents with their notarization vote for a given claim + #[pallet::call_index(12)] #[pallet::weight(1_000_000)] #[transactional] pub fn submit_notarization( diff --git a/pallet/ethy/src/mock.rs b/pallet/ethy/src/mock.rs index d2249a9ab..177c2ca9e 100644 --- a/pallet/ethy/src/mock.rs +++ b/pallet/ethy/src/mock.rs @@ -38,7 +38,7 @@ use seed_primitives::{ }; use sp_application_crypto::RuntimeAppPublic; use sp_core::{ByteArray, Get}; -use sp_keystore::{testing::KeyStore, KeystoreExt, SyncCryptoStore}; +use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; use sp_runtime::{ testing::{Header, TestXt}, traits::{BlakeTwo256, Convert, Extrinsic as ExtrinsicT, IdentityLookup, Verify}, @@ -466,7 +466,7 @@ impl MockValidatorSet { pub struct MockEventRouter; impl EthereumEventRouter for MockEventRouter { fn route(_source: &H160, _destination: &H160, _data: &[u8]) -> EventRouterResult { - Ok(Weight::from_ref_time(1000)) + Ok(Weight::from_all(1000)) } } @@ -630,8 +630,8 @@ impl ExtBuilder { } if self.with_keystore { - let keystore = KeyStore::new(); - SyncCryptoStore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); + let keystore = MemoryKeystore::new(); + Keystore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); ext.register_extension(KeystoreExt(Arc::new(keystore))); } diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index 935f32a5a..7adac0837 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -43,7 +43,7 @@ use seed_primitives::{ xrpl::XrplAccountId, }; use sp_core::{bounded::WeakBoundedVec, ByteArray}; -use sp_keystore::{testing::KeyStore, SyncCryptoStore}; +use sp_keystore::{testing::MemoryKeystore, Keystore}; use sp_runtime::{ generic::DigestItem, traits::{AccountIdConversion, Convert}, @@ -633,7 +633,7 @@ fn process_valid_challenged_event() { // Weight returned should include the 1000 that we specified in our mock assert_eq!( EthBridge::on_initialize(process_at), - DbWeight::get().reads(2u64) + Weight::from_ref_time(1000u64) + DbWeight::get().reads(2u64) + Weight::from_all(1000u64) ); // Storage should now be fully cleared @@ -728,7 +728,7 @@ fn process_valid_challenged_event_delayed() { // Weight returned should include the 1000 that we specified in our mock assert_eq!( EthBridge::on_initialize(process_at_extended), - DbWeight::get().reads(2u64) + Weight::from_ref_time(1000u64) + DbWeight::get().reads(2u64) + Weight::from_all(1000u64) ); // Storage should now be fully cleared @@ -883,12 +883,10 @@ fn do_event_notarization_ocw_doesnt_change_storage() { assert_eq!(PendingClaimChallenges::::get(), vec![event_id_1]); // Generate public key using same authority id and seed as the mock - let keystore = KeyStore::new(); - SyncCryptoStore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); - let public_key = SyncCryptoStore::ecdsa_public_keys(&keystore, AuthorityId::ID) - .get(0) - .unwrap() - .clone(); + let keystore = MemoryKeystore::new(); + Keystore::ecdsa_generate_new(&keystore, AuthorityId::ID, None).unwrap(); + let public_key = + Keystore::ecdsa_public_keys(&keystore, AuthorityId::ID).get(0).unwrap().clone(); let current_set_id = NotarySetId::::get(); // Check no storage is changed From 8fc37abca260ad97ed833f08693ce0e0890452d9 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:48:22 +1200 Subject: [PATCH 036/112] Fix pallet-crowdsale build errors. --- pallet/crowdsale/src/lib.rs | 5 +++-- pallet/crowdsale/src/weights.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index b4a12fc9d..cf2aa96a8 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -35,8 +35,8 @@ use frame_support::{ }, traits::{ fungibles::{self, Inspect, Mutate}, - IsSubType, tokens::{Fortitude, Precision, Preservation}, + IsSubType, }, transactional, PalletId, }; @@ -824,6 +824,7 @@ pub mod pallet { /// - `call`: The call to be proxied /// /// Emits `VaultCallProxied` event when successful. + #[pallet::call_index(6)] #[pallet::weight({ let call_weight = call.get_dispatch_info().weight; T::WeightInfo::proxy_vault_call().saturating_add(call_weight) @@ -860,7 +861,7 @@ pub mod pallet { /// In the very unlikely case that a sale was blocked from automatic distribution within /// the on_initialise step. This function allows a manual trigger of distribution /// callable by anyone to kickstart the sale distribution process. - #[pallet::call_index(6)] + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::try_force_distribution())] pub fn try_force_distribution(origin: OriginFor, sale_id: SaleId) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/pallet/crowdsale/src/weights.rs b/pallet/crowdsale/src/weights.rs index 4f9534cb1..8bd9b5f73 100644 --- a/pallet/crowdsale/src/weights.rs +++ b/pallet/crowdsale/src/weights.rs @@ -136,7 +136,7 @@ impl WeightInfo for SubstrateWeight { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn proxy_vault_call() -> Weight { - Weight::from_ref_time(89_316_000 as u64) + Weight::from_all(89_316_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) @@ -245,7 +245,7 @@ impl WeightInfo for () { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn proxy_vault_call() -> Weight { - Weight::from_ref_time(89_316_000 as u64) + Weight::from_all(89_316_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) From d47062df9e0abc8085969fd38f28151409bedcf2 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:40:13 +1200 Subject: [PATCH 037/112] Fix seed-runtime --- Cargo.lock | 1 + primitives/Cargo.toml | 4 +- primitives/src/signature.rs | 7 +- runtime/Cargo.toml | 2 +- runtime/src/impls.rs | 33 +++-- runtime/src/lib.rs | 171 +++++++++++++++--------- runtime/src/migrations/crowdsale.rs | 3 +- runtime/src/migrations/futurepass.rs | 5 +- runtime/src/weights/frame_system.rs | 5 + runtime/src/weights/pallet_assets.rs | 61 ++++++--- runtime/src/weights/pallet_balances.rs | 34 +++-- runtime/src/weights/pallet_crowdsale.rs | 2 +- runtime/src/weights/pallet_erc20_peg.rs | 4 +- runtime/src/weights/pallet_im_online.rs | 4 +- runtime/src/weights/pallet_multisig.rs | 38 ------ runtime/src/weights/pallet_scheduler.rs | 137 ++++--------------- runtime/src/weights/pallet_staking.rs | 6 +- 17 files changed, 241 insertions(+), 276 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c5dd98759..fe68b0ffa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9008,6 +9008,7 @@ dependencies = [ "sc-executor", "sc-keystore", "sc-network", + "sc-offchain", "sc-rpc", "sc-rpc-api", "sc-service", diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index d6d7bfebd..fd04f530e 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -14,7 +14,7 @@ impl-serde = { version = "0.4.0", default-features = false } libsecp256k1 = { version = "0.7", default-features = false, features = [ "hmac" ] } log = { version = "0.4", default-features = false } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, optional = true } +serde = { version = "1.0.145", default-features = false, features = ["derive"] } ripemd = { version = "0.1", default-features = false } sha2 = { version = "0.10", default-features = false } hex = { version = "0.4.3", default-features = false } @@ -51,7 +51,7 @@ std = [ "libsecp256k1/std", "log/std", "scale-info/std", - "serde", + "serde/std", "sp-api/std", "sp-application-crypto/std", "sp-consensus-babe/std", diff --git a/primitives/src/signature.rs b/primitives/src/signature.rs index 9ada23447..6756239ad 100644 --- a/primitives/src/signature.rs +++ b/primitives/src/signature.rs @@ -15,6 +15,7 @@ use codec::{alloc::string::ToString, Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; use sp_core::{ecdsa, H160}; use sp_io::hashing::{blake2_256, keccak_256}; use sp_std::vec::Vec; @@ -24,7 +25,6 @@ use sp_std::vec::Vec; )] pub struct AccountId20(pub [u8; 20]); -#[cfg(feature = "std")] impl_serde::impl_fixed_hash_serde!(AccountId20, 20); #[cfg(feature = "std")] @@ -92,8 +92,9 @@ impl std::str::FromStr for AccountId20 { } } -#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] -#[derive(Eq, PartialEq, Clone, Encode, Decode, sp_core::RuntimeDebug, TypeInfo)] +#[derive( + Eq, PartialEq, Clone, Encode, Decode, sp_core::RuntimeDebug, TypeInfo, Serialize, Deserialize, +)] pub struct EthereumSignature(pub ecdsa::Signature); impl From for EthereumSignature { diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 7d9df2b2a..ccc2ba6cb 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -55,7 +55,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkad # EVM support fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fp-self-contained = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-self-contained = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = ["serde"] } fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index 75e0e0d5a..9f78f741e 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -61,6 +61,7 @@ use crate::{ UncheckedExtrinsic, EVM, }; use doughnut_rs::Topping; +use frame_support::traits::tokens::{Fortitude, Preservation, Provenance}; use sp_runtime::traits::{Dispatchable, Saturating, UniqueSaturatedInto}; /// Constant factor for scaling CPAY to its smallest indivisible unit @@ -96,25 +97,38 @@ impl + Currency> Inspect>::minimum_balance() } + /// The total blance of `who` + fn total_balance(who: &AccountId) -> Self::Balance { + >::total_balance(who) + } + /// Get the balance of `who`. /// Scaled up so values match expectations of an 18dp asset fn balance(who: &AccountId) -> Self::Balance { - Self::reducible_balance(who, false) + Self::reducible_balance(who, Preservation::Expendable, Fortitude::Polite) } /// Get the maximum amount that `who` can withdraw/transfer successfully. /// Scaled up so values match expectations of an 18dp asset - /// keep_alive has been hardcoded to false to provide a similar experience to users coming - /// from Ethereum (Following POLA principles) - fn reducible_balance(who: &AccountId, _keep_alive: bool) -> Self::Balance { + /// preservation has been hardcoded to Preservation::Expendable to provide a similar experience + /// to users coming from Ethereum (Following POLA principles) + fn reducible_balance( + who: &AccountId, + preservation: Preservation, + force: Fortitude, + ) -> Self::Balance { // Careful for overflow! - let raw = C::reducible_balance(who, false); + let raw = C::reducible_balance(who, Preservation::Expendable, force); U256::from(raw).saturating_mul(U256::from(XRP_UNIT_VALUE)).saturated_into() } /// Returns `true` if the balance of `who` may be increased by `amount`. - fn can_deposit(who: &AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence { - C::can_deposit(who, amount, mint) + fn can_deposit( + who: &AccountId, + amount: Self::Balance, + provenance: Provenance, + ) -> DepositConsequence { + C::can_deposit(who, amount, provenance) } /// Returns `Failed` if the balance of `who` may not be decreased by `amount`, otherwise @@ -433,7 +447,10 @@ where pub struct HandleTxValidation>(PhantomData); impl> fp_evm::HandleTxValidation for HandleTxValidation { - fn with_balance_for(evm_config: &CheckEvmTransaction, who: &Account) -> Result<(), E> { + fn with_balance_for( + evm_config: &CheckEvmTransaction, + who: &fp_evm::Account, + ) -> Result<(), E> { let decoded_override_destination = H160::from_low_u64_be(FEE_PROXY_ADDRESS); // If we are not overriding with a fee preference, proceed with calculating a fee if evm_config.transaction.to != Some(decoded_override_destination) { diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 10e8b688c..fdfd13f77 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -31,7 +31,7 @@ use fp_rpc::TransactionStatus; use frame_election_provider_support::{generate_solution_type, onchain, SequentialPhragmen}; use pallet_dex::TradingPairStatus; use pallet_ethereum::{ - Call::transact, InvalidTransactionWrapper, Transaction as EthereumTransaction, + Call::transact, InvalidTransactionWrapper, PostLogContent, Transaction as EthereumTransaction, TransactionAction, }; use pallet_evm::{Account as EVMAccount, EnsureAddressNever, FeeCalculator, Runner as RunnerT}; @@ -39,7 +39,7 @@ use pallet_staking::RewardDestination; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use seed_pallet_common::MaintenanceCheck; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstU16, OpaqueMetadata, H160, H256, U256}; +use sp_core::{crypto::KeyTypeId, ConstU16, ConstU64, OpaqueMetadata, H160, H256, U256}; use sp_runtime::{ create_runtime_str, generic, traits::{ @@ -54,25 +54,27 @@ use sp_runtime::{ pub use sp_runtime::{impl_opaque_keys, traits::NumberFor, Perbill, Permill}; use sp_std::prelude::*; +use frame_support::traits::tokens::{Fortitude, Preservation}; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; +pub use sp_runtime::traits::Bounded; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. +use frame_support::traits::{AsEnsureOriginWithArg, EitherOf}; pub use frame_support::{ construct_runtime, dispatch::{DispatchClass, GetDispatchInfo}, ensure, parameter_types, traits::{ fungibles::{metadata::Inspect as InspectMetadata, Inspect}, - ConstU128, ConstU32, CurrencyToVote, Everything, Get, IsInVec, KeyOwnerProofSystem, - Randomness, + ConstU128, ConstU32, Everything, Get, IsInVec, KeyOwnerProofSystem, Randomness, }, weights::{ - constants::{ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + constants::{ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, ConstantMultiplier, IdentityFee, Weight, }, PalletId, StorageValue, @@ -80,7 +82,7 @@ pub use frame_support::{ use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, + EnsureRoot, EnsureSigned, }; pub use pallet_grandpa::AuthorityId as GrandpaId; use pallet_grandpa::{fg_primitives, AuthorityList as GrandpaAuthorityList}; @@ -92,6 +94,7 @@ pub use sp_runtime::BuildStorage; // Export for chain_specs #[cfg(feature = "std")] pub use pallet_staking::{Forcing, StakerStatus}; +use sp_runtime::traits::Scale; pub mod keys { pub use super::{BabeId, EthBridgeId, GrandpaId, ImOnlineId}; @@ -188,8 +191,10 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +//TODO - fix this /// We allow for 2 seconds of compute with a 4 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.div(2u64); +const MAXIMUM_BLOCK_WEIGHT: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), u64::MAX); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -268,10 +273,17 @@ parameter_types! { /// This value is currently only used by pallet-transaction-payment as an assertion that the /// next multiplier is always > min value. pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); + /// The maximum amount of the multiplier. + pub MaximumMultiplier: Multiplier = Bounded::max_value(); } -pub type SlowAdjustingFeeUpdate = - TargetedFeeAdjustment; +pub type SlowAdjustingFeeUpdate = TargetedFeeAdjustment< + R, + TargetBlockFullness, + AdjustmentVariable, + MinimumMultiplier, + MaximumMultiplier, +>; impl frame_system::Config for Runtime { /// The block type for the runtime. @@ -355,12 +367,16 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); + type DustRemoval = (); // TODO - update to TXFeepot? type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = weights::pallet_balances::WeightInfo; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = (); + type FreezeIdentifier = (); + type MaxHolds = (); + type MaxFreezes = (); } parameter_types! { @@ -393,7 +409,7 @@ impl pallet_assets::Config for Runtime { type AssetAccountDeposit = AssetAccountDeposit; type RemoveItemsLimit = ConstU32<100>; type AssetIdParameter = AssetId; - type CreateOrigin = (); + type CreateOrigin = AsEnsureOriginWithArg>; type CallbackHandle = (); pallet_assets::runtime_benchmarks_enabled! { type BenchmarkHelper = BenchmarkHelper; @@ -534,8 +550,7 @@ impl pallet_scheduler::Config for Runtime { type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; type WeightInfo = weights::pallet_scheduler::WeightInfo; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } parameter_types! { @@ -549,7 +564,6 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -574,7 +588,7 @@ impl pallet_multisig::Config for Runtime { type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; - type MaxSignatories = ConstU16<100>; + type MaxSignatories = ConstU32<100>; type WeightInfo = weights::pallet_multisig::WeightInfo; } @@ -658,30 +672,25 @@ impl pallet_timestamp::Config for Runtime { type WeightInfo = weights::pallet_timestamp::WeightInfo; } -parameter_types! { - pub const UncleGenerations: u32 = 0; - // More than enough before migration to new architecture - pub const MaxAuthorities: u32 = 4_096; -} impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type UncleGenerations = UncleGenerations; - type FilterUncle = (); type EventHandler = (Staking, ImOnline); } +parameter_types! { + // More than enough before migration to new architecture + pub const MaxAuthorities: u32 = 4_096; + // Equivocation constants. + pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); +} impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = (); - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = (); + type KeyOwnerProof = >::Proof; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxSetIdSessionEntries = ReportLongevity; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; } impl pallet_session::Config for Runtime { @@ -736,6 +745,9 @@ parameter_types! { /// ... and all of the validators as electable targets. Whilst this is the case, we cannot and /// shall not increase the size of the validator intentions. pub const MaxElectableTargets: u16 = u16::MAX; + /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet + /// cannot have active validators higher than this count. + pub const MaxActiveValidators: u32 = 1200; } generate_solution_type!( #[compact] @@ -752,7 +764,10 @@ impl onchain::Config for OnChainSeqPhragmen { type System = Runtime; type Solver = SequentialPhragmen; type DataProvider = Staking; - type WeightInfo = (); + type WeightInfo = (); // TODO - add proper weights here + type MaxWinners = MaxActiveValidators; + type VotersBound = MaxElectingVoters; + type TargetsBound = MaxElectableTargets; } parameter_types! { @@ -794,6 +809,8 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { pallet_election_provider_multi_phase::WeightInfo >::submit_unsigned(v, t, a, d) } + + type MaxWinners = MaxActiveValidators; } impl pallet_election_provider_multi_phase::Config for Runtime { @@ -819,8 +836,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type OffchainRepeat = OffchainRepeat; type MinerTxPriority = NposSolutionPriority; type DataProvider = Staking; - type Fallback = onchain::UnboundedExecution; - type GovernanceFallback = onchain::UnboundedExecution; + type Fallback = onchain::OnChainExecution; + type GovernanceFallback = onchain::OnChainExecution; type Solver = SequentialPhragmen< AccountId, pallet_election_provider_multi_phase::SolutionAccuracyOf, @@ -831,6 +848,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; type MaxElectingVoters = MaxElectingVoters; type MaxElectableTargets = MaxElectableTargets; + type MaxWinners = MaxActiveValidators; } parameter_types! { @@ -855,7 +873,7 @@ impl pallet_staking::Config for Runtime { type MaxNominations = MaxNominations; type Currency = Balances; type CurrencyBalance = Balance; - type CurrencyToVote = frame_support::traits::U128CurrencyToVote; + type CurrencyToVote = sp_staking::currency_to_vote::U128CurrencyToVote; // Decides the total reward to be distributed each era // For root network it is the balance of the tx fee pot type EraPayout = TxFeePot; @@ -877,21 +895,20 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - // A super-majority of the council can cancel the slash. - type SlashCancelOrigin = SlashCancelOrigin; + type AdminOrigin = EnsureRoot; // TODO - check if we want this to be something else type SessionInterface = Self; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; - type GenesisElectionProvider = onchain::UnboundedExecution; + type GenesisElectionProvider = onchain::OnChainExecution; type VoterList = VoterList; type TargetList = pallet_staking::UseValidatorsMap; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type BenchmarkingConfig = staking::StakingBenchmarkConfig; - type OnStakerSlash = (); type WeightInfo = weights::pallet_staking::WeightInfo; type HistoryDepth = frame_support::traits::ConstU32<84>; + type EventListeners = (); } impl pallet_offences::Config for Runtime { @@ -918,7 +935,6 @@ impl pallet_im_online::Config for Runtime { type WeightInfo = weights::pallet_im_online::WeightInfo; type MaxKeys = MaxKeys; type MaxPeerInHeartbeats = MaxPeerInHeartbeats; - type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize; } impl frame_system::offchain::SendTransactionTypes for Runtime @@ -935,32 +951,24 @@ parameter_types! { // Attempting to do so will brick block production. pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64; pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK; - pub const ReportLongevity: u64 = - BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); } impl pallet_babe::Config for Runtime { type EpochDuration = EpochDuration; type ExpectedBlockTime = ExpectedBlockTime; type EpochChangeTrigger = pallet_babe::ExternalTrigger; type DisabledValidators = Session; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = - pallet_babe::EquivocationHandler; + type KeyOwnerProof = + >::Proof; type MaxAuthorities = MaxAuthorities; type WeightInfo = (); + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; } impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = (); // TODO - set correct weights } impl pallet_tx_fee_pot::Config for Runtime { @@ -1066,7 +1074,7 @@ pub const GAS_PER_SECOND: u64 = 30_000_000; /// Approximate ratio of the amount of Weight per Gas. /// u64 works for approximations because Weight is a very small unit compared to gas. -pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND.div(GAS_PER_SECOND).ref_time(); +pub const WEIGHT_PER_GAS: u64 = WEIGHT_REF_TIME_PER_SECOND / GAS_PER_SECOND; pub struct FutureverseGasWeightMapping; @@ -1478,6 +1486,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { @@ -1547,6 +1563,12 @@ impl_runtime_apis! { ) -> pallet_transaction_payment::FeeDetails { TransactionPayment::query_fee_details(uxt, len) } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } } impl sp_consensus_babe::BabeApi for Runtime { @@ -1684,7 +1706,11 @@ impl_runtime_apis! { AccountId, > for Runtime { fn free_balance(asset_id: AssetId, who: AccountId, keep_alive: bool) -> String { - let bal = AssetsExt::reducible_balance(asset_id, &who, keep_alive); + let preservation = match keep_alive { + true => Preservation::Preserve, + false => Preservation::Expendable, + }; + let bal = AssetsExt::reducible_balance(asset_id, &who, preservation, Fortitude::Polite); alloc::format!("{}", bal) } } @@ -1710,7 +1736,7 @@ impl_runtime_apis! { } fn account_code_at(address: H160) -> Vec { - EVM::account_codes(address) + pallet_evm::AccountCodes::::get(address) } fn author() -> H160 { @@ -1720,7 +1746,7 @@ impl_runtime_apis! { fn storage_at(address: H160, index: U256) -> H256 { let mut tmp = [0u8; 32]; index.to_big_endian(&mut tmp); - EVM::account_storages(address, H256::from_slice(&tmp[..])) + pallet_evm::AccountStorages::::get(address, H256::from_slice(&tmp[..])) } fn call( @@ -1801,15 +1827,15 @@ impl_runtime_apis! { } fn current_transaction_statuses() -> Option> { - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentTransactionStatuses::::get() } fn current_block() -> Option { - Ethereum::current_block() + pallet_ethereum::CurrentBlock::::get() } fn current_receipts() -> Option> { - Ethereum::current_receipts() + pallet_ethereum::CurrentReceipts::::get() } fn current_all() -> ( @@ -1818,9 +1844,9 @@ impl_runtime_apis! { Option> ) { ( - Ethereum::current_block(), - Ethereum::current_receipts(), - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentReceipts::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get(), ) } @@ -1837,6 +1863,24 @@ impl_runtime_apis! { // We currently do not use or set elasticity; always return zero Some(Permill::zero()) } + + fn gas_limit_multiplier_support() {} + + fn pending_block( + xts: Vec<::Extrinsic> + ) -> ( + Option, Option> + ) { + for ext in xts.into_iter() { + let _ = Executive::apply_extrinsic(ext); + } + + // Ethereum::on_finalize(System::block_number() + 1); // TODO - check if we can enable this or remove it completely + ( + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() + ) + } } impl fg_primitives::GrandpaApi for Runtime { @@ -2012,7 +2056,8 @@ fn transaction_asset_check( >>::reducible_balance( payment_asset_id, &::AccountId::from(*source), - false, + Preservation::Expendable, + Fortitude::Polite, ); ensure!( amounts_in[0] <= user_asset_balance, diff --git a/runtime/src/migrations/crowdsale.rs b/runtime/src/migrations/crowdsale.rs index b1173a9e6..cf51b3c01 100644 --- a/runtime/src/migrations/crowdsale.rs +++ b/runtime/src/migrations/crowdsale.rs @@ -64,6 +64,7 @@ pub mod v1 { sp_runtime::RuntimeDebug, storage_alias, weights::Weight, BoundedVec, StorageHasher, Twox64Concat, }; + use frame_system::pallet_prelude::BlockNumberFor; use pallet_crowdsale::{ types::{SaleId, SaleInformation, SaleStatus}, SaleInfo, SaleParticipation, @@ -72,7 +73,7 @@ pub mod v1 { use seed_primitives::{AssetId, Balance, CollectionUuid}; type AccountId = ::AccountId; - type BlockNumber = ::BlockNumber; + type BlockNumber = BlockNumberFor; /// Information about a fixed price listing #[derive(Clone, Copy, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] diff --git a/runtime/src/migrations/futurepass.rs b/runtime/src/migrations/futurepass.rs index 32f39344c..6396d6ad9 100644 --- a/runtime/src/migrations/futurepass.rs +++ b/runtime/src/migrations/futurepass.rs @@ -64,11 +64,12 @@ pub mod v1 { sp_runtime::RuntimeDebug, storage_alias, traits::IsType, weights::Weight, BoundedVec, StorageHasher, Twox64Concat, }; + use frame_system::pallet_prelude::BlockNumberFor; use scale_info::TypeInfo; use seed_primitives::{AssetId, Balance, CollectionUuid}; type AccountId = ::AccountId; - type BlockNumber = ::BlockNumber; + type BlockNumber = BlockNumberFor; #[cfg(feature = "try-runtime")] pub fn pre_upgrade() -> Result<(), &'static str> { @@ -107,7 +108,7 @@ pub mod v1 { log::info!(target: "Migration", "Futurepass: successfully killed MigrationAdmin storage item"); - Weight::from_ref_time(1u64) + Weight::from_parts(1u64, 0u64) } #[cfg(test)] diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index 61db528ac..3c284f989 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -50,6 +50,11 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + + fn set_code() -> Weight { + todo!() + } + // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { diff --git a/runtime/src/weights/pallet_assets.rs b/runtime/src/weights/pallet_assets.rs index 1a61859cc..f1b5137de 100644 --- a/runtime/src/weights/pallet_assets.rs +++ b/runtime/src/weights/pallet_assets.rs @@ -44,27 +44,6 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:5002 w:5001) - // Storage: System Account (r:5000 w:5000) - // Storage: Assets Metadata (r:1 w:0) - // Storage: Assets Approvals (r:501 w:500) - /// The range of component `c` is `[0, 5000]`. - /// The range of component `s` is `[0, 5000]`. - /// The range of component `a` is `[0, 500]`. - fn destroy(c: u32, s: u32, _a: u32, ) -> Weight { - Weight::from_all(182_474_283_000 as u64) - // Standard Error: 333_416 - .saturating_add(Weight::from_all(19_004_318 as u64).saturating_mul(c as u64)) - // Standard Error: 333_416 - .saturating_add(Weight::from_all(28_796_262 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(10505 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(10502 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { Weight::from_all(100_217_000 as u64) @@ -215,4 +194,44 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + + fn start_destroy() -> Weight { + todo!() + } + + fn destroy_accounts(c: u32) -> Weight { + todo!() + } + + fn destroy_approvals(a: u32) -> Weight { + todo!() + } + + fn finish_destroy() -> Weight { + todo!() + } + + fn set_min_balance() -> Weight { + todo!() + } + + fn touch() -> Weight { + todo!() + } + + fn touch_other() -> Weight { + todo!() + } + + fn refund() -> Weight { + todo!() + } + + fn refund_other() -> Weight { + todo!() + } + + fn block() -> Weight { + todo!() + } } diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index 28652f1f0..d829ef15e 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -31,30 +31,12 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - // Storage: System Account (r:1 w:1) - fn transfer() -> Weight { - Weight::from_all(95_263_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { Weight::from_all(86_834_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: System Account (r:1 w:1) - fn set_balance_creating() -> Weight { - Weight::from_all(64_293_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: System Account (r:1 w:1) - fn set_balance_killing() -> Weight { - Weight::from_all(71_988_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { Weight::from_all(94_704_000 as u64) @@ -73,4 +55,20 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + + fn transfer_allow_death() -> Weight { + todo!() + } + + fn force_set_balance_creating() -> Weight { + todo!() + } + + fn force_set_balance_killing() -> Weight { + todo!() + } + + fn upgrade_accounts(u: u32) -> Weight { + todo!() + } } diff --git a/runtime/src/weights/pallet_crowdsale.rs b/runtime/src/weights/pallet_crowdsale.rs index 34faa3a05..fba3ab933 100644 --- a/runtime/src/weights/pallet_crowdsale.rs +++ b/runtime/src/weights/pallet_crowdsale.rs @@ -104,7 +104,7 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Storage: MaintenanceMode BlockedCalls (r:1 w:0) // Storage: MaintenanceMode BlockedPallets (r:1 w:0) fn proxy_vault_call() -> Weight { - Weight::from_ref_time(90_026_000 as u64) + Weight::from_all(90_026_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: Crowdsale SaleInfo (r:1 w:1) diff --git a/runtime/src/weights/pallet_erc20_peg.rs b/runtime/src/weights/pallet_erc20_peg.rs index 614b381f6..b86fb8706 100644 --- a/runtime/src/weights/pallet_erc20_peg.rs +++ b/runtime/src/weights/pallet_erc20_peg.rs @@ -43,12 +43,12 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { } // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) fn activate_deposits_delay() -> Weight { - Weight::from_ref_time(37_003_000 as u64) + Weight::from_all(37_003_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) fn activate_withdrawals_delay() -> Weight { - Weight::from_ref_time(36_122_000 as u64) + Weight::from_all(36_122_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index 3337d0565..375b017c0 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -38,12 +38,12 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Storage: ImOnline Keys (r:1 w:0) /// The range of component `k` is `[1, 1000]`. /// The range of component `e` is `[1, 100]`. - fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { + fn validate_unsigned_and_then_heartbeat(k: u32,) -> Weight { Weight::from_all(259_324_000 as u64) // Standard Error: 571 .saturating_add(Weight::from_all(28_460 as u64).saturating_mul(k as u64)) // Standard Error: 5_721 - .saturating_add(Weight::from_all(501_673 as u64).saturating_mul(e as u64)) + // .saturating_add(Weight::from_all(501_673 as u64).saturating_mul(e as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 1c5e25c64..531d54448 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -51,20 +51,6 @@ impl pallet_multisig::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - Weight::from_all(121_460_000 as u64) - // Standard Error: 2_349 - .saturating_add(Weight::from_all(88_289 as u64).saturating_mul(s as u64)) - // Standard Error: 23 - .saturating_add(Weight::from_all(2_197 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Multisig Multisigs (r:1 w:1) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { @@ -78,19 +64,6 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - Weight::from_all(119_095_000 as u64) - // Standard Error: 1_700 - .saturating_add(Weight::from_all(75_042 as u64).saturating_mul(s as u64)) - // Standard Error: 17 - .saturating_add(Weight::from_all(2_045 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. @@ -125,17 +98,6 @@ impl pallet_multisig::WeightInfo for WeightInfo { } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_complete(s: u32, ) -> Weight { - Weight::from_all(146_785_000 as u64) - // Standard Error: 1_622 - .saturating_add(Weight::from_all(274_156 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { Weight::from_all(124_026_000 as u64) diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index c82e6078f..7bc44b7e3 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -31,127 +31,38 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - Weight::from_all(97_039_000 as u64) - // Standard Error: 36_233 - .saturating_add(Weight::from_all(46_935_636 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(s as u64))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_resolved(s: u32, ) -> Weight { - Weight::from_all(85_657_000 as u64) - // Standard Error: 31_134 - .saturating_add(Weight::from_all(37_300_713 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(s as u64))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - Weight::from_all(86_779_000 as u64) - // Standard Error: 32_688 - .saturating_add(Weight::from_all(38_924_364 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(s as u64))) + fn service_agendas_base() -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_resolved(s: u32, ) -> Weight { - Weight::from_all(81_839_000 as u64) - // Standard Error: 26_631 - .saturating_add(Weight::from_all(34_023_234 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64))) + + fn service_agenda_base(s: u32) -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_aborted(s: u32, ) -> Weight { - Weight::from_all(41_718_000 as u64) - // Standard Error: 9_923 - .saturating_add(Weight::from_all(12_359_648 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + + fn service_task_base() -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_aborted(s: u32, ) -> Weight { - Weight::from_all(32_279_000 as u64) - // Standard Error: 4_860 - .saturating_add(Weight::from_all(5_935_860 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + + fn service_task_fetched(s: u32) -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named(s: u32, ) -> Weight { - Weight::from_all(65_878_000 as u64) - // Standard Error: 14_004 - .saturating_add(Weight::from_all(22_226_424 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64))) + + fn service_task_named() -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:2 w:2) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic(s: u32, ) -> Weight { - Weight::from_all(56_353_000 as u64) - // Standard Error: 8_363 - .saturating_add(Weight::from_all(14_815_877 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + + fn service_task_periodic() -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named(s: u32, ) -> Weight { - Weight::from_all(54_443_000 as u64) - // Standard Error: 6_685 - .saturating_add(Weight::from_all(13_564_076 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + + fn execute_dispatch_signed() -> Weight { + todo!() } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize(s: u32, ) -> Weight { - Weight::from_all(51_457_000 as u64) - // Standard Error: 4_597 - .saturating_add(Weight::from_all(10_751_635 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + + fn execute_dispatch_unsigned() -> Weight { + todo!() } + // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn schedule(s: u32, ) -> Weight { diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index 5ddb94119..6008a5f6f 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -350,7 +350,7 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. /// The range of component `s` is `[1, 20]`. - fn get_npos_voters(v: u32, n: u32, _s: u32, ) -> Weight { + fn get_npos_voters(v: u32, n: u32) -> Weight { Weight::from_all(52_897_035_000 as u64) // Standard Error: 412_068 .saturating_add(Weight::from_all(11_532_618 as u64).saturating_mul(v as u64)) @@ -414,4 +414,8 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + + fn set_min_commission() -> Weight { + todo!() + } } From 516449356faaade52d3cee956b334f6ea1528191 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:13:32 +1200 Subject: [PATCH 038/112] client fixes so far --- Cargo.lock | 2 +- client/Cargo.toml | 3 +- client/src/chain_spec.rs | 11 ++- client/src/command.rs | 6 +- client/src/rpc.rs | 4 +- client/src/service.rs | 203 ++++++++++++++++++++++---------------- ethy-gadget/src/lib.rs | 6 +- ethy-gadget/src/worker.rs | 1 + 8 files changed, 135 insertions(+), 101 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe68b0ffa..a4cfc6930 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8986,7 +8986,7 @@ dependencies = [ "futures", "hex", "hex-literal 0.3.4", - "jsonrpsee 0.15.1", + "jsonrpsee 0.16.3", "libsecp256k1 0.6.0", "log", "pallet-assets-ext-rpc", diff --git a/client/Cargo.toml b/client/Cargo.toml index 9cd2aefa8..1e84a9b48 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -52,6 +52,7 @@ sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polka sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , branch = "polkadot-v1.0.0" } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Frontier fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } @@ -64,7 +65,7 @@ fp-rpc = { default-features = false, git = "https://github.com/futureversecom/fr fp-storage = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } # These dependencies are used for the node template's RPCs -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/client/src/chain_spec.rs b/client/src/chain_spec.rs index 5ebf6e1eb..ee910ed38 100644 --- a/client/src/chain_spec.rs +++ b/client/src/chain_spec.rs @@ -173,8 +173,13 @@ fn testnet_genesis( system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), + ..Default::default() + }, + babe: BabeConfig { + authorities: vec![], + epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() }, - babe: BabeConfig { authorities: vec![], epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG) }, balances: BalancesConfig { balances: endowed_balances }, // babe & grandpa initialization handled by session // otherwise causes: Thread 'main' panicked at 'Authorities are already initialized!' @@ -217,8 +222,8 @@ fn testnet_genesis( // Assign network admin rights. key: Some(root_key), }, - ethereum: seed_runtime::EthereumConfig {}, - evm: seed_runtime::EVMConfig { accounts: Default::default() }, + ethereum: seed_runtime::EthereumConfig { ..Default::default() }, + evm: seed_runtime::EVMConfig { accounts: Default::default(), ..Default::default() }, xrpl_bridge: XRPLBridgeConfig { xrp_relayers }, } } diff --git a/client/src/command.rs b/client/src/command.rs index cd10ba1e3..03dfe5e5a 100644 --- a/client/src/command.rs +++ b/client/src/command.rs @@ -57,10 +57,6 @@ impl SubstrateCli for Cli { Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), }) } - - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - &seed_runtime::VERSION - } } /// Parse and run command line arguments @@ -115,7 +111,7 @@ pub fn run() -> sc_cli::Result<()> { let PartialComponents { client, task_manager, backend, .. } = service::new_partial(&config, &cli)?; let aux_revert = Box::new(|client, _, blocks| { - sc_finality_grandpa::revert(client, blocks)?; + sc_consensus_grandpa::revert(client, blocks)?; Ok(()) }); Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 34dd6ebaa..c8142bec0 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -28,7 +28,7 @@ use sc_client_api::{ client::BlockchainEvents, }; use sc_consensus_epochs::SharedEpochChanges; -use sc_finality_grandpa::{ +use sc_consensus_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; use sc_network::NetworkService; @@ -189,7 +189,7 @@ where use pallet_sft_rpc::{Sft, SftApiServer}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; - use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; + use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; let mut io = RpcModule::new(()); diff --git a/client/src/service.rs b/client/src/service.rs index 2d92e2d52..02696bbcb 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -19,17 +19,22 @@ use futures::{future, StreamExt}; use fc_consensus::FrontierBlockImport; use fc_db::Backend as FrontierBackend; -use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; +use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; use fc_rpc::{EthTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; use sc_cli::SubstrateCli; -use sc_client_api::{Backend, BlockBackend, BlockchainEvents}; +use sc_client_api::{ + AuxStore, Backend, BlockBackend, BlockchainEvents, StateBackend, StorageProvider, +}; use sc_consensus_babe::{self, SlotProportion}; +use sc_consensus_grandpa::SharedVoterState; pub use sc_executor::NativeElseWasmExecutor; -use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; -use sc_service::{error::Error as ServiceError, BasePath, Configuration, TaskManager}; +use sc_service::{ + error::Error as ServiceError, BasePath, Configuration, TaskManager, WarpSyncParams, +}; use sc_telemetry::{Telemetry, TelemetryWorker}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_runtime::offchain::OffchainStorage; use std::{ @@ -39,8 +44,12 @@ use std::{ time::Duration, }; +use fc_db::{kv::DatabaseSettings, DatabaseSource}; use seed_primitives::{ethy::ETH_HTTP_URI, opaque::Block, XRP_HTTP_URI}; use seed_runtime::{self, RuntimeApi}; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_runtime::traits::BlakeTwo256; use crate::cli::Cli; @@ -70,7 +79,7 @@ type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; /// Grandpa block import handler type FullGrandpaBlockImport = - sc_finality_grandpa::GrandpaBlockImport; + sc_consensus_grandpa::GrandpaBlockImport; /// BABE block import handler (wraps `FullGrandpaBlockImport`) type FullBabeBlockImport = sc_consensus_babe::BabeBlockImport; @@ -78,19 +87,46 @@ type FullBabeBlockImport = type SeedBlockImport = FrontierBlockImport; pub type ImportSetup = ( SeedBlockImport, - sc_finality_grandpa::LinkHalf, + sc_consensus_grandpa::LinkHalf, sc_consensus_babe::BabeLink, ); -pub(crate) fn db_config_dir(config: &Configuration) -> PathBuf { - config - .base_path - .as_ref() - .map(|base_path| base_path.config_dir(config.chain_spec.id())) - .unwrap_or_else(|| { - BasePath::from_project("", "", &Cli::executable_name()) - .config_dir(config.chain_spec.id()) - }) +pub fn frontier_database_dir(config: &Configuration, path: &str) -> std::path::PathBuf { + config.base_path.config_dir(config.chain_spec.id()).join("frontier").join(path) +} + +pub fn open_frontier_backend( + client: Arc, + config: &Configuration, +) -> Result>, String> +where + C: ProvideRuntimeApi + StorageProvider + AuxStore, + C: HeaderBackend + HeaderMetadata, + C: Send + Sync + 'static, + C::Api: fp_rpc::EthereumRuntimeRPCApi, + BE: Backend + 'static, + BE::State: StateBackend, +{ + Ok(Arc::new(fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( + client, + &fc_db::kv::DatabaseSettings { + source: match config.database { + DatabaseSource::RocksDb { .. } => DatabaseSource::RocksDb { + path: frontier_database_dir(config, "db"), + cache_size: 0, + }, + DatabaseSource::ParityDb { .. } => + DatabaseSource::ParityDb { path: frontier_database_dir(config, "paritydb") }, + DatabaseSource::Auto { .. } => DatabaseSource::Auto { + rocksdb_path: frontier_database_dir(config, "db"), + paritydb_path: frontier_database_dir(config, "paritydb"), + cache_size: 0, + }, + _ => + return Err("Supported db sources: `rocksdb` | `paritydb` | `auto`".to_string()), + }, + }, + )?))) } pub fn new_partial( @@ -113,10 +149,6 @@ pub fn new_partial( >, ServiceError, > { - if config.keystore_remote.is_some() { - return Err(ServiceError::Other("Remote Keystores are not supported.".into())) - } - let telemetry = config .telemetry_endpoints .clone() @@ -157,17 +189,13 @@ pub fn new_partial( client.clone(), ); - let frontier_backend = Arc::new(FrontierBackend::open( - Arc::clone(&client), - &config.database, - &db_config_dir(config), - )?); + let frontier_backend = open_frontier_backend(client.clone(), config)?; let filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); let fee_history_cache_limit: FeeHistoryCacheLimit = cli.run.fee_history_limit; - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), &(client.clone() as Arc<_>), select_chain.clone(), @@ -180,35 +208,33 @@ pub fn new_partial( client.clone(), )?; - let frontier_block_import = FrontierBlockImport::new( - babe_block_import.clone(), - client.clone(), - frontier_backend.clone(), - ); + let frontier_block_import = FrontierBlockImport::new(babe_block_import.clone(), client.clone()); let slot_duration = babe_link.config().slot_duration(); - let import_queue = sc_consensus_babe::import_queue( - babe_link.clone(), - frontier_block_import.clone(), - Some(Box::new(grandpa_block_import)), - client.clone(), - select_chain.clone(), - move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + let (import_queue, babe_worker_handle) = + sc_consensus_babe::import_queue(sc_consensus_babe::ImportQueueParams { + link: babe_link.clone(), + block_import: frontier_block_import.clone(), + justification_import: Some(Box::new(grandpa_block_import)), + client: client.clone(), + select_chain: select_chain.clone(), + create_inherent_data_providers: move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); - Ok((slot, timestamp)) - }, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|x| x.handle()), - )?; + Ok((slot, timestamp)) + }, + spawner: &task_manager.spawn_essential_handle(), + registry: config.prometheus_registry(), + telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), + })?; let import_setup = (frontier_block_import, grandpa_link, babe_link); @@ -276,57 +302,62 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result keystore_container.set_remote_keystore(k), - Err(e) => - return Err(ServiceError::Other(format!( - "Error hooking up remote keystore for {}: {}", - url, e - ))), - }; - } + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); - let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( + // register grandpa p2p protocol + let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), &config.chain_spec, ); + net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( + grandpa_protocol_name.clone(), + )); - // register grandpa p2p protocol - config - .network - .extra_sets - .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); - let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + // register ethy p2p protocol + // TODO - add a command line option to toggle ethy p2p + let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); + let ethy_protocol_name = ethy_gadget::protocol_standard_name(&genesis_hash, &config.chain_spec); + net_config + .add_notification_protocol(ethy_gadget::ethy_peers_set_config(ethy_protocol_name.clone())); + + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), import_setup.1.shared_authority_set().clone(), Vec::default(), )); - let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); - let ethy_protocol_name = ethy_gadget::protocol_standard_name(&genesis_hash, &config.chain_spec); - config - .network - .extra_sets - .push(ethy_gadget::ethy_peers_set_config(ethy_protocol_name.clone())); - let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), import_queue, block_announce_validator_builder: None, - warp_sync: Some(warp_sync), + warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), })?; if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), + use futures::FutureExt; + + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + is_validator: config.role.is_authority(), + enable_http_requests: true, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -368,11 +399,11 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result(ethy_params), + ethy_gadget::start_ethy_gadget::<_, _, _, _, _, _>(ethy_params), ); - let grandpa_config = sc_finality_grandpa::Config { + let grandpa_config = sc_consensus_grandpa::Config { gossip_duration: Duration::from_millis(333), justification_period: 512, name: Some(name), @@ -535,12 +566,12 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result, R: ProvideRuntimeApi, R::Api: EthyApi, - N: GossipNetwork + Clone + SyncOracle + Send + 'static, + N: GossipNetwork + Clone + Send + 'static, S: Syncing + Send + Clone + 'static, { /// ETHY client @@ -156,7 +156,7 @@ where C: Client, R: ProvideRuntimeApi, R::Api: EthyApi, - N: GossipNetwork + Clone + SyncOracle + Sync + Send + 'static, + N: GossipNetwork + Clone + Sync + Send + 'static, S: Syncing + Send + Clone + 'static, { let EthyParams { @@ -172,7 +172,7 @@ where _phantom: std::marker::PhantomData, } = ethy_params; - let sync_oracle = network.clone(); + let sync_oracle = sync_service.clone(); let gossip_validator = Arc::new(gossip::GossipValidator::new(Default::default())); let gossip_engine = GossipEngine::new(network, sync_service, protocol_name, gossip_validator.clone(), None); diff --git a/ethy-gadget/src/worker.rs b/ethy-gadget/src/worker.rs index fb9ea4ef1..7a4209c12 100644 --- a/ethy-gadget/src/worker.rs +++ b/ethy-gadget/src/worker.rs @@ -66,6 +66,7 @@ where R: ProvideRuntimeApi, R::Api: EthyApi, C: Client, + SO: SyncOracle + Send + Sync + Clone + 'static, { client: Arc, backend: Arc, From 4e0aa10115427ba9942fd1bc2eef7ded544c4134 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:41:06 +1200 Subject: [PATCH 039/112] Fix ethy gadget syncing service build failures. --- Cargo.lock | 361 ++++++++++++++++++++++++++++++++++++++++- ethy-gadget/src/lib.rs | 6 +- 2 files changed, 357 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4cfc6930..469ab572e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,6 +113,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -354,6 +360,25 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-write-file" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf54d4588732bdfc5ebc3eb9f74f20e027112fc31de412fc7ff0cd1c6896dae" +dependencies = [ + "nix 0.28.0", + "rand 0.8.5", +] + [[package]] name = "atty" version = "0.2.14" @@ -1156,13 +1181,28 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.3.2" @@ -1191,6 +1231,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1522,6 +1571,12 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "doughnut-rs" version = "0.2.2" @@ -1661,6 +1716,9 @@ name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -2137,16 +2195,26 @@ version = "2.0.0-dev" source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "async-trait", + "ethereum 0.14.0", + "fc-storage", + "fp-consensus", + "fp-rpc", "fp-storage", + "futures", "log", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", + "sc-client-api", "sc-client-db", + "sp-api", "sp-blockchain", "sp-core", "sp-database", "sp-runtime", + "sp-storage", + "sqlx", + "tokio", ] [[package]] @@ -2167,7 +2235,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", + "sp-core", "sp-runtime", + "tokio", ] [[package]] @@ -2369,12 +2439,38 @@ dependencies = [ "num-traits", ] +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "fork-tree" version = "3.0.0" @@ -2536,7 +2632,7 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", @@ -2691,7 +2787,7 @@ dependencies = [ "derive-syn-parse", "expander", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", @@ -2844,6 +2940,17 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot 0.12.1", +] + [[package]] name = "futures-io" version = "0.3.30" @@ -3125,6 +3232,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.6", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.3", ] [[package]] @@ -3132,6 +3249,9 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "hermit-abi" @@ -3549,6 +3669,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -4422,6 +4551,17 @@ dependencies = [ "libsecp256k1-core 0.3.0", ] +[[package]] +name = "libsqlite3-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "libz-sys" version = "1.1.15" @@ -4862,6 +5002,24 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -4939,6 +5097,18 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5159,12 +5329,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "os_str_bytes" version = "6.6.1" @@ -6977,7 +7185,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -7166,7 +7374,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -7187,7 +7395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -7617,7 +7825,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix", + "nix 0.24.3", "thiserror", "tokio", ] @@ -9008,6 +9216,7 @@ dependencies = [ "sc-executor", "sc-keystore", "sc-network", + "sc-network-sync", "sc-offchain", "sc-rpc", "sc-rpc-api", @@ -10187,6 +10396,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spinners" @@ -10209,6 +10421,129 @@ dependencies = [ "der", ] +[[package]] +name = "sqlformat" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +dependencies = [ + "itertools 0.12.1", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +dependencies = [ + "ahash 0.8.6", + "atoi", + "byteorder", + "bytes", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener 2.5.3", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap 2.2.2", + "log", + "memchr", + "native-tls", + "once_cell", + "paste", + "percent-encoding", + "serde", + "sha2 0.10.8", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +dependencies = [ + "atomic-write-file", + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "sqlx-core", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", +] + [[package]] name = "ss58-registry" version = "1.46.0" @@ -11189,6 +11524,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "universal-hash" version = "0.5.1" @@ -11234,6 +11575,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8parse" version = "0.2.1" diff --git a/ethy-gadget/src/lib.rs b/ethy-gadget/src/lib.rs index 54f4ec577..f5440c150 100644 --- a/ethy-gadget/src/lib.rs +++ b/ethy-gadget/src/lib.rs @@ -31,7 +31,7 @@ use prometheus::Registry; use sc_client_api::{Backend, BlockchainEvents, Finalizer}; use sc_network::ProtocolName; -use sc_network_gossip::{GossipEngine, Network as GossipNetwork, Syncing}; +use sc_network_gossip::{GossipEngine, Network as GossipNetwork, Syncing as GossipSyncing}; use seed_primitives::ethy::EthyApi; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; @@ -123,7 +123,7 @@ where R: ProvideRuntimeApi, R::Api: EthyApi, N: GossipNetwork + Clone + Send + 'static, - S: Syncing + Send + Clone + 'static, + S: GossipSyncing + SyncOracle + Send + Clone + 'static, { /// ETHY client pub client: Arc, @@ -157,7 +157,7 @@ where R: ProvideRuntimeApi, R::Api: EthyApi, N: GossipNetwork + Clone + Sync + Send + 'static, - S: Syncing + Send + Clone + 'static, + S: GossipSyncing + SyncOracle + Send + Clone + 'static, { let EthyParams { client, From 116130b79b5e452a71a3723e0ae0bed18ba5f39e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:41:58 +1200 Subject: [PATCH 040/112] Fix frontier essential task spawning build errors. --- client/Cargo.toml | 3 +- client/src/service.rs | 71 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 1e84a9b48..b8e0921aa 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -28,6 +28,7 @@ libsecp256k1 = { version = "0.6.0" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } @@ -57,7 +58,7 @@ sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polka # Frontier fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fc-db = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fc-mapping-sync = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fc-mapping-sync = { default-features = false, features = ["sql"], git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = [ "rpc-binary-search-estimate" ] } fc-rpc-core = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } fp-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } diff --git a/client/src/service.rs b/client/src/service.rs index 02696bbcb..b5967bec0 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -45,6 +45,7 @@ use std::{ }; use fc_db::{kv::DatabaseSettings, DatabaseSource}; +use sc_network_sync::SyncingService; use seed_primitives::{ethy::ETH_HTTP_URI, opaque::Block, XRP_HTTP_URI}; use seed_runtime::{self, RuntimeApi}; use sp_api::ProvideRuntimeApi; @@ -457,6 +458,10 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result, + > = Default::default(); + spawn_frontier_tasks( &task_manager, client.clone(), @@ -466,6 +471,8 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result>, fee_history_cache: FeeHistoryCache, fee_history_cache_limit: FeeHistoryCacheLimit, + sync_service: Arc>, + pubsub_notification_sinks: Arc< + fc_mapping_sync::EthereumBlockNotificationSinks< + fc_mapping_sync::EthereumBlockNotification, + >, + >, ) { - task_manager.spawn_essential_handle().spawn( - "frontier-mapping-sync-worker", - None, - MappingSyncWorker::new( - client.import_notification_stream(), - Duration::new(seed_runtime::constants::MILLISECS_PER_BLOCK / 1_000, 0), - client.clone(), - backend, - frontier_backend.clone(), - 3, - 0, - SyncStrategy::Normal, - ) - .for_each(|()| future::ready(())), - ); + // Maps emulated ethereum data to substrate native data. + match *frontier_backend { + fc_db::Backend::KeyValue(b) => { + task_manager.spawn_essential_handle().spawn( + "frontier-mapping-sync-worker", + None, + MappingSyncWorker::new( + client.import_notification_stream(), + Duration::new(seed_runtime::constants::MILLISECS_PER_BLOCK / 1_000, 0), + client.clone(), + backend, + overrides.clone(), + Arc::new(b), + 3, + 0, + SyncStrategy::Normal, + sync_service, + pubsub_notification_sinks, + ) + .for_each(|()| future::ready(())), + ); + }, + fc_db::Backend::Sql(b) => { + task_manager.spawn_essential_handle().spawn_blocking( + "frontier-mapping-sync-worker", + None, + fc_mapping_sync::sql::SyncWorker::run( + client.clone(), + backend, + Arc::new(b), + client.import_notification_stream(), + fc_mapping_sync::sql::SyncWorkerConfig { + read_notification_timeout: Duration::from_secs(10), + check_indexed_blocks_interval: Duration::from_secs(60), + }, + SyncStrategy::Normal, + sync_service, + pubsub_notification_sinks, + ), + ); + }, + } // Spawn Frontier EthFilterApi maintenance task. if let Some(filter_pool) = filter_pool { From 18f415e65e4b2cdb11e8fef5bf0077c258473b47 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 2 May 2024 20:35:12 +1200 Subject: [PATCH 041/112] Fix service --- client/src/service.rs | 53 +++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/client/src/service.rs b/client/src/service.rs index b5967bec0..74a3115de 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -45,6 +45,7 @@ use std::{ }; use fc_db::{kv::DatabaseSettings, DatabaseSource}; +use sc_consensus_babe::BabeWorkerHandle; use sc_network_sync::SyncingService; use seed_primitives::{ethy::ETH_HTTP_URI, opaque::Block, XRP_HTTP_URI}; use seed_runtime::{self, RuntimeApi}; @@ -99,7 +100,7 @@ pub fn frontier_database_dir(config: &Configuration, path: &str) -> std::path::P pub fn open_frontier_backend( client: Arc, config: &Configuration, -) -> Result>, String> +) -> Result, String> where C: ProvideRuntimeApi + StorageProvider + AuxStore, C: HeaderBackend + HeaderMetadata, @@ -108,7 +109,7 @@ where BE: Backend + 'static, BE::State: StateBackend, { - Ok(Arc::new(fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( + Ok(fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( client, &fc_db::kv::DatabaseSettings { source: match config.database { @@ -127,7 +128,7 @@ where return Err("Supported db sources: `rocksdb` | `paritydb` | `auto`".to_string()), }, }, - )?))) + )?)) } pub fn new_partial( @@ -143,9 +144,10 @@ pub fn new_partial( ( Option, ImportSetup, - Arc>, + FrontierBackend, Option, (FeeHistoryCache, FeeHistoryCacheLimit), + BabeWorkerHandle, ), >, ServiceError, @@ -253,6 +255,7 @@ pub fn new_partial( frontier_backend, filter_pool, (fee_history_cache, fee_history_cache_limit), + babe_worker_handle, ), }) } @@ -281,6 +284,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result, + > = Default::default(); + let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); + let (event_proof_sender, event_proof_stream) = ethy_gadget::notification::EthyEventProofStream::channel(); let (block_import, grandpa_link, babe_link) = import_setup; let rpc_extensions_builder = { let client = client.clone(); + let backend = backend.clone(); let pool = transaction_pool.clone(); let select_chain = select_chain.clone(); let keystore = keystore_container.keystore(); @@ -397,6 +407,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result Arc::new(b), + fc_db::Backend::Sql(b) => Arc::new(b), + }, block_data_cache: block_data_cache.clone(), client: client.clone(), fee_history_cache: fee_history_cache.clone(), @@ -423,8 +438,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result Result, - > = Default::default(); - spawn_frontier_tasks( &task_manager, client.clone(), backend.clone(), - frontier_backend, + frontier_backend.clone(), filter_pool, overrides, fee_history_cache, fee_history_cache_limit, sync_service.clone(), - Arc::new(pubsub_notification_sinks), + pubsub_notification_sinks.clone(), ); if role.is_authority() { let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), client.clone(), - transaction_pool, + transaction_pool.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), ); @@ -602,7 +621,7 @@ fn spawn_frontier_tasks( task_manager: &TaskManager, client: Arc, backend: Arc, - frontier_backend: Arc>, + frontier_backend: FrontierBackend, filter_pool: Option, overrides: Arc>, fee_history_cache: FeeHistoryCache, @@ -615,7 +634,7 @@ fn spawn_frontier_tasks( >, ) { // Maps emulated ethereum data to substrate native data. - match *frontier_backend { + match frontier_backend { fc_db::Backend::KeyValue(b) => { task_manager.spawn_essential_handle().spawn( "frontier-mapping-sync-worker", From c9ffb278e4822b05fa3afe1b886c2b089ee64cf0 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 2 May 2024 20:35:52 +1200 Subject: [PATCH 042/112] Fix RPC --- Cargo.lock | 241 +++++-------------------------- client/src/rpc.rs | 74 +++++++--- ethy-gadget/rpc/Cargo.toml | 2 +- ethy-gadget/rpc/src/lib.rs | 6 +- pallet/assets-ext/rpc/Cargo.toml | 2 +- pallet/assets-ext/rpc/src/lib.rs | 3 +- pallet/dex/rpc/Cargo.toml | 2 +- pallet/dex/rpc/src/lib.rs | 3 +- pallet/nft/rpc/Cargo.toml | 2 +- pallet/nft/rpc/src/lib.rs | 3 +- pallet/sft/rpc/Cargo.toml | 2 +- pallet/sft/rpc/src/lib.rs | 3 +- 12 files changed, 106 insertions(+), 237 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 469ab572e..217057a51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -872,23 +872,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.4.18" @@ -896,7 +879,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive", ] [[package]] @@ -907,23 +890,10 @@ checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", + "clap_lex", "strsim", ] -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "clap_derive" version = "4.4.7" @@ -936,15 +906,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "0.6.0" @@ -1978,7 +1939,7 @@ version = "0.1.0" dependencies = [ "ethy-gadget", "futures", - "jsonrpsee 0.15.1", + "jsonrpsee", "libsecp256k1 0.6.0", "log", "parity-scale-codec", @@ -2258,7 +2219,7 @@ dependencies = [ "fp-storage", "futures", "hex", - "jsonrpsee 0.16.3", + "jsonrpsee", "libsecp256k1 0.7.1", "log", "pallet-evm", @@ -2302,7 +2263,7 @@ source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0- dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", - "jsonrpsee 0.16.3", + "jsonrpsee", "rustc-hex", "serde", "serde_json", @@ -2625,7 +2586,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.4.18", + "clap", "comfy-table", "frame-benchmarking", "frame-support", @@ -2730,7 +2691,7 @@ dependencies = [ "async-recursion", "futures", "indicatif", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "serde", @@ -3702,31 +3663,17 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonrpsee" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" -dependencies = [ - "jsonrpsee-core 0.15.1", - "jsonrpsee-http-server", - "jsonrpsee-proc-macros 0.15.1", - "jsonrpsee-types 0.15.1", - "jsonrpsee-ws-server", - "tracing", -] - [[package]] name = "jsonrpsee" version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "jsonrpsee-core 0.16.3", + "jsonrpsee-core", "jsonrpsee-http-client", - "jsonrpsee-proc-macros 0.16.3", + "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types 0.16.3", + "jsonrpsee-types", "jsonrpsee-ws-client", "tracing", ] @@ -3739,8 +3686,8 @@ checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", @@ -3752,35 +3699,6 @@ dependencies = [ "webpki-roots 0.25.4", ] -[[package]] -name = "jsonrpsee-core" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" -dependencies = [ - "anyhow", - "arrayvec 0.7.4", - "async-trait", - "beef", - "futures-channel", - "futures-util", - "globset", - "http", - "hyper", - "jsonrpsee-types 0.15.1", - "lazy_static", - "parking_lot 0.12.1", - "rand 0.8.5", - "rustc-hash", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tracing", - "unicase", -] - [[package]] name = "jsonrpsee-core" version = "0.16.3" @@ -3797,7 +3715,7 @@ dependencies = [ "futures-util", "globset", "hyper", - "jsonrpsee-types 0.16.3", + "jsonrpsee-types", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3818,8 +3736,8 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", + "jsonrpsee-types", "rustc-hash", "serde", "serde_json", @@ -3828,36 +3746,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" -dependencies = [ - "futures-channel", - "futures-util", - "hyper", - "jsonrpsee-core 0.15.1", - "jsonrpsee-types 0.15.1", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "jsonrpsee-proc-macros" version = "0.16.3" @@ -3881,8 +3769,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", + "jsonrpsee-types", "serde", "serde_json", "soketto", @@ -3893,20 +3781,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-types" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] - [[package]] name = "jsonrpsee-types" version = "0.16.3" @@ -3929,28 +3803,8 @@ checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", -] - -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "jsonrpsee-core 0.15.1", - "jsonrpsee-types 0.15.1", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-futures", + "jsonrpsee-core", + "jsonrpsee-types", ] [[package]] @@ -5373,12 +5227,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -5421,7 +5269,7 @@ dependencies = [ name = "pallet-assets-ext-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee 0.15.1", + "jsonrpsee", "pallet-assets-ext", "pallet-assets-ext-rpc-runtime-api", "parity-scale-codec", @@ -5584,7 +5432,7 @@ name = "pallet-dex-rpc" version = "0.0.1" dependencies = [ "frame-system", - "jsonrpsee 0.15.1", + "jsonrpsee", "pallet-dex", "pallet-dex-rpc-runtime-api", "seed-primitives", @@ -6310,7 +6158,7 @@ dependencies = [ name = "pallet-nft-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee 0.15.1", + "jsonrpsee", "pallet-nft", "pallet-nft-rpc-runtime-api", "parity-scale-codec", @@ -6503,7 +6351,7 @@ dependencies = [ name = "pallet-sft-rpc" version = "2.2.0" dependencies = [ - "jsonrpsee 0.15.1", + "jsonrpsee", "pallet-sft", "pallet-sft-rpc-runtime-api", "parity-scale-codec", @@ -6641,7 +6489,7 @@ name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "jsonrpsee 0.16.3", + "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -8085,7 +7933,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "array-bytes", "chrono", - "clap 4.4.18", + "clap", "fdlimit", "futures", "libp2p-identity", @@ -8265,7 +8113,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", - "jsonrpsee 0.16.3", + "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", @@ -8342,7 +8190,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "finality-grandpa", "futures", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "sc-client-api", @@ -8708,7 +8556,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8738,7 +8586,7 @@ name = "sc-rpc-api" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "jsonrpsee 0.16.3", + "jsonrpsee", "parity-scale-codec", "sc-chain-spec", "sc-transaction-pool-api", @@ -8758,7 +8606,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "http", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", @@ -8776,7 +8624,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8803,7 +8651,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9176,7 +9024,7 @@ dependencies = [ name = "seed-client" version = "5.0.0" dependencies = [ - "clap 3.2.25", + "clap", "ethy-gadget", "ethy-gadget-rpc", "fc-consensus", @@ -9194,7 +9042,7 @@ dependencies = [ "futures", "hex", "hex-literal 0.3.4", - "jsonrpsee 0.16.3", + "jsonrpsee", "libsecp256k1 0.6.0", "log", "pallet-assets-ext-rpc", @@ -10671,7 +10519,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948 dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", @@ -10701,7 +10549,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "jsonrpsee 0.16.3", + "jsonrpsee", "log", "sc-rpc-api", "serde", @@ -10911,12 +10759,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.56" @@ -11405,7 +11247,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "clap 4.4.18", + "clap", "frame-remote-externalities", "hex", "log", @@ -11476,15 +11318,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" diff --git a/client/src/rpc.rs b/client/src/rpc.rs index c8142bec0..baaae66e1 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -19,10 +19,12 @@ //! capabilities that are specific to this project's runtime configuration. #![warn(missing_docs)] -use std::sync::Arc; + +use std::{collections::BTreeMap, sync::Arc}; use jsonrpsee::RpcModule; // Substrate +use core::time::Duration; use sc_client_api::{ backend::{AuxStore, Backend, StateBackend, StorageProvider}, client::BlockchainEvents, @@ -36,18 +38,25 @@ use sc_rpc::SubscriptionTaskExecutor; use sc_rpc_api::DenyUnsafe; use sc_service::TransactionPool; use sc_transaction_pool::{ChainApi, Pool}; -use sp_api::ProvideRuntimeApi; +use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::{ Backend as BlockchainBackend, Error as BlockChainError, HeaderBackend, HeaderMetadata, }; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; +use sp_inherents::{InherentData, InherentDataProvider}; use sp_keystore::KeystorePtr; use sp_runtime::traits::BlakeTwo256; + // Frontier -use fc_rpc::{EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride}; +use fc_rpc::{ + pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle, + RuntimeApiStorageOverride, +}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; +use sc_network_sync::SyncingService; +use sp_core::H256; // Runtime use ethy_gadget::notification::EthyEventProofStream; @@ -65,10 +74,8 @@ pub struct EthyDeps { /// Extra dependencies for BABE. pub struct BabeDeps { - /// BABE protocol config. - pub babe_config: sc_consensus_babe::BabeConfiguration, - /// BABE pending epoch changes. - pub shared_epoch_changes: SharedEpochChanges, + /// A handle to the BABE worker for issuing requests. + pub babe_worker_handle: sc_consensus_babe::BabeWorkerHandle, /// The keystore that manages the keys of the node. pub keystore: KeystorePtr, } @@ -105,8 +112,10 @@ pub struct FullDeps { pub network: Arc>, /// EthFilterApi pool. pub filter_pool: Option, + /// Frontier Backend. + pub frontier_backend: Arc + Send + Sync>, /// Backend. - pub backend: Arc>, + pub backend: Arc, /// Maximum number of logs in a query. pub max_past_logs: u32, /// Fee history cache. @@ -123,6 +132,10 @@ pub struct FullDeps { pub babe: BabeDeps, /// GRANDPA specific dependencies. pub grandpa: GrandpaDeps, + /// Chain syncing service + pub syncing_service: Arc>, + /// Mandated parent hashes for a given block hash. + pub eth_forced_parent_hashes: Option>, } pub fn overrides_handle(client: Arc) -> Arc> @@ -155,6 +168,12 @@ where pub fn create_full( deps: FullDeps, subscription_task_executor: SubscriptionTaskExecutor, + pubsub_notification_sinks: Arc< + fc_mapping_sync::EthereumBlockNotificationSinks< + fc_mapping_sync::EthereumBlockNotification, + >, + >, + pending_consenus_data_provider: Box>, ) -> Result, Box> where A: ChainApi + 'static, @@ -165,6 +184,7 @@ where C: BlockchainEvents, C: HeaderBackend + HeaderMetadata, C: Send + Sync + 'static, + C: CallApiAt, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BabeApi, C::Api: BlockBuilder, @@ -202,6 +222,7 @@ where deny_unsafe, network, filter_pool, + frontier_backend, backend, max_past_logs, fee_history_cache, @@ -211,9 +232,12 @@ where ethy, babe, grandpa, + syncing_service, + eth_forced_parent_hashes, } = deps; - let BabeDeps { keystore, babe_config, shared_epoch_changes } = babe; + // let BabeDeps { keystore, babe_config, shared_epoch_changes } = babe; + let BabeDeps { babe_worker_handle, keystore } = babe; let GrandpaDeps { shared_voter_state, shared_authority_set, @@ -235,15 +259,8 @@ where .into_rpc(), )?; io.merge( - Babe::new( - client.clone(), - shared_epoch_changes.clone(), - keystore, - babe_config, - select_chain, - deny_unsafe, - ) - .into_rpc(), + Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain, deny_unsafe) + .into_rpc(), )?; io.merge( Grandpa::new( @@ -262,22 +279,31 @@ where io.merge(Sft::new(client.clone()).into_rpc())?; io.merge(AssetsExt::new(client.clone()).into_rpc())?; + // NOTE - check + let pending_create_inherent_data_providers = move |_, _| async move { + let idp = sp_timestamp::InherentDataProvider::from_system_time(); + Ok(idp) + }; + // Ethereum compatible RPCs io.merge( Eth::new( client.clone(), pool.clone(), - graph, + graph.clone(), Some(seed_runtime::TransactionConverter), - network.clone(), + syncing_service.clone(), Default::default(), // signers overrides.clone(), - backend.clone(), + frontier_backend.clone(), is_authority, block_data_cache.clone(), fee_history_cache, fee_history_cache_limit, 10, + eth_forced_parent_hashes, + pending_create_inherent_data_providers, + Some(pending_consenus_data_provider), ) .into_rpc(), )?; @@ -286,7 +312,8 @@ where io.merge( EthFilter::new( client.clone(), - backend, + frontier_backend, + graph.clone(), filter_pool, 500_usize, // max stored filters max_past_logs, @@ -300,9 +327,10 @@ where EthPubSub::new( pool, client.clone(), - network.clone(), + syncing_service.clone(), subscription_task_executor, overrides, + pubsub_notification_sinks, ) .into_rpc(), )?; diff --git a/ethy-gadget/rpc/Cargo.toml b/ethy-gadget/rpc/Cargo.toml index affeb7770..804a14425 100644 --- a/ethy-gadget/rpc/Cargo.toml +++ b/ethy-gadget/rpc/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", features = ["derive"] } futures = { version = "0.3.24" } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } libsecp256k1 = { version = "0.6.0" } log = "0.4" serde = { version = "1.0.131", features = ["derive"] } diff --git a/ethy-gadget/rpc/src/lib.rs b/ethy-gadget/rpc/src/lib.rs index b5bdbd23d..48fe7c5be 100644 --- a/ethy-gadget/rpc/src/lib.rs +++ b/ethy-gadget/rpc/src/lib.rs @@ -20,7 +20,10 @@ use codec::Decode; use futures::{FutureExt, StreamExt}; use jsonrpsee::{ - core::RpcResult, proc_macros::rpc, types::SubscriptionEmptyError, SubscriptionSink, + core::{async_trait, RpcResult}, + proc_macros::rpc, + types::SubscriptionEmptyError, + SubscriptionSink, }; use log::warn; use sc_client_api::backend::AuxStore; @@ -98,6 +101,7 @@ where } } +#[async_trait] impl EthyApiServer for EthyRpcHandler where B: Block, diff --git a/pallet/assets-ext/rpc/Cargo.toml b/pallet/assets-ext/rpc/Cargo.toml index 861506776..06f85c0f5 100644 --- a/pallet/assets-ext/rpc/Cargo.toml +++ b/pallet/assets-ext/rpc/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallet/assets-ext/rpc/src/lib.rs b/pallet/assets-ext/rpc/src/lib.rs index 8aeab5f94..3dc29fa63 100644 --- a/pallet/assets-ext/rpc/src/lib.rs +++ b/pallet/assets-ext/rpc/src/lib.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use codec::Codec; use jsonrpsee::{ - core::{Error as RpcError, RpcResult}, + core::{async_trait, Error as RpcError, RpcResult}, proc_macros::rpc, }; use sp_api::ProvideRuntimeApi; @@ -53,6 +53,7 @@ impl AssetsExt { } } +#[async_trait] impl AssetsExtApiServer for AssetsExt where Block: BlockT, diff --git a/pallet/dex/rpc/Cargo.toml b/pallet/dex/rpc/Cargo.toml index 2290b4004..c8d74b6c0 100644 --- a/pallet/dex/rpc/Cargo.toml +++ b/pallet/dex/rpc/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" [dependencies] -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } serde_json = "1.0.64" sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallet/dex/rpc/src/lib.rs b/pallet/dex/rpc/src/lib.rs index d26571a06..abd142a34 100644 --- a/pallet/dex/rpc/src/lib.rs +++ b/pallet/dex/rpc/src/lib.rs @@ -17,7 +17,7 @@ use std::sync::Arc; use jsonrpsee::{ - core::{Error as RpcError, RpcResult}, + core::{async_trait, Error as RpcError, RpcResult}, proc_macros::rpc, }; use pallet_dex::{types::WrappedBalance, Config, TradingPairStatus}; @@ -93,6 +93,7 @@ where } } +#[async_trait] impl DexApiServer for Dex where Block: BlockT, diff --git a/pallet/nft/rpc/Cargo.toml b/pallet/nft/rpc/Cargo.toml index dd33a5c33..7afae80b6 100644 --- a/pallet/nft/rpc/Cargo.toml +++ b/pallet/nft/rpc/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallet/nft/rpc/src/lib.rs b/pallet/nft/rpc/src/lib.rs index 0f82bbd1b..df3251a32 100644 --- a/pallet/nft/rpc/src/lib.rs +++ b/pallet/nft/rpc/src/lib.rs @@ -19,7 +19,7 @@ use std::sync::Arc; use codec::Codec; use jsonrpsee::{ - core::{Error as RpcError, RpcResult}, + core::{async_trait, Error as RpcError, RpcResult}, proc_macros::rpc, }; use pallet_nft::Config; @@ -59,6 +59,7 @@ impl Nft { } } +#[async_trait] impl NftApiServer for Nft where Block: BlockT, diff --git a/pallet/sft/rpc/Cargo.toml b/pallet/sft/rpc/Cargo.toml index f0f950df1..915230e19 100644 --- a/pallet/sft/rpc/Cargo.toml +++ b/pallet/sft/rpc/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } diff --git a/pallet/sft/rpc/src/lib.rs b/pallet/sft/rpc/src/lib.rs index 8a186cac7..4c5148c36 100644 --- a/pallet/sft/rpc/src/lib.rs +++ b/pallet/sft/rpc/src/lib.rs @@ -14,7 +14,7 @@ use std::sync::Arc; use jsonrpsee::{ - core::{Error as RpcError, RpcResult}, + core::{async_trait, Error as RpcError, RpcResult}, proc_macros::rpc, }; use pallet_sft::Config; @@ -45,6 +45,7 @@ impl Sft { } } +#[async_trait] impl SftApiServer for Sft where Block: BlockT, From 9ecf4e6b522488cc072e8eb0f180b13e619d9ea7 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 2 May 2024 20:36:19 +1200 Subject: [PATCH 043/112] Fix cli, command --- client/Cargo.toml | 2 +- client/src/benchmarking.rs | 3 +-- client/src/cli.rs | 11 +++-------- client/src/command.rs | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index b8e0921aa..a9980c7e3 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -19,7 +19,7 @@ path = "src/main.rs" [dependencies] futures = "0.3.25" -clap = { version = "3.2.22", features = ["derive"] } +clap = { version = "4.0.9", features = ["derive"] } url = "2.3.1" hex-literal = "0.3.4" hex = "0.4" diff --git a/client/src/benchmarking.rs b/client/src/benchmarking.rs index 9d43c7558..1bcbfc431 100644 --- a/client/src/benchmarking.rs +++ b/client/src/benchmarking.rs @@ -178,8 +178,7 @@ pub fn inherent_benchmark_data() -> Result { let d = Duration::from_millis(0); let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); - timestamp - .provide_inherent_data(&mut inherent_data) + futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data)) .map_err(|e| format!("creating inherent data: {:?}", e))?; Ok(inherent_data) } diff --git a/client/src/cli.rs b/client/src/cli.rs index fcd6d0fe8..2d6622729 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -32,17 +32,12 @@ pub struct RunCmd { pub fee_history_limit: u64, /// Ethereum JSON-RPC client endpoint - #[clap( - parse(try_from_str = parse_uri), - long = "eth-http", - )] + #[clap(long = "eth-http")] pub eth_http: Option, /// XRP JSON-RPC client endpoint - #[clap( - parse(try_from_str = parse_uri), - long = "xrp-http", - )] + // NOTE - check flags works as expected. + #[clap(long = "xrp-http")] pub xrp_http: Option, } diff --git a/client/src/command.rs b/client/src/command.rs index 03dfe5e5a..1a011b6a9 100644 --- a/client/src/command.rs +++ b/client/src/command.rs @@ -140,7 +140,7 @@ pub fn run() -> sc_cli::Result<()> { ) } - cmd.run::(config) + cmd.run::(config) }, BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = service::new_partial(&config, &cli)?; From 731a65c5d4765fdc09c8fe950f1110789a30f7da Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 6 May 2024 14:00:09 +1200 Subject: [PATCH 044/112] Update pending_create_inherent_data_providers. --- client/src/rpc.rs | 37 +++++++++++++++++++++++++++++-------- client/src/service.rs | 1 + 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/client/src/rpc.rs b/client/src/rpc.rs index baaae66e1..a936f3253 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -45,7 +45,6 @@ use sp_blockchain::{ }; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; -use sp_inherents::{InherentData, InherentDataProvider}; use sp_keystore::KeystorePtr; use sp_runtime::traits::BlakeTwo256; @@ -57,6 +56,7 @@ use fc_rpc::{ use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; use sc_network_sync::SyncingService; use sp_core::H256; +use sp_transaction_storage_proof::IndexedBody; // Runtime use ethy_gadget::notification::EthyEventProofStream; @@ -74,6 +74,8 @@ pub struct EthyDeps { /// Extra dependencies for BABE. pub struct BabeDeps { + /// BABE protocol config. + pub babe_config: sc_consensus_babe::BabeConfiguration, /// A handle to the BABE worker for issuing requests. pub babe_worker_handle: sc_consensus_babe::BabeWorkerHandle, /// The keystore that manages the keys of the node. @@ -185,6 +187,7 @@ where C: HeaderBackend + HeaderMetadata, C: Send + Sync + 'static, C: CallApiAt, + C: IndexedBody, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BabeApi, C::Api: BlockBuilder, @@ -237,7 +240,31 @@ where } = deps; // let BabeDeps { keystore, babe_config, shared_epoch_changes } = babe; - let BabeDeps { babe_worker_handle, keystore } = babe; + let BabeDeps { babe_config, babe_worker_handle, keystore } = babe; + + let client_clone = client.clone(); + let slot_duration = babe_config.slot_duration(); + + let pending_create_inherent_data_providers = move |parent, _| { + let client_clone = client_clone.clone(); + async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + let storage_proof = sp_transaction_storage_proof::registration::new_data_provider( + &*client_clone.clone(), + &parent, + )?; + + Ok((slot, timestamp, storage_proof)) + } + }; + let GrandpaDeps { shared_voter_state, shared_authority_set, @@ -279,12 +306,6 @@ where io.merge(Sft::new(client.clone()).into_rpc())?; io.merge(AssetsExt::new(client.clone()).into_rpc())?; - // NOTE - check - let pending_create_inherent_data_providers = move |_, _| async move { - let idp = sp_timestamp::InherentDataProvider::from_system_time(); - Ok(idp) - }; - // Ethereum compatible RPCs io.merge( Eth::new( diff --git a/client/src/service.rs b/client/src/service.rs index 74a3115de..1baac202d 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -438,6 +438,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Date: Mon, 6 May 2024 18:30:04 +1200 Subject: [PATCH 045/112] Update pending_consensus_data_provider with BABE --- Cargo.lock | 1 + client/Cargo.toml | 1 + client/src/consensus_data_providers.rs | 46 ++++++++++++++++++++++++++ client/src/main.rs | 1 + client/src/rpc.rs | 5 +-- client/src/service.rs | 7 ++-- 6 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 client/src/consensus_data_providers.rs diff --git a/Cargo.lock b/Cargo.lock index 217057a51..d7090d149 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9089,6 +9089,7 @@ dependencies = [ "sp-transaction-storage-proof", "substrate-build-script-utils", "substrate-frame-rpc-system", + "thiserror", "try-runtime-cli", "url", ] diff --git a/client/Cargo.toml b/client/Cargo.toml index a9980c7e3..e339f96ac 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -24,6 +24,7 @@ url = "2.3.1" hex-literal = "0.3.4" hex = "0.4" libsecp256k1 = { version = "0.6.0" } +thiserror = "1.0" sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/client/src/consensus_data_providers.rs b/client/src/consensus_data_providers.rs new file mode 100644 index 000000000..dd9dc9790 --- /dev/null +++ b/client/src/consensus_data_providers.rs @@ -0,0 +1,46 @@ +use fc_rpc::pending::ConsensusDataProvider; +use sc_consensus_babe::{CompatibleDigestItem, PreDigest, SecondaryPlainPreDigest}; +use sp_consensus_babe::inherents::BabeInherentData; +use sp_runtime::{traits::Block as BlockT, DigestItem}; + +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("BABE inherent data missing")] + MissingInherent, +} + +impl From for sp_inherents::Error { + fn from(err: Error) -> Self { + sp_inherents::Error::Application(Box::new(err)) + } +} + +pub struct BabeConsensusDataProvider {} + +impl BabeConsensusDataProvider { + pub fn new() -> Self { + Self {} + } +} + +impl ConsensusDataProvider for BabeConsensusDataProvider +where + B: BlockT, +{ + fn create_digest( + &self, + _parent: &::Header, + data: &sp_inherents::InherentData, + ) -> Result { + let slot = data + .babe_inherent_data()? + .ok_or(sp_inherents::Error::Application(Box::new(Error::MissingInherent)))?; + + let predigest = + PreDigest::SecondaryPlain(SecondaryPlainPreDigest { slot, authority_index: 0 }); + + let logs = vec![::babe_pre_digest(predigest)]; + + Ok(sp_runtime::Digest { logs }) + } +} diff --git a/client/src/main.rs b/client/src/main.rs index 484173b99..2e72a352d 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -22,6 +22,7 @@ mod service; mod benchmarking; mod cli; mod command; +mod consensus_data_providers; mod custom_commands; mod rpc; diff --git a/client/src/rpc.rs b/client/src/rpc.rs index a936f3253..aaa939dc9 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -175,7 +175,7 @@ pub fn create_full( fc_mapping_sync::EthereumBlockNotification, >, >, - pending_consenus_data_provider: Box>, + pending_consensus_data_provider: Box>, ) -> Result, Box> where A: ChainApi + 'static, @@ -256,6 +256,7 @@ where slot_duration, ); + // NOTE - check if we can remove this let storage_proof = sp_transaction_storage_proof::registration::new_data_provider( &*client_clone.clone(), &parent, @@ -324,7 +325,7 @@ where 10, eth_forced_parent_hashes, pending_create_inherent_data_providers, - Some(pending_consenus_data_provider), + Some(pending_consensus_data_provider), ) .into_rpc(), )?; diff --git a/client/src/service.rs b/client/src/service.rs index 1baac202d..e8504815d 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -53,7 +53,7 @@ use sp_api::ProvideRuntimeApi; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_runtime::traits::BlakeTwo256; -use crate::cli::Cli; +use crate::{cli::Cli, consensus_data_providers::BabeConsensusDataProvider}; // Our native executor instance. pub struct ExecutorDispatch; @@ -454,14 +454,14 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result Result Date: Tue, 7 May 2024 16:40:34 +1200 Subject: [PATCH 046/112] Fix RunCmd nested use. --- client/src/cli.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/cli.rs b/client/src/cli.rs index 2d6622729..dc307bc34 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -18,6 +18,7 @@ use sc_cli::{Error, Result}; #[allow(missing_docs)] #[derive(Debug, clap::Parser)] +#[group(skip)] pub struct RunCmd { #[allow(missing_docs)] #[clap(flatten)] @@ -53,6 +54,7 @@ pub struct Cli { #[clap(subcommand)] pub subcommand: Option, + #[allow(missing_docs)] #[clap(flatten)] pub run: RunCmd, } From 13332bf14eaa4e4a7bb743ad689761498600217b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 8 May 2024 12:50:14 +1200 Subject: [PATCH 047/112] Update MaxSetIdSessionEntries --- client/src/service.rs | 1 + runtime/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/service.rs b/client/src/service.rs index e8504815d..4a4821527 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -109,6 +109,7 @@ where BE: Backend + 'static, BE::State: StateBackend, { + // TODO - take cli arg for frontier-backend-type and create accordingly. Ok(fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( client, &fc_db::kv::DatabaseSettings { diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index fdfd13f77..fbbf1599a 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -682,13 +682,14 @@ parameter_types! { pub const MaxAuthorities: u32 = 4_096; // Equivocation constants. pub const ReportLongevity: u64 = BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); + pub const MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; type KeyOwnerProof = >::Proof; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxSetIdSessionEntries = ReportLongevity; + type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type EquivocationReportSystem = pallet_grandpa::EquivocationReportSystem; } From ba5da1f6f3ef2a8475d0d8aaa270be050d28885f Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 8 May 2024 13:45:08 +1200 Subject: [PATCH 048/112] Update pending_block runtime api --- runtime/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index fbbf1599a..8417b02c0 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -64,7 +64,6 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. -use frame_support::traits::{AsEnsureOriginWithArg, EitherOf}; pub use frame_support::{ construct_runtime, dispatch::{DispatchClass, GetDispatchInfo}, @@ -79,6 +78,10 @@ pub use frame_support::{ }, PalletId, StorageValue, }; +use frame_support::{ + pallet_prelude::Hooks, + traits::{AsEnsureOriginWithArg, EitherOf}, +}; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -896,7 +899,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EnsureRoot; // TODO - check if we want this to be something else + type AdminOrigin = EnsureRoot; // Keeping this as root for now. type SessionInterface = Self; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; @@ -1876,7 +1879,7 @@ impl_runtime_apis! { let _ = Executive::apply_extrinsic(ext); } - // Ethereum::on_finalize(System::block_number() + 1); // TODO - check if we can enable this or remove it completely + Ethereum::on_finalize(System::block_number() + 1); ( pallet_ethereum::CurrentBlock::::get(), pallet_ethereum::CurrentTransactionStatuses::::get() From 32a0966a0f9bad0d1dd4209fd624a1cf960d3e25 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 8 May 2024 16:57:00 +1200 Subject: [PATCH 049/112] Add rocksdb to default flags --- Cargo.lock | 2 ++ client/Cargo.toml | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7090d149..a93310675 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2162,12 +2162,14 @@ dependencies = [ "fp-rpc", "fp-storage", "futures", + "kvdb-rocksdb", "log", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-client-db", + "smallvec", "sp-api", "sp-blockchain", "sp-core", diff --git a/client/Cargo.toml b/client/Cargo.toml index e339f96ac..83fd941c5 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -79,7 +79,7 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrat # These dependencies are used for runtime benchmarking frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", features = ["default", "rocksdb"] } # Local Dependencies ethy-gadget = { path = "../ethy-gadget" } @@ -104,7 +104,8 @@ try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [features] -default = [] +default = ["rocksdb"] +rocksdb = ["fc-db/rocksdb"] runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks", "sc-service/runtime-benchmarks"] # Enable features that allow the runtime to be tried and debugged. Name might be subject to change # in the near future. From 2d0bdac5ac06a2c4167de527dc0cf74766c47e2c Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 9 May 2024 13:19:57 +1200 Subject: [PATCH 050/112] Fix ethy-gadget testing. --- Cargo.lock | 1 + ethy-gadget/Cargo.toml | 1 + ethy-gadget/src/tests.rs | 4 ++++ ethy-gadget/src/worker.rs | 50 +++++++++++++++++++-------------------- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a93310675..a4750ff6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1908,6 +1908,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-network-test", "sc-service", "sc-utils", diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index 5139df87e..993c4d054 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -20,6 +20,7 @@ sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "pol sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } diff --git a/ethy-gadget/src/tests.rs b/ethy-gadget/src/tests.rs index 04325fd32..d75c9d015 100644 --- a/ethy-gadget/src/tests.rs +++ b/ethy-gadget/src/tests.rs @@ -128,6 +128,10 @@ impl TestNetFactory for EthyTestNet { &self.peers } + fn peers_mut(&mut self) -> &mut Vec { + &mut self.peers + } + fn mut_peers)>(&mut self, closure: F) { closure(&mut self.peers); } diff --git a/ethy-gadget/src/worker.rs b/ethy-gadget/src/worker.rs index 7a4209c12..bc5b08ed5 100644 --- a/ethy-gadget/src/worker.rs +++ b/ethy-gadget/src/worker.rs @@ -505,10 +505,10 @@ pub(crate) mod test { }, witness_record::test::create_witness, }; - use sc_client_api::AuxStore; - use sc_network::NetworkService; + use sc_client_api::{AuxStore, FinalizeSummary, UnpinHandle}; + use sc_network_sync::service::chain_sync::SyncingService; use sc_network_test::{PeersFullClient, TestNetFactory}; - use sc_utils::notification::NotificationStream; + use sc_utils::{mpsc::tracing_unbounded, notification::NotificationStream}; use seed_primitives::ethy::{crypto::AuthorityId, EthyChainId, ValidatorSet}; use sp_api::HeaderT; use substrate_test_runtime_client::{ @@ -519,13 +519,7 @@ pub(crate) mod test { fn get_proof( event_id: EventProofId, chain_id: EthyChainId, - worker: &EthyWorker< - Block, - PeersFullClient, - Backend, - TestApi, - Arc>, - >, + worker: &EthyWorker>>, ) -> Option { if let Ok(maybe_encoded_proof) = worker.client.get_aux( [ @@ -551,14 +545,19 @@ pub(crate) mod test { peer: &EthyPeer, key: &Keyring, validators: Vec, - ) -> EthyWorker>> { + ) -> EthyWorker>> { let keystore = create_ethy_keystore(*key); let api = Arc::new(TestApi {}); let network = peer.network_service().clone(); - let sync_oracle = network.clone(); + let sync_oracle = peer.sync_service().clone(); let gossip_validator = Arc::new(crate::gossip::GossipValidator::new(validators)); - let gossip_engine = - GossipEngine::new(network, ETHY_PROTOCOL_NAME, gossip_validator.clone(), None); + let gossip_engine = GossipEngine::new( + network, + sync_oracle.clone(), + ETHY_PROTOCOL_NAME, + gossip_validator.clone(), + None, + ); let (sender, _receiver) = NotificationStream::<_, EthyEventProofTracingKey>::channel(); let worker_params = crate::worker::WorkerParams { @@ -575,8 +574,8 @@ pub(crate) mod test { EthyWorker::<_, _, _, _, _>::new(worker_params) } - #[test] - fn handle_witness_works() { + #[tokio::test] + async fn handle_witness_works() { let keys = &[Keyring::Alice, Keyring::Bob]; let validators = make_ethy_ids(keys); let mut net = EthyTestNet::new(1, 0); @@ -616,8 +615,8 @@ pub(crate) mod test { assert_eq!(proof.unwrap().event_id, event_id); } - #[test] - fn handle_witness_first_two_events() { + #[tokio::test] + async fn handle_witness_first_two_events() { let keys = &[Keyring::Alice, Keyring::Bob]; let validators = make_ethy_ids(keys); let mut net = EthyTestNet::new(1, 0); @@ -725,8 +724,8 @@ pub(crate) mod test { assert_eq!(extracted, Some(validator_set)); } - #[test] - fn extract_validators_from_the_runtime_and_not_from_header() { + #[tokio::test] + async fn extract_validators_from_the_runtime_and_not_from_header() { let keys = &[Keyring::Alice, Keyring::Bob]; let runtime_validators = make_ethy_ids(keys); let header_validators = make_ethy_ids(&[Keyring::Alice, Keyring::Bob, Keyring::Charlie]); @@ -746,13 +745,14 @@ pub(crate) mod test { ETHY_ENGINE_ID, ConsensusLog::::AuthoritiesChange(header_validator_set.clone()).encode(), )); - let finality_notification = FinalityNotification { - hash: Default::default(), + let (sink, _stream) = tracing_unbounded("test_sink", 100_000); + let summary = FinalizeSummary { header: header.clone(), - // these fields are unused by ethy - tree_route: Arc::new([]), - stale_heads: Arc::new([]), + finalized: vec![header.hash()], + stale_heads: vec![], }; + let finality_notification = FinalityNotification::from_summary(summary, sink); + worker.handle_finality_notification(finality_notification); // stored validator set should be extracted from runtime. not from the block header. i.e From 8fc704eb482d6b3113a379647210009c578d495f Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Fri, 10 May 2024 17:00:27 +1200 Subject: [PATCH 051/112] Feat/substrate v1.0.0 Fix Tests (#836) * Fix AssetsExt tests * Fix Crowdsale tests * Fix Dex tests * Fix Doughnut tests * Fix Erc20-Peg tests * Fix Evm Chain Id tests * Fix FeeControl tests * Fix FeeProxy tests * Fix MaintenanceMode tests * Fix Marketplace tests * Fix NFT tests * Fix SFT tests * Fix VTXDistribution tests * Fix XLS20 tests * Fix XRPLBridge tests * Fix Echo tests * Fix Futurepass tests * Fix Ethy tests * Update cargo.toml files to support benchmarking tests * Fix benchmark tests * Fix assets Config * Update Futurepass tests * Fix further test build errors * Fix runtime and client tests * Add ignore flags for pallet-xrpl failing tests * Fix fund_authorities_and_accounts test * Fix multiplier_can_grow_from_zero test * Add assetsExt fix * Move AssetsExt fix to EVMCurrencyScaler * try-runtime back again. * Fix last test * Fix some warnings * Fix some more warnings --------- Co-authored-by: surangap <19677661+surangap@users.noreply.github.com> --- Cargo.lock | 2 + Cargo.toml | 3 - client/Cargo.toml | 2 +- client/src/chain_spec.rs | 12 +- client/src/cli.rs | 8 - client/src/command.rs | 18 +- client/src/rpc.rs | 4 +- client/src/service.rs | 31 +-- ethy-gadget/rpc/Cargo.toml | 2 +- ethy-gadget/rpc/src/lib.rs | 4 +- ethy-gadget/src/worker.rs | 6 +- evm-precompiles/utils/src/testing.rs | 12 ++ pallet/assets-ext/Cargo.toml | 3 +- pallet/assets-ext/rpc/src/lib.rs | 2 +- pallet/assets-ext/src/lib.rs | 11 +- pallet/assets-ext/src/mock.rs | 9 +- pallet/assets-ext/src/tests.rs | 57 +++-- pallet/common/src/test_utils.rs | 63 +++--- pallet/crowdsale/Cargo.toml | 1 + pallet/crowdsale/src/benchmarking.rs | 3 +- pallet/crowdsale/src/lib.rs | 1 - pallet/crowdsale/src/mock.rs | 6 +- pallet/crowdsale/src/tests.rs | 148 +++++-------- pallet/dex/Cargo.toml | 3 +- pallet/dex/rpc/src/lib.rs | 4 +- pallet/dex/src/mock.rs | 7 +- pallet/dex/src/tests.rs | 7 +- pallet/doughnut/Cargo.toml | 2 +- pallet/doughnut/src/lib.rs | 1 - pallet/doughnut/src/mock.rs | 37 +++- pallet/echo/Cargo.toml | 1 + pallet/echo/src/lib.rs | 1 - pallet/echo/src/mock.rs | 27 +-- pallet/echo/src/tests.rs | 11 +- pallet/erc20-peg/Cargo.toml | 3 +- pallet/erc20-peg/src/lib.rs | 1 - pallet/erc20-peg/src/mock.rs | 7 +- pallet/ethy/Cargo.toml | 1 + pallet/ethy/src/lib.rs | 3 +- pallet/ethy/src/mock.rs | 155 ++++++++------ pallet/ethy/src/tests.rs | 24 +-- pallet/evm-chain-id/Cargo.toml | 1 + pallet/evm-chain-id/src/mock.rs | 7 +- pallet/fee-control/Cargo.toml | 2 +- pallet/fee-control/src/lib.rs | 1 - pallet/fee-control/src/mock.rs | 7 +- pallet/fee-proxy/Cargo.toml | 3 +- pallet/fee-proxy/src/impls.rs | 13 +- pallet/fee-proxy/src/lib.rs | 1 - pallet/fee-proxy/src/mock.rs | 7 +- pallet/fee-proxy/src/tests.rs | 6 +- pallet/futurepass/Cargo.toml | 1 + pallet/futurepass/src/benchmarking.rs | 2 +- pallet/futurepass/src/mock.rs | 9 +- pallet/futurepass/src/tests.rs | 103 ++++----- pallet/maintenance-mode/Cargo.toml | 1 + pallet/maintenance-mode/src/lib.rs | 1 - pallet/maintenance-mode/src/mock.rs | 11 +- pallet/marketplace/Cargo.toml | 1 + pallet/marketplace/src/benchmarking.rs | 42 +++- pallet/marketplace/src/lib.rs | 1 - pallet/marketplace/src/mock.rs | 5 +- pallet/marketplace/src/tests.rs | 192 +++++++---------- pallet/nft-peg/Cargo.toml | 3 +- pallet/nft-peg/src/lib.rs | 1 - pallet/nft-peg/src/mock.rs | 5 +- pallet/nft-peg/src/tests.rs | 2 +- pallet/nft/Cargo.toml | 1 + pallet/nft/rpc/src/lib.rs | 4 +- pallet/nft/src/lib.rs | 1 - pallet/nft/src/mock.rs | 7 +- pallet/nft/src/tests.rs | 18 +- pallet/sft/Cargo.toml | 1 + pallet/sft/rpc/src/lib.rs | 4 +- pallet/sft/src/lib.rs | 1 - pallet/sft/src/mock.rs | 5 +- pallet/sft/src/tests.rs | 22 +- pallet/token-approvals/Cargo.toml | 1 + pallet/token-approvals/src/lib.rs | 1 - pallet/token-approvals/src/mock.rs | 5 +- pallet/tx-fee-pot/src/lib.rs | 1 - pallet/vortex-distribution/Cargo.toml | 5 +- pallet/vortex-distribution/src/lib.rs | 4 +- pallet/vortex-distribution/src/mock.rs | 22 +- pallet/xls20/Cargo.toml | 1 + pallet/xls20/src/lib.rs | 1 - pallet/xls20/src/mock.rs | 5 +- pallet/xls20/src/tests.rs | 14 +- pallet/xrpl-bridge/Cargo.toml | 5 +- pallet/xrpl-bridge/src/lib.rs | 1 - pallet/xrpl-bridge/src/mock.rs | 5 +- pallet/xrpl-bridge/src/tests.rs | 28 ++- pallet/xrpl/Cargo.toml | 1 + pallet/xrpl/src/mock.rs | 37 +++- pallet/xrpl/src/tests.rs | 6 + primitives/src/signature.rs | 2 +- runtime/Cargo.toml | 4 +- runtime/src/impls.rs | 77 ++++--- runtime/src/lib.rs | 21 +- runtime/src/migrations/crowdsale.rs | 269 ------------------------ runtime/src/migrations/futurepass.rs | 152 ------------- runtime/src/migrations/mod.rs | 24 +-- runtime/src/tests/evm_tests.rs | 15 +- runtime/src/tests/maintenance_mode.rs | 107 +++++----- runtime/src/tests/mod.rs | 23 +- runtime/src/tests/multiplier.rs | 48 +++-- runtime/src/weights/pallet_assets.rs | 4 +- runtime/src/weights/pallet_balances.rs | 2 +- runtime/src/weights/pallet_scheduler.rs | 21 +- 109 files changed, 848 insertions(+), 1259 deletions(-) delete mode 100644 runtime/src/migrations/crowdsale.rs delete mode 100644 runtime/src/migrations/futurepass.rs diff --git a/Cargo.lock b/Cargo.lock index a4750ff6b..a89259fe3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5615,6 +5615,7 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", + "seed-runtime", "serde", "serde_json", "sp-application-crypto", @@ -11253,6 +11254,7 @@ dependencies = [ "async-trait", "clap", "frame-remote-externalities", + "frame-try-runtime", "hex", "log", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index ac898592b..ce693dbfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,6 @@ sc-consensus-grandpa = { opt-level = 3 } # end substrate packages aes = { opt-level = 3 } blake2 = { opt-level = 3 } -blake2-rfc = { opt-level = 3 } blake2b_simd = { opt-level = 3 } blake2s_simd = { opt-level = 3 } chacha20poly1305 = { opt-level = 3 } @@ -60,7 +59,6 @@ hmac = { opt-level = 3 } httparse = { opt-level = 3 } integer-sqrt = { opt-level = 3 } keccak = { opt-level = 3 } -libm = { opt-level = 3 } librocksdb-sys = { opt-level = 3 } libsecp256k1 = { opt-level = 3 } libz-sys = { opt-level = 3 } @@ -79,7 +77,6 @@ smallvec = { opt-level = 3 } snow = { opt-level = 3 } twox-hash = { opt-level = 3 } uint = { opt-level = 3 } -wasmi = { opt-level = 3 } x25519-dalek = { opt-level = 3 } yamux = { opt-level = 3 } zeroize = { opt-level = 3 } diff --git a/client/Cargo.toml b/client/Cargo.toml index 83fd941c5..0a48647a6 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -109,4 +109,4 @@ rocksdb = ["fc-db/rocksdb"] runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks", "sc-service/runtime-benchmarks"] # Enable features that allow the runtime to be tried and debugged. Name might be subject to change # in the near future. -try-runtime = ["seed-runtime/try-runtime", "try-runtime-cli"] +try-runtime = ["seed-runtime/try-runtime", "try-runtime-cli/try-runtime", "frame-try-runtime"] diff --git a/client/src/chain_spec.rs b/client/src/chain_spec.rs index ee910ed38..e3c0d58e6 100644 --- a/client/src/chain_spec.rs +++ b/client/src/chain_spec.rs @@ -22,9 +22,9 @@ use seed_runtime::{ XRP_ASSET_ID, XRP_DECIMALS, XRP_MINIMUM_BALANCE, XRP_NAME, XRP_SYMBOL, }, keys::*, - AccountId, AssetsConfig, BabeConfig, Balance, BalancesConfig, EthBridgeConfig, GenesisConfig, - SessionConfig, SessionKeys, Signature, StakerStatus, StakingConfig, SudoConfig, SystemConfig, - XRPLBridgeConfig, BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY, + AccountId, AssetsConfig, BabeConfig, Balance, BalancesConfig, EthBridgeConfig, + RuntimeGenesisConfig, SessionConfig, SessionKeys, Signature, StakerStatus, StakingConfig, + SudoConfig, SystemConfig, XRPLBridgeConfig, BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY, }; use sp_core::{ecdsa, Pair, Public}; use sp_runtime::{ @@ -36,7 +36,7 @@ use sp_runtime::{ // const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; /// Type alias for the stash, controller + session key types tuple used by validators pub type AuthorityKeys = (AccountId, BabeId, ImOnlineId, GrandpaId, EthBridgeId); @@ -145,7 +145,7 @@ fn testnet_genesis( xrp_relayers: Vec, xrp_door_signers: Vec, _enable_println: bool, -) -> GenesisConfig { +) -> RuntimeGenesisConfig { let metadata = vec![ ( ROOT_ASSET_ID, @@ -169,7 +169,7 @@ fn testnet_genesis( } const VALIDATOR_BOND: Balance = 100_000 * ONE_ROOT; - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), diff --git a/client/src/cli.rs b/client/src/cli.rs index dc307bc34..cb91e1d4c 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -14,7 +14,6 @@ // You may obtain a copy of the License at the root of this project source code use crate::custom_commands::VerifyProofSigSubCommand; -use sc_cli::{Error, Result}; #[allow(missing_docs)] #[derive(Debug, clap::Parser)] @@ -42,13 +41,6 @@ pub struct RunCmd { pub xrp_http: Option, } -/// Parse HTTP `uri` -fn parse_uri(uri: &str) -> Result { - let _ = url::Url::parse(uri) - .map_err(|_| Error::Input("Invalid external HTTP URI provided".into()))?; - Ok(uri.into()) -} - #[derive(Debug, clap::Parser)] pub struct Cli { #[clap(subcommand)] diff --git a/client/src/command.rs b/client/src/command.rs index 1a011b6a9..74c39f95c 100644 --- a/client/src/command.rs +++ b/client/src/command.rs @@ -18,10 +18,17 @@ use crate::{ cli::{Cli, Subcommand}, service, }; -use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; +use frame_benchmarking::frame_support::sp_io; +use sc_cli::SubstrateCli; +use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; use sc_service::PartialComponents; use seed_runtime::Block; +use crate::service::ExecutorDispatch; +use seed_runtime::constants::SLOT_DURATION; +#[cfg(feature = "try-runtime")] +use try_runtime_cli::block_building_info::substrate_info; + impl SubstrateCli for Cli { fn impl_name() -> String { "Seed 🌱".into() @@ -204,7 +211,14 @@ pub fn run() -> sc_cli::Result<()> { let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry) .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - Ok((cmd.run::(config), task_manager)) + let info_provider = substrate_info(SLOT_DURATION); + Ok(( + cmd.run::::ExtendHostFunctions, + >, _>(Some(info_provider)), + task_manager, + )) }) }, #[cfg(not(feature = "try-runtime"))] diff --git a/client/src/rpc.rs b/client/src/rpc.rs index aaa939dc9..0da9edbdb 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -24,12 +24,10 @@ use std::{collections::BTreeMap, sync::Arc}; use jsonrpsee::RpcModule; // Substrate -use core::time::Duration; use sc_client_api::{ backend::{AuxStore, Backend, StateBackend, StorageProvider}, client::BlockchainEvents, }; -use sc_consensus_epochs::SharedEpochChanges; use sc_consensus_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; @@ -226,7 +224,7 @@ where network, filter_pool, frontier_backend, - backend, + backend: _, max_past_logs, fee_history_cache, fee_history_cache_limit, diff --git a/client/src/service.rs b/client/src/service.rs index 4a4821527..4b524f625 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -15,43 +15,34 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use futures::{future, StreamExt}; - use fc_consensus::FrontierBlockImport; -use fc_db::Backend as FrontierBackend; +use fc_db::{Backend as FrontierBackend, DatabaseSource}; use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; use fc_rpc::{EthTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; -use sc_cli::SubstrateCli; +use futures::{future, StreamExt}; use sc_client_api::{ AuxStore, Backend, BlockBackend, BlockchainEvents, StateBackend, StorageProvider, }; -use sc_consensus_babe::{self, SlotProportion}; +use sc_consensus_babe::{self, BabeWorkerHandle, SlotProportion}; use sc_consensus_grandpa::SharedVoterState; pub use sc_executor::NativeElseWasmExecutor; use sc_keystore::LocalKeystore; -use sc_service::{ - error::Error as ServiceError, BasePath, Configuration, TaskManager, WarpSyncParams, -}; +use sc_network_sync::SyncingService; +use sc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncParams}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; -use sp_runtime::offchain::OffchainStorage; - +use sp_api::ProvideRuntimeApi; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_runtime::{offchain::OffchainStorage, traits::BlakeTwo256}; use std::{ collections::BTreeMap, - path::PathBuf, sync::{Arc, Mutex}, time::Duration, }; -use fc_db::{kv::DatabaseSettings, DatabaseSource}; -use sc_consensus_babe::BabeWorkerHandle; -use sc_network_sync::SyncingService; use seed_primitives::{ethy::ETH_HTTP_URI, opaque::Block, XRP_HTTP_URI}; use seed_runtime::{self, RuntimeApi}; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; -use sp_runtime::traits::BlakeTwo256; use crate::{cli::Cli, consensus_data_providers::BabeConsensusDataProvider}; @@ -261,6 +252,7 @@ pub fn new_partial( }) } +#[allow(dead_code)] fn remote_keystore(_url: &String) -> Result, &'static str> { // FIXME: here would the concrete keystore be built, // must return a concrete type (NOT `LocalKeystore`) that @@ -269,13 +261,13 @@ fn remote_keystore(_url: &String) -> Result, &'static str> { } /// Builds a new service for a full client. -pub fn new_full(mut config: Configuration, cli: &Cli) -> Result { +pub fn new_full(config: Configuration, cli: &Cli) -> Result { let sc_service::PartialComponents { client, backend, mut task_manager, import_queue, - mut keystore_container, + keystore_container, select_chain, transaction_pool, other: @@ -407,7 +399,6 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result, + _proof_size: Option, + ) -> Result<(), ExitError> { + todo!() + } + + fn refund_external_cost(&mut self, _ref_time: Option, _proof_size: Option) { + todo!(); + } + fn remaining_gas(&self) -> u64 { self.gas_limit - self.gas_used } diff --git a/pallet/assets-ext/Cargo.toml b/pallet/assets-ext/Cargo.toml index b511f64e2..618b86a27 100644 --- a/pallet/assets-ext/Cargo.toml +++ b/pallet/assets-ext/Cargo.toml @@ -46,7 +46,8 @@ std = [ "sp-std/std", "seed-pallet-common/std", "seed-primitives/std", - "precompile-utils/std" + "precompile-utils/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/assets-ext/rpc/src/lib.rs b/pallet/assets-ext/rpc/src/lib.rs index 3dc29fa63..235c8a355 100644 --- a/pallet/assets-ext/rpc/src/lib.rs +++ b/pallet/assets-ext/rpc/src/lib.rs @@ -26,7 +26,7 @@ use jsonrpsee::{ }; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{generic::BlockId, traits::Block as BlockT}; +use sp_runtime::{traits::Block as BlockT}; pub use pallet_assets_ext_rpc_runtime_api::{ self as runtime_api, AssetsExtApi as AssetsExtRuntimeApi, diff --git a/pallet/assets-ext/src/lib.rs b/pallet/assets-ext/src/lib.rs index a984c3661..d2983c922 100644 --- a/pallet/assets-ext/src/lib.rs +++ b/pallet/assets-ext/src/lib.rs @@ -24,7 +24,6 @@ //! It provides a minimal API for authorising holds on asset amounts e.g locking bidder funds of an //! NFT auction This is similar to 'reserve' which is not implemented for pallet-assets within //! substrate at this time - #![cfg_attr(not(feature = "std"), no_std)] pub use pallet::*; @@ -84,7 +83,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::genesis_config] @@ -216,7 +214,7 @@ pub mod pallet { /// Note, this does not change the deposit when calling create within the assets pallet /// However that call is filtered #[pallet::call_index(0)] - #[pallet::weight(< T as Config >::WeightInfo::set_asset_deposit())] + #[pallet::weight(::WeightInfo::set_asset_deposit())] pub fn set_asset_deposit( origin: OriginFor, asset_deposit: DepositBalanceOf, @@ -231,7 +229,7 @@ pub mod pallet { /// Decimals cannot be higher than 18 due to a restriction in the conversion function /// scale_wei_to_correct_decimals #[pallet::call_index(1)] - #[pallet::weight(< T as Config >::WeightInfo::create_asset())] + #[pallet::weight(::WeightInfo::create_asset())] #[transactional] pub fn create_asset( origin: OriginFor, @@ -499,6 +497,8 @@ impl Mutate for Pallet { preservation, ) } else { + // Transfers with 0 amount will fail if the destination account does not exist + // This is because the transfer value is less than the existential deposit as fungibles::Mutate>::transfer( asset_id, source, @@ -528,7 +528,8 @@ impl TransferExt for Pallet { Error::::BalanceLow ); - for (payee, amount) in transfers.into_iter() { + // Skip zero transfers, these will error within the transfer function + for (payee, amount) in transfers.into_iter().filter(|(_, b)| !b.is_zero()) { >::transfer( asset_id, who, diff --git a/pallet/assets-ext/src/mock.rs b/pallet/assets-ext/src/mock.rs index e0dd712b7..9c2e20e6e 100644 --- a/pallet/assets-ext/src/mock.rs +++ b/pallet/assets-ext/src/mock.rs @@ -18,21 +18,18 @@ use crate::{self as pallet_assets_ext}; use frame_support::{pallet_prelude::BuildGenesisConfig, traits::FindAuthor}; use pallet_evm::{AddressMapping, BlockHashMapping, EnsureAddressNever, GasWeightMapping}; use seed_pallet_common::test_prelude::*; -use sp_runtime::{BuildStorage, ConsensusEngineId}; +use sp_runtime::ConsensusEngineId; use std::marker::PhantomData; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, AssetsExt: pallet_assets_ext, EVM: pallet_evm, - TimestampPallet: pallet_timestamp, + Timestamp: pallet_timestamp, FeeControl: pallet_fee_control, } ); diff --git a/pallet/assets-ext/src/tests.rs b/pallet/assets-ext/src/tests.rs index 9698bca22..11ab78416 100644 --- a/pallet/assets-ext/src/tests.rs +++ b/pallet/assets-ext/src/tests.rs @@ -17,12 +17,9 @@ use crate::{ mock::{test_ext, AssetsExt, AssetsExtPalletId, Balances, NativeAssetId, System, Test}, AssetDeposit, Config, Error, Holds, NextAssetId, }; -use frame_support::{ - macro_magic::__private::syn::token::For, - traits::{ - fungibles::{metadata::Inspect as InspectMetadata, Inspect, Mutate}, - tokens::{Fortitude, Preservation}, - }, +use frame_support::traits::{ + fungibles::{metadata::Inspect as InspectMetadata, Inspect, Mutate}, + tokens::{Fortitude, Preservation}, }; use seed_pallet_common::{test_prelude::*, CreateExt, Hold, TransferExt}; use sp_runtime::traits::{AccountIdConversion, Zero}; @@ -115,13 +112,13 @@ fn transfer_extrinsic_low_balance() { // native token transfer with insufficient balance assert_noop!( AssetsExt::transfer(Some(alice()).into(), NativeAssetId::get(), bob(), 100, false,), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow ); // XRP transfer with insufficient balance assert_noop!( AssetsExt::transfer(Some(alice()).into(), XRP_ASSET_ID, bob(), 100, false,), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -199,7 +196,7 @@ fn transfer_extrinsic_keep_alive_above_min_should_fail() { initial_balance, true ), - pallet_assets::Error::::BalanceLow + TokenError::NotExpendable ); }); } @@ -358,7 +355,7 @@ fn transfer_insufficient_funds() { initial_balance + 1, Preservation::Preserve ), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow, ); assert_noop!( >::transfer( @@ -368,7 +365,7 @@ fn transfer_insufficient_funds() { initial_balance + 1, Preservation::Preserve ), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -397,7 +394,7 @@ fn transfer_held_funds() { hold_amount, Preservation::Preserve ), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); let hold_amount = initial_balance - AssetsExt::minimum_balance(XRP_ASSET_ID); @@ -415,7 +412,7 @@ fn transfer_held_funds() { hold_amount, Preservation::Preserve ), - pallet_assets::Error::::BalanceLow + TokenError::FundsUnavailable ); }); } @@ -482,7 +479,7 @@ fn place_hold_insufficient_funds() { NativeAssetId::get(), initial_balance + 1 ), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow ); assert_noop!( ::place_hold( @@ -491,7 +488,7 @@ fn place_hold_insufficient_funds() { XRP_ASSET_ID, initial_balance + 1 ), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -516,6 +513,17 @@ fn release_hold() { AssetsExt::hold_balance(&TEST_PALLET_ID, &alice(), &NativeAssetId::get()), hold_amount ); + assert_eq!( + AssetsExt::balance(NativeAssetId::get(), &alice()), + initial_balance - hold_amount + ); + assert_eq!( + AssetsExt::balance( + NativeAssetId::get(), + &AssetsExtPalletId::get().into_account_truncating() + ), + hold_amount + ); assert_ok!(::release_hold( TEST_PALLET_ID, &alice(), @@ -537,6 +545,14 @@ fn release_hold() { AssetsExt::hold_balance(&TEST_PALLET_ID, &alice(), &XRP_ASSET_ID), hold_amount ); + assert_eq!(AssetsExt::balance(XRP_ASSET_ID, &alice()), initial_balance - hold_amount); + assert_eq!( + AssetsExt::balance( + XRP_ASSET_ID, + &AssetsExtPalletId::get().into_account_truncating() + ), + hold_amount + ); assert_ok!(::release_hold( TEST_PALLET_ID, &alice(), @@ -1054,7 +1070,7 @@ fn place_hold_asset_does_not_exist() { NativeAssetId::get() + 1, 100 ), - pallet_assets::Error::::Unknown, + TokenError::UnknownAsset, ); }); } @@ -1070,7 +1086,7 @@ fn transfer_asset_does_not_exist() { 100, Preservation::Preserve, ), - pallet_assets::Error::::Unknown, + TokenError::UnknownAsset, ); }); } @@ -1302,12 +1318,7 @@ fn set_asset_deposit_reserves_the_correct_amount() { )); // Alice balance should now be reduced by deposit amount - let alice_balance = AssetsExt::reducible_balance( - NativeAssetId::get(), - &alice(), - Preservation::Expendable, - Fortitude::Polite, - ); + let alice_balance = AssetsExt::balance(NativeAssetId::get(), &alice()); assert_eq!(alice_balance, initial_balance - deposit); // The deposit should be reserved diff --git a/pallet/common/src/test_utils.rs b/pallet/common/src/test_utils.rs index 34342f81f..3a312770e 100644 --- a/pallet/common/src/test_utils.rs +++ b/pallet/common/src/test_utils.rs @@ -24,7 +24,7 @@ pub mod test_prelude { dispatch::{DispatchError, DispatchResult}, parameter_types, storage::{StorageMap, StorageValue}, - traits::GenesisBuild, + traits::BuildGenesisConfig, weights::{constants::RocksDbWeight as DbWeight, Weight}, PalletId, }; @@ -37,9 +37,9 @@ pub mod test_prelude { pub use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, - BoundedVec, + ArithmeticError, BoundedVec, BuildStorage, DispatchError::BadOrigin, - Permill, + Permill, TokenError, }; pub use sp_std::{vec, vec::Vec}; } @@ -97,26 +97,6 @@ pub mod account_creation { } } -#[macro_export] -macro_rules! construct_test_runtime { - ( - { - $($module_name:ident: $module_path:ident $(,)?)* - } - ) => { - frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - $($module_name: $module_path),* - } - ); - - }; -} - #[macro_export] macro_rules! impl_frame_system_config { ($test:ident) => { @@ -127,18 +107,17 @@ macro_rules! impl_frame_system_config { type BlockNumber = u64; impl frame_system::Config for $test { + type Block = frame_system::mocking::MockBlock<$test>; type BlockWeights = (); type BlockLength = (); type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u32; - type BlockNumber = BlockNumber; + type Nonce = u32; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type BlockHashCount = BlockHashCount; type RuntimeEvent = RuntimeEvent; type DbWeight = (); @@ -160,18 +139,23 @@ macro_rules! impl_pallet_balance_config { ($test:ident) => { parameter_types! { pub const MaxReserves: u32 = 50; + pub const ExistentialDeposit: u128 = 1; } impl pallet_balances::Config for $test { type Balance = Balance; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = (); + type FreezeIdentifier = (); type DustRemoval = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = (); type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; + type MaxHolds = sp_core::ConstU32<0>; + type MaxFreezes = sp_core::ConstU32<0>; } }; } @@ -202,6 +186,7 @@ macro_rules! impl_pallet_assets_config { pub const AssetsStringLimit: u32 = 50; pub const MetadataDepositBase: Balance = 1 * 68; pub const MetadataDepositPerByte: Balance = 1; + pub const RemoveItemsLimit: u32 = 100; } impl pallet_assets::Config for $test { @@ -219,6 +204,13 @@ macro_rules! impl_pallet_assets_config { type Extra = (); type WeightInfo = (); type AssetAccountDeposit = AssetAccountDeposit; + type RemoveItemsLimit = RemoveItemsLimit; + type AssetIdParameter = AssetId; + type CreateOrigin = frame_system::EnsureNever; + type CallbackHandle = (); + pallet_assets::runtime_benchmarks_enabled! { + type BenchmarkHelper = (); + } } }; } @@ -403,6 +395,10 @@ macro_rules! impl_pallet_evm_config { } } + parameter_types! { + pub GasLimitPovSizeRatio: u64 = 0; + } + impl pallet_evm::Config for $test { type FeeCalculator = FeeControl; type GasWeightMapping = FixedGasWeightMapping; @@ -421,6 +417,10 @@ macro_rules! impl_pallet_evm_config { type FindAuthor = FindAuthorTruncated; type HandleTxValidation = (); type WeightPerGas = (); + type OnCreate = (); + type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type Timestamp = Timestamp; + type WeightInfo = (); } }; } @@ -678,9 +678,8 @@ macro_rules! impl_pallet_futurepass_config { type ApproveOrigin = EnsureRoot; type ProxyType = ProxyType; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type MultiCurrency = pallet_assets_ext::Pallet; + type MultiCurrency = AssetsExt; } }; } @@ -729,6 +728,7 @@ macro_rules! impl_pallet_scheduler_config { ($test:ident) => { parameter_types! { pub const MaxScheduledPerBlock: u32 = 50; + pub const MaximumWeight: Weight = Weight::from_parts(9_000_000_000_000, 9_000_000_000_000); } impl pallet_scheduler::Config for Test { @@ -736,13 +736,12 @@ macro_rules! impl_pallet_scheduler_config { type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; type RuntimeCall = RuntimeCall; - type MaximumWeight = (); + type MaximumWeight = MaximumWeight; type ScheduleOrigin = EnsureRoot; type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; type WeightInfo = (); - type PreimageProvider = (); - type NoPreimagePostponement = (); + type Preimages = (); } }; } diff --git a/pallet/crowdsale/Cargo.toml b/pallet/crowdsale/Cargo.toml index 1a4cbe9ea..beb0ee25a 100644 --- a/pallet/crowdsale/Cargo.toml +++ b/pallet/crowdsale/Cargo.toml @@ -42,6 +42,7 @@ std = [ "pallet-assets-ext/std", "seed-primitives/std", "seed-pallet-common/std", + "frame-benchmarking?/std" ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/crowdsale/src/benchmarking.rs b/pallet/crowdsale/src/benchmarking.rs index 981fea3fc..c5854d1fe 100644 --- a/pallet/crowdsale/src/benchmarking.rs +++ b/pallet/crowdsale/src/benchmarking.rs @@ -60,7 +60,6 @@ fn initialize_crowdsale(owner: T::AccountId) -> (SaleId, AssetId, Col } benchmarks! { - initialize { let acc: T::AccountId = account("acc", 0, 0); let payment_asset_id = T::MultiCurrency::create(&acc, None).unwrap(); @@ -69,7 +68,7 @@ benchmarks! { let sale_duration: BlockNumberFor = 1000_u32.into(); let voucher_max_len_data = BoundedVec::try_from(vec![0u8; T::StringLimit::get() as usize]).unwrap(); }: _(RawOrigin::Signed(acc.clone()), payment_asset_id, collection_id, soft_cap_price, sale_duration, Some(voucher_max_len_data.clone()), Some(voucher_max_len_data)) - verify { + verify { // validate NextSaleId assert_eq!(NextSaleId::::get(), 1); assert_eq!(SaleInfo::::get(0).unwrap().status, SaleStatus::Pending(1_u32.into())); diff --git a/pallet/crowdsale/src/lib.rs b/pallet/crowdsale/src/lib.rs index cf2aa96a8..42b5ccff0 100644 --- a/pallet/crowdsale/src/lib.rs +++ b/pallet/crowdsale/src/lib.rs @@ -77,7 +77,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/crowdsale/src/mock.rs b/pallet/crowdsale/src/mock.rs index ba63a728f..d018ed9a8 100644 --- a/pallet/crowdsale/src/mock.rs +++ b/pallet/crowdsale/src/mock.rs @@ -20,11 +20,7 @@ use sp_runtime::testing::TestXt; pub type Extrinsic = TestXt; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallet/crowdsale/src/tests.rs b/pallet/crowdsale/src/tests.rs index 67d8a6272..488d185b6 100644 --- a/pallet/crowdsale/src/tests.rs +++ b/pallet/crowdsale/src/tests.rs @@ -22,7 +22,7 @@ use crate::{ }, Pallet, }; -use frame_support::traits::fungibles::{Inspect, InspectMetadata}; +use frame_support::traits::fungibles::{metadata::Inspect as InspectMetadata, Inspect}; use pallet_nft::{traits::NFTCollectionInfo, CrossChainCompatibility}; use seed_pallet_common::test_prelude::{BlockNumber, *}; use seed_primitives::TokenCount; @@ -424,8 +424,7 @@ mod initialize { assert_eq!(token_issuance, add_decimals(max_issuance.into(), VOUCHER_DECIMALS)); // Check voucher balance - let vault_balance = - AssetsExt::reducible_balance(sale_info.voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(sale_info.voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, token_issuance); // Check all relevant events thrown @@ -479,15 +478,15 @@ mod initialize { // Check voucher metadata assert_eq!( - >::name(&next_asset_id), + >::name(next_asset_id), voucher_name.as_bytes().to_vec() ); assert_eq!( - >::symbol(&next_asset_id), + >::symbol(next_asset_id), voucher_symbol.as_bytes().to_vec() ); assert_eq!( - >::decimals(&next_asset_id), + >::decimals(next_asset_id), VOUCHER_DECIMALS ); }); @@ -920,11 +919,11 @@ mod participate { let asset_id = sale_info.payment_asset_id; // Vault account should have the contributed amount - let vault_balance = AssetsExt::reducible_balance(asset_id, &vault, false); + let vault_balance = AssetsExt::balance(asset_id, &vault); assert_eq!(vault_balance, amount); // Bobs balance should be decreased - let bob_balance = AssetsExt::reducible_balance(asset_id, &bob(), false); + let bob_balance = AssetsExt::balance(asset_id, &bob()); assert_eq!(bob_balance, initial_balance - amount); // Contribution should be stored @@ -983,12 +982,12 @@ mod participate { let asset_id = sale_info.payment_asset_id; // Vault account should have the contributed amount - let vault_balance = AssetsExt::reducible_balance(asset_id, &vault, false); + let vault_balance = AssetsExt::balance(asset_id, &vault); let expected_vault_balance = bob_total + charlie_total; assert_eq!(vault_balance, expected_vault_balance); // Bobs balance should be decreased - let bob_balance = AssetsExt::reducible_balance(asset_id, &bob(), false); + let bob_balance = AssetsExt::balance(asset_id, &bob()); let expected_bob_balance = initial_balance - bob_total; assert_eq!(bob_balance, expected_bob_balance); @@ -1016,7 +1015,7 @@ mod participate { TestExt::::default().with_balances(&accounts).build().execute_with(|| { let max_issuance = 1000; - let (sale_id, sale_info) = initialize_crowdsale(max_issuance); + let (sale_id, _) = initialize_crowdsale(max_issuance); assert_ok!(Crowdsale::enable(Some(alice()).into(), sale_id)); // Participate for each account @@ -1136,11 +1135,11 @@ mod participate { let asset_id = sale_info.payment_asset_id; // Vault account should have the contributed amount - let vault_balance = AssetsExt::reducible_balance(asset_id, &vault, false); + let vault_balance = AssetsExt::balance(asset_id, &vault); assert_eq!(vault_balance, amount); // Bobs balance should be decreased - let bob_balance = AssetsExt::reducible_balance(asset_id, &bob(), false); + let bob_balance = AssetsExt::balance(asset_id, &bob()); assert_eq!(bob_balance, initial_balance - amount); // Contribution should be stored @@ -1171,8 +1170,7 @@ mod on_initialize { let (sale_id, sale_info) = initialize_crowdsale(max_issuance); let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, add_decimals(max_issuance, VOUCHER_DECIMALS)); // Enable crowdsale @@ -1199,10 +1197,8 @@ mod on_initialize { // Check vouchers are refunded to admin let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); // Vault account should have the vouchers that are to be paid out let vault_expected = @@ -1231,8 +1227,7 @@ mod on_initialize { let (sale_id, sale_info) = initialize_crowdsale(max_issuance); let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, add_decimals(max_issuance, VOUCHER_DECIMALS)); // Enable crowdsale @@ -1259,10 +1254,8 @@ mod on_initialize { // Check no vouchers are refunded to admin let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); // Vault account has the entire voucher supply assert_eq!(vault_balance, add_decimals(max_issuance, VOUCHER_DECIMALS)); @@ -1311,10 +1304,8 @@ mod on_initialize { // Check no vouchers are refunded to admin let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); // Vault account should have the vouchers that are to be paid out let vault_expected = @@ -1403,10 +1394,8 @@ mod on_initialize { // Check vouchers are refunded to admin let voucher_asset_id = sale_info.voucher_asset_id; - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); // Vault account should have the vouchers that are to be paid out let vault_expected = @@ -1448,7 +1437,7 @@ mod claim_voucher { Crowdsale::on_initialize(end_block); // Sanity check, should have no vouchers - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); assert_eq!(voucher_balance, 0); assert_eq!( SaleParticipation::::get(sale_id, bob()), @@ -1462,14 +1451,13 @@ mod claim_voucher { assert_eq!(SaleParticipation::::get(sale_id, bob()), None); // Check balance - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); let expected_balance = add_decimals(participation_amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // Check sale_info.status updated to Ended @@ -1522,7 +1510,7 @@ mod claim_voucher { assert_eq!(SaleDistribution::::get().into_inner(), vec![sale_id]); // Check Bob balance - let bob_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let bob_balance = AssetsExt::balance(voucher_asset_id, &bob()); let bob_expected = add_decimals(b_amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(bob_balance, bob_expected); @@ -1536,8 +1524,7 @@ mod claim_voucher { assert_eq!(SaleParticipation::::get(sale_id, charlie()), None); // Check Charlie balance - let charlie_balance = - AssetsExt::reducible_balance(voucher_asset_id, &charlie(), false); + let charlie_balance = AssetsExt::balance(voucher_asset_id, &charlie()); let charlie_expected = add_decimals(c_amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(charlie_balance, charlie_expected); @@ -1587,16 +1574,14 @@ mod claim_voucher { // Sanity check, all accounts should have no vouchers for (account, _) in participations.clone() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); assert_eq!(voucher_balance, 0); } // Manual claim for each for (account, amount) in participations { assert_ok!(Crowdsale::claim_voucher(Some(account).into(), sale_id)); - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); let expected_balance = add_decimals(amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); @@ -1618,8 +1603,7 @@ mod claim_voucher { assert_eq!(sale_info.status, SaleStatus::Ended(end_block)); // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); }); } @@ -1758,7 +1742,7 @@ mod redeem_voucher { // Manual claim assert_ok!(Crowdsale::claim_voucher(Some(bob()).into(), sale_id)); - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); let quantity = voucher_balance / 10u128.pow(VOUCHER_DECIMALS as u32); // Redeem voucher @@ -1772,7 +1756,7 @@ mod redeem_voucher { ); // Check voucher burned - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); assert_eq!(voucher_balance, 0); // Check NFT ownership @@ -1821,7 +1805,7 @@ mod redeem_voucher { // Manual claim assert_ok!(Crowdsale::claim_voucher(Some(bob()).into(), sale_id)); - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); // Quantity = 105 / 10 = 10.5, rounded to 10 let quantity = voucher_balance / 10u128.pow(VOUCHER_DECIMALS as u32); @@ -1829,7 +1813,7 @@ mod redeem_voucher { assert_ok!(Crowdsale::redeem_voucher(Some(bob()).into(), sale_id, quantity as u32)); // Check voucher burned and no remainder - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); assert_eq!(voucher_balance, 500_000); // Check NFT ownership @@ -1867,7 +1851,7 @@ mod redeem_voucher { // Manual claim assert_ok!(Crowdsale::claim_voucher(Some(bob()).into(), sale_id)); - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); // Quantity = 105 / 10 = 10.5, rounded to 10 let quantity = voucher_balance / 10u128.pow(VOUCHER_DECIMALS as u32); let redeem_quantity = quantity as u32 - 1; @@ -1876,7 +1860,7 @@ mod redeem_voucher { assert_ok!(Crowdsale::redeem_voucher(Some(bob()).into(), sale_id, redeem_quantity)); // Check voucher burned but remainder is kept - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); assert_eq!(voucher_balance, 1_000_000); // Check NFT ownership @@ -1889,7 +1873,7 @@ mod redeem_voucher { assert_ok!(Crowdsale::redeem_voucher(Some(bob()).into(), sale_id, 1)); // Check voucher burned but remainder is kept - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); assert_eq!(voucher_balance, 0); // Check NFT ownership @@ -1972,14 +1956,14 @@ mod redeem_voucher { // Manual claim assert_ok!(Crowdsale::claim_voucher(Some(bob()).into(), sale_id)); - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); let quantity = voucher_balance / 10u128.pow(VOUCHER_DECIMALS as u32); // Redeem more vouchers than allocated let redeem_quantity = quantity as u32 + 1; assert_noop!( Crowdsale::redeem_voucher(Some(bob()).into(), sale_id, redeem_quantity), - pallet_assets::Error::::BalanceLow + sp_runtime::TokenError::FundsUnavailable ); }); } @@ -2272,14 +2256,13 @@ mod automatic_distribution { assert_ok!(Crowdsale::distribute_crowdsale_rewards(None.into())); // Check storage updated - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &bob(), false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &bob()); let expected_balance = add_decimals(participation_amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // Check other storage values @@ -2359,8 +2342,7 @@ mod automatic_distribution { // Check status of each individual account for (account, amount) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); let expected_balance = add_decimals(amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); @@ -2368,8 +2350,7 @@ mod automatic_distribution { } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance @@ -2417,8 +2398,7 @@ mod automatic_distribution { Crowdsale::on_initialize(end_block); // Check admin balance has 0 at this stage as we are over committed - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); assert_eq!(admin_balance, 0); // Call auto distribute until we have finished distribution @@ -2429,20 +2409,17 @@ mod automatic_distribution { // Check status of each individual account. Each account should have some voucher // balance for (account, _) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); assert!(voucher_balance > 0); assert!(SaleParticipation::::get(sale_id, account).is_none()); } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // Check admin balance has 10 remainder, paid out due to rounding errors - let admin_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.admin, false); + let admin_balance = AssetsExt::balance(voucher_asset_id, &sale_info.admin); assert_eq!(admin_balance, 10); // total supply remains the max issuance @@ -2503,15 +2480,13 @@ mod automatic_distribution { // Check status of each individual account. Each account should have some voucher // balance for (account, _) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); assert!(voucher_balance > 0); assert!(SaleParticipation::::get(sale_id, account).is_none()); } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance @@ -2570,15 +2545,13 @@ mod automatic_distribution { // Check status of each individual account. Each account should have some voucher // balance for (account, _) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); assert!(voucher_balance > 0); assert!(SaleParticipation::::get(sale_id, account).is_none()); } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance @@ -2639,7 +2612,7 @@ mod automatic_distribution { let (account, contribution) = SaleParticipation::::iter_prefix(sale_id).next().unwrap(); assert_ok!(Crowdsale::claim_voucher(Some(account).into(), sale_id)); - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); let expected_balance = add_decimals(contribution, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); @@ -2655,13 +2628,12 @@ mod automatic_distribution { assert_ok!(Crowdsale::distribute_crowdsale_rewards(None.into())); // Assert account has the same balance since it manually redeemed - let voucher_balance = AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); assert_eq!(voucher_balance, expected_balance); // Check status of each individual account for (account, amount) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); let expected_balance = add_decimals(amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); @@ -2669,8 +2641,7 @@ mod automatic_distribution { } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance @@ -2724,8 +2695,7 @@ mod automatic_distribution { // Check status of each individual account for (account, amount) in accounts.into_iter() { - let voucher_balance = - AssetsExt::reducible_balance(voucher_asset_id, &account, false); + let voucher_balance = AssetsExt::balance(voucher_asset_id, &account); let expected_balance = add_decimals(amount, VOUCHER_DECIMALS) / sale_info.soft_cap_price; assert_eq!(voucher_balance, expected_balance); @@ -2733,8 +2703,7 @@ mod automatic_distribution { } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance @@ -2791,8 +2760,7 @@ mod automatic_distribution { } // Check vault balance is 0 (All vouchers redeemed) - let vault_balance = - AssetsExt::reducible_balance(voucher_asset_id, &sale_info.vault, false); + let vault_balance = AssetsExt::balance(voucher_asset_id, &sale_info.vault); assert_eq!(vault_balance, 0); // total supply remains the max issuance diff --git a/pallet/dex/Cargo.toml b/pallet/dex/Cargo.toml index 3a9853db0..d71955c6d 100644 --- a/pallet/dex/Cargo.toml +++ b/pallet/dex/Cargo.toml @@ -40,7 +40,8 @@ std = [ "sp-std/std", "seed-primitives/std", "seed-pallet-common/std", - "sp-io/std" + "sp-io/std", + "frame-benchmarking?/std" ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/dex/rpc/src/lib.rs b/pallet/dex/rpc/src/lib.rs index abd142a34..8cad3585f 100644 --- a/pallet/dex/rpc/src/lib.rs +++ b/pallet/dex/rpc/src/lib.rs @@ -22,10 +22,10 @@ use jsonrpsee::{ }; use pallet_dex::{types::WrappedBalance, Config, TradingPairStatus}; pub use pallet_dex_rpc_runtime_api::{self as runtime_api, DexApi as DexRuntimeApi}; -use seed_primitives::types::{AssetId, Balance, BlockNumber}; +use seed_primitives::types::{AssetId, Balance}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{generic::BlockId, traits::Block as BlockT, DispatchError}; +use sp_runtime::{traits::Block as BlockT, DispatchError}; /// Dex RPC methods. #[rpc(client, server, namespace = "dex")] diff --git a/pallet/dex/src/mock.rs b/pallet/dex/src/mock.rs index e3580179d..85b197977 100644 --- a/pallet/dex/src/mock.rs +++ b/pallet/dex/src/mock.rs @@ -18,14 +18,9 @@ use super::*; use crate::{self as pallet_dex}; use seed_pallet_common::test_prelude::*; -use sp_runtime::BuildStorage; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallet/dex/src/tests.rs b/pallet/dex/src/tests.rs index b08ae6f9d..bbaa66fa6 100644 --- a/pallet/dex/src/tests.rs +++ b/pallet/dex/src/tests.rs @@ -19,7 +19,6 @@ use hex::encode; use mock::{Dex, RuntimeEvent as MockEvent, RuntimeOrigin, System, Test, TestExt}; use seed_pallet_common::test_prelude::*; use sp_arithmetic::helpers_128bit::sqrt; -use sp_runtime::ArithmeticError; use std::str::FromStr; /// x * 10e18 @@ -1009,7 +1008,7 @@ fn swap_with_exact_supply() { None, None, ), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); // mint weth for 2nd user and allow them to perform swap against usdc @@ -1249,7 +1248,7 @@ fn swap_with_exact_target() { None, None, ), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); // mint weth for 2nd user and allow them to perform swap against usdc @@ -1527,7 +1526,7 @@ fn multiple_swaps_with_multiple_lp() { None, None, ), - Error::::InsufficientLiquidityBurnt + TokenError::BelowMinimum ); assert_eq!(AssetsExt::balance(lp_usdc_weth, &charlie), 2_482_001_869_909_090_520_u128); diff --git a/pallet/doughnut/Cargo.toml b/pallet/doughnut/Cargo.toml index 388478cb9..5329ba3de 100644 --- a/pallet/doughnut/Cargo.toml +++ b/pallet/doughnut/Cargo.toml @@ -55,7 +55,7 @@ std = [ "pallet-assets/std", "pallet-balances/std", "pallet-transaction-payment/std", - "frame-benchmarking/std", + "frame-benchmarking?/std", "seed-pallet-common/std", "seed-primitives/std", "doughnut-rs/std", diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index a378d9575..63d24fa6f 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -296,7 +296,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(PhantomData); diff --git a/pallet/doughnut/src/mock.rs b/pallet/doughnut/src/mock.rs index b9bf29eb3..b1bd55c29 100644 --- a/pallet/doughnut/src/mock.rs +++ b/pallet/doughnut/src/mock.rs @@ -28,11 +28,7 @@ pub type UncheckedExtrinsicT = pub type BlockT = generic::Block; construct_runtime!( - pub enum Test where - Block = BlockT, - NodeBlock = BlockT, - UncheckedExtrinsic = UncheckedExtrinsicT, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, @@ -44,13 +40,42 @@ construct_runtime!( } ); -impl_frame_system_config!(Test); impl_pallet_balance_config!(Test); impl_pallet_assets_config!(Test); impl_pallet_assets_ext_config!(Test); impl_pallet_fee_control_config!(Test); impl_pallet_futurepass_config!(Test); +parameter_types! { + pub const BlockHashCount: u64 = 250; +} + +impl frame_system::Config for Test { + type Block = BlockT; + type BlockWeights = (); + type BlockLength = (); + type BaseCallFilter = frame_support::traits::Everything; + type RuntimeOrigin = RuntimeOrigin; + type Nonce = u32; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type BlockHashCount = BlockHashCount; + type RuntimeEvent = RuntimeEvent; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + pub struct FeeControlWeightToFee; impl WeightToFee for FeeControlWeightToFee { type Balance = Balance; diff --git a/pallet/echo/Cargo.toml b/pallet/echo/Cargo.toml index 298131972..d83d020f5 100644 --- a/pallet/echo/Cargo.toml +++ b/pallet/echo/Cargo.toml @@ -39,6 +39,7 @@ std = [ "sp-std/std", "frame-support/std", "frame-system/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/echo/src/lib.rs b/pallet/echo/src/lib.rs index 1fac82074..79de1bb14 100644 --- a/pallet/echo/src/lib.rs +++ b/pallet/echo/src/lib.rs @@ -55,7 +55,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/echo/src/mock.rs b/pallet/echo/src/mock.rs index 5c03c5af7..1cf460f53 100644 --- a/pallet/echo/src/mock.rs +++ b/pallet/echo/src/mock.rs @@ -13,18 +13,14 @@ // limitations under the License. // You may obtain a copy of the License at the root of this project source code -use crate::{self as pallet_echo, Config, Weight, PING}; +use crate::{self as pallet_echo, Config as EchoConfig, Weight, PING}; use ethabi::{ParamType, Token}; -use frame_support::storage::StorageValue; use seed_pallet_common::test_prelude::*; use seed_primitives::ethy::EventProofId; use sp_runtime::SaturatedConversion; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Assets: pallet_assets, @@ -40,27 +36,13 @@ impl_pallet_balance_config!(Test); parameter_types! { pub const MockEchoPalletId: PalletId = PalletId(*b"pingpong"); } -impl Config for Test { +impl EchoConfig for Test { type RuntimeEvent = RuntimeEvent; type EthereumBridge = MockBridge; type PalletId = MockEchoPalletId; type WeightInfo = (); } -pub(crate) mod test_storage { - //! storage used by tests to store mock EthBlocks and TransactionReceipts - use crate::Config; - use frame_support::decl_storage; - use seed_primitives::ethy::EventProofId; - - pub struct Module(sp_std::marker::PhantomData); - decl_storage! { - trait Store for Module as EthBridgeTest { - pub NextEventProofId: EventProofId; - } - } -} - pub struct MockBridge; impl EthereumBridge for MockBridge { /// Mock sending an event to the bridge @@ -69,8 +51,7 @@ impl EthereumBridge for MockBridge { destination: &H160, event: &[u8], ) -> Result { - let event_proof_id = test_storage::NextEventProofId::get(); - test_storage::NextEventProofId::put(event_proof_id.wrapping_add(1)); + let event_proof_id = 123; match ethabi::decode(&[ParamType::Uint(64), ParamType::Uint(64), ParamType::Address], event) { Ok(abi) => { diff --git a/pallet/echo/src/tests.rs b/pallet/echo/src/tests.rs index 0fc1260d0..180194c4a 100644 --- a/pallet/echo/src/tests.rs +++ b/pallet/echo/src/tests.rs @@ -15,8 +15,7 @@ #![cfg(test)] use super::*; -use crate::mock::{test_storage::NextEventProofId, Echo, MockEthereumEventRouter, System, Test}; -use frame_support::storage::StorageValue; +use crate::mock::{Echo, MockEthereumEventRouter, System, Test}; use seed_pallet_common::test_prelude::*; use sp_runtime::traits::AccountIdConversion; @@ -25,9 +24,7 @@ fn ping_works_from_runtime() { TestExt::::default().build().execute_with(|| { let caller = H160::from_low_u64_be(123); let destination = ::PalletId::get().into_account_truncating(); - // let destination = H160::from_low_u64_be(124); let next_session_id = Echo::next_session_id(); - let next_event_proof_id = NextEventProofId::get(); assert_ok!(Echo::ping(Some(AccountId::from(caller)).into(), destination)); @@ -40,7 +37,7 @@ fn ping_works_from_runtime() { session_id: next_session_id, source: caller, destination, - event_proof_id: next_event_proof_id, + event_proof_id: 123, } .into(), ); @@ -67,9 +64,7 @@ fn ping_works_from_ethereum() { TestExt::::default().build().execute_with(|| { let caller = H160::from_low_u64_be(123); let destination = ::PalletId::get().into_account_truncating(); - // let destination = H160::from_low_u64_be(124); let next_session_id = Echo::next_session_id(); - let next_event_proof_id = NextEventProofId::get(); let data = ethabi::encode(&[ Token::Uint(PONG.into()), @@ -90,7 +85,7 @@ fn ping_works_from_ethereum() { session_id: next_session_id, source: caller, destination, - event_proof_id: next_event_proof_id, + event_proof_id: 123, } .into(), ); diff --git a/pallet/erc20-peg/Cargo.toml b/pallet/erc20-peg/Cargo.toml index 1ded5d46e..fcce0708e 100644 --- a/pallet/erc20-peg/Cargo.toml +++ b/pallet/erc20-peg/Cargo.toml @@ -44,7 +44,8 @@ std = [ "frame-system/std", "scale-info/std", "sp-core/std", - "ethabi/std" + "ethabi/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index d872b1e42..c96fd0aea 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -58,7 +58,6 @@ pub mod pallet { use super::{DispatchResult, *}; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::genesis_config] diff --git a/pallet/erc20-peg/src/mock.rs b/pallet/erc20-peg/src/mock.rs index 5c215bafe..06c4c857b 100644 --- a/pallet/erc20-peg/src/mock.rs +++ b/pallet/erc20-peg/src/mock.rs @@ -18,10 +18,7 @@ use frame_support::pallet_prelude::*; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, AssetsExt: pallet_assets_ext, @@ -91,7 +88,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // Setup XRP asset let metadata = vec![(XRP_ASSET_ID, b"XRP".to_vec(), b"XRP".to_vec(), 6)]; diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index 2c79bb539..0d5812c80 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -38,6 +38,7 @@ pallet-assets-ext = { path = "../assets-ext" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +seed-runtime = { path = "../../runtime" } [features] default = ["std"] diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index 89c95a8f1..0dbd6a878 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -99,7 +99,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -923,7 +922,7 @@ pub mod pallet { /// Internal only /// Validators will submit inherents with their notarization vote for a given claim #[pallet::call_index(12)] - #[pallet::weight(1_000_000)] + #[pallet::weight(DbWeight::get().writes(3) + DbWeight::get().reads(2))] #[transactional] pub fn submit_notarization( origin: OriginFor, diff --git a/pallet/ethy/src/mock.rs b/pallet/ethy/src/mock.rs index 177c2ca9e..77dfe3e0c 100644 --- a/pallet/ethy/src/mock.rs +++ b/pallet/ethy/src/mock.rs @@ -15,9 +15,6 @@ use crate::{ self as pallet_ethy, - mock::sp_api_hidden_includes_construct_runtime::hidden_include::{ - IterableStorageMap, StorageMap, - }, types::{ BridgeEthereumRpcApi, BridgeRpcError, CheckedEthCallRequest, CheckedEthCallResult, EthAddress, EthBlock, EthCallId, EthHash, LatestOrNumber, Log, TransactionReceipt, @@ -27,21 +24,22 @@ use crate::{ use codec::{Decode, Encode}; use ethereum_types::U64; use frame_support::{ - storage::StorageDoubleMap, traits::{UnixTime, ValidatorSet as ValidatorSetT}, + StorageHasher, Twox64Concat, }; use scale_info::TypeInfo; use seed_pallet_common::test_prelude::*; use seed_primitives::{ ethy::{crypto::AuthorityId, EventProofId}, - AssetId, Balance, Signature, + Signature, }; +use seed_runtime::migrations::{Map, Value}; use sp_application_crypto::RuntimeAppPublic; use sp_core::{ByteArray, Get}; use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; use sp_runtime::{ - testing::{Header, TestXt}, - traits::{BlakeTwo256, Convert, Extrinsic as ExtrinsicT, IdentityLookup, Verify}, + testing::TestXt, + traits::{Convert, Extrinsic as ExtrinsicT, Verify}, Percent, }; use std::{ @@ -53,10 +51,7 @@ pub type SessionIndex = u32; pub type Extrinsic = TestXt; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, EthBridge: pallet_ethy, @@ -263,36 +258,9 @@ impl MockReceiptBuilder { } } -pub(crate) mod test_storage { - //! storage used by tests to store mock EthBlocks and TransactionReceipts - use frame_support::decl_storage; - - use seed_pallet_common::EthCallFailure; - - use super::{AccountId, MockBlockResponse, MockReceiptResponse}; - use crate::{ - types::{CheckedEthCallResult, EthAddress, EthCallId, EthHash}, - Config, - }; - - pub struct Module(sp_std::marker::PhantomData); - decl_storage! { - trait Store for Module as EthBridgeTest { - pub BlockResponseAt: map hasher(identity) u64 => Option; - pub CallAt: double_map hasher(twox_64_concat) u64, hasher(twox_64_concat) EthAddress => Option>; - pub TransactionReceiptFor: map hasher(twox_64_concat) EthHash => Option; - pub Timestamp: Option; - pub Validators: Vec; - pub LastCallResult: Option<(EthCallId, CheckedEthCallResult)>; - pub LastCallFailure: Option<(EthCallId, EthCallFailure)>; - pub Forcing: bool; - } - } -} - /// set the block timestamp pub fn mock_timestamp(now: u64) { - test_storage::Timestamp::put(now); + Value::unsafe_storage_put::(b"Test", b"Timestamp", now) } // get the system unix timestamp in seconds @@ -353,7 +321,12 @@ impl MockEthereumRpcClient { block_number: mock_block.number.unwrap().as_u64(), timestamp: mock_block.timestamp, }; - test_storage::BlockResponseAt::insert(block_number, mock_block_response); + Map::unsafe_storage_put::( + b"Test", + b"BlockResponseAt", + &Twox64Concat::hash(&block_number.encode()), + mock_block_response, + ); } /// Mock a tx receipt response for a hash pub fn mock_transaction_receipt_for(tx_hash: EthHash, mock_tx_receipt: TransactionReceipt) { @@ -365,11 +338,20 @@ impl MockEthereumRpcClient { to: mock_tx_receipt.to, logs: mock_tx_receipt.logs.into_iter().map(From::from).collect(), }; - test_storage::TransactionReceiptFor::insert(tx_hash, mock_receipt_response); + Map::unsafe_storage_put::( + b"Test", + b"TransactionReceiptFor", + &Twox64Concat::hash(&tx_hash.encode()), + mock_receipt_response, + ); } /// setup a mock returndata for an `eth_call` at `block` and `contract` address pub fn mock_call_at(block_number: u64, contract: H160, return_data: &[u8]) { - test_storage::CallAt::insert(block_number, contract, return_data.to_vec()) + let mut key = Twox64Concat::hash(&block_number.encode()); + let key_2 = Twox64Concat::hash(&contract.encode()); + key.extend_from_slice(&key_2); + println!("mock_call_at: {:?} : {:?}", block_number, key); + Map::unsafe_storage_put::>(b"Test", b"CallAt", &key, return_data.to_vec()); } } @@ -379,11 +361,29 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { block_number: LatestOrNumber, ) -> Result, BridgeRpcError> { let mock_block_response = match block_number { - LatestOrNumber::Latest => - test_storage::BlockResponseAt::iter().last().map(|x| x.1).or(None), - LatestOrNumber::Number(block) => test_storage::BlockResponseAt::get(block), + LatestOrNumber::Latest => { + let mut response: Vec = Map::unsafe_keys_get::< + BlockNumber, + MockBlockResponse, + Twox64Concat, + >(b"Test", b"BlockResponseAt"); + if response.is_empty() { + return Ok(None) + } + response.sort(); + let last_key = response.iter().last().unwrap(); + Map::unsafe_storage_get::( + b"Test", + b"BlockResponseAt", + &Twox64Concat::hash(&last_key.encode()), + ) + }, + LatestOrNumber::Number(block) => Map::unsafe_storage_get::( + b"Test", + b"BlockResponseAt", + &Twox64Concat::hash(&block.encode()), + ), }; - println!("get_block_by_number at: {:?}", mock_block_response); if mock_block_response.is_none() { return Ok(None) } @@ -401,8 +401,11 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { fn get_transaction_receipt( hash: EthHash, ) -> Result, BridgeRpcError> { - let mock_receipt: Option = - test_storage::TransactionReceiptFor::get(hash); + let mock_receipt = Map::unsafe_storage_get::( + b"Test", + b"TransactionReceiptFor", + &Twox64Concat::hash(&hash.encode()), + ); if mock_receipt.is_none() { return Ok(None) } @@ -426,11 +429,28 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { ) -> Result, BridgeRpcError> { let block_number = match at_block { LatestOrNumber::Number(n) => n, - LatestOrNumber::Latest => - test_storage::BlockResponseAt::iter().last().unwrap().1.block_number, + LatestOrNumber::Latest => { + let mut response = Map::unsafe_keys_get::< + BlockNumber, + MockBlockResponse, + Twox64Concat, + >(b"Test", b"BlockResponseAt"); + response.sort(); + let last_key = response.iter().last().unwrap(); + Map::unsafe_storage_get::( + b"Test", + b"BlockResponseAt", + &Twox64Concat::hash(&last_key.encode()), + ) + .unwrap() + .block_number + }, }; - println!("eth_call at: {:?}", block_number); - test_storage::CallAt::get(block_number, target).ok_or(BridgeRpcError::HttpFetch) + let mut key = Twox64Concat::hash(&block_number.encode()); + let key_2 = Twox64Concat::hash(&target.encode()); + key.extend_from_slice(&key_2); + Map::unsafe_storage_get::>(b"Test", b"CallAt", &key) + .ok_or(BridgeRpcError::HttpFetch) } } @@ -451,7 +471,7 @@ impl ValidatorSetT for MockValidatorSet { } /// Returns the active set of validators. fn validators() -> Vec { - test_storage::Validators::get() + Value::unsafe_storage_get::>(b"Test", b"Validators").unwrap_or_default() } } impl MockValidatorSet { @@ -459,7 +479,7 @@ impl MockValidatorSet { pub fn mock_n_validators(n: u8) { let validators: Vec = (1..=n as u64).map(|i| H160::from_low_u64_be(i).into()).collect(); - test_storage::Validators::put(validators); + Value::unsafe_storage_put::>(b"Test", b"Validators", validators); } } @@ -481,26 +501,31 @@ impl EthCallOracleSubscriber for MockEthCallSubscriber { block_number: u64, block_timestamp: u64, ) { - test_storage::LastCallResult::put(( - call_id, - CheckedEthCallResult::Ok(*return_data, block_number, block_timestamp), - )); + Value::unsafe_storage_put::<(EthCallId, CheckedEthCallResult)>( + b"Test", + b"LastCallResult", + (call_id, CheckedEthCallResult::Ok(*return_data, block_number, block_timestamp)), + ); } /// Stores the failed call info /// Available via `Self::failed_call_for()` fn on_eth_call_failed(call_id: Self::CallId, reason: EthCallFailure) { - test_storage::LastCallFailure::put((call_id, reason)); + Value::unsafe_storage_put::<(EthCallId, EthCallFailure)>( + b"Test", + b"LastCallFailure", + (call_id, reason), + ); } } impl MockEthCallSubscriber { /// Returns last known successful call, if any pub fn success_result() -> Option<(EthCallId, CheckedEthCallResult)> { - test_storage::LastCallResult::get() + Value::unsafe_storage_get::<(EthCallId, CheckedEthCallResult)>(b"Test", b"LastCallResult") } /// Returns last known failed call, if any pub fn failed_result() -> Option<(EthCallId, EthCallFailure)> { - test_storage::LastCallFailure::get() + Value::unsafe_storage_get::<(EthCallId, EthCallFailure)>(b"Test", b"LastCallFailure") } } @@ -509,7 +534,9 @@ pub struct MockFinalSessionTracker; impl FinalSessionTracker for MockFinalSessionTracker { fn is_active_session_final() -> bool { // at block 100, or if we are forcing, the active session is final - frame_system::Pallet::::block_number() == 100 || test_storage::Forcing::get() + let forcing: bool = + Value::unsafe_storage_get::(b"Test", b"Forcing").unwrap_or_default(); + frame_system::Pallet::::block_number() == 100 || forcing } } @@ -517,7 +544,7 @@ impl FinalSessionTracker for MockFinalSessionTracker { pub struct MockUnixTime; impl UnixTime for MockUnixTime { fn now() -> core::time::Duration { - match test_storage::Timestamp::get() { + match Value::unsafe_storage_get::(b"Test", b"Timestamp") { // Use configured value for tests requiring precise timestamps Some(s) => core::time::Duration::new(s, 0), // fallback, use block number to derive timestamp for tests that only care abut block @@ -590,7 +617,7 @@ impl ExtBuilder { self } pub fn build(self) -> sp_io::TestExternalities { - let mut ext = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut ext = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut endowed_accounts: Vec<(AccountId, Balance)> = vec![]; if self.endowed_account.is_some() { diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index 7adac0837..3d1a32f56 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -42,6 +42,7 @@ use seed_primitives::{ }, xrpl::XrplAccountId, }; +use seed_runtime::migrations::Value; use sp_core::{bounded::WeakBoundedVec, ByteArray}; use sp_keystore::{testing::MemoryKeystore, Keystore}; use sp_runtime::{ @@ -282,7 +283,7 @@ fn deposit_relayer_bond_no_balance_should_fail() { // Subsequent deposits should fail assert_noop!( EthBridge::deposit_relayer_bond(RuntimeOrigin::signed(relayer.into())), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow ); }); } @@ -406,7 +407,7 @@ fn submit_challenge_no_balance_should_fail() { // Submit challenge with no balance should fail assert_noop!( EthBridge::submit_challenge(RuntimeOrigin::signed(challenger.into()), event_id), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); }); } @@ -487,7 +488,7 @@ fn handle_event_notarization_valid_claims() { // When the yay_count reaches over the NotarizationThreshold of 66% the storage should // be updated for i in 0..9 { - if Percent::from_rational(yay_count, notary_count) >= + if Percent::from_rational(yay_count as u64, notary_count as u64) >= ::NotarizationThreshold::get() { // Any further notarizations should return InvalidClaim error @@ -508,7 +509,7 @@ fn handle_event_notarization_valid_claims() { } yay_count += 1; - if Percent::from_rational(yay_count, notary_count) >= + if Percent::from_rational(yay_count as u64, notary_count as u64) >= ::NotarizationThreshold::get() { // Over threshold, storage should be updated @@ -562,7 +563,7 @@ fn process_valid_challenged_event() { .build() .execute_with(|| { MockValidatorSet::mock_n_validators(mock_notary_keys.len() as u8); - assert_eq!(AssetsExt::reducible_balance(ROOT_ASSET_ID, &relayer.into(), false), 0); + assert_eq!(AssetsExt::balance(ROOT_ASSET_ID, &relayer.into()), 0); assert_eq!(RelayerPaidBond::::get(AccountId::from(relayer)), RelayerBond::get()); let process_at = System::block_number() + ChallengePeriod::::get(); @@ -609,10 +610,7 @@ fn process_valid_challenged_event() { RelayerBond::get() ); assert_eq!(RelayerPaidBond::::get(AccountId::from(relayer)), RelayerBond::get()); - assert_eq!( - AssetsExt::reducible_balance(ROOT_ASSET_ID, &relayer.into(), false), - ChallengerBond::get() - ); + assert_eq!(AssetsExt::balance(ROOT_ASSET_ID, &relayer.into()), ChallengerBond::get()); // Check claim remains in storage so it can still be processed assert_eq!( @@ -794,7 +792,7 @@ fn handle_event_notarization_invalid_claims() { // When the nay_count reaches over 100 - NotarizationThreshold (33%) the storage should // be updated for i in 0..9 { - if Percent::from_rational(nay_count, notary_count) > + if Percent::from_rational(nay_count as u64, notary_count as u64) > (Percent::from_parts( 100_u8 - ::NotarizationThreshold::get().deconstruct(), )) { @@ -816,7 +814,7 @@ fn handle_event_notarization_invalid_claims() { } nay_count += 1; - if Percent::from_rational(nay_count, notary_count) > + if Percent::from_rational(nay_count as u64, notary_count as u64) > (Percent::from_parts( 100_u8 - ::NotarizationThreshold::get().deconstruct(), )) { @@ -1222,7 +1220,7 @@ fn force_new_era_with_scheduled_authority_change_works() { assert!(NextAuthorityChange::::get().is_none()); // Simulate force new era - test_storage::Forcing::put(true); + Value::unsafe_storage_put::(b"Test", b"Forcing", true); // Add a validator to the next_keys, simulating a change in validator during the last // session @@ -2256,7 +2254,7 @@ fn set_bridge_paused_not_root_should_fail() { #[test] fn set_challenge_period_works() { ExtBuilder::default().build().execute_with(|| { - let new_challenge_period: ::BlockNumber = 12345; + let new_challenge_period: BlockNumber = 12345; assert_ok!(EthBridge::set_challenge_period( frame_system::RawOrigin::Root.into(), diff --git a/pallet/evm-chain-id/Cargo.toml b/pallet/evm-chain-id/Cargo.toml index 2a64e8f99..194576f76 100644 --- a/pallet/evm-chain-id/Cargo.toml +++ b/pallet/evm-chain-id/Cargo.toml @@ -43,6 +43,7 @@ std = [ "frame-support/std", "frame-system/std", "sp-std/std", + "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/evm-chain-id/src/mock.rs b/pallet/evm-chain-id/src/mock.rs index b38c5a34c..064b121ac 100644 --- a/pallet/evm-chain-id/src/mock.rs +++ b/pallet/evm-chain-id/src/mock.rs @@ -18,10 +18,7 @@ use frame_support::parameter_types; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, EVMChainId: pallet_evm_chain_id, @@ -44,7 +41,7 @@ impl Config for Test { pub struct TestExt; impl TestExt { pub fn build(self) -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext: sp_io::TestExternalities = storage.into(); ext.execute_with(|| System::initialize(&1, &[0u8; 32].into(), &Default::default())); ext diff --git a/pallet/fee-control/Cargo.toml b/pallet/fee-control/Cargo.toml index fca1f4d08..8c1dc3035 100644 --- a/pallet/fee-control/Cargo.toml +++ b/pallet/fee-control/Cargo.toml @@ -60,7 +60,7 @@ std = [ "precompile-utils/std", "sp-core/std", "fp-evm/std", - "frame-benchmarking/std", + "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/fee-control/src/lib.rs b/pallet/fee-control/src/lib.rs index 477fef336..341d884cd 100644 --- a/pallet/fee-control/src/lib.rs +++ b/pallet/fee-control/src/lib.rs @@ -52,7 +52,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/fee-control/src/mock.rs b/pallet/fee-control/src/mock.rs index c30f02d4c..1cd08d24e 100644 --- a/pallet/fee-control/src/mock.rs +++ b/pallet/fee-control/src/mock.rs @@ -27,10 +27,7 @@ use sp_runtime::ConsensusEngineId; pub const MOCK_PAYMENT_ASSET_ID: AssetId = 100; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -40,6 +37,7 @@ construct_runtime!( FeeProxy: pallet_fee_proxy, Dex: pallet_dex, Evm: pallet_evm, + Timestamp: pallet_timestamp, Futurepass: pallet_futurepass, MockPallet: mock_pallet::pallet, FeeControl: pallet_fee_control, @@ -66,7 +64,6 @@ pub mod mock_pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/fee-proxy/Cargo.toml b/pallet/fee-proxy/Cargo.toml index cef878f5c..72a550ece 100644 --- a/pallet/fee-proxy/Cargo.toml +++ b/pallet/fee-proxy/Cargo.toml @@ -54,7 +54,8 @@ std = [ "sp-core/std", "sp-runtime/std", "frame-support/std", - "frame-system/std" + "frame-system/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/fee-proxy/src/impls.rs b/pallet/fee-proxy/src/impls.rs index ff4f97965..611ae5ca5 100644 --- a/pallet/fee-proxy/src/impls.rs +++ b/pallet/fee-proxy/src/impls.rs @@ -14,7 +14,7 @@ // You may obtain a copy of the License at the root of this project source code use crate::{Call::call_with_fee_preferences, *}; -use frame_support::traits::IsSubType; +use frame_support::traits::{fungibles::Inspect, IsSubType}; use pallet_futurepass::ProxyProvider; use pallet_transaction_payment::OnChargeTransaction; use precompile_utils::{Address, ErcIdConversion}; @@ -130,6 +130,17 @@ where add_evm_gas_cost(gas_limit, max_fee_per_gas, max_priority_fee_per_gas); } + // If the account has less balance than the minimum_deposit, we need to add + // the minimum deposit onto the total_fee. + // This is due to the preservation rules of the withdraw call made within + // <::OnChargeTransaction as OnChargeTransaction>::withdraw_fee + let account_balance = pallet_assets_ext::Pallet::::balance(native_asset, &who); + // Minium balance is hardcoded to 1 + // pallet_assets_ext::Pallet::::minimum_balance(native_asset); + let minimum_balance = 1; + if account_balance < minimum_balance { + total_fee = total_fee.saturating_add(minimum_balance); + } let path: &[AssetId] = &[*payment_asset, native_asset]; pallet_dex::Pallet::::do_swap_with_exact_target( who, diff --git a/pallet/fee-proxy/src/lib.rs b/pallet/fee-proxy/src/lib.rs index 33d4dc023..e2ae3183d 100644 --- a/pallet/fee-proxy/src/lib.rs +++ b/pallet/fee-proxy/src/lib.rs @@ -53,7 +53,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/fee-proxy/src/mock.rs b/pallet/fee-proxy/src/mock.rs index 60d51719f..16dba54aa 100644 --- a/pallet/fee-proxy/src/mock.rs +++ b/pallet/fee-proxy/src/mock.rs @@ -27,10 +27,7 @@ use sp_runtime::ConsensusEngineId; pub type XrpCurrency = pallet_assets_ext::AssetCurrency; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, FeeProxy: pallet_fee_proxy, @@ -40,7 +37,7 @@ construct_runtime!( Assets: pallet_assets, TransactionPayment: pallet_transaction_payment, EVM: pallet_evm, - TimestampPallet: pallet_timestamp, + Timestamp: pallet_timestamp, Futurepass: pallet_futurepass, FeeControl: pallet_fee_control, } diff --git a/pallet/fee-proxy/src/tests.rs b/pallet/fee-proxy/src/tests.rs index 4a0514745..c02796d12 100644 --- a/pallet/fee-proxy/src/tests.rs +++ b/pallet/fee-proxy/src/tests.rs @@ -124,12 +124,12 @@ mod call_with_fee_preferences { let caller: AccountId = create_account(1); let payment_asset: AssetId = 10; let max_payment: Balance = 100; - let call = mock::RuntimeCall::System(frame_system::Call::fill_block { - ratio: Default::default(), + let call = mock::RuntimeCall::System(frame_system::Call::set_heap_pages { + pages: Default::default(), }); // Test that the error returned is the error from the inner call. In this case it is - // BadOrigin as fill_block requires root. This is the easiest example to use without + // BadOrigin as set_heap_pages requires root. This is the easiest example to use without // pulling in more dev dependencies assert_noop!( FeeProxy::call_with_fee_preferences( diff --git a/pallet/futurepass/Cargo.toml b/pallet/futurepass/Cargo.toml index 63c75f36d..750b93f64 100644 --- a/pallet/futurepass/Cargo.toml +++ b/pallet/futurepass/Cargo.toml @@ -75,6 +75,7 @@ std = [ "pallet-balances/std", "precompile-utils/std", "fp-evm/std", + "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks"] diff --git a/pallet/futurepass/src/benchmarking.rs b/pallet/futurepass/src/benchmarking.rs index db40b56bf..bbf9854ba 100644 --- a/pallet/futurepass/src/benchmarking.rs +++ b/pallet/futurepass/src/benchmarking.rs @@ -32,7 +32,7 @@ where frame_system::Pallet::::assert_last_event(generic_event.into()); } -// fund account with ROOT & XRP +// fund account with ROOT pub fn fund(account: &T::AccountId) where ::AccountId: From, diff --git a/pallet/futurepass/src/mock.rs b/pallet/futurepass/src/mock.rs index 7aed41895..391b1200e 100644 --- a/pallet/futurepass/src/mock.rs +++ b/pallet/futurepass/src/mock.rs @@ -25,10 +25,7 @@ use sp_core::{ecdsa, Pair}; pub const MOCK_NATIVE_ASSET_ID: AssetId = ROOT_ASSET_ID; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -133,12 +130,12 @@ impl ProxyProvider for ProxyPalletProvider { let (proxy_definitions, reserve_amount) = pallet_proxy::Proxies::::get(futurepass); // get proxy_definitions length + 1 (cost of upcoming insertion); cost to reserve let new_reserve = pallet_proxy::Pallet::::deposit(proxy_definitions.len() as u32 + 1); - let extra_reserve_required = new_reserve - reserve_amount; + let extra_reserve_required = new_reserve - reserve_amount + ExistentialDeposit::get(); as Currency<_>>::transfer( funder, futurepass, extra_reserve_required, - ExistenceRequirement::KeepAlive, + ExistenceRequirement::AllowDeath, )?; let proxy_type = ProxyType::try_from(*proxy_type)?; diff --git a/pallet/futurepass/src/tests.rs b/pallet/futurepass/src/tests.rs index 9ec4ce82f..3218d0668 100644 --- a/pallet/futurepass/src/tests.rs +++ b/pallet/futurepass/src/tests.rs @@ -15,23 +15,25 @@ use super::*; use crate::mock::*; -use frame_support::traits::tokens::fungibles::Transfer; +use frame_support::traits::tokens::{fungibles::Mutate, Preservation}; use hex_literal::hex; use seed_pallet_common::test_prelude::*; use seed_runtime::{impls::ProxyType, Inspect}; +use sp_runtime::traits::Hash; type MockCall = crate::mock::RuntimeCall; -const FP_CREATION_RESERVE: Balance = 148 + 126; // ProxyDepositBase + ProxyDepositFactor * 1(num of delegates) -const FP_DELEGATE_RESERVE: Balance = 126 * 1; // ProxyDepositFactor * 1(num of delegates) +// ProxyDepositBase + ProxyDepositFactor * 1(num of delegates) + 1 for Existential deposit +const FP_CREATION_RESERVE: Balance = 148 + 126 + 1; +const FP_DELEGATE_RESERVE: Balance = 126 * 1 + 1; // ProxyDepositFactor * 1(num of delegates) fn transfer_funds(asset_id: AssetId, source: &AccountId, destination: &AccountId, amount: Balance) { - assert_ok!(>::transfer( + assert_ok!(>::transfer( asset_id, &source, &destination, amount, - false + Preservation::Expendable )); } @@ -54,12 +56,12 @@ fn create_futurepass_by_owner() { assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 0); assert_noop!( Futurepass::create(RuntimeOrigin::signed(owner), owner), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_CREATION_RESERVE + 1); let futurepass_addr = AccountId::from(hex!("ffffffff00000000000000000000000000000001")); assert_eq!(::Proxy::owner(&futurepass_addr), None); @@ -426,7 +428,7 @@ fn register_delegate_failures_common() { deadline, signature, ), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); // fund the owner and other @@ -535,7 +537,10 @@ fn unregister_delegate_by_owner_works() { ); // check the reserved amount has been received by the caller. i.e the owner - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_DELEGATE_RESERVE); + assert_eq!( + AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), + FP_DELEGATE_RESERVE - ExistentialDeposit::get() + ); // check delegate is not a proxy of futurepass assert_eq!( @@ -607,7 +612,10 @@ fn unregister_delegate_by_the_delegate_works() { Event::::DelegateUnregistered { futurepass, delegate }.into(), ); // check the reserved amount has been received by the caller. i.e the delegate - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &delegate), FP_DELEGATE_RESERVE); + assert_eq!( + AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &delegate), + FP_DELEGATE_RESERVE - ExistentialDeposit::get() + ); // check delegate is not a proxy of futurepass assert_eq!( @@ -900,7 +908,10 @@ fn transfer_futurepass_to_address_works() { false, ); // caller(the owner) should receive the reserved balance diff - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 2 * FP_DELEGATE_RESERVE); + assert_eq!( + AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), + 2 * FP_DELEGATE_RESERVE - 2 * ExistentialDeposit::get() + ); }); } @@ -1113,10 +1124,7 @@ fn proxy_extrinsic_simple_transfer_works() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // transfer other via proxy_extrinsic @@ -1139,8 +1147,8 @@ fn proxy_extrinsic_simple_transfer_works() { ); // check balances assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - transfer_amount + AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), + fund_amount - transfer_amount + 2 ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), transfer_amount); // owner's(i.e caller's) balance not changed @@ -1157,8 +1165,8 @@ fn proxy_extrinsic_simple_transfer_works() { )); //check balances assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - 2 * transfer_amount + AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), + fund_amount - 2 * transfer_amount + 2 ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 2 * transfer_amount); // delegate's(i.e caller's) balance not changed @@ -1219,11 +1227,9 @@ fn proxy_extrinsic_non_transfer_call_works() { let fund_amount: Balance = 1_500_000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - let asset_id = 5; - let inner_call = Box::new(MockCall::Assets(pallet_assets::Call::create { - id: asset_id, - admin: futurepass, - min_balance: 1, + let remark = b"Mischief Managed"; + let inner_call = Box::new(MockCall::System(frame_system::Call::remark_with_event { + remark: remark.to_vec(), })); // call proxy_extrinsic assert_ok!(Futurepass::proxy_extrinsic( @@ -1233,10 +1239,9 @@ fn proxy_extrinsic_non_transfer_call_works() { )); // assert event (asset creation) System::assert_has_event( - pallet_assets::Event::::Created { - asset_id, - creator: futurepass, - owner: futurepass, + frame_system::Event::::Remarked { + sender: futurepass, + hash: ::Hashing::hash(remark), } .into(), ); @@ -1295,10 +1300,7 @@ fn proxy_extrinsic_by_non_delegate_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); let transfer_amount: Balance = 100; @@ -1318,10 +1320,7 @@ fn proxy_extrinsic_by_non_delegate_fails() { pallet_proxy::Error::::NotProxy ); //check balances - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); }); } @@ -1378,10 +1377,7 @@ fn proxy_extrinsic_to_futurepass_non_whitelist_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // pallet_futurepass calls other than the whitelist can not be called via @@ -1461,10 +1457,7 @@ fn proxy_extrinsic_to_proxy_pallet_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // pallet_proxy calls can not be called via proxy_extrinsic @@ -1546,10 +1539,7 @@ fn proxy_extrinsic_failures_common() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); let transfer_amount: Balance = 100; @@ -1570,8 +1560,7 @@ fn proxy_extrinsic_failures_common() { // proxy_extrinsic does not care about wrapped internal call failure. It's task is to // only dispatch the internal call - let futurpass_balance: Balance = - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false); + let futurpass_balance: Balance = AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass); let inner_call = Box::new(MockCall::Balances(pallet_balances::Call::transfer { dest: other, value: futurpass_balance + 1, @@ -1590,7 +1579,7 @@ fn proxy_extrinsic_failures_common() { // assert event pallet_proxy::ProxyExecuted with the error System::assert_has_event( pallet_proxy::Event::::ProxyExecuted { - result: Err(pallet_balances::Error::::InsufficientBalance.into()), + result: Err(TokenError::FundsUnavailable.into()), } .into(), ); @@ -1621,10 +1610,7 @@ fn whitelist_works() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 1); let signature = signer .sign_prehashed( @@ -1771,10 +1757,7 @@ fn delegate_can_not_call_whitelist_via_proxy_extrinsic() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!( - AssetsExt::reducible_balance(MOCK_NATIVE_ASSET_ID, &futurepass, false), - fund_amount - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 1); let signature = signer .sign_prehashed( diff --git a/pallet/maintenance-mode/Cargo.toml b/pallet/maintenance-mode/Cargo.toml index e141ac34d..d1c67ecb4 100644 --- a/pallet/maintenance-mode/Cargo.toml +++ b/pallet/maintenance-mode/Cargo.toml @@ -45,6 +45,7 @@ std = [ "sp-runtime/std", "frame-support/std", "frame-system/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/maintenance-mode/src/lib.rs b/pallet/maintenance-mode/src/lib.rs index d642ef48e..9bd510864 100644 --- a/pallet/maintenance-mode/src/lib.rs +++ b/pallet/maintenance-mode/src/lib.rs @@ -45,7 +45,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/maintenance-mode/src/mock.rs b/pallet/maintenance-mode/src/mock.rs index 00b9d127e..421317b37 100644 --- a/pallet/maintenance-mode/src/mock.rs +++ b/pallet/maintenance-mode/src/mock.rs @@ -16,14 +16,8 @@ use crate as pallet_maintenance_mode; use seed_pallet_common::test_prelude::*; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; - -frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, +construct_runtime!( + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -43,6 +37,7 @@ impl_pallet_assets_ext_config!(Test); impl pallet_sudo::Config for Test { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = (); } impl pallet_maintenance_mode::Config for Test { diff --git a/pallet/marketplace/Cargo.toml b/pallet/marketplace/Cargo.toml index e1cd24623..e52f3fd86 100644 --- a/pallet/marketplace/Cargo.toml +++ b/pallet/marketplace/Cargo.toml @@ -50,6 +50,7 @@ std = [ "frame-support/std", "frame-system/std", "scale-info/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking", "pallet-nft/runtime-benchmarks", "pallet-sft/runtime-benchmarks"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/marketplace/src/benchmarking.rs b/pallet/marketplace/src/benchmarking.rs index 5dcb20776..46edccaf9 100644 --- a/pallet/marketplace/src/benchmarking.rs +++ b/pallet/marketplace/src/benchmarking.rs @@ -18,7 +18,14 @@ use super::*; use crate::{Marketplace as RegisteredMarketplace, Pallet as Marketplace}; use codec::Encode; use frame_benchmarking::{account as bench_account, benchmarks, impl_benchmark_test_suite}; -use frame_support::{assert_ok, BoundedVec}; +use frame_support::{ + assert_ok, + traits::{ + fungibles::Inspect, + tokens::{Fortitude, Preservation}, + }, + BoundedVec, +}; use frame_system::RawOrigin; use pallet_nft::{CrossChainCompatibility, Pallet as Nft}; use pallet_sft::Pallet as Sft; @@ -88,9 +95,25 @@ pub fn build_sft_token( pub fn build_asset(owner: &T::AccountId) -> AssetId { let asset_id = T::MultiCurrency::create(&owner, None).unwrap(); assert_ok!(T::MultiCurrency::mint_into(asset_id, &owner, 1_000_000_000u32.into())); - - let beneficiary = vec![(account::("Bob"), 1_000u32.into())]; - assert_ok!(T::MultiCurrency::split_transfer(&owner, asset_id, &beneficiary)); + assert_eq!( + T::MultiCurrency::reducible_balance( + asset_id, + &owner, + Preservation::Expendable, + Fortitude::Polite + ), + 1_000_000_000u32.into() + ); + assert_eq!(T::MultiCurrency::minimum_balance(asset_id), 1u32.into()); + + let beneficiary = account::("Bob"); + assert_ok!(T::MultiCurrency::transfer( + asset_id, + &owner, + &beneficiary, + 1_000_000u32.into(), + Preservation::Expendable + )); asset_id } @@ -120,7 +143,7 @@ pub fn listing_builder( serial_numbers, None, asset_id.clone(), - Balance::from(100u128), + Balance::from(0u128), Some(100u32.into()), None )); @@ -208,6 +231,15 @@ benchmarks! { buy { let collection_id = build_collection::(None); let (asset_id, listing_id) = listing_builder::(collection_id, false); + assert_eq!( + ::MultiCurrency::reducible_balance( + asset_id, + &account::("Bob"), + Preservation::Expendable, + Fortitude::Polite + ), + 1_000_000u32.into() + ); }: _(origin::(&account::("Bob")), listing_id) buy_multi { diff --git a/pallet/marketplace/src/lib.rs b/pallet/marketplace/src/lib.rs index b5ae25b54..19c39b289 100644 --- a/pallet/marketplace/src/lib.rs +++ b/pallet/marketplace/src/lib.rs @@ -57,7 +57,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/marketplace/src/mock.rs b/pallet/marketplace/src/mock.rs index 657ce7112..309f1c468 100644 --- a/pallet/marketplace/src/mock.rs +++ b/pallet/marketplace/src/mock.rs @@ -18,10 +18,7 @@ use seed_pallet_common::test_prelude::*; use seed_primitives::MetadataScheme; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, diff --git a/pallet/marketplace/src/tests.rs b/pallet/marketplace/src/tests.rs index e348e155f..74019fff9 100644 --- a/pallet/marketplace/src/tests.rs +++ b/pallet/marketplace/src/tests.rs @@ -277,7 +277,7 @@ fn sell() { let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &fee_pot_account, false), + AssetsExt::balance(NativeAssetId::get(), &fee_pot_account), 5, // 0.5% of 1000 ); }) @@ -624,14 +624,11 @@ fn listing_price_splits_royalties_and_network_fee() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); // Buyer balance should be starting minus 1_000_000 - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), - starting_balance - price - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), starting_balance - price); // Owner balance should be 1_000_000 minus 25.5% of 1_000_000 assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), price - entitlement_amount.mul(price) - MarketplaceNetworkFeePercentage::get().mul(price) @@ -639,14 +636,14 @@ fn listing_price_splits_royalties_and_network_fee() { // Beneficiary balance should be 25% of 1_000_000 assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), entitlement_amount.mul(price) ); let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); // Network fee should be 0.5% of 1_000_000 assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &fee_pot_account, false), + AssetsExt::balance(NativeAssetId::get(), &fee_pot_account), MarketplaceNetworkFeePercentage::get().mul(price) ); }); @@ -692,13 +689,10 @@ fn listing_price_splits_multiple_royalties_and_network_fee() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), - starting_balance - price - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), starting_balance - price); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), price - (entitlement_amount.mul(price) + entitlement_amount_beneficiary_2.mul(price) + @@ -706,19 +700,19 @@ fn listing_price_splits_multiple_royalties_and_network_fee() { ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), entitlement_amount.mul(price) ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_2), entitlement_amount_beneficiary_2.mul(price) ); let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &fee_pot_account, false), + AssetsExt::balance(NativeAssetId::get(), &fee_pot_account), MarketplaceNetworkFeePercentage::get().mul(price) ); }); @@ -760,21 +754,21 @@ fn network_fee_royalties_split_is_respected_xrpl() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); assert_eq!( - AssetsExt::reducible_balance(asset_used, &token_owner, false), + AssetsExt::balance(asset_used, &token_owner), price - entitlement_amount.mul(price) - MarketplaceNetworkFeePercentage::get().mul(price) ); assert_eq!( - AssetsExt::reducible_balance(asset_used, &beneficiary_1, false), + AssetsExt::balance(asset_used, &beneficiary_1), entitlement_amount.mul(price) ); let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); assert_eq!( - AssetsExt::reducible_balance(asset_used, &fee_pot_account, false), + AssetsExt::balance(asset_used, &fee_pot_account), MarketplaceNetworkFeePercentage::get().mul(price) ); }); @@ -952,7 +946,7 @@ fn buy_with_marketplace_royalties() { let marketplace_account = create_account(20); let initial_balance_marketplace = - AssetsExt::reducible_balance(NativeAssetId::get(), &marketplace_account, false); + AssetsExt::balance(NativeAssetId::get(), &marketplace_account); let marketplace_entitlement: Permill = Permill::from_float(0.5); assert_ok!(Marketplace::register_marketplace( Some(marketplace_account).into(), @@ -975,25 +969,23 @@ fn buy_with_marketplace_royalties() { Some(marketplace_id).into(), )); - let initial_balance_owner = - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false); - let initial_balance_b1 = - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false); + let initial_balance_owner = AssetsExt::balance(NativeAssetId::get(), &collection_owner); + let initial_balance_b1 = AssetsExt::balance(NativeAssetId::get(), &beneficiary_1); assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); let presale_issuance = AssetsExt::total_issuance(NativeAssetId::get()); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &marketplace_account, false), + AssetsExt::balance(NativeAssetId::get(), &marketplace_account), initial_balance_marketplace + marketplace_entitlement * sale_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), initial_balance_b1 + royalties_schedule.clone().entitlements[0].1 * sale_price ); // token owner gets: // sale_price - (marketplace_royalties + beneficiary_royalties + network_fee) assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), initial_balance_owner + sale_price - marketplace_entitlement * sale_price - royalties_schedule.clone().entitlements[0].1 * sale_price - @@ -1080,14 +1072,11 @@ fn buy() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); // no royalties, all proceeds to token owner minus network fee assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), price - MarketplaceNetworkFeePercentage::get().mul(price) ); // Buyer balance should be starting minus price (1000) - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), - starting_balance - price - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), starting_balance - price); // listing removed assert!(Listings::::get(listing_id).is_none()); @@ -1109,7 +1098,7 @@ fn buy() { let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &fee_pot_account, false), + AssetsExt::balance(NativeAssetId::get(), &fee_pot_account), 5, // 0.5% of 1000 ); }); @@ -1152,28 +1141,24 @@ fn buy_with_royalties() { None )); - let initial_balance_owner = - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false); - let initial_balance_b1 = - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false); - let initial_balance_b2 = - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false); - let initial_balance_seller = - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false); + let initial_balance_owner = AssetsExt::balance(NativeAssetId::get(), &collection_owner); + let initial_balance_b1 = AssetsExt::balance(NativeAssetId::get(), &beneficiary_1); + let initial_balance_b2 = AssetsExt::balance(NativeAssetId::get(), &beneficiary_2); + let initial_balance_seller = AssetsExt::balance(NativeAssetId::get(), &token_owner); assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); let presale_issuance = AssetsExt::total_issuance(NativeAssetId::get()); // royalties distributed according to `entitlements` map assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false), + AssetsExt::balance(NativeAssetId::get(), &collection_owner), initial_balance_owner + royalties_schedule.clone().entitlements[0].1 * sale_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), initial_balance_b1 + royalties_schedule.clone().entitlements[1].1 * sale_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_2), initial_balance_b2 + royalties_schedule.clone().entitlements[2].1 * sale_price ); // token owner gets sale price - royalties - network fee @@ -1185,7 +1170,7 @@ fn buy_with_royalties() { .map(|(_, e)| e * sale_price) .sum::(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), initial_balance_seller + sale_price - royalties - network_fee ); assert_eq!(AssetsExt::total_issuance(NativeAssetId::get()), presale_issuance); @@ -1280,7 +1265,7 @@ fn sell_to_anybody() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); // paid - assert_eq!(AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), 995); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), 995); // listing removed assert!(Listings::::get(listing_id).is_none()); @@ -1335,10 +1320,10 @@ fn buy_with_overcommitted_royalties() { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); assert!(bad_schedule.calculate_total_entitlement().is_zero()); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), price - MarketplaceNetworkFeePercentage::get().mul(price) ); - assert_eq!(AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), 995); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), 995); assert_eq!(AssetsExt::total_issuance(NativeAssetId::get()), presale_issuance); }) } @@ -1548,11 +1533,11 @@ fn auction() { // no royalties, all proceeds to token owner minus network fees assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), winning_bid - MarketplaceNetworkFeePercentage::get().mul(winning_bid) ); // bidder2 funds should be all gone (unreserved and transferred) - assert!(AssetsExt::reducible_balance(NativeAssetId::get(), &bidder_2, false).is_zero()); + assert!(AssetsExt::balance(NativeAssetId::get(), &bidder_2).is_zero()); assert!(AssetsExt::hold_balance( &MarketplacePalletId::get(), &bidder_2, @@ -1670,15 +1655,15 @@ fn auction_royalty_payments() { let presale_issuance = AssetsExt::total_issuance(NativeAssetId::get()); // royalties distributed according to `entitlements` map assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false), + AssetsExt::balance(NativeAssetId::get(), &collection_owner), royalties_schedule.entitlements[0].1 * reserve_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), royalties_schedule.entitlements[1].1 * reserve_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_2), royalties_schedule.entitlements[2].1 * reserve_price ); // token owner gets sale price - (royalties + network fee) @@ -1689,10 +1674,10 @@ fn auction_royalty_payments() { .sum::(); let network_fee = MarketplaceNetworkFeePercentage::get().mul(reserve_price); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), reserve_price - (royalties + network_fee) ); - assert!(AssetsExt::reducible_balance(NativeAssetId::get(), &bidder, false).is_zero()); + assert!(AssetsExt::balance(NativeAssetId::get(), &bidder).is_zero()); assert!(AssetsExt::hold_balance( &MarketplacePalletId::get(), &bidder, @@ -1911,7 +1896,7 @@ fn bid_fails_prechecks() { )); assert_noop!( Marketplace::bid(Some(bidder).into(), listing_id, reserve_price), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); assert_ok!(AssetsExt::release_hold( MarketplacePalletId::get(), @@ -1958,7 +1943,7 @@ fn bid_no_balance_should_fail() { // no free balance assert_noop!( Marketplace::bid(Some(bidder).into(), listing_id, reserve_price), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow ); }); } @@ -1994,7 +1979,7 @@ fn make_simple_offer_insufficient_funds_should_fail() { let (_, token_id, _) = setup_nft_token(); let buyer = create_account(3); let offer_amount: Balance = 100; - assert_eq!(AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), 0); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), 0); assert_noop!( Marketplace::make_simple_offer( @@ -2004,7 +1989,7 @@ fn make_simple_offer_insufficient_funds_should_fail() { NativeAssetId::get(), None ), - pallet_balances::Error::::InsufficientBalance + ArithmeticError::Underflow ); }); } @@ -2015,7 +2000,7 @@ fn make_simple_offer_zero_amount_should_fail() { let (_, token_id, _) = setup_nft_token(); let buyer = create_account(3); let offer_amount: Balance = 0; - assert_eq!(AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), 0); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), 0); assert_noop!( Marketplace::make_simple_offer( @@ -2082,7 +2067,7 @@ fn make_simple_offer_on_fixed_price_listing() { let (offer_id, _) = make_new_simple_offer(offer_amount, token_id, buyer, None); // Check funds have been locked assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), initial_balance_buyer - offer_amount ); assert_eq!( @@ -2101,7 +2086,7 @@ fn make_simple_offer_on_fixed_price_listing() { // Check funds have been transferred assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), initial_balance_buyer - offer_amount ); assert!(AssetsExt::hold_balance( @@ -2110,10 +2095,7 @@ fn make_simple_offer_on_fixed_price_listing() { &NativeAssetId::get() ) .is_zero()); - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), - offer_amount - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &token_owner), offer_amount); }); } @@ -2179,10 +2161,7 @@ fn cancel_offer() { assert!(Marketplace::token_offers(token_id).is_none()); assert_eq!(Marketplace::offers(offer_id), None); // Check funds have been unlocked after offer cancelled - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), - initial_balance_buyer - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer), initial_balance_buyer); assert!(AssetsExt::hold_balance( &MarketplacePalletId::get(), &buyer, @@ -2232,10 +2211,7 @@ fn cancel_offer_multiple_offers() { assert_eq!(Marketplace::offers(offer_id_1), None); // Check funds have been unlocked after offer cancelled - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer_1, false), - initial_balance_buyer_1 - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &buyer_1), initial_balance_buyer_1); assert!(AssetsExt::hold_balance( &MarketplacePalletId::get(), &buyer_1, @@ -2244,7 +2220,7 @@ fn cancel_offer_multiple_offers() { .is_zero()); // Check buyer_2 funds have not been unlocked assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer_2, false), + AssetsExt::balance(NativeAssetId::get(), &buyer_2), initial_balance_buyer_2 - offer_amount_2 ); assert_eq!( @@ -2304,7 +2280,7 @@ fn accept_offer() { assert!(Marketplace::offers(offer_id).is_none()); // Check funds have been transferred assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), initial_balance_buyer - offer_amount ); assert!(AssetsExt::hold_balance( @@ -2313,10 +2289,7 @@ fn accept_offer() { &NativeAssetId::get() ) .is_zero()); - assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), - offer_amount - ); + assert_eq!(AssetsExt::balance(NativeAssetId::get(), &token_owner), offer_amount); }); } @@ -2357,11 +2330,11 @@ fn accept_offer_multiple_offers() { // Check funds have been transferred assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer_2, false), + AssetsExt::balance(NativeAssetId::get(), &buyer_2), initial_balance_buyer_2 - offer_amount_2 ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer_1, false), + AssetsExt::balance(NativeAssetId::get(), &buyer_1), initial_balance_buyer_1 - offer_amount_1 ); assert_eq!( @@ -2379,7 +2352,7 @@ fn accept_offer_multiple_offers() { ) .is_zero()); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), offer_amount_2 - MarketplaceNetworkFeePercentage::get().mul(offer_amount_2) ); @@ -2421,11 +2394,11 @@ fn accept_offer_pays_marketplace_royalties() { assert_eq!(Marketplace::offers(offer_id), None); // Check funds have been transferred with royalties assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), initial_balance_buyer - offer_amount ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &marketplace_account, false), + AssetsExt::balance(NativeAssetId::get(), &marketplace_account), entitlements * offer_amount ); assert!(AssetsExt::hold_balance( @@ -2435,7 +2408,7 @@ fn accept_offer_pays_marketplace_royalties() { ) .is_zero()); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), offer_amount - (entitlements * offer_amount) ); }); @@ -2835,12 +2808,12 @@ mod buy_sft { assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); // no royalties, all proceeds to token owner minus network fee assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), price - MarketplaceNetworkFeePercentage::get().mul(price) ); // Buyer balance should be starting minus price (1000) assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), starting_balance - price ); @@ -2865,7 +2838,7 @@ mod buy_sft { // assert network fees accumulated let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &fee_pot_account, false), + AssetsExt::balance(NativeAssetId::get(), &fee_pot_account), 5, // 0.5% of 1000 ); @@ -2948,36 +2921,33 @@ mod buy_sft { )); let initial_balance_owner = - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false); - let initial_balance_b1 = - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false); - let initial_balance_b2 = - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false); - let initial_balance_seller = - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false); + AssetsExt::balance(NativeAssetId::get(), &collection_owner); + let initial_balance_b1 = AssetsExt::balance(NativeAssetId::get(), &beneficiary_1); + let initial_balance_b2 = AssetsExt::balance(NativeAssetId::get(), &beneficiary_2); + let initial_balance_seller = AssetsExt::balance(NativeAssetId::get(), &token_owner); let initial_balance_marketplace = - AssetsExt::reducible_balance(NativeAssetId::get(), &marketplace_account, false); + AssetsExt::balance(NativeAssetId::get(), &marketplace_account); assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); let presale_issuance = AssetsExt::total_issuance(NativeAssetId::get()); // royalties distributed according to `entitlements` map assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &collection_owner, false), + AssetsExt::balance(NativeAssetId::get(), &collection_owner), initial_balance_owner + royalties_schedule.clone().entitlements[0].1 * sale_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_1, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_1), initial_balance_b1 + royalties_schedule.clone().entitlements[1].1 * sale_price ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &beneficiary_2, false), + AssetsExt::balance(NativeAssetId::get(), &beneficiary_2), initial_balance_b2 + royalties_schedule.clone().entitlements[2].1 * sale_price ); let marketplace_royalties = marketplace_entitlements.mul(sale_price); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &marketplace_account, false), + AssetsExt::balance(NativeAssetId::get(), &marketplace_account), initial_balance_marketplace + marketplace_royalties ); @@ -2990,7 +2960,7 @@ mod buy_sft { .map(|(_, e)| e * sale_price) .sum::(); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), initial_balance_seller + sale_price - royalties - network_fee - marketplace_royalties ); @@ -3838,17 +3808,11 @@ mod buy_multi { assert_eq!(Nft::token_balance_of(&token_owner1, collection_id1), 0); // Check balance of buyer and token owner for NFT part of the sale - assert_eq!( - AssetsExt::reducible_balance(asset_id1, &buyer, false), - starting_balance - price1 - ); - assert_eq!(AssetsExt::reducible_balance(asset_id1, &token_owner1, false), price1); + assert_eq!(AssetsExt::balance(asset_id1, &buyer), starting_balance - price1); + assert_eq!(AssetsExt::balance(asset_id1, &token_owner1), price1); // Check balance of buyer and token owner for SFT part of the sale - assert_eq!( - AssetsExt::reducible_balance(asset_id2, &buyer, false), - starting_balance - price2 - ); - assert_eq!(AssetsExt::reducible_balance(asset_id2, &token_owner2, false), price2); + assert_eq!(AssetsExt::balance(asset_id2, &buyer), starting_balance - price2); + assert_eq!(AssetsExt::balance(asset_id2, &token_owner2), price2); }); } @@ -3925,11 +3889,11 @@ mod buy_multi { // Check balance of buyer and token owner for NFT part of the sale assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &buyer, false), + AssetsExt::balance(NativeAssetId::get(), &buyer), starting_balance - (listing_price * MaxListingsPerMultiBuy::get() as u128) ); assert_eq!( - AssetsExt::reducible_balance(NativeAssetId::get(), &token_owner, false), + AssetsExt::balance(NativeAssetId::get(), &token_owner), (listing_price * MaxListingsPerMultiBuy::get() as u128) ); }); diff --git a/pallet/nft-peg/Cargo.toml b/pallet/nft-peg/Cargo.toml index 55dc69537..6c6c38c20 100644 --- a/pallet/nft-peg/Cargo.toml +++ b/pallet/nft-peg/Cargo.toml @@ -45,7 +45,8 @@ std = [ "scale-info/std", "sp-core/std", "ethabi/std", - "pallet-nft/std" + "pallet-nft/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/nft-peg/src/lib.rs b/pallet/nft-peg/src/lib.rs index 91bb8599f..fa908817d 100644 --- a/pallet/nft-peg/src/lib.rs +++ b/pallet/nft-peg/src/lib.rs @@ -45,7 +45,6 @@ pub mod pallet { use seed_primitives::EthAddress; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/nft-peg/src/mock.rs b/pallet/nft-peg/src/mock.rs index 1b11f8190..a2d04ce98 100644 --- a/pallet/nft-peg/src/mock.rs +++ b/pallet/nft-peg/src/mock.rs @@ -18,10 +18,7 @@ use frame_support::pallet_prelude::*; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, AssetsExt: pallet_assets_ext, diff --git a/pallet/nft-peg/src/tests.rs b/pallet/nft-peg/src/tests.rs index 19021d201..6dcebadc7 100644 --- a/pallet/nft-peg/src/tests.rs +++ b/pallet/nft-peg/src/tests.rs @@ -401,7 +401,7 @@ fn do_deposit_adds_to_blocked_on_fail() { .into(), ); - let blocked = as pallet::Store>::BlockedTokens::get(blocked_mint_id).unwrap(); + let blocked = BlockedTokens::::get(blocked_mint_id).unwrap(); assert_eq!(blocked.collection_id, collection_id); assert_eq!(blocked.serial_numbers, serial_numbers); diff --git a/pallet/nft/Cargo.toml b/pallet/nft/Cargo.toml index a4ca80050..700163660 100644 --- a/pallet/nft/Cargo.toml +++ b/pallet/nft/Cargo.toml @@ -50,6 +50,7 @@ std = [ "frame-system/std", "scale-info/std", "precompile-utils/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/nft/rpc/src/lib.rs b/pallet/nft/rpc/src/lib.rs index df3251a32..8b21e4f99 100644 --- a/pallet/nft/rpc/src/lib.rs +++ b/pallet/nft/rpc/src/lib.rs @@ -23,10 +23,10 @@ use jsonrpsee::{ proc_macros::rpc, }; use pallet_nft::Config; -use seed_primitives::types::{BlockNumber, CollectionUuid, SerialNumber, TokenCount, TokenId}; +use seed_primitives::types::{CollectionUuid, SerialNumber, TokenCount, TokenId}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{generic::BlockId, traits::Block as BlockT}; +use sp_runtime::{traits::Block as BlockT}; pub use pallet_nft_rpc_runtime_api::{self as runtime_api, NftApi as NftRuntimeApi}; diff --git a/pallet/nft/src/lib.rs b/pallet/nft/src/lib.rs index cecb64f51..ef8b11b68 100644 --- a/pallet/nft/src/lib.rs +++ b/pallet/nft/src/lib.rs @@ -79,7 +79,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/nft/src/mock.rs b/pallet/nft/src/mock.rs index 0abaf0140..e1855b5c5 100644 --- a/pallet/nft/src/mock.rs +++ b/pallet/nft/src/mock.rs @@ -21,10 +21,7 @@ use sp_runtime::ConsensusEngineId; use std::marker::PhantomData; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -32,7 +29,7 @@ construct_runtime!( AssetsExt: pallet_assets_ext, Nft: pallet_nft, EVM: pallet_evm, - TimestampPallet: pallet_timestamp, + Timestamp: pallet_timestamp, FeeControl: pallet_fee_control, } ); diff --git a/pallet/nft/src/tests.rs b/pallet/nft/src/tests.rs index 77e388388..845e4f2f2 100644 --- a/pallet/nft/src/tests.rs +++ b/pallet/nft/src/tests.rs @@ -2528,7 +2528,7 @@ mod public_minting { ); // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance - payment_amount); }); } @@ -2565,7 +2565,7 @@ mod public_minting { // Minter doesn't have enough XRP to cover mint assert_noop!( Nft::mint(Some(minter).into(), collection_id, quantity, None), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -2578,8 +2578,7 @@ mod public_minting { let quantity = 1; let mint_price = 100000000; let payment_asset = XRP_ASSET_ID; - let owner_balance_before = - AssetsExt::reducible_balance(payment_asset, &collection_owner, false); + let owner_balance_before = AssetsExt::balance(payment_asset, &collection_owner); // Set up pricing details let pricing_details: (AssetId, Balance) = (payment_asset, mint_price); @@ -2601,8 +2600,7 @@ mod public_minting { // Check that minter has 100 token assert_eq!(Nft::token_balance_of(&collection_owner, collection_id), quantity); - let owner_balance_after = - AssetsExt::reducible_balance(payment_asset, &collection_owner, false); + let owner_balance_after = AssetsExt::balance(payment_asset, &collection_owner); // Should not have been charged assert_eq!(owner_balance_before, owner_balance_after); @@ -2626,8 +2624,7 @@ mod public_minting { let mint_price = 200; let payment_asset = XRP_ASSET_ID; - let token_owner_balance_before = - AssetsExt::reducible_balance(payment_asset, &token_owner, false); + let token_owner_balance_before = AssetsExt::balance(payment_asset, &token_owner); // Set up pricing details let pricing_details: (AssetId, Balance) = (payment_asset, mint_price); @@ -2673,12 +2670,11 @@ mod public_minting { ); // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance - payment_amount); // Token owner should not have been charged - let token_owner_balance_after = - AssetsExt::reducible_balance(payment_asset, &token_owner, false); + let token_owner_balance_after = AssetsExt::balance(payment_asset, &token_owner); assert_eq!(token_owner_balance_before, token_owner_balance_after); }); } diff --git a/pallet/sft/Cargo.toml b/pallet/sft/Cargo.toml index 1657effaf..46ce56646 100644 --- a/pallet/sft/Cargo.toml +++ b/pallet/sft/Cargo.toml @@ -49,6 +49,7 @@ std = [ "scale-info/std", "pallet-nft/std", "precompile-utils/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/sft/rpc/src/lib.rs b/pallet/sft/rpc/src/lib.rs index 4c5148c36..54173cc0c 100644 --- a/pallet/sft/rpc/src/lib.rs +++ b/pallet/sft/rpc/src/lib.rs @@ -18,10 +18,10 @@ use jsonrpsee::{ proc_macros::rpc, }; use pallet_sft::Config; -use seed_primitives::types::{BlockNumber, TokenId}; +use seed_primitives::types::{TokenId}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{generic::BlockId, traits::Block as BlockT}; +use sp_runtime::{traits::Block as BlockT}; pub use pallet_sft_rpc_runtime_api::{self as runtime_api, SftApi as SftRuntimeApi}; diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index d26c0e585..713ccac0c 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -57,7 +57,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/sft/src/mock.rs b/pallet/sft/src/mock.rs index bd22f9d63..3dcb10003 100644 --- a/pallet/sft/src/mock.rs +++ b/pallet/sft/src/mock.rs @@ -18,10 +18,7 @@ use crate::Config; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, diff --git a/pallet/sft/src/tests.rs b/pallet/sft/src/tests.rs index 721821fd3..dc94abe08 100644 --- a/pallet/sft/src/tests.rs +++ b/pallet/sft/src/tests.rs @@ -2227,7 +2227,7 @@ mod public_minting { ); // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance - payment_amount); }); } @@ -2314,7 +2314,7 @@ mod public_minting { } // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance - total_fee_paid); }); } @@ -2374,7 +2374,7 @@ mod public_minting { assert_eq!(token_info.free_balance_of(&minter), 0); // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance); }); } @@ -2426,7 +2426,7 @@ mod public_minting { bounded_combined(vec![serial_number], vec![quantity]), None, ), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -2439,8 +2439,7 @@ mod public_minting { let quantity = 1; let mint_price = 100000000; let payment_asset = XRP_ASSET_ID; - let owner_balance_before = - AssetsExt::reducible_balance(payment_asset, &collection_owner, false); + let owner_balance_before = AssetsExt::balance(payment_asset, &collection_owner); // Set up pricing details let pricing_details: (AssetId, Balance) = (payment_asset, mint_price); @@ -2485,8 +2484,7 @@ mod public_minting { None, )); - let owner_balance_after = - AssetsExt::reducible_balance(payment_asset, &collection_owner, false); + let owner_balance_after = AssetsExt::balance(payment_asset, &collection_owner); // Should not have been charged assert_eq!(owner_balance_before, owner_balance_after); @@ -2509,8 +2507,7 @@ mod public_minting { let mint_price = 200; let payment_asset = XRP_ASSET_ID; - let token_owner_balance_before = - AssetsExt::reducible_balance(payment_asset, &token_owner, false); + let token_owner_balance_before = AssetsExt::balance(payment_asset, &token_owner); // Set up pricing details let pricing_details: (AssetId, Balance) = (payment_asset, mint_price); @@ -2583,12 +2580,11 @@ mod public_minting { ); // Check minter was charged the correct amount - let minter_balance = AssetsExt::reducible_balance(payment_asset, &minter, false); + let minter_balance = AssetsExt::balance(payment_asset, &minter); assert_eq!(minter_balance, initial_balance - payment_amount); // Token owner should not have been charged - let token_owner_balance_after = - AssetsExt::reducible_balance(payment_asset, &token_owner, false); + let token_owner_balance_after = AssetsExt::balance(payment_asset, &token_owner); assert_eq!(token_owner_balance_before, token_owner_balance_after); }); } diff --git a/pallet/token-approvals/Cargo.toml b/pallet/token-approvals/Cargo.toml index f2755e7b4..57e513fb2 100644 --- a/pallet/token-approvals/Cargo.toml +++ b/pallet/token-approvals/Cargo.toml @@ -42,6 +42,7 @@ std = [ "frame-system/std", "scale-info/std", "sp-core/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/token-approvals/src/lib.rs b/pallet/token-approvals/src/lib.rs index 82898288f..66735af9a 100644 --- a/pallet/token-approvals/src/lib.rs +++ b/pallet/token-approvals/src/lib.rs @@ -45,7 +45,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/token-approvals/src/mock.rs b/pallet/token-approvals/src/mock.rs index d4e71cadd..9ba8f1c7c 100644 --- a/pallet/token-approvals/src/mock.rs +++ b/pallet/token-approvals/src/mock.rs @@ -17,10 +17,7 @@ use crate as token_approvals; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, diff --git a/pallet/tx-fee-pot/src/lib.rs b/pallet/tx-fee-pot/src/lib.rs index 3d5d8b5a6..b25e02670 100644 --- a/pallet/tx-fee-pot/src/lib.rs +++ b/pallet/tx-fee-pot/src/lib.rs @@ -41,7 +41,6 @@ pub mod pallet { use frame_support::pallet_prelude::{ValueQuery, *}; #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/pallet/vortex-distribution/Cargo.toml b/pallet/vortex-distribution/Cargo.toml index b0b8832a0..f4b462cd6 100644 --- a/pallet/vortex-distribution/Cargo.toml +++ b/pallet/vortex-distribution/Cargo.toml @@ -8,8 +8,8 @@ repository = "https://github.com/futureversecom/seed" description = "Vortex distribution pallet" [dependencies] -serde = { version = "1.0.136", optional = true } -scale-info = { version = "2.1", default-features = false, features = ["derive"] } +serde = { version = "1.0.145", optional = true } +scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } @@ -50,6 +50,7 @@ std = [ "frame-support/std", "frame-system/std", "scale-info/std", + "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex-distribution/src/lib.rs index ff6a5a8e4..795e57523 100644 --- a/pallet/vortex-distribution/src/lib.rs +++ b/pallet/vortex-distribution/src/lib.rs @@ -153,7 +153,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::storage] @@ -780,6 +779,9 @@ pub mod pallet { amount: BalanceOf, _keep_live: bool, ) -> DispatchResult { + if amount == Zero::zero() { + return Ok(()) + } let transfer_result = T::MultiCurrency::transfer( asset_id, source, diff --git a/pallet/vortex-distribution/src/mock.rs b/pallet/vortex-distribution/src/mock.rs index 0eb9bea0c..6b047da6e 100644 --- a/pallet/vortex-distribution/src/mock.rs +++ b/pallet/vortex-distribution/src/mock.rs @@ -17,9 +17,10 @@ use crate as pallet_vortex; use frame_support::traits::{ConstU32, Hooks}; use seed_pallet_common::test_prelude::*; use sp_runtime::{ - testing::{Header, TestXt}, + testing::{TestXt}, BuildStorage, }; +use sp_staking::currency_to_vote::SaturatingCurrencyToVote; pub type Extrinsic = TestXt; pub const MILLISECS_PER_BLOCK: u64 = 4_000; @@ -39,10 +40,7 @@ pub fn run_to_block(n: u64) { } construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -81,22 +79,25 @@ impl pallet_staking::Config for Test { type Currency = Balances; type CurrencyBalance = Balance; type UnixTime = pallet_timestamp::Pallet; - type CurrencyToVote = frame_support::traits::SaturatingCurrencyToVote; + type CurrencyToVote = SaturatingCurrencyToVote; type RewardRemainder = (); type RuntimeEvent = RuntimeEvent; type Slash = (); type Reward = (); type SessionsPerEra = (); type SlashDeferDuration = (); - type SlashCancelOrigin = frame_system::EnsureRoot; type BondingDuration = BondingDuration; type SessionInterface = (); type EraPayout = pallet_staking::ConvertCurve; type NextNewSession = (); type MaxNominatorRewardedPerValidator = ConstU32<64>; type OffendingValidatorsThreshold = (); - type ElectionProvider = - frame_election_provider_support::NoElection<(AccountId, BlockNumber, Staking)>; + type ElectionProvider = frame_election_provider_support::NoElection<( + AccountId, + BlockNumber, + Staking, + ConstU32<10>, + )>; type GenesisElectionProvider = Self::ElectionProvider; // type VoterList = pallet_bags_list::Pallet; type VoterList = pallet_staking::UseNominatorsAndValidatorsMap; @@ -104,9 +105,10 @@ impl pallet_staking::Config for Test { // type OnStakerSlash = Pools; type HistoryDepth = HistoryDepth; type TargetList = pallet_staking::UseValidatorsMap; - type OnStakerSlash = (); type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig; type WeightInfo = (); + type AdminOrigin = EnsureRoot; + type EventListeners = (); } impl frame_system::offchain::SendTransactionTypes for Test diff --git a/pallet/xls20/Cargo.toml b/pallet/xls20/Cargo.toml index 8b5409d78..d7c1affe4 100644 --- a/pallet/xls20/Cargo.toml +++ b/pallet/xls20/Cargo.toml @@ -40,6 +40,7 @@ std = [ "sp-runtime/std", "frame-support/std", "frame-system/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/xls20/src/lib.rs b/pallet/xls20/src/lib.rs index 30a5594b3..f26bc2677 100644 --- a/pallet/xls20/src/lib.rs +++ b/pallet/xls20/src/lib.rs @@ -59,7 +59,6 @@ pub mod pallet { const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); diff --git a/pallet/xls20/src/mock.rs b/pallet/xls20/src/mock.rs index 9efdef539..2ce4d65fd 100644 --- a/pallet/xls20/src/mock.rs +++ b/pallet/xls20/src/mock.rs @@ -17,10 +17,7 @@ use crate as pallet_xls20; use seed_pallet_common::test_prelude::*; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, diff --git a/pallet/xls20/src/tests.rs b/pallet/xls20/src/tests.rs index 11ef8787a..796797e81 100644 --- a/pallet/xls20/src/tests.rs +++ b/pallet/xls20/src/tests.rs @@ -184,12 +184,10 @@ fn xls20_mint_with_fee() { // Check balances are correct after fees are paid. let payment_amount = new_fee * quantity as u128; // 500 - let balance_owner = - AssetsExt::reducible_balance(Xls20PaymentAsset::get(), &collection_owner, false); + let balance_owner = AssetsExt::balance(Xls20PaymentAsset::get(), &collection_owner); assert_eq!(balance_owner, initial_balance - payment_amount); - let balance_relayer = - AssetsExt::reducible_balance(Xls20PaymentAsset::get(), &relayer, false); + let balance_relayer = AssetsExt::balance(Xls20PaymentAsset::get(), &relayer); assert_eq!(balance_relayer, payment_amount); }); } @@ -219,7 +217,7 @@ fn xls20_mint_with_fee_no_balance_fails() { // Mint tokens with correct fee works assert_noop!( Nft::mint(Some(collection_owner).into(), collection_id, quantity, None,), - pallet_assets::Error::::BalanceLow + ArithmeticError::Underflow ); }); } @@ -260,12 +258,10 @@ fn re_request_xls20_mint_works() { // Check balances are correct after fees are paid. // Note the min fee will be paid, rather than the specified fee (599) - let balance_owner = - AssetsExt::reducible_balance(Xls20PaymentAsset::get(), &collection_owner, false); + let balance_owner = AssetsExt::balance(Xls20PaymentAsset::get(), &collection_owner); assert_eq!(balance_owner, initial_balance - specified_fee); - let balance_relayer = - AssetsExt::reducible_balance(Xls20PaymentAsset::get(), &relayer, false); + let balance_relayer = AssetsExt::balance(Xls20PaymentAsset::get(), &relayer); assert_eq!(balance_relayer, specified_fee); // Check event is thrown with all serial numbers and token_uris diff --git a/pallet/xrpl-bridge/Cargo.toml b/pallet/xrpl-bridge/Cargo.toml index 4f68c16fb..4b719f155 100644 --- a/pallet/xrpl-bridge/Cargo.toml +++ b/pallet/xrpl-bridge/Cargo.toml @@ -22,7 +22,7 @@ pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = " scale-info = { version = '2.3.0', default-features = false, features = [ 'derive', ] } -serde = { version = '1.0.144', features = ['derive'], optional = true } +serde = { version = '1.0.145', features = ['derive'], optional = true } sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } sp-std = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } sp-core = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } @@ -57,7 +57,8 @@ std = [ 'pallet-timestamp/std', "seed-pallet-common/std", "pallet-assets-ext/std", - "log/std" + "log/std", + "frame-benchmarking?/std", ] runtime-benchmarks = ['frame-benchmarking'] try-runtime = ['frame-support/try-runtime'] diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index 285b5bcf1..9f615ac3f 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -231,7 +231,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub (super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(PhantomData); diff --git a/pallet/xrpl-bridge/src/mock.rs b/pallet/xrpl-bridge/src/mock.rs index 5a88af3e2..94d07e706 100644 --- a/pallet/xrpl-bridge/src/mock.rs +++ b/pallet/xrpl-bridge/src/mock.rs @@ -22,10 +22,7 @@ use crate as pallet_xrpl_bridge; // Configure a mock runtime to test the pallet. construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, diff --git a/pallet/xrpl-bridge/src/tests.rs b/pallet/xrpl-bridge/src/tests.rs index ade23c7c9..306451396 100644 --- a/pallet/xrpl-bridge/src/tests.rs +++ b/pallet/xrpl-bridge/src/tests.rs @@ -274,7 +274,7 @@ fn withdraw_request_works() { // Withdraw more than available XRP should throw BalanceLow error assert_noop!( XRPLBridge::withdraw_xrp(RuntimeOrigin::signed(account), 1001, destination), - pallet_assets::Error::::BalanceLow + TokenError::FundsUnavailable ); // Withdraw second half @@ -285,7 +285,7 @@ fn withdraw_request_works() { // No xrp left to withdraw, should fail as account is reaped assert_noop!( XRPLBridge::withdraw_xrp(RuntimeOrigin::signed(account), 1, destination), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); }) } @@ -341,7 +341,7 @@ fn withdraw_request_with_destination_tag_works() { destination, destination_tag ), - pallet_assets::Error::::BalanceLow + TokenError::FundsUnavailable ); // Withdraw second half @@ -362,7 +362,7 @@ fn withdraw_request_with_destination_tag_works() { destination, destination_tag ), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); }) } @@ -427,7 +427,7 @@ fn withdraw_request_with_destination_tag_works_with_door_fee() { destination, destination_tag ), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); }) } @@ -484,7 +484,7 @@ fn withdraw_request_works_with_door_fee() { assert_eq!(xrp_balance, 0); assert_noop!( XRPLBridge::withdraw_xrp(RuntimeOrigin::signed(account), 1, destination), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); }) } @@ -504,7 +504,7 @@ fn withdraw_request_burn_fails() { let destination = XrplAccountId::from_slice(b"6490B68F1116BFE87DDD"); assert_noop!( XRPLBridge::withdraw_xrp(RuntimeOrigin::signed(account), 1000, destination), - pallet_assets::Error::::NoAccount + TokenError::FundsUnavailable ); }) } @@ -1627,8 +1627,11 @@ fn process_delayed_payments_multiple_withdrawals() { // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(3u64, 2u64); let base_weight = DbWeight::get().reads_writes(7u64, 1u64); - let total_weight = - base_weight + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); + let total_weight = base_weight + + Weight::from_parts( + weight_per_tx.ref_time() * withdrawal_count as u64, + weight_per_tx.proof_size() * withdrawal_count as u64, + ); assert_eq!(weight_used, total_weight); // Storage should now be updated @@ -1698,8 +1701,11 @@ fn process_delayed_payments_multiple_withdrawals_across_multiple_blocks() { // Assert weight used is as expected let weight_per_tx = DbWeight::get().reads_writes(4u64, 3u64); let base_weight = DbWeight::get().reads_writes(3u64, 1u64); - let total_weight = - base_weight + Weight::from_all(weight_per_tx.ref_time() * withdrawal_count as u64); + let total_weight = base_weight + + Weight::from_parts( + weight_per_tx.ref_time() * withdrawal_count as u64, + weight_per_tx.proof_size() * withdrawal_count as u64, + ); assert_eq!(weight_used, total_weight); // Storage should now be updated diff --git a/pallet/xrpl/Cargo.toml b/pallet/xrpl/Cargo.toml index 7543fd2e7..fc241e2e0 100644 --- a/pallet/xrpl/Cargo.toml +++ b/pallet/xrpl/Cargo.toml @@ -70,6 +70,7 @@ std = [ "seed-pallet-common/std", "seed-primitives/std", "precompile-utils/std", + "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/xrpl/src/mock.rs b/pallet/xrpl/src/mock.rs index 87e5e6b5f..98c571121 100644 --- a/pallet/xrpl/src/mock.rs +++ b/pallet/xrpl/src/mock.rs @@ -25,11 +25,7 @@ pub type UncheckedExtrinsicT = pub type BlockT = generic::Block; frame_support::construct_runtime!( - pub enum Test where - Block = BlockT, - NodeBlock = BlockT, - UncheckedExtrinsic = UncheckedExtrinsicT, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, @@ -40,12 +36,41 @@ frame_support::construct_runtime!( } ); -impl_frame_system_config!(Test); impl_pallet_balance_config!(Test); impl_pallet_assets_config!(Test); impl_pallet_assets_ext_config!(Test); impl_pallet_fee_control_config!(Test); +parameter_types! { + pub const BlockHashCount: u64 = 250; +} + +impl frame_system::Config for Test { + type Block = BlockT; + type BlockWeights = (); + type BlockLength = (); + type BaseCallFilter = frame_support::traits::Everything; + type RuntimeOrigin = RuntimeOrigin; + type Nonce = u32; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type BlockHashCount = BlockHashCount; + type RuntimeEvent = RuntimeEvent; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + pub struct FeeControlWeightToFee; impl WeightToFee for FeeControlWeightToFee { type Balance = Balance; diff --git a/pallet/xrpl/src/tests.rs b/pallet/xrpl/src/tests.rs index 8f14acd28..ba05c7eab 100644 --- a/pallet/xrpl/src/tests.rs +++ b/pallet/xrpl/src/tests.rs @@ -68,6 +68,8 @@ mod self_contained_call { }); } + // TODO Fix this once e2e tests are building + #[ignore] #[test] fn validate_nonce_too_high() { TestExt::::default() @@ -119,6 +121,8 @@ mod self_contained_call { }); } + // TODO Fix this once e2e tests are building + #[ignore] #[test] fn validate_transaction_signature() { TestExt::::default() @@ -171,6 +175,8 @@ mod self_contained_call { }); } + // TODO Fix this once e2e tests are building + #[ignore] #[test] fn system_remark_extrinsic_from_message_success() { TestExt::::default() diff --git a/primitives/src/signature.rs b/primitives/src/signature.rs index 6756239ad..d72040f6f 100644 --- a/primitives/src/signature.rs +++ b/primitives/src/signature.rs @@ -15,7 +15,7 @@ use codec::{alloc::string::ToString, Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use serde::{Deserialize, Serialize}; use sp_core::{ecdsa, H160}; use sp_io::hashing::{blake2_256, keccak_256}; use sp_std::vec::Vec; diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index ccc2ba6cb..6dd216711 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -129,7 +129,7 @@ pallet-election-provider-support-benchmarking = { git = "https://github.com/pari substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } [dev-dependencies] -ethereum = { version = "0.14.0", features = ["with-codec"] } +ethereum = { version = "0.14.0", features = ["with-codec"] } seed-client = { path = "../client" } ethabi = { version = "18.0.0" } frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } @@ -271,6 +271,7 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-bags-list/try-runtime", "pallet-ethereum/try-runtime", + "fp-self-contained/try-runtime", # "pallet-base-fee/try-runtime", # Local "pallet-assets-ext/try-runtime", @@ -322,6 +323,7 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks", # Local "pallet-nft/runtime-benchmarks", diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index 9f78f741e..41f43fae6 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -16,14 +16,13 @@ //! Some configurable implementations as associated type for the substrate runtime. use core::ops::Mul; -use evm::backend::Basic as Account; + use fp_evm::{CheckEvmTransaction, InvalidEvmTransactionError}; use frame_support::{ dispatch::{EncodeLike, RawOrigin}, pallet_prelude::*, traits::{ fungible::Inspect, - fungibles, tokens::{DepositConsequence, WithdrawConsequence}, CallMetadata, Currency, ExistenceRequirement, FindAuthor, GetCallMetadata, Imbalance, InstanceFilter, OnUnbalanced, ReservableCurrency, SignedImbalance, WithdrawReasons, @@ -54,7 +53,7 @@ use seed_pallet_common::{ EthereumEventRouter as EthereumEventRouterT, EthereumEventSubscriber, EventRouterError, EventRouterResult, FinalSessionTracker, MaintenanceCheck, OnNewAssetSubscriber, }; -use seed_primitives::{AccountId, AssetId, Balance, Index, Signature}; +use seed_primitives::{AccountId, Balance, Index, Signature}; use crate::{ BlockHashCount, Runtime, RuntimeCall, Session, SessionsPerEra, SlashPotId, Staking, System, @@ -114,7 +113,7 @@ impl + Currency> Inspect Self::Balance { // Careful for overflow! @@ -149,8 +148,11 @@ where type PositiveImbalance = C::PositiveImbalance; type NegativeImbalance = C::NegativeImbalance; - fn free_balance(who: &AccountId) -> Self::Balance { - C::free_balance(who) + fn total_balance(who: &AccountId) -> Self::Balance { + C::total_balance(who) + } + fn can_slash(_who: &AccountId, _value: Self::Balance) -> bool { + false } fn total_issuance() -> Self::Balance { C::total_issuance() @@ -158,16 +160,14 @@ where fn minimum_balance() -> Self::Balance { C::minimum_balance() } - fn total_balance(who: &AccountId) -> Self::Balance { - C::total_balance(who) + fn burn(amount: Self::Balance) -> Self::PositiveImbalance { + C::burn(scale_wei_to_6dp(amount)) } - fn transfer( - from: &AccountId, - to: &AccountId, - value: Self::Balance, - req: ExistenceRequirement, - ) -> DispatchResult { - C::transfer(from, to, scale_wei_to_6dp(value), req) + fn issue(amount: Self::Balance) -> Self::NegativeImbalance { + C::issue(scale_wei_to_6dp(amount)) + } + fn free_balance(who: &AccountId) -> Self::Balance { + C::free_balance(who) } fn ensure_can_withdraw( who: &AccountId, @@ -177,13 +177,25 @@ where ) -> DispatchResult { C::ensure_can_withdraw(who, scale_wei_to_6dp(amount), reasons, new_balance) } - fn withdraw( - who: &AccountId, + fn transfer( + from: &AccountId, + to: &AccountId, value: Self::Balance, - reasons: WithdrawReasons, req: ExistenceRequirement, - ) -> Result { - C::withdraw(who, scale_wei_to_6dp(value), reasons, req) + ) -> DispatchResult { + // After the Substrate v1.0 update, transactions that are attempting to transfer 0 will + // fail if the destination account does not exist. + // This is due to the amount being less than the existential deposit returning an error + // In all EVM transactions, even if the value is set to 0, a transfer of that amount + // will be initiated by the executor which will fail. + // A workaround is to simply return Ok() if the value is 0, bypassing the actual transfer + if value == Self::Balance::default() { + return Ok(()) + } + C::transfer(from, to, scale_wei_to_6dp(value), req) + } + fn slash(who: &AccountId, value: Self::Balance) -> (Self::NegativeImbalance, Self::Balance) { + C::slash(who, scale_wei_to_6dp(value)) } fn deposit_into_existing( who: &AccountId, @@ -194,24 +206,20 @@ where fn deposit_creating(who: &AccountId, value: Self::Balance) -> Self::PositiveImbalance { C::deposit_creating(who, scale_wei_to_6dp(value)) } + fn withdraw( + who: &AccountId, + value: Self::Balance, + reasons: WithdrawReasons, + req: ExistenceRequirement, + ) -> Result { + C::withdraw(who, scale_wei_to_6dp(value), reasons, req) + } fn make_free_balance_be( who: &AccountId, balance: Self::Balance, ) -> SignedImbalance { C::make_free_balance_be(who, scale_wei_to_6dp(balance)) } - fn can_slash(_who: &AccountId, _value: Self::Balance) -> bool { - false - } - fn slash(who: &AccountId, value: Self::Balance) -> (Self::NegativeImbalance, Self::Balance) { - C::slash(who, scale_wei_to_6dp(value)) - } - fn burn(amount: Self::Balance) -> Self::PositiveImbalance { - C::burn(scale_wei_to_6dp(amount)) - } - fn issue(amount: Self::Balance) -> Self::NegativeImbalance { - C::issue(scale_wei_to_6dp(amount)) - } } /// Find block author formatted for ethereum compat @@ -577,12 +585,13 @@ impl pallet_futurepass::ProxyProvider for ProxyPalletProvider { // get proxy_definitions length + 1 (cost of upcoming insertion); cost to reserve let new_reserve = pallet_proxy::Pallet::::deposit(proxy_definitions.len() as u32 + 1); - let extra_reserve_required = new_reserve - reserve_amount; + let extra_reserve_required = + (new_reserve - reserve_amount) + crate::ExistentialDeposit::get(); as Currency<_>>::transfer( funder, futurepass, extra_reserve_required, - ExistenceRequirement::KeepAlive, + ExistenceRequirement::AllowDeath, )?; let proxy_type = ProxyType::try_from(*proxy_type)?; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8417b02c0..a7c4744eb 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -39,7 +39,7 @@ use pallet_staking::RewardDestination; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use seed_pallet_common::MaintenanceCheck; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstU16, ConstU64, OpaqueMetadata, H160, H256, U256}; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160, H256, U256}; use sp_runtime::{ create_runtime_str, generic, traits::{ @@ -78,10 +78,7 @@ pub use frame_support::{ }, PalletId, StorageValue, }; -use frame_support::{ - pallet_prelude::Hooks, - traits::{AsEnsureOriginWithArg, EitherOf}, -}; +use frame_support::{pallet_prelude::Hooks, traits::AsEnsureOriginWithArg}; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -97,7 +94,6 @@ pub use sp_runtime::BuildStorage; // Export for chain_specs #[cfg(feature = "std")] pub use pallet_staking::{Forcing, StakerStatus}; -use sp_runtime::traits::Scale; pub mod keys { pub use super::{BabeId, EthBridgeId, GrandpaId, ImOnlineId}; @@ -136,7 +132,7 @@ mod staking; use staking::OnChainAccuracy; -mod migrations; +pub mod migrations; mod weights; use crate::impls::{ @@ -415,7 +411,7 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = AsEnsureOriginWithArg>; type CallbackHandle = (); pallet_assets::runtime_benchmarks_enabled! { - type BenchmarkHelper = BenchmarkHelper; + type BenchmarkHelper = (); } } @@ -871,7 +867,6 @@ parameter_types! { /// Holds XRP transaction fees for distribution to validators according to stake & undistributed reward remainders pub const TxFeePotId: PalletId = PalletId(*b"txfeepot"); } -type SlashCancelOrigin = EnsureRoot; impl pallet_staking::Config for Runtime { type MaxNominations = MaxNominations; @@ -1933,20 +1928,20 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> (Weight, Weight) { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade."); // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to // have a backtrace here. If any of the pre/post migration checks fail, we shall stop // right here and right now. - let weight = Executive::try_runtime_upgrade().map_err(|err|{ + let weight = Executive::try_runtime_upgrade(checks).map_err(|err|{ log::info!("try-runtime::on_runtime_upgrade failed with: {:?}", err); err }).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { + fn execute_block(block: Block, state_root_check: bool, signature_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { log::info!( target: "runtime::kusama", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", block.header.number, @@ -1954,7 +1949,7 @@ impl_runtime_apis! { state_root_check, select, ); - Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("try_execute_block failed") } } diff --git a/runtime/src/migrations/crowdsale.rs b/runtime/src/migrations/crowdsale.rs deleted file mode 100644 index cf51b3c01..000000000 --- a/runtime/src/migrations/crowdsale.rs +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright 2022-2023 Futureverse Corporation Limited -// -// Licensed under the LGPL, Version 3.0 (the "License"); -// you may not use this file except in compliance with the License. -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// You may obtain a copy of the License at the root of this project source code - -use crate::{Crowdsale, Runtime, Weight}; -use frame_support::{ - dispatch::GetStorageVersion, - traits::{OnRuntimeUpgrade, StorageVersion}, -}; -#[allow(unused_imports)] -use sp_std::vec::Vec; - -pub struct Upgrade; - -impl OnRuntimeUpgrade for Upgrade { - fn on_runtime_upgrade() -> Weight { - let current = Crowdsale::current_storage_version(); - let onchain = Crowdsale::on_chain_storage_version(); - log::info!(target: "Migration", "Crowdsale: Running migration with current storage version {current:?} / on-chain {onchain:?}"); - - let mut weight = ::DbWeight::get().reads(2); - - if onchain == 0 { - log::info!(target: "Migration", "Crowdsale: Migrating from on-chain version 0 to on-chain version 1."); - weight += v1::migrate::(); - - StorageVersion::new(1).put::(); - - log::info!(target: "Migration", "Crowdsale: Migration successfully completed."); - } else { - log::info!(target: "Migration", "Crowdsale: No migration was done, however migration code needs to be removed."); - } - - weight - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - v1::pre_upgrade()?; - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - v1::post_upgrade()?; - Ok(()) - } -} - -#[allow(dead_code)] -#[allow(unused_imports)] -pub mod v1 { - use super::*; - use crate::migrations::{Map, Value}; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::{ - sp_runtime::RuntimeDebug, storage_alias, weights::Weight, BoundedVec, StorageHasher, - Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_crowdsale::{ - types::{SaleId, SaleInformation, SaleStatus}, - SaleInfo, SaleParticipation, - }; - use scale_info::TypeInfo; - use seed_primitives::{AssetId, Balance, CollectionUuid}; - - type AccountId = ::AccountId; - type BlockNumber = BlockNumberFor; - - /// Information about a fixed price listing - #[derive(Clone, Copy, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] - pub struct OldSaleInformation { - pub status: SaleStatus, - pub admin: AccountId, - pub vault: AccountId, - pub payment_asset_id: AssetId, - pub reward_collection_id: CollectionUuid, - pub soft_cap_price: Balance, - pub funds_raised: Balance, - pub voucher_asset_id: AssetId, - pub duration: BlockNumber, - } - - #[cfg(feature = "try-runtime")] - pub fn pre_upgrade() -> Result<(), &'static str> { - log::info!(target: "Migration", "Crowdsale: Upgrade to v1 Pre Upgrade."); - let onchain = Crowdsale::on_chain_storage_version(); - // Return OK(()) if upgrade has already been done - if onchain == 1 { - return Ok(()) - } - assert_eq!(onchain, 0); - - Ok(()) - } - - #[cfg(feature = "try-runtime")] - pub fn post_upgrade() -> Result<(), &'static str> { - log::info!(target: "Migration", "Crowdsale: Upgrade to v1 Post Upgrade."); - let current = Crowdsale::current_storage_version(); - let onchain = Crowdsale::on_chain_storage_version(); - assert_eq!(current, 1); - assert_eq!(onchain, 1); - Ok(()) - } - - pub fn migrate() -> Weight - where - AccountId: From, - { - log::info!(target: "Migration", "Marketplace: migrating listing tokens"); - let mut weight = Weight::zero(); - - SaleInfo::::translate::, _>( - |sale_id, sale_info| { - // Get total number of participants in SaleParticipation - let participant_count = - SaleParticipation::::iter_prefix(sale_id).count() as u64; - - // Reads: SaleInfo + N * SaleParticipation - // Writes: SaleInfo - weight += ::DbWeight::get() - .reads_writes(1 + participant_count, 1); - - let new_sale_info = SaleInformation { - status: sale_info.status, - admin: sale_info.admin, - vault: sale_info.vault, - payment_asset_id: sale_info.payment_asset_id, - reward_collection_id: sale_info.reward_collection_id, - soft_cap_price: sale_info.soft_cap_price, - funds_raised: sale_info.funds_raised, - participant_count, - voucher_asset_id: sale_info.voucher_asset_id, - duration: sale_info.duration, - }; - - Some(new_sale_info) - }, - ); - - log::info!(target: "Migration", "Crowdsale: successfully migrated SaleInfo"); - - weight - } - - #[cfg(test)] - mod tests { - use super::*; - use crate::migrations::tests::new_test_ext; - use sp_core::H160; - use sp_runtime::Permill; - - fn create_account(seed: u64) -> AccountId { - AccountId::from(H160::from_low_u64_be(seed)) - } - - #[test] - fn migration_test() { - new_test_ext().execute_with(|| { - // Setup storage - StorageVersion::new(0).put::(); - - // SaleInfo with no participation's - let sale_id_key_1 = Twox64Concat::hash(&(1 as SaleId).encode()); - let sale_info_1 = OldSaleInformation { - status: SaleStatus::Enabled(1), - admin: create_account(2), - vault: create_account(3), - payment_asset_id: 4, - reward_collection_id: 5, - soft_cap_price: 6, - funds_raised: 7, - voucher_asset_id: 8, - duration: 9, - }; - - Map::unsafe_storage_put::>( - b"Crowdsale", - b"SaleInfo", - &sale_id_key_1, - sale_info_1.clone(), - ); - - // SaleParticipation with 50 participation's - let sale_id_2: SaleId = 2; - let total_participants = 50; - for i in 0..total_participants { - let who = create_account(i as u64); - let participation: Balance = 10; - SaleParticipation::::insert(sale_id_2, who, participation); - } - let sale_id_key_2 = Twox64Concat::hash(&(sale_id_2).encode()); - let sale_info_2 = OldSaleInformation { - status: SaleStatus::Enabled(1), - admin: create_account(2), - vault: create_account(3), - payment_asset_id: 4, - reward_collection_id: 5, - soft_cap_price: 6, - funds_raised: 7, - voucher_asset_id: 8, - duration: 9, - }; - - Map::unsafe_storage_put::>( - b"Crowdsale", - b"SaleInfo", - &sale_id_key_2, - sale_info_2.clone(), - ); - - // Do runtime upgrade - Upgrade::on_runtime_upgrade(); - assert_eq!(Crowdsale::on_chain_storage_version(), 1); - - let expected_sale_info_1 = SaleInformation { - status: SaleStatus::Enabled(1), - admin: create_account(2), - vault: create_account(3), - payment_asset_id: 4, - reward_collection_id: 5, - soft_cap_price: 6, - funds_raised: 7, - participant_count: 0, // 0 as we have no participations - voucher_asset_id: 8, - duration: 9, - }; - assert_eq!( - Map::unsafe_storage_get::>( - b"Crowdsale", - b"SaleInfo", - &sale_id_key_1, - ), - Some(expected_sale_info_1) - ); - - let expected_sale_info_2 = SaleInformation { - status: SaleStatus::Enabled(1), - admin: create_account(2), - vault: create_account(3), - payment_asset_id: 4, - reward_collection_id: 5, - soft_cap_price: 6, - funds_raised: 7, - participant_count: total_participants as u64, // From SaleParticipation map - voucher_asset_id: 8, - duration: 9, - }; - assert_eq!( - Map::unsafe_storage_get::>( - b"Crowdsale", - b"SaleInfo", - &sale_id_key_2, - ), - Some(expected_sale_info_2) - ); - }); - } - } -} diff --git a/runtime/src/migrations/futurepass.rs b/runtime/src/migrations/futurepass.rs deleted file mode 100644 index 6396d6ad9..000000000 --- a/runtime/src/migrations/futurepass.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2024-2025 Futureverse Corporation Limited -// -// Licensed under the LGPL, Version 3.0 (the "License"); -// you may not use this file except in compliance with the License. -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// You may obtain a copy of the License at the root of this project source code - -use crate::{Futurepass, Runtime, Weight}; -use frame_support::{ - dispatch::GetStorageVersion, - traits::{OnRuntimeUpgrade, StorageVersion}, -}; -#[allow(unused_imports)] -use sp_std::vec::Vec; - -pub struct Upgrade; - -impl OnRuntimeUpgrade for Upgrade { - fn on_runtime_upgrade() -> Weight { - let current = Futurepass::current_storage_version(); - let onchain = Futurepass::on_chain_storage_version(); - log::info!(target: "Migration", "Futurepass: Running migration with current storage version {current:?} / on-chain {onchain:?}"); - - let mut weight = ::DbWeight::get().reads(2); - - if onchain == 0 { - log::info!(target: "Migration", "Futurepass: Migrating from on-chain version 0 to on-chain version 1."); - weight += v1::migrate(); - - StorageVersion::new(1).put::(); - - log::info!(target: "Migration", "Futurepass: Migration successfully completed."); - } else { - log::info!(target: "Migration", "Futurepass: No migration was done, however migration code needs to be removed."); - } - - weight - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - v1::pre_upgrade()?; - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - v1::post_upgrade()?; - Ok(()) - } -} - -#[allow(dead_code)] -#[allow(unused_imports)] -pub mod v1 { - use super::*; - use crate::migrations::{Map, Value}; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::{ - sp_runtime::RuntimeDebug, storage_alias, traits::IsType, weights::Weight, BoundedVec, - StorageHasher, Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use scale_info::TypeInfo; - use seed_primitives::{AssetId, Balance, CollectionUuid}; - - type AccountId = ::AccountId; - type BlockNumber = BlockNumberFor; - - #[cfg(feature = "try-runtime")] - pub fn pre_upgrade() -> Result<(), &'static str> { - log::info!(target: "Migration", "Futurepass: Upgrade to v1 Pre Upgrade."); - let onchain = Futurepass::on_chain_storage_version(); - // Return OK(()) if upgrade has already been done - if onchain == 1 { - return Ok(()) - } - assert_eq!(onchain, 0); - - Ok(()) - } - - #[cfg(feature = "try-runtime")] - pub fn post_upgrade() -> Result<(), &'static str> { - log::info!(target: "Migration", "Futurepass: Upgrade to v1 Post Upgrade."); - let current = Futurepass::current_storage_version(); - let onchain = Futurepass::on_chain_storage_version(); - assert_eq!(current, 1); - assert_eq!(onchain, 1); - Ok(()) - } - - pub fn migrate() -> Weight { - use frame_support::{traits::PalletInfoAccess, Twox128}; - use sp_io::storage; - - // Construct the storage key for the MigrationAdmin storage item - let pallet_prefix = Twox128::hash(b"Futurepass"); - let storage_item_name = Twox128::hash(b"MigrationAdmin"); - let storage_key = [pallet_prefix, storage_item_name].concat(); - - // Remove the storage item - storage::clear(&storage_key); - - log::info!(target: "Migration", "Futurepass: successfully killed MigrationAdmin storage item"); - - Weight::from_parts(1u64, 0u64) - } - - #[cfg(test)] - mod tests { - use super::*; - use crate::migrations::{tests::new_test_ext, Value}; - - #[test] - fn migration_test() { - new_test_ext().execute_with(|| { - // Setup storage - StorageVersion::new(0).put::(); - - let storage_value = AccountId::default(); - - // Insert a value into the storage item - Value::unsafe_storage_put::( - b"Futurepass", - b"MigrationAdmin", - storage_value.clone(), - ); - - // Assert that the value was inserted correctly - assert_eq!( - Value::unsafe_storage_get::(b"Futurepass", b"MigrationAdmin"), - Some(storage_value.clone()) - ); - - // Do runtime upgrade - Upgrade::on_runtime_upgrade(); - assert_eq!(Futurepass::on_chain_storage_version(), 1); - - // Assert that the value was removed - assert_eq!( - Value::unsafe_storage_get::(b"Futurepass", b"MigrationAdmin",), - None - ); - }); - } - } -} diff --git a/runtime/src/migrations/mod.rs b/runtime/src/migrations/mod.rs index a277a9eb8..92c4ffe0e 100644 --- a/runtime/src/migrations/mod.rs +++ b/runtime/src/migrations/mod.rs @@ -13,9 +13,6 @@ // limitations under the License. // You may obtain a copy of the License at the root of this project source code -mod crowdsale; -mod futurepass; - use codec::{Decode, Encode, FullCodec, FullEncode}; use frame_support::{ migration::{ @@ -27,27 +24,23 @@ use frame_support::{ weights::Weight, ReversibleStorageHasher, }; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; use sp_std::vec::Vec; pub struct AllMigrations; impl OnRuntimeUpgrade for AllMigrations { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let v1 = crowdsale::Upgrade::pre_upgrade()?; - let v2 = futurepass::Upgrade::pre_upgrade()?; - Ok(v1.into_iter().chain(v2.into_iter()).collect()) + fn pre_upgrade() -> Result, DispatchError> { + Ok(Vec::new()) } fn on_runtime_upgrade() -> Weight { - let w1 = crowdsale::Upgrade::on_runtime_upgrade(); - let w2 = futurepass::Upgrade::on_runtime_upgrade(); - w1.saturating_add(w2) + Weight::zero() } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let _ = crowdsale::Upgrade::post_upgrade(state.clone())?; - let _ = futurepass::Upgrade::post_upgrade(state)?; + fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { Ok(()) } } @@ -55,9 +48,10 @@ impl OnRuntimeUpgrade for AllMigrations { #[cfg(test)] mod tests { use crate::{Runtime, System}; + use sp_runtime::BuildStorage; pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); @@ -597,7 +591,7 @@ mod value_tests { mod remote_tests { use super::*; use crate::{migrations::AllMigrations, Block}; - use remote_externalities::{Builder, Mode, OfflineConfig}; + use frame_remote_externalities::{Builder, Mode, OfflineConfig}; use std::env::var; #[tokio::test] diff --git a/runtime/src/tests/evm_tests.rs b/runtime/src/tests/evm_tests.rs index acce93c25..f43a95230 100644 --- a/runtime/src/tests/evm_tests.rs +++ b/runtime/src/tests/evm_tests.rs @@ -29,7 +29,11 @@ use ethabi::Token; use frame_support::{ assert_ok, dispatch::{GetDispatchInfo, RawOrigin}, - traits::{fungible::Inspect, fungibles::Inspect as Inspects}, + traits::{ + fungible::Inspect, + fungibles::Inspect as Inspects, + tokens::{Fortitude, Preservation}, + }, }; use frame_system::RawOrigin::Root; use hex_literal::hex; @@ -138,7 +142,7 @@ fn fee_proxy_call_evm_with_fee_preferences() { )); // Check Bob's initial balance is 0 - assert_eq!(AssetsExt::reducible_balance(payment_asset, &bob(), false), 0); + assert_eq!(AssetsExt::balance(payment_asset, &bob()), 0); // Mint these assets into Alice and new_account assert_ok!(Assets::mint( @@ -223,7 +227,7 @@ fn fee_proxy_call_evm_with_fee_preferences() { )); // Check Bob has been transferred the correct amount - assert_eq!(AssetsExt::reducible_balance(payment_asset, &bob(), false), transfer_amount); + assert_eq!(AssetsExt::balance(payment_asset, &bob()), transfer_amount); }); } @@ -252,7 +256,7 @@ fn call_with_fee_preferences_futurepass_proxy_extrinsic() { RawOrigin::Signed(alice()).into(), payment_asset, alice(), - 10_000_000_000_000_000 + 20_000_000_000_000_000 )); // add liquidity to the dex, this will allow for exchange internally when the call is made @@ -323,7 +327,8 @@ fn call_with_fee_preferences_futurepass_proxy_extrinsic() { // get balances of new account and futurepass after feeproxy calls - for comparison let caller_xrp_balance_after = XrpCurrency::balance(&new_account); let caller_token_balance_after = AssetsExt::balance(payment_asset, &new_account); - let futurepass_xrp_balance_after = XrpCurrency::balance(&futurepass); + let futurepass_xrp_balance_after = + XrpCurrency::reducible_balance(&futurepass, Preservation::Preserve, Fortitude::Polite); let futurepass_token_balance_after = AssetsExt::balance(payment_asset, &futurepass); // vaidate futurepass should only have paid in tokens diff --git a/runtime/src/tests/maintenance_mode.rs b/runtime/src/tests/maintenance_mode.rs index a355d8bd4..d3f2c5a4e 100644 --- a/runtime/src/tests/maintenance_mode.rs +++ b/runtime/src/tests/maintenance_mode.rs @@ -104,58 +104,61 @@ mod enable_maintenance_mode { #[test] fn maintenance_mode_works_with_evm() { - ExtBuilder::default().build().execute_with(|| { - let signer = alice(); - let payment_asset: AssetId = 2; - let target: H160 = >::runtime_id_to_evm_id( - payment_asset, - ERC20_PRECOMPILE_ADDRESS_PREFIX, - ) - .into(); - - // Setup input for an erc20 approve - let mut input: Vec = [0x09, 0x5e, 0xa7, 0xb3].to_vec(); - let approve_amount: Balance = 12345; - input.append(&mut ethabi::encode(&[ - Token::Address(bob().into()), - Token::Uint(approve_amount.into()), - ])); - - // Setup inner EVM.call call - let access_list: Vec<(H160, Vec)> = vec![]; - let call = crate::RuntimeCall::EVM(pallet_evm::Call::call { - source: signer.into(), - target, - input, - value: U256::default(), - gas_limit: 50_000, - max_fee_per_gas: U256::from(1_600_000_000_000_000_u64), - max_priority_fee_per_gas: None, - nonce: None, - access_list, + let payment_asset: AssetId = 2; + let target: H160 = >::runtime_id_to_evm_id( + payment_asset, + ERC20_PRECOMPILE_ADDRESS_PREFIX, + ) + .into(); + ExtBuilder::default() + .accounts_to_fund(&[target.into()]) + .build() + .execute_with(|| { + let signer = alice(); + + // Setup input for an erc20 approve + let mut input: Vec = [0x09, 0x5e, 0xa7, 0xb3].to_vec(); + let approve_amount: Balance = 12345; + input.append(&mut ethabi::encode(&[ + Token::Address(bob().into()), + Token::Uint(approve_amount.into()), + ])); + + // Setup inner EVM.call call + let access_list: Vec<(H160, Vec)> = vec![]; + let call = crate::RuntimeCall::EVM(pallet_evm::Call::call { + source: signer.into(), + target, + input, + value: U256::zero(), + gas_limit: 50_000, + max_fee_per_gas: U256::from(1_600_000_000_000_000_u64), + max_priority_fee_per_gas: None, + nonce: None, + access_list, + }); + + // Enable maintenance mode + assert_ok!(MaintenanceMode::enable_maintenance_mode(RawOrigin::Root.into(), true)); + + // EVM call should fail + assert_eq!( + call.clone().dispatch(Some(signer).into()).unwrap_err().error, + pallet_evm::Error::::WithdrawFailed.into() + ); + // The storage should not have been updated in TokenApprovals pallet + assert_eq!(ERC20Approvals::::get((&signer, payment_asset), bob()), None); + + // Disable maintenance mode + assert_ok!(MaintenanceMode::enable_maintenance_mode(RawOrigin::Root.into(), false)); + + // EVM call should now work + assert_ok!(call.dispatch(Some(signer).into())); + assert_eq!( + ERC20Approvals::::get((&signer, payment_asset), bob()), + Some(approve_amount) + ); }); - - // Enable maintenance mode - assert_ok!(MaintenanceMode::enable_maintenance_mode(RawOrigin::Root.into(), true)); - - // EVM call should fail - assert_eq!( - call.clone().dispatch(Some(signer).into()).unwrap_err().error, - pallet_evm::Error::::WithdrawFailed.into() - ); - // The storage should not have been updated in TokenApprovals pallet - assert_eq!(ERC20Approvals::::get((&signer, payment_asset), bob()), None); - - // Disable maintenance mode - assert_ok!(MaintenanceMode::enable_maintenance_mode(RawOrigin::Root.into(), false)); - - // EVM call should now work - assert_ok!(call.dispatch(Some(signer).into())); - assert_eq!( - ERC20Approvals::::get((&signer, payment_asset), bob()), - Some(approve_amount) - ); - }); } } @@ -810,7 +813,6 @@ mod filtered_calls { // RuntimeCall with RewardDestination::Staked gets filtered let call = pallet_staking::Call::::bond { - controller: Default::default(), value: Default::default(), payee: RewardDestination::Staked, }; @@ -822,7 +824,6 @@ mod filtered_calls { // RuntimeCall with RewardDestination::Controller succeeds let call = pallet_staking::Call::::bond { - controller: Default::default(), value: 12, payee: RewardDestination::Controller, }; diff --git a/runtime/src/tests/mod.rs b/runtime/src/tests/mod.rs index d5fd81c35..4f31229f7 100644 --- a/runtime/src/tests/mod.rs +++ b/runtime/src/tests/mod.rs @@ -24,7 +24,11 @@ mod maintenance_mode; mod multiplier; mod staker_payouts; -use frame_support::traits::{fungibles::Inspect as _, GenesisBuild, Get}; +use frame_support::traits::{ + fungibles::Inspect as _, + tokens::{Fortitude, Preservation}, + Get, +}; use sp_core::{ ecdsa, offchain::{testing, OffchainDbExt, OffchainWorkerExt, TransactionPoolExt}, @@ -39,6 +43,7 @@ use crate::{ }; use seed_client::chain_spec::{authority_keys_from_seed, get_account_id_from_seed, AuthorityKeys}; use seed_primitives::{AccountId, AccountId20, Balance, Index}; +use sp_runtime::BuildStorage; /// Base gas used for an EVM transaction pub const BASE_TX_GAS_COST: u128 = 21000; @@ -105,7 +110,7 @@ impl ExtBuilder { self } pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // balances + asset setup let metadata = vec![ @@ -294,11 +299,21 @@ fn fund_authorities_and_accounts() { // Alice, Bob staked assert_eq!( - AssetsExt::reducible_balance(ROOT_ASSET_ID, &alice(), false), + AssetsExt::reducible_balance( + ROOT_ASSET_ID, + &alice(), + Preservation::Preserve, + Fortitude::Polite + ), INITIAL_ROOT_BALANCE - VALIDATOR_BOND ); assert_eq!( - AssetsExt::reducible_balance(ROOT_ASSET_ID, &bob(), false), + AssetsExt::reducible_balance( + ROOT_ASSET_ID, + &bob(), + Preservation::Preserve, + Fortitude::Polite + ), INITIAL_ROOT_BALANCE - VALIDATOR_BOND ); }); diff --git a/runtime/src/tests/multiplier.rs b/runtime/src/tests/multiplier.rs index 6b2a5ec85..80c1075a3 100644 --- a/runtime/src/tests/multiplier.rs +++ b/runtime/src/tests/multiplier.rs @@ -15,8 +15,8 @@ use super::*; use crate::{ - AdjustmentVariable, MinimumMultiplier, Multiplier, RuntimeBlockWeights, TargetBlockFullness, - TargetedFeeAdjustment, Weight, + AdjustmentVariable, MaximumMultiplier, MinimumMultiplier, Multiplier, RuntimeBlockWeights, + TargetBlockFullness, TargetedFeeAdjustment, Weight, }; use frame_support::dispatch::DispatchClass; use sp_runtime::{ @@ -24,6 +24,7 @@ use sp_runtime::{ traits::{Convert, One, Zero}, FixedPointNumber, }; +use std::ops::Add; fn max_normal() -> Weight { RuntimeBlockWeights::get() @@ -43,11 +44,12 @@ fn target() -> Weight { // update based on runtime impl. fn runtime_multiplier_update(fm: Multiplier) -> Multiplier { TargetedFeeAdjustment::< - Runtime, - TargetBlockFullness, - AdjustmentVariable, - MinimumMultiplier, - >::convert(fm) + Runtime, + TargetBlockFullness, + AdjustmentVariable, + MinimumMultiplier, + MaximumMultiplier, + >::convert(fm) } // update based on reference impl. @@ -78,8 +80,8 @@ fn run_with_system_weight(w: Weight, mut assertions: F) where F: FnMut() -> (), { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); t.execute_with(|| { @@ -114,10 +116,16 @@ fn truth_value_update_poc_works() { #[test] fn multiplier_can_grow_from_zero() { // if the min is too small, then this will not change, and we are doomed forever. - // the weight is 1/100th bigger than target. - run_with_system_weight(target() * 101 / 100, || { + // the block ref time is 1/100th bigger than target. + run_with_system_weight(target().set_ref_time(target().ref_time() * 101 / 100), || { let next = runtime_multiplier_update(min_multiplier()); - assert!(next > min_multiplier(), "{:?} !>= {:?}", next, min_multiplier()); + assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier()); + }); + + // the block proof size is 1/100th bigger than target. + run_with_system_weight(target().set_proof_size((target().proof_size() / 100) * 101), || { + let next = runtime_multiplier_update(min_multiplier()); + assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier()); }) } @@ -200,11 +208,13 @@ fn weight_to_fee_should_not_overflow_on_large_weights() { // Some values that are all above the target and will cause an increase. let t = target(); - vec![t.add(100u64), t.mul(2u64), t.mul(4u64)].into_iter().for_each(|i| { - run_with_system_weight(i, || { - let fm = runtime_multiplier_update(max_fm); - // won't grow. The convert saturates everything. - assert_eq!(fm, max_fm); - }) - }); + vec![t.add(Weight::from_all(100u64)), t.mul(2u64), t.mul(4u64)] + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let fm = runtime_multiplier_update(max_fm); + // won't grow. The convert saturates everything. + assert_eq!(fm, max_fm); + }) + }); } diff --git a/runtime/src/weights/pallet_assets.rs b/runtime/src/weights/pallet_assets.rs index f1b5137de..aa2aae23f 100644 --- a/runtime/src/weights/pallet_assets.rs +++ b/runtime/src/weights/pallet_assets.rs @@ -199,11 +199,11 @@ impl pallet_assets::WeightInfo for WeightInfo { todo!() } - fn destroy_accounts(c: u32) -> Weight { + fn destroy_accounts(_c: u32) -> Weight { todo!() } - fn destroy_approvals(a: u32) -> Weight { + fn destroy_approvals(_a: u32) -> Weight { todo!() } diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index d829ef15e..21fb76b22 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -68,7 +68,7 @@ impl pallet_balances::WeightInfo for WeightInfo { todo!() } - fn upgrade_accounts(u: u32) -> Weight { + fn upgrade_accounts(_u: u32) -> Weight { todo!() } } diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index 7bc44b7e3..e11136199 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -32,35 +32,36 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn service_agendas_base() -> Weight { - todo!() + // TODO, needed for staking_final_session_tracking_ethy test + Weight::zero() } - fn service_agenda_base(s: u32) -> Weight { - todo!() + fn service_agenda_base(_s: u32) -> Weight { + Weight::zero() } fn service_task_base() -> Weight { - todo!() + Weight::zero() } - fn service_task_fetched(s: u32) -> Weight { - todo!() + fn service_task_fetched(_s: u32) -> Weight { + Weight::zero() } fn service_task_named() -> Weight { - todo!() + Weight::zero() } fn service_task_periodic() -> Weight { - todo!() + Weight::zero() } fn execute_dispatch_signed() -> Weight { - todo!() + Weight::zero() } fn execute_dispatch_unsigned() -> Weight { - todo!() + Weight::zero() } // Storage: Scheduler Agenda (r:1 w:1) From 3f5e596bb11d8213ee4836f10b70cd0a5c2f9200 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 10 May 2024 17:46:59 +1200 Subject: [PATCH 052/112] frame-benchmarking required, fmt --- client/Cargo.toml | 4 ++-- client/src/command.rs | 13 ++++++------- ethy-gadget/rpc/src/lib.rs | 2 +- ethy-gadget/src/worker.rs | 2 +- pallet/assets-ext/rpc/src/lib.rs | 2 +- pallet/nft/rpc/src/lib.rs | 2 +- pallet/sft/rpc/src/lib.rs | 4 ++-- pallet/vortex-distribution/src/mock.rs | 5 +---- 8 files changed, 15 insertions(+), 19 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 0a48647a6..9a0f63674 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -78,7 +78,7 @@ substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # These dependencies are used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", features = ["default", "rocksdb"] } # Local Dependencies @@ -106,7 +106,7 @@ substrate-build-script-utils = { git = "https://github.com/paritytech/substrate" [features] default = ["rocksdb"] rocksdb = ["fc-db/rocksdb"] -runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks", "sc-service/runtime-benchmarks"] +runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "seed-runtime/runtime-benchmarks", "sc-service/runtime-benchmarks"] # Enable features that allow the runtime to be tried and debugged. Name might be subject to change # in the near future. try-runtime = ["seed-runtime/try-runtime", "try-runtime-cli/try-runtime", "frame-try-runtime"] diff --git a/client/src/command.rs b/client/src/command.rs index 74c39f95c..855be0c52 100644 --- a/client/src/command.rs +++ b/client/src/command.rs @@ -18,17 +18,10 @@ use crate::{ cli::{Cli, Subcommand}, service, }; -use frame_benchmarking::frame_support::sp_io; use sc_cli::SubstrateCli; -use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; use sc_service::PartialComponents; use seed_runtime::Block; -use crate::service::ExecutorDispatch; -use seed_runtime::constants::SLOT_DURATION; -#[cfg(feature = "try-runtime")] -use try_runtime_cli::block_building_info::substrate_info; - impl SubstrateCli for Cli { fn impl_name() -> String { "Seed 🌱".into() @@ -203,6 +196,12 @@ pub fn run() -> sc_cli::Result<()> { }, #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { + use crate::service::ExecutorDispatch; + use frame_benchmarking::frame_support::sp_io; + use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; + use seed_runtime::constants::SLOT_DURATION; + use try_runtime_cli::block_building_info::substrate_info; + let runner = cli.create_runner(cmd)?; runner.async_run(|config| { // we don't need any of the components of new_partial, just a runtime, or a task diff --git a/ethy-gadget/rpc/src/lib.rs b/ethy-gadget/rpc/src/lib.rs index e96a3df3a..d233feebf 100644 --- a/ethy-gadget/rpc/src/lib.rs +++ b/ethy-gadget/rpc/src/lib.rs @@ -28,7 +28,7 @@ use jsonrpsee::{ use log::warn; use sc_client_api::backend::AuxStore; use sc_rpc::SubscriptionTaskExecutor; -use sp_api::{ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_core::{Bytes, H256}; use sp_runtime::traits::{Block, Convert}; use std::{marker::PhantomData, ops::Deref, sync::Arc}; diff --git a/ethy-gadget/src/worker.rs b/ethy-gadget/src/worker.rs index f51daa0d5..1f3a6207f 100644 --- a/ethy-gadget/src/worker.rs +++ b/ethy-gadget/src/worker.rs @@ -18,7 +18,7 @@ use futures::StreamExt; use log::{debug, error, info, trace, warn}; use sc_client_api::{Backend, FinalityNotification}; use sc_network_gossip::GossipEngine; -use sp_api::{ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_consensus::SyncOracle; use sp_runtime::{ diff --git a/pallet/assets-ext/rpc/src/lib.rs b/pallet/assets-ext/rpc/src/lib.rs index 235c8a355..a5898b84a 100644 --- a/pallet/assets-ext/rpc/src/lib.rs +++ b/pallet/assets-ext/rpc/src/lib.rs @@ -26,7 +26,7 @@ use jsonrpsee::{ }; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{traits::Block as BlockT}; +use sp_runtime::traits::Block as BlockT; pub use pallet_assets_ext_rpc_runtime_api::{ self as runtime_api, AssetsExtApi as AssetsExtRuntimeApi, diff --git a/pallet/nft/rpc/src/lib.rs b/pallet/nft/rpc/src/lib.rs index 8b21e4f99..0084663a8 100644 --- a/pallet/nft/rpc/src/lib.rs +++ b/pallet/nft/rpc/src/lib.rs @@ -26,7 +26,7 @@ use pallet_nft::Config; use seed_primitives::types::{CollectionUuid, SerialNumber, TokenCount, TokenId}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{traits::Block as BlockT}; +use sp_runtime::traits::Block as BlockT; pub use pallet_nft_rpc_runtime_api::{self as runtime_api, NftApi as NftRuntimeApi}; diff --git a/pallet/sft/rpc/src/lib.rs b/pallet/sft/rpc/src/lib.rs index 54173cc0c..c35c8258c 100644 --- a/pallet/sft/rpc/src/lib.rs +++ b/pallet/sft/rpc/src/lib.rs @@ -18,10 +18,10 @@ use jsonrpsee::{ proc_macros::rpc, }; use pallet_sft::Config; -use seed_primitives::types::{TokenId}; +use seed_primitives::types::TokenId; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{traits::Block as BlockT}; +use sp_runtime::traits::Block as BlockT; pub use pallet_sft_rpc_runtime_api::{self as runtime_api, SftApi as SftRuntimeApi}; diff --git a/pallet/vortex-distribution/src/mock.rs b/pallet/vortex-distribution/src/mock.rs index 6b047da6e..88dd71eee 100644 --- a/pallet/vortex-distribution/src/mock.rs +++ b/pallet/vortex-distribution/src/mock.rs @@ -16,10 +16,7 @@ use crate as pallet_vortex; use frame_support::traits::{ConstU32, Hooks}; use seed_pallet_common::test_prelude::*; -use sp_runtime::{ - testing::{TestXt}, - BuildStorage, -}; +use sp_runtime::{testing::TestXt, BuildStorage}; use sp_staking::currency_to_vote::SaturatingCurrencyToVote; pub type Extrinsic = TestXt; From 65321ba2c0d7c7486f563cc9748b9ebcaaa9be52 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 13 May 2024 10:59:50 +1200 Subject: [PATCH 053/112] Update benchmark script --- scripts/run_benchmarks.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index c76357b6c..898a284c0 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -60,7 +60,7 @@ benchmark_runtime() { echo "[+][runtime] Benchmarking $PALLET"; WEIGHT_FILENAME=$(echo $2 | tr '-' '_'); - OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output "$OUTPUT_FOLDER/$WEIGHT_FILENAME" $1 2>&1 ) + OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output "$OUTPUT_FOLDER/$WEIGHT_FILENAME" $1 2>&1 ) if [ $? -ne 0 ]; then echo "$OUTPUT" >> "$ERR_FILE" echo "[-][runtime] Failed to benchmark $PALLET. Error written to $ERR_FILE; continuing..." @@ -73,7 +73,7 @@ benchmark_pallet() { # remove the 'pallet-' prefix PALLET_FOLDER="./pallet/$(echo ${PALLET#pallet-})/src" - OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output "$PALLET_FOLDER/weights.rs" $1 2>&1 ) + OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output "$PALLET_FOLDER/weights.rs" $1 2>&1 ) if [ $? -ne 0 ]; then echo "$OUTPUT" >> "$ERR_FILE" echo "[-][pallet] Failed to benchmark $PALLET. Error written to $ERR_FILE; continuing..." @@ -117,8 +117,8 @@ populate_pallet_list() { "pallet_im_online" # RUNTIME WEIGHT FAILURES - "pallet_session" - "pallet_staking" + #"pallet_session" + #"pallet_staking" ) CUSTOM_PALLETS=() From d62b26cf9801eb4c42257ba9c18904795868f17b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 13 May 2024 16:35:52 +1200 Subject: [PATCH 054/112] Fix benchmark script pallet naming for good and fix pallet benchmarking. --- scripts/run_benchmarks.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 898a284c0..43d74953d 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -22,6 +22,7 @@ inputs_arguments() { run_benchmark() { echo "Pallets: ${PALLETS[@]}" + echo "Custom Pallets: ${CUSTOM_PALLETS[@]}" echo "Steps: $STEPS, Repeat: $REPEAT" if [ "$LIST_PALLET" = 1 ]; then @@ -103,22 +104,22 @@ populate_pallet_list() { # Manually exclude some pallets. EXCLUDED_PALLETS=( # Helper pallets - "pallet_election_provider_support_benchmarking" + "pallet-election-provider-support-benchmarking" # Pallets without automatic benchmarking - "pallet_babe" - "pallet_grandpa" - "pallet_mmr" - "pallet_offences" - "frame_benchmarking" + "pallet-babe" + "pallet-grandpa" + "pallet-mmr" + "pallet-offences" + "frame-benchmarking" # TODO: fix this; pallet bench taking too long! - "pallet_assets" - "pallet_election_provider_multi_phase" - "pallet_im_online" + "pallet-assets" + "pallet-election-provider-multi-phase" + "pallet-im-online" # RUNTIME WEIGHT FAILURES - #"pallet_session" - #"pallet_staking" + #"pallet-session" + #"pallet-staking" ) CUSTOM_PALLETS=() @@ -131,7 +132,7 @@ populate_pallet_list() { PALLETS=($PALLETS) fi if [ "$LIST_PALLET" = "1" ] || [ "$PALLETS" = "*" ]; then - PALLETS=($($BINARY_LOCATION benchmark pallet --list --chain=dev | tail -n+2 | cut -d',' -f1 | sort | uniq )) + PALLETS=($($BINARY_LOCATION benchmark pallet --list --chain=dev | tail -n+2 | cut -d',' -f1 | sort | uniq| tr _ - )) fi if [ "$JUST_CUSTOM_PALLETS" = "1" ]; then PALLETS=("${CUSTOM_PALLETS[@]}") From 82db0ebd2b25596b1b651f9ee6519db3a4eda97e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 13 May 2024 17:38:40 +1200 Subject: [PATCH 055/112] Add an exception for pallet-vortex non-standard dir name in benchmarking script. --- scripts/run_benchmarks.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 43d74953d..c719bdd8c 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -74,6 +74,11 @@ benchmark_pallet() { # remove the 'pallet-' prefix PALLET_FOLDER="./pallet/$(echo ${PALLET#pallet-})/src" + # Add exception to pallet-vortex non standard directory naming for now + if [ "$PALLET" == "pallet-vortex" ]; then + PALLET_FOLDER="./pallet/vortex-distribution/src" + fi + OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output "$PALLET_FOLDER/weights.rs" $1 2>&1 ) if [ $? -ne 0 ]; then echo "$OUTPUT" >> "$ERR_FILE" From 22c9465f55f75a49335e1c21c371bb07d64c0e90 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 13 May 2024 18:02:45 +1200 Subject: [PATCH 056/112] =?UTF-8?q?New=20weights=20=F0=9F=8F=8B=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pallet/crowdsale/src/weights.rs | 391 ++++--- pallet/dex/src/weights.rs | 277 +++-- pallet/doughnut/src/weights.rs | 71 +- pallet/echo/src/weights.rs | 49 +- pallet/erc20-peg/src/weights.rs | 179 ++-- pallet/evm-chain-id/src/weights.rs | 19 +- pallet/fee-control/src/weights.rs | 44 +- pallet/futurepass/src/weights.rs | 157 +-- pallet/maintenance-mode/src/weights.rs | 59 +- pallet/marketplace/src/weights.rs | 914 +++++++++------- pallet/nft-peg/src/weights.rs | 141 ++- pallet/nft/src/weights.rs | 209 ++-- pallet/sft/src/weights.rs | 248 +++-- pallet/token-approvals/src/weights.rs | 87 +- pallet/vortex-distribution/src/weights.rs | 259 +++-- pallet/xls20/src/weights.rs | 83 +- pallet/xrpl-bridge/src/weights.rs | 321 +++--- pallet/xrpl/src/weights.rs | 34 +- runtime/src/weights/frame_system.rs | 124 ++- runtime/src/weights/pallet_assets_ext.rs | 58 +- runtime/src/weights/pallet_bags_list.rs | 85 +- runtime/src/weights/pallet_balances.rs | 135 ++- runtime/src/weights/pallet_crowdsale.rs | 284 +++-- runtime/src/weights/pallet_dex.rs | 202 ++-- runtime/src/weights/pallet_doughnut.rs | 71 +- runtime/src/weights/pallet_echo.rs | 42 +- runtime/src/weights/pallet_erc20_peg.rs | 169 ++- runtime/src/weights/pallet_evm_chain_id.rs | 25 +- runtime/src/weights/pallet_fee_control.rs | 53 +- runtime/src/weights/pallet_futurepass.rs | 130 ++- .../src/weights/pallet_maintenance_mode.rs | 73 +- runtime/src/weights/pallet_marketplace.rs | 458 +++++--- runtime/src/weights/pallet_multisig.rs | 159 ++- runtime/src/weights/pallet_nft.rs | 214 ++-- runtime/src/weights/pallet_nft_peg.rs | 104 +- runtime/src/weights/pallet_preimage.rs | 212 ++-- runtime/src/weights/pallet_proxy.rs | 238 +++-- runtime/src/weights/pallet_recovery.rs | 179 ++-- runtime/src/weights/pallet_scheduler.rs | 196 +++- runtime/src/weights/pallet_session.rs | 51 +- runtime/src/weights/pallet_sft.rs | 228 ++-- runtime/src/weights/pallet_staking.rs | 997 ++++++++++++------ runtime/src/weights/pallet_timestamp.rs | 37 +- runtime/src/weights/pallet_token_approvals.rs | 100 +- runtime/src/weights/pallet_utility.rs | 89 +- runtime/src/weights/pallet_vortex.rs | 191 ++-- runtime/src/weights/pallet_xls20.rs | 89 +- runtime/src/weights/pallet_xrpl.rs | 26 +- runtime/src/weights/pallet_xrpl_bridge.rs | 278 +++-- 49 files changed, 5786 insertions(+), 3053 deletions(-) diff --git a/pallet/crowdsale/src/weights.rs b/pallet/crowdsale/src/weights.rs index 8bd9b5f73..ebd3f79c8 100644 --- a/pallet/crowdsale/src/weights.rs +++ b/pallet/crowdsale/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_crowdsale //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -31,7 +31,6 @@ // --repeat=20 // --pallet=pallet-crowdsale // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -63,218 +62,326 @@ pub trait WeightInfo { /// Weights for pallet_crowdsale using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Crowdsale NextSaleId (r:1 w:1) - // Storage: Assets Asset (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Assets Metadata (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:0 w:1) + // Storage: `Crowdsale::NextSaleId` (r:1 w:1) + // Proof: `Crowdsale::NextSaleId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:2 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::NextAssetId` (r:1 w:1) + // Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Assets::Metadata` (r:1 w:1) + // Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdsale::SaleInfo` (r:0 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) fn initialize() -> Weight { - Weight::from_all(252_840_000 as u64) + Weight::from_all(104_000_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn enable() -> Weight { - Weight::from_all(71_553_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleParticipation (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:1 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn participate() -> Weight { - Weight::from_all(164_780_000 as u64) + Weight::from_all(67_000_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: Crowdsale SaleDistribution (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale NextUnsignedAt (r:0 w:1) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::NextUnsignedAt` (r:0 w:1) + // Proof: `Crowdsale::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_all(254_171_000 as u64) + Weight::from_all(98_000_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn claim_voucher() -> Weight { - Weight::from_all(245_727_000 as u64) + Weight::from_all(96_000_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) + // Storage: `Crowdsale::SaleInfo` (r:1 w:0) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn redeem_voucher() -> Weight { - Weight::from_all(181_395_000 as u64) + Weight::from_all(72_000_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `Crowdsale::SaleInfo` (r:1 w:0) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn proxy_vault_call() -> Weight { - Weight::from_all(89_316_000 as u64) + Weight::from_all(25_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn try_force_distribution() -> Weight { - Weight::from_all(66_821_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) - // Storage: System Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleInfo` (r:5 w:5) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:10 w:10) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:20 w:20) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:6 w:6) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:5 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_all(219_624_000 as u64) - // Standard Error: 1_029_078 - .saturating_add(Weight::from_all(105_022_670 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().reads((6 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(11 as u64)) - .saturating_add(T::DbWeight::get().writes((5 as u64).saturating_mul(p as u64))) + Weight::from_all(4_149_591 as u64) + // Standard Error: 470_855 + .saturating_add(Weight::from_all(94_511_273 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((9 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes((8 as u64).saturating_mul(p as u64))) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:0) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:0) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn on_initialize_empty() -> Weight { - Weight::from_all(10_420_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Crowdsale NextSaleId (r:1 w:1) - // Storage: Assets Asset (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Assets Metadata (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:0 w:1) + // Storage: `Crowdsale::NextSaleId` (r:1 w:1) + // Proof: `Crowdsale::NextSaleId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:2 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::NextAssetId` (r:1 w:1) + // Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Assets::Metadata` (r:1 w:1) + // Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdsale::SaleInfo` (r:0 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) fn initialize() -> Weight { - Weight::from_all(252_840_000 as u64) + Weight::from_all(104_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) - .saturating_add(RocksDbWeight::get().writes(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(11 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn enable() -> Weight { - Weight::from_all(71_553_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleParticipation (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:1 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn participate() -> Weight { - Weight::from_all(164_780_000 as u64) + Weight::from_all(67_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: Crowdsale SaleDistribution (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale NextUnsignedAt (r:0 w:1) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::NextUnsignedAt` (r:0 w:1) + // Proof: `Crowdsale::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_all(254_171_000 as u64) + Weight::from_all(98_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn claim_voucher() -> Weight { - Weight::from_all(245_727_000 as u64) + Weight::from_all(96_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) + // Storage: `Crowdsale::SaleInfo` (r:1 w:0) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn redeem_voucher() -> Weight { - Weight::from_all(181_395_000 as u64) + Weight::from_all(72_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `Crowdsale::SaleInfo` (r:1 w:0) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn proxy_vault_call() -> Weight { - Weight::from_all(89_316_000 as u64) + Weight::from_all(25_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleInfo` (r:1 w:1) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn try_force_distribution() -> Weight { - Weight::from_all(66_821_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) - // Storage: System Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleInfo` (r:5 w:5) + // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:10 w:10) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:20 w:20) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:6 w:6) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:5 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_all(219_624_000 as u64) - // Standard Error: 1_029_078 - .saturating_add(Weight::from_all(105_022_670 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(12 as u64)) - .saturating_add(RocksDbWeight::get().reads((6 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(11 as u64)) - .saturating_add(RocksDbWeight::get().writes((5 as u64).saturating_mul(p as u64))) + Weight::from_all(4_149_591 as u64) + // Standard Error: 470_855 + .saturating_add(Weight::from_all(94_511_273 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().reads((9 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + .saturating_add(RocksDbWeight::get().writes((8 as u64).saturating_mul(p as u64))) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:0) + // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:0) + // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn on_initialize_empty() -> Weight { - Weight::from_all(10_420_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } } diff --git a/pallet/dex/src/weights.rs b/pallet/dex/src/weights.rs index 2a578cb92..434e3a59a 100644 --- a/pallet/dex/src/weights.rs +++ b/pallet/dex/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_dex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_dex +// --pallet=pallet-dex // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -60,140 +59,232 @@ pub trait WeightInfo { /// Weights for pallet_dex using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) + // Storage: `Dex::TradingPairStatuses` (r:1 w:0) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:2 w:2) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:4 w:4) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_supply() -> Weight { - Weight::from_all(212_601_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + Weight::from_all(116_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) + // Storage: `Dex::TradingPairStatuses` (r:1 w:0) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:2) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:4 w:4) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_target() -> Weight { - Weight::from_all(214_052_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + Weight::from_all(122_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:1) - // Storage: Assets Metadata (r:3 w:1) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:4 w:4) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Account (r:6 w:6) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:0 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:1) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Assets::Metadata` (r:3 w:1) + // Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::NextAssetId` (r:1 w:1) + // Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:3) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:4 w:4) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:6 w:6) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Dex::TradingPairStatuses` (r:0 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { - Weight::from_all(418_386_000 as u64) + Weight::from_all(206_000_000 as u64) .saturating_add(T::DbWeight::get().reads(23 as u64)) - .saturating_add(T::DbWeight::get().writes(20 as u64)) + .saturating_add(T::DbWeight::get().writes(21 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: Assets Account (r:6 w:6) - // Storage: System Account (r:1 w:1) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) - // Storage: Dex FeeTo (r:1 w:0) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:3) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:6 w:6) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { - Weight::from_all(338_661_000 as u64) + Weight::from_all(180_000_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairStatuses` (r:1 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn reenable_trading_pair() -> Weight { - Weight::from_all(70_315_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairStatuses` (r:1 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn disable_trading_pair() -> Weight { - Weight::from_all(70_865_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Dex FeeTo (r:0 w:1) + // Storage: `Dex::FeeTo` (r:0 w:1) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(41_952_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) + // Storage: `Dex::TradingPairStatuses` (r:1 w:0) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:2 w:2) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:4 w:4) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_supply() -> Weight { - Weight::from_all(212_601_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) + Weight::from_all(116_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) + // Storage: `Dex::TradingPairStatuses` (r:1 w:0) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:2) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:4 w:4) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_target() -> Weight { - Weight::from_all(214_052_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) + Weight::from_all(122_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(12 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:1) - // Storage: Assets Metadata (r:3 w:1) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:4 w:4) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Account (r:6 w:6) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:0 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:1) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Assets::Metadata` (r:3 w:1) + // Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::NextAssetId` (r:1 w:1) + // Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:3) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:4 w:4) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:6 w:6) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Dex::TradingPairStatuses` (r:0 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { - Weight::from_all(418_386_000 as u64) + Weight::from_all(206_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(23 as u64)) - .saturating_add(RocksDbWeight::get().writes(20 as u64)) + .saturating_add(RocksDbWeight::get().writes(21 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: Assets Account (r:6 w:6) - // Storage: System Account (r:1 w:1) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) - // Storage: Dex FeeTo (r:1 w:0) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:3 w:3) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:6 w:6) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPool` (r:1 w:1) + // Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Dex::FeeTo` (r:1 w:0) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { - Weight::from_all(338_661_000 as u64) + Weight::from_all(180_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairStatuses` (r:1 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn reenable_trading_pair() -> Weight { - Weight::from_all(70_315_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + // Storage: `Dex::TradingPairLPToken` (r:1 w:0) + // Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + // Storage: `Dex::TradingPairStatuses` (r:1 w:1) + // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn disable_trading_pair() -> Weight { - Weight::from_all(70_865_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Dex FeeTo (r:0 w:1) + // Storage: `Dex::FeeTo` (r:0 w:1) + // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(41_952_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/doughnut/src/weights.rs b/pallet/doughnut/src/weights.rs index 3cdf5f69c..6edb601fd 100644 --- a/pallet/doughnut/src/weights.rs +++ b/pallet/doughnut/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_doughnut //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -31,11 +31,10 @@ // --repeat=20 // --pallet=pallet-doughnut // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./runtime/src/weights/weights +// ./pallet/doughnut/src/weights.rs // --template // ./scripts/pallet_template.hbs @@ -57,56 +56,72 @@ pub trait WeightInfo { /// Weights for pallet_doughnut using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Doughnut WhitelistedHolders (r:1 w:0) - // Storage: Doughnut BlockedDoughnuts (r:1 w:0) - // Storage: Doughnut BlockedHolders (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `Doughnut::WhitelistedHolders` (r:1 w:0) + // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) + // Storage: `Doughnut::BlockedDoughnuts` (r:1 w:0) + // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Doughnut::BlockedHolders` (r:1 w:0) + // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(209_000_000 as u64) + Weight::from_all(221_000_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) } - // Storage: Doughnut BlockedDoughnuts (r:0 w:1) + // Storage: `Doughnut::BlockedDoughnuts` (r:0 w:1) + // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn revoke_doughnut() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Doughnut BlockedHolders (r:0 w:1) + // Storage: `Doughnut::BlockedHolders` (r:0 w:1) + // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) fn revoke_holder() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Doughnut WhitelistedHolders (r:0 w:1) + // Storage: `Doughnut::WhitelistedHolders` (r:0 w:1) + // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn update_whitelisted_holders() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Doughnut WhitelistedHolders (r:1 w:0) - // Storage: Doughnut BlockedDoughnuts (r:1 w:0) - // Storage: Doughnut BlockedHolders (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `Doughnut::WhitelistedHolders` (r:1 w:0) + // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) + // Storage: `Doughnut::BlockedDoughnuts` (r:1 w:0) + // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Doughnut::BlockedHolders` (r:1 w:0) + // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(209_000_000 as u64) + Weight::from_all(221_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } - // Storage: Doughnut BlockedDoughnuts (r:0 w:1) + // Storage: `Doughnut::BlockedDoughnuts` (r:0 w:1) + // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn revoke_doughnut() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Doughnut BlockedHolders (r:0 w:1) + // Storage: `Doughnut::BlockedHolders` (r:0 w:1) + // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) fn revoke_holder() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Doughnut WhitelistedHolders (r:0 w:1) + // Storage: `Doughnut::WhitelistedHolders` (r:0 w:1) + // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn update_whitelisted_holders() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/echo/src/weights.rs b/pallet/echo/src/weights.rs index d0316a340..d46336757 100644 --- a/pallet/echo/src/weights.rs +++ b/pallet/echo/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_echo //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_echo +// --pallet=pallet-echo // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -54,14 +53,20 @@ pub trait WeightInfo { /// Weights for pallet_echo using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Echo NextSessionId (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `Echo::NextSessionId` (r:1 w:1) + // Proof: `Echo::NextSessionId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn ping() -> Weight { - Weight::from_all(85_832_000 as u64) + Weight::from_all(28_000_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -69,14 +74,20 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Echo NextSessionId (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `Echo::NextSessionId` (r:1 w:1) + // Proof: `Echo::NextSessionId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn ping() -> Weight { - Weight::from_all(85_832_000 as u64) + Weight::from_all(28_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/erc20-peg/src/weights.rs b/pallet/erc20-peg/src/weights.rs index 0d074f98d..dfc666052 100644 --- a/pallet/erc20-peg/src/weights.rs +++ b/pallet/erc20-peg/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_erc20_peg //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-04-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -31,7 +31,6 @@ // --repeat=20 // --pallet=pallet-erc20-peg // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -63,134 +62,178 @@ pub trait WeightInfo { /// Weights for pallet_erc20_peg using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Erc20Peg DepositsActive (r:0 w:1) + // Storage: `Erc20Peg::DepositsActive` (r:0 w:1) + // Proof: `Erc20Peg::DepositsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits() -> Weight { - Weight::from_all(15_386_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) + // Storage: `Erc20Peg::WithdrawalsActive` (r:0 w:1) + // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals() -> Weight { - Weight::from_all(15_112_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) + // Storage: `Erc20Peg::DepositsDelayActive` (r:0 w:1) + // Proof: `Erc20Peg::DepositsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits_delay() -> Weight { - Weight::from_all(37_675_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) + // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:0 w:1) + // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals_delay() -> Weight { - Weight::from_all(37_428_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) - // Storage: Erc20Peg AssetIdToErc20 (r:1 w:0) - // Storage: Erc20Peg PaymentDelay (r:1 w:0) - // Storage: Erc20Peg WithdrawalsDelayActive (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Erc20Peg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `Erc20Peg::WithdrawalsActive` (r:1 w:0) + // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::AssetIdToErc20` (r:1 w:0) + // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::PaymentDelay` (r:1 w:0) + // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:1 w:0) + // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::ContractAddress` (r:1 w:0) + // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { - Weight::from_all(162_424_000 as u64) + Weight::from_all(67_000_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Erc20Peg ContractAddress (r:0 w:1) + // Storage: `Erc20Peg::ContractAddress` (r:0 w:1) + // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_erc20_peg_address() -> Weight { - Weight::from_all(39_285_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) + // Storage: `Erc20Peg::RootPegContractAddress` (r:0 w:1) + // Proof: `Erc20Peg::RootPegContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_root_peg_address() -> Weight { - Weight::from_all(38_419_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) - // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) + // Storage: `Erc20Peg::Erc20ToAssetId` (r:0 w:1) + // Proof: `Erc20Peg::Erc20ToAssetId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::AssetIdToErc20` (r:0 w:1) + // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_erc20_asset_map() -> Weight { - Weight::from_all(19_335_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Erc20Peg Erc20Meta (r:0 w:1) + // Storage: `Erc20Peg::Erc20Meta` (r:0 w:1) + // Proof: `Erc20Peg::Erc20Meta` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) fn set_erc20_meta() -> Weight { - Weight::from_all(18_553_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg PaymentDelay (r:0 w:1) + // Storage: `Erc20Peg::PaymentDelay` (r:0 w:1) + // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(39_254_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Erc20Peg DepositsActive (r:0 w:1) + // Storage: `Erc20Peg::DepositsActive` (r:0 w:1) + // Proof: `Erc20Peg::DepositsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits() -> Weight { - Weight::from_all(15_386_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) + // Storage: `Erc20Peg::WithdrawalsActive` (r:0 w:1) + // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals() -> Weight { - Weight::from_all(15_112_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) + // Storage: `Erc20Peg::DepositsDelayActive` (r:0 w:1) + // Proof: `Erc20Peg::DepositsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits_delay() -> Weight { - Weight::from_all(37_675_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) + // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:0 w:1) + // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals_delay() -> Weight { - Weight::from_all(37_428_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) - // Storage: Erc20Peg AssetIdToErc20 (r:1 w:0) - // Storage: Erc20Peg PaymentDelay (r:1 w:0) - // Storage: Erc20Peg WithdrawalsDelayActive (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Erc20Peg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `Erc20Peg::WithdrawalsActive` (r:1 w:0) + // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::AssetIdToErc20` (r:1 w:0) + // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::PaymentDelay` (r:1 w:0) + // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:1 w:0) + // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::ContractAddress` (r:1 w:0) + // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { - Weight::from_all(162_424_000 as u64) + Weight::from_all(67_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Erc20Peg ContractAddress (r:0 w:1) + // Storage: `Erc20Peg::ContractAddress` (r:0 w:1) + // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_erc20_peg_address() -> Weight { - Weight::from_all(39_285_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) + // Storage: `Erc20Peg::RootPegContractAddress` (r:0 w:1) + // Proof: `Erc20Peg::RootPegContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_root_peg_address() -> Weight { - Weight::from_all(38_419_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) - // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) + // Storage: `Erc20Peg::Erc20ToAssetId` (r:0 w:1) + // Proof: `Erc20Peg::Erc20ToAssetId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `Erc20Peg::AssetIdToErc20` (r:0 w:1) + // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_erc20_asset_map() -> Weight { - Weight::from_all(19_335_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Erc20Peg Erc20Meta (r:0 w:1) + // Storage: `Erc20Peg::Erc20Meta` (r:0 w:1) + // Proof: `Erc20Peg::Erc20Meta` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) fn set_erc20_meta() -> Weight { - Weight::from_all(18_553_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Erc20Peg PaymentDelay (r:0 w:1) + // Storage: `Erc20Peg::PaymentDelay` (r:0 w:1) + // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(39_254_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/evm-chain-id/src/weights.rs b/pallet/evm-chain-id/src/weights.rs index 15060e6af..a30bda327 100644 --- a/pallet/evm-chain-id/src/weights.rs +++ b/pallet/evm-chain-id/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_evm_chain_id //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_evm_chain_id +// --pallet=pallet-evm-chain-id // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -54,18 +53,20 @@ pub trait WeightInfo { /// Weights for pallet_evm_chain_id using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: EVMChainId ChainId (r:0 w:1) + // Storage: `EVMChainId::ChainId` (r:0 w:1) + // Proof: `EVMChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_chain_id() -> Weight { - Weight::from_all(35_950_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: EVMChainId ChainId (r:0 w:1) + // Storage: `EVMChainId::ChainId` (r:0 w:1) + // Proof: `EVMChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_chain_id() -> Weight { - Weight::from_all(35_950_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/fee-control/src/weights.rs b/pallet/fee-control/src/weights.rs index 6e02245e6..ced33355c 100644 --- a/pallet/fee-control/src/weights.rs +++ b/pallet/fee-control/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_fee_control //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_fee_control +// --pallet=pallet-fee-control // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -50,20 +49,30 @@ use sp_std::marker::PhantomData; pub trait WeightInfo { fn set_evm_base_fee() -> Weight; fn set_weight_multiplier() -> Weight; + fn set_length_multiplier() -> Weight; } /// Weights for pallet_fee_control using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: FeeControl Data (r:1 w:1) + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_evm_base_fee() -> Weight { - Weight::from_all(19_761_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: FeeControl Data (r:1 w:1) + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_weight_multiplier() -> Weight { - Weight::from_all(19_275_000 as u64) + Weight::from_all(9_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) + fn set_length_multiplier() -> Weight { + Weight::from_all(9_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -71,15 +80,24 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: FeeControl Data (r:1 w:1) + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_evm_base_fee() -> Weight { - Weight::from_all(19_761_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: FeeControl Data (r:1 w:1) + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_weight_multiplier() -> Weight { - Weight::from_all(19_275_000 as u64) + Weight::from_all(9_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `FeeControl::Data` (r:1 w:1) + // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) + fn set_length_multiplier() -> Weight { + Weight::from_all(9_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/futurepass/src/weights.rs b/pallet/futurepass/src/weights.rs index d0d395dac..9add27a75 100644 --- a/pallet/futurepass/src/weights.rs +++ b/pallet/futurepass/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_futurepass //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_futurepass +// --pallet=pallet-futurepass // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -58,112 +57,144 @@ pub trait WeightInfo { /// Weights for pallet_futurepass using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Futurepass Holders (r:1 w:1) - // Storage: Futurepass NextFuturepassId (r:1 w:1) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:1 w:1) + // Storage: `Futurepass::Holders` (r:1 w:1) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Futurepass::NextFuturepassId` (r:1 w:1) + // Proof: `Futurepass::NextFuturepassId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(146_058_000 as u64) + Weight::from_all(80_000_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Futurepass Holders (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:1 w:0) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_all(220_928_000 as u64) - // Standard Error: 4_617 - .saturating_add(Weight::from_all(306_992 as u64).saturating_mul(p as u64)) + Weight::from_all(115_607_485 as u64) + // Standard Error: 15_177 + .saturating_add(Weight::from_all(252_997 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Futurepass Holders (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:2 w:0) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_all(146_646_000 as u64) - // Standard Error: 3_409 - .saturating_add(Weight::from_all(290_417 as u64).saturating_mul(p as u64)) + Weight::from_all(80_622_097 as u64) + // Standard Error: 9_582 + .saturating_add(Weight::from_all(109_272 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Futurepass Holders (r:2 w:2) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:2 w:2) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_all(200_511_000 as u64) - // Standard Error: 76_919 - .saturating_add(Weight::from_all(50_389_234 as u64).saturating_mul(p as u64)) + Weight::from_all(82_318_660 as u64) + // Standard Error: 77_680 + .saturating_add(Weight::from_all(53_345_962 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: MaintenanceMode BlockedCalls (r:2 w:0) - // Storage: MaintenanceMode BlockedPallets (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:0) + // Storage: `MaintenanceMode::BlockedCalls` (r:2 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:2 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:0) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_all(90_896_000 as u64) - // Standard Error: 3_422 - .saturating_add(Weight::from_all(192_298 as u64).saturating_mul(p as u64)) + Weight::from_all(28_381_410 as u64) + // Standard Error: 3_971 + .saturating_add(Weight::from_all(93_981 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Futurepass Holders (r:1 w:1) - // Storage: Futurepass NextFuturepassId (r:1 w:1) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:1 w:1) + // Storage: `Futurepass::Holders` (r:1 w:1) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Futurepass::NextFuturepassId` (r:1 w:1) + // Proof: `Futurepass::NextFuturepassId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(146_058_000 as u64) + Weight::from_all(80_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Futurepass Holders (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:1 w:0) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_all(220_928_000 as u64) - // Standard Error: 4_617 - .saturating_add(Weight::from_all(306_992 as u64).saturating_mul(p as u64)) + Weight::from_all(115_607_485 as u64) + // Standard Error: 15_177 + .saturating_add(Weight::from_all(252_997 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Futurepass Holders (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:2 w:0) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_all(146_646_000 as u64) - // Standard Error: 3_409 - .saturating_add(Weight::from_all(290_417 as u64).saturating_mul(p as u64)) + Weight::from_all(80_622_097 as u64) + // Standard Error: 9_582 + .saturating_add(Weight::from_all(109_272 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Futurepass Holders (r:2 w:2) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + // Storage: `Futurepass::Holders` (r:2 w:2) + // Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:1) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_all(200_511_000 as u64) - // Standard Error: 76_919 - .saturating_add(Weight::from_all(50_389_234 as u64).saturating_mul(p as u64)) + Weight::from_all(82_318_660 as u64) + // Standard Error: 77_680 + .saturating_add(Weight::from_all(53_345_962 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: MaintenanceMode BlockedCalls (r:2 w:0) - // Storage: MaintenanceMode BlockedPallets (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:0) + // Storage: `MaintenanceMode::BlockedCalls` (r:2 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:2 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `Proxy::Proxies` (r:1 w:0) + // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_all(90_896_000 as u64) - // Standard Error: 3_422 - .saturating_add(Weight::from_all(192_298 as u64).saturating_mul(p as u64)) + Weight::from_all(28_381_410 as u64) + // Standard Error: 3_971 + .saturating_add(Weight::from_all(93_981 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } } diff --git a/pallet/maintenance-mode/src/weights.rs b/pallet/maintenance-mode/src/weights.rs index af848ddac..ee9087583 100644 --- a/pallet/maintenance-mode/src/weights.rs +++ b/pallet/maintenance-mode/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_maintenance_mode //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_maintenance_mode +// --pallet=pallet-maintenance-mode // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -58,58 +57,68 @@ pub trait WeightInfo { /// Weights for pallet_maintenance_mode using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) + // Storage: `MaintenanceMode::MaintenanceModeActive` (r:0 w:1) + // Proof: `MaintenanceMode::MaintenanceModeActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn enable_maintenance_mode() -> Weight { - Weight::from_all(37_073_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) + // Storage: `MaintenanceMode::BlockedAccounts` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedAccounts` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_account() -> Weight { - Weight::from_all(39_394_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) + // Storage: `MaintenanceMode::BlockedEVMAddresses` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedEVMAddresses` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_evm_target() -> Weight { - Weight::from_all(40_700_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedCalls (r:0 w:1) + // Storage: `MaintenanceMode::BlockedCalls` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) fn block_call() -> Weight { - Weight::from_all(43_340_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedPallets (r:0 w:1) + // Storage: `MaintenanceMode::BlockedPallets` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn block_pallet() -> Weight { - Weight::from_all(42_282_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) + // Storage: `MaintenanceMode::MaintenanceModeActive` (r:0 w:1) + // Proof: `MaintenanceMode::MaintenanceModeActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn enable_maintenance_mode() -> Weight { - Weight::from_all(37_073_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) + // Storage: `MaintenanceMode::BlockedAccounts` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedAccounts` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_account() -> Weight { - Weight::from_all(39_394_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) + // Storage: `MaintenanceMode::BlockedEVMAddresses` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedEVMAddresses` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_evm_target() -> Weight { - Weight::from_all(40_700_000 as u64) + Weight::from_all(8_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedCalls (r:0 w:1) + // Storage: `MaintenanceMode::BlockedCalls` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) fn block_call() -> Weight { - Weight::from_all(43_340_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: MaintenanceMode BlockedPallets (r:0 w:1) + // Storage: `MaintenanceMode::BlockedPallets` (r:0 w:1) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn block_pallet() -> Weight { - Weight::from_all(42_282_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/marketplace/src/weights.rs b/pallet/marketplace/src/weights.rs index 5694a9f63..6c089582c 100644 --- a/pallet/marketplace/src/weights.rs +++ b/pallet/marketplace/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_marketplace //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_marketplace +// --pallet=pallet-marketplace // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -48,385 +47,548 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_marketplace. pub trait WeightInfo { - fn register_marketplace() -> Weight; - fn sell_nft(p: u32) -> Weight; - fn sell_sft(p: u32) -> Weight; - fn buy() -> Weight; - fn buy_multi(p: u32) -> Weight; - fn auction_nft(p: u32) -> Weight; - fn auction_sft(p: u32) -> Weight; - fn bid() -> Weight; - fn cancel_sale() -> Weight; - fn update_fixed_price() -> Weight; - fn make_simple_offer() -> Weight; - fn cancel_offer() -> Weight; - fn accept_offer() -> Weight; - fn set_fee_to() -> Weight; + fn register_marketplace() -> Weight; + fn sell_nft(p: u32, ) -> Weight; + fn sell_sft(p: u32, ) -> Weight; + fn buy() -> Weight; + fn buy_multi(p: u32, ) -> Weight; + fn auction_nft(p: u32, ) -> Weight; + fn auction_sft(p: u32, ) -> Weight; + fn bid() -> Weight; + fn cancel_sale() -> Weight; + fn update_fixed_price() -> Weight; + fn make_simple_offer() -> Weight; + fn cancel_offer() -> Weight; + fn accept_offer() -> Weight; + fn set_fee_to() -> Weight; } /// Weights for pallet_marketplace using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); - impl WeightInfo for SubstrateWeight { - // Storage: Marketplace NextMarketplaceId (r:1 w:1) - // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) - fn register_marketplace() -> Weight { - Weight::from_all(17_443_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn sell_nft(p: u32, ) -> Weight { - Weight::from_all(35_287_000 as u64) - // Standard Error: 5_772 - .saturating_add(Weight::from_all(4_321_028 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn sell_sft(p: u32, ) -> Weight { - Weight::from_all(30_478_000 as u64) - // Standard Error: 10_308 - .saturating_add(Weight::from_all(3_429_769 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - fn buy() -> Weight { - Weight::from_all(67_648_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn buy_multi(p: u32, ) -> Weight { - Weight::from_all(68_079_000 as u64) - // Standard Error: 35_746 - .saturating_add(Weight::from_all(49_491_228 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - .saturating_add(T::DbWeight::get().writes((9 as u64).saturating_mul(p as u64))) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn auction_nft(p: u32, ) -> Weight { - Weight::from_all(32_782_000 as u64) - // Standard Error: 5_794 - .saturating_add(Weight::from_all(4_306_919 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn auction_sft(p: u32, ) -> Weight { - Weight::from_all(29_696_000 as u64) - // Standard Error: 2_973 - .saturating_add(Weight::from_all(3_287_061 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingWinningBid (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Marketplace ListingEndSchedule (r:0 w:2) - fn bid() -> Weight { - Weight::from_all(63_710_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - fn cancel_sale() -> Weight { - Weight::from_all(20_930_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - fn update_fixed_price() -> Weight { - Weight::from_all(16_702_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace NextOfferId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: Marketplace Offers (r:0 w:1) - fn make_simple_offer() -> Weight { - Weight::from_all(60_865_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) - } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - fn cancel_offer() -> Weight { - Weight::from_all(55_595_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - fn accept_offer() -> Weight { - Weight::from_all(91_674_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) - } - // Storage: Marketplace FeeTo (r:0 w:1) - fn set_fee_to() -> Weight { - Weight::from_all(10_069_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } + // Storage: `Marketplace::NextMarketplaceId` (r:1 w:1) + // Proof: `Marketplace::NextMarketplaceId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Marketplace::RegisteredMarketplaces` (r:0 w:1) + // Proof: `Marketplace::RegisteredMarketplaces` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + fn register_marketplace() -> Weight { + Weight::from_all(16_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:50 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn sell_nft(p: u32, ) -> Weight { + Weight::from_all(31_275_183 as u64) + // Standard Error: 5_881 + .saturating_add(Weight::from_all(5_830_698 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn sell_sft(p: u32, ) -> Weight { + Weight::from_all(28_690_693 as u64) + // Standard Error: 15_674 + .saturating_add(Weight::from_all(4_684_129 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:0) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:0) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + fn buy() -> Weight { + Weight::from_all(59_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: `Marketplace::Listings` (r:50 w:50) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:50 w:0) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:50 w:0) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:50 w:50) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:50) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:50) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:50) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn buy_multi(p: u32, ) -> Weight { + Weight::from_all(1_106_857 as u64) + // Standard Error: 102_751 + .saturating_add(Weight::from_all(46_325_142 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(p as u64))) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:50 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn auction_nft(p: u32, ) -> Weight { + Weight::from_all(30_769_795 as u64) + // Standard Error: 5_555 + .saturating_add(Weight::from_all(5_798_909 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn auction_sft(p: u32, ) -> Weight { + Weight::from_all(27_464_163 as u64) + // Standard Error: 10_132 + .saturating_add(Weight::from_all(4_711_130 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingWinningBid` (r:1 w:1) + // Proof: `Marketplace::ListingWinningBid` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:2) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + fn bid() -> Weight { + Weight::from_all(79_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + fn cancel_sale() -> Weight { + Weight::from_all(21_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + fn update_fixed_price() -> Weight { + Weight::from_all(15_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextOfferId` (r:1 w:1) + // Proof: `Marketplace::NextOfferId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Offers` (r:0 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + fn make_simple_offer() -> Weight { + Weight::from_all(85_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) + } + // Storage: `Marketplace::Offers` (r:1 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + fn cancel_offer() -> Weight { + Weight::from_all(80_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) + } + // Storage: `Marketplace::Offers` (r:1 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + fn accept_offer() -> Weight { + Weight::from_all(124_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) + } + // Storage: `Marketplace::FeeTo` (r:0 w:1) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + fn set_fee_to() -> Weight { + Weight::from_all(7_000_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Marketplace NextMarketplaceId (r:1 w:1) - // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) - fn register_marketplace() -> Weight { - Weight::from_all(17_443_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn sell_nft(p: u32, ) -> Weight { - Weight::from_all(35_287_000 as u64) - // Standard Error: 5_772 - .saturating_add(Weight::from_all(4_321_028 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn sell_sft(p: u32, ) -> Weight { - Weight::from_all(30_478_000 as u64) - // Standard Error: 10_308 - .saturating_add(Weight::from_all(3_429_769 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - fn buy() -> Weight { - Weight::from_all(67_648_000 as u64) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(9 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn buy_multi(p: u32, ) -> Weight { - Weight::from_all(68_079_000 as u64) - // Standard Error: 35_746 - .saturating_add(Weight::from_all(49_491_228 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(9 as u64)) - .saturating_add(RocksDbWeight::get().writes((9 as u64).saturating_mul(p as u64))) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn auction_nft(p: u32, ) -> Weight { - Weight::from_all(32_782_000 as u64) - // Standard Error: 5_794 - .saturating_add(Weight::from_all(4_306_919 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - /// The range of component `p` is `[1, 50]`. - fn auction_sft(p: u32, ) -> Weight { - Weight::from_all(29_696_000 as u64) - // Standard Error: 2_973 - .saturating_add(Weight::from_all(3_287_061 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingWinningBid (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Marketplace ListingEndSchedule (r:0 w:2) - fn bid() -> Weight { - Weight::from_all(63_710_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(10 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) - fn cancel_sale() -> Weight { - Weight::from_all(20_930_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) - } - // Storage: Marketplace Listings (r:1 w:1) - fn update_fixed_price() -> Weight { - Weight::from_all(16_702_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace NextOfferId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: Marketplace Offers (r:0 w:1) - fn make_simple_offer() -> Weight { - Weight::from_all(60_865_000 as u64) - .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().writes(8 as u64)) - } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - fn cancel_offer() -> Weight { - Weight::from_all(55_595_000 as u64) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) - } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - fn accept_offer() -> Weight { - Weight::from_all(91_674_000 as u64) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) - .saturating_add(RocksDbWeight::get().writes(10 as u64)) - } - // Storage: Marketplace FeeTo (r:0 w:1) - fn set_fee_to() -> Weight { - Weight::from_all(10_069_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } + // Storage: `Marketplace::NextMarketplaceId` (r:1 w:1) + // Proof: `Marketplace::NextMarketplaceId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Marketplace::RegisteredMarketplaces` (r:0 w:1) + // Proof: `Marketplace::RegisteredMarketplaces` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + fn register_marketplace() -> Weight { + Weight::from_all(16_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:50 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn sell_nft(p: u32, ) -> Weight { + Weight::from_all(31_275_183 as u64) + // Standard Error: 5_881 + .saturating_add(Weight::from_all(5_830_698 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn sell_sft(p: u32, ) -> Weight { + Weight::from_all(28_690_693 as u64) + // Standard Error: 15_674 + .saturating_add(Weight::from_all(4_684_129 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:0) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:0) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + fn buy() -> Weight { + Weight::from_all(59_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: `Marketplace::Listings` (r:50 w:50) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:50 w:0) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:50 w:0) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:50 w:50) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:50) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:50) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:50) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn buy_multi(p: u32, ) -> Weight { + Weight::from_all(1_106_857 as u64) + // Standard Error: 102_751 + .saturating_add(Weight::from_all(46_325_142 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(p as u64))) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:50 w:50) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn auction_nft(p: u32, ) -> Weight { + Weight::from_all(30_769_795 as u64) + // Standard Error: 5_555 + .saturating_add(Weight::from_all(5_798_909 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextListingId` (r:1 w:1) + // Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Listings` (r:0 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 50]`. + fn auction_sft(p: u32, ) -> Weight { + Weight::from_all(27_464_163 as u64) + // Standard Error: 10_132 + .saturating_add(Weight::from_all(4_711_130 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingWinningBid` (r:1 w:1) + // Proof: `Marketplace::ListingWinningBid` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:2) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + fn bid() -> Weight { + Weight::from_all(79_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + // Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:0 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + fn cancel_sale() -> Weight { + Weight::from_all(21_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + // Storage: `Marketplace::Listings` (r:1 w:1) + // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + fn update_fixed_price() -> Weight { + Weight::from_all(15_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Marketplace::NextOfferId` (r:1 w:1) + // Proof: `Marketplace::NextOfferId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + // Storage: `Marketplace::Offers` (r:0 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + fn make_simple_offer() -> Weight { + Weight::from_all(85_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) + } + // Storage: `Marketplace::Offers` (r:1 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + fn cancel_offer() -> Weight { + Weight::from_all(80_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) + } + // Storage: `Marketplace::Offers` (r:1 w:1) + // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:1) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Marketplace::FeeTo` (r:1 w:0) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `Marketplace::TokenOffers` (r:1 w:1) + // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + fn accept_offer() -> Weight { + Weight::from_all(124_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) + } + // Storage: `Marketplace::FeeTo` (r:0 w:1) + // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + fn set_fee_to() -> Weight { + Weight::from_all(7_000_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } } diff --git a/pallet/nft-peg/src/weights.rs b/pallet/nft-peg/src/weights.rs index 9aafd11ba..b24628cbc 100644 --- a/pallet/nft-peg/src/weights.rs +++ b/pallet/nft-peg/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_nft_peg //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_nft_peg +// --pallet=pallet-nft-peg // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -56,37 +55,57 @@ pub trait WeightInfo { /// Weights for pallet_nft_peg using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: NftPeg ContractAddress (r:0 w:1) + // Storage: `NftPeg::ContractAddress` (r:0 w:1) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_contract_address() -> Weight { - Weight::from_all(38_330_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:3 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:3) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:3 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + // Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `NftPeg::ContractAddress` (r:1 w:0) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:3) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn withdraw() -> Weight { - Weight::from_all(156_373_000 as u64) + Weight::from_all(57_000_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: NftPeg BlockedTokens (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `NftPeg::BlockedTokens` (r:1 w:1) + // Proof: `NftPeg::BlockedTokens` (`max_values`: None, `max_size`: Some(237), added: 2712, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + // Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `NftPeg::ContractAddress` (r:1 w:0) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn reclaim_blocked_nfts() -> Weight { - Weight::from_all(126_019_000 as u64) + Weight::from_all(44_000_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -94,37 +113,57 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: NftPeg ContractAddress (r:0 w:1) + // Storage: `NftPeg::ContractAddress` (r:0 w:1) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_contract_address() -> Weight { - Weight::from_all(38_330_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:3 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:3) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:3 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + // Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `NftPeg::ContractAddress` (r:1 w:0) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:3) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn withdraw() -> Weight { - Weight::from_all(156_373_000 as u64) + Weight::from_all(57_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: NftPeg BlockedTokens (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + // Storage: `NftPeg::BlockedTokens` (r:1 w:1) + // Proof: `NftPeg::BlockedTokens` (`max_values`: None, `max_size`: Some(237), added: 2712, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + // Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + // Storage: `NftPeg::ContractAddress` (r:1 w:0) + // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn reclaim_blocked_nfts() -> Weight { - Weight::from_all(126_019_000 as u64) + Weight::from_all(44_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/nft/src/weights.rs b/pallet/nft/src/weights.rs index e3efb4a4f..163aee349 100644 --- a/pallet/nft/src/weights.rs +++ b/pallet/nft/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_nft //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_nft +// --pallet=pallet-nft // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -51,8 +50,8 @@ pub trait WeightInfo { fn claim_unowned_collection() -> Weight; fn set_owner() -> Weight; fn set_max_issuance() -> Weight; - fn set_base_uri() -> Weight; - fn set_name() -> Weight; + fn set_base_uri() -> Weight; + fn set_name() -> Weight; fn set_royalties_schedule() -> Weight; fn create_collection() -> Weight; fn toggle_public_mint() -> Weight; @@ -65,85 +64,111 @@ pub trait WeightInfo { /// Weights for pallet_nft using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn claim_unowned_collection() -> Weight { - Weight::from_all(58_034_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(60_339_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(59_770_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(61_298_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(62_263_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(68_177_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:0 w:1) + // Storage: `Nft::NextCollectionId` (r:1 w:1) + // Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Nft::CollectionInfo` (r:0 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(96_939_000 as u64) + Weight::from_all(32_000_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:1) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(30_057_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:1) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(30_177_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(67_673_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + Weight::from_all(19_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(72_799_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(71_347_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -151,85 +176,111 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn claim_unowned_collection() -> Weight { - Weight::from_all(58_034_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(60_339_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(59_770_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(61_298_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(62_263_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(68_177_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:0 w:1) + // Storage: `Nft::NextCollectionId` (r:1 w:1) + // Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Nft::CollectionInfo` (r:0 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(96_939_000 as u64) + Weight::from_all(32_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:1) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(30_057_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:1) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(30_177_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::PublicMintInfo` (r:1 w:0) + // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(67_673_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) + Weight::from_all(19_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(72_799_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::TokenLocks` (r:1 w:0) + // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(71_347_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/pallet/sft/src/weights.rs b/pallet/sft/src/weights.rs index 999c01de6..89060d3e9 100644 --- a/pallet/sft/src/weights.rs +++ b/pallet/sft/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_sft //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_sft +// --pallet=pallet-sft // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -49,11 +48,11 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_sft. pub trait WeightInfo { fn create_collection() -> Weight; + fn create_token() -> Weight; fn toggle_public_mint() -> Weight; fn set_mint_fee() -> Weight; - fn create_token() -> Weight; fn mint() -> Weight; - fn transfer(p: u32) -> Weight; + fn transfer(p: u32, ) -> Weight; fn burn() -> Weight; fn set_owner() -> Weight; fn set_max_issuance() -> Weight; @@ -65,182 +64,227 @@ pub trait WeightInfo { /// Weights for pallet_sft using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Sft SftCollectionInfo (r:0 w:1) + // Storage: `Nft::NextCollectionId` (r:1 w:1) + // Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Sft::SftCollectionInfo` (r:0 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(96_589_000 as u64) + Weight::from_all(33_000_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) - // Storage: Sft TokenInfo (r:0 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:0 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn create_token() -> Weight { - Weight::from_all(66_702_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) - fn mint() -> Weight { - Weight::from_all(67_408_000 as u64) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:1) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn toggle_public_mint() -> Weight { + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:1) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn set_mint_fee() -> Weight { + Weight::from_all(15_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:0) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + fn mint() -> Weight { + Weight::from_all(21_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_all(62_718_000 as u64) - // Standard Error: 3_822 - .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + Weight::from_all(11_682_285 as u64) + // Standard Error: 7_445 + .saturating_add(Weight::from_all(4_632_773 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(66_107_000 as u64) + Weight::from_all(17_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(59_368_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(61_021_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(56_065_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(55_452_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft CollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(68_177_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn toggle_public_mint() -> Weight { - Weight::from_all(30_057_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn set_mint_fee() -> Weight { - Weight::from_all(30_177_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Sft SftCollectionInfo (r:0 w:1) + // Storage: `Nft::NextCollectionId` (r:1 w:1) + // Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodes` (r:1 w:1) + // Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Futurepass::DefaultProxy` (r:1 w:0) + // Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + // Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Sft::SftCollectionInfo` (r:0 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(96_589_000 as u64) + Weight::from_all(33_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) - // Storage: Sft TokenInfo (r:0 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:0 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn create_token() -> Weight { - Weight::from_all(66_702_000 as u64) + Weight::from_all(18_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) - fn mint() -> Weight { - Weight::from_all(67_408_000 as u64) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:1) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn toggle_public_mint() -> Weight { + Weight::from_all(15_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:1) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn set_mint_fee() -> Weight { + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::PublicMintInfo` (r:1 w:0) + // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + fn mint() -> Weight { + Weight::from_all(21_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `Sft::TokenInfo` (r:50 w:50) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_all(62_718_000 as u64) - // Standard Error: 3_822 - .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) + Weight::from_all(11_682_285 as u64) + // Standard Error: 7_445 + .saturating_add(Weight::from_all(4_632_773 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(66_107_000 as u64) + Weight::from_all(17_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(59_368_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:0) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + // Storage: `Sft::TokenInfo` (r:1 w:1) + // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(61_021_000 as u64) + Weight::from_all(16_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(56_065_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(55_452_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Sft CollectionInfo (r:1 w:1) + // Storage: `Sft::SftCollectionInfo` (r:1 w:1) + // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(68_177_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn toggle_public_mint() -> Weight { - Weight::from_all(30_057_000 as u64) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn set_mint_fee() -> Weight { - Weight::from_all(30_177_000 as u64) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } } diff --git a/pallet/token-approvals/src/weights.rs b/pallet/token-approvals/src/weights.rs index 16908e8d3..893fedd89 100644 --- a/pallet/token-approvals/src/weights.rs +++ b/pallet/token-approvals/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_token_approvals //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_token_approvals +// --pallet=pallet-token-approvals // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -59,80 +58,98 @@ pub trait WeightInfo { /// Weights for pallet_token_approvals using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:1 w:0) + // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn erc721_approval() -> Weight { - Weight::from_all(40_691_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC721Approvals (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) + // Storage: `TokenApprovals::ERC721Approvals` (r:1 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn erc721_remove_approval() -> Weight { - Weight::from_all(42_393_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC20Approvals (r:0 w:1) + // Storage: `TokenApprovals::ERC20Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_approval() -> Weight { - Weight::from_all(21_233_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC20Approvals (r:1 w:1) + // Storage: `TokenApprovals::ERC20Approvals` (r:1 w:1) + // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_update_approval() -> Weight { - Weight::from_all(32_323_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) + // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:0 w:1) + // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc721_approval_for_all() -> Weight { - Weight::from_all(21_540_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) + // Storage: `TokenApprovals::ERC1155ApprovalsForAll` (r:0 w:1) + // Proof: `TokenApprovals::ERC1155ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc1155_approval_for_all() -> Weight { - Weight::from_all(21_639_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:1 w:0) + // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn erc721_approval() -> Weight { - Weight::from_all(40_691_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC721Approvals (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) + // Storage: `TokenApprovals::ERC721Approvals` (r:1 w:1) + // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn erc721_remove_approval() -> Weight { - Weight::from_all(42_393_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC20Approvals (r:0 w:1) + // Storage: `TokenApprovals::ERC20Approvals` (r:0 w:1) + // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_approval() -> Weight { - Weight::from_all(21_233_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC20Approvals (r:1 w:1) + // Storage: `TokenApprovals::ERC20Approvals` (r:1 w:1) + // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_update_approval() -> Weight { - Weight::from_all(32_323_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) + // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:0 w:1) + // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc721_approval_for_all() -> Weight { - Weight::from_all(21_540_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) + // Storage: `TokenApprovals::ERC1155ApprovalsForAll` (r:0 w:1) + // Proof: `TokenApprovals::ERC1155ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc1155_approval_for_all() -> Weight { - Weight::from_all(21_639_000 as u64) + Weight::from_all(4_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/vortex-distribution/src/weights.rs b/pallet/vortex-distribution/src/weights.rs index 71f96a74b..149e3a059 100644 --- a/pallet/vortex-distribution/src/weights.rs +++ b/pallet/vortex-distribution/src/weights.rs @@ -18,24 +18,21 @@ //! Autogenerated weights for pallet_vortex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Dev-MBP-2`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed // benchmark // pallet // --chain=dev -// --steps -// 50 -// --repeat -// 20 -// --pallet -// pallet_vortex -// --extrinsic -// * +// --steps=50 +// --repeat=20 +// --pallet=pallet-vortex +// --extrinsic=* // --wasm-execution=compiled +// --heap-pages=4096 // --output // ./pallet/vortex-distribution/src/weights.rs // --template @@ -64,157 +61,209 @@ pub trait WeightInfo { /// Weights for pallet_vortex using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: VortexDistribution NextVortexId (r:1 w:1) - // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) - // Storage: VortexDistribution TotalVortex (r:0 w:1) + // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) + // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(11_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(13_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_all(32_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: VortexDistribution VtxDistEras (r:0 w:1) + // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) + // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: VortexDistribution AssetPrices (r:0 w:1) - /// The range of component `b` is `[1, 1000]`. + // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(9_000_000 as u64) - // Standard Error: 1_608 - .saturating_add(Weight::from_all(743_068 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + Weight::from_all(24_697_645 as u64) + // Standard Error: 5_503 + .saturating_add(Weight::from_all(1_774_291 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution TotalVortex (r:1 w:0) - // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistOrderbook` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) - // Storage: VortexDistribution TotalVortex (r:1 w:0) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: Assets Account (r:2 w:2) - // Storage: Assets Asset (r:1 w:1) - // Storage: System Account (r:3 w:3) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:3 w:3) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(47_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) + Weight::from_all(126_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:1) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: System Account (r:1 w:0) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(33_000_000 as u64) + Weight::from_all(53_000_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution VtxDistPayoutPivot (r:1 w:1) - // Storage: VortexDistribution VtxDistOrderbook (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistPayoutPivot` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistPayoutPivot` (`max_values`: None, `max_size`: Some(1014), added: 3489, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistOrderbook` (r:2 w:1) + // Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) + // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(35_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + Weight::from_all(82_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: VortexDistribution NextVortexId (r:1 w:1) - // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) - // Storage: VortexDistribution TotalVortex (r:0 w:1) + // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) + // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(11_000_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(13_000_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + Weight::from_all(32_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: VortexDistribution VtxDistEras (r:0 w:1) + // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) + // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: VortexDistribution AssetPrices (r:0 w:1) - /// The range of component `b` is `[1, 1000]`. + // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(9_000_000 as u64) - // Standard Error: 1_608 - .saturating_add(Weight::from_all(743_068 as u64).saturating_mul(b as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + Weight::from_all(24_697_645 as u64) + // Standard Error: 5_503 + .saturating_add(Weight::from_all(1_774_291 as u64).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution TotalVortex (r:1 w:0) - // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistOrderbook` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) - // Storage: VortexDistribution TotalVortex (r:1 w:0) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: Assets Account (r:2 w:2) - // Storage: Assets Asset (r:1 w:1) - // Storage: System Account (r:3 w:3) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:3 w:3) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(47_000_000 as u64) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) + Weight::from_all(126_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:1) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: System Account (r:1 w:0) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(33_000_000 as u64) + Weight::from_all(53_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution VtxDistPayoutPivot (r:1 w:1) - // Storage: VortexDistribution VtxDistOrderbook (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) + // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistPayoutPivot` (r:1 w:1) + // Proof: `VortexDistribution::VtxDistPayoutPivot` (`max_values`: None, `max_size`: Some(1014), added: 3489, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::VtxDistOrderbook` (r:2 w:1) + // Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) + // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(35_000_000 as u64) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + Weight::from_all(82_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } } diff --git a/pallet/xls20/src/weights.rs b/pallet/xls20/src/weights.rs index 0232d7841..44a81f499 100644 --- a/pallet/xls20/src/weights.rs +++ b/pallet/xls20/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_xls20 //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,9 +29,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_xls20 +// --pallet=pallet-xls20 // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -58,34 +57,43 @@ pub trait WeightInfo { /// Weights for pallet_xls20 using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: Xls20 Relayer (r:0 w:1) + // Storage: `Xls20::Relayer` (r:0 w:1) + // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_relayer() -> Weight { - Weight::from_all(36_424_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Xls20 Xls20MintFee (r:0 w:1) + // Storage: `Xls20::Xls20MintFee` (r:0 w:1) + // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_xls20_fee() -> Weight { - Weight::from_all(36_004_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn enable_xls20_compatibility() -> Weight { - Weight::from_all(54_993_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:0) - // Storage: Xls20 Xls20MintFee (r:1 w:0) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20TokenMap` (r:1 w:0) + // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20MintFee` (r:1 w:0) + // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn re_request_xls20_mint() -> Weight { - Weight::from_all(70_711_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } - // Storage: Xls20 Relayer (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:1) + // Storage: `Xls20::Relayer` (r:1 w:0) + // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20TokenMap` (r:1 w:1) + // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn fulfill_xls20_mint() -> Weight { - Weight::from_all(73_952_000 as u64) + Weight::from_all(21_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,34 +101,43 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Xls20 Relayer (r:0 w:1) + // Storage: `Xls20::Relayer` (r:0 w:1) + // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_relayer() -> Weight { - Weight::from_all(36_424_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Xls20 Xls20MintFee (r:0 w:1) + // Storage: `Xls20::Xls20MintFee` (r:0 w:1) + // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_xls20_fee() -> Weight { - Weight::from_all(36_004_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:1) + // Storage: `Nft::CollectionInfo` (r:1 w:1) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn enable_xls20_compatibility() -> Weight { - Weight::from_all(54_993_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:0) - // Storage: Xls20 Xls20MintFee (r:1 w:0) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20TokenMap` (r:1 w:0) + // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20MintFee` (r:1 w:0) + // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn re_request_xls20_mint() -> Weight { - Weight::from_all(70_711_000 as u64) + Weight::from_all(19_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } - // Storage: Xls20 Relayer (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:1) + // Storage: `Xls20::Relayer` (r:1 w:0) + // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `Nft::CollectionInfo` (r:1 w:0) + // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + // Storage: `Xls20::Xls20TokenMap` (r:1 w:1) + // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn fulfill_xls20_mint() -> Weight { - Weight::from_all(73_952_000 as u64) + Weight::from_all(21_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/xrpl-bridge/src/weights.rs b/pallet/xrpl-bridge/src/weights.rs index ec92a82fe..de258d0a0 100644 --- a/pallet/xrpl-bridge/src/weights.rs +++ b/pallet/xrpl-bridge/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for pallet_xrpl_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -31,11 +31,10 @@ // --repeat=20 // --pallet=pallet-xrpl-bridge // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./runtime/src/weights/weights +// ./pallet/xrpl-bridge/src/weights.rs // --template // ./scripts/pallet_template.hbs @@ -55,121 +54,160 @@ pub trait WeightInfo { fn add_relayer() -> Weight; fn remove_relayer() -> Weight; fn set_door_tx_fee() -> Weight; + fn set_xrp_source_tag() -> Weight; fn set_door_address() -> Weight; fn set_ticket_sequence_next_allocation() -> Weight; fn set_ticket_sequence_current_allocation() -> Weight; fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight; - fn set_xrp_source_tag() -> Weight; fn prune_settled_ledger_index(i: u32, ) -> Weight; } /// Weights for pallet_xrpl_bridge using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:0) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:1 w:1) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransaction` (r:1 w:1) + // Proof: `XRPLBridge::ProcessXRPTransaction` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) fn submit_transaction() -> Weight { - Weight::from_all(25_000_000 as u64) + Weight::from_all(24_000_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) + // Storage: `XRPLBridge::ChallengeXRPTransactionList` (r:0 w:1) + // Proof: `XRPLBridge::ChallengeXRPTransactionList` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`) fn submit_challenge() -> Weight { - Weight::from_all(6_000_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge PaymentDelay (r:0 w:1) + // Storage: `XRPLBridge::PaymentDelay` (r:0 w:1) + // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(10_560_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTxFee (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + // Storage: `XRPLBridge::DoorTxFee` (r:1 w:0) + // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::PaymentDelay` (r:1 w:0) + // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SourceTag` (r:1 w:0) + // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(51_000_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) + Weight::from_all(73_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: XRPLBridge Relayer (r:0 w:1) + // Storage: `XRPLBridge::Relayer` (r:0 w:1) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn add_relayer() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge Relayer (r:1 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:1) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn remove_relayer() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTxFee (r:0 w:1) + // Storage: `XRPLBridge::DoorTxFee` (r:0 w:1) + // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_door_tx_fee() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - - // Storage: XRPLBridge XRPSourceTag (r:0 w:1) fn set_xrp_source_tag() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - - // Storage: XRPLBridge DoorAddress (r:0 w:1) + // Storage: `XRPLBridge::DoorAddress` (r:0 w:1) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_door_address() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:0) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:0) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:0) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:0 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_all(17_000_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: XRPLBridge SubmissionWindowWidth (r:0 w:1) - // Storage: XRPLBridge HighestPrunedLedgerIndex (r:0 w:1) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:0 w:1) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:5 w:5) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) + // Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:256 w:256) + // Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:0 w:1) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestPrunedLedgerIndex` (r:0 w:1) + // Proof: `XRPLBridge::HighestPrunedLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:0 w:1) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:256) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(10_841_000 as u64) - // Standard Error: 4_892 - .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) + Weight::from_all(1_887_510 as u64) + // Standard Error: 7_277 + .saturating_add(Weight::from_all(5_411_609 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) } - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:1 w:1) + // Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:10) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(16_281_000 as u64) - // Standard Error: 4_806 - .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) + Weight::from_all(15_177_949 as u64) + // Standard Error: 7_466 + .saturating_add(Weight::from_all(1_205_320 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) @@ -178,108 +216,149 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:0) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:1 w:1) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransaction` (r:1 w:1) + // Proof: `XRPLBridge::ProcessXRPTransaction` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) fn submit_transaction() -> Weight { - Weight::from_all(25_000_000 as u64) + Weight::from_all(24_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) + // Storage: `XRPLBridge::ChallengeXRPTransactionList` (r:0 w:1) + // Proof: `XRPLBridge::ChallengeXRPTransactionList` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`) fn submit_challenge() -> Weight { - Weight::from_all(6_000_000 as u64) + Weight::from_all(5_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge PaymentDelay (r:0 w:1) + // Storage: `XRPLBridge::PaymentDelay` (r:0 w:1) + // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(10_560_000 as u64) + Weight::from_all(7_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTxFee (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + // Storage: `XRPLBridge::DoorTxFee` (r:1 w:0) + // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:1 w:1) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::PaymentDelay` (r:1 w:0) + // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SourceTag` (r:1 w:0) + // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:0) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(51_000_000 as u64) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) + Weight::from_all(73_000_000 as u64) + .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: XRPLBridge Relayer (r:0 w:1) + // Storage: `XRPLBridge::Relayer` (r:0 w:1) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn add_relayer() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge Relayer (r:1 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:1) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn remove_relayer() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTxFee (r:0 w:1) + // Storage: `XRPLBridge::DoorTxFee` (r:0 w:1) + // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_door_tx_fee() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge XRPSourceTag (r:0 w:1) fn set_xrp_source_tag() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(3_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorAddress (r:0 w:1) + // Storage: `XRPLBridge::DoorAddress` (r:0 w:1) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_door_address() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(9_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) + // Storage: `XRPLBridge::Relayer` (r:1 w:0) + // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:0) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:0) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:0 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + // Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + // Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_all(17_000_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: XRPLBridge SubmissionWindowWidth (r:0 w:1) - // Storage: XRPLBridge HighestPrunedLedgerIndex (r:0 w:1) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:0 w:1) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:5 w:5) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) + // Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:256 w:256) + // Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:0 w:1) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestPrunedLedgerIndex` (r:0 w:1) + // Proof: `XRPLBridge::HighestPrunedLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:0 w:1) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:256) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(10_841_000 as u64) - // Standard Error: 4_892 - .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) + Weight::from_all(1_887_510 as u64) + // Standard Error: 7_277 + .saturating_add(Weight::from_all(5_411_609 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(i as u64))) } - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) + // Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + // Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + // Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:1 w:1) + // Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + // Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:10) + // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(16_281_000 as u64) - // Standard Error: 4_806 - .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) + Weight::from_all(15_177_949 as u64) + // Standard Error: 7_466 + .saturating_add(Weight::from_all(1_205_320 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) diff --git a/pallet/xrpl/src/weights.rs b/pallet/xrpl/src/weights.rs index f7c2ab643..af19da775 100644 --- a/pallet/xrpl/src/weights.rs +++ b/pallet/xrpl/src/weights.rs @@ -15,12 +15,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for pallet_xrpl_transaction +//! Autogenerated weights for pallet_xrpl //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -29,13 +29,12 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_xrpl_transaction +// --pallet=pallet-xrpl // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/pallet_xrpl_transaction.rs +// ./pallet/xrpl/src/weights.rs // --template // ./scripts/pallet_template.hbs @@ -46,28 +45,33 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; -/// Weight functions needed for pallet_xrpl_transaction. +/// Weight functions needed for pallet_xrpl. pub trait WeightInfo { fn transact() -> Weight; } -/// Weights for pallet_xrpl_transaction using the Substrate node and recommended hardware. +/// Weights for pallet_xrpl using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(174_662_000 as u64) + Weight::from_all(83_000_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + // Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(174_662_000 as u64) + Weight::from_all(83_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } } + diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index 3c284f989..cd4e31b1f 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=frame_system +// --pallet=frame-system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,62 +24,106 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `frame_system`. pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - Weight::from_all(12_219_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(7_900_549, 0) + .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_all(624 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(204, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - Weight::from_all(35_386_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_all(2_387 as u64).saturating_mul(b as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_201, 0).saturating_mul(b.into())) } - // Storage: System Digest (r:1 w:1) - // Storage: unknown [0x3a686561707061676573] (r:0 w:1) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - Weight::from_all(24_466_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) fn set_code() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 76_309_000_000 picoseconds. + Weight::from_parts(78_029_000_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - Weight::from_all(14_970_000 as u64) - // Standard Error: 1_601 - .saturating_add(Weight::from_all(1_392_580 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 952 + .saturating_add(Weight::from_parts(819_941, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[1, 1000]`. + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - Weight::from_all(15_403_000 as u64) - // Standard Error: 2_122 - .saturating_add(Weight::from_all(1_139_191 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 988 + .saturating_add(Weight::from_parts(603_134, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `p` is `[1, 1000]`. + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - Weight::from_all(23_362_000 as u64) - // Standard Error: 2_293 - .saturating_add(Weight::from_all(2_257_564 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `113 + p * (69 ±0)` + // Estimated: `113 + p * (70 ±0)` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 113)) + // Standard Error: 1_663 + .saturating_add(Weight::from_parts(1_111_573, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } } diff --git a/runtime/src/weights/pallet_assets_ext.rs b/runtime/src/weights/pallet_assets_ext.rs index 1d0d59155..6c4796249 100644 --- a/runtime/src/weights/pallet_assets_ext.rs +++ b/runtime/src/weights/pallet_assets_ext.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_assets_ext` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_assets_ext +// --pallet=pallet-assets-ext // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,27 +24,49 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_assets_ext`. pub struct WeightInfo(PhantomData); impl pallet_assets_ext::WeightInfo for WeightInfo { - // Storage: System Account (r:2 w:2) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + /// Storage: `AssetsExt::AssetDeposit` (r:1 w:0) + /// Proof: `AssetsExt::AssetDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::NextAssetId` (r:1 w:1) + /// Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:1 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Futurepass::DefaultProxy` (r:1 w:0) + /// Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_asset() -> Weight { - Weight::from_all(173_306_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `549` + // Estimated: `4014` + // Minimum execution time: 51_000_000 picoseconds. + Weight::from_parts(51_000_000, 0) + .saturating_add(Weight::from_parts(0, 4014)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: AssetsExt AssetDeposit (r:0 w:1) + /// Storage: `AssetsExt::AssetDeposit` (r:0 w:1) + /// Proof: `AssetsExt::AssetDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_asset_deposit() -> Weight { - Weight::from_all(9_969_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_bags_list.rs b/runtime/src/weights/pallet_bags_list.rs index e67067e19..7ee6a4a37 100644 --- a/runtime/src/weights/pallet_bags_list.rs +++ b/runtime/src/weights/pallet_bags_list.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_bags_list +// --pallet=pallet-bags-list // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,39 +24,68 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_bags_list`. pub struct WeightInfo(PhantomData); impl pallet_bags_list::WeightInfo for WeightInfo { - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: VoterList ListNodes (r:4 w:4) - // Storage: VoterList ListBags (r:1 w:1) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:4 w:4) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) fn rebag_non_terminal() -> Weight { - Weight::from_all(159_302_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1362` + // Estimated: `11314` + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 11314)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:0) - // Storage: VoterList ListNodes (r:3 w:3) - // Storage: VoterList ListBags (r:2 w:2) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:3 w:3) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:2 w:2) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) fn rebag_terminal() -> Weight { - Weight::from_all(155_787_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1280` + // Estimated: `8733` + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 8733)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: VoterList ListNodes (r:4 w:4) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:0) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: VoterList ListBags (r:1 w:1) + /// Storage: `VoterList::ListNodes` (r:4 w:4) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:2 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:2 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) fn put_in_front_of() -> Weight { - Weight::from_all(160_935_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1492` + // Estimated: `11314` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(64_000_000, 0) + .saturating_add(Weight::from_parts(0, 11314)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(6)) } } diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index 21fb76b22..80fd6bf5a 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_balances +// --pallet=pallet-balances // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,51 +24,112 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - // Storage: System Account (r:1 w:1) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn transfer_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `40` + // Estimated: `3581` + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - Weight::from_all(86_834_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `40` + // Estimated: `3581` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `129` + // Estimated: `3581` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:2 w:2) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `129` + // Estimated: `3581` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - Weight::from_all(94_704_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `168` + // Estimated: `6172` + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: System Account (r:1 w:1) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { - Weight::from_all(99_652_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `40` + // Estimated: `3581` + // Minimum execution time: 58_000_000 picoseconds. + Weight::from_parts(58_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { - Weight::from_all(56_653_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - - fn transfer_allow_death() -> Weight { - todo!() - } - - fn force_set_balance_creating() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `129` + // Estimated: `3581` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - - fn force_set_balance_killing() -> Weight { - todo!() - } - - fn upgrade_accounts(_u: u32) -> Weight { - todo!() + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (124 ±0)` + // Estimated: `990 + u * (2591 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 10_877 + .saturating_add(Weight::from_parts(15_513_112, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) } } diff --git a/runtime/src/weights/pallet_crowdsale.rs b/runtime/src/weights/pallet_crowdsale.rs index fba3ab933..0c7b15e18 100644 --- a/runtime/src/weights/pallet_crowdsale.rs +++ b/runtime/src/weights/pallet_crowdsale.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_crowdsale` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-crowdsale // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,116 +24,222 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_crowdsale`. pub struct WeightInfo(PhantomData); impl pallet_crowdsale::WeightInfo for WeightInfo { - // Storage: Crowdsale NextSaleId (r:1 w:1) - // Storage: Assets Asset (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:2 w:2) - // Storage: Assets Metadata (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:0 w:1) + /// Storage: `Crowdsale::NextSaleId` (r:1 w:1) + /// Proof: `Crowdsale::NextSaleId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::PublicMintInfo` (r:1 w:0) + /// Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::NextAssetId` (r:1 w:1) + /// Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:1 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Futurepass::DefaultProxy` (r:1 w:0) + /// Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Crowdsale::SaleInfo` (r:0 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) fn initialize() -> Weight { - Weight::from_all(248_593_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) + // Proof Size summary in bytes: + // Measured: `1420` + // Estimated: `6264` + // Minimum execution time: 104_000_000 picoseconds. + Weight::from_parts(105_000_000, 0) + .saturating_add(Weight::from_parts(0, 6264)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(11)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + /// Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn enable() -> Weight { - Weight::from_all(70_636_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `215` + // Estimated: `3598` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3598)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleParticipation (r:1 w:1) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleParticipation` (r:1 w:1) + /// Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn participate() -> Weight { - Weight::from_all(161_250_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Proof Size summary in bytes: + // Measured: `1042` + // Estimated: `6172` + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(71_000_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Crowdsale SaleDistribution (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale NextUnsignedAt (r:0 w:1) + /// Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + /// Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + /// Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::NextUnsignedAt` (r:0 w:1) + /// Proof: `Crowdsale::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_all(248_318_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + // Proof Size summary in bytes: + // Measured: `1387` + // Estimated: `17487` + // Minimum execution time: 97_000_000 picoseconds. + Weight::from_parts(98_000_000, 0) + .saturating_add(Weight::from_parts(0, 17487)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(9)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleParticipation (r:2 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleParticipation` (r:2 w:1) + /// Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + /// Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn claim_voucher() -> Weight { - Weight::from_all(241_268_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1387` + // Estimated: `17487` + // Minimum execution time: 96_000_000 picoseconds. + Weight::from_parts(97_000_000, 0) + .saturating_add(Weight::from_parts(0, 17487)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(8)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:0) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::PublicMintInfo` (r:1 w:0) + /// Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn redeem_voucher() -> Weight { - Weight::from_all(178_332_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `1172` + // Estimated: `3627` + // Minimum execution time: 71_000_000 picoseconds. + Weight::from_parts(71_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Crowdsale SaleInfo (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:0) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn proxy_vault_call() -> Weight { - Weight::from_all(90_026_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + // Proof Size summary in bytes: + // Measured: `324` + // Estimated: `3598` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) + .saturating_add(Weight::from_parts(0, 3598)) + .saturating_add(T::DbWeight::get().reads(3)) } - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + /// Storage: `Crowdsale::SaleInfo` (r:1 w:1) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + /// Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn try_force_distribution() -> Weight { - Weight::from_all(66_938_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `248` + // Estimated: `17487` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 17487)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:1) - // Storage: Crowdsale SaleInfo (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) - // Storage: System Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Crowdsale SaleDistribution (r:1 w:1) + /// Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) + /// Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleInfo` (r:5 w:5) + /// Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:10 w:10) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:20 w:20) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:6 w:6) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:5 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Crowdsale::SaleDistribution` (r:1 w:1) + /// Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_all(217_162_000 as u64) - // Standard Error: 1_012_171 - .saturating_add(Weight::from_all(102_301_369 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().reads((6 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(11 as u64)) - .saturating_add(T::DbWeight::get().writes((5 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `499 + p * (884 ±0)` + // Estimated: `17487 + p * (10340 ±0)` + // Minimum execution time: 101_000_000 picoseconds. + Weight::from_parts(12_967_523, 0) + .saturating_add(Weight::from_parts(0, 17487)) + // Standard Error: 101_547 + .saturating_add(Weight::from_parts(89_002_570, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 10340).saturating_mul(p.into())) } - // Storage: Crowdsale SaleEndBlocks (r:1 w:0) + /// Storage: `Crowdsale::SaleEndBlocks` (r:1 w:0) + /// Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn on_initialize_empty() -> Weight { - Weight::from_all(9_840_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3518` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 3518)) + .saturating_add(T::DbWeight::get().reads(1)) } } diff --git a/runtime/src/weights/pallet_dex.rs b/runtime/src/weights/pallet_dex.rs index 6eaf4df7d..d8fd8b100 100644 --- a/runtime/src/weights/pallet_dex.rs +++ b/runtime/src/weights/pallet_dex.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_dex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-dex // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,83 +24,159 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_dex`. pub struct WeightInfo(PhantomData); impl pallet_dex::WeightInfo for WeightInfo { - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:2 w:2) - // Storage: Assets Account (r:4 w:4) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) + /// Storage: `Dex::TradingPairStatuses` (r:1 w:0) + /// Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPool` (r:1 w:1) + /// Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:2 w:2) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:4 w:4) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Dex::FeeTo` (r:1 w:0) + /// Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:0) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + /// Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_supply() -> Weight { - Weight::from_all(241_774_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1206` + // Estimated: `11330` + // Minimum execution time: 113_000_000 picoseconds. + Weight::from_parts(116_000_000, 0) + .saturating_add(Weight::from_parts(0, 11330)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(8)) } - // Storage: Dex TradingPairStatuses (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:3 w:2) - // Storage: Assets Account (r:4 w:4) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) + /// Storage: `Dex::TradingPairStatuses` (r:1 w:0) + /// Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPool` (r:1 w:1) + /// Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:3 w:2) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:4 w:4) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Dex::FeeTo` (r:1 w:0) + /// Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:0) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + /// Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_target() -> Weight { - Weight::from_all(249_416_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1416` + // Estimated: `11330` + // Minimum execution time: 119_000_000 picoseconds. + Weight::from_parts(122_000_000, 0) + .saturating_add(Weight::from_parts(0, 11330)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) } - // Storage: Dex TradingPairLPToken (r:1 w:1) - // Storage: Assets Metadata (r:3 w:1) - // Storage: AssetsExt NextAssetId (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:4 w:4) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Account (r:6 w:6) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) - // Storage: Dex TradingPairStatuses (r:0 w:1) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:1) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:3 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::NextAssetId` (r:1 w:1) + /// Proof: `AssetsExt::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:3 w:3) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:1 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Futurepass::DefaultProxy` (r:1 w:0) + /// Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPool` (r:1 w:1) + /// Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:6 w:6) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Dex::FeeTo` (r:1 w:0) + /// Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + /// Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dex::TradingPairStatuses` (r:0 w:1) + /// Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { - Weight::from_all(409_994_000 as u64) - .saturating_add(T::DbWeight::get().reads(23 as u64)) - .saturating_add(T::DbWeight::get().writes(20 as u64)) + // Proof Size summary in bytes: + // Measured: `1512` + // Estimated: `16500` + // Minimum execution time: 203_000_000 picoseconds. + Weight::from_parts(206_000_000, 0) + .saturating_add(Weight::from_parts(0, 16500)) + .saturating_add(T::DbWeight::get().reads(23)) + .saturating_add(T::DbWeight::get().writes(21)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex LiquidityPool (r:1 w:1) - // Storage: Assets Asset (r:3 w:3) - // Storage: Assets Account (r:6 w:6) - // Storage: System Account (r:1 w:1) - // Storage: Dex FeeTo (r:1 w:0) - // Storage: Dex LiquidityPoolLastK (r:1 w:1) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:0) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:3 w:3) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:6 w:6) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPool` (r:1 w:1) + /// Proof: `Dex::LiquidityPool` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Dex::FeeTo` (r:1 w:0) + /// Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) + /// Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { - Weight::from_all(333_350_000 as u64) - .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(12 as u64)) + // Proof Size summary in bytes: + // Measured: `1657` + // Estimated: `16500` + // Minimum execution time: 179_000_000 picoseconds. + Weight::from_parts(182_000_000, 0) + .saturating_add(Weight::from_parts(0, 16500)) + .saturating_add(T::DbWeight::get().reads(14)) + .saturating_add(T::DbWeight::get().writes(12)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:0) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Dex::TradingPairStatuses` (r:1 w:1) + /// Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn reenable_trading_pair() -> Weight { - Weight::from_all(70_400_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `293` + // Estimated: `3486` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3486)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Dex TradingPairLPToken (r:1 w:0) - // Storage: Dex TradingPairStatuses (r:1 w:1) + /// Storage: `Dex::TradingPairLPToken` (r:1 w:0) + /// Proof: `Dex::TradingPairLPToken` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Dex::TradingPairStatuses` (r:1 w:1) + /// Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn disable_trading_pair() -> Weight { - Weight::from_all(69_817_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `293` + // Estimated: `3486` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3486)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Dex FeeTo (r:0 w:1) + /// Storage: `Dex::FeeTo` (r:0 w:1) + /// Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(42_312_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_doughnut.rs b/runtime/src/weights/pallet_doughnut.rs index 91939b445..454cb1ffa 100644 --- a/runtime/src/weights/pallet_doughnut.rs +++ b/runtime/src/weights/pallet_doughnut.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_doughnut` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-doughnut // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,35 +24,64 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_doughnut`. pub struct WeightInfo(PhantomData); impl pallet_doughnut::WeightInfo for WeightInfo { - // Storage: Doughnut WhitelistedHolders (r:1 w:0) - // Storage: Doughnut BlockedDoughnuts (r:1 w:0) - // Storage: Doughnut BlockedHolders (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `Doughnut::WhitelistedHolders` (r:1 w:0) + /// Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) + /// Storage: `Doughnut::BlockedDoughnuts` (r:1 w:0) + /// Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `Doughnut::BlockedHolders` (r:1 w:0) + /// Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(504_337_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + // Proof Size summary in bytes: + // Measured: `135` + // Estimated: `3576` + // Minimum execution time: 215_000_000 picoseconds. + Weight::from_parts(216_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(5)) } - // Storage: Doughnut BlockedDoughnuts (r:0 w:1) + /// Storage: `Doughnut::BlockedDoughnuts` (r:0 w:1) + /// Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn revoke_doughnut() -> Weight { - Weight::from_all(68_652_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Doughnut BlockedHolders (r:0 w:1) + /// Storage: `Doughnut::BlockedHolders` (r:0 w:1) + /// Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) fn revoke_holder() -> Weight { - Weight::from_all(41_219_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Doughnut WhitelistedHolders (r:0 w:1) + /// Storage: `Doughnut::WhitelistedHolders` (r:0 w:1) + /// Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn update_whitelisted_holders() -> Weight { - Weight::from_all(39_451_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_echo.rs b/runtime/src/weights/pallet_echo.rs index 0eda615ab..07d84f34b 100644 --- a/runtime/src/weights/pallet_echo.rs +++ b/runtime/src/weights/pallet_echo.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_echo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_echo +// --pallet=pallet-echo // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,22 +24,34 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_echo`. pub struct WeightInfo(PhantomData); impl pallet_echo::WeightInfo for WeightInfo { - // Storage: Echo NextSessionId (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + /// Storage: `Echo::NextSessionId` (r:1 w:1) + /// Proof: `Echo::NextSessionId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetId` (r:1 w:0) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:0) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn ping() -> Weight { - Weight::from_all(87_226_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `334` + // Estimated: `1819` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) + .saturating_add(Weight::from_parts(0, 1819)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/src/weights/pallet_erc20_peg.rs b/runtime/src/weights/pallet_erc20_peg.rs index b86fb8706..2010f69c1 100644 --- a/runtime/src/weights/pallet_erc20_peg.rs +++ b/runtime/src/weights/pallet_erc20_peg.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_erc20_peg` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-04-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-erc20-peg // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,74 +24,147 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_erc20_peg`. pub struct WeightInfo(PhantomData); impl pallet_erc20_peg::WeightInfo for WeightInfo { - // Storage: Erc20Peg DepositsActive (r:0 w:1) + /// Storage: `Erc20Peg::DepositsActive` (r:0 w:1) + /// Proof: `Erc20Peg::DepositsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits() -> Weight { - Weight::from_all(14_946_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg WithdrawalsActive (r:0 w:1) + /// Storage: `Erc20Peg::WithdrawalsActive` (r:0 w:1) + /// Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals() -> Weight { - Weight::from_all(14_815_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg DepositsDelayActive (r:0 w:1) + /// Storage: `Erc20Peg::DepositsDelayActive` (r:0 w:1) + /// Proof: `Erc20Peg::DepositsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits_delay() -> Weight { - Weight::from_all(37_003_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg WithdrawalsDelayActive (r:0 w:1) + /// Storage: `Erc20Peg::WithdrawalsDelayActive` (r:0 w:1) + /// Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals_delay() -> Weight { - Weight::from_all(36_122_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg WithdrawalsActive (r:1 w:0) - // Storage: Erc20Peg AssetIdToErc20 (r:1 w:0) - // Storage: Erc20Peg PaymentDelay (r:1 w:0) - // Storage: Erc20Peg WithdrawalsDelayActive (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: Erc20Peg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + /// Storage: `Erc20Peg::WithdrawalsActive` (r:1 w:0) + /// Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Erc20Peg::AssetIdToErc20` (r:1 w:0) + /// Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Erc20Peg::PaymentDelay` (r:1 w:0) + /// Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Erc20Peg::WithdrawalsDelayActive` (r:1 w:0) + /// Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Erc20Peg::ContractAddress` (r:1 w:0) + /// Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetId` (r:1 w:0) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:0) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { - Weight::from_all(162_298_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `780` + // Estimated: `3627` + // Minimum execution time: 65_000_000 picoseconds. + Weight::from_parts(67_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Erc20Peg ContractAddress (r:0 w:1) + /// Storage: `Erc20Peg::ContractAddress` (r:0 w:1) + /// Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_erc20_peg_address() -> Weight { - Weight::from_all(38_786_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg RootPegContractAddress (r:0 w:1) + /// Storage: `Erc20Peg::RootPegContractAddress` (r:0 w:1) + /// Proof: `Erc20Peg::RootPegContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_root_peg_address() -> Weight { - Weight::from_all(38_297_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg Erc20ToAssetId (r:0 w:1) - // Storage: Erc20Peg AssetIdToErc20 (r:0 w:1) + /// Storage: `Erc20Peg::Erc20ToAssetId` (r:0 w:1) + /// Proof: `Erc20Peg::Erc20ToAssetId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Erc20Peg::AssetIdToErc20` (r:0 w:1) + /// Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_erc20_asset_map() -> Weight { - Weight::from_all(19_394_000 as u64) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Erc20Peg Erc20Meta (r:0 w:1) + /// Storage: `Erc20Peg::Erc20Meta` (r:0 w:1) + /// Proof: `Erc20Peg::Erc20Meta` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) fn set_erc20_meta() -> Weight { - Weight::from_all(18_502_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Erc20Peg PaymentDelay (r:0 w:1) + /// Storage: `Erc20Peg::PaymentDelay` (r:0 w:1) + /// Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(39_048_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_evm_chain_id.rs b/runtime/src/weights/pallet_evm_chain_id.rs index 6bad72c94..0020ae7c1 100644 --- a/runtime/src/weights/pallet_evm_chain_id.rs +++ b/runtime/src/weights/pallet_evm_chain_id.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_evm_chain_id` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_evm_chain_id +// --pallet=pallet-evm-chain-id // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,16 +24,23 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_evm_chain_id`. pub struct WeightInfo(PhantomData); impl pallet_evm_chain_id::WeightInfo for WeightInfo { - // Storage: EVMChainId ChainId (r:0 w:1) + /// Storage: `EVMChainId::ChainId` (r:0 w:1) + /// Proof: `EVMChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_chain_id() -> Weight { - Weight::from_all(36_737_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_fee_control.rs b/runtime/src/weights/pallet_fee_control.rs index 1c6228749..a16f71e38 100644 --- a/runtime/src/weights/pallet_fee_control.rs +++ b/runtime/src/weights/pallet_fee_control.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_fee_control` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_fee_control +// --pallet=pallet-fee-control // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,23 +24,48 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_fee_control`. pub struct WeightInfo(PhantomData); impl pallet_fee_control::WeightInfo for WeightInfo { - // Storage: FeeControl Data (r:1 w:1) + /// Storage: `FeeControl::Data` (r:1 w:1) + /// Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_evm_base_fee() -> Weight { - Weight::from_all(20_501_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `4` + // Estimated: `1537` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 1537)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: FeeControl Data (r:1 w:1) + /// Storage: `FeeControl::Data` (r:1 w:1) + /// Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_weight_multiplier() -> Weight { - Weight::from_all(19_789_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `4` + // Estimated: `1537` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 1537)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `FeeControl::Data` (r:1 w:1) + /// Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) + fn set_length_multiplier() -> Weight { + // Proof Size summary in bytes: + // Measured: `4` + // Estimated: `1537` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 1537)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_futurepass.rs b/runtime/src/weights/pallet_futurepass.rs index c0e8c3113..85e78635e 100644 --- a/runtime/src/weights/pallet_futurepass.rs +++ b/runtime/src/weights/pallet_futurepass.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_futurepass` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_futurepass +// --pallet=pallet-futurepass // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,63 +24,105 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_futurepass`. pub struct WeightInfo(PhantomData); impl pallet_futurepass::WeightInfo for WeightInfo { - // Storage: Futurepass Holders (r:1 w:1) - // Storage: Futurepass NextFuturepassId (r:1 w:1) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Futurepass::Holders` (r:1 w:1) + /// Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Futurepass::NextFuturepassId` (r:1 w:1) + /// Proof: `Futurepass::NextFuturepassId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(151_035_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `218` + // Estimated: `4310` + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(80_000_000, 0) + .saturating_add(Weight::from_parts(0, 4310)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Futurepass Holders (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: `Futurepass::Holders` (r:1 w:0) + /// Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_all(225_223_000 as u64) - // Standard Error: 6_389 - .saturating_add(Weight::from_all(320_135 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `654 + p * (25 ±0)` + // Estimated: `6172` + // Minimum execution time: 114_000_000 picoseconds. + Weight::from_parts(116_899_088, 0) + .saturating_add(Weight::from_parts(0, 6172)) + // Standard Error: 9_329 + .saturating_add(Weight::from_parts(142_713, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Futurepass Holders (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: `Futurepass::Holders` (r:2 w:0) + /// Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_all(150_724_000 as u64) - // Standard Error: 4_528 - .saturating_add(Weight::from_all(342_256 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `679 + p * (25 ±0)` + // Estimated: `6172` + // Minimum execution time: 77_000_000 picoseconds. + Weight::from_parts(81_226_068, 0) + .saturating_add(Weight::from_parts(0, 6172)) + // Standard Error: 14_968 + .saturating_add(Weight::from_parts(148_449, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Futurepass Holders (r:2 w:2) - // Storage: Proxy Proxies (r:1 w:1) - // Storage: System Account (r:2 w:2) + /// Storage: `Futurepass::Holders` (r:2 w:2) + /// Proof: `Futurepass::Holders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_all(205_036_000 as u64) - // Standard Error: 76_809 - .saturating_add(Weight::from_all(51_031_323 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `654 + p * (25 ±0)` + // Estimated: `6172` + // Minimum execution time: 131_000_000 picoseconds. + Weight::from_parts(72_399_085, 0) + .saturating_add(Weight::from_parts(0, 6172)) + // Standard Error: 101_767 + .saturating_add(Weight::from_parts(54_812_430, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: MaintenanceMode BlockedCalls (r:2 w:0) - // Storage: MaintenanceMode BlockedPallets (r:2 w:0) - // Storage: Proxy Proxies (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:2 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:2 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_all(92_606_000 as u64) - // Standard Error: 4_129 - .saturating_add(Weight::from_all(248_098 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + // Proof Size summary in bytes: + // Measured: `225 + p * (25 ±0)` + // Estimated: `6162` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(22_975_706, 0) + .saturating_add(Weight::from_parts(0, 6162)) + // Standard Error: 117_370 + .saturating_add(Weight::from_parts(718_446, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) } } diff --git a/runtime/src/weights/pallet_maintenance_mode.rs b/runtime/src/weights/pallet_maintenance_mode.rs index ad113c2fb..18e61e7b5 100644 --- a/runtime/src/weights/pallet_maintenance_mode.rs +++ b/runtime/src/weights/pallet_maintenance_mode.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_maintenance_mode` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_maintenance_mode +// --pallet=pallet-maintenance-mode // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,36 +24,67 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_maintenance_mode`. pub struct WeightInfo(PhantomData); impl pallet_maintenance_mode::WeightInfo for WeightInfo { - // Storage: MaintenanceMode MaintenanceModeActive (r:0 w:1) + /// Storage: `MaintenanceMode::MaintenanceModeActive` (r:0 w:1) + /// Proof: `MaintenanceMode::MaintenanceModeActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn enable_maintenance_mode() -> Weight { - Weight::from_all(37_105_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MaintenanceMode BlockedAccounts (r:0 w:1) + /// Storage: `MaintenanceMode::BlockedAccounts` (r:0 w:1) + /// Proof: `MaintenanceMode::BlockedAccounts` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_account() -> Weight { - Weight::from_all(39_698_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MaintenanceMode BlockedEVMAddresses (r:0 w:1) + /// Storage: `MaintenanceMode::BlockedEVMAddresses` (r:0 w:1) + /// Proof: `MaintenanceMode::BlockedEVMAddresses` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_evm_target() -> Weight { - Weight::from_all(40_250_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MaintenanceMode BlockedCalls (r:0 w:1) + /// Storage: `MaintenanceMode::BlockedCalls` (r:0 w:1) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) fn block_call() -> Weight { - Weight::from_all(42_341_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MaintenanceMode BlockedPallets (r:0 w:1) + /// Storage: `MaintenanceMode::BlockedPallets` (r:0 w:1) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn block_pallet() -> Weight { - Weight::from_all(42_924_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_marketplace.rs b/runtime/src/weights/pallet_marketplace.rs index 8a342b0d4..4e922d655 100644 --- a/runtime/src/weights/pallet_marketplace.rs +++ b/runtime/src/weights/pallet_marketplace.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_marketplace` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-marketplace // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,189 +24,347 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_marketplace`. pub struct WeightInfo(PhantomData); impl pallet_marketplace::WeightInfo for WeightInfo { - // Storage: Marketplace NextMarketplaceId (r:1 w:1) - // Storage: Marketplace RegisteredMarketplaces (r:0 w:1) + /// Storage: `Marketplace::NextMarketplaceId` (r:1 w:1) + /// Proof: `Marketplace::NextMarketplaceId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::RegisteredMarketplaces` (r:0 w:1) + /// Proof: `Marketplace::RegisteredMarketplaces` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn register_marketplace() -> Weight { - Weight::from_all(54_893_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `134` + // Estimated: `1489` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::FeeTo` (r:1 w:0) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::NextListingId` (r:1 w:1) + /// Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:50 w:50) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::Listings` (r:0 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_all(114_457_000 as u64) - // Standard Error: 8_169 - .saturating_add(Weight::from_all(11_313_760 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `4431` + // Estimated: `3464 + p * (2508 ±0)` + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(33_860_816, 0) + .saturating_add(Weight::from_parts(0, 3464)) + // Standard Error: 67_261 + .saturating_add(Weight::from_parts(5_738_948, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 2508).saturating_mul(p.into())) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::FeeTo` (r:1 w:0) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::NextListingId` (r:1 w:1) + /// Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Sft::TokenInfo` (r:50 w:50) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::Listings` (r:0 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_all(103_871_000 as u64) - // Standard Error: 6_979 - .saturating_add(Weight::from_all(8_215_707 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `335 + p * (105 ±0)` + // Estimated: `3949 + p * (52002579 ±0)` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(28_088_734, 0) + .saturating_add(Weight::from_parts(0, 3949)) + // Standard Error: 10_590 + .saturating_add(Weight::from_parts(4_649_147, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 52002579).saturating_mul(p.into())) } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) + /// Storage: `Marketplace::Listings` (r:1 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:0) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:0 w:1) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn buy() -> Weight { - Weight::from_all(214_610_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + // Proof Size summary in bytes: + // Measured: `5052` + // Estimated: `23760` + // Minimum execution time: 56_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 23760)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) + /// Storage: `Marketplace::Listings` (r:50 w:50) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:50 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:50 w:0) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:50 w:50) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:50) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:50) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:50) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:0 w:50) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_all(214_929_000 as u64) - // Standard Error: 149_332 - .saturating_add(Weight::from_all(143_823_942 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - .saturating_add(T::DbWeight::get().writes((9 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `583 + p * (4512 ±0)` + // Estimated: `990 + p * (22770 ±0)` + // Minimum execution time: 56_000_000 picoseconds. + Weight::from_parts(10_635_673, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 47_898 + .saturating_add(Weight::from_parts(45_302_679, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 22770).saturating_mul(p.into())) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::FeeTo` (r:1 w:0) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::NextListingId` (r:1 w:1) + /// Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:50 w:50) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::Listings` (r:0 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_all(114_630_000 as u64) - // Standard Error: 7_983 - .saturating_add(Weight::from_all(11_305_102 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `4431` + // Estimated: `3464 + p * (2508 ±0)` + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(29_929_469, 0) + .saturating_add(Weight::from_parts(0, 3464)) + // Standard Error: 4_376 + .saturating_add(Weight::from_parts(5_808_883, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 2508).saturating_mul(p.into())) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: Marketplace NextListingId (r:1 w:1) - // Storage: Sft TokenInfo (r:1 w:1) - // Storage: Marketplace Listings (r:0 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::FeeTo` (r:1 w:0) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::NextListingId` (r:1 w:1) + /// Proof: `Marketplace::NextListingId` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Sft::TokenInfo` (r:50 w:50) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::Listings` (r:0 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_all(102_552_000 as u64) - // Standard Error: 7_049 - .saturating_add(Weight::from_all(8_159_046 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `335 + p * (105 ±0)` + // Estimated: `3949 + p * (52002579 ±0)` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(28_372_734, 0) + .saturating_add(Weight::from_parts(0, 3949)) + // Standard Error: 6_143 + .saturating_add(Weight::from_parts(4_610_559, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 52002579).saturating_mul(p.into())) } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingWinningBid (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: Marketplace ListingEndSchedule (r:0 w:2) + /// Storage: `Marketplace::Listings` (r:1 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingWinningBid` (r:1 w:1) + /// Proof: `Marketplace::ListingWinningBid` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:2) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn bid() -> Weight { - Weight::from_all(198_371_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) + // Proof Size summary in bytes: + // Measured: `830` + // Estimated: `23760` + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(79_000_000, 0) + .saturating_add(Weight::from_parts(0, 23760)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(9)) } - // Storage: Marketplace Listings (r:1 w:1) - // Storage: Marketplace ListingEndSchedule (r:0 w:1) - // Storage: Marketplace OpenCollectionListings (r:0 w:1) - // Storage: Nft TokenLocks (r:0 w:1) + /// Storage: `Marketplace::Listings` (r:1 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::ListingEndSchedule` (r:0 w:1) + /// Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::OpenCollectionListings` (r:0 w:1) + /// Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:0 w:1) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn cancel_sale() -> Weight { - Weight::from_all(77_516_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `249` + // Estimated: `23760` + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 23760)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Marketplace Listings (r:1 w:1) + /// Storage: `Marketplace::Listings` (r:1 w:1) + /// Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) fn update_fixed_price() -> Weight { - Weight::from_all(63_733_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `249` + // Estimated: `23760` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 23760)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Marketplace NextOfferId (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: Marketplace Offers (r:0 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::NextOfferId` (r:1 w:1) + /// Proof: `Marketplace::NextOfferId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:1 w:0) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::TokenOffers` (r:1 w:1) + /// Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::Offers` (r:0 w:1) + /// Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) fn make_simple_offer() -> Weight { - Weight::from_all(193_035_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `4984` + // Estimated: `6160` + // Minimum execution time: 83_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) + /// Storage: `Marketplace::Offers` (r:1 w:1) + /// Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::TokenOffers` (r:1 w:1) + /// Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) fn cancel_offer() -> Weight { - Weight::from_all(176_013_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Proof Size summary in bytes: + // Measured: `1070` + // Estimated: `6160` + // Minimum execution time: 77_000_000 picoseconds. + Weight::from_parts(77_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Marketplace Offers (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:1) - // Storage: Marketplace FeeTo (r:1 w:0) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - // Storage: Marketplace TokenOffers (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + /// Storage: `Marketplace::Offers` (r:1 w:1) + /// Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:1 w:1) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::FeeTo` (r:1 w:0) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Marketplace::TokenOffers` (r:1 w:1) + /// Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn accept_offer() -> Weight { - Weight::from_all(288_646_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(10 as u64)) + // Proof Size summary in bytes: + // Measured: `5366` + // Estimated: `6160` + // Minimum execution time: 122_000_000 picoseconds. + Weight::from_parts(123_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(10)) } - // Storage: Marketplace FeeTo (r:0 w:1) + /// Storage: `Marketplace::FeeTo` (r:0 w:1) + /// Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(37_843_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 531d54448..c25643803 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-12, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-multisig // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,86 +24,133 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_multisig`. pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - Weight::from_all(43_675_000 as u64) - // Standard Error: 6 - .saturating_add(Weight::from_all(1_120 as u64).saturating_mul(z as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(17_168_932, 0) + .saturating_add(Weight::from_parts(0, 3576)) + // Standard Error: 42 + .saturating_add(Weight::from_parts(30, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - Weight::from_all(116_760_000 as u64) - // Standard Error: 1_981 - .saturating_add(Weight::from_all(72_399 as u64).saturating_mul(s as u64)) - // Standard Error: 19 - .saturating_add(Weight::from_all(1_160 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `5587` + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(32_820_873, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 1_694 + .saturating_add(Weight::from_parts(45_050, 0).saturating_mul(s.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_324, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - Weight::from_all(84_507_000 as u64) - // Standard Error: 1_562 - .saturating_add(Weight::from_all(67_329 as u64).saturating_mul(s as u64)) - // Standard Error: 15 - .saturating_add(Weight::from_all(1_280 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `250` + // Estimated: `5587` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(17_923_296, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 985 + .saturating_add(Weight::from_parts(37_937, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_319, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - Weight::from_all(147_886_000 as u64) - // Standard Error: 2_224 - .saturating_add(Weight::from_all(74_525 as u64).saturating_mul(s as u64)) - // Standard Error: 22 - .saturating_add(Weight::from_all(2_396 as u64).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `424 + s * (20 ±0)` + // Estimated: `5587` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(41_971_454, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 1_679 + .saturating_add(Weight::from_parts(51_797, 0).saturating_mul(s.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_274, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - Weight::from_all(90_484_000 as u64) - // Standard Error: 2_392 - .saturating_add(Weight::from_all(279_909 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `5587` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_335_346, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 750 + .saturating_add(Weight::from_parts(51_150, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - Weight::from_all(63_903_000 as u64) - // Standard Error: 892 - .saturating_add(Weight::from_all(210_558 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `250` + // Estimated: `5587` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_893_142, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 872 + .saturating_add(Weight::from_parts(40_016, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(2122), added: 4597, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - Weight::from_all(124_026_000 as u64) - // Standard Error: 1_684 - .saturating_add(Weight::from_all(260_658 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `389` + // Estimated: `5587` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_144_653, 0) + .saturating_add(Weight::from_parts(0, 5587)) + // Standard Error: 891 + .saturating_add(Weight::from_parts(47_320, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_nft.rs b/runtime/src/weights/pallet_nft.rs index d5332ff61..6d0536744 100644 --- a/runtime/src/weights/pallet_nft.rs +++ b/runtime/src/weights/pallet_nft.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_nft` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-nft // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,94 +24,180 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_nft`. pub struct WeightInfo(PhantomData); impl pallet_nft::WeightInfo for WeightInfo { - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn claim_unowned_collection() -> Weight { - Weight::from_all(57_640_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(60_803_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(60_691_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(61_645_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(60_914_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(61_244_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3464` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Nft CollectionInfo (r:0 w:1) + /// Storage: `Nft::NextCollectionId` (r:1 w:1) + /// Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:1 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Futurepass::DefaultProxy` (r:1 w:0) + /// Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Nft::CollectionInfo` (r:0 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(98_100_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `249` + // Estimated: `3714` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) + .saturating_add(Weight::from_parts(0, 3714)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::PublicMintInfo` (r:1 w:1) + /// Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(62_779_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3499` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3499)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Nft PublicMintInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::PublicMintInfo` (r:1 w:1) + /// Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(63_055_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3499` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3499)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft PublicMintInfo (r:1 w:0) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::PublicMintInfo` (r:1 w:0) + /// Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(71_057_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3499` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 3499)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:1 w:0) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(73_346_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3498` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3498)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Nft TokenLocks (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + /// Storage: `Nft::TokenLocks` (r:1 w:0) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(71_205_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `298` + // Estimated: `3498` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 3498)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/src/weights/pallet_nft_peg.rs b/runtime/src/weights/pallet_nft_peg.rs index d49cc0253..de5412dff 100644 --- a/runtime/src/weights/pallet_nft_peg.rs +++ b/runtime/src/weights/pallet_nft_peg.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_nft_peg` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_nft_peg +// --pallet=pallet-nft-peg // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,45 +24,81 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_nft_peg`. pub struct WeightInfo(PhantomData); impl pallet_nft_peg::WeightInfo for WeightInfo { - // Storage: NftPeg ContractAddress (r:0 w:1) + /// Storage: `NftPeg::ContractAddress` (r:0 w:1) + /// Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_contract_address() -> Weight { - Weight::from_all(37_983_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) - // Storage: Nft TokenLocks (r:3 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: TokenApprovals ERC721Approvals (r:0 w:3) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Nft::TokenLocks` (r:3 w:0) + /// Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + /// Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `NftPeg::ContractAddress` (r:1 w:0) + /// Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetId` (r:1 w:0) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:0) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:3) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn withdraw() -> Weight { - Weight::from_all(156_387_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `630` + // Estimated: `8514` + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) + .saturating_add(Weight::from_parts(0, 8514)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: NftPeg BlockedTokens (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: NftPeg RootNftToErc721 (r:1 w:0) - // Storage: NftPeg ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) + /// Storage: `NftPeg::BlockedTokens` (r:1 w:1) + /// Proof: `NftPeg::BlockedTokens` (`max_values`: None, `max_size`: Some(237), added: 2712, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `NftPeg::RootNftToErc721` (r:1 w:0) + /// Proof: `NftPeg::RootNftToErc721` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `NftPeg::ContractAddress` (r:1 w:0) + /// Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetId` (r:1 w:0) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:0) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn reclaim_blocked_nfts() -> Weight { - Weight::from_all(125_473_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `634` + // Estimated: `3702` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) + .saturating_add(Weight::from_parts(0, 3702)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/src/weights/pallet_preimage.rs b/runtime/src/weights/pallet_preimage.rs index 1d31d5732..1436ca15c 100644 --- a/runtime/src/weights/pallet_preimage.rs +++ b/runtime/src/weights/pallet_preimage.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_preimage +// --pallet=pallet-preimage // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,99 +24,177 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_all(86_217_000 as u64) - // Standard Error: 2 - .saturating_add(Weight::from_all(2_824 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `308` + // Estimated: `3544` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_456, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_all(56_931_000 as u64) - // Standard Error: 1 - .saturating_add(Weight::from_all(2_798 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `3544` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(50_431_692, 0) + .saturating_add(Weight::from_parts(0, 3544)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_410, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:0) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_all(53_528_000 as u64) - // Standard Error: 1 - .saturating_add(Weight::from_all(2_801 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `3544` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_450, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { - Weight::from_all(111_854_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `442` + // Estimated: `3544` + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_all(67_604_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `244` + // Estimated: `3544` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { - Weight::from_all(92_443_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `276` + // Estimated: `3544` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { - Weight::from_all(65_081_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `244` + // Estimated: `3544` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { - Weight::from_all(50_653_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `3544` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { - Weight::from_all(27_502_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `3544` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { - Weight::from_all(70_399_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `244` + // Estimated: `3544` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Preimage PreimageFor (r:0 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_all(55_509_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `3544` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Preimage StatusFor (r:1 w:1) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_all(27_227_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `3544` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 3544)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index 2c0168343..a50667bd9 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_proxy +// --pallet=pallet-proxy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,123 +24,189 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { - // Storage: Proxy Proxies (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { - Weight::from_all(72_038_000 as u64) - // Standard Error: 2_950 - .saturating_add(Weight::from_all(172_231 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + // Proof Size summary in bytes: + // Measured: `225 + p * (25 ±0)` + // Estimated: `4310` + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_270_943, 0) + .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 3_396 + .saturating_add(Weight::from_parts(9_604, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { - Weight::from_all(119_520_000 as u64) - // Standard Error: 2_174 - .saturating_add(Weight::from_all(287_165 as u64).saturating_mul(a as u64)) - // Standard Error: 2_166 - .saturating_add(Weight::from_all(63_952 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `477 + a * (56 ±0) + p * (25 ±0)` + // Estimated: `5302` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(38_803_288, 0) + .saturating_add(Weight::from_parts(0, 5302)) + // Standard Error: 8_989 + .saturating_add(Weight::from_parts(202_856, 0).saturating_mul(a.into())) + // Standard Error: 9_287 + .saturating_add(Weight::from_parts(52_578, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_all(74_742_000 as u64) - // Standard Error: 1_460 - .saturating_add(Weight::from_all(293_515 as u64).saturating_mul(a as u64)) - // Standard Error: 1_455 - .saturating_add(Weight::from_all(42_459 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `329 + a * (56 ±0)` + // Estimated: `5302` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(23_410_006, 0) + .saturating_add(Weight::from_parts(0, 5302)) + // Standard Error: 6_342 + .saturating_add(Weight::from_parts(156_606, 0).saturating_mul(a.into())) + // Standard Error: 6_553 + .saturating_add(Weight::from_parts(12_015, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - Weight::from_all(74_968_000 as u64) - // Standard Error: 1_532 - .saturating_add(Weight::from_all(291_855 as u64).saturating_mul(a as u64)) - // Standard Error: 1_526 - .saturating_add(Weight::from_all(38_198 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + fn reject_announcement(a: u32, _p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `329 + a * (56 ±0)` + // Estimated: `5302` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(23_782_069, 0) + .saturating_add(Weight::from_parts(0, 5302)) + // Standard Error: 4_312 + .saturating_add(Weight::from_parts(108_677, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { - Weight::from_all(94_416_000 as u64) - // Standard Error: 1_714 - .saturating_add(Weight::from_all(330_877 as u64).saturating_mul(a as u64)) - // Standard Error: 1_707 - .saturating_add(Weight::from_all(111_571 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `345 + a * (56 ±0) + p * (25 ±0)` + // Estimated: `5302` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(31_032_584, 0) + .saturating_add(Weight::from_parts(0, 5302)) + // Standard Error: 2_911 + .saturating_add(Weight::from_parts(166_166, 0).saturating_mul(a.into())) + // Standard Error: 3_008 + .saturating_add(Weight::from_parts(17_666, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Proxy Proxies (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { - Weight::from_all(80_745_000 as u64) - // Standard Error: 1_796 - .saturating_add(Weight::from_all(153_336 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `149 + p * (25 ±0)` + // Estimated: `4310` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_781_374, 0) + .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 3_065 + .saturating_add(Weight::from_parts(24_009, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Proxy Proxies (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { - Weight::from_all(80_442_000 as u64) - // Standard Error: 2_920 - .saturating_add(Weight::from_all(209_086 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `149 + p * (25 ±0)` + // Estimated: `4310` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_462_081, 0) + .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 2_494 + .saturating_add(Weight::from_parts(33_113, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Proxy Proxies (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { - Weight::from_all(71_639_000 as u64) - // Standard Error: 1_962 - .saturating_add(Weight::from_all(138_291 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `149 + p * (25 ±0)` + // Estimated: `4310` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(22_951_335, 0) + .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 4_509 + .saturating_add(Weight::from_parts(36_383, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { - Weight::from_all(90_001_000 as u64) - // Standard Error: 2_403 - .saturating_add(Weight::from_all(125_318 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn create_pure(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `161` + // Estimated: `4310` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_884_365, 0) + .saturating_add(Weight::from_parts(0, 4310)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Proxy Proxies (r:1 w:1) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { - Weight::from_all(74_261_000 as u64) - // Standard Error: 2_140 - .saturating_add(Weight::from_all(134_788 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `174 + p * (25 ±0)` + // Estimated: `4310` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(22_613_442, 0) + .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 2_779 + .saturating_add(Weight::from_parts(42_324, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_recovery.rs b/runtime/src/weights/pallet_recovery.rs index 7bb3c43f6..640c2a82f 100644 --- a/runtime/src/weights/pallet_recovery.rs +++ b/runtime/src/weights/pallet_recovery.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_recovery` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_recovery +// --pallet=pallet-recovery // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,86 +24,143 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_recovery`. pub struct WeightInfo(PhantomData); impl pallet_recovery::WeightInfo for WeightInfo { - // Storage: Recovery Proxy (r:1 w:0) - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `Recovery::Proxy` (r:1 w:0) + /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn as_recovered() -> Weight { - Weight::from_all(39_795_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + // Proof Size summary in bytes: + // Measured: `200` + // Estimated: `3576` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(3)) } - // Storage: Recovery Proxy (r:0 w:1) + /// Storage: `Recovery::Proxy` (r:0 w:1) + /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn set_recovered() -> Weight { - Weight::from_all(41_958_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery Recoverable (r:1 w:1) + /// Storage: `Recovery::Recoverable` (r:1 w:1) + /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. - fn create_recovery(n: u32, ) -> Weight { - Weight::from_all(76_749_000 as u64) - // Standard Error: 10_879 - .saturating_add(Weight::from_all(427_761 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn create_recovery(_n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3576` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_249_723, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery Recoverable (r:1 w:0) - // Storage: Recovery ActiveRecoveries (r:1 w:1) + /// Storage: `Recovery::Recoverable` (r:1 w:0) + /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `Recovery::ActiveRecoveries` (r:1 w:1) + /// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`) fn initiate_recovery() -> Weight { - Weight::from_all(87_814_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `127` + // Estimated: `3602` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3602)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery Recoverable (r:1 w:0) - // Storage: Recovery ActiveRecoveries (r:1 w:1) + /// Storage: `Recovery::Recoverable` (r:1 w:0) + /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `Recovery::ActiveRecoveries` (r:1 w:1) + /// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. fn vouch_recovery(n: u32, ) -> Weight { - Weight::from_all(62_347_000 as u64) - // Standard Error: 10_571 - .saturating_add(Weight::from_all(749_873 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `197 + n * (42 ±0)` + // Estimated: `3602` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_087_016, 0) + .saturating_add(Weight::from_parts(0, 3602)) + // Standard Error: 40_495 + .saturating_add(Weight::from_parts(291_436, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery Recoverable (r:1 w:0) - // Storage: Recovery ActiveRecoveries (r:1 w:0) - // Storage: Recovery Proxy (r:1 w:1) + /// Storage: `Recovery::Recoverable` (r:1 w:0) + /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `Recovery::ActiveRecoveries` (r:1 w:0) + /// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`) + /// Storage: `Recovery::Proxy` (r:1 w:1) + /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. fn claim_recovery(n: u32, ) -> Weight { - Weight::from_all(81_946_000 as u64) - // Standard Error: 12_095 - .saturating_add(Weight::from_all(626_761 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `221 + n * (40 ±0)` + // Estimated: `3602` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_158_287, 0) + .saturating_add(Weight::from_parts(0, 3602)) + // Standard Error: 35_260 + .saturating_add(Weight::from_parts(1_018_232, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery ActiveRecoveries (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Recovery::ActiveRecoveries` (r:1 w:1) + /// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. - fn close_recovery(n: u32, ) -> Weight { - Weight::from_all(90_525_000 as u64) - // Standard Error: 15_736 - .saturating_add(Weight::from_all(473_706 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + fn close_recovery(_n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `343 + n * (20 ±0)` + // Estimated: `3602` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(34_324_033, 0) + .saturating_add(Weight::from_parts(0, 3602)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Recovery ActiveRecoveries (r:1 w:0) - // Storage: Recovery Recoverable (r:1 w:1) + /// Storage: `Recovery::ActiveRecoveries` (r:1 w:0) + /// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`) + /// Storage: `Recovery::Recoverable` (r:1 w:1) + /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. - fn remove_recovery(n: u32, ) -> Weight { - Weight::from_all(90_367_000 as u64) - // Standard Error: 15_559 - .saturating_add(Weight::from_all(467_866 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn remove_recovery(_n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `124 + n * (20 ±0)` + // Estimated: `3602` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_182_320, 0) + .saturating_add(Weight::from_parts(0, 3602)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Recovery Proxy (r:1 w:1) + /// Storage: `Recovery::Proxy` (r:1 w:1) + /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn cancel_recovered() -> Weight { - Weight::from_all(45_173_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `124` + // Estimated: `3521` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) + .saturating_add(Weight::from_parts(0, 3521)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index e11136199..c47d950ca 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_scheduler +// --pallet=pallet-scheduler // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,83 +24,171 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { - // TODO, needed for staking_final_session_tracking_ethy test - Weight::zero() + // Proof Size summary in bytes: + // Measured: `31` + // Estimated: `1489` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - - fn service_agenda_base(_s: u32) -> Weight { - Weight::zero() + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(9863), added: 12338, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 50]`. + fn service_agenda_base(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `13328` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(6_606_851, 0) + .saturating_add(Weight::from_parts(0, 13328)) + // Standard Error: 2_170 + .saturating_add(Weight::from_parts(412_200, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn service_task_base() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - - fn service_task_fetched(_s: u32) -> Weight { - Weight::zero() + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// The range of component `s` is `[128, 4194304]`. + fn service_task_fetched(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `279 + s * (1 ±0)` + // Estimated: `3744 + s * (1 ±0)` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(791, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn service_task_named() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn service_task_periodic() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn execute_dispatch_signed() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(2)) } - fn execute_dispatch_unsigned() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(9863), added: 12338, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_all(48_281_000 as u64) - // Standard Error: 5_985 - .saturating_add(Weight::from_all(428_425 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `13328` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(14_258_588, 0) + .saturating_add(Weight::from_parts(0, 13328)) + // Standard Error: 2_192 + .saturating_add(Weight::from_parts(391_975, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(9863), added: 12338, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { - Weight::from_all(53_998_000 as u64) - // Standard Error: 2_662 - .saturating_add(Weight::from_all(1_323_278 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `78 + s * (177 ±0)` + // Estimated: `13328` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(14_216_000, 0) + .saturating_add(Weight::from_parts(0, 13328)) + // Standard Error: 1_188 + .saturating_add(Weight::from_parts(658_352, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(9863), added: 12338, mode: `MaxEncodedLen`) + /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { - Weight::from_all(56_276_000 as u64) - // Standard Error: 8_503 - .saturating_add(Weight::from_all(608_966 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `255 + s * (185 ±0)` + // Estimated: `13328` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(17_801_647, 0) + .saturating_add(Weight::from_parts(0, 13328)) + // Standard Error: 2_497 + .saturating_add(Weight::from_parts(419_279, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(9863), added: 12338, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { - Weight::from_all(56_560_000 as u64) - // Standard Error: 6_118 - .saturating_add(Weight::from_all(1_491_672 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `281 + s * (185 ±0)` + // Estimated: `13328` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(16_910_775, 0) + .saturating_add(Weight::from_parts(0, 13328)) + // Standard Error: 1_182 + .saturating_add(Weight::from_parts(669_459, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/src/weights/pallet_session.rs b/runtime/src/weights/pallet_session.rs index 824c84e69..d93b76d97 100644 --- a/runtime/src/weights/pallet_session.rs +++ b/runtime/src/weights/pallet_session.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-session // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,27 +24,44 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:4 w:4) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:4 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { - Weight::from_all(123_148_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1552` + // Estimated: `12442` + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) + .saturating_add(Weight::from_parts(0, 12442)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Session NextKeys (r:1 w:1) - // Storage: Session KeyOwner (r:0 w:4) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { - Weight::from_all(101_373_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1530` + // Estimated: `4995` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(37_000_000, 0) + .saturating_add(Weight::from_parts(0, 4995)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(5)) } } diff --git a/runtime/src/weights/pallet_sft.rs b/runtime/src/weights/pallet_sft.rs index 08415346e..83a83af4b 100644 --- a/runtime/src/weights/pallet_sft.rs +++ b/runtime/src/weights/pallet_sft.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_sft` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_sft +// --pallet=pallet-sft // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,98 +24,182 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_sft`. pub struct WeightInfo(PhantomData); impl pallet_sft::WeightInfo for WeightInfo { - // Storage: Nft NextCollectionId (r:1 w:1) - // Storage: EVM AccountCodes (r:1 w:1) - // Storage: Futurepass DefaultProxy (r:1 w:0) - // Storage: System Account (r:1 w:1) - // Storage: Sft SftCollectionInfo (r:0 w:1) + /// Storage: `Nft::NextCollectionId` (r:1 w:1) + /// Proof: `Nft::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:1 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Futurepass::DefaultProxy` (r:1 w:0) + /// Proof: `Futurepass::DefaultProxy` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodesMetadata` (r:0 w:1) + /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Sft::SftCollectionInfo` (r:0 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(97_485_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `289` + // Estimated: `3754` + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) + .saturating_add(Weight::from_parts(0, 3754)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) - // Storage: Sft TokenInfo (r:0 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Sft::TokenInfo` (r:0 w:1) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn create_token() -> Weight { - Weight::from_all(68_303_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `3949` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Sft::PublicMintInfo` (r:1 w:1) + /// Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn toggle_public_mint() -> Weight { + // Proof Size summary in bytes: + // Measured: `207` + // Estimated: `3949` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Sft::PublicMintInfo` (r:1 w:1) + /// Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + fn set_mint_fee() -> Weight { + // Proof Size summary in bytes: + // Measured: `207` + // Estimated: `3949` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Sft::PublicMintInfo` (r:1 w:0) + /// Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) + /// Storage: `Sft::TokenInfo` (r:1 w:1) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(69_085_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `52003569` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(21_000_000, 0) + .saturating_add(Weight::from_parts(0, 52003569)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft TokenInfo (r:1 w:1) + /// Storage: `Sft::TokenInfo` (r:50 w:50) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_all(62_718_000 as u64) - // Standard Error: 3_822 - .saturating_add(Weight::from_all(3_381_220 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + // Proof Size summary in bytes: + // Measured: `132 + p * (104 ±0)` + // Estimated: `990 + p * (52002579 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(11_678_693, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 6_786 + .saturating_add(Weight::from_parts(4_622_717, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 52002579).saturating_mul(p.into())) } - // Storage: Sft TokenInfo (r:1 w:1) + /// Storage: `Sft::TokenInfo` (r:1 w:1) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(67_249_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `235` + // Estimated: `52003569` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 52003569)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(60_343_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `3949` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft SftCollectionInfo (r:1 w:0) - // Storage: Sft TokenInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:0) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) + /// Storage: `Sft::TokenInfo` (r:1 w:1) + /// Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(62_071_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `52003569` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 52003569)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(56_389_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `3949` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft SftCollectionInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(56_311_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `3949` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Sft CollectionInfo (r:1 w:1) + /// Storage: `Sft::SftCollectionInfo` (r:1 w:1) + /// Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(68_177_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn toggle_public_mint() -> Weight { - Weight::from_all(62_779_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Sft CollectionInfo (r:1 w:0) - // Storage: Sft PublicMintInfo (r:1 w:1) - fn set_mint_fee() -> Weight { - Weight::from_all(63_055_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `173` + // Estimated: `3949` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3949)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index 6008a5f6f..d50fa47e7 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-staking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,398 +24,755 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_staking`. pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Payee (r:0 w:1) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:0 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn bond() -> Weight { - Weight::from_all(124_513_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `886` + // Estimated: `4752` + // Minimum execution time: 51_000_000 picoseconds. + Weight::from_parts(52_000_000, 0) + .saturating_add(Weight::from_parts(0, 4752)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) } - // Storage: Staking Bonded (r:1 w:0) - // Storage: Staking Ledger (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: VoterList ListNodes (r:3 w:3) - // Storage: VoterList ListBags (r:2 w:2) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:3 w:3) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:2 w:2) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) fn bond_extra() -> Weight { - Weight::from_all(210_180_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Proof Size summary in bytes: + // Measured: `1733` + // Estimated: `8733` + // Minimum execution time: 91_000_000 picoseconds. + Weight::from_parts(95_000_000, 0) + .saturating_add(Weight::from_parts(0, 8733)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking Nominators (r:1 w:0) - // Storage: Staking MinNominatorBond (r:1 w:0) - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: VoterList ListNodes (r:3 w:3) - // Storage: Staking Bonded (r:1 w:0) - // Storage: VoterList ListBags (r:2 w:2) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinNominatorBond` (r:1 w:0) + /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:3 w:3) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:2 w:2) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) fn unbond() -> Weight { - Weight::from_all(222_249_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1933` + // Estimated: `8733` + // Minimum execution time: 93_000_000 picoseconds. + Weight::from_parts(95_000_000, 0) + .saturating_add(Weight::from_parts(0, 8733)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_update(s: u32, ) -> Weight { - Weight::from_all(105_106_000 as u64) - // Standard Error: 794 - .saturating_add(Weight::from_all(113_516 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `848` + // Estimated: `4752` + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(39_633_756, 0) + .saturating_add(Weight::from_parts(0, 4752)) + // Standard Error: 1_169 + .saturating_add(Weight::from_parts(2_226, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Payee (r:0 w:1) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::SlashingSpans` (r:1 w:1) + /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Validators` (r:1 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:0 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Staking::SpanSlash` (r:0 w:100) + /// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(s: u32, ) -> Weight { - Weight::from_all(193_766_000 as u64) - // Standard Error: 1_711 - .saturating_add(Weight::from_all(38_899 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) + // Proof Size summary in bytes: + // Measured: `2000 + s * (4 ±0)` + // Estimated: `6152 + s * (4 ±0)` + // Minimum execution time: 86_000_000 picoseconds. + Weight::from_parts(90_505_516, 0) + .saturating_add(Weight::from_parts(0, 6152)) + // Standard Error: 2_034 + .saturating_add(Weight::from_parts(1_326_786, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(11)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking MinValidatorBond (r:1 w:0) - // Storage: Staking MinCommission (r:1 w:0) - // Storage: Staking Validators (r:1 w:1) - // Storage: Staking MaxValidatorsCount (r:1 w:0) - // Storage: Staking Nominators (r:1 w:0) - // Storage: Staking Bonded (r:1 w:0) - // Storage: VoterList ListNodes (r:1 w:1) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: Staking CounterForValidators (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinValidatorBond` (r:1 w:0) + /// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinCommission` (r:1 w:0) + /// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1 w:1) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxValidatorsCount` (r:1 w:0) + /// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:1 w:1) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForValidators` (r:1 w:1) + /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn validate() -> Weight { - Weight::from_all(154_123_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Proof Size summary in bytes: + // Measured: `1176` + // Estimated: `4532` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) + .saturating_add(Weight::from_parts(0, 4532)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(5)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:128 w:128) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { - Weight::from_all(93_055_000 as u64) - // Standard Error: 11_620 - .saturating_add(Weight::from_all(15_212_704 as u64).saturating_mul(k as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(k as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(k as u64))) + // Proof Size summary in bytes: + // Measured: `1152 + k * (363 ±0)` + // Estimated: `4532 + k * (2829 ±0)` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(26_700_520, 0) + .saturating_add(Weight::from_parts(0, 4532)) + // Standard Error: 8_637 + .saturating_add(Weight::from_parts(7_473_500, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 2829).saturating_mul(k.into())) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking MinNominatorBond (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking MaxNominatorsCount (r:1 w:0) - // Storage: Staking Validators (r:2 w:0) - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking Bonded (r:1 w:0) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: Staking CounterForNominators (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinNominatorBond` (r:1 w:0) + /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxNominatorsCount` (r:1 w:0) + /// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:17 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - Weight::from_all(165_602_000 as u64) - // Standard Error: 14_193 - .saturating_add(Weight::from_all(5_437_281 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1719 + n * (79 ±0)` + // Estimated: `6152 + n * (2508 ±0)` + // Minimum execution time: 61_000_000 picoseconds. + Weight::from_parts(58_570_831, 0) + .saturating_add(Weight::from_parts(0, 6152)) + // Standard Error: 11_966 + .saturating_add(Weight::from_parts(3_275_457, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(Weight::from_parts(0, 2508).saturating_mul(n.into())) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill() -> Weight { - Weight::from_all(143_595_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1441` + // Estimated: `6152` + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 6152)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking Payee (r:0 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:0 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn set_payee() -> Weight { - Weight::from_all(44_472_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `667` + // Estimated: `4532` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 4532)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Ledger (r:2 w:2) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:2 w:2) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) fn set_controller() -> Weight { - Weight::from_all(62_994_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `740` + // Estimated: `8074` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 8074)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: Staking ValidatorCount (r:0 w:1) + /// Storage: `Staking::ValidatorCount` (r:0 w:1) + /// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_validator_count() -> Weight { - Weight::from_all(15_413_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking ForceEra (r:0 w:1) + /// Storage: `Staking::ForceEra` (r:0 w:1) + /// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn force_no_eras() -> Weight { - Weight::from_all(15_349_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking ForceEra (r:0 w:1) + /// Storage: `Staking::ForceEra` (r:0 w:1) + /// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn force_new_era() -> Weight { - Weight::from_all(15_651_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking ForceEra (r:0 w:1) + /// Storage: `Staking::ForceEra` (r:0 w:1) + /// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn force_new_era_always() -> Weight { - Weight::from_all(20_227_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking Invulnerables (r:0 w:1) + /// Storage: `Staking::Invulnerables` (r:0 w:1) + /// Proof: `Staking::Invulnerables` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - Weight::from_all(15_435_000 as u64) - // Standard Error: 101 - .saturating_add(Weight::from_all(20_270 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_095_006, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 58 + .saturating_add(Weight::from_parts(4_358, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Ledger (r:0 w:1) - // Storage: Staking Payee (r:0 w:1) - // Storage: Staking SpanSlash (r:0 w:2) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::SlashingSpans` (r:1 w:1) + /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Validators` (r:1 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:0 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:0 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Staking::SpanSlash` (r:0 w:100) + /// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - Weight::from_all(181_038_000 as u64) - // Standard Error: 5_013 - .saturating_add(Weight::from_all(2_761_600 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Proof Size summary in bytes: + // Measured: `1758 + s * (4 ±0)` + // Estimated: `6152 + s * (4 ±0)` + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(83_091_425, 0) + .saturating_add(Weight::from_parts(0, 6152)) + // Standard Error: 2_503 + .saturating_add(Weight::from_parts(1_313_783, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(12)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) } - // Storage: Staking UnappliedSlashes (r:1 w:1) + /// Storage: `Staking::UnappliedSlashes` (r:1 w:1) + /// Proof: `Staking::UnappliedSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - Weight::from_all(206_124_000 as u64) - // Standard Error: 56_954 - .saturating_add(Weight::from_all(8_070_082 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `54538` + // Estimated: `58003` + // Minimum execution time: 121_000_000 picoseconds. + Weight::from_parts(622_781_525, 0) + .saturating_add(Weight::from_parts(0, 58003)) + // Standard Error: 36_428 + .saturating_add(Weight::from_parts(3_111_992, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking ErasStakersClipped (r:1 w:0) - // Storage: Staking ErasRewardPoints (r:1 w:0) - // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:3 w:2) - /// The range of component `n` is `[1, 256]`. + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) + /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:257 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) + /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) + /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) + /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:257 w:0) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:258 w:257) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - Weight::from_all(423_132_000 as u64) - // Standard Error: 27_272 - .saturating_add(Weight::from_all(52_434_686 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(n as u64))) + // Proof Size summary in bytes: + // Measured: `19573 + n * (82 ±0)` + // Estimated: `20290 + n * (2591 ±1)` + // Minimum execution time: 85_000_000 picoseconds. + Weight::from_parts(250_735_017, 0) + .saturating_add(Weight::from_parts(0, 20290)) + // Standard Error: 68_491 + .saturating_add(Weight::from_parts(28_734_857, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into())) } - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking ErasValidatorReward (r:1 w:0) - // Storage: Staking Bonded (r:2 w:0) - // Storage: Staking Ledger (r:2 w:2) - // Storage: Staking ErasStakersClipped (r:1 w:0) - // Storage: Staking ErasRewardPoints (r:1 w:0) - // Storage: Staking ErasValidatorPrefs (r:1 w:0) - // Storage: Staking Payee (r:2 w:0) - // Storage: System Account (r:3 w:2) - // Storage: Balances Locks (r:2 w:2) - /// The range of component `n` is `[1, 256]`. + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) + /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:257 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:257 w:257) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) + /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) + /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) + /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:257 w:0) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:258 w:257) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:257 w:257) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:257 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - Weight::from_all(457_966_000 as u64) - // Standard Error: 45_072 - .saturating_add(Weight::from_all(71_850_733 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(16 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(6 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(n as u64))) + // Proof Size summary in bytes: + // Measured: `32667 + n * (255 ±0)` + // Estimated: `30369 + n * (3762 ±0)` + // Minimum execution time: 107_000_000 picoseconds. + Weight::from_parts(172_215_755, 0) + .saturating_add(Weight::from_parts(0, 30369)) + // Standard Error: 22_618 + .saturating_add(Weight::from_parts(46_956_463, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 3762).saturating_mul(n.into())) } - // Storage: Staking Ledger (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - // Storage: VoterList ListNodes (r:3 w:3) - // Storage: Staking Bonded (r:1 w:0) - // Storage: VoterList ListBags (r:2 w:2) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:3 w:3) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:2 w:2) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - Weight::from_all(209_695_000 as u64) - // Standard Error: 4_324 - .saturating_add(Weight::from_all(119_279 as u64).saturating_mul(l as u64)) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1738 + l * (5 ±0)` + // Estimated: `8733` + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(82_995_332, 0) + .saturating_add(Weight::from_parts(0, 8733)) + // Standard Error: 2_914 + .saturating_add(Weight::from_parts(36_371, 0).saturating_mul(l.into())) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: System Account (r:1 w:1) - // Storage: Staking Bonded (r:1 w:1) - // Storage: Staking Ledger (r:1 w:1) - // Storage: Staking SlashingSpans (r:1 w:1) - // Storage: Staking Validators (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: Staking Payee (r:0 w:1) - // Storage: Staking SpanSlash (r:0 w:1) + /// Storage: `Staking::Bonded` (r:1 w:1) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:1 w:1) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::SlashingSpans` (r:1 w:1) + /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::Validators` (r:1 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:0 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Staking::SpanSlash` (r:0 w:100) + /// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - Weight::from_all(209_631_000 as u64) - // Standard Error: 2_556 - .saturating_add(Weight::from_all(2_617_822 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(13 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Proof Size summary in bytes: + // Measured: `2000 + s * (4 ±0)` + // Estimated: `6152 + s * (4 ±0)` + // Minimum execution time: 93_000_000 picoseconds. + Weight::from_parts(93_128_529, 0) + .saturating_add(Weight::from_parts(0, 6152)) + // Standard Error: 2_066 + .saturating_add(Weight::from_parts(1_312_504, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(11)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) } - // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:1 w:0) - // Storage: VoterList ListBags (r:200 w:0) - // Storage: VoterList ListNodes (r:101 w:0) - // Storage: Staking Nominators (r:101 w:0) - // Storage: Staking Validators (r:2 w:0) - // Storage: Staking Bonded (r:101 w:0) - // Storage: Staking Ledger (r:101 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: Staking CounterForValidators (r:1 w:0) - // Storage: Staking ValidatorCount (r:1 w:0) - // Storage: Staking MinimumValidatorCount (r:1 w:0) - // Storage: Staking CurrentEra (r:1 w:1) - // Storage: Staking ErasStakersClipped (r:0 w:1) - // Storage: Staking ErasValidatorPrefs (r:0 w:1) - // Storage: Staking ErasStakers (r:0 w:1) - // Storage: Staking ErasTotalStake (r:0 w:1) - // Storage: Staking ErasStartSessionIndex (r:0 w:1) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:0) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:200 w:0) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:110 w:0) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:110 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:11 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:110 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:110 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForValidators` (r:1 w:0) + /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ValidatorCount` (r:1 w:0) + /// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinimumValidatorCount` (r:1 w:0) + /// Proof: `Staking::MinimumValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentEra` (r:1 w:1) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStakersClipped` (r:0 w:10) + /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasValidatorPrefs` (r:0 w:10) + /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStakers` (r:0 w:10) + /// Proof: `Staking::ErasStakers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Staking::ErasTotalStake` (r:0 w:1) + /// Proof: `Staking::ErasTotalStake` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStartSessionIndex` (r:0 w:1) + /// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinimumActiveStake` (r:0 w:1) + /// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `v` is `[1, 10]`. - /// The range of component `n` is `[1, 100]`. + /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - Weight::from_all(1_323_912_000 as u64) - // Standard Error: 2_550_625 - .saturating_add(Weight::from_all(75_353_445 as u64).saturating_mul(v as u64)) - // Standard Error: 253_922 - .saturating_add(Weight::from_all(28_315_922 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(262 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Proof Size summary in bytes: + // Measured: `0 + n * (471 ±0) + v * (2268 ±0)` + // Estimated: `507590 + n * (3542 ±2) + v * (3542 ±24)` + // Minimum execution time: 585_000_000 picoseconds. + Weight::from_parts(587_000_000, 0) + .saturating_add(Weight::from_parts(0, 507590)) + // Standard Error: 1_161_648 + .saturating_add(Weight::from_parts(32_237_191, 0).saturating_mul(v.into())) + // Standard Error: 115_751 + .saturating_add(Weight::from_parts(15_218_678, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(207)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) + .saturating_add(Weight::from_parts(0, 3542).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3542).saturating_mul(v.into())) } - // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: Staking SlashingSpans (r:21 w:0) - // Storage: VoterList ListBags (r:200 w:0) - // Storage: VoterList ListNodes (r:1500 w:0) - // Storage: Staking Nominators (r:1500 w:0) - // Storage: Staking Validators (r:500 w:0) - // Storage: Staking Bonded (r:1500 w:0) - // Storage: Staking Ledger (r:1500 w:0) - // Storage: System BlockWeight (r:1 w:1) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:0) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:200 w:0) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2000 w:0) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:2000 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1000 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:2000 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Staking::Ledger` (r:2000 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinimumActiveStake` (r:0 w:1) + /// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. - /// The range of component `s` is `[1, 20]`. - fn get_npos_voters(v: u32, n: u32) -> Weight { - Weight::from_all(52_897_035_000 as u64) - // Standard Error: 412_068 - .saturating_add(Weight::from_all(11_532_618 as u64).saturating_mul(v as u64)) - // Standard Error: 412_068 - .saturating_add(Weight::from_all(10_969_107 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(6723 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `3502 + n * (591 ±0) + v * (266 ±0)` + // Estimated: `507590 + n * (3542 ±0) + v * (3542 ±0)` + // Minimum execution time: 29_422_000_000 picoseconds. + Weight::from_parts(29_584_000_000, 0) + .saturating_add(Weight::from_parts(0, 507590)) + // Standard Error: 323_592 + .saturating_add(Weight::from_parts(4_984_053, 0).saturating_mul(v.into())) + // Standard Error: 323_592 + .saturating_add(Weight::from_parts(2_591_234, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(202)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 3542).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3542).saturating_mul(v.into())) } - // Storage: Staking CounterForValidators (r:1 w:0) - // Storage: Staking Validators (r:501 w:0) - // Storage: System BlockWeight (r:1 w:1) + /// Storage: `Staking::CounterForValidators` (r:1 w:0) + /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1001 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - Weight::from_all(9_288_786_000 as u64) - // Standard Error: 102_881 - .saturating_add(Weight::from_all(6_695_809 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().reads(503 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `908 + v * (37 ±0)` + // Estimated: `3498 + v * (2508 ±0)` + // Minimum execution time: 2_321_000_000 picoseconds. + Weight::from_parts(20_898_038, 0) + .saturating_add(Weight::from_parts(0, 3498)) + // Standard Error: 16_967 + .saturating_add(Weight::from_parts(4_750_224, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2508).saturating_mul(v.into())) } - // Storage: Staking MinCommission (r:0 w:1) - // Storage: Staking MinValidatorBond (r:0 w:1) - // Storage: Staking MaxValidatorsCount (r:0 w:1) - // Storage: Staking ChillThreshold (r:0 w:1) - // Storage: Staking MaxNominatorsCount (r:0 w:1) - // Storage: Staking MinNominatorBond (r:0 w:1) + /// Storage: `Staking::MinCommission` (r:0 w:1) + /// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinValidatorBond` (r:0 w:1) + /// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxValidatorsCount` (r:0 w:1) + /// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ChillThreshold` (r:0 w:1) + /// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxNominatorsCount` (r:0 w:1) + /// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinNominatorBond` (r:0 w:1) + /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_staking_configs_all_set() -> Weight { - Weight::from_all(26_540_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: Staking MinCommission (r:0 w:1) - // Storage: Staking MinValidatorBond (r:0 w:1) - // Storage: Staking MaxValidatorsCount (r:0 w:1) - // Storage: Staking ChillThreshold (r:0 w:1) - // Storage: Staking MaxNominatorsCount (r:0 w:1) - // Storage: Staking MinNominatorBond (r:0 w:1) + /// Storage: `Staking::MinCommission` (r:0 w:1) + /// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinValidatorBond` (r:0 w:1) + /// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxValidatorsCount` (r:0 w:1) + /// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ChillThreshold` (r:0 w:1) + /// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxNominatorsCount` (r:0 w:1) + /// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinNominatorBond` (r:0 w:1) + /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_staking_configs_all_remove() -> Weight { - Weight::from_all(24_869_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: Staking Ledger (r:1 w:0) - // Storage: Staking Nominators (r:1 w:1) - // Storage: Staking ChillThreshold (r:1 w:0) - // Storage: Staking MaxNominatorsCount (r:1 w:0) - // Storage: Staking CounterForNominators (r:1 w:1) - // Storage: Staking MinNominatorBond (r:1 w:0) - // Storage: Staking Validators (r:1 w:0) - // Storage: VoterList ListNodes (r:2 w:2) - // Storage: VoterList ListBags (r:1 w:1) - // Storage: VoterList CounterForListNodes (r:1 w:1) + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1067), added: 3542, mode: `MaxEncodedLen`) + /// Storage: `Staking::Nominators` (r:1 w:1) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(354), added: 2829, mode: `MaxEncodedLen`) + /// Storage: `Staking::ChillThreshold` (r:1 w:0) + /// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Staking::MaxNominatorsCount` (r:1 w:0) + /// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::CounterForNominators` (r:1 w:1) + /// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::MinNominatorBond` (r:1 w:0) + /// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListNodes` (r:2 w:2) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`) + /// Storage: `VoterList::ListBags` (r:1 w:1) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(58), added: 2533, mode: `MaxEncodedLen`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:1) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn chill_other() -> Weight { - Weight::from_all(184_604_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Proof Size summary in bytes: + // Measured: `1556` + // Estimated: `6152` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_000_000, 0) + .saturating_add(Weight::from_parts(0, 6152)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) } - // Storage: Staking MinCommission (r:1 w:0) - // Storage: Staking Validators (r:1 w:1) + /// Storage: `Staking::MinCommission` (r:1 w:0) + /// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::Validators` (r:1 w:1) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn force_apply_min_commission() -> Weight { - Weight::from_all(48_456_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `581` + // Estimated: `3498` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3498)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `Staking::MinCommission` (r:0 w:1) + /// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_min_commission() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index 57b85c785..f8d652d35 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_timestamp +// --pallet=pallet-timestamp // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,21 +24,34 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - // Storage: Timestamp Now (r:1 w:1) - // Storage: Babe CurrentSlot (r:1 w:0) + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Babe::CurrentSlot` (r:1 w:0) + /// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { - Weight::from_all(29_190_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `345` + // Estimated: `1493` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { - Weight::from_all(14_458_000 as u64) + // Proof Size summary in bytes: + // Measured: `194` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/src/weights/pallet_token_approvals.rs b/runtime/src/weights/pallet_token_approvals.rs index 5754d97c8..92c8b56e2 100644 --- a/runtime/src/weights/pallet_token_approvals.rs +++ b/runtime/src/weights/pallet_token_approvals.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_token_approvals` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_token_approvals +// --pallet=pallet-token-approvals // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,47 +24,87 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_token_approvals`. pub struct WeightInfo(PhantomData); impl pallet_token_approvals::WeightInfo for WeightInfo { - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: TokenApprovals ERC721ApprovalsForAll (r:1 w:0) - // Storage: TokenApprovals ERC721Approvals (r:0 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:1 w:0) + /// Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + /// Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn erc721_approval() -> Weight { - Weight::from_all(41_824_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `420` + // Estimated: `3526` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3526)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: TokenApprovals ERC721Approvals (r:1 w:1) - // Storage: Nft CollectionInfo (r:1 w:0) + /// Storage: `TokenApprovals::ERC721Approvals` (r:1 w:1) + /// Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn erc721_remove_approval() -> Weight { - Weight::from_all(42_988_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `481` + // Estimated: `3501` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: TokenApprovals ERC20Approvals (r:0 w:1) + /// Storage: `TokenApprovals::ERC20Approvals` (r:0 w:1) + /// Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_approval() -> Weight { - Weight::from_all(21_470_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: TokenApprovals ERC20Approvals (r:1 w:1) + /// Storage: `TokenApprovals::ERC20Approvals` (r:1 w:1) + /// Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_update_approval() -> Weight { - Weight::from_all(32_760_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3541` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 3541)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: TokenApprovals ERC721ApprovalsForAll (r:0 w:1) + /// Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:0 w:1) + /// Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc721_approval_for_all() -> Weight { - Weight::from_all(21_398_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: TokenApprovals ERC1155ApprovalsForAll (r:0 w:1) + /// Storage: `TokenApprovals::ERC1155ApprovalsForAll` (r:0 w:1) + /// Proof: `TokenApprovals::ERC1155ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc1155_approval_for_all() -> Weight { - Weight::from_all(21_109_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_utility.rs b/runtime/src/weights/pallet_utility.rs index 35658dd5e..72ec3e07f 100644 --- a/runtime/src/weights/pallet_utility.rs +++ b/runtime/src/weights/pallet_utility.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_utility +// --pallet=pallet-utility // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,44 +24,81 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_utility`. pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_all(36_940_000 as u64) - // Standard Error: 2_666 - .saturating_add(Weight::from_all(14_113_912 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + // Standard Error: 3_794 + .saturating_add(Weight::from_parts(8_214_677, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) } - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn as_derivative() -> Weight { - Weight::from_all(32_466_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(2)) } - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_all(36_342_000 as u64) - // Standard Error: 2_193 - .saturating_add(Weight::from_all(14_550_568 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(18_713_824, 0) + .saturating_add(Weight::from_parts(0, 3576)) + // Standard Error: 31_875 + .saturating_add(Weight::from_parts(8_501_738, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) } fn dispatch_as() -> Weight { - Weight::from_all(43_678_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_all(36_175_000 as u64) - // Standard Error: 2_551 - .saturating_add(Weight::from_all(14_050_984 as u64).saturating_mul(c as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(8_875_808, 0) + .saturating_add(Weight::from_parts(0, 3576)) + // Standard Error: 5_282 + .saturating_add(Weight::from_parts(8_197_137, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) } } diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index c317c3ccc..1a90732b6 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_vortex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-vortex // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,84 +24,157 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_vortex`. pub struct WeightInfo(PhantomData); impl pallet_vortex::WeightInfo for WeightInfo { - // Storage: VortexDistribution NextVortexId (r:1 w:1) - // Storage: VortexDistribution VtxDistStatuses (r:0 w:1) + /// Storage: `VortexDistribution::NextVortexId` (r:1 w:1) + /// Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(53_641_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `1489` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(55_311_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `202` + // Estimated: `3478` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3478)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) - // Storage: VortexDistribution TotalVortex (r:1 w:1) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + /// Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(77_840_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `539` + // Estimated: `3627` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: VortexDistribution VtxDistEras (r:0 w:1) + /// Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) + /// Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(44_888_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: VortexDistribution AssetPrices (r:0 w:1) + /// Storage: `VortexDistribution::AssetPrices` (r:0 w:500) + /// Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(53_257_000 as u64) - // Standard Error: 4_448 - .saturating_add(Weight::from_all(3_512_910 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(103_619, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 4_756 + .saturating_add(Weight::from_parts(1_793_458, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into()))) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution VtxDistOrderbook (r:1 w:1) - // Storage: VortexDistribution TotalVortex (r:1 w:1) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::VtxDistOrderbook` (r:1 w:1) + /// Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::TotalVortex` (r:1 w:1) + /// Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(60_788_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `202` + // Estimated: `5023` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 5023)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:1) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: Assets Account (r:2 w:2) - // Storage: Assets Asset (r:1 w:1) - // Storage: System Account (r:3 w:3) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + /// Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(236_875_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Proof Size summary in bytes: + // Measured: `1227` + // Estimated: `8763` + // Minimum execution time: 125_000_000 picoseconds. + Weight::from_parts(127_000_000, 0) + .saturating_add(Weight::from_parts(0, 8763)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:1) - // Storage: VortexDistribution AssetPrices (r:2 w:0) - // Storage: System Account (r:1 w:0) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::AssetPrices` (r:2 w:0) + /// Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(153_985_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `936` + // Estimated: `6160` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: VortexDistribution VtxDistStatuses (r:1 w:0) - // Storage: VortexDistribution VtxDistPayoutPivot (r:1 w:1) - // Storage: VortexDistribution VtxDistOrderbook (r:2 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: VortexDistribution NextUnsignedAt (r:0 w:1) + /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) + /// Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::VtxDistPayoutPivot` (r:1 w:1) + /// Proof: `VortexDistribution::VtxDistPayoutPivot` (`max_values`: None, `max_size`: Some(1014), added: 3489, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::VtxDistOrderbook` (r:2 w:1) + /// Proof: `VortexDistribution::VtxDistOrderbook` (`max_values`: Some(4294967295), `max_size`: Some(73), added: 4033, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) + /// Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(206_154_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1071` + // Estimated: `9056` + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(82_000_000, 0) + .saturating_add(Weight::from_parts(0, 9056)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } } diff --git a/runtime/src/weights/pallet_xls20.rs b/runtime/src/weights/pallet_xls20.rs index d167fdac1..92f14d477 100644 --- a/runtime/src/weights/pallet_xls20.rs +++ b/runtime/src/weights/pallet_xls20.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_xls20` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,9 +14,8 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_xls20 +// --pallet=pallet-xls20 // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,42 +24,77 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_xls20`. pub struct WeightInfo(PhantomData); impl pallet_xls20::WeightInfo for WeightInfo { - // Storage: Xls20 Relayer (r:0 w:1) + /// Storage: `Xls20::Relayer` (r:0 w:1) + /// Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_relayer() -> Weight { - Weight::from_all(38_720_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Xls20 Xls20MintFee (r:0 w:1) + /// Storage: `Xls20::Xls20MintFee` (r:0 w:1) + /// Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_xls20_fee() -> Weight { - Weight::from_all(37_570_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:1) + /// Storage: `Nft::CollectionInfo` (r:1 w:1) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn enable_xls20_compatibility() -> Weight { - Weight::from_all(55_656_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `273` + // Estimated: `3464` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3464)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:0) - // Storage: Xls20 Xls20MintFee (r:1 w:0) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Xls20::Xls20TokenMap` (r:1 w:0) + /// Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Storage: `Xls20::Xls20MintFee` (r:1 w:0) + /// Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn re_request_xls20_mint() -> Weight { - Weight::from_all(70_778_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + // Proof Size summary in bytes: + // Measured: `340` + // Estimated: `3553` + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) + .saturating_add(Weight::from_parts(0, 3553)) + .saturating_add(T::DbWeight::get().reads(3)) } - // Storage: Xls20 Relayer (r:1 w:0) - // Storage: Nft CollectionInfo (r:1 w:0) - // Storage: Xls20 Xls20TokenMap (r:1 w:1) + /// Storage: `Xls20::Relayer` (r:1 w:0) + /// Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `Nft::CollectionInfo` (r:1 w:0) + /// Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) + /// Storage: `Xls20::Xls20TokenMap` (r:1 w:1) + /// Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn fulfill_xls20_mint() -> Weight { - Weight::from_all(73_595_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `346` + // Estimated: `3553` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(22_000_000, 0) + .saturating_add(Weight::from_parts(0, 3553)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_xrpl.rs b/runtime/src/weights/pallet_xrpl.rs index 93eaf1aa3..a35e96765 100644 --- a/runtime/src/weights/pallet_xrpl.rs +++ b/runtime/src/weights/pallet_xrpl.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_xrpl` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-xrpl // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,17 +24,25 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_xrpl`. pub struct WeightInfo(PhantomData); impl pallet_xrpl::WeightInfo for WeightInfo { - // Storage: MaintenanceMode BlockedCalls (r:1 w:0) - // Storage: MaintenanceMode BlockedPallets (r:1 w:0) + /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) + /// Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) + /// Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(184_324_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3576` + // Minimum execution time: 83_000_000 picoseconds. + Weight::from_parts(85_000_000, 0) + .saturating_add(Weight::from_parts(0, 3576)) + .saturating_add(T::DbWeight::get().reads(2)) } } diff --git a/runtime/src/weights/pallet_xrpl_bridge.rs b/runtime/src/weights/pallet_xrpl_bridge.rs index dd3a4cfb5..e71533e9f 100644 --- a/runtime/src/weights/pallet_xrpl_bridge.rs +++ b/runtime/src/weights/pallet_xrpl_bridge.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_xrpl_bridge` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -15,7 +16,6 @@ // --repeat=20 // --pallet=pallet-xrpl-bridge // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output @@ -24,117 +24,225 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_xrpl_bridge`. pub struct WeightInfo(PhantomData); impl pallet_xrpl_bridge::WeightInfo for WeightInfo { - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransaction (r:1 w:1) + /// Storage: `XRPLBridge::Relayer` (r:1 w:0) + /// Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + /// Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + /// Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:1 w:1) + /// Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::ProcessXRPTransaction` (r:1 w:1) + /// Proof: `XRPLBridge::ProcessXRPTransaction` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) fn submit_transaction() -> Weight { - Weight::from_all(77_253_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `242` + // Estimated: `64003481` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) + .saturating_add(Weight::from_parts(0, 64003481)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: XRPLBridge ChallengeXRPTransactionList (r:0 w:1) + /// Storage: `XRPLBridge::ChallengeXRPTransactionList` (r:0 w:1) + /// Proof: `XRPLBridge::ChallengeXRPTransactionList` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`) fn submit_challenge() -> Weight { - Weight::from_all(19_668_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge PaymentDelay (r:0 w:1) + /// Storage: `XRPLBridge::PaymentDelay` (r:0 w:1) + /// Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(10_560_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge DoorTxFee (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:1 w:1) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge BridgePaused (r:1 w:0) - // Storage: System Digest (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + /// Storage: `XRPLBridge::DoorTxFee` (r:1 w:0) + /// Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + /// Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + /// Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + /// Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:1 w:1) + /// Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::PaymentDelay` (r:1 w:0) + /// Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::SourceTag` (r:1 w:0) + /// Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:0) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + /// Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(151_314_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Proof Size summary in bytes: + // Measured: `1253` + // Estimated: `3627` + // Minimum execution time: 71_000_000 picoseconds. + Weight::from_parts(72_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(8)) } - // Storage: XRPLBridge Relayer (r:0 w:1) + /// Storage: `XRPLBridge::Relayer` (r:0 w:1) + /// Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn add_relayer() -> Weight { - Weight::from_all(45_426_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge Relayer (r:1 w:1) + /// Storage: `XRPLBridge::Relayer` (r:1 w:1) + /// Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn remove_relayer() -> Weight { - Weight::from_all(56_024_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `242` + // Estimated: `3502` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3502)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge DoorTxFee (r:0 w:1) + /// Storage: `XRPLBridge::DoorTxFee` (r:0 w:1) + /// Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_door_tx_fee() -> Weight { - Weight::from_all(15_240_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge DoorAddress (r:0 w:1) + fn set_xrp_source_tag() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XRPLBridge::DoorAddress` (r:0 w:1) + /// Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_door_address() -> Weight { - Weight::from_all(43_177_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge Relayer (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequence (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:0) - // Storage: XRPLBridge DoorTicketSequenceParamsNext (r:0 w:1) + /// Storage: `XRPLBridge::Relayer` (r:1 w:0) + /// Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:0) + /// Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:0) + /// Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:0 w:1) + /// Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_all(55_596_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `242` + // Estimated: `3502` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3502)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: XRPLBridge DoorTicketSequence (r:1 w:1) - // Storage: XRPLBridge DoorTicketSequenceParams (r:1 w:1) - // Storage: XRPLBridge TicketSequenceThresholdReachedEmitted (r:0 w:1) + /// Storage: `XRPLBridge::DoorTicketSequence` (r:1 w:1) + /// Proof: `XRPLBridge::DoorTicketSequence` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::DoorTicketSequenceParams` (r:1 w:1) + /// Proof: `XRPLBridge::DoorTicketSequenceParams` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) + /// Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_all(51_718_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `207` + // Estimated: `1493` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: XRPLBridge SubmissionWindowWidth (r:0 w:1) - // Storage: XRPLBridge HighestPrunedLedgerIndex (r:0 w:1) - // Storage: XRPLBridge HighestSettledLedgerIndex (r:0 w:1) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:5 w:5) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:5) + /// Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:256 w:256) + /// Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::SubmissionWindowWidth` (r:0 w:1) + /// Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::HighestPrunedLedgerIndex` (r:0 w:1) + /// Proof: `XRPLBridge::HighestPrunedLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:0 w:1) + /// Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:256) + /// Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(10_841_000 as u64) - // Standard Error: 4_892 - .saturating_add(Weight::from_all(6_292_671 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `180` + // Estimated: `1887623333 + i * (1669340 ±732_183)` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(12_831_319, 0) + .saturating_add(Weight::from_parts(0, 1887623333)) + // Standard Error: 8_431 + .saturating_add(Weight::from_parts(5_468_998, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 1669340).saturating_mul(i.into())) } - // Storage: XRPLBridge SourceTag (r:0 w:1) - fn set_xrp_source_tag() -> Weight { - Weight::from_all(15_240_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: XRPLBridge HighestSettledLedgerIndex (r:1 w:0) - // Storage: XRPLBridge SubmissionWindowWidth (r:1 w:0) - // Storage: XRPLBridge SettledXRPTransactionDetails (r:1 w:1) - // Storage: XRPLBridge ProcessXRPTransactionDetails (r:0 w:1) + /// Storage: `XRPLBridge::HighestSettledLedgerIndex` (r:1 w:0) + /// Proof: `XRPLBridge::HighestSettledLedgerIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::SubmissionWindowWidth` (r:1 w:0) + /// Proof: `XRPLBridge::SubmissionWindowWidth` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::SettledXRPTransactionDetails` (r:1 w:1) + /// Proof: `XRPLBridge::SettledXRPTransactionDetails` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) + /// Storage: `XRPLBridge::ProcessXRPTransactionDetails` (r:0 w:10) + /// Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(16_281_000 as u64) - // Standard Error: 4_806 - .saturating_add(Weight::from_all(916_903 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `299 + i * (64 ±0)` + // Estimated: `64003481` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_897_367, 0) + .saturating_add(Weight::from_parts(0, 64003481)) + // Standard Error: 6_403 + .saturating_add(Weight::from_parts(1_236_423, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } } From b4757dc75fa3ba124b82894723c8be395425df98 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 14 May 2024 15:56:44 +1200 Subject: [PATCH 057/112] Add a benchmark for XRPLBridge::set_xrp_source_tag() --- pallet/xrpl-bridge/src/benchmarking.rs | 10 +++++++ pallet/xrpl-bridge/src/weights.rs | 34 +++++++++++++---------- runtime/src/weights/pallet_xrpl_bridge.rs | 26 +++++++++-------- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/pallet/xrpl-bridge/src/benchmarking.rs b/pallet/xrpl-bridge/src/benchmarking.rs index 513c164f9..ad8d9146c 100644 --- a/pallet/xrpl-bridge/src/benchmarking.rs +++ b/pallet/xrpl-bridge/src/benchmarking.rs @@ -122,6 +122,16 @@ benchmarks! { assert_eq!(DoorTxFee::::get(), tx_fee); } + set_xrp_source_tag { + let source_tag = 100; + // Sanity check + assert_ne!(SourceTag::::get(), source_tag); + + }: _(RawOrigin::Root, source_tag) + verify { + assert_eq!(SourceTag::::get(), source_tag); + } + set_door_address { let door_address: XrplAccountId = [1u8; 20].into(); // Sanity check diff --git a/pallet/xrpl-bridge/src/weights.rs b/pallet/xrpl-bridge/src/weights.rs index de258d0a0..29ae0ea50 100644 --- a/pallet/xrpl-bridge/src/weights.rs +++ b/pallet/xrpl-bridge/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_xrpl_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -119,7 +119,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(73_000_000 as u64) + Weight::from_all(72_000_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -142,6 +142,8 @@ impl WeightInfo for SubstrateWeight { Weight::from_all(3_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: `XRPLBridge::SourceTag` (r:0 w:1) + // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_xrp_source_tag() -> Weight { Weight::from_all(3_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -188,9 +190,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(1_887_510 as u64) - // Standard Error: 7_277 - .saturating_add(Weight::from_all(5_411_609 as u64).saturating_mul(i as u64)) + Weight::from_all(6_000_000 as u64) + // Standard Error: 5_923 + .saturating_add(Weight::from_all(5_519_790 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -205,9 +207,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(15_177_949 as u64) - // Standard Error: 7_466 - .saturating_add(Weight::from_all(1_205_320 as u64).saturating_mul(i as u64)) + Weight::from_all(15_464_656 as u64) + // Standard Error: 5_392 + .saturating_add(Weight::from_all(1_225_960 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) @@ -270,7 +272,7 @@ impl WeightInfo for () { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(73_000_000 as u64) + Weight::from_all(72_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -293,6 +295,8 @@ impl WeightInfo for () { Weight::from_all(3_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: `XRPLBridge::SourceTag` (r:0 w:1) + // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_xrp_source_tag() -> Weight { Weight::from_all(3_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -339,9 +343,9 @@ impl WeightInfo for () { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(1_887_510 as u64) - // Standard Error: 7_277 - .saturating_add(Weight::from_all(5_411_609 as u64).saturating_mul(i as u64)) + Weight::from_all(6_000_000 as u64) + // Standard Error: 5_923 + .saturating_add(Weight::from_all(5_519_790 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -356,9 +360,9 @@ impl WeightInfo for () { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(15_177_949 as u64) - // Standard Error: 7_466 - .saturating_add(Weight::from_all(1_205_320 as u64).saturating_mul(i as u64)) + Weight::from_all(15_464_656 as u64) + // Standard Error: 5_392 + .saturating_add(Weight::from_all(1_225_960 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) diff --git a/runtime/src/weights/pallet_xrpl_bridge.rs b/runtime/src/weights/pallet_xrpl_bridge.rs index e71533e9f..729f3417e 100644 --- a/runtime/src/weights/pallet_xrpl_bridge.rs +++ b/runtime/src/weights/pallet_xrpl_bridge.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_xrpl_bridge` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -69,7 +69,7 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -104,8 +104,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1253` // Estimated: `3627` - // Minimum execution time: 71_000_000 picoseconds. - Weight::from_parts(72_000_000, 0) + // Minimum execution time: 70_000_000 picoseconds. + Weight::from_parts(71_000_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -128,7 +128,7 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Measured: `242` // Estimated: `3502` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3502)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,6 +144,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `XRPLBridge::SourceTag` (r:0 w:1) + /// Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_xrp_source_tag() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -176,7 +178,7 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3502` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3502)) .saturating_add(T::DbWeight::get().reads(3)) @@ -214,10 +216,10 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Measured: `180` // Estimated: `1887623333 + i * (1669340 ±732_183)` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(12_831_319, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 1887623333)) - // Standard Error: 8_431 - .saturating_add(Weight::from_parts(5_468_998, 0).saturating_mul(i.into())) + // Standard Error: 3_081 + .saturating_add(Weight::from_parts(5_579_359, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(i.into()))) @@ -237,10 +239,10 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Measured: `299 + i * (64 ±0)` // Estimated: `64003481` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_897_367, 0) + Weight::from_parts(15_453_493, 0) .saturating_add(Weight::from_parts(0, 64003481)) - // Standard Error: 6_403 - .saturating_add(Weight::from_parts(1_236_423, 0).saturating_mul(i.into())) + // Standard Error: 7_061 + .saturating_add(Weight::from_parts(1_238_165, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) From 9dddfcdd8c129864faf9e074605f371ec67cef27 Mon Sep 17 00:00:00 2001 From: JasonTulp Date: Fri, 17 May 2024 13:36:45 +1200 Subject: [PATCH 058/112] Fix merge issues --- Cargo.lock | 7 +- ethy-gadget/src/gossip.rs | 63 +-- pallet/ethy/src/benchmarking.rs | 5 +- pallet/ethy/src/impls.rs | 2 +- pallet/ethy/src/lib.rs | 5 +- pallet/ethy/src/tests.rs | 18 +- pallet/ethy/src/weights.rs | 811 +++++++++++++++++------------ runtime/src/weights/pallet_ethy.rs | 475 +++++++++++------ 8 files changed, 848 insertions(+), 538 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a89259fe3..dcdaf3a40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1889,13 +1889,13 @@ dependencies = [ [[package]] name = "ethy-gadget" -version = "0.1.0" +version = "0.1.2" dependencies = [ "ethabi", "futures", "futures-timer", "hex", - "hex-literal 0.4.1", + "hex-literal 0.3.4", "libsecp256k1 0.6.0", "log", "parity-scale-codec", @@ -5601,6 +5601,7 @@ version = "1.0.1" dependencies = [ "ethabi", "ethereum-types 0.14.1", + "frame-benchmarking", "frame-support", "frame-system", "hex", @@ -9026,7 +9027,7 @@ dependencies = [ [[package]] name = "seed-client" -version = "5.0.0" +version = "7.0.0" dependencies = [ "clap", "ethy-gadget", diff --git a/ethy-gadget/src/gossip.rs b/ethy-gadget/src/gossip.rs index addce6bd7..a377cd8b5 100644 --- a/ethy-gadget/src/gossip.rs +++ b/ethy-gadget/src/gossip.rs @@ -270,7 +270,6 @@ mod tests { use sc_network_gossip::{MessageIntent, ValidationResult, Validator, ValidatorContext}; use sc_network_test::{Block, Hash, TestNetFactory}; use sp_core::keccak_256; - use sp_runtime::generic::BlockId; use seed_primitives::ethy::{EthyChainId, Witness}; @@ -301,8 +300,8 @@ mod tests { vec![Keyring::Alice, Keyring::Bob, Keyring::Charlie] } - #[test] - fn verify_event_witness() { + #[tokio::test] + async fn verify_event_witness() { let validators = mock_signers(); let alice = &validators[0]; let mut context = NoopContext {}; @@ -341,8 +340,8 @@ mod tests { assert_validation_result!(ValidationResult::Discard, result); } - #[test] - fn witness_bad_signature_discarded() { + #[tokio::test] + async fn witness_bad_signature_discarded() { let validators = mock_signers(); let alice = &validators[0]; let bob = &validators[1]; @@ -370,8 +369,8 @@ mod tests { assert!(!gv.is_tracking_event(&event_id)); } - #[test] - fn keeps_most_recent_events() { + #[tokio::test] + async fn keeps_most_recent_events() { let mut net = EthyTestNet::new(1, 0); let backend = net.peer(0).client().as_backend(); let gv = GossipValidator::new(vec![], backend); @@ -386,8 +385,8 @@ mod tests { assert_eq!(gv.complete_events.read().len(), MAX_COMPLETE_EVENT_CACHE); } - #[test] - fn witness_validate_events_outside_live_window_discarded() { + #[tokio::test] + async fn witness_validate_events_outside_live_window_discarded() { let validators = mock_signers(); let alice = &validators[0]; let mut context = NoopContext {}; @@ -418,18 +417,19 @@ mod tests { // set the finalized block number to 6. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 - net.peer(0).push_blocks(6, false); - net.block_until_sync(); - assert_eq!(net.peer(0).client().justifications(&BlockId::Number(10)).unwrap(), None); + let block_hashes = net.peer(0).push_blocks(7, false); + net.run_until_sync().await; + + assert_eq!(net.peer(0).client().justifications(block_hashes[6]).unwrap(), None); let just = (*b"FRNK", Vec::new()); net.peer(0) .client() - .finalize_block(BlockId::Number(6), Some(just.clone()), true) + .finalize_block(block_hashes[6], Some(just.clone()), true) .unwrap(); assert_eq!( net.peer(0).client().info().finalized_number, - 6, - "Peer #{} finalized block number is not 6", + 7, + "Peer #{} finalized block number is not 7", 0 ); @@ -440,8 +440,8 @@ mod tests { assert_validation_result!(ValidationResult::Discard, result); } - #[test] - fn witness_expired_events_outside_live_window_discarded() { + #[tokio::test] + async fn witness_expired_events_outside_live_window_discarded() { let validators = mock_signers(); let alice = &validators[0]; let mut net = EthyTestNet::new(1, 0); @@ -466,18 +466,19 @@ mod tests { // set the finalized block number to 6. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 - net.peer(0).push_blocks(6, false); - net.block_until_sync(); - assert_eq!(net.peer(0).client().justifications(&BlockId::Number(10)).unwrap(), None); + let block_hashes = net.peer(0).push_blocks(7, false); + net.run_until_sync().await; + + assert_eq!(net.peer(0).client().justifications(block_hashes[6]).unwrap(), None); let just = (*b"FRNK", Vec::new()); net.peer(0) .client() - .finalize_block(BlockId::Number(6), Some(just.clone()), true) + .finalize_block(block_hashes[6], Some(just.clone()), true) .unwrap(); assert_eq!( net.peer(0).client().info().finalized_number, - 6, - "Peer #{} finalized block number is not 6", + 7, + "Peer #{} finalized block number is not 7", 0 ); @@ -488,8 +489,8 @@ mod tests { assert_eq!(result, true); } - #[test] - fn witness_allowed_events_outside_live_window_discarded() { + #[tokio::test] + async fn witness_allowed_events_outside_live_window_discarded() { let validators = mock_signers(); let alice = &validators[0]; let mut net = EthyTestNet::new(1, 0); @@ -519,18 +520,18 @@ mod tests { // set the finalized block number to 6. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 - net.peer(0).push_blocks(6, false); - net.block_until_sync(); - assert_eq!(net.peer(0).client().justifications(&BlockId::Number(10)).unwrap(), None); + let block_hashes = net.peer(0).push_blocks(7, false); + net.run_until_sync().await; + assert_eq!(net.peer(0).client().justifications(block_hashes[6]).unwrap(), None); let just = (*b"FRNK", Vec::new()); net.peer(0) .client() - .finalize_block(BlockId::Number(6), Some(just.clone()), true) + .finalize_block(block_hashes[6], Some(just.clone()), true) .unwrap(); assert_eq!( net.peer(0).client().info().finalized_number, - 6, - "Peer #{} finalized block number is not 6", + 7, + "Peer #{} finalized block number is not 7", 0 ); diff --git a/pallet/ethy/src/benchmarking.rs b/pallet/ethy/src/benchmarking.rs index ef9f9e891..39e1fbefd 100644 --- a/pallet/ethy/src/benchmarking.rs +++ b/pallet/ethy/src/benchmarking.rs @@ -107,7 +107,7 @@ benchmarks! { } set_challenge_period { - let blocks: T::BlockNumber = T::BlockNumber::from(100_u32); + let blocks: BlockNumberFor = 100_u32.into(); }: _(RawOrigin::Root, blocks) verify { assert_eq!(ChallengePeriod::::get(), blocks); @@ -248,7 +248,8 @@ benchmarks! { let next_notary_keys = WeakBoundedVec::try_from(next_notary_keys.clone()).unwrap(); NextNotaryKeys::::put(next_notary_keys); - NextAuthorityChange::::put(T::BlockNumber::default()); + let next_change: BlockNumberFor = 1_u32.into(); + NextAuthorityChange::::put(next_change); }: {crate::Pallet::::handle_authorities_change()} verify { assert!(EthBridge::::bridge_paused()); diff --git a/pallet/ethy/src/impls.rs b/pallet/ethy/src/impls.rs index 822f0adc4..6b2b660bd 100644 --- a/pallet/ethy/src/impls.rs +++ b/pallet/ethy/src/impls.rs @@ -192,7 +192,7 @@ impl Pallet { ) -> DispatchResult { ensure!(!PendingEventClaims::::contains_key(event_id), Error::::EventReplayPending); - let process_at: T::BlockNumber = + let process_at: BlockNumberFor = >::block_number() + ChallengePeriod::::get(); MessagesValidAt::::try_mutate(process_at.clone(), |v| -> DispatchResult { v.try_push(event_id).map_err(|_| Error::::MessageTooLarge)?; diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index 854328745..2a5672ce6 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -178,7 +178,8 @@ pub mod pallet { #[pallet::constant] type MaxNewSigners: Get; /// Handles a multi-currency fungible asset system - type MultiCurrency: Mutate + Hold; + type MultiCurrency: Mutate + + Hold; /// The native token asset Id (managed by pallet-balances) #[pallet::constant] type NativeAssetId: Get; @@ -627,7 +628,7 @@ pub mod pallet { consumed_weight } - fn on_idle(_n: T::BlockNumber, remaining_weight: Weight) -> Weight { + fn on_idle(_n: BlockNumberFor, remaining_weight: Weight) -> Weight { // Minimum weight to read the initial values: // - BridgePaused, PendingEventProofs, DelayedEventProofsPerBlock let base_weight = DbWeight::get().reads(3u64); diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index 649a08446..71d7584b9 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -1662,7 +1662,7 @@ fn delayed_event_proof() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000) + Weight::from_all(1_000_000_000_000) ), expected_weight ); @@ -1733,7 +1733,7 @@ fn delayed_event_proof_updates_validator_set_id_on_last_minute_authorities_chang // Call on_idle and initiate event proof EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000), + Weight::from_all(1_000_000_000_000), ); // Ensure event has been removed from delayed claims assert!(PendingEventProofs::::get(event_proof_id).is_none()); @@ -1817,7 +1817,7 @@ fn delayed_event_proof_updates_validator_set_id_on_normal_authorities_change() { // call on_idle and initiate event proof EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000), + Weight::from_all(1_000_000_000_000), ); // Ensure event has been removed from delayed claims assert!(PendingEventProofs::::get(event_proof_id).is_none()); @@ -1876,7 +1876,7 @@ fn multiple_delayed_event_proof() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000) + Weight::from_all(1_000_000_000_000) ), expected_weight ); @@ -1900,7 +1900,7 @@ fn multiple_delayed_event_proof() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000) + Weight::from_all(1_000_000_000_000) ), expected_weight ); @@ -1952,7 +1952,7 @@ fn on_idle_limits_processing() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - expected_weight + Weight::from_ref_time(1) + expected_weight + Weight::from_all(1) ), expected_weight ); @@ -1979,7 +1979,7 @@ fn on_idle_limits_processing() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000) + Weight::from_all(1_000_000_000_000) ), expected_weight ); @@ -2028,7 +2028,7 @@ fn on_idle_no_remaining_weight_is_noop() { DbWeight::get().reads(3u64) + DbWeight::get().reads_writes(2, 2); assert_eq!( EthBridge::on_idle(frame_system::Pallet::::block_number() + 1, minimum_weight), - Weight::from_ref_time(0) + Weight::from_all(0) ); // All PendingEventProofs should still be present @@ -2081,7 +2081,7 @@ fn set_delayed_event_proofs_per_block() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - Weight::from_ref_time(1_000_000_000_000) + Weight::from_all(1_000_000_000_000) ), expected_weight ); diff --git a/pallet/ethy/src/weights.rs b/pallet/ethy/src/weights.rs index a8446e761..e53be1c2f 100644 --- a/pallet/ethy/src/weights.rs +++ b/pallet/ethy/src/weights.rs @@ -15,28 +15,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `pallet_ethy` +//! Autogenerated weights for pallet_ethy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-01, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `Jasons-Ubuntu`, CPU: `AMD Ryzen 9 7950X 16-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/seed // benchmark // pallet -// --chain -// dev +// --chain=dev // --steps=50 // --repeat=20 // --pallet=pallet-ethy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/ +// ./pallet/ethy/src/weights.rs +// --template +// ./scripts/pallet_template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,335 +47,486 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_ethy. pub trait WeightInfo { - fn set_xrpl_door_signers(p: u32, ) -> Weight; - fn set_relayer() -> Weight; - fn deposit_relayer_bond() -> Weight; - fn withdraw_relayer_bond() -> Weight; - fn set_event_block_confirmations() -> Weight; - fn set_delayed_event_proofs_per_block() -> Weight; - fn set_challenge_period() -> Weight; - fn set_contract_address() -> Weight; - fn set_bridge_paused() -> Weight; - fn finalise_authorities_change() -> Weight; - fn remove_missing_event_id() -> Weight; - fn submit_missing_event() -> Weight; - fn submit_event() -> Weight; - fn submit_challenge() -> Weight; - fn submit_notarization() -> Weight; - fn handle_authorities_change() -> Weight; + fn set_xrpl_door_signers(p: u32, ) -> Weight; + fn set_relayer() -> Weight; + fn deposit_relayer_bond() -> Weight; + fn withdraw_relayer_bond() -> Weight; + fn set_event_block_confirmations() -> Weight; + fn set_delayed_event_proofs_per_block() -> Weight; + fn set_challenge_period() -> Weight; + fn set_contract_address() -> Weight; + fn set_bridge_paused() -> Weight; + fn finalise_authorities_change() -> Weight; + fn remove_missing_event_id() -> Weight; + fn submit_missing_event() -> Weight; + fn submit_event() -> Weight; + fn submit_challenge() -> Weight; + fn submit_notarization() -> Weight; + fn handle_authorities_change() -> Weight; } /// Weights for pallet_ethy using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge XrplDoorSigners (r:1 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - /// The range of component `p` is `[1, 19]`. - fn set_xrpl_door_signers(p: u32, ) -> Weight { - Weight::from_ref_time(17_804_000 as u64) - // Standard Error: 1_893 - .saturating_add(Weight::from_ref_time(866_563 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:0) - // Storage: EthBridge Relayer (r:0 w:1) - fn set_relayer() -> Weight { - Weight::from_ref_time(16_110_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn deposit_relayer_bond() -> Weight { - Weight::from_ref_time(58_120_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn withdraw_relayer_bond() -> Weight { - Weight::from_ref_time(60_995_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge EventBlockConfirmations (r:0 w:1) - fn set_event_block_confirmations() -> Weight { - Weight::from_ref_time(3_727_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge DelayedEventProofsPerBlock (r:0 w:1) - fn set_delayed_event_proofs_per_block() -> Weight { - Weight::from_ref_time(3_777_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ChallengePeriod (r:0 w:1) - fn set_challenge_period() -> Weight { - Weight::from_ref_time(3_797_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ContractAddress (r:0 w:1) - fn set_contract_address() -> Weight { - Weight::from_ref_time(11_171_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge BridgePaused (r:0 w:1) - fn set_bridge_paused() -> Weight { - Weight::from_ref_time(3_847_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge NotarySetId (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - // Storage: EthBridge NotaryKeys (r:0 w:1) - // Storage: EthBridge BridgePaused (r:0 w:1) - fn finalise_authorities_change() -> Weight { - Weight::from_ref_time(15_600_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) - } - // Storage: EthBridge MissedMessageIds (r:1 w:1) - fn remove_missing_event_id() -> Weight { - Weight::from_ref_time(7_003_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge MissedMessageIds (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_missing_event() -> Weight { - Weight::from_ref_time(23_405_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ProcessedMessageIds (r:1 w:0) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_event() -> Weight { - Weight::from_ref_time(22_543_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge ChallengerAccount (r:0 w:1) - fn submit_challenge() -> Weight { - Weight::from_ref_time(65_424_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: EthBridge EventNotarizations (r:2 w:1) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge ChallengerAccount (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn submit_notarization() -> Weight { - Weight::from_ref_time(90_962_000 as u64) - .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NextNotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge NotaryXrplKeys (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: EthBridge NextAuthorityChange (r:0 w:1) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotarySetProofId (r:0 w:1) - fn handle_authorities_change() -> Weight { - Weight::from_ref_time(41_599_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) - } + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:19) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 19]`. + fn set_xrpl_door_signers(p: u32, ) -> Weight { + Weight::from_all(14_270_140 as u64) + // Standard Error: 3_732 + .saturating_add(Weight::from_all(1_314_587 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:0) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::Relayer` (r:0 w:1) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_relayer() -> Weight { + Weight::from_all(11_822_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn deposit_relayer_bond() -> Weight { + Weight::from_all(70_713_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn withdraw_relayer_bond() -> Weight { + Weight::from_all(72_437_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) + } + // Storage: `EthBridge::EventBlockConfirmations` (r:0 w:1) + // Proof: `EthBridge::EventBlockConfirmations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_event_block_confirmations() -> Weight { + Weight::from_all(6_171_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::DelayedEventProofsPerBlock` (r:0 w:1) + // Proof: `EthBridge::DelayedEventProofsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_delayed_event_proofs_per_block() -> Weight { + Weight::from_all(6_262_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::ChallengePeriod` (r:0 w:1) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_challenge_period() -> Weight { + Weight::from_all(6_171_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::ContractAddress` (r:0 w:1) + // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_contract_address() -> Weight { + Weight::from_all(6_743_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_bridge_paused() -> Weight { + Weight::from_all(8_526_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::NotarySetId` (r:1 w:1) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + // Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn finalise_authorities_change() -> Weight { + Weight::from_all(14_718_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: `EthBridge::MissedMessageIds` (r:1 w:1) + // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn remove_missing_event_id() -> Weight { + Weight::from_all(10_931_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MissedMessageIds` (r:1 w:0) + // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + // Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_missing_event() -> Weight { + Weight::from_all(22_783_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ProcessedMessageIds` (r:1 w:0) + // Proof: `EthBridge::ProcessedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + // Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_event() -> Weight { + Weight::from_all(20_258_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + // Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengerAccount` (r:0 w:1) + // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_challenge() -> Weight { + Weight::from_all(77_667_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) + } + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:1 w:0) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::EventNotarizations` (r:2 w:1) + // Proof: `EthBridge::EventNotarizations` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + // Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengerAccount` (r:1 w:1) + // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn submit_notarization() -> Weight { + Weight::from_all(111_651_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) + } + // Storage: `EthBridge::NextNotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NextNotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ContractAddress` (r:1 w:0) + // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextAuthorityChange` (r:0 w:1) + // Proof: `EthBridge::NextAuthorityChange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + // Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetProofId` (r:0 w:1) + // Proof: `EthBridge::NotarySetProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn handle_authorities_change() -> Weight { + Weight::from_all(43_162_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } } -/// For backwards compatibility and tests +// For backwards compatibility and tests impl WeightInfo for () { - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge XrplDoorSigners (r:1 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - /// The range of component `p` is `[1, 19]`. - fn set_xrpl_door_signers(p: u32, ) -> Weight { - Weight::from_ref_time(17_804_000 as u64) - // Standard Error: 1_893 - .saturating_add(Weight::from_ref_time(866_563 as u64).saturating_mul(p as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:0) - // Storage: EthBridge Relayer (r:0 w:1) - fn set_relayer() -> Weight { - Weight::from_ref_time(16_110_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn deposit_relayer_bond() -> Weight { - Weight::from_ref_time(58_120_000 as u64) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn withdraw_relayer_bond() -> Weight { - Weight::from_ref_time(60_995_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge EventBlockConfirmations (r:0 w:1) - fn set_event_block_confirmations() -> Weight { - Weight::from_ref_time(3_727_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge DelayedEventProofsPerBlock (r:0 w:1) - fn set_delayed_event_proofs_per_block() -> Weight { - Weight::from_ref_time(3_777_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ChallengePeriod (r:0 w:1) - fn set_challenge_period() -> Weight { - Weight::from_ref_time(3_797_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ContractAddress (r:0 w:1) - fn set_contract_address() -> Weight { - Weight::from_ref_time(11_171_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge BridgePaused (r:0 w:1) - fn set_bridge_paused() -> Weight { - Weight::from_ref_time(3_847_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge NotarySetId (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - // Storage: EthBridge NotaryKeys (r:0 w:1) - // Storage: EthBridge BridgePaused (r:0 w:1) - fn finalise_authorities_change() -> Weight { - Weight::from_ref_time(15_600_000 as u64) - .saturating_add(RocksDbWeight::get().reads(3 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) - } - // Storage: EthBridge MissedMessageIds (r:1 w:1) - fn remove_missing_event_id() -> Weight { - Weight::from_ref_time(7_003_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge MissedMessageIds (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_missing_event() -> Weight { - Weight::from_ref_time(23_405_000 as u64) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ProcessedMessageIds (r:1 w:0) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_event() -> Weight { - Weight::from_ref_time(22_543_000 as u64) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge ChallengerAccount (r:0 w:1) - fn submit_challenge() -> Weight { - Weight::from_ref_time(65_424_000 as u64) - .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: EthBridge EventNotarizations (r:2 w:1) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge ChallengerAccount (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn submit_notarization() -> Weight { - Weight::from_ref_time(90_962_000 as u64) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) - .saturating_add(RocksDbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NextNotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge NotaryXrplKeys (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: EthBridge NextAuthorityChange (r:0 w:1) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotarySetProofId (r:0 w:1) - fn handle_authorities_change() -> Weight { - Weight::from_ref_time(41_599_000 as u64) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) - } + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:19) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 19]`. + fn set_xrpl_door_signers(p: u32, ) -> Weight { + Weight::from_all(14_270_140 as u64) + // Standard Error: 3_732 + .saturating_add(Weight::from_all(1_314_587 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) + } + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:0) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::Relayer` (r:0 w:1) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_relayer() -> Weight { + Weight::from_all(11_822_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn deposit_relayer_bond() -> Weight { + Weight::from_all(70_713_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + // Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn withdraw_relayer_bond() -> Weight { + Weight::from_all(72_437_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) + } + // Storage: `EthBridge::EventBlockConfirmations` (r:0 w:1) + // Proof: `EthBridge::EventBlockConfirmations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_event_block_confirmations() -> Weight { + Weight::from_all(6_171_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::DelayedEventProofsPerBlock` (r:0 w:1) + // Proof: `EthBridge::DelayedEventProofsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_delayed_event_proofs_per_block() -> Weight { + Weight::from_all(6_262_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::ChallengePeriod` (r:0 w:1) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_challenge_period() -> Weight { + Weight::from_all(6_171_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::ContractAddress` (r:0 w:1) + // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_contract_address() -> Weight { + Weight::from_all(6_743_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_bridge_paused() -> Weight { + Weight::from_all(8_526_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::NotarySetId` (r:1 w:1) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + // Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:0 w:1) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn finalise_authorities_change() -> Weight { + Weight::from_all(14_718_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: `EthBridge::MissedMessageIds` (r:1 w:1) + // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn remove_missing_event_id() -> Weight { + Weight::from_all(10_931_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MissedMessageIds` (r:1 w:0) + // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + // Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_missing_event() -> Weight { + Weight::from_all(22_783_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ProcessedMessageIds` (r:1 w:0) + // Proof: `EthBridge::ProcessedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + // Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_event() -> Weight { + Weight::from_all(20_258_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + // Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + // Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengerAccount` (r:0 w:1) + // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_challenge() -> Weight { + Weight::from_all(77_667_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) + } + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:1 w:0) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::EventNotarizations` (r:2 w:1) + // Proof: `EthBridge::EventNotarizations` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + // Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + // Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::Relayer` (r:1 w:0) + // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ChallengerAccount` (r:1 w:1) + // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `AssetsExt::Holds` (r:1 w:1) + // Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + // Storage: `Assets::Asset` (r:1 w:1) + // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + // Storage: `Assets::Account` (r:2 w:2) + // Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn submit_notarization() -> Weight { + Weight::from_all(111_651_000 as u64) + .saturating_add(RocksDbWeight::get().reads(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) + } + // Storage: `EthBridge::NextNotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NextNotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetId` (r:1 w:0) + // Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::ContractAddress` (r:1 w:0) + // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NextEventProofId` (r:1 w:1) + // Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::BridgePaused` (r:1 w:1) + // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + // Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotaryXrplKeys` (r:1 w:0) + // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `EthBridge::NextAuthorityChange` (r:0 w:1) + // Proof: `EthBridge::NextAuthorityChange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + // Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `EthBridge::NotarySetProofId` (r:0 w:1) + // Proof: `EthBridge::NotarySetProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn handle_authorities_change() -> Weight { + Weight::from_all(43_162_000 as u64) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } } + diff --git a/runtime/src/weights/pallet_ethy.rs b/runtime/src/weights/pallet_ethy.rs index a631a2ee2..0a915ec5c 100644 --- a/runtime/src/weights/pallet_ethy.rs +++ b/runtime/src/weights/pallet_ethy.rs @@ -2,187 +2,342 @@ //! Autogenerated weights for `pallet_ethy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-01, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jasons-Ubuntu`, CPU: `AMD Ryzen 9 7950X 16-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed // benchmark // pallet -// --chain -// dev +// --chain=dev // --steps=50 // --repeat=20 // --pallet=pallet-ethy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/ +// ./runtime/src/weights/pallet_ethy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_ethy`. pub struct WeightInfo(PhantomData); impl pallet_ethy::WeightInfo for WeightInfo { - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge XrplDoorSigners (r:1 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - /// The range of component `p` is `[1, 19]`. - fn set_xrpl_door_signers(p: u32, ) -> Weight { - Weight::from_ref_time(17_804_000 as u64) - // Standard Error: 1_893 - .saturating_add(Weight::from_ref_time(866_563 as u64).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:0) - // Storage: EthBridge Relayer (r:0 w:1) - fn set_relayer() -> Weight { - Weight::from_ref_time(16_110_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn deposit_relayer_bond() -> Weight { - Weight::from_ref_time(58_120_000 as u64) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge RelayerPaidBond (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - fn withdraw_relayer_bond() -> Weight { - Weight::from_ref_time(60_995_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) - } - // Storage: EthBridge EventBlockConfirmations (r:0 w:1) - fn set_event_block_confirmations() -> Weight { - Weight::from_ref_time(3_727_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge DelayedEventProofsPerBlock (r:0 w:1) - fn set_delayed_event_proofs_per_block() -> Weight { - Weight::from_ref_time(3_777_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ChallengePeriod (r:0 w:1) - fn set_challenge_period() -> Weight { - Weight::from_ref_time(3_797_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge ContractAddress (r:0 w:1) - fn set_contract_address() -> Weight { - Weight::from_ref_time(11_171_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge BridgePaused (r:0 w:1) - fn set_bridge_paused() -> Weight { - Weight::from_ref_time(3_847_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge NotarySetId (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotaryXrplKeys (r:0 w:1) - // Storage: EthBridge NotaryKeys (r:0 w:1) - // Storage: EthBridge BridgePaused (r:0 w:1) - fn finalise_authorities_change() -> Weight { - Weight::from_ref_time(15_600_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) - } - // Storage: EthBridge MissedMessageIds (r:1 w:1) - fn remove_missing_event_id() -> Weight { - Weight::from_ref_time(7_003_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge MissedMessageIds (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_missing_event() -> Weight { - Weight::from_ref_time(23_405_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge PendingEventClaims (r:1 w:1) - // Storage: EthBridge ProcessedMessageIds (r:1 w:0) - // Storage: EthBridge ChallengePeriod (r:1 w:0) - // Storage: EthBridge MessagesValidAt (r:1 w:1) - // Storage: EthBridge PendingClaimStatus (r:0 w:1) - fn submit_event() -> Weight { - Weight::from_ref_time(22_543_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:2 w:2) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge ChallengerAccount (r:0 w:1) - fn submit_challenge() -> Weight { - Weight::from_ref_time(65_424_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge PendingClaimStatus (r:1 w:1) - // Storage: Session Validators (r:1 w:0) - // Storage: EthBridge EventNotarizations (r:2 w:1) - // Storage: EthBridge PendingClaimChallenges (r:1 w:1) - // Storage: EthBridge PendingEventClaims (r:1 w:0) - // Storage: EthBridge Relayer (r:1 w:0) - // Storage: EthBridge ChallengerAccount (r:1 w:1) - // Storage: AssetsExt Holds (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) - fn submit_notarization() -> Weight { - Weight::from_ref_time(90_962_000 as u64) - .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) - } - // Storage: EthBridge NextNotaryKeys (r:1 w:0) - // Storage: EthBridge NotarySetId (r:1 w:0) - // Storage: EthBridge ContractAddress (r:1 w:0) - // Storage: EthBridge NextEventProofId (r:1 w:1) - // Storage: EthBridge NotaryKeys (r:1 w:0) - // Storage: EthBridge BridgePaused (r:1 w:1) - // Storage: System Digest (r:1 w:1) - // Storage: EthBridge XrplDoorSigners (r:1 w:0) - // Storage: EthBridge NotaryXrplKeys (r:1 w:0) - // Storage: XRPLBridge DoorAddress (r:1 w:0) - // Storage: EthBridge NextAuthorityChange (r:0 w:1) - // Storage: EthBridge AuthoritiesChangedThisEra (r:0 w:1) - // Storage: EthBridge NotarySetProofId (r:0 w:1) - fn handle_authorities_change() -> Weight { - Weight::from_ref_time(41_599_000 as u64) - .saturating_add(T::DbWeight::get().reads(10 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) - } + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::XrplDoorSigners` (r:1 w:19) + /// Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + /// Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 19]`. + fn set_xrpl_door_signers(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `199` + // Estimated: `3664` + // Minimum execution time: 14_848_000 picoseconds. + Weight::from_parts(13_767_852, 0) + .saturating_add(Weight::from_parts(0, 3664)) + // Standard Error: 18_255 + .saturating_add(Weight::from_parts(1_377_756, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + } + /// Storage: `EthBridge::RelayerPaidBond` (r:1 w:0) + /// Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::Relayer` (r:0 w:1) + /// Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_relayer() -> Weight { + // Proof Size summary in bytes: + // Measured: `214` + // Estimated: `3679` + // Minimum execution time: 11_121_000 picoseconds. + Weight::from_parts(11_472_000, 0) + .saturating_add(Weight::from_parts(0, 3679)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + /// Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn deposit_relayer_bond() -> Weight { + // Proof Size summary in bytes: + // Measured: `1180` + // Estimated: `6172` + // Minimum execution time: 66_926_000 picoseconds. + Weight::from_parts(68_139_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `EthBridge::Relayer` (r:1 w:0) + /// Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::RelayerPaidBond` (r:1 w:1) + /// Proof: `EthBridge::RelayerPaidBond` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn withdraw_relayer_bond() -> Weight { + // Proof Size summary in bytes: + // Measured: `1345` + // Estimated: `6172` + // Minimum execution time: 70_073_000 picoseconds. + Weight::from_parts(71_315_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `EthBridge::EventBlockConfirmations` (r:0 w:1) + /// Proof: `EthBridge::EventBlockConfirmations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_event_block_confirmations() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_062_000 picoseconds. + Weight::from_parts(6_252_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::DelayedEventProofsPerBlock` (r:0 w:1) + /// Proof: `EthBridge::DelayedEventProofsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_delayed_event_proofs_per_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_791_000 picoseconds. + Weight::from_parts(6_141_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::ChallengePeriod` (r:0 w:1) + /// Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_challenge_period() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_852_000 picoseconds. + Weight::from_parts(6_181_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::ContractAddress` (r:0 w:1) + /// Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_contract_address() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_563_000 picoseconds. + Weight::from_parts(6_832_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::BridgePaused` (r:1 w:1) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_bridge_paused() -> Weight { + // Proof Size summary in bytes: + // Measured: `146` + // Estimated: `1631` + // Minimum execution time: 8_306_000 picoseconds. + Weight::from_parts(8_586_000, 0) + .saturating_add(Weight::from_parts(0, 1631)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::NotarySetId` (r:1 w:1) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:1) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + /// Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + /// Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryXrplKeys` (r:0 w:1) + /// Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:0 w:1) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn finalise_authorities_change() -> Weight { + // Proof Size summary in bytes: + // Measured: `195` + // Estimated: `3660` + // Minimum execution time: 14_438_000 picoseconds. + Weight::from_parts(14_879_000, 0) + .saturating_add(Weight::from_parts(0, 3660)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `EthBridge::MissedMessageIds` (r:1 w:1) + /// Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn remove_missing_event_id() -> Weight { + // Proof Size summary in bytes: + // Measured: `220` + // Estimated: `1705` + // Minimum execution time: 10_459_000 picoseconds. + Weight::from_parts(10_710_000, 0) + .saturating_add(Weight::from_parts(0, 1705)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `EthBridge::Relayer` (r:1 w:0) + /// Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::MissedMessageIds` (r:1 w:0) + /// Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + /// Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + /// Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + /// Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + /// Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_missing_event() -> Weight { + // Proof Size summary in bytes: + // Measured: `217` + // Estimated: `3682` + // Minimum execution time: 22_152_000 picoseconds. + Weight::from_parts(22_583_000, 0) + .saturating_add(Weight::from_parts(0, 3682)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `EthBridge::Relayer` (r:1 w:0) + /// Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ProcessedMessageIds` (r:1 w:0) + /// Proof: `EthBridge::ProcessedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingEventClaims` (r:1 w:1) + /// Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ChallengePeriod` (r:1 w:0) + /// Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::MessagesValidAt` (r:1 w:1) + /// Proof: `EthBridge::MessagesValidAt` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) + /// Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_event() -> Weight { + // Proof Size summary in bytes: + // Measured: `186` + // Estimated: `3651` + // Minimum execution time: 19_457_000 picoseconds. + Weight::from_parts(19_958_000, 0) + .saturating_add(Weight::from_parts(0, 3651)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + /// Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + /// Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + /// Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ChallengerAccount` (r:0 w:1) + /// Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn submit_challenge() -> Weight { + // Proof Size summary in bytes: + // Measured: `1314` + // Estimated: `6172` + // Minimum execution time: 75_583_000 picoseconds. + Weight::from_parts(76_645_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingClaimStatus` (r:1 w:1) + /// Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::EventNotarizations` (r:2 w:1) + /// Proof: `EthBridge::EventNotarizations` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingClaimChallenges` (r:1 w:1) + /// Proof: `EthBridge::PendingClaimChallenges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::PendingEventClaims` (r:1 w:0) + /// Proof: `EthBridge::PendingEventClaims` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::Relayer` (r:1 w:0) + /// Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ChallengerAccount` (r:1 w:1) + /// Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AssetsExt::Holds` (r:1 w:1) + /// Proof: `AssetsExt::Holds` (`max_values`: None, `max_size`: Some(433), added: 2908, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + fn submit_notarization() -> Weight { + // Proof Size summary in bytes: + // Measured: `1689` + // Estimated: `7629` + // Minimum execution time: 104_207_000 picoseconds. + Weight::from_parts(106_491_000, 0) + .saturating_add(Weight::from_parts(0, 7629)) + .saturating_add(T::DbWeight::get().reads(14)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `EthBridge::NextNotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NextNotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetId` (r:1 w:0) + /// Proof: `EthBridge::NotarySetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::ContractAddress` (r:1 w:0) + /// Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NextEventProofId` (r:1 w:1) + /// Proof: `EthBridge::NextEventProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::BridgePaused` (r:1 w:1) + /// Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::XrplDoorSigners` (r:1 w:0) + /// Proof: `EthBridge::XrplDoorSigners` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotaryXrplKeys` (r:1 w:0) + /// Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XRPLBridge::DoorAddress` (r:1 w:0) + /// Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `EthBridge::NextAuthorityChange` (r:0 w:1) + /// Proof: `EthBridge::NextAuthorityChange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::AuthoritiesChangedThisEra` (r:0 w:1) + /// Proof: `EthBridge::AuthoritiesChangedThisEra` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthBridge::NotarySetProofId` (r:0 w:1) + /// Proof: `EthBridge::NotarySetProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn handle_authorities_change() -> Weight { + // Proof Size summary in bytes: + // Measured: `481` + // Estimated: `3946` + // Minimum execution time: 41_689_000 picoseconds. + Weight::from_parts(42_971_000, 0) + .saturating_add(Weight::from_parts(0, 3946)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(6)) + } } From 74759c71d3db9d44915ff3dd51315f20beecbd2e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 20 May 2024 17:53:10 +1200 Subject: [PATCH 059/112] Add migrations, bump spec versions --- runtime/src/lib.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index d1f4decba..9b1605bef 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -155,10 +155,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("root"), impl_name: create_runtime_str!("root"), authoring_version: 1, - spec_version: 54, + spec_version: 55, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 9, + transaction_version: 10, state_version: 0, }; @@ -1466,7 +1466,20 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::AllMigrations, + ( + pallet_multisig::migrations::v1::MigrateToV1, + pallet_preimage::migration::v1::Migration, + pallet_scheduler::migration::v3::MigrateToV4, + pallet_assets::migration::v1::MigrateToV1, + pallet_balances::migration::MigrateToTrackInactive, + pallet_scheduler::migration::v4::CleanupAgendas, + pallet_staking::migrations::v13::MigrateToV13, + pallet_grandpa::migrations::CleanupSetIdSessionMap, + pallet_offences::migration::v1::MigrateToV1, + pallet_im_online::migration::v1::Migration, + pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, + migrations::AllMigrations, + ), >; impl_runtime_apis! { From 297f6d05bbc49479cda4969faed22dd0708df24e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 23 May 2024 15:27:22 +1200 Subject: [PATCH 060/112] Fix weight v2 lte comparisons and tests. --- pallet/erc20-peg/src/lib.rs | 2 +- pallet/ethy/src/lib.rs | 4 ++-- pallet/ethy/src/tests.rs | 2 +- pallet/xrpl-bridge/src/lib.rs | 15 ++++++++------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pallet/erc20-peg/src/lib.rs b/pallet/erc20-peg/src/lib.rs index c96fd0aea..0a4529775 100644 --- a/pallet/erc20-peg/src/lib.rs +++ b/pallet/erc20-peg/src/lib.rs @@ -264,7 +264,7 @@ pub mod pallet { fn on_idle(_now: BlockNumberFor, remaining_weight: Weight) -> Weight { let initial_read_cost = DbWeight::get().reads(1u64); // Ensure we have enough weight to perform the initial read - if remaining_weight.all_lte(initial_read_cost) { + if remaining_weight.ref_time() <= initial_read_cost.ref_time() { return Weight::zero() } // Check that there are blocks in ready_blocks diff --git a/pallet/ethy/src/lib.rs b/pallet/ethy/src/lib.rs index 2a5672ce6..220be3818 100644 --- a/pallet/ethy/src/lib.rs +++ b/pallet/ethy/src/lib.rs @@ -641,7 +641,7 @@ pub mod pallet { let weight_per_proof = DbWeight::get().reads_writes(2, 2); // Do we have enough weight to process one proof? - if remaining_weight.all_lte(base_weight + weight_per_proof) { + if remaining_weight.ref_time() <= (base_weight + weight_per_proof).ref_time() { return Weight::zero() } @@ -657,7 +657,7 @@ pub mod pallet { for _ in 0..max_delayed_events { // Check if we have enough weight to process this iteration let new_consumed_weight = consumed_weight.saturating_add(weight_per_proof); - if remaining_weight.all_lte(new_consumed_weight) { + if remaining_weight.ref_time() <= new_consumed_weight.ref_time() { break } let Some((event_proof_id, signing_request)) = pending_event_proofs.next() else { diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index 71d7584b9..ea312acae 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -1952,7 +1952,7 @@ fn on_idle_limits_processing() { assert_eq!( EthBridge::on_idle( frame_system::Pallet::::block_number() + 1, - expected_weight + Weight::from_all(1) + expected_weight + Weight::from_parts(1, 1) ), expected_weight ); diff --git a/pallet/xrpl-bridge/src/lib.rs b/pallet/xrpl-bridge/src/lib.rs index 9f615ac3f..fb3768db2 100644 --- a/pallet/xrpl-bridge/src/lib.rs +++ b/pallet/xrpl-bridge/src/lib.rs @@ -767,7 +767,7 @@ impl Pallet { weight_per_tx.saturating_add(DbWeight::get().reads_writes(2u64, 2u64)); // Ensure we have enough weight to perform the initial reads + process at least one tx - if remaining_weight.all_lte(base_process_weight + min_weight_per_tx) { + if remaining_weight.ref_time() <= (base_process_weight + min_weight_per_tx).ref_time() { return Weight::zero() } @@ -788,11 +788,12 @@ impl Pallet { // delayed payments to process while new_highest <= block_limit { // Check if we have enough remaining to mutate storage this block - if remaining_weight.all_lte( + if remaining_weight.ref_time() <= used_weight .saturating_add(DbWeight::get().reads_writes(1, 2)) - .saturating_add(weight_per_tx), - ) { + .saturating_add(weight_per_tx) + .ref_time() + { break } @@ -864,7 +865,7 @@ impl Pallet { let min_weight_per_index = DbWeight::get().reads_writes(1, 3); // Ensure we have enough weight to perform the initial reads + at least one clear - if remaining_weight.all_lte(base_pruning_weight + min_weight_per_index) { + if remaining_weight.ref_time() <= (base_pruning_weight + min_weight_per_index).ref_time() { return Weight::zero() } @@ -894,8 +895,8 @@ impl Pallet { for ledger_index in settled_txs_to_clear { // Check if we have enough remaining to mutate storage this index - if remaining_weight - .all_lte(used_weight.saturating_add(DbWeight::get().reads_writes(1, 2))) + if remaining_weight.ref_time() <= + used_weight.saturating_add(DbWeight::get().reads_writes(1, 2)).ref_time() { break } From effee9eaf6fe318f35daa1235d41bdeb5046848e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 23 May 2024 15:31:05 +1200 Subject: [PATCH 061/112] Ignore xrpl ed25519 test for now --- pallet/xrpl/src/tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pallet/xrpl/src/tests.rs b/pallet/xrpl/src/tests.rs index 2e49fc151..ff94faf5a 100644 --- a/pallet/xrpl/src/tests.rs +++ b/pallet/xrpl/src/tests.rs @@ -252,6 +252,8 @@ mod self_contained_call { }); } + // TODO - enable once e2e ready? + #[ignore] #[test] fn ed25519_system_remark_extrinsic_from_message_success() { TestExt::::default() From 112f8fb8cdd2e0b4aff3dc935e004a06fad5e331 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 23 May 2024 06:13:43 +0000 Subject: [PATCH 062/112] Update all benchmarks on feat/substrate-v1.0.0 --- pallet/crowdsale/src/weights.rs | 52 ++--- pallet/dex/src/weights.rs | 32 +-- pallet/doughnut/src/weights.rs | 20 +- pallet/echo/src/weights.rs | 8 +- pallet/erc20-peg/src/weights.rs | 44 ++-- pallet/ethy/src/weights.rs | 76 +++---- pallet/evm-chain-id/src/weights.rs | 8 +- pallet/fee-control/src/weights.rs | 16 +- pallet/futurepass/src/weights.rs | 56 ++--- pallet/maintenance-mode/src/weights.rs | 24 +-- pallet/marketplace/src/weights.rs | 100 ++++----- pallet/nft-peg/src/weights.rs | 16 +- pallet/nft/src/weights.rs | 52 ++--- pallet/sft/src/weights.rs | 60 +++--- pallet/token-approvals/src/weights.rs | 28 +-- pallet/vortex-distribution/src/weights.rs | 48 ++--- pallet/xls20/src/weights.rs | 24 +-- pallet/xrpl-bridge/src/weights.rs | 72 +++---- pallet/xrpl/src/weights.rs | 9 +- runtime/src/weights/frame_system.rs | 48 ++--- runtime/src/weights/pallet_assets_ext.rs | 12 +- runtime/src/weights/pallet_bags_list.rs | 16 +- runtime/src/weights/pallet_balances.rs | 40 ++-- runtime/src/weights/pallet_crowdsale.rs | 48 ++--- runtime/src/weights/pallet_dex.rs | 32 +-- runtime/src/weights/pallet_doughnut.rs | 20 +- runtime/src/weights/pallet_echo.rs | 8 +- runtime/src/weights/pallet_erc20_peg.rs | 44 ++-- runtime/src/weights/pallet_ethy.rs | 72 +++---- runtime/src/weights/pallet_evm_chain_id.rs | 8 +- runtime/src/weights/pallet_fee_control.rs | 16 +- runtime/src/weights/pallet_futurepass.rs | 40 ++-- .../src/weights/pallet_maintenance_mode.rs | 24 +-- runtime/src/weights/pallet_marketplace.rs | 80 ++++---- runtime/src/weights/pallet_multisig.rs | 70 +++---- runtime/src/weights/pallet_nft.rs | 52 ++--- runtime/src/weights/pallet_nft_peg.rs | 16 +- runtime/src/weights/pallet_preimage.rs | 64 +++--- runtime/src/weights/pallet_proxy.rs | 100 ++++----- runtime/src/weights/pallet_recovery.rs | 52 ++--- runtime/src/weights/pallet_scheduler.rs | 76 +++---- runtime/src/weights/pallet_session.rs | 12 +- runtime/src/weights/pallet_sft.rs | 56 ++--- runtime/src/weights/pallet_staking.rs | 194 +++++++++--------- runtime/src/weights/pallet_timestamp.rs | 12 +- runtime/src/weights/pallet_token_approvals.rs | 28 +-- runtime/src/weights/pallet_utility.rs | 36 ++-- runtime/src/weights/pallet_vortex.rs | 44 ++-- runtime/src/weights/pallet_xls20.rs | 24 +-- runtime/src/weights/pallet_xrpl.rs | 8 +- runtime/src/weights/pallet_xrpl_bridge.rs | 64 +++--- 51 files changed, 1081 insertions(+), 1080 deletions(-) diff --git a/pallet/crowdsale/src/weights.rs b/pallet/crowdsale/src/weights.rs index ebd3f79c8..0363eefdf 100644 --- a/pallet/crowdsale/src/weights.rs +++ b/pallet/crowdsale/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_crowdsale //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -87,7 +87,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleInfo` (r:0 w:1) // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) fn initialize() -> Weight { - Weight::from_all(104_000_000 as u64) + Weight::from_all(287_741_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -96,7 +96,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn enable() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(59_200_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -111,7 +111,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleParticipation` (r:1 w:1) // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn participate() -> Weight { - Weight::from_all(67_000_000 as u64) + Weight::from_all(176_931_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -132,7 +132,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::NextUnsignedAt` (r:0 w:1) // Proof: `Crowdsale::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_all(98_000_000 as u64) + Weight::from_all(263_444_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -151,7 +151,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn claim_voucher() -> Weight { - Weight::from_all(96_000_000 as u64) + Weight::from_all(257_978_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -168,7 +168,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::PublicMintInfo` (r:1 w:0) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn redeem_voucher() -> Weight { - Weight::from_all(72_000_000 as u64) + Weight::from_all(189_765_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -179,7 +179,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn proxy_vault_call() -> Weight { - Weight::from_all(25_000_000 as u64) + Weight::from_all(79_017_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: `Crowdsale::SaleInfo` (r:1 w:1) @@ -187,7 +187,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn try_force_distribution() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(53_497_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -207,9 +207,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_all(4_149_591 as u64) - // Standard Error: 470_855 - .saturating_add(Weight::from_all(94_511_273 as u64).saturating_mul(p as u64)) + Weight::from_all(55_353_636 as u64) + // Standard Error: 272_354 + .saturating_add(Weight::from_all(206_224_383 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((9 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -218,7 +218,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:0) // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn on_initialize_empty() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(9_592_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } } @@ -250,7 +250,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleInfo` (r:0 w:1) // Proof: `Crowdsale::SaleInfo` (`max_values`: None, `max_size`: Some(133), added: 2608, mode: `MaxEncodedLen`) fn initialize() -> Weight { - Weight::from_all(104_000_000 as u64) + Weight::from_all(287_741_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } @@ -259,7 +259,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:1) // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn enable() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(59_200_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -274,7 +274,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleParticipation` (r:1 w:1) // Proof: `Crowdsale::SaleParticipation` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn participate() -> Weight { - Weight::from_all(67_000_000 as u64) + Weight::from_all(176_931_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -295,7 +295,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::NextUnsignedAt` (r:0 w:1) // Proof: `Crowdsale::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn distribute_crowdsale_rewards() -> Weight { - Weight::from_all(98_000_000 as u64) + Weight::from_all(263_444_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -314,7 +314,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn claim_voucher() -> Weight { - Weight::from_all(96_000_000 as u64) + Weight::from_all(257_978_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -331,7 +331,7 @@ impl WeightInfo for () { // Storage: `Nft::PublicMintInfo` (r:1 w:0) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn redeem_voucher() -> Weight { - Weight::from_all(72_000_000 as u64) + Weight::from_all(189_765_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -342,7 +342,7 @@ impl WeightInfo for () { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn proxy_vault_call() -> Weight { - Weight::from_all(25_000_000 as u64) + Weight::from_all(79_017_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } // Storage: `Crowdsale::SaleInfo` (r:1 w:1) @@ -350,7 +350,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleDistribution` (r:1 w:1) // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) fn try_force_distribution() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(53_497_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -370,9 +370,9 @@ impl WeightInfo for () { // Proof: `Crowdsale::SaleDistribution` (`max_values`: Some(1), `max_size`: Some(16002), added: 16497, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 5]`. fn on_initialize(p: u32, ) -> Weight { - Weight::from_all(4_149_591 as u64) - // Standard Error: 470_855 - .saturating_add(Weight::from_all(94_511_273 as u64).saturating_mul(p as u64)) + Weight::from_all(55_353_636 as u64) + // Standard Error: 272_354 + .saturating_add(Weight::from_all(206_224_383 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((9 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) @@ -381,7 +381,7 @@ impl WeightInfo for () { // Storage: `Crowdsale::SaleEndBlocks` (r:1 w:0) // Proof: `Crowdsale::SaleEndBlocks` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn on_initialize_empty() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(9_592_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } } diff --git a/pallet/dex/src/weights.rs b/pallet/dex/src/weights.rs index 434e3a59a..8e42d1c4f 100644 --- a/pallet/dex/src/weights.rs +++ b/pallet/dex/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_dex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -74,7 +74,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_supply() -> Weight { - Weight::from_all(116_000_000 as u64) + Weight::from_all(290_144_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -93,7 +93,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_target() -> Weight { - Weight::from_all(122_000_000 as u64) + Weight::from_all(305_072_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -124,7 +124,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::TradingPairStatuses` (r:0 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { - Weight::from_all(206_000_000 as u64) + Weight::from_all(522_758_000 as u64) .saturating_add(T::DbWeight::get().reads(23 as u64)) .saturating_add(T::DbWeight::get().writes(21 as u64)) } @@ -143,7 +143,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { - Weight::from_all(180_000_000 as u64) + Weight::from_all(430_985_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -152,7 +152,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::TradingPairStatuses` (r:1 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn reenable_trading_pair() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(56_297_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -161,14 +161,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `Dex::TradingPairStatuses` (r:1 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn disable_trading_pair() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(56_712_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Dex::FeeTo` (r:0 w:1) // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(29_447_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -190,7 +190,7 @@ impl WeightInfo for () { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_supply() -> Weight { - Weight::from_all(116_000_000 as u64) + Weight::from_all(290_144_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -209,7 +209,7 @@ impl WeightInfo for () { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn swap_with_exact_target() -> Weight { - Weight::from_all(122_000_000 as u64) + Weight::from_all(305_072_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -240,7 +240,7 @@ impl WeightInfo for () { // Storage: `Dex::TradingPairStatuses` (r:0 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { - Weight::from_all(206_000_000 as u64) + Weight::from_all(522_758_000 as u64) .saturating_add(RocksDbWeight::get().reads(23 as u64)) .saturating_add(RocksDbWeight::get().writes(21 as u64)) } @@ -259,7 +259,7 @@ impl WeightInfo for () { // Storage: `Dex::LiquidityPoolLastK` (r:1 w:1) // Proof: `Dex::LiquidityPoolLastK` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { - Weight::from_all(180_000_000 as u64) + Weight::from_all(430_985_000 as u64) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } @@ -268,7 +268,7 @@ impl WeightInfo for () { // Storage: `Dex::TradingPairStatuses` (r:1 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn reenable_trading_pair() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(56_297_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -277,14 +277,14 @@ impl WeightInfo for () { // Storage: `Dex::TradingPairStatuses` (r:1 w:1) // Proof: `Dex::TradingPairStatuses` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`) fn disable_trading_pair() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(56_712_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Dex::FeeTo` (r:0 w:1) // Proof: `Dex::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(29_447_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/doughnut/src/weights.rs b/pallet/doughnut/src/weights.rs index 6edb601fd..63af6a9e3 100644 --- a/pallet/doughnut/src/weights.rs +++ b/pallet/doughnut/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_doughnut //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -67,25 +67,25 @@ impl WeightInfo for SubstrateWeight { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(221_000_000 as u64) + Weight::from_all(514_937_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) } // Storage: `Doughnut::BlockedDoughnuts` (r:0 w:1) // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn revoke_doughnut() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(54_500_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Doughnut::BlockedHolders` (r:0 w:1) // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) fn revoke_holder() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(27_483_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Doughnut::WhitelistedHolders` (r:0 w:1) // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn update_whitelisted_holders() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(26_157_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -103,25 +103,25 @@ impl WeightInfo for () { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(221_000_000 as u64) + Weight::from_all(514_937_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } // Storage: `Doughnut::BlockedDoughnuts` (r:0 w:1) // Proof: `Doughnut::BlockedDoughnuts` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn revoke_doughnut() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(54_500_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Doughnut::BlockedHolders` (r:0 w:1) // Proof: `Doughnut::BlockedHolders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) fn revoke_holder() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(27_483_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Doughnut::WhitelistedHolders` (r:0 w:1) // Proof: `Doughnut::WhitelistedHolders` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn update_whitelisted_holders() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(26_157_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/echo/src/weights.rs b/pallet/echo/src/weights.rs index d46336757..8f033fbfc 100644 --- a/pallet/echo/src/weights.rs +++ b/pallet/echo/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_echo //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn ping() -> Weight { - Weight::from_all(28_000_000 as u64) + Weight::from_all(87_348_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -87,7 +87,7 @@ impl WeightInfo for () { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn ping() -> Weight { - Weight::from_all(28_000_000 as u64) + Weight::from_all(87_348_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/erc20-peg/src/weights.rs b/pallet/erc20-peg/src/weights.rs index dfc666052..fcd6c907f 100644 --- a/pallet/erc20-peg/src/weights.rs +++ b/pallet/erc20-peg/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_erc20_peg //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -65,25 +65,25 @@ impl WeightInfo for SubstrateWeight { // Storage: `Erc20Peg::DepositsActive` (r:0 w:1) // Proof: `Erc20Peg::DepositsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_931_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsActive` (r:0 w:1) // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_712_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::DepositsDelayActive` (r:0 w:1) // Proof: `Erc20Peg::DepositsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_408_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:0 w:1) // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_447_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsActive` (r:1 w:0) @@ -111,20 +111,20 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { - Weight::from_all(67_000_000 as u64) + Weight::from_all(180_161_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: `Erc20Peg::ContractAddress` (r:0 w:1) // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_erc20_peg_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_962_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::RootPegContractAddress` (r:0 w:1) // Proof: `Erc20Peg::RootPegContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_root_peg_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_926_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::Erc20ToAssetId` (r:0 w:1) @@ -132,19 +132,19 @@ impl WeightInfo for SubstrateWeight { // Storage: `Erc20Peg::AssetIdToErc20` (r:0 w:1) // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_erc20_asset_map() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(15_637_000 as u64) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: `Erc20Peg::Erc20Meta` (r:0 w:1) // Proof: `Erc20Peg::Erc20Meta` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) fn set_erc20_meta() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(14_207_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::PaymentDelay` (r:0 w:1) // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(26_115_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -154,25 +154,25 @@ impl WeightInfo for () { // Storage: `Erc20Peg::DepositsActive` (r:0 w:1) // Proof: `Erc20Peg::DepositsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_931_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsActive` (r:0 w:1) // Proof: `Erc20Peg::WithdrawalsActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_712_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::DepositsDelayActive` (r:0 w:1) // Proof: `Erc20Peg::DepositsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_deposits_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_408_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsDelayActive` (r:0 w:1) // Proof: `Erc20Peg::WithdrawalsDelayActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn activate_withdrawals_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_447_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::WithdrawalsActive` (r:1 w:0) @@ -200,20 +200,20 @@ impl WeightInfo for () { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn withdraw() -> Weight { - Weight::from_all(67_000_000 as u64) + Weight::from_all(180_161_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: `Erc20Peg::ContractAddress` (r:0 w:1) // Proof: `Erc20Peg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_erc20_peg_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_962_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::RootPegContractAddress` (r:0 w:1) // Proof: `Erc20Peg::RootPegContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_root_peg_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_926_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::Erc20ToAssetId` (r:0 w:1) @@ -221,19 +221,19 @@ impl WeightInfo for () { // Storage: `Erc20Peg::AssetIdToErc20` (r:0 w:1) // Proof: `Erc20Peg::AssetIdToErc20` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_erc20_asset_map() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(15_637_000 as u64) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: `Erc20Peg::Erc20Meta` (r:0 w:1) // Proof: `Erc20Peg::Erc20Meta` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) fn set_erc20_meta() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(14_207_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Erc20Peg::PaymentDelay` (r:0 w:1) // Proof: `Erc20Peg::PaymentDelay` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(26_115_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/ethy/src/weights.rs b/pallet/ethy/src/weights.rs index e53be1c2f..68f54f2d8 100644 --- a/pallet/ethy/src/weights.rs +++ b/pallet/ethy/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_ethy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Jasons-Ubuntu`, CPU: `AMD Ryzen 9 7950X 16-Core Processor` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,9 +76,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 19]`. fn set_xrpl_door_signers(p: u32, ) -> Weight { - Weight::from_all(14_270_140 as u64) - // Standard Error: 3_732 - .saturating_add(Weight::from_all(1_314_587 as u64).saturating_mul(p as u64)) + Weight::from_all(51_256_671 as u64) + // Standard Error: 7_900 + .saturating_add(Weight::from_all(3_225_611 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -88,7 +88,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::Relayer` (r:0 w:1) // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_relayer() -> Weight { - Weight::from_all(11_822_000 as u64) + Weight::from_all(42_939_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -103,7 +103,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:2 w:2) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn deposit_relayer_bond() -> Weight { - Weight::from_all(70_713_000 as u64) + Weight::from_all(200_169_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -120,38 +120,38 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:2 w:2) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn withdraw_relayer_bond() -> Weight { - Weight::from_all(72_437_000 as u64) + Weight::from_all(207_719_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: `EthBridge::EventBlockConfirmations` (r:0 w:1) // Proof: `EthBridge::EventBlockConfirmations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_event_block_confirmations() -> Weight { - Weight::from_all(6_171_000 as u64) + Weight::from_all(24_183_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::DelayedEventProofsPerBlock` (r:0 w:1) // Proof: `EthBridge::DelayedEventProofsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_delayed_event_proofs_per_block() -> Weight { - Weight::from_all(6_262_000 as u64) + Weight::from_all(24_872_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::ChallengePeriod` (r:0 w:1) // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_challenge_period() -> Weight { - Weight::from_all(6_171_000 as u64) + Weight::from_all(24_016_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::ContractAddress` (r:0 w:1) // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_contract_address() -> Weight { - Weight::from_all(6_743_000 as u64) + Weight::from_all(26_770_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::BridgePaused` (r:1 w:1) // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_bridge_paused() -> Weight { - Weight::from_all(8_526_000 as u64) + Weight::from_all(31_760_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -170,14 +170,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::NotaryKeys` (r:0 w:1) // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalise_authorities_change() -> Weight { - Weight::from_all(14_718_000 as u64) + Weight::from_all(50_901_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: `EthBridge::MissedMessageIds` (r:1 w:1) // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_missing_event_id() -> Weight { - Weight::from_all(10_931_000 as u64) + Weight::from_all(39_981_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -194,7 +194,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_missing_event() -> Weight { - Weight::from_all(22_783_000 as u64) + Weight::from_all(79_768_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -211,7 +211,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_event() -> Weight { - Weight::from_all(20_258_000 as u64) + Weight::from_all(67_866_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -232,7 +232,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::ChallengerAccount` (r:0 w:1) // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_challenge() -> Weight { - Weight::from_all(77_667_000 as u64) + Weight::from_all(224_778_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -261,7 +261,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn submit_notarization() -> Weight { - Weight::from_all(111_651_000 as u64) + Weight::from_all(302_708_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -292,7 +292,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EthBridge::NotarySetProofId` (r:0 w:1) // Proof: `EthBridge::NotarySetProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn handle_authorities_change() -> Weight { - Weight::from_all(43_162_000 as u64) + Weight::from_all(177_258_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -308,9 +308,9 @@ impl WeightInfo for () { // Proof: `EthBridge::NotaryXrplKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 19]`. fn set_xrpl_door_signers(p: u32, ) -> Weight { - Weight::from_all(14_270_140 as u64) - // Standard Error: 3_732 - .saturating_add(Weight::from_all(1_314_587 as u64).saturating_mul(p as u64)) + Weight::from_all(51_256_671 as u64) + // Standard Error: 7_900 + .saturating_add(Weight::from_all(3_225_611 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) @@ -320,7 +320,7 @@ impl WeightInfo for () { // Storage: `EthBridge::Relayer` (r:0 w:1) // Proof: `EthBridge::Relayer` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_relayer() -> Weight { - Weight::from_all(11_822_000 as u64) + Weight::from_all(42_939_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -335,7 +335,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:2 w:2) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn deposit_relayer_bond() -> Weight { - Weight::from_all(70_713_000 as u64) + Weight::from_all(200_169_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -352,38 +352,38 @@ impl WeightInfo for () { // Storage: `System::Account` (r:2 w:2) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn withdraw_relayer_bond() -> Weight { - Weight::from_all(72_437_000 as u64) + Weight::from_all(207_719_000 as u64) .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } // Storage: `EthBridge::EventBlockConfirmations` (r:0 w:1) // Proof: `EthBridge::EventBlockConfirmations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_event_block_confirmations() -> Weight { - Weight::from_all(6_171_000 as u64) + Weight::from_all(24_183_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::DelayedEventProofsPerBlock` (r:0 w:1) // Proof: `EthBridge::DelayedEventProofsPerBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_delayed_event_proofs_per_block() -> Weight { - Weight::from_all(6_262_000 as u64) + Weight::from_all(24_872_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::ChallengePeriod` (r:0 w:1) // Proof: `EthBridge::ChallengePeriod` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_challenge_period() -> Weight { - Weight::from_all(6_171_000 as u64) + Weight::from_all(24_016_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::ContractAddress` (r:0 w:1) // Proof: `EthBridge::ContractAddress` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_contract_address() -> Weight { - Weight::from_all(6_743_000 as u64) + Weight::from_all(26_770_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `EthBridge::BridgePaused` (r:1 w:1) // Proof: `EthBridge::BridgePaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_bridge_paused() -> Weight { - Weight::from_all(8_526_000 as u64) + Weight::from_all(31_760_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -402,14 +402,14 @@ impl WeightInfo for () { // Storage: `EthBridge::NotaryKeys` (r:0 w:1) // Proof: `EthBridge::NotaryKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalise_authorities_change() -> Weight { - Weight::from_all(14_718_000 as u64) + Weight::from_all(50_901_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: `EthBridge::MissedMessageIds` (r:1 w:1) // Proof: `EthBridge::MissedMessageIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_missing_event_id() -> Weight { - Weight::from_all(10_931_000 as u64) + Weight::from_all(39_981_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -426,7 +426,7 @@ impl WeightInfo for () { // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_missing_event() -> Weight { - Weight::from_all(22_783_000 as u64) + Weight::from_all(79_768_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -443,7 +443,7 @@ impl WeightInfo for () { // Storage: `EthBridge::PendingClaimStatus` (r:0 w:1) // Proof: `EthBridge::PendingClaimStatus` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_event() -> Weight { - Weight::from_all(20_258_000 as u64) + Weight::from_all(67_866_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -464,7 +464,7 @@ impl WeightInfo for () { // Storage: `EthBridge::ChallengerAccount` (r:0 w:1) // Proof: `EthBridge::ChallengerAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit_challenge() -> Weight { - Weight::from_all(77_667_000 as u64) + Weight::from_all(224_778_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -493,7 +493,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn submit_notarization() -> Weight { - Weight::from_all(111_651_000 as u64) + Weight::from_all(302_708_000 as u64) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -524,7 +524,7 @@ impl WeightInfo for () { // Storage: `EthBridge::NotarySetProofId` (r:0 w:1) // Proof: `EthBridge::NotarySetProofId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn handle_authorities_change() -> Weight { - Weight::from_all(43_162_000 as u64) + Weight::from_all(177_258_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } diff --git a/pallet/evm-chain-id/src/weights.rs b/pallet/evm-chain-id/src/weights.rs index a30bda327..a5bcc29db 100644 --- a/pallet/evm-chain-id/src/weights.rs +++ b/pallet/evm-chain-id/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_evm_chain_id //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -56,7 +56,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `EVMChainId::ChainId` (r:0 w:1) // Proof: `EVMChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_chain_id() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_439_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -66,7 +66,7 @@ impl WeightInfo for () { // Storage: `EVMChainId::ChainId` (r:0 w:1) // Proof: `EVMChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_chain_id() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_439_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/fee-control/src/weights.rs b/pallet/fee-control/src/weights.rs index ced33355c..ca30b0e7e 100644 --- a/pallet/fee-control/src/weights.rs +++ b/pallet/fee-control/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_fee_control //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,21 +58,21 @@ impl WeightInfo for SubstrateWeight { // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_evm_base_fee() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_769_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_weight_multiplier() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_343_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_length_multiplier() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_472_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,21 +83,21 @@ impl WeightInfo for () { // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_evm_base_fee() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_769_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_weight_multiplier() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_343_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `FeeControl::Data` (r:1 w:1) // Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) fn set_length_multiplier() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_472_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/futurepass/src/weights.rs b/pallet/futurepass/src/weights.rs index 9add27a75..6c2ac5bd1 100644 --- a/pallet/futurepass/src/weights.rs +++ b/pallet/futurepass/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_futurepass //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(80_000_000 as u64) + Weight::from_all(196_195_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -78,9 +78,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_all(115_607_485 as u64) - // Standard Error: 15_177 - .saturating_add(Weight::from_all(252_997 as u64).saturating_mul(p as u64)) + Weight::from_all(270_996_791 as u64) + // Standard Error: 11_734 + .saturating_add(Weight::from_all(213_467 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -92,9 +92,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_all(80_622_097 as u64) - // Standard Error: 9_582 - .saturating_add(Weight::from_all(109_272 as u64).saturating_mul(p as u64)) + Weight::from_all(194_326_623 as u64) + // Standard Error: 6_500 + .saturating_add(Weight::from_all(270_944 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,9 +106,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_all(82_318_660 as u64) - // Standard Error: 77_680 - .saturating_add(Weight::from_all(53_345_962 as u64).saturating_mul(p as u64)) + Weight::from_all(191_033_203 as u64) + // Standard Error: 97_820 + .saturating_add(Weight::from_all(109_262_745 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -120,9 +120,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_all(28_381_410 as u64) - // Standard Error: 3_971 - .saturating_add(Weight::from_all(93_981 as u64).saturating_mul(p as u64)) + Weight::from_all(89_612_094 as u64) + // Standard Error: 4_867 + .saturating_add(Weight::from_all(89_411 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) } } @@ -138,7 +138,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(80_000_000 as u64) + Weight::from_all(196_195_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -150,9 +150,9 @@ impl WeightInfo for () { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn register_delegate_with_signature(p: u32, ) -> Weight { - Weight::from_all(115_607_485 as u64) - // Standard Error: 15_177 - .saturating_add(Weight::from_all(252_997 as u64).saturating_mul(p as u64)) + Weight::from_all(270_996_791 as u64) + // Standard Error: 11_734 + .saturating_add(Weight::from_all(213_467 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -164,9 +164,9 @@ impl WeightInfo for () { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn unregister_delegate(p: u32, ) -> Weight { - Weight::from_all(80_622_097 as u64) - // Standard Error: 9_582 - .saturating_add(Weight::from_all(109_272 as u64).saturating_mul(p as u64)) + Weight::from_all(194_326_623 as u64) + // Standard Error: 6_500 + .saturating_add(Weight::from_all(270_944 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -178,9 +178,9 @@ impl WeightInfo for () { // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn transfer_futurepass(p: u32, ) -> Weight { - Weight::from_all(82_318_660 as u64) - // Standard Error: 77_680 - .saturating_add(Weight::from_all(53_345_962 as u64).saturating_mul(p as u64)) + Weight::from_all(191_033_203 as u64) + // Standard Error: 97_820 + .saturating_add(Weight::from_all(109_262_745 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -192,9 +192,9 @@ impl WeightInfo for () { // Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy_extrinsic(p: u32, ) -> Weight { - Weight::from_all(28_381_410 as u64) - // Standard Error: 3_971 - .saturating_add(Weight::from_all(93_981 as u64).saturating_mul(p as u64)) + Weight::from_all(89_612_094 as u64) + // Standard Error: 4_867 + .saturating_add(Weight::from_all(89_411 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) } } diff --git a/pallet/maintenance-mode/src/weights.rs b/pallet/maintenance-mode/src/weights.rs index ee9087583..b04fd69a7 100644 --- a/pallet/maintenance-mode/src/weights.rs +++ b/pallet/maintenance-mode/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_maintenance_mode //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -60,31 +60,31 @@ impl WeightInfo for SubstrateWeight { // Storage: `MaintenanceMode::MaintenanceModeActive` (r:0 w:1) // Proof: `MaintenanceMode::MaintenanceModeActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn enable_maintenance_mode() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_722_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedAccounts` (r:0 w:1) // Proof: `MaintenanceMode::BlockedAccounts` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_account() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(26_294_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedEVMAddresses` (r:0 w:1) // Proof: `MaintenanceMode::BlockedEVMAddresses` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_evm_target() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(27_009_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedCalls` (r:0 w:1) // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) fn block_call() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_054_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedPallets` (r:0 w:1) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn block_pallet() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(28_298_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -94,31 +94,31 @@ impl WeightInfo for () { // Storage: `MaintenanceMode::MaintenanceModeActive` (r:0 w:1) // Proof: `MaintenanceMode::MaintenanceModeActive` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn enable_maintenance_mode() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_722_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedAccounts` (r:0 w:1) // Proof: `MaintenanceMode::BlockedAccounts` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_account() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(26_294_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedEVMAddresses` (r:0 w:1) // Proof: `MaintenanceMode::BlockedEVMAddresses` (`max_values`: None, `max_size`: Some(29), added: 2504, mode: `MaxEncodedLen`) fn block_evm_target() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(27_009_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedCalls` (r:0 w:1) // Proof: `MaintenanceMode::BlockedCalls` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) fn block_call() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(30_054_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `MaintenanceMode::BlockedPallets` (r:0 w:1) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn block_pallet() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(28_298_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/marketplace/src/weights.rs b/pallet/marketplace/src/weights.rs index 6c089582c..08de0249f 100644 --- a/pallet/marketplace/src/weights.rs +++ b/pallet/marketplace/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_marketplace //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -71,7 +71,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Marketplace::RegisteredMarketplaces` (r:0 w:1) // Proof: `Marketplace::RegisteredMarketplaces` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn register_marketplace() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(48_124_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -91,9 +91,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_all(31_275_183 as u64) - // Standard Error: 5_881 - .saturating_add(Weight::from_all(5_830_698 as u64).saturating_mul(p as u64)) + Weight::from_all(95_762_950 as u64) + // Standard Error: 12_435 + .saturating_add(Weight::from_all(13_939_641 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -115,9 +115,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_all(28_690_693 as u64) - // Standard Error: 15_674 - .saturating_add(Weight::from_all(4_684_129 as u64).saturating_mul(p as u64)) + Weight::from_all(91_324_086 as u64) + // Standard Error: 28_637 + .saturating_add(Weight::from_all(10_702_400 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -140,7 +140,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::TokenLocks` (r:0 w:1) // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn buy() -> Weight { - Weight::from_all(59_000_000 as u64) + Weight::from_all(165_370_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -162,9 +162,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_all(1_106_857 as u64) - // Standard Error: 102_751 - .saturating_add(Weight::from_all(46_325_142 as u64).saturating_mul(p as u64)) + Weight::from_all(29_771_213 as u64) + // Standard Error: 137_227 + .saturating_add(Weight::from_all(120_268_894 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(p as u64))) } @@ -184,9 +184,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_all(30_769_795 as u64) - // Standard Error: 5_555 - .saturating_add(Weight::from_all(5_798_909 as u64).saturating_mul(p as u64)) + Weight::from_all(98_821_301 as u64) + // Standard Error: 54_582 + .saturating_add(Weight::from_all(14_043_585 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -208,9 +208,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_all(27_464_163 as u64) - // Standard Error: 10_132 - .saturating_add(Weight::from_all(4_711_130 as u64).saturating_mul(p as u64)) + Weight::from_all(92_904_042 as u64) + // Standard Error: 27_291 + .saturating_add(Weight::from_all(10_468_680 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -231,7 +231,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Marketplace::ListingEndSchedule` (r:0 w:2) // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn bid() -> Weight { - Weight::from_all(79_000_000 as u64) + Weight::from_all(209_405_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -244,14 +244,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::TokenLocks` (r:0 w:1) // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn cancel_sale() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(65_696_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: `Marketplace::Listings` (r:1 w:1) // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) fn update_fixed_price() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_654_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -274,7 +274,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Marketplace::Offers` (r:0 w:1) // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) fn make_simple_offer() -> Weight { - Weight::from_all(85_000_000 as u64) + Weight::from_all(223_298_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -291,7 +291,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Marketplace::TokenOffers` (r:1 w:1) // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) fn cancel_offer() -> Weight { - Weight::from_all(80_000_000 as u64) + Weight::from_all(204_413_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -316,14 +316,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn accept_offer() -> Weight { - Weight::from_all(124_000_000 as u64) + Weight::from_all(325_816_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: `Marketplace::FeeTo` (r:0 w:1) // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_729_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -335,7 +335,7 @@ impl WeightInfo for () { // Storage: `Marketplace::RegisteredMarketplaces` (r:0 w:1) // Proof: `Marketplace::RegisteredMarketplaces` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn register_marketplace() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(48_124_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -355,9 +355,9 @@ impl WeightInfo for () { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_nft(p: u32, ) -> Weight { - Weight::from_all(31_275_183 as u64) - // Standard Error: 5_881 - .saturating_add(Weight::from_all(5_830_698 as u64).saturating_mul(p as u64)) + Weight::from_all(95_762_950 as u64) + // Standard Error: 12_435 + .saturating_add(Weight::from_all(13_939_641 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -379,9 +379,9 @@ impl WeightInfo for () { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn sell_sft(p: u32, ) -> Weight { - Weight::from_all(28_690_693 as u64) - // Standard Error: 15_674 - .saturating_add(Weight::from_all(4_684_129 as u64).saturating_mul(p as u64)) + Weight::from_all(91_324_086 as u64) + // Standard Error: 28_637 + .saturating_add(Weight::from_all(10_702_400 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -404,7 +404,7 @@ impl WeightInfo for () { // Storage: `Nft::TokenLocks` (r:0 w:1) // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn buy() -> Weight { - Weight::from_all(59_000_000 as u64) + Weight::from_all(165_370_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -426,9 +426,9 @@ impl WeightInfo for () { // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn buy_multi(p: u32, ) -> Weight { - Weight::from_all(1_106_857 as u64) - // Standard Error: 102_751 - .saturating_add(Weight::from_all(46_325_142 as u64).saturating_mul(p as u64)) + Weight::from_all(29_771_213 as u64) + // Standard Error: 137_227 + .saturating_add(Weight::from_all(120_268_894 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(p as u64))) } @@ -448,9 +448,9 @@ impl WeightInfo for () { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_nft(p: u32, ) -> Weight { - Weight::from_all(30_769_795 as u64) - // Standard Error: 5_555 - .saturating_add(Weight::from_all(5_798_909 as u64).saturating_mul(p as u64)) + Weight::from_all(98_821_301 as u64) + // Standard Error: 54_582 + .saturating_add(Weight::from_all(14_043_585 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -472,9 +472,9 @@ impl WeightInfo for () { // Proof: `Marketplace::OpenCollectionListings` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn auction_sft(p: u32, ) -> Weight { - Weight::from_all(27_464_163 as u64) - // Standard Error: 10_132 - .saturating_add(Weight::from_all(4_711_130 as u64).saturating_mul(p as u64)) + Weight::from_all(92_904_042 as u64) + // Standard Error: 27_291 + .saturating_add(Weight::from_all(10_468_680 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -495,7 +495,7 @@ impl WeightInfo for () { // Storage: `Marketplace::ListingEndSchedule` (r:0 w:2) // Proof: `Marketplace::ListingEndSchedule` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn bid() -> Weight { - Weight::from_all(79_000_000 as u64) + Weight::from_all(209_405_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } @@ -508,14 +508,14 @@ impl WeightInfo for () { // Storage: `Nft::TokenLocks` (r:0 w:1) // Proof: `Nft::TokenLocks` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) fn cancel_sale() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(65_696_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: `Marketplace::Listings` (r:1 w:1) // Proof: `Marketplace::Listings` (`max_values`: None, `max_size`: Some(20295), added: 22770, mode: `MaxEncodedLen`) fn update_fixed_price() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_654_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -538,7 +538,7 @@ impl WeightInfo for () { // Storage: `Marketplace::Offers` (r:0 w:1) // Proof: `Marketplace::Offers` (`max_values`: None, `max_size`: Some(70), added: 2545, mode: `MaxEncodedLen`) fn make_simple_offer() -> Weight { - Weight::from_all(85_000_000 as u64) + Weight::from_all(223_298_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -555,7 +555,7 @@ impl WeightInfo for () { // Storage: `Marketplace::TokenOffers` (r:1 w:1) // Proof: `Marketplace::TokenOffers` (`max_values`: None, `max_size`: Some(818), added: 3293, mode: `MaxEncodedLen`) fn cancel_offer() -> Weight { - Weight::from_all(80_000_000 as u64) + Weight::from_all(204_413_000 as u64) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -580,14 +580,14 @@ impl WeightInfo for () { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn accept_offer() -> Weight { - Weight::from_all(124_000_000 as u64) + Weight::from_all(325_816_000 as u64) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: `Marketplace::FeeTo` (r:0 w:1) // Proof: `Marketplace::FeeTo` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) fn set_fee_to() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_729_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/nft-peg/src/weights.rs b/pallet/nft-peg/src/weights.rs index b24628cbc..292d746de 100644 --- a/pallet/nft-peg/src/weights.rs +++ b/pallet/nft-peg/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_nft_peg //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,7 +58,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `NftPeg::ContractAddress` (r:0 w:1) // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_contract_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(25_600_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) @@ -82,7 +82,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:3) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn withdraw() -> Weight { - Weight::from_all(57_000_000 as u64) + Weight::from_all(156_478_000 as u64) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -105,7 +105,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn reclaim_blocked_nfts() -> Weight { - Weight::from_all(44_000_000 as u64) + Weight::from_all(124_109_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -116,7 +116,7 @@ impl WeightInfo for () { // Storage: `NftPeg::ContractAddress` (r:0 w:1) // Proof: `NftPeg::ContractAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_contract_address() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(25_600_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) @@ -140,7 +140,7 @@ impl WeightInfo for () { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:3) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn withdraw() -> Weight { - Weight::from_all(57_000_000 as u64) + Weight::from_all(156_478_000 as u64) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -163,7 +163,7 @@ impl WeightInfo for () { // Storage: `System::Digest` (r:1 w:1) // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn reclaim_blocked_nfts() -> Weight { - Weight::from_all(44_000_000 as u64) + Weight::from_all(124_109_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/pallet/nft/src/weights.rs b/pallet/nft/src/weights.rs index 163aee349..af8bc7926 100644 --- a/pallet/nft/src/weights.rs +++ b/pallet/nft/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_nft //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -67,42 +67,42 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn claim_unowned_collection() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(44_867_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(47_649_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(48_013_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(49_537_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(48_921_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_262_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -119,7 +119,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::CollectionInfo` (r:0 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(99_043_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -128,7 +128,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::PublicMintInfo` (r:1 w:1) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(50_848_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -137,7 +137,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::PublicMintInfo` (r:1 w:1) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(51_518_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -146,7 +146,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::PublicMintInfo` (r:1 w:0) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(58_861_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(62_192_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -168,7 +168,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(60_234_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -179,42 +179,42 @@ impl WeightInfo for () { // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn claim_unowned_collection() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(44_867_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(47_649_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(48_013_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(49_537_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(48_921_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_262_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -231,7 +231,7 @@ impl WeightInfo for () { // Storage: `Nft::CollectionInfo` (r:0 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(99_043_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -240,7 +240,7 @@ impl WeightInfo for () { // Storage: `Nft::PublicMintInfo` (r:1 w:1) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(50_848_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -249,7 +249,7 @@ impl WeightInfo for () { // Storage: `Nft::PublicMintInfo` (r:1 w:1) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(51_518_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -258,7 +258,7 @@ impl WeightInfo for () { // Storage: `Nft::PublicMintInfo` (r:1 w:0) // Proof: `Nft::PublicMintInfo` (`max_values`: None, `max_size`: Some(34), added: 2509, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(58_861_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -269,7 +269,7 @@ impl WeightInfo for () { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(62_192_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -280,7 +280,7 @@ impl WeightInfo for () { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(60_234_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/pallet/sft/src/weights.rs b/pallet/sft/src/weights.rs index 89060d3e9..675de3266 100644 --- a/pallet/sft/src/weights.rs +++ b/pallet/sft/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_sft //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -77,7 +77,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::SftCollectionInfo` (r:0 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(33_000_000 as u64) + Weight::from_all(104_214_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -86,7 +86,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::TokenInfo` (r:0 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn create_token() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(58_114_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -95,7 +95,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::PublicMintInfo` (r:1 w:1) // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(50_288_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -104,7 +104,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::PublicMintInfo` (r:1 w:1) // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(50_880_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -115,7 +115,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(64_377_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,23 +123,23 @@ impl WeightInfo for SubstrateWeight { // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_all(11_682_285 as u64) - // Standard Error: 7_445 - .saturating_add(Weight::from_all(4_632_773 as u64).saturating_mul(p as u64)) + Weight::from_all(42_747_795 as u64) + // Standard Error: 14_355 + .saturating_add(Weight::from_all(11_017_323 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(17_000_000 as u64) + Weight::from_all(56_043_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_430_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -148,28 +148,28 @@ impl WeightInfo for SubstrateWeight { // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(52_239_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(45_449_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(45_085_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(45_628_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -190,7 +190,7 @@ impl WeightInfo for () { // Storage: `Sft::SftCollectionInfo` (r:0 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn create_collection() -> Weight { - Weight::from_all(33_000_000 as u64) + Weight::from_all(104_214_000 as u64) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -199,7 +199,7 @@ impl WeightInfo for () { // Storage: `Sft::TokenInfo` (r:0 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn create_token() -> Weight { - Weight::from_all(18_000_000 as u64) + Weight::from_all(58_114_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -208,7 +208,7 @@ impl WeightInfo for () { // Storage: `Sft::PublicMintInfo` (r:1 w:1) // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn toggle_public_mint() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(50_288_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -217,7 +217,7 @@ impl WeightInfo for () { // Storage: `Sft::PublicMintInfo` (r:1 w:1) // Proof: `Sft::PublicMintInfo` (`max_values`: None, `max_size`: Some(38), added: 2513, mode: `MaxEncodedLen`) fn set_mint_fee() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(50_880_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -228,7 +228,7 @@ impl WeightInfo for () { // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(64_377_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -236,23 +236,23 @@ impl WeightInfo for () { // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 50]`. fn transfer(p: u32, ) -> Weight { - Weight::from_all(11_682_285 as u64) - // Standard Error: 7_445 - .saturating_add(Weight::from_all(4_632_773 as u64).saturating_mul(p as u64)) + Weight::from_all(42_747_795 as u64) + // Standard Error: 14_355 + .saturating_add(Weight::from_all(11_017_323 as u64).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(17_000_000 as u64) + Weight::from_all(56_043_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_owner() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(49_430_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -261,28 +261,28 @@ impl WeightInfo for () { // Storage: `Sft::TokenInfo` (r:1 w:1) // Proof: `Sft::TokenInfo` (`max_values`: None, `max_size`: Some(52000104), added: 52002579, mode: `MaxEncodedLen`) fn set_max_issuance() -> Weight { - Weight::from_all(16_000_000 as u64) + Weight::from_all(52_239_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_base_uri() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(45_449_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_name() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(45_085_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Sft::SftCollectionInfo` (r:1 w:1) // Proof: `Sft::SftCollectionInfo` (`max_values`: None, `max_size`: Some(484), added: 2959, mode: `MaxEncodedLen`) fn set_royalties_schedule() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(45_628_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/token-approvals/src/weights.rs b/pallet/token-approvals/src/weights.rs index 893fedd89..ebe8c960e 100644 --- a/pallet/token-approvals/src/weights.rs +++ b/pallet/token-approvals/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_token_approvals //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn erc721_approval() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(41_438_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -74,33 +74,33 @@ impl WeightInfo for SubstrateWeight { // Storage: `Nft::CollectionInfo` (r:1 w:0) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn erc721_remove_approval() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(41_414_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC20Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_approval() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(16_098_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC20Approvals` (r:1 w:1) // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_update_approval() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_365_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:0 w:1) // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc721_approval_for_all() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(15_913_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC1155ApprovalsForAll` (r:0 w:1) // Proof: `TokenApprovals::ERC1155ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc1155_approval_for_all() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(16_232_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -114,7 +114,7 @@ impl WeightInfo for () { // Storage: `TokenApprovals::ERC721Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC721Approvals` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn erc721_approval() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(41_438_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -123,33 +123,33 @@ impl WeightInfo for () { // Storage: `Nft::CollectionInfo` (r:1 w:0) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn erc721_remove_approval() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(41_414_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC20Approvals` (r:0 w:1) // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_approval() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(16_098_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC20Approvals` (r:1 w:1) // Proof: `TokenApprovals::ERC20Approvals` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) fn erc20_update_approval() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_365_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC721ApprovalsForAll` (r:0 w:1) // Proof: `TokenApprovals::ERC721ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc721_approval_for_all() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(15_913_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `TokenApprovals::ERC1155ApprovalsForAll` (r:0 w:1) // Proof: `TokenApprovals::ERC1155ApprovalsForAll` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn erc1155_approval_for_all() -> Weight { - Weight::from_all(4_000_000 as u64) + Weight::from_all(16_232_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallet/vortex-distribution/src/weights.rs b/pallet/vortex-distribution/src/weights.rs index 149e3a059..9886bb711 100644 --- a/pallet/vortex-distribution/src/weights.rs +++ b/pallet/vortex-distribution/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_vortex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,14 +66,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_594_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(43_855_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -84,23 +84,23 @@ impl WeightInfo for SubstrateWeight { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(88_674_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(30_464_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(24_697_645 as u64) - // Standard Error: 5_503 - .saturating_add(Weight::from_all(1_774_291 as u64).saturating_mul(b as u64)) + Weight::from_all(8_664_027 as u64) + // Standard Error: 7_156 + .saturating_add(Weight::from_all(3_862_841 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -110,7 +110,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(48_739_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -125,7 +125,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(126_000_000 as u64) + Weight::from_all(322_213_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -138,7 +138,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(53_000_000 as u64) + Weight::from_all(146_962_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(82_000_000 as u64) + Weight::from_all(224_448_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -170,14 +170,14 @@ impl WeightInfo for () { // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_594_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(43_855_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -188,23 +188,23 @@ impl WeightInfo for () { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(88_674_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(30_464_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(24_697_645 as u64) - // Standard Error: 5_503 - .saturating_add(Weight::from_all(1_774_291 as u64).saturating_mul(b as u64)) + Weight::from_all(8_664_027 as u64) + // Standard Error: 7_156 + .saturating_add(Weight::from_all(3_862_841 as u64).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -214,7 +214,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(48_739_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -229,7 +229,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(126_000_000 as u64) + Weight::from_all(322_213_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -242,7 +242,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(53_000_000 as u64) + Weight::from_all(146_962_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -261,7 +261,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(82_000_000 as u64) + Weight::from_all(224_448_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } diff --git a/pallet/xls20/src/weights.rs b/pallet/xls20/src/weights.rs index 44a81f499..a94994435 100644 --- a/pallet/xls20/src/weights.rs +++ b/pallet/xls20/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_xls20 //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -60,19 +60,19 @@ impl WeightInfo for SubstrateWeight { // Storage: `Xls20::Relayer` (r:0 w:1) // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_relayer() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_214_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Xls20::Xls20MintFee` (r:0 w:1) // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_xls20_fee() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_606_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn enable_xls20_compatibility() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_893_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -83,7 +83,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Xls20::Xls20MintFee` (r:1 w:0) // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn re_request_xls20_mint() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(59_488_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: `Xls20::Relayer` (r:1 w:0) @@ -93,7 +93,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `Xls20::Xls20TokenMap` (r:1 w:1) // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn fulfill_xls20_mint() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(62_598_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -104,19 +104,19 @@ impl WeightInfo for () { // Storage: `Xls20::Relayer` (r:0 w:1) // Proof: `Xls20::Relayer` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_relayer() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_214_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Xls20::Xls20MintFee` (r:0 w:1) // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_xls20_fee() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(23_606_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `Nft::CollectionInfo` (r:1 w:1) // Proof: `Nft::CollectionInfo` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`) fn enable_xls20_compatibility() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_893_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -127,7 +127,7 @@ impl WeightInfo for () { // Storage: `Xls20::Xls20MintFee` (r:1 w:0) // Proof: `Xls20::Xls20MintFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn re_request_xls20_mint() -> Weight { - Weight::from_all(19_000_000 as u64) + Weight::from_all(59_488_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) } // Storage: `Xls20::Relayer` (r:1 w:0) @@ -137,7 +137,7 @@ impl WeightInfo for () { // Storage: `Xls20::Xls20TokenMap` (r:1 w:1) // Proof: `Xls20::Xls20TokenMap` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn fulfill_xls20_mint() -> Weight { - Weight::from_all(21_000_000 as u64) + Weight::from_all(62_598_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } diff --git a/pallet/xrpl-bridge/src/weights.rs b/pallet/xrpl-bridge/src/weights.rs index 29ae0ea50..6c3ce9fbe 100644 --- a/pallet/xrpl-bridge/src/weights.rs +++ b/pallet/xrpl-bridge/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_xrpl_bridge //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,20 +76,20 @@ impl WeightInfo for SubstrateWeight { // Storage: `XRPLBridge::ProcessXRPTransaction` (r:1 w:1) // Proof: `XRPLBridge::ProcessXRPTransaction` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) fn submit_transaction() -> Weight { - Weight::from_all(24_000_000 as u64) + Weight::from_all(69_647_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: `XRPLBridge::ChallengeXRPTransactionList` (r:0 w:1) // Proof: `XRPLBridge::ChallengeXRPTransactionList` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`) fn submit_challenge() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(16_397_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::PaymentDelay` (r:0 w:1) // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_055_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorTxFee` (r:1 w:0) @@ -119,39 +119,39 @@ impl WeightInfo for SubstrateWeight { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(72_000_000 as u64) + Weight::from_all(184_329_000 as u64) .saturating_add(T::DbWeight::get().reads(12 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: `XRPLBridge::Relayer` (r:0 w:1) // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn add_relayer() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_183_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::Relayer` (r:1 w:1) // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn remove_relayer() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(46_067_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorTxFee` (r:0 w:1) // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_door_tx_fee() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(10_429_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::SourceTag` (r:0 w:1) // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_xrp_source_tag() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(10_693_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorAddress` (r:0 w:1) // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_door_address() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(29_356_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::Relayer` (r:1 w:0) @@ -163,7 +163,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:0 w:1) // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(43_697_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -174,7 +174,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(37_811_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -190,9 +190,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(6_000_000 as u64) - // Standard Error: 5_923 - .saturating_add(Weight::from_all(5_519_790 as u64).saturating_mul(i as u64)) + Weight::from_all(25_270_525 as u64) + // Standard Error: 15_739 + .saturating_add(Weight::from_all(11_921_153 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -207,9 +207,9 @@ impl WeightInfo for SubstrateWeight { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(15_464_656 as u64) - // Standard Error: 5_392 - .saturating_add(Weight::from_all(1_225_960 as u64).saturating_mul(i as u64)) + Weight::from_all(46_613_345 as u64) + // Standard Error: 15_226 + .saturating_add(Weight::from_all(2_744_513 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) @@ -229,20 +229,20 @@ impl WeightInfo for () { // Storage: `XRPLBridge::ProcessXRPTransaction` (r:1 w:1) // Proof: `XRPLBridge::ProcessXRPTransaction` (`max_values`: None, `max_size`: Some(64000016), added: 64002491, mode: `MaxEncodedLen`) fn submit_transaction() -> Weight { - Weight::from_all(24_000_000 as u64) + Weight::from_all(69_647_000 as u64) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: `XRPLBridge::ChallengeXRPTransactionList` (r:0 w:1) // Proof: `XRPLBridge::ChallengeXRPTransactionList` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`) fn submit_challenge() -> Weight { - Weight::from_all(5_000_000 as u64) + Weight::from_all(16_397_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::PaymentDelay` (r:0 w:1) // Proof: `XRPLBridge::PaymentDelay` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_payment_delay() -> Weight { - Weight::from_all(7_000_000 as u64) + Weight::from_all(24_055_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorTxFee` (r:1 w:0) @@ -272,39 +272,39 @@ impl WeightInfo for () { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn withdraw_xrp() -> Weight { - Weight::from_all(72_000_000 as u64) + Weight::from_all(184_329_000 as u64) .saturating_add(RocksDbWeight::get().reads(12 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: `XRPLBridge::Relayer` (r:0 w:1) // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn add_relayer() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(31_183_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::Relayer` (r:1 w:1) // Proof: `XRPLBridge::Relayer` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) fn remove_relayer() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(46_067_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorTxFee` (r:0 w:1) // Proof: `XRPLBridge::DoorTxFee` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_door_tx_fee() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(10_429_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::SourceTag` (r:0 w:1) // Proof: `XRPLBridge::SourceTag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_xrp_source_tag() -> Weight { - Weight::from_all(3_000_000 as u64) + Weight::from_all(10_693_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::DoorAddress` (r:0 w:1) // Proof: `XRPLBridge::DoorAddress` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_door_address() -> Weight { - Weight::from_all(9_000_000 as u64) + Weight::from_all(29_356_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `XRPLBridge::Relayer` (r:1 w:0) @@ -316,7 +316,7 @@ impl WeightInfo for () { // Storage: `XRPLBridge::DoorTicketSequenceParamsNext` (r:0 w:1) // Proof: `XRPLBridge::DoorTicketSequenceParamsNext` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set_ticket_sequence_next_allocation() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(43_697_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -327,7 +327,7 @@ impl WeightInfo for () { // Storage: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (r:0 w:1) // Proof: `XRPLBridge::TicketSequenceThresholdReachedEmitted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_ticket_sequence_current_allocation() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(37_811_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -343,9 +343,9 @@ impl WeightInfo for () { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 256]`. fn reset_settled_xrpl_tx_data(i: u32, ) -> Weight { - Weight::from_all(6_000_000 as u64) - // Standard Error: 5_923 - .saturating_add(Weight::from_all(5_519_790 as u64).saturating_mul(i as u64)) + Weight::from_all(25_270_525 as u64) + // Standard Error: 15_739 + .saturating_add(Weight::from_all(11_921_153 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes(3 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(i as u64))) @@ -360,9 +360,9 @@ impl WeightInfo for () { // Proof: `XRPLBridge::ProcessXRPTransactionDetails` (`max_values`: None, `max_size`: Some(233), added: 2708, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 10]`. fn prune_settled_ledger_index(i: u32, ) -> Weight { - Weight::from_all(15_464_656 as u64) - // Standard Error: 5_392 - .saturating_add(Weight::from_all(1_225_960 as u64).saturating_mul(i as u64)) + Weight::from_all(46_613_345 as u64) + // Standard Error: 15_226 + .saturating_add(Weight::from_all(2_744_513 as u64).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) diff --git a/pallet/xrpl/src/weights.rs b/pallet/xrpl/src/weights.rs index b65c7784c..baac0fa5a 100644 --- a/pallet/xrpl/src/weights.rs +++ b/pallet/xrpl/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_xrpl //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,7 +58,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(83_000_000 as u64) + Weight::from_all(220_300_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) } } @@ -70,7 +70,8 @@ impl WeightInfo for () { // Storage: `MaintenanceMode::BlockedPallets` (r:1 w:0) // Proof: `MaintenanceMode::BlockedPallets` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) fn transact() -> Weight { - Weight::from_all(83_000_000 as u64) + Weight::from_all(220_300_000 as u64) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } } + diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index cd4e31b1f..55799dd3f 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -37,22 +37,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(7_900_549, 0) + // Minimum execution time: 7_743_000 picoseconds. + Weight::from_parts(9_012_999, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(204, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(624, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_762_000 picoseconds. + Weight::from_parts(19_820_430, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_201, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_856, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -62,8 +62,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 15_476_000 picoseconds. + Weight::from_parts(16_541_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -76,8 +76,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 76_309_000_000 picoseconds. - Weight::from_parts(78_029_000_000, 0) + // Minimum execution time: 175_126_470_000 picoseconds. + Weight::from_parts(175_875_426_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -89,11 +89,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 7_395_000 picoseconds. + Weight::from_parts(7_689_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 952 - .saturating_add(Weight::from_parts(819_941, 0).saturating_mul(i.into())) + // Standard Error: 2_789 + .saturating_add(Weight::from_parts(1_835_911, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -103,11 +103,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 7_522_000 picoseconds. + Weight::from_parts(7_952_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 988 - .saturating_add(Weight::from_parts(603_134, 0).saturating_mul(i.into())) + // Standard Error: 2_210 + .saturating_add(Weight::from_parts(1_315_094, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -117,11 +117,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `113 + p * (69 ±0)` // Estimated: `113 + p * (70 ±0)` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 14_057_000 picoseconds. + Weight::from_parts(14_192_000, 0) .saturating_add(Weight::from_parts(0, 113)) - // Standard Error: 1_663 - .saturating_add(Weight::from_parts(1_111_573, 0).saturating_mul(p.into())) + // Standard Error: 1_991 + .saturating_add(Weight::from_parts(2_311_675, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) diff --git a/runtime/src/weights/pallet_assets_ext.rs b/runtime/src/weights/pallet_assets_ext.rs index 6c4796249..bdc0b5d89 100644 --- a/runtime/src/weights/pallet_assets_ext.rs +++ b/runtime/src/weights/pallet_assets_ext.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_assets_ext` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +52,8 @@ impl pallet_assets_ext::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `549` // Estimated: `4014` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 149_007_000 picoseconds. + Weight::from_parts(150_944_000, 0) .saturating_add(Weight::from_parts(0, 4014)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -64,8 +64,8 @@ impl pallet_assets_ext::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 24_017_000 picoseconds. + Weight::from_parts(24_326_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_bags_list.rs b/runtime/src/weights/pallet_bags_list.rs index 7ee6a4a37..7069bba8d 100644 --- a/runtime/src/weights/pallet_bags_list.rs +++ b/runtime/src/weights/pallet_bags_list.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -44,8 +44,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1362` // Estimated: `11314` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 147_197_000 picoseconds. + Weight::from_parts(149_344_000, 0) .saturating_add(Weight::from_parts(0, 11314)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -62,8 +62,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1280` // Estimated: `8733` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 144_263_000 picoseconds. + Weight::from_parts(145_130_000, 0) .saturating_add(Weight::from_parts(0, 8733)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -82,8 +82,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1492` // Estimated: `11314` - // Minimum execution time: 62_000_000 picoseconds. - Weight::from_parts(64_000_000, 0) + // Minimum execution time: 161_835_000 picoseconds. + Weight::from_parts(164_002_000, 0) .saturating_add(Weight::from_parts(0, 11314)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(6)) diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index 80fd6bf5a..5df4e8529 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `3581` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(56_000_000, 0) + // Minimum execution time: 134_975_000 picoseconds. + Weight::from_parts(136_548_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +50,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `3581` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 114_831_000 picoseconds. + Weight::from_parts(116_439_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -62,8 +62,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `3581` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 47_188_000 picoseconds. + Weight::from_parts(47_874_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -74,8 +74,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `3581` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 66_996_000 picoseconds. + Weight::from_parts(68_510_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -86,8 +86,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `168` // Estimated: `6172` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 140_720_000 picoseconds. + Weight::from_parts(141_833_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -98,8 +98,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `40` // Estimated: `3581` - // Minimum execution time: 58_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 141_286_000 picoseconds. + Weight::from_parts(143_340_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -110,8 +110,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `3581` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 54_457_000 picoseconds. + Weight::from_parts(55_702_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,11 +123,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (124 ±0)` // Estimated: `990 + u * (2591 ±0)` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 50_051_000 picoseconds. + Weight::from_parts(50_647_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 10_877 - .saturating_add(Weight::from_parts(15_513_112, 0).saturating_mul(u.into())) + // Standard Error: 20_753 + .saturating_add(Weight::from_parts(34_181_776, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) diff --git a/runtime/src/weights/pallet_crowdsale.rs b/runtime/src/weights/pallet_crowdsale.rs index 0c7b15e18..f438661fd 100644 --- a/runtime/src/weights/pallet_crowdsale.rs +++ b/runtime/src/weights/pallet_crowdsale.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_crowdsale` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1420` // Estimated: `6264` - // Minimum execution time: 104_000_000 picoseconds. - Weight::from_parts(105_000_000, 0) + // Minimum execution time: 286_688_000 picoseconds. + Weight::from_parts(288_630_000, 0) .saturating_add(Weight::from_parts(0, 6264)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) @@ -74,8 +74,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3598` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 58_817_000 picoseconds. + Weight::from_parts(60_031_000, 0) .saturating_add(Weight::from_parts(0, 3598)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -94,8 +94,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1042` // Estimated: `6172` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(71_000_000, 0) + // Minimum execution time: 176_128_000 picoseconds. + Weight::from_parts(177_706_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) @@ -120,8 +120,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1387` // Estimated: `17487` - // Minimum execution time: 97_000_000 picoseconds. - Weight::from_parts(98_000_000, 0) + // Minimum execution time: 259_430_000 picoseconds. + Weight::from_parts(261_562_000, 0) .saturating_add(Weight::from_parts(0, 17487)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(9)) @@ -144,8 +144,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1387` // Estimated: `17487` - // Minimum execution time: 96_000_000 picoseconds. - Weight::from_parts(97_000_000, 0) + // Minimum execution time: 253_749_000 picoseconds. + Weight::from_parts(256_196_000, 0) .saturating_add(Weight::from_parts(0, 17487)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) @@ -166,8 +166,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1172` // Estimated: `3627` - // Minimum execution time: 71_000_000 picoseconds. - Weight::from_parts(71_000_000, 0) + // Minimum execution time: 187_578_000 picoseconds. + Weight::from_parts(189_375_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -182,8 +182,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `324` // Estimated: `3598` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 78_314_000 picoseconds. + Weight::from_parts(79_096_000, 0) .saturating_add(Weight::from_parts(0, 3598)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -195,8 +195,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `248` // Estimated: `17487` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 52_935_000 picoseconds. + Weight::from_parts(53_443_000, 0) .saturating_add(Weight::from_parts(0, 17487)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -220,11 +220,11 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `499 + p * (884 ±0)` // Estimated: `17487 + p * (10340 ±0)` - // Minimum execution time: 101_000_000 picoseconds. - Weight::from_parts(12_967_523, 0) + // Minimum execution time: 259_583_000 picoseconds. + Weight::from_parts(60_135_422, 0) .saturating_add(Weight::from_parts(0, 17487)) - // Standard Error: 101_547 - .saturating_add(Weight::from_parts(89_002_570, 0).saturating_mul(p.into())) + // Standard Error: 262_230 + .saturating_add(Weight::from_parts(203_977_429, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -237,8 +237,8 @@ impl pallet_crowdsale::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3518` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 9_101_000 picoseconds. + Weight::from_parts(9_267_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/src/weights/pallet_dex.rs b/runtime/src/weights/pallet_dex.rs index d8fd8b100..294920f0e 100644 --- a/runtime/src/weights/pallet_dex.rs +++ b/runtime/src/weights/pallet_dex.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_dex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -50,8 +50,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1206` // Estimated: `11330` - // Minimum execution time: 113_000_000 picoseconds. - Weight::from_parts(116_000_000, 0) + // Minimum execution time: 288_233_000 picoseconds. + Weight::from_parts(290_091_000, 0) .saturating_add(Weight::from_parts(0, 11330)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(8)) @@ -74,8 +74,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1416` // Estimated: `11330` - // Minimum execution time: 119_000_000 picoseconds. - Weight::from_parts(122_000_000, 0) + // Minimum execution time: 301_224_000 picoseconds. + Weight::from_parts(303_830_000, 0) .saturating_add(Weight::from_parts(0, 11330)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -110,8 +110,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1512` // Estimated: `16500` - // Minimum execution time: 203_000_000 picoseconds. - Weight::from_parts(206_000_000, 0) + // Minimum execution time: 520_828_000 picoseconds. + Weight::from_parts(523_136_000, 0) .saturating_add(Weight::from_parts(0, 16500)) .saturating_add(T::DbWeight::get().reads(23)) .saturating_add(T::DbWeight::get().writes(21)) @@ -134,8 +134,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1657` // Estimated: `16500` - // Minimum execution time: 179_000_000 picoseconds. - Weight::from_parts(182_000_000, 0) + // Minimum execution time: 429_859_000 picoseconds. + Weight::from_parts(432_198_000, 0) .saturating_add(Weight::from_parts(0, 16500)) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(12)) @@ -148,8 +148,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `293` // Estimated: `3486` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 56_259_000 picoseconds. + Weight::from_parts(57_301_000, 0) .saturating_add(Weight::from_parts(0, 3486)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -162,8 +162,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `293` // Estimated: `3486` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 56_783_000 picoseconds. + Weight::from_parts(57_560_000, 0) .saturating_add(Weight::from_parts(0, 3486)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -174,8 +174,8 @@ impl pallet_dex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 28_775_000 picoseconds. + Weight::from_parts(30_453_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_doughnut.rs b/runtime/src/weights/pallet_doughnut.rs index 454cb1ffa..c93b9d863 100644 --- a/runtime/src/weights/pallet_doughnut.rs +++ b/runtime/src/weights/pallet_doughnut.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_doughnut` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -46,8 +46,8 @@ impl pallet_doughnut::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `135` // Estimated: `3576` - // Minimum execution time: 215_000_000 picoseconds. - Weight::from_parts(216_000_000, 0) + // Minimum execution time: 507_648_000 picoseconds. + Weight::from_parts(508_712_000, 0) .saturating_add(Weight::from_parts(0, 3576)) .saturating_add(T::DbWeight::get().reads(5)) } @@ -57,8 +57,8 @@ impl pallet_doughnut::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 53_878_000 picoseconds. + Weight::from_parts(54_712_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -68,8 +68,8 @@ impl pallet_doughnut::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 27_177_000 picoseconds. + Weight::from_parts(27_871_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,8 +79,8 @@ impl pallet_doughnut::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 25_500_000 picoseconds. + Weight::from_parts(26_069_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_echo.rs b/runtime/src/weights/pallet_echo.rs index 07d84f34b..1a6a84fad 100644 --- a/runtime/src/weights/pallet_echo.rs +++ b/runtime/src/weights/pallet_echo.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_echo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -48,8 +48,8 @@ impl pallet_echo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `334` // Estimated: `1819` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 83_079_000 picoseconds. + Weight::from_parts(84_954_000, 0) .saturating_add(Weight::from_parts(0, 1819)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/src/weights/pallet_erc20_peg.rs b/runtime/src/weights/pallet_erc20_peg.rs index 2010f69c1..330272a64 100644 --- a/runtime/src/weights/pallet_erc20_peg.rs +++ b/runtime/src/weights/pallet_erc20_peg.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_erc20_peg` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 24_386_000 picoseconds. + Weight::from_parts(24_865_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -49,8 +49,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 24_143_000 picoseconds. + Weight::from_parts(24_514_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -60,8 +60,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_925_000 picoseconds. + Weight::from_parts(24_417_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,8 +71,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_780_000 picoseconds. + Weight::from_parts(24_279_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `780` // Estimated: `3627` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(67_000_000, 0) + // Minimum execution time: 189_977_000 picoseconds. + Weight::from_parts(192_539_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(4)) @@ -116,8 +116,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_642_000 picoseconds. + Weight::from_parts(27_106_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -127,8 +127,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 26_496_000 picoseconds. + Weight::from_parts(26_942_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,8 +140,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 15_935_000 picoseconds. + Weight::from_parts(16_373_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -151,8 +151,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 14_856_000 picoseconds. + Weight::from_parts(15_360_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -162,8 +162,8 @@ impl pallet_erc20_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_965_000 picoseconds. + Weight::from_parts(27_520_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_ethy.rs b/runtime/src/weights/pallet_ethy.rs index 0a915ec5c..b69169403 100644 --- a/runtime/src/weights/pallet_ethy.rs +++ b/runtime/src/weights/pallet_ethy.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_ethy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jasons-Ubuntu`, CPU: `AMD Ryzen 9 7950X 16-Core Processor` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -43,11 +43,11 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `199` // Estimated: `3664` - // Minimum execution time: 14_848_000 picoseconds. - Weight::from_parts(13_767_852, 0) + // Minimum execution time: 54_670_000 picoseconds. + Weight::from_parts(53_247_366, 0) .saturating_add(Weight::from_parts(0, 3664)) - // Standard Error: 18_255 - .saturating_add(Weight::from_parts(1_377_756, 0).saturating_mul(p.into())) + // Standard Error: 5_157 + .saturating_add(Weight::from_parts(3_259_175, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -60,8 +60,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `214` // Estimated: `3679` - // Minimum execution time: 11_121_000 picoseconds. - Weight::from_parts(11_472_000, 0) + // Minimum execution time: 42_773_000 picoseconds. + Weight::from_parts(43_493_000, 0) .saturating_add(Weight::from_parts(0, 3679)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -80,8 +80,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1180` // Estimated: `6172` - // Minimum execution time: 66_926_000 picoseconds. - Weight::from_parts(68_139_000, 0) + // Minimum execution time: 202_524_000 picoseconds. + Weight::from_parts(204_318_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) @@ -102,8 +102,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1345` // Estimated: `6172` - // Minimum execution time: 70_073_000 picoseconds. - Weight::from_parts(71_315_000, 0) + // Minimum execution time: 210_305_000 picoseconds. + Weight::from_parts(211_339_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -114,8 +114,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_062_000 picoseconds. - Weight::from_parts(6_252_000, 0) + // Minimum execution time: 24_179_000 picoseconds. + Weight::from_parts(24_679_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -125,8 +125,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_791_000 picoseconds. - Weight::from_parts(6_141_000, 0) + // Minimum execution time: 24_214_000 picoseconds. + Weight::from_parts(24_837_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,8 +136,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_852_000 picoseconds. - Weight::from_parts(6_181_000, 0) + // Minimum execution time: 24_482_000 picoseconds. + Weight::from_parts(24_950_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -147,8 +147,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_563_000 picoseconds. - Weight::from_parts(6_832_000, 0) + // Minimum execution time: 26_058_000 picoseconds. + Weight::from_parts(26_655_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -158,8 +158,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `146` // Estimated: `1631` - // Minimum execution time: 8_306_000 picoseconds. - Weight::from_parts(8_586_000, 0) + // Minimum execution time: 31_487_000 picoseconds. + Weight::from_parts(32_197_000, 0) .saturating_add(Weight::from_parts(0, 1631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -182,8 +182,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `195` // Estimated: `3660` - // Minimum execution time: 14_438_000 picoseconds. - Weight::from_parts(14_879_000, 0) + // Minimum execution time: 51_896_000 picoseconds. + Weight::from_parts(52_595_000, 0) .saturating_add(Weight::from_parts(0, 3660)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) @@ -194,8 +194,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `220` // Estimated: `1705` - // Minimum execution time: 10_459_000 picoseconds. - Weight::from_parts(10_710_000, 0) + // Minimum execution time: 39_928_000 picoseconds. + Weight::from_parts(40_616_000, 0) .saturating_add(Weight::from_parts(0, 1705)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -216,8 +216,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `217` // Estimated: `3682` - // Minimum execution time: 22_152_000 picoseconds. - Weight::from_parts(22_583_000, 0) + // Minimum execution time: 77_765_000 picoseconds. + Weight::from_parts(79_103_000, 0) .saturating_add(Weight::from_parts(0, 3682)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -238,8 +238,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `3651` - // Minimum execution time: 19_457_000 picoseconds. - Weight::from_parts(19_958_000, 0) + // Minimum execution time: 68_873_000 picoseconds. + Weight::from_parts(69_919_000, 0) .saturating_add(Weight::from_parts(0, 3651)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -264,8 +264,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1314` // Estimated: `6172` - // Minimum execution time: 75_583_000 picoseconds. - Weight::from_parts(76_645_000, 0) + // Minimum execution time: 227_212_000 picoseconds. + Weight::from_parts(229_787_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(9)) @@ -298,8 +298,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1689` // Estimated: `7629` - // Minimum execution time: 104_207_000 picoseconds. - Weight::from_parts(106_491_000, 0) + // Minimum execution time: 307_486_000 picoseconds. + Weight::from_parts(311_091_000, 0) .saturating_add(Weight::from_parts(0, 7629)) .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().writes(9)) @@ -334,8 +334,8 @@ impl pallet_ethy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `481` // Estimated: `3946` - // Minimum execution time: 41_689_000 picoseconds. - Weight::from_parts(42_971_000, 0) + // Minimum execution time: 177_635_000 picoseconds. + Weight::from_parts(179_548_000, 0) .saturating_add(Weight::from_parts(0, 3946)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(6)) diff --git a/runtime/src/weights/pallet_evm_chain_id.rs b/runtime/src/weights/pallet_evm_chain_id.rs index 0020ae7c1..9e9369432 100644 --- a/runtime/src/weights/pallet_evm_chain_id.rs +++ b/runtime/src/weights/pallet_evm_chain_id.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_evm_chain_id` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_evm_chain_id::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_405_000 picoseconds. + Weight::from_parts(23_935_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_fee_control.rs b/runtime/src/weights/pallet_fee_control.rs index a16f71e38..cd6bb706c 100644 --- a/runtime/src/weights/pallet_fee_control.rs +++ b/runtime/src/weights/pallet_fee_control.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_fee_control` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_fee_control::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `1537` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 32_215_000 picoseconds. + Weight::from_parts(32_951_000, 0) .saturating_add(Weight::from_parts(0, 1537)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +50,8 @@ impl pallet_fee_control::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `1537` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 29_818_000 picoseconds. + Weight::from_parts(30_925_000, 0) .saturating_add(Weight::from_parts(0, 1537)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -62,8 +62,8 @@ impl pallet_fee_control::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `1537` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 29_867_000 picoseconds. + Weight::from_parts(30_559_000, 0) .saturating_add(Weight::from_parts(0, 1537)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_futurepass.rs b/runtime/src/weights/pallet_futurepass.rs index 85e78635e..b21a605af 100644 --- a/runtime/src/weights/pallet_futurepass.rs +++ b/runtime/src/weights/pallet_futurepass.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_futurepass` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -44,8 +44,8 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `218` // Estimated: `4310` - // Minimum execution time: 79_000_000 picoseconds. - Weight::from_parts(80_000_000, 0) + // Minimum execution time: 197_619_000 picoseconds. + Weight::from_parts(199_889_000, 0) .saturating_add(Weight::from_parts(0, 4310)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -61,11 +61,11 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `654 + p * (25 ±0)` // Estimated: `6172` - // Minimum execution time: 114_000_000 picoseconds. - Weight::from_parts(116_899_088, 0) + // Minimum execution time: 271_992_000 picoseconds. + Weight::from_parts(275_879_338, 0) .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 9_329 - .saturating_add(Weight::from_parts(142_713, 0).saturating_mul(p.into())) + // Standard Error: 13_070 + .saturating_add(Weight::from_parts(204_040, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -80,11 +80,11 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `679 + p * (25 ±0)` // Estimated: `6172` - // Minimum execution time: 77_000_000 picoseconds. - Weight::from_parts(81_226_068, 0) + // Minimum execution time: 194_198_000 picoseconds. + Weight::from_parts(196_498_171, 0) .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 14_968 - .saturating_add(Weight::from_parts(148_449, 0).saturating_mul(p.into())) + // Standard Error: 4_891 + .saturating_add(Weight::from_parts(246_407, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -99,11 +99,11 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `654 + p * (25 ±0)` // Estimated: `6172` - // Minimum execution time: 131_000_000 picoseconds. - Weight::from_parts(72_399_085, 0) + // Minimum execution time: 310_618_000 picoseconds. + Weight::from_parts(198_696_974, 0) .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 101_767 - .saturating_add(Weight::from_parts(54_812_430, 0).saturating_mul(p.into())) + // Standard Error: 49_483 + .saturating_add(Weight::from_parts(110_453_968, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -118,11 +118,11 @@ impl pallet_futurepass::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `225 + p * (25 ±0)` // Estimated: `6162` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(22_975_706, 0) + // Minimum execution time: 86_883_000 picoseconds. + Weight::from_parts(89_745_082, 0) .saturating_add(Weight::from_parts(0, 6162)) - // Standard Error: 117_370 - .saturating_add(Weight::from_parts(718_446, 0).saturating_mul(p.into())) + // Standard Error: 3_871 + .saturating_add(Weight::from_parts(88_952, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) } } diff --git a/runtime/src/weights/pallet_maintenance_mode.rs b/runtime/src/weights/pallet_maintenance_mode.rs index 18e61e7b5..9809dde4b 100644 --- a/runtime/src/weights/pallet_maintenance_mode.rs +++ b/runtime/src/weights/pallet_maintenance_mode.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_maintenance_mode` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_maintenance_mode::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_312_000 picoseconds. + Weight::from_parts(23_872_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -49,8 +49,8 @@ impl pallet_maintenance_mode::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 25_956_000 picoseconds. + Weight::from_parts(26_554_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -60,8 +60,8 @@ impl pallet_maintenance_mode::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_972_000 picoseconds. + Weight::from_parts(27_509_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,8 +71,8 @@ impl pallet_maintenance_mode::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 28_867_000 picoseconds. + Weight::from_parts(29_646_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -82,8 +82,8 @@ impl pallet_maintenance_mode::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 27_612_000 picoseconds. + Weight::from_parts(28_335_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_marketplace.rs b/runtime/src/weights/pallet_marketplace.rs index 4e922d655..b0bfac18c 100644 --- a/runtime/src/weights/pallet_marketplace.rs +++ b/runtime/src/weights/pallet_marketplace.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_marketplace` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -40,8 +40,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `134` // Estimated: `1489` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 46_375_000 picoseconds. + Weight::from_parts(47_430_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -65,11 +65,11 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4431` // Estimated: `3464 + p * (2508 ±0)` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(33_860_816, 0) + // Minimum execution time: 105_677_000 picoseconds. + Weight::from_parts(96_602_060, 0) .saturating_add(Weight::from_parts(0, 3464)) - // Standard Error: 67_261 - .saturating_add(Weight::from_parts(5_738_948, 0).saturating_mul(p.into())) + // Standard Error: 30_594 + .saturating_add(Weight::from_parts(14_222_955, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -95,11 +95,11 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `335 + p * (105 ±0)` // Estimated: `3949 + p * (52002579 ±0)` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(28_088_734, 0) + // Minimum execution time: 93_629_000 picoseconds. + Weight::from_parts(87_884_460, 0) .saturating_add(Weight::from_parts(0, 3949)) - // Standard Error: 10_590 - .saturating_add(Weight::from_parts(4_649_147, 0).saturating_mul(p.into())) + // Standard Error: 17_185 + .saturating_add(Weight::from_parts(10_296_683, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -126,8 +126,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `5052` // Estimated: `23760` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 161_297_000 picoseconds. + Weight::from_parts(162_983_000, 0) .saturating_add(Weight::from_parts(0, 23760)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) @@ -153,11 +153,11 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `583 + p * (4512 ±0)` // Estimated: `990 + p * (22770 ±0)` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(10_635_673, 0) + // Minimum execution time: 161_574_000 picoseconds. + Weight::from_parts(35_941_384, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 47_898 - .saturating_add(Weight::from_parts(45_302_679, 0).saturating_mul(p.into())) + // Standard Error: 83_205 + .saturating_add(Weight::from_parts(117_405_504, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 22770).saturating_mul(p.into())) @@ -181,11 +181,11 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4431` // Estimated: `3464 + p * (2508 ±0)` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(29_929_469, 0) + // Minimum execution time: 106_009_000 picoseconds. + Weight::from_parts(95_746_788, 0) .saturating_add(Weight::from_parts(0, 3464)) - // Standard Error: 4_376 - .saturating_add(Weight::from_parts(5_808_883, 0).saturating_mul(p.into())) + // Standard Error: 48_958 + .saturating_add(Weight::from_parts(14_286_347, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -211,11 +211,11 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `335 + p * (105 ±0)` // Estimated: `3949 + p * (52002579 ±0)` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(28_372_734, 0) + // Minimum execution time: 92_686_000 picoseconds. + Weight::from_parts(87_193_098, 0) .saturating_add(Weight::from_parts(0, 3949)) - // Standard Error: 6_143 - .saturating_add(Weight::from_parts(4_610_559, 0).saturating_mul(p.into())) + // Standard Error: 15_450 + .saturating_add(Weight::from_parts(10_352_837, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -240,8 +240,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `830` // Estimated: `23760` - // Minimum execution time: 78_000_000 picoseconds. - Weight::from_parts(79_000_000, 0) + // Minimum execution time: 205_955_000 picoseconds. + Weight::from_parts(207_630_000, 0) .saturating_add(Weight::from_parts(0, 23760)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(9)) @@ -258,8 +258,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `249` // Estimated: `23760` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 64_234_000 picoseconds. + Weight::from_parts(64_895_000, 0) .saturating_add(Weight::from_parts(0, 23760)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -270,8 +270,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `249` // Estimated: `23760` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 48_730_000 picoseconds. + Weight::from_parts(49_703_000, 0) .saturating_add(Weight::from_parts(0, 23760)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -298,8 +298,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4984` // Estimated: `6160` - // Minimum execution time: 83_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) + // Minimum execution time: 220_813_000 picoseconds. + Weight::from_parts(222_966_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) @@ -320,8 +320,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1070` // Estimated: `6160` - // Minimum execution time: 77_000_000 picoseconds. - Weight::from_parts(77_000_000, 0) + // Minimum execution time: 198_846_000 picoseconds. + Weight::from_parts(200_371_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) @@ -350,8 +350,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `5366` // Estimated: `6160` - // Minimum execution time: 122_000_000 picoseconds. - Weight::from_parts(123_000_000, 0) + // Minimum execution time: 322_218_000 picoseconds. + Weight::from_parts(324_783_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(10)) @@ -362,8 +362,8 @@ impl pallet_marketplace::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 24_408_000 picoseconds. + Weight::from_parts(25_172_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index c25643803..4aed02fc2 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -41,11 +41,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_168_932, 0) + // Minimum execution time: 44_753_000 picoseconds. + Weight::from_parts(46_083_855, 0) .saturating_add(Weight::from_parts(0, 3576)) - // Standard Error: 42 - .saturating_add(Weight::from_parts(30, 0).saturating_mul(z.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(892, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `Multisig::Multisigs` (r:1 w:1) @@ -56,13 +56,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `5587` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(32_820_873, 0) + // Minimum execution time: 101_729_000 picoseconds. + Weight::from_parts(92_150_398, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 1_694 - .saturating_add(Weight::from_parts(45_050, 0).saturating_mul(s.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_324, 0).saturating_mul(z.into())) + // Standard Error: 2_694 + .saturating_add(Weight::from_parts(107_719, 0).saturating_mul(s.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(2_167, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -74,13 +74,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `250` // Estimated: `5587` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(17_923_296, 0) + // Minimum execution time: 65_258_000 picoseconds. + Weight::from_parts(58_032_396, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 985 - .saturating_add(Weight::from_parts(37_937, 0).saturating_mul(s.into())) + // Standard Error: 1_001 + .saturating_add(Weight::from_parts(79_325, 0).saturating_mul(s.into())) // Standard Error: 9 - .saturating_add(Weight::from_parts(1_319, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_967, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -98,13 +98,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `424 + s * (20 ±0)` // Estimated: `5587` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(41_971_454, 0) + // Minimum execution time: 128_991_000 picoseconds. + Weight::from_parts(120_258_394, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 1_679 - .saturating_add(Weight::from_parts(51_797, 0).saturating_mul(s.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_274, 0).saturating_mul(z.into())) + // Standard Error: 3_166 + .saturating_add(Weight::from_parts(107_956, 0).saturating_mul(s.into())) + // Standard Error: 31 + .saturating_add(Weight::from_parts(2_108, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -115,11 +115,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `5587` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_335_346, 0) + // Minimum execution time: 88_207_000 picoseconds. + Weight::from_parts(90_629_181, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 750 - .saturating_add(Weight::from_parts(51_150, 0).saturating_mul(s.into())) + // Standard Error: 1_369 + .saturating_add(Weight::from_parts(106_706, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -130,11 +130,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `250` // Estimated: `5587` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(16_893_142, 0) + // Minimum execution time: 52_120_000 picoseconds. + Weight::from_parts(53_796_344, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 872 - .saturating_add(Weight::from_parts(40_016, 0).saturating_mul(s.into())) + // Standard Error: 895 + .saturating_add(Weight::from_parts(96_487, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -145,11 +145,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `389` // Estimated: `5587` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_144_653, 0) + // Minimum execution time: 89_056_000 picoseconds. + Weight::from_parts(91_536_555, 0) .saturating_add(Weight::from_parts(0, 5587)) - // Standard Error: 891 - .saturating_add(Weight::from_parts(47_320, 0).saturating_mul(s.into())) + // Standard Error: 1_122 + .saturating_add(Weight::from_parts(104_751, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_nft.rs b/runtime/src/weights/pallet_nft.rs index 6d0536744..4b457e786 100644 --- a/runtime/src/weights/pallet_nft.rs +++ b/runtime/src/weights/pallet_nft.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_nft` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 42_802_000 picoseconds. + Weight::from_parts(43_699_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +50,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 46_041_000 picoseconds. + Weight::from_parts(46_759_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -62,8 +62,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 45_257_000 picoseconds. + Weight::from_parts(45_847_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -74,8 +74,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 46_992_000 picoseconds. + Weight::from_parts(47_654_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -86,8 +86,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 47_106_000 picoseconds. + Weight::from_parts(47_434_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -98,8 +98,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3464` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 46_902_000 picoseconds. + Weight::from_parts(47_360_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,8 +120,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `249` // Estimated: `3714` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 94_302_000 picoseconds. + Weight::from_parts(95_667_000, 0) .saturating_add(Weight::from_parts(0, 3714)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(5)) @@ -134,8 +134,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3499` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 48_697_000 picoseconds. + Weight::from_parts(49_548_000, 0) .saturating_add(Weight::from_parts(0, 3499)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -148,8 +148,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3499` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 49_010_000 picoseconds. + Weight::from_parts(49_479_000, 0) .saturating_add(Weight::from_parts(0, 3499)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -162,8 +162,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3499` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 55_845_000 picoseconds. + Weight::from_parts(56_395_000, 0) .saturating_add(Weight::from_parts(0, 3499)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -178,8 +178,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3498` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 59_988_000 picoseconds. + Weight::from_parts(60_589_000, 0) .saturating_add(Weight::from_parts(0, 3498)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -194,8 +194,8 @@ impl pallet_nft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3498` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 57_013_000 picoseconds. + Weight::from_parts(57_942_000, 0) .saturating_add(Weight::from_parts(0, 3498)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/src/weights/pallet_nft_peg.rs b/runtime/src/weights/pallet_nft_peg.rs index de5412dff..b3d0fd67c 100644 --- a/runtime/src/weights/pallet_nft_peg.rs +++ b/runtime/src/weights/pallet_nft_peg.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_nft_peg` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_nft_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_103_000 picoseconds. + Weight::from_parts(26_923_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,8 +67,8 @@ impl pallet_nft_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `630` // Estimated: `8514` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(56_000_000, 0) + // Minimum execution time: 159_650_000 picoseconds. + Weight::from_parts(162_251_000, 0) .saturating_add(Weight::from_parts(0, 8514)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -95,8 +95,8 @@ impl pallet_nft_peg::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `634` // Estimated: `3702` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 125_814_000 picoseconds. + Weight::from_parts(127_664_000, 0) .saturating_add(Weight::from_parts(0, 3702)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/src/weights/pallet_preimage.rs b/runtime/src/weights/pallet_preimage.rs index 1436ca15c..9516b6d85 100644 --- a/runtime/src/weights/pallet_preimage.rs +++ b/runtime/src/weights/pallet_preimage.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -41,11 +41,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `308` // Estimated: `3544` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 84_697_000 picoseconds. + Weight::from_parts(51_693_233, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_456, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(2_273, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -58,11 +58,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3544` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(50_431_692, 0) + // Minimum execution time: 47_024_000 picoseconds. + Weight::from_parts(48_131_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_410, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(2_297, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -75,11 +75,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3544` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 45_161_000 picoseconds. + Weight::from_parts(45_664_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_450, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(2_184, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,8 +91,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `442` // Estimated: `3544` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(47_000_000, 0) + // Minimum execution time: 98_288_000 picoseconds. + Weight::from_parts(102_371_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -105,8 +105,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `244` // Estimated: `3544` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 56_952_000 picoseconds. + Weight::from_parts(61_810_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -117,8 +117,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `3544` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 49_607_000 picoseconds. + Weight::from_parts(52_986_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -129,8 +129,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `244` // Estimated: `3544` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 30_974_000 picoseconds. + Weight::from_parts(32_690_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -141,8 +141,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3544` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 36_853_000 picoseconds. + Weight::from_parts(37_945_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -153,8 +153,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3544` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 25_936_000 picoseconds. + Weight::from_parts(26_424_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -167,8 +167,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `244` // Estimated: `3544` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + // Minimum execution time: 53_695_000 picoseconds. + Weight::from_parts(56_510_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -179,8 +179,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3544` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 25_003_000 picoseconds. + Weight::from_parts(25_754_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -191,8 +191,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `206` // Estimated: `3544` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 25_853_000 picoseconds. + Weight::from_parts(26_277_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index a50667bd9..492cafdcf 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -43,11 +43,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `225 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_270_943, 0) + // Minimum execution time: 62_396_000 picoseconds. + Weight::from_parts(64_322_008, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 3_396 - .saturating_add(Weight::from_parts(9_604, 0).saturating_mul(p.into())) + // Standard Error: 2_627 + .saturating_add(Weight::from_parts(39_468, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -66,13 +66,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `477 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(38_803_288, 0) + // Minimum execution time: 113_785_000 picoseconds. + Weight::from_parts(112_209_894, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 8_989 - .saturating_add(Weight::from_parts(202_856, 0).saturating_mul(a.into())) - // Standard Error: 9_287 - .saturating_add(Weight::from_parts(52_578, 0).saturating_mul(p.into())) + // Standard Error: 6_876 + .saturating_add(Weight::from_parts(482_504, 0).saturating_mul(a.into())) + // Standard Error: 7_104 + .saturating_add(Weight::from_parts(78_507, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -82,17 +82,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `329 + a * (56 ±0)` // Estimated: `5302` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(23_410_006, 0) + // Minimum execution time: 64_704_000 picoseconds. + Weight::from_parts(65_519_072, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 6_342 - .saturating_add(Weight::from_parts(156_606, 0).saturating_mul(a.into())) - // Standard Error: 6_553 - .saturating_add(Weight::from_parts(12_015, 0).saturating_mul(p.into())) + // Standard Error: 3_673 + .saturating_add(Weight::from_parts(399_302, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -102,15 +100,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, _p: u32, ) -> Weight { + fn reject_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `329 + a * (56 ±0)` // Estimated: `5302` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_782_069, 0) + // Minimum execution time: 64_519_000 picoseconds. + Weight::from_parts(64_908_669, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 4_312 - .saturating_add(Weight::from_parts(108_677, 0).saturating_mul(a.into())) + // Standard Error: 3_664 + .saturating_add(Weight::from_parts(414_159, 0).saturating_mul(a.into())) + // Standard Error: 3_786 + .saturating_add(Weight::from_parts(22_361, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -122,17 +122,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { + fn announce(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `345 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_032_584, 0) + // Minimum execution time: 86_924_000 picoseconds. + Weight::from_parts(88_249_838, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 2_911 - .saturating_add(Weight::from_parts(166_166, 0).saturating_mul(a.into())) - // Standard Error: 3_008 - .saturating_add(Weight::from_parts(17_666, 0).saturating_mul(p.into())) + // Standard Error: 3_708 + .saturating_add(Weight::from_parts(395_591, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -143,11 +141,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(24_781_374, 0) + // Minimum execution time: 68_909_000 picoseconds. + Weight::from_parts(70_371_353, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 3_065 - .saturating_add(Weight::from_parts(24_009, 0).saturating_mul(p.into())) + // Standard Error: 2_842 + .saturating_add(Weight::from_parts(91_365, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -158,11 +156,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(24_462_081, 0) + // Minimum execution time: 69_246_000 picoseconds. + Weight::from_parts(72_220_177, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 2_494 - .saturating_add(Weight::from_parts(33_113, 0).saturating_mul(p.into())) + // Standard Error: 4_442 + .saturating_add(Weight::from_parts(11_979, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,24 +171,26 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(22_951_335, 0) + // Minimum execution time: 62_226_000 picoseconds. + Weight::from_parts(63_875_059, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 4_509 - .saturating_add(Weight::from_parts(36_383, 0).saturating_mul(p.into())) + // Standard Error: 2_317 + .saturating_add(Weight::from_parts(52_011, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(_p: u32, ) -> Weight { + fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161` // Estimated: `4310` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_884_365, 0) + // Minimum execution time: 74_809_000 picoseconds. + Weight::from_parts(76_836_020, 0) .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 2_583 + .saturating_add(Weight::from_parts(16_887, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -201,11 +201,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(22_613_442, 0) + // Minimum execution time: 64_399_000 picoseconds. + Weight::from_parts(66_674_049, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 2_779 - .saturating_add(Weight::from_parts(42_324, 0).saturating_mul(p.into())) + // Standard Error: 2_620 + .saturating_add(Weight::from_parts(40_569, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_recovery.rs b/runtime/src/weights/pallet_recovery.rs index 640c2a82f..6571bd358 100644 --- a/runtime/src/weights/pallet_recovery.rs +++ b/runtime/src/weights/pallet_recovery.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_recovery` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -42,8 +42,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `200` // Estimated: `3576` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 43_870_000 picoseconds. + Weight::from_parts(44_708_000, 0) .saturating_add(Weight::from_parts(0, 3576)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -53,21 +53,23 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_650_000 picoseconds. + Weight::from_parts(27_147_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Recovery::Recoverable` (r:1 w:1) /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(111), added: 2586, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. - fn create_recovery(_n: u32, ) -> Weight { + fn create_recovery(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3576` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(25_249_723, 0) + // Minimum execution time: 73_661_000 picoseconds. + Weight::from_parts(75_502_535, 0) .saturating_add(Weight::from_parts(0, 3576)) + // Standard Error: 23_761 + .saturating_add(Weight::from_parts(86_229, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,8 +81,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127` // Estimated: `3602` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) + // Minimum execution time: 81_274_000 picoseconds. + Weight::from_parts(82_075_000, 0) .saturating_add(Weight::from_parts(0, 3602)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -94,11 +96,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `197 + n * (42 ±0)` // Estimated: `3602` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_087_016, 0) + // Minimum execution time: 53_089_000 picoseconds. + Weight::from_parts(53_860_077, 0) .saturating_add(Weight::from_parts(0, 3602)) - // Standard Error: 40_495 - .saturating_add(Weight::from_parts(291_436, 0).saturating_mul(n.into())) + // Standard Error: 36_049 + .saturating_add(Weight::from_parts(936_779, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -109,15 +111,13 @@ impl pallet_recovery::WeightInfo for WeightInfo { /// Storage: `Recovery::Proxy` (r:1 w:1) /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 3]`. - fn claim_recovery(n: u32, ) -> Weight { + fn claim_recovery(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `221 + n * (40 ±0)` // Estimated: `3602` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(20_158_287, 0) + // Minimum execution time: 65_861_000 picoseconds. + Weight::from_parts(67_507_363, 0) .saturating_add(Weight::from_parts(0, 3602)) - // Standard Error: 35_260 - .saturating_add(Weight::from_parts(1_018_232, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -130,8 +130,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `343 + n * (20 ±0)` // Estimated: `3602` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(34_324_033, 0) + // Minimum execution time: 92_534_000 picoseconds. + Weight::from_parts(95_334_880, 0) .saturating_add(Weight::from_parts(0, 3602)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -145,8 +145,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `124 + n * (20 ±0)` // Estimated: `3602` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_182_320, 0) + // Minimum execution time: 88_439_000 picoseconds. + Weight::from_parts(91_498_842, 0) .saturating_add(Weight::from_parts(0, 3602)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,8 +157,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `124` // Estimated: `3521` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 33_060_000 picoseconds. + Weight::from_parts(33_736_000, 0) .saturating_add(Weight::from_parts(0, 3521)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index c47d950ca..e94190a3f 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `31` // Estimated: `1489` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 11_565_000 picoseconds. + Weight::from_parts(12_453_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -51,11 +51,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `13328` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(6_606_851, 0) + // Minimum execution time: 10_736_000 picoseconds. + Weight::from_parts(21_614_844, 0) .saturating_add(Weight::from_parts(0, 13328)) - // Standard Error: 2_170 - .saturating_add(Weight::from_parts(412_200, 0).saturating_mul(s.into())) + // Standard Error: 5_151 + .saturating_add(Weight::from_parts(840_381, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,8 +63,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 16_510_000 picoseconds. + Weight::from_parts(16_968_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -76,11 +76,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279 + s * (1 ±0)` // Estimated: `3744 + s * (1 ±0)` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 54_961_000 picoseconds. + Weight::from_parts(55_873_000, 0) .saturating_add(Weight::from_parts(0, 3744)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(791, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_765, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -91,8 +91,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 21_320_000 picoseconds. + Weight::from_parts(21_836_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,8 +100,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 16_594_000 picoseconds. + Weight::from_parts(17_284_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) @@ -112,8 +112,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 24_158_000 picoseconds. + Weight::from_parts(24_938_000, 0) .saturating_add(Weight::from_parts(0, 3576)) .saturating_add(T::DbWeight::get().reads(2)) } @@ -121,8 +121,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 8_498_000 picoseconds. + Weight::from_parts(8_746_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -132,11 +132,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `13328` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(14_258_588, 0) + // Minimum execution time: 38_015_000 picoseconds. + Weight::from_parts(48_393_848, 0) .saturating_add(Weight::from_parts(0, 13328)) - // Standard Error: 2_192 - .saturating_add(Weight::from_parts(391_975, 0).saturating_mul(s.into())) + // Standard Error: 5_160 + .saturating_add(Weight::from_parts(843_424, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -149,11 +149,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `13328` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(14_216_000, 0) + // Minimum execution time: 50_497_000 picoseconds. + Weight::from_parts(50_246_811, 0) .saturating_add(Weight::from_parts(0, 13328)) - // Standard Error: 1_188 - .saturating_add(Weight::from_parts(658_352, 0).saturating_mul(s.into())) + // Standard Error: 2_858 + .saturating_add(Weight::from_parts(1_341_245, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -166,11 +166,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255 + s * (185 ±0)` // Estimated: `13328` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(17_801_647, 0) + // Minimum execution time: 46_255_000 picoseconds. + Weight::from_parts(59_476_877, 0) .saturating_add(Weight::from_parts(0, 13328)) - // Standard Error: 2_497 - .saturating_add(Weight::from_parts(419_279, 0).saturating_mul(s.into())) + // Standard Error: 6_644 + .saturating_add(Weight::from_parts(899_586, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -183,11 +183,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `281 + s * (185 ±0)` // Estimated: `13328` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(16_910_775, 0) + // Minimum execution time: 54_744_000 picoseconds. + Weight::from_parts(56_182_638, 0) .saturating_add(Weight::from_parts(0, 13328)) - // Standard Error: 1_182 - .saturating_add(Weight::from_parts(669_459, 0).saturating_mul(s.into())) + // Standard Error: 4_302 + .saturating_add(Weight::from_parts(1_351_480, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_session.rs b/runtime/src/weights/pallet_session.rs index d93b76d97..e114effe4 100644 --- a/runtime/src/weights/pallet_session.rs +++ b/runtime/src/weights/pallet_session.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -42,8 +42,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1552` // Estimated: `12442` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 110_875_000 picoseconds. + Weight::from_parts(112_496_000, 0) .saturating_add(Weight::from_parts(0, 12442)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -58,8 +58,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1530` // Estimated: `4995` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(37_000_000, 0) + // Minimum execution time: 84_014_000 picoseconds. + Weight::from_parts(85_403_000, 0) .saturating_add(Weight::from_parts(0, 4995)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) diff --git a/runtime/src/weights/pallet_sft.rs b/runtime/src/weights/pallet_sft.rs index 83a83af4b..df8f0887d 100644 --- a/runtime/src/weights/pallet_sft.rs +++ b/runtime/src/weights/pallet_sft.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_sft` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -48,8 +48,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3754` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + // Minimum execution time: 100_688_000 picoseconds. + Weight::from_parts(102_156_000, 0) .saturating_add(Weight::from_parts(0, 3754)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(5)) @@ -62,8 +62,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3949` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 57_768_000 picoseconds. + Weight::from_parts(58_510_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -76,8 +76,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `3949` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 48_822_000 picoseconds. + Weight::from_parts(50_073_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -90,8 +90,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `3949` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 50_202_000 picoseconds. + Weight::from_parts(50_908_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +106,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `240` // Estimated: `52003569` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 62_888_000 picoseconds. + Weight::from_parts(63_689_000, 0) .saturating_add(Weight::from_parts(0, 52003569)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -119,11 +119,11 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `132 + p * (104 ±0)` // Estimated: `990 + p * (52002579 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(11_678_693, 0) + // Minimum execution time: 52_581_000 picoseconds. + Weight::from_parts(44_593_899, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 6_786 - .saturating_add(Weight::from_parts(4_622_717, 0).saturating_mul(p.into())) + // Standard Error: 17_711 + .saturating_add(Weight::from_parts(10_967_298, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 52002579).saturating_mul(p.into())) @@ -134,8 +134,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `235` // Estimated: `52003569` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 55_426_000 picoseconds. + Weight::from_parts(56_445_000, 0) .saturating_add(Weight::from_parts(0, 52003569)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -146,8 +146,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3949` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 48_719_000 picoseconds. + Weight::from_parts(49_437_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -160,8 +160,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `240` // Estimated: `52003569` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 50_965_000 picoseconds. + Weight::from_parts(51_901_000, 0) .saturating_add(Weight::from_parts(0, 52003569)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +172,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3949` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 44_744_000 picoseconds. + Weight::from_parts(45_983_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -184,8 +184,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3949` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 45_123_000 picoseconds. + Weight::from_parts(45_814_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -196,8 +196,8 @@ impl pallet_sft::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3949` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 44_722_000 picoseconds. + Weight::from_parts(45_768_000, 0) .saturating_add(Weight::from_parts(0, 3949)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index d50fa47e7..d2fba6716 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -48,8 +48,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `886` // Estimated: `4752` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(52_000_000, 0) + // Minimum execution time: 135_023_000 picoseconds. + Weight::from_parts(138_014_000, 0) .saturating_add(Weight::from_parts(0, 4752)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -70,8 +70,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1733` // Estimated: `8733` - // Minimum execution time: 91_000_000 picoseconds. - Weight::from_parts(95_000_000, 0) + // Minimum execution time: 229_256_000 picoseconds. + Weight::from_parts(231_065_000, 0) .saturating_add(Weight::from_parts(0, 8733)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -98,8 +98,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1933` // Estimated: `8733` - // Minimum execution time: 93_000_000 picoseconds. - Weight::from_parts(95_000_000, 0) + // Minimum execution time: 235_378_000 picoseconds. + Weight::from_parts(236_817_000, 0) .saturating_add(Weight::from_parts(0, 8733)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -117,11 +117,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `848` // Estimated: `4752` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(39_633_756, 0) + // Minimum execution time: 104_712_000 picoseconds. + Weight::from_parts(107_444_277, 0) .saturating_add(Weight::from_parts(0, 4752)) - // Standard Error: 1_169 - .saturating_add(Weight::from_parts(2_226, 0).saturating_mul(s.into())) + // Standard Error: 994 + .saturating_add(Weight::from_parts(21_890, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -158,11 +158,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2000 + s * (4 ±0)` // Estimated: `6152 + s * (4 ±0)` - // Minimum execution time: 86_000_000 picoseconds. - Weight::from_parts(90_505_516, 0) + // Minimum execution time: 225_496_000 picoseconds. + Weight::from_parts(239_589_179, 0) .saturating_add(Weight::from_parts(0, 6152)) - // Standard Error: 2_034 - .saturating_add(Weight::from_parts(1_326_786, 0).saturating_mul(s.into())) + // Standard Error: 7_277 + .saturating_add(Weight::from_parts(2_833_785, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -194,8 +194,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1176` // Estimated: `4532` - // Minimum execution time: 53_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 144_543_000 picoseconds. + Weight::from_parts(145_312_000, 0) .saturating_add(Weight::from_parts(0, 4532)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) @@ -209,11 +209,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1152 + k * (363 ±0)` // Estimated: `4532 + k * (2829 ±0)` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(26_700_520, 0) + // Minimum execution time: 65_705_000 picoseconds. + Weight::from_parts(60_097_267, 0) .saturating_add(Weight::from_parts(0, 4532)) - // Standard Error: 8_637 - .saturating_add(Weight::from_parts(7_473_500, 0).saturating_mul(k.into())) + // Standard Error: 19_724 + .saturating_add(Weight::from_parts(17_912_499, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -246,11 +246,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1719 + n * (79 ±0)` // Estimated: `6152 + n * (2508 ±0)` - // Minimum execution time: 61_000_000 picoseconds. - Weight::from_parts(58_570_831, 0) + // Minimum execution time: 160_880_000 picoseconds. + Weight::from_parts(153_565_995, 0) .saturating_add(Weight::from_parts(0, 6152)) - // Standard Error: 11_966 - .saturating_add(Weight::from_parts(3_275_457, 0).saturating_mul(n.into())) + // Standard Error: 33_883 + .saturating_add(Weight::from_parts(6_987_789, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -274,8 +274,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1441` // Estimated: `6152` - // Minimum execution time: 54_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 143_044_000 picoseconds. + Weight::from_parts(144_234_000, 0) .saturating_add(Weight::from_parts(0, 6152)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -288,8 +288,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `667` // Estimated: `4532` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 38_053_000 picoseconds. + Weight::from_parts(38_638_000, 0) .saturating_add(Weight::from_parts(0, 4532)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -302,8 +302,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `740` // Estimated: `8074` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 55_747_000 picoseconds. + Weight::from_parts(56_879_000, 0) .saturating_add(Weight::from_parts(0, 8074)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -314,8 +314,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 10_304_000 picoseconds. + Weight::from_parts(10_939_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -325,8 +325,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 36_590_000 picoseconds. + Weight::from_parts(37_408_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -336,8 +336,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 36_198_000 picoseconds. + Weight::from_parts(37_368_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -347,8 +347,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 36_077_000 picoseconds. + Weight::from_parts(36_863_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -359,11 +359,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_095_006, 0) + // Minimum execution time: 11_347_000 picoseconds. + Weight::from_parts(13_114_006, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 58 - .saturating_add(Weight::from_parts(4_358, 0).saturating_mul(v.into())) + // Standard Error: 55 + .saturating_add(Weight::from_parts(18_200, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Staking::Bonded` (r:1 w:1) @@ -399,11 +399,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1758 + s * (4 ±0)` // Estimated: `6152 + s * (4 ±0)` - // Minimum execution time: 79_000_000 picoseconds. - Weight::from_parts(83_091_425, 0) + // Minimum execution time: 208_617_000 picoseconds. + Weight::from_parts(221_755_801, 0) .saturating_add(Weight::from_parts(0, 6152)) - // Standard Error: 2_503 - .saturating_add(Weight::from_parts(1_313_783, 0).saturating_mul(s.into())) + // Standard Error: 10_100 + .saturating_add(Weight::from_parts(2_869_982, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -416,11 +416,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `54538` // Estimated: `58003` - // Minimum execution time: 121_000_000 picoseconds. - Weight::from_parts(622_781_525, 0) + // Minimum execution time: 208_892_000 picoseconds. + Weight::from_parts(1_266_177_173, 0) .saturating_add(Weight::from_parts(0, 58003)) - // Standard Error: 36_428 - .saturating_add(Weight::from_parts(3_111_992, 0).saturating_mul(s.into())) + // Standard Error: 76_969 + .saturating_add(Weight::from_parts(6_485_855, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -447,11 +447,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `19573 + n * (82 ±0)` // Estimated: `20290 + n * (2591 ±1)` - // Minimum execution time: 85_000_000 picoseconds. - Weight::from_parts(250_735_017, 0) + // Minimum execution time: 237_337_000 picoseconds. + Weight::from_parts(497_441_552, 0) .saturating_add(Weight::from_parts(0, 20290)) - // Standard Error: 68_491 - .saturating_add(Weight::from_parts(28_734_857, 0).saturating_mul(n.into())) + // Standard Error: 71_610 + .saturating_add(Weight::from_parts(68_594_755, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -485,11 +485,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32667 + n * (255 ±0)` // Estimated: `30369 + n * (3762 ±0)` - // Minimum execution time: 107_000_000 picoseconds. - Weight::from_parts(172_215_755, 0) + // Minimum execution time: 294_098_000 picoseconds. + Weight::from_parts(388_471_146, 0) .saturating_add(Weight::from_parts(0, 30369)) - // Standard Error: 22_618 - .saturating_add(Weight::from_parts(46_956_463, 0).saturating_mul(n.into())) + // Standard Error: 88_811 + .saturating_add(Weight::from_parts(115_837_531, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -513,11 +513,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1738 + l * (5 ±0)` // Estimated: `8733` - // Minimum execution time: 81_000_000 picoseconds. - Weight::from_parts(82_995_332, 0) + // Minimum execution time: 217_443_000 picoseconds. + Weight::from_parts(220_783_251, 0) .saturating_add(Weight::from_parts(0, 8733)) - // Standard Error: 2_914 - .saturating_add(Weight::from_parts(36_371, 0).saturating_mul(l.into())) + // Standard Error: 4_685 + .saturating_add(Weight::from_parts(38_964, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -552,11 +552,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2000 + s * (4 ±0)` // Estimated: `6152 + s * (4 ±0)` - // Minimum execution time: 93_000_000 picoseconds. - Weight::from_parts(93_128_529, 0) + // Minimum execution time: 241_467_000 picoseconds. + Weight::from_parts(243_883_993, 0) .saturating_add(Weight::from_parts(0, 6152)) - // Standard Error: 2_066 - .saturating_add(Weight::from_parts(1_312_504, 0).saturating_mul(s.into())) + // Standard Error: 8_087 + .saturating_add(Weight::from_parts(2_865_595, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -603,14 +603,14 @@ impl pallet_staking::WeightInfo for WeightInfo { fn new_era(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + n * (471 ±0) + v * (2268 ±0)` - // Estimated: `507590 + n * (3542 ±2) + v * (3542 ±24)` - // Minimum execution time: 585_000_000 picoseconds. - Weight::from_parts(587_000_000, 0) + // Estimated: `507590 + n * (3542 ±2) + v * (3542 ±0)` + // Minimum execution time: 1_429_081_000 picoseconds. + Weight::from_parts(1_438_740_000, 0) .saturating_add(Weight::from_parts(0, 507590)) - // Standard Error: 1_161_648 - .saturating_add(Weight::from_parts(32_237_191, 0).saturating_mul(v.into())) - // Standard Error: 115_751 - .saturating_add(Weight::from_parts(15_218_678, 0).saturating_mul(n.into())) + // Standard Error: 2_793_968 + .saturating_add(Weight::from_parts(73_716_664, 0).saturating_mul(v.into())) + // Standard Error: 278_403 + .saturating_add(Weight::from_parts(35_139_127, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(207)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -641,15 +641,15 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[500, 1000]`. fn get_npos_voters(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3502 + n * (591 ±0) + v * (266 ±0)` + // Measured: `3500 + n * (591 ±0) + v * (266 ±0)` // Estimated: `507590 + n * (3542 ±0) + v * (3542 ±0)` - // Minimum execution time: 29_422_000_000 picoseconds. - Weight::from_parts(29_584_000_000, 0) + // Minimum execution time: 66_666_404_000 picoseconds. + Weight::from_parts(67_267_162_000, 0) .saturating_add(Weight::from_parts(0, 507590)) - // Standard Error: 323_592 - .saturating_add(Weight::from_parts(4_984_053, 0).saturating_mul(v.into())) - // Standard Error: 323_592 - .saturating_add(Weight::from_parts(2_591_234, 0).saturating_mul(n.into())) + // Standard Error: 728_450 + .saturating_add(Weight::from_parts(11_361_718, 0).saturating_mul(v.into())) + // Standard Error: 728_450 + .saturating_add(Weight::from_parts(6_648_986, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(202)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -666,13 +666,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `908 + v * (37 ±0)` + // Measured: `906 + v * (37 ±0)` // Estimated: `3498 + v * (2508 ±0)` - // Minimum execution time: 2_321_000_000 picoseconds. - Weight::from_parts(20_898_038, 0) + // Minimum execution time: 5_498_671_000 picoseconds. + Weight::from_parts(195_540_621, 0) .saturating_add(Weight::from_parts(0, 3498)) - // Standard Error: 16_967 - .saturating_add(Weight::from_parts(4_750_224, 0).saturating_mul(v.into())) + // Standard Error: 18_213 + .saturating_add(Weight::from_parts(10_654_948, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -694,8 +694,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 20_351_000 picoseconds. + Weight::from_parts(21_146_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -715,8 +715,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 18_949_000 picoseconds. + Weight::from_parts(19_747_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -744,8 +744,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1556` // Estimated: `6152` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_000_000, 0) + // Minimum execution time: 177_323_000 picoseconds. + Weight::from_parts(180_400_000, 0) .saturating_add(Weight::from_parts(0, 6152)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -758,8 +758,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `581` // Estimated: `3498` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 37_746_000 picoseconds. + Weight::from_parts(38_477_000, 0) .saturating_add(Weight::from_parts(0, 3498)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -770,8 +770,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 10_687_000 picoseconds. + Weight::from_parts(11_362_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index f8d652d35..0d9fc0010 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -40,8 +40,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345` // Estimated: `1493` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 32_512_000 picoseconds. + Weight::from_parts(33_525_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +50,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `194` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 11_762_000 picoseconds. + Weight::from_parts(12_225_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/src/weights/pallet_token_approvals.rs b/runtime/src/weights/pallet_token_approvals.rs index 92c8b56e2..9fdef604b 100644 --- a/runtime/src/weights/pallet_token_approvals.rs +++ b/runtime/src/weights/pallet_token_approvals.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_token_approvals` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -42,8 +42,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `420` // Estimated: `3526` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 42_136_000 picoseconds. + Weight::from_parts(42_572_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -56,8 +56,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `481` // Estimated: `3501` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 42_055_000 picoseconds. + Weight::from_parts(43_076_000, 0) .saturating_add(Weight::from_parts(0, 3501)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -68,8 +68,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 16_239_000 picoseconds. + Weight::from_parts(16_625_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,8 +79,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `144` // Estimated: `3541` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 31_114_000 picoseconds. + Weight::from_parts(31_850_000, 0) .saturating_add(Weight::from_parts(0, 3541)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +91,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 16_212_000 picoseconds. + Weight::from_parts(16_664_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,8 +102,8 @@ impl pallet_token_approvals::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 16_390_000 picoseconds. + Weight::from_parts(16_639_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_utility.rs b/runtime/src/weights/pallet_utility.rs index 72ec3e07f..81149eaf9 100644 --- a/runtime/src/weights/pallet_utility.rs +++ b/runtime/src/weights/pallet_utility.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -41,11 +41,11 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 21_934_000 picoseconds. + Weight::from_parts(65_988_812, 0) .saturating_add(Weight::from_parts(0, 3576)) - // Standard Error: 3_794 - .saturating_add(Weight::from_parts(8_214_677, 0).saturating_mul(c.into())) + // Standard Error: 9_624 + .saturating_add(Weight::from_parts(19_105_480, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) @@ -56,8 +56,8 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 31_906_000 picoseconds. + Weight::from_parts(33_198_000, 0) .saturating_add(Weight::from_parts(0, 3576)) .saturating_add(T::DbWeight::get().reads(2)) } @@ -70,19 +70,19 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(18_713_824, 0) + // Minimum execution time: 22_154_000 picoseconds. + Weight::from_parts(22_529_000, 0) .saturating_add(Weight::from_parts(0, 3576)) - // Standard Error: 31_875 - .saturating_add(Weight::from_parts(8_501_738, 0).saturating_mul(c.into())) + // Standard Error: 29_162 + .saturating_add(Weight::from_parts(20_281_062, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 27_581_000 picoseconds. + Weight::from_parts(28_360_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `MaintenanceMode::BlockedCalls` (r:1 w:0) @@ -94,11 +94,11 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(8_875_808, 0) + // Minimum execution time: 22_247_000 picoseconds. + Weight::from_parts(189_884_605, 0) .saturating_add(Weight::from_parts(0, 3576)) - // Standard Error: 5_282 - .saturating_add(Weight::from_parts(8_197_137, 0).saturating_mul(c.into())) + // Standard Error: 24_476 + .saturating_add(Weight::from_parts(19_098_724, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) } } diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index 1a90732b6..e613f1c50 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_vortex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -40,8 +40,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1489` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 42_011_000 picoseconds. + Weight::from_parts(42_788_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -52,8 +52,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `3478` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 42_772_000 picoseconds. + Weight::from_parts(43_629_000, 0) .saturating_add(Weight::from_parts(0, 3478)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -68,8 +68,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `539` // Estimated: `3627` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 88_863_000 picoseconds. + Weight::from_parts(89_678_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -80,8 +80,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 30_043_000 picoseconds. + Weight::from_parts(30_689_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,11 +92,11 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(103_619, 0) + // Minimum execution time: 34_419_000 picoseconds. + Weight::from_parts(4_326_044, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_756 - .saturating_add(Weight::from_parts(1_793_458, 0).saturating_mul(b.into())) + // Standard Error: 8_655 + .saturating_add(Weight::from_parts(3_918_804, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into()))) } /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -109,8 +109,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `5023` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 47_759_000 picoseconds. + Weight::from_parts(48_789_000, 0) .saturating_add(Weight::from_parts(0, 5023)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -129,8 +129,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1227` // Estimated: `8763` - // Minimum execution time: 125_000_000 picoseconds. - Weight::from_parts(127_000_000, 0) + // Minimum execution time: 324_986_000 picoseconds. + Weight::from_parts(327_149_000, 0) .saturating_add(Weight::from_parts(0, 8763)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -147,8 +147,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `936` // Estimated: `6160` - // Minimum execution time: 53_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 147_146_000 picoseconds. + Weight::from_parts(148_783_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -171,8 +171,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1071` // Estimated: `9056` - // Minimum execution time: 81_000_000 picoseconds. - Weight::from_parts(82_000_000, 0) + // Minimum execution time: 224_233_000 picoseconds. + Weight::from_parts(226_605_000, 0) .saturating_add(Weight::from_parts(0, 9056)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) diff --git a/runtime/src/weights/pallet_xls20.rs b/runtime/src/weights/pallet_xls20.rs index 92f14d477..e237d64f7 100644 --- a/runtime/src/weights/pallet_xls20.rs +++ b/runtime/src/weights/pallet_xls20.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_xls20` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_575_000 picoseconds. + Weight::from_parts(24_266_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -49,8 +49,8 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 23_307_000 picoseconds. + Weight::from_parts(23_963_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -60,8 +60,8 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `273` // Estimated: `3464` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 42_266_000 picoseconds. + Weight::from_parts(43_246_000, 0) .saturating_add(Weight::from_parts(0, 3464)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -76,8 +76,8 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3553` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 58_386_000 picoseconds. + Weight::from_parts(59_235_000, 0) .saturating_add(Weight::from_parts(0, 3553)) .saturating_add(T::DbWeight::get().reads(3)) } @@ -91,8 +91,8 @@ impl pallet_xls20::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3553` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 62_252_000 picoseconds. + Weight::from_parts(63_158_000, 0) .saturating_add(Weight::from_parts(0, 3553)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_xrpl.rs b/runtime/src/weights/pallet_xrpl.rs index a35e96765..6fb3585a1 100644 --- a/runtime/src/weights/pallet_xrpl.rs +++ b/runtime/src/weights/pallet_xrpl.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_xrpl` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -40,8 +40,8 @@ impl pallet_xrpl::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3576` - // Minimum execution time: 83_000_000 picoseconds. - Weight::from_parts(85_000_000, 0) + // Minimum execution time: 207_171_000 picoseconds. + Weight::from_parts(211_293_000, 0) .saturating_add(Weight::from_parts(0, 3576)) .saturating_add(T::DbWeight::get().reads(2)) } diff --git a/runtime/src/weights/pallet_xrpl_bridge.rs b/runtime/src/weights/pallet_xrpl_bridge.rs index 729f3417e..633481479 100644 --- a/runtime/src/weights/pallet_xrpl_bridge.rs +++ b/runtime/src/weights/pallet_xrpl_bridge.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_xrpl_bridge` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -46,8 +46,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `64003481` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 70_622_000 picoseconds. + Weight::from_parts(71_635_000, 0) .saturating_add(Weight::from_parts(0, 64003481)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -58,8 +58,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 15_731_000 picoseconds. + Weight::from_parts(16_427_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,8 +69,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 25_112_000 picoseconds. + Weight::from_parts(25_716_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1253` // Estimated: `3627` - // Minimum execution time: 70_000_000 picoseconds. - Weight::from_parts(71_000_000, 0) + // Minimum execution time: 184_207_000 picoseconds. + Weight::from_parts(185_916_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -116,8 +116,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 31_190_000 picoseconds. + Weight::from_parts(32_414_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -127,8 +127,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3502` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 47_087_000 picoseconds. + Weight::from_parts(48_137_000, 0) .saturating_add(Weight::from_parts(0, 3502)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -139,8 +139,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 11_238_000 picoseconds. + Weight::from_parts(11_549_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,8 +150,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 11_415_000 picoseconds. + Weight::from_parts(11_779_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -161,8 +161,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 30_043_000 picoseconds. + Weight::from_parts(30_722_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,8 +178,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3502` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 45_969_000 picoseconds. + Weight::from_parts(46_866_000, 0) .saturating_add(Weight::from_parts(0, 3502)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -194,8 +194,8 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `1493` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 39_181_000 picoseconds. + Weight::from_parts(39_944_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -215,11 +215,11 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `180` // Estimated: `1887623333 + i * (1669340 ±732_183)` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 19_469_000 picoseconds. + Weight::from_parts(26_211_755, 0) .saturating_add(Weight::from_parts(0, 1887623333)) - // Standard Error: 3_081 - .saturating_add(Weight::from_parts(5_579_359, 0).saturating_mul(i.into())) + // Standard Error: 13_745 + .saturating_add(Weight::from_parts(12_249_443, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(i.into()))) @@ -238,11 +238,11 @@ impl pallet_xrpl_bridge::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299 + i * (64 ±0)` // Estimated: `64003481` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_453_493, 0) + // Minimum execution time: 45_471_000 picoseconds. + Weight::from_parts(49_850_106, 0) .saturating_add(Weight::from_parts(0, 64003481)) - // Standard Error: 7_061 - .saturating_add(Weight::from_parts(1_238_165, 0).saturating_mul(i.into())) + // Standard Error: 21_866 + .saturating_add(Weight::from_parts(2_809_201, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) From bd3968974336c5e14092392692c43826bf0480f6 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 24 May 2024 12:47:10 +1200 Subject: [PATCH 063/112] Add --skip-exculded-check flag to benchmarking script, Now supports running benchmarking for Exculded list pallets. --- scripts/run_benchmarks.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index c719bdd8c..3017984b4 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -18,6 +18,7 @@ inputs_arguments() { flag LIST_PALLET -l -- "List all pallets that can be benchmarked" disp :usage -h --help disp VERSION --version + flag SKIP_EXCLUDED_CHECK -e --skip-exculded-check } run_benchmark() { @@ -33,7 +34,7 @@ run_benchmark() { mkdir -p "$OUTPUT_FOLDER" for PALLET in "${PALLETS[@]}"; do - if is_pallet_excluded; then + if [ ! "$SKIP_EXCLUDED_CHECK" = "1" ] && is_pallet_excluded; then echo -e "[ ] Skipping pallet $PALLET\n"; continue fi @@ -117,14 +118,10 @@ populate_pallet_list() { "pallet-offences" "frame-benchmarking" - # TODO: fix this; pallet bench taking too long! + # pallet bench taking too long - use SKIP_EXCLUDED_CHECK flag to run these "pallet-assets" "pallet-election-provider-multi-phase" "pallet-im-online" - - # RUNTIME WEIGHT FAILURES - #"pallet-session" - #"pallet-staking" ) CUSTOM_PALLETS=() From a9836ff7b792ef289ee584790c76aef820578afe Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 24 May 2024 12:47:22 +1200 Subject: [PATCH 064/112] Local weights for missing pallets --- runtime/src/weights/frame_benchmarking.rs | 84 +-- runtime/src/weights/pallet_assets.rs | 628 ++++++++++++++++------ runtime/src/weights/pallet_im_online.rs | 51 +- 3 files changed, 527 insertions(+), 236 deletions(-) diff --git a/runtime/src/weights/frame_benchmarking.rs b/runtime/src/weights/frame_benchmarking.rs index 6de2a5dd2..7ee03ea5e 100644 --- a/runtime/src/weights/frame_benchmarking.rs +++ b/runtime/src/weights/frame_benchmarking.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `frame_benchmarking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-08-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-101-56`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,66 +14,77 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=frame_benchmarking +// --pallet=frame-benchmarking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/frame_benchmarking.rs +// ./runtime/src/weights/frame_benchmarking.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `frame_benchmarking`. pub struct WeightInfo(PhantomData); impl frame_benchmarking::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - Weight::from_all(1_108_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(88_235, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - Weight::from_all(1_186_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(95_764, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - Weight::from_all(1_117_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(111_764, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - Weight::from_all(1_105_000 as u64) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(190_117, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[0, 100]`. - fn hashing(i: u32, ) -> Weight { - Weight::from_all(47_984_099_000 as u64) - // Standard Error: 51_804 - .saturating_add(Weight::from_all(1_127_898 as u64).saturating_mul(i as u64)) + fn hashing() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_646_000_000 picoseconds. + Weight::from_parts(28_298_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// The range of component `i` is `[1, 100]`. + /// The range of component `i` is `[0, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - Weight::from_all(90_350_000 as u64) - // Standard Error: 29_923 - .saturating_add(Weight::from_all(81_520_475 as u64).saturating_mul(i as u64)) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_read(i: u32, ) -> Weight { - Weight::from_all(1_147_000 as u64) - // Standard Error: 9_407 - .saturating_add(Weight::from_all(4_548_237 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) - } - // Storage: Skipped Metadata (r:0 w:0) - /// The range of component `i` is `[0, 1000]`. - fn storage_write(i: u32, ) -> Weight { - Weight::from_all(1_236_000 as u64) - // Standard Error: 748 - .saturating_add(Weight::from_all(962_791 as u64).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(3_751_115, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 50_091 + .saturating_add(Weight::from_parts(38_529_945, 0).saturating_mul(i.into())) } } diff --git a/runtime/src/weights/pallet_assets.rs b/runtime/src/weights/pallet_assets.rs index aa2aae23f..0053f866b 100644 --- a/runtime/src/weights/pallet_assets.rs +++ b/runtime/src/weights/pallet_assets.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-08-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-101-56`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,225 +14,494 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_assets +// --pallet=pallet-assets // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/pallet_assets.rs +// ./runtime/src/weights/pallet_assets.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_assets`. pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { - // Storage: Assets Asset (r:1 w:1) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn create() -> Weight { - Weight::from_all(83_915_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `259` + // Estimated: `3627` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn force_create() -> Weight { - Weight::from_all(53_967_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `131` + // Estimated: `3627` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + fn start_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:101 w:100) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + fn destroy_accounts(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `828 + c * (183 ±0)` + // Estimated: `3627 + c * (2591 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_358_945, 0) + .saturating_add(Weight::from_parts(0, 3627)) + // Standard Error: 18_643 + .saturating_add(Weight::from_parts(13_150_304, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(c.into())) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:101 w:100) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 100]`. + fn destroy_approvals(a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `381 + a * (74 ±0)` + // Estimated: `3627 + a * (2599 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_436_146, 0) + .saturating_add(Weight::from_parts(0, 3627)) + // Standard Error: 16_565 + .saturating_add(Weight::from_parts(15_261_224, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) + .saturating_add(Weight::from_parts(0, 2599).saturating_mul(a.into())) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn finish_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `391` + // Estimated: `3627` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) fn mint() -> Weight { - Weight::from_all(100_217_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `742` + // Estimated: `3627` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) fn burn() -> Weight { - Weight::from_all(112_935_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `3627` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer() -> Weight { - Weight::from_all(143_730_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `6160` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - Weight::from_all(120_350_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `6160` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(40_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - Weight::from_all(144_361_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `6160` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) fn freeze() -> Weight { - Weight::from_all(69_952_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `3627` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) fn thaw() -> Weight { - Weight::from_all(70_135_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `3627` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn freeze_asset() -> Weight { - Weight::from_all(60_594_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn thaw_asset() -> Weight { - Weight::from_all(60_444_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Metadata (r:1 w:0) + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { - Weight::from_all(68_986_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `391` + // Estimated: `3627` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn set_team() -> Weight { - Weight::from_all(64_014_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, _s: u32, ) -> Weight { - Weight::from_all(104_108_000 as u64) - // Standard Error: 1_807 - .saturating_add(Weight::from_all(93_510 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + fn set_metadata(n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `391` + // Estimated: `3627` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_046_785, 0) + .saturating_add(Weight::from_parts(0, 3627)) + // Standard Error: 1_237 + .saturating_add(Weight::from_parts(359, 0).saturating_mul(n.into())) + // Standard Error: 1_237 + .saturating_add(Weight::from_parts(1_524, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { - Weight::from_all(109_434_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `538` + // Estimated: `3627` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, s: u32, ) -> Weight { - Weight::from_all(66_067_000 as u64) - // Standard Error: 1_634 - .saturating_add(Weight::from_all(50_246 as u64).saturating_mul(n as u64)) - // Standard Error: 1_634 - .saturating_add(Weight::from_all(44_117 as u64).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:0) - // Storage: Assets Metadata (r:1 w:1) + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `3627` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_743_162, 0) + .saturating_add(Weight::from_parts(0, 3627)) + // Standard Error: 1_134 + .saturating_add(Weight::from_parts(995, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) fn force_clear_metadata() -> Weight { - Weight::from_all(107_570_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `538` + // Estimated: `3627` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn force_asset_status() -> Weight { - Weight::from_all(62_467_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { - Weight::from_all(105_592_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Assets Approvals (r:1 w:1) - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Account (r:2 w:2) - // Storage: System Account (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { - Weight::from_all(182_236_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `583` + // Estimated: `6160` + // Minimum execution time: 64_000_000 picoseconds. + Weight::from_parts(64_000_000, 0) + .saturating_add(Weight::from_parts(0, 6160)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { - Weight::from_all(118_850_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Assets Asset (r:1 w:1) - // Storage: Assets Approvals (r:1 w:1) + // Proof Size summary in bytes: + // Measured: `446` + // Estimated: `3627` + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) fn force_cancel_approval() -> Weight { - Weight::from_all(120_042_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - - fn start_destroy() -> Weight { - todo!() - } - - fn destroy_accounts(_c: u32) -> Weight { - todo!() - } - - fn destroy_approvals(_a: u32) -> Weight { - todo!() - } - - fn finish_destroy() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `446` + // Estimated: `3627` + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn set_min_balance() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3627` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn touch() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `833` + // Estimated: `3627` + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn touch_other() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `742` + // Estimated: `3627` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn refund() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `545` + // Estimated: `3627` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn refund_other() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `474` + // Estimated: `3627` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(110), added: 2585, mode: `MaxEncodedLen`) fn block() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `437` + // Estimated: `3627` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 3627)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index 375b017c0..b526c2552 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-08-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-101-56`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,38 +14,46 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_im_online +// --pallet=pallet-im-online // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/pallet_im_online.rs +// ./runtime/src/weights/pallet_im_online.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_im_online`. pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { - // Storage: Session Validators (r:1 w:0) - // Storage: Session CurrentIndex (r:1 w:0) - // Storage: ImOnline ReceivedHeartbeats (r:1 w:1) - // Storage: ImOnline AuthoredBlocks (r:1 w:0) - // Storage: ImOnline Keys (r:1 w:0) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ImOnline::Keys` (r:1 w:0) + /// Proof: `ImOnline::Keys` (`max_values`: Some(1), `max_size`: Some(320002), added: 320497, mode: `MaxEncodedLen`) + /// Storage: `ImOnline::ReceivedHeartbeats` (r:1 w:1) + /// Proof: `ImOnline::ReceivedHeartbeats` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`) + /// Storage: `ImOnline::AuthoredBlocks` (r:1 w:0) + /// Proof: `ImOnline::AuthoredBlocks` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) /// The range of component `k` is `[1, 1000]`. - /// The range of component `e` is `[1, 100]`. - fn validate_unsigned_and_then_heartbeat(k: u32,) -> Weight { - Weight::from_all(259_324_000 as u64) - // Standard Error: 571 - .saturating_add(Weight::from_all(28_460 as u64).saturating_mul(k as u64)) - // Standard Error: 5_721 - // .saturating_add(Weight::from_all(501_673 as u64).saturating_mul(e as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `281 + k * (32 ±0)` + // Estimated: `321487 + k * (1755 ±0)` + // Minimum execution time: 59_000_000 picoseconds. + Weight::from_parts(78_066_976, 0) + .saturating_add(Weight::from_parts(0, 321487)) + // Standard Error: 1_128 + .saturating_add(Weight::from_parts(47_694, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 1755).saturating_mul(k.into())) } } From b40022a577d3b2f5c4cf47052b4f6dbd1edd09f2 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 24 May 2024 12:47:44 +1200 Subject: [PATCH 065/112] Update benchmark workflow to use updated script. --- .github/workflows/dispatch-benchmarking.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-benchmarking.yml b/.github/workflows/dispatch-benchmarking.yml index 37cc6d80a..80a803863 100644 --- a/.github/workflows/dispatch-benchmarking.yml +++ b/.github/workflows/dispatch-benchmarking.yml @@ -15,6 +15,11 @@ on: pallets: description: 'Space-separated list of pallet names; e.g. `pallet-futurepass pallet-dex`; runs all if left empty' required: false + skip-exclude-check: + type: boolean + description: 'Skip excluded pallet check. Useful with long running pallet benchmarking' + required: false + default: false jobs: benchmarks: @@ -42,16 +47,22 @@ jobs: - name: Run benchmarks run: | PALLET_INPUT=${{ github.event.inputs.pallets }} + SKIP_EXCLUDE_CHECK="" + if [ ${{ github.event.inputs.skip-exclude-check }} ] + then + SKIP_EXCLUDE_CHECK = "-e" + fi + if [ -z "$PALLET_INPUT" ] then - ./scripts/run_benchmarks.sh + ./scripts/run_benchmarks.sh $SKIP_EXCLUDE_CHECK else IFS=' ' read -ra PALLET_ARRAY <<< "$PALLET_INPUT" PALLET_ARGS="" for i in "${PALLET_ARRAY[@]}"; do PALLET_ARGS+="-p $i " done - ./scripts/run_benchmarks.sh $PALLET_ARGS + ./scripts/run_benchmarks.sh $PALLET_ARGS $SKIP_EXCLUDE_CHECK fi - name: Check for Benchmarking Errors From cf70755c783b0cfca4b2e30f1cbfddedee4a856d Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 24 May 2024 13:50:10 +1200 Subject: [PATCH 066/112] minor --- .github/workflows/dispatch-benchmarking.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-benchmarking.yml b/.github/workflows/dispatch-benchmarking.yml index 80a803863..31d0b755e 100644 --- a/.github/workflows/dispatch-benchmarking.yml +++ b/.github/workflows/dispatch-benchmarking.yml @@ -50,7 +50,7 @@ jobs: SKIP_EXCLUDE_CHECK="" if [ ${{ github.event.inputs.skip-exclude-check }} ] then - SKIP_EXCLUDE_CHECK = "-e" + SKIP_EXCLUDE_CHECK="-e" fi if [ -z "$PALLET_INPUT" ] From 6bf9f1353b145c8d540b2eedf362403ca8a0f736 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 24 May 2024 04:48:18 +0000 Subject: [PATCH 067/112] Update benchmarks for frame-benchmarking pallet-assets pallet-im-online pallet-election-provider-multi-phase on feat/substrate-v1.0.0 --- .../pallet_election_provider_multi_phase.rs | 295 ++++++++++++------ 1 file changed, 200 insertions(+), 95 deletions(-) diff --git a/runtime/src/weights/pallet_election_provider_multi_phase.rs b/runtime/src/weights/pallet_election_provider_multi_phase.rs index 6cbea3426..017900e7b 100644 --- a/runtime/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/src/weights/pallet_election_provider_multi_phase.rs @@ -2,9 +2,10 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-08-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-101-56`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! DATE: 2024-05-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/seed @@ -13,139 +14,243 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_election_provider_multi_phase +// --pallet=pallet-election-provider-multi-phase // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./output/pallet_election_provider_multi_phase.rs +// ./runtime/src/weights/pallet_election_provider_multi_phase.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_phase`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_phase::WeightInfo for WeightInfo { - // Storage: Staking CurrentEra (r:1 w:0) - // Storage: Staking CurrentPlannedSession (r:1 w:0) - // Storage: Staking ErasStartSessionIndex (r:1 w:0) - // Storage: Babe EpochIndex (r:1 w:0) - // Storage: Babe GenesisSlot (r:1 w:0) - // Storage: Babe CurrentSlot (r:1 w:0) - // Storage: Staking ForceEra (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::CurrentPlannedSession` (r:1 w:0) + /// Proof: `Staking::CurrentPlannedSession` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Staking::ErasStartSessionIndex` (r:1 w:0) + /// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochIndex` (r:1 w:0) + /// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Babe::GenesisSlot` (r:1 w:0) + /// Proof: `Babe::GenesisSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Babe::CurrentSlot` (r:1 w:0) + /// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Staking::ForceEra` (r:1 w:0) + /// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_nothing() -> Weight { - Weight::from_all(42_951_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) + // Proof Size summary in bytes: + // Measured: `855` + // Estimated: `3481` + // Minimum execution time: 49_415_000 picoseconds. + Weight::from_parts(50_406_000, 0) + .saturating_add(Weight::from_parts(0, 3481)) + .saturating_add(T::DbWeight::get().reads(8)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_signed() -> Weight { - Weight::from_all(45_085_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 37_441_000 picoseconds. + Weight::from_parts(38_168_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_initialize_open_unsigned() -> Weight { - Weight::from_all(44_953_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 41_320_000 picoseconds. + Weight::from_parts(42_034_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: System Account (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize_signed_phase_accept_solution() -> Weight { - Weight::from_all(86_504_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `162` + // Estimated: `3581` + // Minimum execution time: 84_079_000 picoseconds. + Weight::from_parts(84_781_000, 0) + .saturating_add(Weight::from_parts(0, 3581)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: System Account (r:2 w:2) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn finalize_signed_phase_reject_solution() -> Weight { - Weight::from_all(102_875_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + // Proof Size summary in bytes: + // Measured: `202` + // Estimated: `6172` + // Minimum execution time: 100_018_000 picoseconds. + Weight::from_parts(101_244_000, 0) + .saturating_add(Weight::from_parts(0, 6172)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) + /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight { - Weight::from_all(940_302_000 as u64) - // Standard Error: 4_670 - .saturating_add(Weight::from_all(324_279 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 649_540_000 picoseconds. + Weight::from_parts(655_523_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3_786 + .saturating_add(Weight::from_parts(262_827, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:1 w:0) - // Storage: System BlockWeight (r:1 w:1) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase Round (r:1 w:1) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1) - // Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1) - // Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn elect_queued(a: u32, _d: u32, ) -> Weight { - Weight::from_all(1_323_337_000 as u64) - // Standard Error: 8_871 - .saturating_add(Weight::from_all(624_058 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(9 as u64)) + fn elect_queued(a: u32, d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `300 + a * (576 ±0) + d * (36 ±0)` + // Estimated: `3852 + a * (576 ±0) + d * (37 ±0)` + // Minimum execution time: 660_586_000 picoseconds. + Weight::from_parts(99_098_754, 0) + .saturating_add(Weight::from_parts(0, 3852)) + // Standard Error: 15_947 + .saturating_add(Weight::from_parts(841_933, 0).saturating_mul(a.into())) + // Standard Error: 23_903 + .saturating_add(Weight::from_parts(566_617, 0).saturating_mul(d.into())) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(9)) + .saturating_add(Weight::from_parts(0, 576).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(d.into())) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: FeeControl Data (r:1 w:0) - // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) - // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `FeeControl::Data` (r:1 w:0) + /// Proof: `FeeControl::Data` (`max_values`: Some(1), `max_size`: Some(52), added: 547, mode: `MaxEncodedLen`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1) + /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`) fn submit() -> Weight { - Weight::from_all(151_199_000 as u64) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Proof Size summary in bytes: + // Measured: `1195` + // Estimated: `2680` + // Minimum execution time: 139_649_000 picoseconds. + Weight::from_parts(141_175_000, 0) + .saturating_add(Weight::from_parts(0, 2680)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase QueuedSolution (r:1 w:1) - // Storage: ElectionProviderMultiPhase SnapshotMetadata (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1) + /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { - Weight::from_all(11_261_392_000 as u64) - // Standard Error: 33_342 - .saturating_add(Weight::from_all(1_146_340 as u64).saturating_mul(v as u64)) - // Standard Error: 98_805 - .saturating_add(Weight::from_all(5_995_651 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `181 + t * (20 ±0) + v * (349 ±0)` + // Estimated: `1666 + t * (20 ±0) + v * (349 ±0)` + // Minimum execution time: 9_585_475_000 picoseconds. + Weight::from_parts(9_942_490_000, 0) + .saturating_add(Weight::from_parts(0, 1666)) + // Standard Error: 32_040 + .saturating_add(Weight::from_parts(688_226, 0).saturating_mul(v.into())) + // Standard Error: 94_948 + .saturating_add(Weight::from_parts(7_915_654, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(t.into())) + .saturating_add(Weight::from_parts(0, 349).saturating_mul(v.into())) } - // Storage: ElectionProviderMultiPhase Round (r:1 w:0) - // Storage: ElectionProviderMultiPhase DesiredTargets (r:1 w:0) - // Storage: ElectionProviderMultiPhase MinimumUntrustedScore (r:1 w:0) - // Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0) + /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0) + /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { - Weight::from_all(9_990_998_000 as u64) - // Standard Error: 26_953 - .saturating_add(Weight::from_all(911_703 as u64).saturating_mul(v as u64)) - // Standard Error: 79_872 - .saturating_add(Weight::from_all(5_176_479 as u64).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) + fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `156 + t * (20 ±0) + v * (349 ±0)` + // Estimated: `1641 + t * (20 ±0) + v * (349 ±0)` + // Minimum execution time: 8_405_339_000 picoseconds. + Weight::from_parts(8_719_931_000, 0) + .saturating_add(Weight::from_parts(0, 1641)) + // Standard Error: 30_389 + .saturating_add(Weight::from_parts(973_410, 0).saturating_mul(v.into())) + // Standard Error: 90_054 + .saturating_add(Weight::from_parts(5_860_688, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(t.into())) + .saturating_add(Weight::from_parts(0, 349).saturating_mul(v.into())) } } From 6540a74442fbd8621e3bfd6582016cf1325b88e4 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 26 May 2024 23:53:15 +0000 Subject: [PATCH 068/112] Update benchmarks for pallet-im-online on feat/substrate-v1.0.0 --- runtime/src/weights/pallet_im_online.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index b526c2552..3ef69a03f 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -47,11 +47,11 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `281 + k * (32 ±0)` // Estimated: `321487 + k * (1755 ±0)` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(78_066_976, 0) + // Minimum execution time: 154_709_000 picoseconds. + Weight::from_parts(177_279_236, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 1_128 - .saturating_add(Weight::from_parts(47_694, 0).saturating_mul(k.into())) + // Standard Error: 958 + .saturating_add(Weight::from_parts(62_850, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 1755).saturating_mul(k.into())) From 6f02ae4d9b8306e39a20096143de6f9bf4ab4667 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 27 May 2024 00:43:05 +0000 Subject: [PATCH 069/112] Update benchmarks for pallet-assets on feat/substrate-v1.0.0 --- runtime/src/weights/pallet_assets.rs | 152 +++++++++++++-------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/runtime/src/weights/pallet_assets.rs b/runtime/src/weights/pallet_assets.rs index 0053f866b..a884c5d16 100644 --- a/runtime/src/weights/pallet_assets.rs +++ b/runtime/src/weights/pallet_assets.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -40,8 +40,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3627` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 78_184_000 picoseconds. + Weight::from_parts(79_744_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -52,8 +52,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `131` // Estimated: `3627` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 36_392_000 picoseconds. + Weight::from_parts(37_167_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +64,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 40_489_000 picoseconds. + Weight::from_parts(41_246_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,11 +81,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `828 + c * (183 ±0)` // Estimated: `3627 + c * (2591 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(16_358_945, 0) + // Minimum execution time: 54_415_000 picoseconds. + Weight::from_parts(74_583_804, 0) .saturating_add(Weight::from_parts(0, 3627)) - // Standard Error: 18_643 - .saturating_add(Weight::from_parts(13_150_304, 0).saturating_mul(c.into())) + // Standard Error: 25_579 + .saturating_add(Weight::from_parts(30_451_080, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,11 +101,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `381 + a * (74 ±0)` // Estimated: `3627 + a * (2599 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_436_146, 0) + // Minimum execution time: 54_598_000 picoseconds. + Weight::from_parts(67_686_387, 0) .saturating_add(Weight::from_parts(0, 3627)) - // Standard Error: 16_565 - .saturating_add(Weight::from_parts(15_261_224, 0).saturating_mul(a.into())) + // Standard Error: 39_327 + .saturating_add(Weight::from_parts(34_481_994, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,8 +120,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3627` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 45_342_000 picoseconds. + Weight::from_parts(46_001_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -134,8 +134,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `742` // Estimated: `3627` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 74_529_000 picoseconds. + Weight::from_parts(75_324_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -148,8 +148,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `3627` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 88_479_000 picoseconds. + Weight::from_parts(89_609_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -164,8 +164,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `6160` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 117_641_000 picoseconds. + Weight::from_parts(118_724_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -180,8 +180,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `6160` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(40_000_000, 0) + // Minimum execution time: 104_173_000 picoseconds. + Weight::from_parts(105_048_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -196,8 +196,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `6160` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 117_687_000 picoseconds. + Weight::from_parts(118_778_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -210,8 +210,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `3627` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 49_580_000 picoseconds. + Weight::from_parts(51_412_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -224,8 +224,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `3627` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 50_272_000 picoseconds. + Weight::from_parts(50_721_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -236,8 +236,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 39_378_000 picoseconds. + Weight::from_parts(40_431_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -248,8 +248,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 39_260_000 picoseconds. + Weight::from_parts(40_296_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -262,8 +262,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3627` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 46_130_000 picoseconds. + Weight::from_parts(46_914_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -274,8 +274,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 39_320_000 picoseconds. + Weight::from_parts(39_816_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -290,13 +290,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3627` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_046_785, 0) + // Minimum execution time: 82_146_000 picoseconds. + Weight::from_parts(84_032_850, 0) .saturating_add(Weight::from_parts(0, 3627)) - // Standard Error: 1_237 - .saturating_add(Weight::from_parts(359, 0).saturating_mul(n.into())) - // Standard Error: 1_237 - .saturating_add(Weight::from_parts(1_524, 0).saturating_mul(s.into())) + // Standard Error: 1_937 + .saturating_add(Weight::from_parts(13_007, 0).saturating_mul(n.into())) + // Standard Error: 1_937 + .saturating_add(Weight::from_parts(8_898, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -308,8 +308,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `538` // Estimated: `3627` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 82_417_000 picoseconds. + Weight::from_parts(83_273_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -324,11 +324,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `278` // Estimated: `3627` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_743_162, 0) + // Minimum execution time: 43_932_000 picoseconds. + Weight::from_parts(46_482_581, 0) .saturating_add(Weight::from_parts(0, 3627)) - // Standard Error: 1_134 - .saturating_add(Weight::from_parts(995, 0).saturating_mul(s.into())) + // Standard Error: 1_036 + .saturating_add(Weight::from_parts(7_325, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -340,8 +340,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `538` // Estimated: `3627` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 81_684_000 picoseconds. + Weight::from_parts(82_845_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -352,8 +352,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 37_613_000 picoseconds. + Weight::from_parts(38_502_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -366,8 +366,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 88_136_000 picoseconds. + Weight::from_parts(89_327_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -384,8 +384,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `583` // Estimated: `6160` - // Minimum execution time: 64_000_000 picoseconds. - Weight::from_parts(64_000_000, 0) + // Minimum execution time: 167_257_000 picoseconds. + Weight::from_parts(169_084_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -398,8 +398,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `3627` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + // Minimum execution time: 91_781_000 picoseconds. + Weight::from_parts(92_693_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -412,8 +412,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `3627` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + // Minimum execution time: 92_265_000 picoseconds. + Weight::from_parts(93_554_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -424,8 +424,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3627` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 40_967_000 picoseconds. + Weight::from_parts(41_834_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -440,8 +440,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `833` // Estimated: `3627` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + // Minimum execution time: 92_375_000 picoseconds. + Weight::from_parts(93_572_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -454,8 +454,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `742` // Estimated: `3627` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 89_149_000 picoseconds. + Weight::from_parts(90_221_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -470,8 +470,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `545` // Estimated: `3627` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 84_276_000 picoseconds. + Weight::from_parts(85_582_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -484,8 +484,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `474` // Estimated: `3627` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 82_401_000 picoseconds. + Weight::from_parts(83_268_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -498,8 +498,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `437` // Estimated: `3627` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 50_520_000 picoseconds. + Weight::from_parts(51_197_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) From 2b84a69e7c40bff66b01217b03a6faf5a1d1a6db Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 27 May 2024 01:47:07 +0000 Subject: [PATCH 070/112] Update benchmarks for frame-benchmarking on feat/substrate-v1.0.0 --- runtime/src/weights/frame_benchmarking.rs | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/runtime/src/weights/frame_benchmarking.rs b/runtime/src/weights/frame_benchmarking.rs index 7ee03ea5e..e6e107796 100644 --- a/runtime/src/weights/frame_benchmarking.rs +++ b/runtime/src/weights/frame_benchmarking.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `frame_benchmarking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -37,8 +37,8 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(88_235, 0) + // Minimum execution time: 1_300_000 picoseconds. + Weight::from_parts(1_441_608, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -46,8 +46,8 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(95_764, 0) + // Minimum execution time: 285_000 picoseconds. + Weight::from_parts(1_406_233, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -55,8 +55,8 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(111_764, 0) + // Minimum execution time: 1_285_000 picoseconds. + Weight::from_parts(1_389_130, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -65,15 +65,15 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(190_117, 0) + Weight::from_parts(1_437_297, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 27_646_000_000 picoseconds. - Weight::from_parts(28_298_000_000, 0) + // Minimum execution time: 49_887_491_000 picoseconds. + Weight::from_parts(50_014_751_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -81,10 +81,10 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(3_751_115, 0) + // Minimum execution time: 1_574_000 picoseconds. + Weight::from_parts(11_787_670, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 50_091 - .saturating_add(Weight::from_parts(38_529_945, 0).saturating_mul(i.into())) + // Standard Error: 10_523 + .saturating_add(Weight::from_parts(81_579_909, 0).saturating_mul(i.into())) } } From 850dc52e19ef939f2a759c3d36bfccb29314a04c Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Mon, 27 May 2024 13:55:25 +1200 Subject: [PATCH 071/112] Feat/substrate v1.0.0 test 2 (#844) * Use storage_alias instead of unsafe storage getters in ethy * Fix tests for Futurepass * Add benchmark for pallet-vortex * Fix Futurepass tests * Add extra tests to marketplace and tidy up SFT --------- Co-authored-by: surangap <19677661+surangap@users.noreply.github.com> --- Cargo.lock | 1 - client/src/rpc.rs | 3 - client/src/service.rs | 1 - pallet/ethy/Cargo.toml | 1 - pallet/ethy/src/mock.rs | 138 ++++----- pallet/ethy/src/tests.rs | 3 +- pallet/futurepass/src/mock.rs | 14 +- pallet/futurepass/src/tests.rs | 286 ++++++++++++++---- pallet/marketplace/src/tests.rs | 240 +++++++++++++++ pallet/sft/src/lib.rs | 10 +- .../vortex-distribution/src/benchmarking.rs | 9 + pallet/vortex-distribution/src/lib.rs | 3 +- pallet/vortex-distribution/src/weights.rs | 23 ++ runtime/src/impls.rs | 14 +- runtime/src/weights/pallet_vortex.rs | 11 + 15 files changed, 590 insertions(+), 167 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcdaf3a40..4e360924d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5616,7 +5616,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "seed-runtime", "serde", "serde_json", "sp-application-crypto", diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 0da9edbdb..070827adb 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -114,8 +114,6 @@ pub struct FullDeps { pub filter_pool: Option, /// Frontier Backend. pub frontier_backend: Arc + Send + Sync>, - /// Backend. - pub backend: Arc, /// Maximum number of logs in a query. pub max_past_logs: u32, /// Fee history cache. @@ -224,7 +222,6 @@ where network, filter_pool, frontier_backend, - backend: _, max_past_logs, fee_history_cache, fee_history_cache_limit, diff --git a/client/src/service.rs b/client/src/service.rs index 4b524f625..66e7562fa 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -411,7 +411,6 @@ pub fn new_full(config: Configuration, cli: &Cli) -> Result Arc::new(b), fc_db::Backend::Sql(b) => Arc::new(b), diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index 722b183e6..b3a4f8c55 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -39,7 +39,6 @@ pallet-assets-ext = { path = "../assets-ext" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -seed-runtime = { path = "../../runtime" } [features] default = ["std"] diff --git a/pallet/ethy/src/mock.rs b/pallet/ethy/src/mock.rs index f809460ed..93e3089f2 100644 --- a/pallet/ethy/src/mock.rs +++ b/pallet/ethy/src/mock.rs @@ -24,8 +24,10 @@ use crate::{ use codec::{Decode, Encode}; use ethereum_types::U64; use frame_support::{ + pallet_prelude::{OptionQuery, ValueQuery}, + storage_alias, traits::{UnixTime, ValidatorSet as ValidatorSetT}, - StorageHasher, Twox64Concat, + Identity, Twox64Concat, }; use scale_info::TypeInfo; use seed_pallet_common::test_prelude::*; @@ -33,7 +35,6 @@ use seed_primitives::{ ethy::{crypto::AuthorityId, EventProofId}, Signature, }; -use seed_runtime::migrations::{Map, Value}; use sp_application_crypto::RuntimeAppPublic; use sp_core::{ByteArray, Get}; use sp_keystore::{testing::MemoryKeystore, Keystore, KeystoreExt}; @@ -261,9 +262,38 @@ impl MockReceiptBuilder { } } +#[storage_alias] +pub type BlockResponseAt = + StorageMap, Identity, u64, MockBlockResponse>; + +#[storage_alias] +pub type TransactionReceiptFor = + StorageMap, Twox64Concat, EthHash, MockReceiptResponse>; + +#[storage_alias] +pub type CallAt = + StorageDoubleMap, Twox64Concat, u64, Twox64Concat, EthAddress, Vec>; + +#[storage_alias] +pub type Forcing = StorageValue, bool, ValueQuery>; + +#[storage_alias] +pub type Validators = StorageValue, Vec, ValueQuery>; + +#[storage_alias] +pub type Timestamp = StorageValue, u64, OptionQuery>; + +#[storage_alias] +pub type LastCallResult = + StorageValue, (EthCallId, CheckedEthCallResult), OptionQuery>; + +#[storage_alias] +pub type LastCallFailure = + StorageValue, (EthCallId, EthCallFailure), OptionQuery>; + /// set the block timestamp pub fn mock_timestamp(now: u64) { - Value::unsafe_storage_put::(b"Test", b"Timestamp", now) + Timestamp::::put(now) } // get the system unix timestamp in seconds @@ -324,12 +354,7 @@ impl MockEthereumRpcClient { block_number: mock_block.number.unwrap().as_u64(), timestamp: mock_block.timestamp, }; - Map::unsafe_storage_put::( - b"Test", - b"BlockResponseAt", - &Twox64Concat::hash(&block_number.encode()), - mock_block_response, - ); + BlockResponseAt::::insert(block_number, mock_block_response) } /// Mock a tx receipt response for a hash pub fn mock_transaction_receipt_for(tx_hash: EthHash, mock_tx_receipt: TransactionReceipt) { @@ -341,20 +366,11 @@ impl MockEthereumRpcClient { to: mock_tx_receipt.to, logs: mock_tx_receipt.logs.into_iter().map(From::from).collect(), }; - Map::unsafe_storage_put::( - b"Test", - b"TransactionReceiptFor", - &Twox64Concat::hash(&tx_hash.encode()), - mock_receipt_response, - ); + TransactionReceiptFor::::insert(tx_hash, mock_receipt_response); } /// setup a mock returndata for an `eth_call` at `block` and `contract` address pub fn mock_call_at(block_number: u64, contract: H160, return_data: &[u8]) { - let mut key = Twox64Concat::hash(&block_number.encode()); - let key_2 = Twox64Concat::hash(&contract.encode()); - key.extend_from_slice(&key_2); - println!("mock_call_at: {:?} : {:?}", block_number, key); - Map::unsafe_storage_put::>(b"Test", b"CallAt", &key, return_data.to_vec()); + CallAt::::insert(block_number, contract, return_data.to_vec()) } } @@ -364,28 +380,8 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { block_number: LatestOrNumber, ) -> Result, BridgeRpcError> { let mock_block_response = match block_number { - LatestOrNumber::Latest => { - let mut response: Vec = Map::unsafe_keys_get::< - BlockNumber, - MockBlockResponse, - Twox64Concat, - >(b"Test", b"BlockResponseAt"); - if response.is_empty() { - return Ok(None) - } - response.sort(); - let last_key = response.iter().last().unwrap(); - Map::unsafe_storage_get::( - b"Test", - b"BlockResponseAt", - &Twox64Concat::hash(&last_key.encode()), - ) - }, - LatestOrNumber::Number(block) => Map::unsafe_storage_get::( - b"Test", - b"BlockResponseAt", - &Twox64Concat::hash(&block.encode()), - ), + LatestOrNumber::Latest => BlockResponseAt::::iter().last().map(|x| x.1).or(None), + LatestOrNumber::Number(block) => BlockResponseAt::::get(block), }; if mock_block_response.is_none() { return Ok(None) @@ -404,11 +400,7 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { fn get_transaction_receipt( hash: EthHash, ) -> Result, BridgeRpcError> { - let mock_receipt = Map::unsafe_storage_get::( - b"Test", - b"TransactionReceiptFor", - &Twox64Concat::hash(&hash.encode()), - ); + let mock_receipt = TransactionReceiptFor::::get(hash); if mock_receipt.is_none() { return Ok(None) } @@ -432,28 +424,10 @@ impl BridgeEthereumRpcApi for MockEthereumRpcClient { ) -> Result, BridgeRpcError> { let block_number = match at_block { LatestOrNumber::Number(n) => n, - LatestOrNumber::Latest => { - let mut response = Map::unsafe_keys_get::< - BlockNumber, - MockBlockResponse, - Twox64Concat, - >(b"Test", b"BlockResponseAt"); - response.sort(); - let last_key = response.iter().last().unwrap(); - Map::unsafe_storage_get::( - b"Test", - b"BlockResponseAt", - &Twox64Concat::hash(&last_key.encode()), - ) - .unwrap() - .block_number - }, + LatestOrNumber::Latest => + BlockResponseAt::::iter().last().unwrap().1.block_number, }; - let mut key = Twox64Concat::hash(&block_number.encode()); - let key_2 = Twox64Concat::hash(&target.encode()); - key.extend_from_slice(&key_2); - Map::unsafe_storage_get::>(b"Test", b"CallAt", &key) - .ok_or(BridgeRpcError::HttpFetch) + CallAt::::get(block_number, target).ok_or(BridgeRpcError::HttpFetch) } } @@ -474,7 +448,7 @@ impl ValidatorSetT for MockValidatorSet { } /// Returns the active set of validators. fn validators() -> Vec { - Value::unsafe_storage_get::>(b"Test", b"Validators").unwrap_or_default() + Validators::::get() } } impl MockValidatorSet { @@ -482,7 +456,7 @@ impl MockValidatorSet { pub fn mock_n_validators(n: u8) { let validators: Vec = (1..=n as u64).map(|i| H160::from_low_u64_be(i).into()).collect(); - Value::unsafe_storage_put::>(b"Test", b"Validators", validators); + Validators::::put(validators); } } @@ -504,31 +478,26 @@ impl EthCallOracleSubscriber for MockEthCallSubscriber { block_number: u64, block_timestamp: u64, ) { - Value::unsafe_storage_put::<(EthCallId, CheckedEthCallResult)>( - b"Test", - b"LastCallResult", - (call_id, CheckedEthCallResult::Ok(*return_data, block_number, block_timestamp)), - ); + LastCallResult::::put(( + call_id, + CheckedEthCallResult::Ok(*return_data, block_number, block_timestamp), + )); } /// Stores the failed call info /// Available via `Self::failed_call_for()` fn on_eth_call_failed(call_id: Self::CallId, reason: EthCallFailure) { - Value::unsafe_storage_put::<(EthCallId, EthCallFailure)>( - b"Test", - b"LastCallFailure", - (call_id, reason), - ); + LastCallFailure::::put((call_id, reason)) } } impl MockEthCallSubscriber { /// Returns last known successful call, if any pub fn success_result() -> Option<(EthCallId, CheckedEthCallResult)> { - Value::unsafe_storage_get::<(EthCallId, CheckedEthCallResult)>(b"Test", b"LastCallResult") + LastCallResult::::get() } /// Returns last known failed call, if any pub fn failed_result() -> Option<(EthCallId, EthCallFailure)> { - Value::unsafe_storage_get::<(EthCallId, EthCallFailure)>(b"Test", b"LastCallFailure") + LastCallFailure::::get() } } @@ -537,8 +506,7 @@ pub struct MockFinalSessionTracker; impl FinalSessionTracker for MockFinalSessionTracker { fn is_active_session_final() -> bool { // at block 100, or if we are forcing, the active session is final - let forcing: bool = - Value::unsafe_storage_get::(b"Test", b"Forcing").unwrap_or_default(); + let forcing: bool = Forcing::::get(); frame_system::Pallet::::block_number() == 100 || forcing } } @@ -547,7 +515,7 @@ impl FinalSessionTracker for MockFinalSessionTracker { pub struct MockUnixTime; impl UnixTime for MockUnixTime { fn now() -> core::time::Duration { - match Value::unsafe_storage_get::(b"Test", b"Timestamp") { + match Timestamp::::get() { // Use configured value for tests requiring precise timestamps Some(s) => core::time::Duration::new(s, 0), // fallback, use block number to derive timestamp for tests that only care abut block diff --git a/pallet/ethy/src/tests.rs b/pallet/ethy/src/tests.rs index ea312acae..bc527071a 100644 --- a/pallet/ethy/src/tests.rs +++ b/pallet/ethy/src/tests.rs @@ -41,7 +41,6 @@ use seed_primitives::{ }, xrpl::XrplAccountId, }; -use seed_runtime::migrations::Value; use sp_core::{bounded::WeakBoundedVec, ByteArray}; use sp_keystore::{testing::MemoryKeystore, Keystore}; use sp_runtime::{ @@ -1450,7 +1449,7 @@ fn force_new_era_with_scheduled_authority_change_works() { assert!(NextAuthorityChange::::get().is_none()); // Simulate force new era - Value::unsafe_storage_put::(b"Test", b"Forcing", true); + Forcing::::put(true); // Add a validator to the next_keys, simulating a change in validator during the last // session diff --git a/pallet/futurepass/src/mock.rs b/pallet/futurepass/src/mock.rs index 391b1200e..ea2df89f2 100644 --- a/pallet/futurepass/src/mock.rs +++ b/pallet/futurepass/src/mock.rs @@ -18,7 +18,8 @@ use frame_support::traits::{Currency, ExistenceRequirement, InstanceFilter, Rese use seed_pallet_common::test_prelude::*; use seed_runtime::{ impls::{ProxyPalletProvider, ProxyType}, - AnnouncementDepositBase, AnnouncementDepositFactor, ProxyDepositBase, ProxyDepositFactor, + AnnouncementDepositBase, AnnouncementDepositFactor, Inspect, ProxyDepositBase, + ProxyDepositFactor, }; use sp_core::{ecdsa, Pair}; @@ -130,12 +131,19 @@ impl ProxyProvider for ProxyPalletProvider { let (proxy_definitions, reserve_amount) = pallet_proxy::Proxies::::get(futurepass); // get proxy_definitions length + 1 (cost of upcoming insertion); cost to reserve let new_reserve = pallet_proxy::Pallet::::deposit(proxy_definitions.len() as u32 + 1); - let extra_reserve_required = new_reserve - reserve_amount + ExistentialDeposit::get(); + let mut extra_reserve_required = new_reserve - reserve_amount; + + let account_balance = + pallet_assets_ext::Pallet::::balance(MOCK_NATIVE_ASSET_ID, &futurepass); + let minimum_balance = ExistentialDeposit::get(); + if account_balance < minimum_balance { + extra_reserve_required = extra_reserve_required.saturating_add(minimum_balance); + } as Currency<_>>::transfer( funder, futurepass, extra_reserve_required, - ExistenceRequirement::AllowDeath, + ExistenceRequirement::KeepAlive, )?; let proxy_type = ProxyType::try_from(*proxy_type)?; diff --git a/pallet/futurepass/src/tests.rs b/pallet/futurepass/src/tests.rs index 3218d0668..5fc731234 100644 --- a/pallet/futurepass/src/tests.rs +++ b/pallet/futurepass/src/tests.rs @@ -15,7 +15,7 @@ use super::*; use crate::mock::*; -use frame_support::traits::tokens::{fungibles::Mutate, Preservation}; +use frame_support::traits::tokens::{fungibles::Mutate, Fortitude, Preservation}; use hex_literal::hex; use seed_pallet_common::test_prelude::*; use seed_runtime::{impls::ProxyType, Inspect}; @@ -23,9 +23,11 @@ use sp_runtime::traits::Hash; type MockCall = crate::mock::RuntimeCall; -// ProxyDepositBase + ProxyDepositFactor * 1(num of delegates) + 1 for Existential deposit +// ProxyDepositBase + ProxyDepositFactor * 1(num of delegates) +// + 1 for Existential deposit of the Futurepass const FP_CREATION_RESERVE: Balance = 148 + 126 + 1; -const FP_DELEGATE_RESERVE: Balance = 126 * 1 + 1; // ProxyDepositFactor * 1(num of delegates) +// ProxyDepositFactor * 1(num of delegates) +const FP_DELEGATE_RESERVE: Balance = 126 * 1; fn transfer_funds(asset_id: AssetId, source: &AccountId, destination: &AccountId, amount: Balance) { assert_ok!(>::transfer( @@ -62,6 +64,15 @@ fn create_futurepass_by_owner() { // fund owner transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_CREATION_RESERVE + 1); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite + ), + FP_CREATION_RESERVE + ); let futurepass_addr = AccountId::from(hex!("ffffffff00000000000000000000000000000001")); assert_eq!(::Proxy::owner(&futurepass_addr), None); @@ -78,6 +89,28 @@ fn create_futurepass_by_owner() { assert!(::Proxy::exists(&futurepass, &owner, Some(ProxyType::Owner))); assert_eq!(::Proxy::owner(&futurepass).unwrap(), owner); + // balances check + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 1); // only the extra ED + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite + ), + 0 + ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), 1); // only the extra ED component in FP_CREATION_RESERVE + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite + ), + 0 + ); + // try to create futurepass for the owner again should result error assert_noop!( Futurepass::create(RuntimeOrigin::signed(owner), owner), @@ -99,10 +132,10 @@ fn create_futurepass_by_other() { let owner = create_account(2); let other = create_account(3); - // fund other - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &other, FP_CREATION_RESERVE); + // fund other, add 1 for Existential deposit of Futurepass + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &other, FP_CREATION_RESERVE + 1); // check balances - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), FP_CREATION_RESERVE); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other,), FP_CREATION_RESERVE + 1); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 0); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(other), owner)); @@ -119,8 +152,16 @@ fn create_futurepass_by_other() { assert!(::Proxy::exists(&futurepass, &owner, Some(ProxyType::Owner))); assert_eq!(::Proxy::owner(&futurepass).unwrap(), owner); - // check that FP_CREATION_RESERVE is paid by the caller(other) - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); + // check that FP_CREATION_RESERVE is paid by the caller(other + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &other, + Preservation::Preserve, + Fortitude::Polite, + ), + 0 + ); }); } @@ -140,7 +181,7 @@ fn register_delegate_by_owner_works() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -155,8 +196,15 @@ fn register_delegate_by_owner_works() { // register delegate // owner needs another FP_DELEGATE_RESERVE for this transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_DELEGATE_RESERVE); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_DELEGATE_RESERVE); - + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite, + ), + FP_DELEGATE_RESERVE + ); let signature = signer .sign_prehashed( &Futurepass::generate_add_delegate_eth_signed_message( @@ -205,7 +253,7 @@ fn register_delegate_by_non_delegate_fails() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -241,7 +289,7 @@ fn register_delegate_with_not_allowed_proxy_type_fails() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -279,7 +327,7 @@ fn register_delegate_fails_if_deadline_expired() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -316,7 +364,7 @@ fn register_delegate_fails_on_signature_mismatch() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -388,7 +436,7 @@ fn register_delegate_failures_common() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -494,7 +542,7 @@ fn unregister_delegate_by_owner_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, // extra 1 is for the ED of owner ); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -524,7 +572,15 @@ fn unregister_delegate_by_owner_works() { )); assert!(::Proxy::exists(&futurepass, &delegate, Some(proxy_type))); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 0); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite, + ), + 0 + ); // unregister_delegate assert_ok!(Futurepass::unregister_delegate( RuntimeOrigin::signed(owner), @@ -537,9 +593,15 @@ fn unregister_delegate_by_owner_works() { ); // check the reserved amount has been received by the caller. i.e the owner + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_DELEGATE_RESERVE + 1); assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), - FP_DELEGATE_RESERVE - ExistentialDeposit::get() + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite + ), + FP_DELEGATE_RESERVE ); // check delegate is not a proxy of futurepass @@ -570,7 +632,7 @@ fn unregister_delegate_by_the_delegate_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -612,10 +674,7 @@ fn unregister_delegate_by_the_delegate_works() { Event::::DelegateUnregistered { futurepass, delegate }.into(), ); // check the reserved amount has been received by the caller. i.e the delegate - assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &delegate), - FP_DELEGATE_RESERVE - ExistentialDeposit::get() - ); + assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &delegate), FP_DELEGATE_RESERVE); // check delegate is not a proxy of futurepass assert_eq!( @@ -648,7 +707,7 @@ fn unregister_delegate_by_not_permissioned_fails() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + 2 * FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + 2 * FP_DELEGATE_RESERVE + 1, // extra ED is for the owner ); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -733,7 +792,7 @@ fn unregister_delegate_by_owner_itself_fails() { let owner = create_account(2); // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -766,7 +825,7 @@ fn unregister_delegate_failures_common() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -840,7 +899,7 @@ fn transfer_futurepass_to_address_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -875,7 +934,15 @@ fn transfer_futurepass_to_address_works() { // fund owner since it requires FP_DELEGATE_RESERVE to add new owner // the owner will get back the old reserve amount transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_DELEGATE_RESERVE); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), FP_DELEGATE_RESERVE); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite, + ), + FP_DELEGATE_RESERVE + ); assert_ok!(Futurepass::transfer_futurepass( RuntimeOrigin::signed(owner), owner, @@ -909,8 +976,13 @@ fn transfer_futurepass_to_address_works() { ); // caller(the owner) should receive the reserved balance diff assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), - 2 * FP_DELEGATE_RESERVE - 2 * ExistentialDeposit::get() + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite + ), + 2 * FP_DELEGATE_RESERVE ); }); } @@ -935,10 +1007,15 @@ fn transfer_futurepass_to_none_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite + ), FP_CREATION_RESERVE + FP_DELEGATE_RESERVE ); @@ -973,7 +1050,15 @@ fn transfer_futurepass_to_none_works() { // transfer the ownership to none // fund owner since it requires FP_DELEGATE_RESERVE to add new owner // the owner will get back the old reserve amount - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 0); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite, + ), + 0 + ); assert_ok!(Futurepass::transfer_futurepass(RuntimeOrigin::signed(owner), owner, None)); // assert event System::assert_has_event( @@ -995,7 +1080,16 @@ fn transfer_futurepass_to_none_works() { false ); // caller(the owner) should receive the reserved balance diff - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &owner), 400); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &owner, + Preservation::Preserve, + Fortitude::Polite, + ), + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE - 1 /* ED from the futurepass will not + * be received. */ + ); }); } @@ -1020,7 +1114,7 @@ fn transfer_futurepass_failures() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1051,7 +1145,7 @@ fn transfer_futurepass_failures() { assert!(::Proxy::exists(&futurepass, &delegate, Some(proxy_type))); // fund owner2 - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner2, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner2, FP_CREATION_RESERVE + 1); // create FP for owner2 assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner2), owner2)); @@ -1093,7 +1187,7 @@ fn proxy_extrinsic_simple_transfer_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1124,7 +1218,15 @@ fn proxy_extrinsic_simple_transfer_works() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // transfer other via proxy_extrinsic @@ -1147,8 +1249,13 @@ fn proxy_extrinsic_simple_transfer_works() { ); // check balances assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), - fund_amount - transfer_amount + 2 + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount - transfer_amount ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), transfer_amount); // owner's(i.e caller's) balance not changed @@ -1165,8 +1272,13 @@ fn proxy_extrinsic_simple_transfer_works() { )); //check balances assert_eq!( - AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), - fund_amount - 2 * transfer_amount + 2 + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount - 2 * transfer_amount ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 2 * transfer_amount); // delegate's(i.e caller's) balance not changed @@ -1195,7 +1307,7 @@ fn proxy_extrinsic_non_transfer_call_works() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1269,7 +1381,7 @@ fn proxy_extrinsic_by_non_delegate_fails() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1300,7 +1412,15 @@ fn proxy_extrinsic_by_non_delegate_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); let transfer_amount: Balance = 100; @@ -1320,7 +1440,15 @@ fn proxy_extrinsic_by_non_delegate_fails() { pallet_proxy::Error::::NotProxy ); //check balances - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); }); } @@ -1346,7 +1474,7 @@ fn proxy_extrinsic_to_futurepass_non_whitelist_fails() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1377,7 +1505,15 @@ fn proxy_extrinsic_to_futurepass_non_whitelist_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // pallet_futurepass calls other than the whitelist can not be called via @@ -1426,7 +1562,7 @@ fn proxy_extrinsic_to_proxy_pallet_fails() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1457,7 +1593,15 @@ fn proxy_extrinsic_to_proxy_pallet_fails() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); // pallet_proxy calls can not be called via proxy_extrinsic @@ -1508,7 +1652,7 @@ fn proxy_extrinsic_failures_common() { MOCK_NATIVE_ASSET_ID, &funder, &owner, - FP_CREATION_RESERVE + FP_DELEGATE_RESERVE, + FP_CREATION_RESERVE + FP_DELEGATE_RESERVE + 1, ); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); @@ -1539,7 +1683,15 @@ fn proxy_extrinsic_failures_common() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 2); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &other), 0); let transfer_amount: Balance = 100; @@ -1602,7 +1754,7 @@ fn whitelist_works() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -1610,7 +1762,15 @@ fn whitelist_works() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 1); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); let signature = signer .sign_prehashed( @@ -1691,7 +1851,7 @@ fn whitelist_works_for_transfer_futurepass() { let owner2 = create_account(3); // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -1749,7 +1909,7 @@ fn delegate_can_not_call_whitelist_via_proxy_extrinsic() { let deadline = 200; // fund owner - transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE); + transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &owner, FP_CREATION_RESERVE + 1); // create FP for owner assert_ok!(Futurepass::create(RuntimeOrigin::signed(owner), owner)); let futurepass = Holders::::get(&owner).unwrap(); @@ -1757,7 +1917,15 @@ fn delegate_can_not_call_whitelist_via_proxy_extrinsic() { // fund futurepass with some tokens let fund_amount: Balance = 1000; transfer_funds(MOCK_NATIVE_ASSET_ID, &funder, &futurepass, fund_amount); - assert_eq!(AssetsExt::balance(MOCK_NATIVE_ASSET_ID, &futurepass), fund_amount + 1); + assert_eq!( + AssetsExt::reducible_balance( + MOCK_NATIVE_ASSET_ID, + &futurepass, + Preservation::Preserve, + Fortitude::Polite, + ), + fund_amount + ); let signature = signer .sign_prehashed( diff --git a/pallet/marketplace/src/tests.rs b/pallet/marketplace/src/tests.rs index af9ffbf9e..b94a6463f 100644 --- a/pallet/marketplace/src/tests.rs +++ b/pallet/marketplace/src/tests.rs @@ -1104,6 +1104,67 @@ fn buy() { }); } +#[test] +fn buy_with_xrp() { + let buyer = create_account(5); + let price = 1_000; + + TestExt::::default() + .with_asset(XRP_ASSET_ID, "XRP", &[(buyer, price)]) + .build() + .execute_with(|| { + let (collection_id, token_id, token_owner) = setup_nft_token(); + let buyer = create_account(5); + + let listing_id = Marketplace::next_listing_id(); + let serial_numbers: BoundedVec = + BoundedVec::try_from(vec![token_id.1]).unwrap(); + assert_ok!(Marketplace::sell_nft( + Some(token_owner).into(), + collection_id, + serial_numbers, + Some(buyer), + XRP_ASSET_ID, + price, + None, + None + )); + + assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); + // no royalties, all proceeds to token owner minus network fee + assert_eq!( + AssetsExt::balance(XRP_ASSET_ID, &token_owner), + price - MarketplaceNetworkFeePercentage::get().mul(price) + ); + // Buyer balance should be 0 + assert_eq!(AssetsExt::balance(XRP_ASSET_ID, &buyer), 0); + + // listing removed + assert!(Listings::::get(listing_id).is_none()); + assert!(Marketplace::listing_end_schedule( + System::block_number() + ::DefaultListingDuration::get(), + listing_id + ) + .is_none()); + + // ownership changed + assert!(TokenLocks::::get(&token_id).is_none()); + assert!(Marketplace::open_collection_listings(collection_id, listing_id).is_none()); + assert_eq!( + Nft::owned_tokens(collection_id, &buyer, 0, 1000), + (0_u32, 1, vec![token_id.1]) + ); + + // assert network fees accumulated + let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); + + assert_eq!( + AssetsExt::balance(XRP_ASSET_ID, &fee_pot_account), + 5, // 0.5% of 1000 + ); + }); +} + #[test] fn buy_with_royalties() { let buyer = create_account(5); @@ -1630,6 +1691,95 @@ fn auction() { }); } +#[test] +fn auction_with_xrp_asset() { + let bidder_1 = create_account(5); + let bidder_2 = create_account(6); + let reserve_price = 100_000; + let winning_bid = reserve_price + 1; + + TestExt::::default() + .with_asset(XRP_ASSET_ID, "XRP", &[(bidder_1, reserve_price), (bidder_2, winning_bid)]) + .build() + .execute_with(|| { + let (collection_id, token_id, token_owner) = setup_nft_token(); + + let listing_id = Marketplace::next_listing_id(); + let serial_numbers: BoundedVec = + BoundedVec::try_from(vec![token_id.1]).unwrap(); + assert_ok!(Marketplace::auction_nft( + Some(token_owner).into(), + collection_id, + serial_numbers.clone(), + XRP_ASSET_ID, + reserve_price, + Some(1), + None, + )); + assert_eq!( + TokenLocks::::get(&token_id).unwrap(), + TokenLockReason::Listed(listing_id) + ); + assert_eq!(Marketplace::next_listing_id(), listing_id + 1); + assert!(Marketplace::open_collection_listings(collection_id, listing_id).unwrap()); + + // first bidder at reserve price + assert_ok!(Marketplace::bid(Some(bidder_1).into(), listing_id, reserve_price,)); + assert_eq!( + AssetsExt::hold_balance(&MarketplacePalletId::get(), &bidder_1, &XRP_ASSET_ID), + reserve_price + ); + + // second bidder raises bid + assert_ok!(Marketplace::bid(Some(bidder_2).into(), listing_id, winning_bid,)); + assert_eq!( + AssetsExt::hold_balance(&MarketplacePalletId::get(), &bidder_2, &XRP_ASSET_ID), + winning_bid + ); + assert!(AssetsExt::hold_balance(&MarketplacePalletId::get(), &bidder_1, &XRP_ASSET_ID) + .is_zero()); + + // end auction + let _ = Marketplace::on_initialize( + System::block_number() + AUCTION_EXTENSION_PERIOD as u64, + ); + + // no royalties, all proceeds to token owner minus network fees + assert_eq!( + AssetsExt::balance(XRP_ASSET_ID, &token_owner), + winning_bid - MarketplaceNetworkFeePercentage::get().mul(winning_bid) + ); + // bidder2 funds should be all gone (unreserved and transferred) + assert!(AssetsExt::balance(XRP_ASSET_ID, &bidder_2).is_zero()); + assert!(AssetsExt::hold_balance(&MarketplacePalletId::get(), &bidder_2, &XRP_ASSET_ID) + .is_zero()); + // listing metadata removed + assert!(Listings::::get(listing_id).is_none()); + assert!( + Marketplace::listing_end_schedule(System::block_number() + 1, listing_id).is_none() + ); + + // ownership changed + assert!(TokenLocks::::get(&token_id).is_none()); + assert_eq!( + Nft::owned_tokens(collection_id, &bidder_2, 0, 1000), + (0_u32, 1, vec![token_id.1]) + ); + assert!(Marketplace::open_collection_listings(collection_id, listing_id).is_none()); + + // event logged + let tokens = ListingTokens::Nft(NftListing { collection_id, serial_numbers }); + System::assert_last_event(MockEvent::Marketplace(Event::::AuctionSold { + tokens, + listing_id, + marketplace_id: None, + payment_asset: XRP_ASSET_ID, + hammer_price: winning_bid, + winner: bidder_2, + })); + }); +} + #[test] fn bid_auto_extends() { let bidder_1 = create_account(5); @@ -2926,6 +3076,96 @@ mod buy_sft { }); } + #[test] + fn buy_sft_with_xrp() { + let buyer = create_account(5); + let price = 1_000; + + TestExt::::default() + .with_asset(XRP_ASSET_ID, "XRP", &[(buyer, price)]) + .build() + .execute_with(|| { + let initial_issuance = 100; + let (collection_id, token_id, token_owner) = setup_sft_token(initial_issuance); + let buyer = create_account(5); + + let listing_id = Marketplace::next_listing_id(); + let sell_quantity = 60; + let serial_numbers: BoundedVec<(SerialNumber, Balance), MaxTokensPerListing> = + BoundedVec::truncate_from(vec![(token_id.1, sell_quantity)]); + let sft_token = ListingTokens::Sft(SftListing { + collection_id, + serial_numbers: serial_numbers.clone(), + }); + assert_ok!(Marketplace::sell( + Some(token_owner).into(), + sft_token.clone(), + None, + XRP_ASSET_ID, + price, + None, + None, + )); + + assert_ok!(Marketplace::buy(Some(buyer).into(), listing_id)); + // no royalties, all proceeds to token owner minus network fee + assert_eq!( + AssetsExt::balance(XRP_ASSET_ID, &token_owner), + price - MarketplaceNetworkFeePercentage::get().mul(price) + ); + // Buyer balance should be zero + assert_eq!(AssetsExt::balance(XRP_ASSET_ID, &buyer), 0); + + // listing removed + assert!(Listings::::get(listing_id).is_none()); + assert!(Marketplace::listing_end_schedule( + System::block_number() + ::DefaultListingDuration::get(), + listing_id + ) + .is_none()); + assert!(Marketplace::open_collection_listings(collection_id, listing_id).is_none()); + + // Check SFT balances of both seller and buyer + let seller_balance = sft_balance_of(token_id, &token_owner); + assert_eq!(seller_balance.free_balance, initial_issuance - sell_quantity); + assert_eq!(seller_balance.reserved_balance, 0); + + let buyer_balance = sft_balance_of(token_id, &buyer); + assert_eq!(buyer_balance.free_balance, sell_quantity); + assert_eq!(buyer_balance.reserved_balance, 0); + + // assert network fees accumulated + let fee_pot_account: AccountId = FeePotId::get().into_account_truncating(); + assert_eq!( + AssetsExt::balance(XRP_ASSET_ID, &fee_pot_account), + 5, // 0.5% of 1000 + ); + + System::assert_has_event(MockEvent::Marketplace( + Event::::FixedPriceSaleComplete { + tokens: sft_token.clone(), + listing_id, + marketplace_id: None, + price, + payment_asset: XRP_ASSET_ID, + seller: token_owner, + buyer, + }, + )); + + System::assert_has_event( + pallet_sft::Event::::Transfer { + previous_owner: token_owner, + collection_id, + serial_numbers: BoundedVec::truncate_from(vec![token_id.1]), + balances: BoundedVec::truncate_from(vec![sell_quantity]), + new_owner: buyer, + } + .into(), + ); + }); + } + #[test] fn buy_sft_with_royalties() { let buyer = create_account(5); diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index 713ccac0c..31eea7b56 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -18,9 +18,7 @@ //! # SFT Module use frame_support::{traits::tokens::fungibles::Mutate, transactional, PalletId}; -use seed_pallet_common::{ - CreateExt, Hold, NFTExt, OnNewAssetSubscriber, OnTransferSubscriber, TransferExt, -}; +use seed_pallet_common::{NFTExt, OnNewAssetSubscriber, OnTransferSubscriber}; use seed_primitives::{ AssetId, Balance, CollectionUuid, MetadataScheme, OriginChain, ParachainId, RoyaltiesSchedule, SerialNumber, TokenId, @@ -65,10 +63,8 @@ pub mod pallet { /// The system event type type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Handles a multi-currency fungible asset system - type MultiCurrency: TransferExt - + Hold - + Mutate - + CreateExt; + type MultiCurrency: Mutate; + /// NFT Extension, used to retrieve nextCollectionUuid type NFTExt: NFTExt; /// Handler for when an SFT has been transferred diff --git a/pallet/vortex-distribution/src/benchmarking.rs b/pallet/vortex-distribution/src/benchmarking.rs index f514f1bb6..56ae57263 100644 --- a/pallet/vortex-distribution/src/benchmarking.rs +++ b/pallet/vortex-distribution/src/benchmarking.rs @@ -41,6 +41,15 @@ fn mint_asset() -> AssetId { } benchmarks! { + set_admin { + let new_account = account::("Admin"); + let account_lookup = T::Lookup::unlookup(new_account.clone()); + let vortex_dist_id = NextVortexId::::get(); + }: _(RawOrigin::Root, account_lookup) + verify { + assert_eq!(AdminAccount::::get().unwrap(), new_account); + } + create_vtx_dist { let vortex_dist_id = NextVortexId::::get(); }: _(RawOrigin::Root) diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex-distribution/src/lib.rs index 795e57523..e1bba0193 100644 --- a/pallet/vortex-distribution/src/lib.rs +++ b/pallet/vortex-distribution/src/lib.rs @@ -347,12 +347,11 @@ pub mod pallet { #[pallet::call] impl Pallet { #[pallet::call_index(0)] - #[pallet::weight(1000)] + #[pallet::weight(::WeightInfo::set_admin())] pub fn set_admin(origin: OriginFor, new: AccountIdLookupOf) -> DispatchResult { ensure_root(origin)?; let new = T::Lookup::lookup(new)?; - AdminAccount::::put(&new); Self::deposit_event(Event::AdminAccountChanged { old_key: AdminAccount::::get(), diff --git a/pallet/vortex-distribution/src/weights.rs b/pallet/vortex-distribution/src/weights.rs index 9886bb711..654c1a8e0 100644 --- a/pallet/vortex-distribution/src/weights.rs +++ b/pallet/vortex-distribution/src/weights.rs @@ -47,6 +47,7 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_vortex. pub trait WeightInfo { + fn set_admin() -> Weight; fn create_vtx_dist() -> Weight; fn disable_vtx_dist() -> Weight; fn start_vtx_dist() -> Weight; @@ -61,6 +62,17 @@ pub trait WeightInfo { /// Weights for pallet_vortex using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) + /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn set_admin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_314_000 picoseconds. + Weight::from_parts(7_775_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) @@ -165,6 +177,17 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { + /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) + /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn set_admin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_314_000 picoseconds. + Weight::from_parts(7_775_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(RocksDbWeight::get().writes(1)) + } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index 41f43fae6..bfd0d2e6f 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -585,13 +585,21 @@ impl pallet_futurepass::ProxyProvider for ProxyPalletProvider { // get proxy_definitions length + 1 (cost of upcoming insertion); cost to reserve let new_reserve = pallet_proxy::Pallet::::deposit(proxy_definitions.len() as u32 + 1); - let extra_reserve_required = - (new_reserve - reserve_amount) + crate::ExistentialDeposit::get(); + let mut extra_reserve_required = new_reserve - reserve_amount; + + // Check if the futurepass account has balance less than the existential deposit + // If it does, fund with the ED to allow the Futurepass to reserve balance while still + // keeping the account alive + let account_balance = pallet_balances::Pallet::::balance(&futurepass); + let minimum_balance = crate::ExistentialDeposit::get(); + if account_balance < minimum_balance { + extra_reserve_required = extra_reserve_required.saturating_add(minimum_balance); + } as Currency<_>>::transfer( funder, futurepass, extra_reserve_required, - ExistenceRequirement::AllowDeath, + ExistenceRequirement::KeepAlive, )?; let proxy_type = ProxyType::try_from(*proxy_type)?; diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index e613f1c50..db0830cfd 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -32,6 +32,17 @@ use core::marker::PhantomData; /// Weight functions for `pallet_vortex`. pub struct WeightInfo(PhantomData); impl pallet_vortex::WeightInfo for WeightInfo { + /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) + /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn set_admin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_314_000 picoseconds. + Weight::from_parts(7_775_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `VortexDistribution::NextVortexId` (r:1 w:1) /// Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) From 18ae94bbfde1748ab24044edf5aa08ed50f44db9 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 28 May 2024 00:18:23 +1200 Subject: [PATCH 072/112] Feat/substrate v1.0.0 e2e tests (#845) * removed references to port 9933, replaced with 9944 * using new rpc port * fixed crowdsale e2e test * fixed doughnut e2e test * fixed evm gas costs e2e test * fixed and consolidated fee preferences e2e test * fixed pallet xrpl e2e test * fixed and updated (made more reliable) dex rpc e2e test * fixed futurepass precompile e2e tests * pool address fixes * updated precompile tx costs tables * fixed pallet xrpl e2e test * cargo fmt --all * yarn format and lint * updated @polkadot packages - required to support partialFee calls and updated substrate version --- .github/workflows/fork-state.yml | 2 +- Dockerfile | 2 +- README.md | 8 +- ci-scripts/runtime-upgrade/yarn.lock | 502 ----------- docker-compose.yml | 90 +- dockerimages/fork-state.Dockerfile | 4 +- e2e/README.md | 2 +- e2e/common/index.ts | 12 + e2e/common/node.ts | 40 +- e2e/docker-compose.yml | 5 +- e2e/hardhat.config.ts | 17 +- e2e/package.json | 9 +- e2e/test/AssetRPC.test.ts | 2 +- e2e/test/Crowdsale.test.ts | 10 +- e2e/test/Dex/Dex.TxCosts.test.ts | 4 +- e2e/test/Dex/DexPrecompile.test.ts | 4 +- e2e/test/Dex/DexRPC.test.ts | 212 +---- e2e/test/Dex/NetworkFee.test.ts | 2 +- e2e/test/Dex/TxCosts.md | 21 +- e2e/test/Doughnuts.test.ts | 14 +- e2e/test/ERC1155/ERC1155.TxCosts.test.ts | 4 +- e2e/test/ERC1155/ERC1155Precompile.test.ts | 4 +- e2e/test/ERC1155/TxCosts.md | 31 +- e2e/test/ERC20/Erc20.TxCosts.test.ts | 4 +- e2e/test/ERC20/Erc20Precompile.test.ts | 4 +- e2e/test/ERC20/TxCosts.md | 17 +- e2e/test/ERC721/ERC721Precompile.test.ts | 4 +- e2e/test/ERC721/Erc721.TxCosts.test.ts | 4 +- e2e/test/ERC721/TxCosts.md | 35 +- e2e/test/EVMGasCosts.test.ts | 8 +- .../FeePreferences.test.ts | 139 ++- e2e/test/FeePreferences/LowLiquidity.test.ts | 102 --- .../Futurepass/Futurepass.TxCosts.test.ts | 4 +- .../Futurepass/FuturepassPrecompile.test.ts | 12 +- .../FuturepassRegistrarPrecompile.test.ts | 4 +- e2e/test/Futurepass/TxCosts.md | 25 +- .../MarketPlace/MarketPlacePrecompile.test.ts | 4 +- .../MarketPlace/Marketplace.TxCosts.test.ts | 4 +- e2e/test/MarketPlace/TxCosts.md | 40 +- e2e/test/NFTPrecompile.test.ts | 4 +- e2e/test/PegPrecompile.test.ts | 4 +- e2e/test/SftRPC.test.ts | 4 +- e2e/test/TestCall.GasEstimates.test.ts | 2 +- e2e/test/TxFeePotFeeAccruel.test.ts | 9 +- e2e/test/Vortex.test.ts | 2 +- e2e/test/XRPL.test.ts | 54 +- e2e/yarn.lock | 852 +++++++++--------- pallet/assets-ext/rpc/README.md | 4 +- pallet/dex/rpc/README.md | 12 +- pallet/dex/src/types.rs | 3 +- pallet/ethy/src/ethereum_http_cli.rs | 2 +- 51 files changed, 847 insertions(+), 1516 deletions(-) delete mode 100644 ci-scripts/runtime-upgrade/yarn.lock rename e2e/test/{FeePreferences => }/FeePreferences.test.ts (88%) delete mode 100644 e2e/test/FeePreferences/LowLiquidity.test.ts diff --git a/.github/workflows/fork-state.yml b/.github/workflows/fork-state.yml index 7292fd72d..d32c5bbf9 100644 --- a/.github/workflows/fork-state.yml +++ b/.github/workflows/fork-state.yml @@ -83,7 +83,7 @@ jobs: - name: Fetch the service status uses: nev7n/wait_for_response@v1 with: - url: "https://devnet.cicd.rootnet.app:9933/" + url: "https://devnet.cicd.rootnet.app:9944/" responseCode: 405 timeout: 300 interval: 20 diff --git a/Dockerfile b/Dockerfile index 45c7af2ef..c5bf65b8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,6 @@ LABEL maintainer="The Root Network Team" LABEL org.opencontainers.image.source=https://github.com/futureversecom/trn-seed COPY --from=0 /workdir/target/release/seed /usr/bin/ -EXPOSE 30333 9933 9944 +EXPOSE 30333 9944 VOLUME ["/node-data"] ENTRYPOINT ["/usr/bin/seed"] diff --git a/README.md b/README.md index a41dd386d..357392343 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ Docker images are published for every tagged release, you can quickly have a nod ```bash # Root chainspec -docker run -p 9933:9933 -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --chain=root +docker run -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --chain=root # Porcini chainspec -docker run -p 9933:9933 -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --chain=porcini +docker run -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --chain=porcini # Dev chainspec -docker run -p 9933:9933 -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --dev --unsafe-rpc-external --unsafe-ws-external --rpc-cors=all +docker run -p 9944:9944 -p 30333:30333 ghcr.io/futureversecom/seed:latest --dev --unsafe-rpc-external --rpc-port=9944 --rpc-cors=all ``` ### Run using source code @@ -63,7 +63,7 @@ After building the source code, run the following commands to start the node. # Porcini chainspec ./target/release/seed --chain=porcini # Dev chainspec -./target/release/seed --dev --unsafe-rpc-external --unsafe-ws-external --rpc-cors=all +./target/release/seed --dev --unsafe-rpc-external --rpc-port=9944 --rpc-cors=all ``` ## 🚧 Development diff --git a/ci-scripts/runtime-upgrade/yarn.lock b/ci-scripts/runtime-upgrade/yarn.lock deleted file mode 100644 index c365bee38..000000000 --- a/ci-scripts/runtime-upgrade/yarn.lock +++ /dev/null @@ -1,502 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@noble/curves@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== - dependencies: - "@noble/hashes" "1.3.1" - -"@noble/hashes@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== - -"@polkadot/api-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.9.1.tgz#9fc81b81903229bb23b0b16783e97ec52a5d4f1b" - integrity sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg== - dependencies: - "@polkadot/api-base" "10.9.1" - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/api-base@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.9.1.tgz#27f63c4950814c2f10535f794121fa1384dc2207" - integrity sha512-Q3m2KzlceMK2kX8bhnUZWk3RT6emmijeeFZZQgCePpEcrSeNjnqG4qjuTPgkveaOkUT8MAoDc5Avuzcc2jlW9g== - dependencies: - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/util" "^12.3.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/api-derive@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.9.1.tgz#04a4ca3285fd215c4cd50cfb3f4791d38dd90050" - integrity sha512-mRud1UZCFIc4Z63qAoGSIHh/foyUYADfy1RQYCmPpeFKfIdCIrHpd7xFdJXTOMYOS0BwlM6u4qli/ZT4XigezQ== - dependencies: - "@polkadot/api" "10.9.1" - "@polkadot/api-augment" "10.9.1" - "@polkadot/api-base" "10.9.1" - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/api@10.9.1", "@polkadot/api@^10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.9.1.tgz#156b3436f45ef18218960804988c1f552d2c4e46" - integrity sha512-ND/2UqZBWvtt4PfV03OStTKg0mxmPk4UpMAgJKutdgsz/wP9CYJ1KbjwFgPNekL9JnzbKQsWyQNPVrcw7kQk8A== - dependencies: - "@polkadot/api-augment" "10.9.1" - "@polkadot/api-base" "10.9.1" - "@polkadot/api-derive" "10.9.1" - "@polkadot/keyring" "^12.3.1" - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/rpc-core" "10.9.1" - "@polkadot/rpc-provider" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/types-known" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - eventemitter3 "^5.0.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/keyring@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.3.2.tgz#112a0c28816a1f47edad6260dc94222c29465a54" - integrity sha512-NTdtDeI0DP9l/45hXynNABeP5VB8piw5YR+CbUxK2e36xpJWVXwbcOepzslg5ghE9rs8UKJb30Z/HqTU4sBY0Q== - dependencies: - "@polkadot/util" "12.3.2" - "@polkadot/util-crypto" "12.3.2" - tslib "^2.5.3" - -"@polkadot/networks@12.3.2", "@polkadot/networks@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.3.2.tgz#131b0439c481add159814dd2cf0286c6c3fe5b3b" - integrity sha512-uCkyybKoeEm1daKr0uT/9oNDHDDzCy2/ZdVl346hQqfdR1Ct3BaxMjxqvdmb5N8aCw0cBWSfgsxAYtw8ESmllQ== - dependencies: - "@polkadot/util" "12.3.2" - "@substrate/ss58-registry" "^1.40.0" - tslib "^2.5.3" - -"@polkadot/rpc-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.9.1.tgz#214ec3ee145d20caa61ea204041a3aadb89c6b0f" - integrity sha512-MaLHkNlyqN20ZRYr6uNd1BZr1OsrnX9qLAmsl0mcrri1vPGRH6VHjfFH1RBLkikpWD82v17g0l2hLwdV1ZHMcw== - dependencies: - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/rpc-core@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.9.1.tgz#798c514dbed6f6c2e43098a494c9f51fb144dc31" - integrity sha512-ZtA8B8SfXSAwVkBlCcKRHw0eSM7ec/sbiNOM5GasXPeRujUgT7lOwSH2GbUZSqe9RfRDMp6DvO9c2JoGc3LLWw== - dependencies: - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/rpc-provider" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/util" "^12.3.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/rpc-provider@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.9.1.tgz#de3a474bbcd26d28d9cd3134acdb3b5ce92b680b" - integrity sha512-4QzT2QzD+320+eT6b79sGAA85Tt3Bb8fQvse4r5Mom2iiBd2SO81vOhxSAOaIe4GUsw25VzFJmsbe7+OObItdg== - dependencies: - "@polkadot/keyring" "^12.3.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-support" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - "@polkadot/x-fetch" "^12.3.1" - "@polkadot/x-global" "^12.3.1" - "@polkadot/x-ws" "^12.3.1" - eventemitter3 "^5.0.1" - mock-socket "^9.2.1" - nock "^13.3.1" - tslib "^2.5.3" - optionalDependencies: - "@substrate/connect" "0.7.26" - -"@polkadot/types-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.9.1.tgz#5f1c1225c04ffbfe243629a46087c9c9de25a6b3" - integrity sha512-OY9/jTMFRFqYdkUnfcGwqMLC64A0Q25bjvCuVQCVjsPFKE3wl0Kt5rNT01eV2UmLXrR6fY0xWbR2w80bLA7CIQ== - dependencies: - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types-codec@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.9.1.tgz#f30026d3dfeaa69c07c45fa66d1c39318fd232cc" - integrity sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg== - dependencies: - "@polkadot/util" "^12.3.1" - "@polkadot/x-bigint" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types-create@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.9.1.tgz#087d7e2af51cce558b67e3859613b932a3bdc0a3" - integrity sha512-OVz50MGTTuiuVnRP/zAx4CTuLioc0hsiwNwqN2lNhmIJGtnQ4Vy/7mQRsIWehiYz6g0Vzzm5B3qWkTXO1NSN5w== - dependencies: - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types-known@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.9.1.tgz#fe0c7e55191aa843119edcaf9abb5d2471463a7d" - integrity sha512-zCMVWc4pJtkbMFPu72bD4IhvV/gkHXPX3C5uu92WdmCfnn0vEIEsMKWlVXVVvQQZKAqvs/awpqIfrUtEViOGEA== - dependencies: - "@polkadot/networks" "^12.3.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types-support@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.9.1.tgz#17a861aab8e5a225a4e20cefa2d16076ddd51baf" - integrity sha512-XsieuLDsszvMZQlleacQBfx07i/JkwQV/UxH9q8Hz7Okmaz9pEVEW1h3ka2/cPuC7a4l32JhaORBUYshBZNdJg== - dependencies: - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types@10.9.1", "@polkadot/types@^10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.9.1.tgz#f111d00f7278ad3be95deba3d701fafefe080cb2" - integrity sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w== - dependencies: - "@polkadot/keyring" "^12.3.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/util-crypto@12.3.2", "@polkadot/util-crypto@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.3.2.tgz#42d810886904e06fa6e5db254c15f6ef80f4ab72" - integrity sha512-pTpx+YxolY0BDT4RcGmgeKbHHD/dI6Ll9xRsqmVdIjpcVVY20uDNTyXs81ZNtfKgyod1y9JQkfNv2Dz9iEpTkQ== - dependencies: - "@noble/curves" "1.1.0" - "@noble/hashes" "1.3.1" - "@polkadot/networks" "12.3.2" - "@polkadot/util" "12.3.2" - "@polkadot/wasm-crypto" "^7.2.1" - "@polkadot/wasm-util" "^7.2.1" - "@polkadot/x-bigint" "12.3.2" - "@polkadot/x-randomvalues" "12.3.2" - "@scure/base" "1.1.1" - tslib "^2.5.3" - -"@polkadot/util@12.3.2", "@polkadot/util@^12.3.1", "@polkadot/util@^12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.3.2.tgz#f46e147b0e6a426da5ba59df4ce65de1a3effe4a" - integrity sha512-y/JShcGyOamCUiSIg++XZuLHt1ktSKBaSH2K5Nw5NXlgP0+7am+GZzqPB8fQ4qhYLruEOv+YRiz0GC1Zr9S+wg== - dependencies: - "@polkadot/x-bigint" "12.3.2" - "@polkadot/x-global" "12.3.2" - "@polkadot/x-textdecoder" "12.3.2" - "@polkadot/x-textencoder" "12.3.2" - "@types/bn.js" "^5.1.1" - bn.js "^5.2.1" - tslib "^2.5.3" - -"@polkadot/wasm-bridge@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.2.1.tgz#8464a96552207d2b49c6f32137b24132534b91ee" - integrity sha512-uV/LHREDBGBbHrrv7HTki+Klw0PYZzFomagFWII4lp6Toj/VCvRh5WMzooVC+g/XsBGosAwrvBhoModabyHx+A== - dependencies: - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - -"@polkadot/wasm-crypto-asmjs@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.1.tgz#3e7a91e2905ab7354bc37b82f3e151a62bb024db" - integrity sha512-z/d21bmxyVfkzGsKef/FWswKX02x5lK97f4NPBZ9XBeiFkmzlXhdSnu58/+b1sKsRAGdW/Rn/rTNRDhW0GqCAg== - dependencies: - tslib "^2.5.0" - -"@polkadot/wasm-crypto-init@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.1.tgz#9dbba41ed7d382575240f1483cf5a139ff2787bd" - integrity sha512-GcEXtwN9LcSf32V9zSaYjHImFw16hCyo2Xzg4GLLDPPeaAAfbFr2oQMgwyDbvBrBjLKHVHjsPZyGhXae831amw== - dependencies: - "@polkadot/wasm-bridge" "7.2.1" - "@polkadot/wasm-crypto-asmjs" "7.2.1" - "@polkadot/wasm-crypto-wasm" "7.2.1" - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - -"@polkadot/wasm-crypto-wasm@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.1.tgz#d2486322c725f6e5d2cc2d6abcb77ecbbaedc738" - integrity sha512-DqyXE4rSD0CVlLIw88B58+HHNyrvm+JAnYyuEDYZwCvzUWOCNos/DDg9wi/K39VAIsCCKDmwKqkkfIofuOj/lA== - dependencies: - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - -"@polkadot/wasm-crypto@^7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.2.1.tgz#db671dcb73f1646dc13478b5ffc3be18c64babe1" - integrity sha512-SA2+33S9TAwGhniKgztVN6pxUKpGfN4Tre/eUZGUfpgRkT92wIUT2GpGWQE+fCCqGQgADrNiBcwt6XwdPqMQ4Q== - dependencies: - "@polkadot/wasm-bridge" "7.2.1" - "@polkadot/wasm-crypto-asmjs" "7.2.1" - "@polkadot/wasm-crypto-init" "7.2.1" - "@polkadot/wasm-crypto-wasm" "7.2.1" - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - -"@polkadot/wasm-util@7.2.1", "@polkadot/wasm-util@^7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.2.1.tgz#fda233120ec02f77f0d14e4d3c7ad9ce06535fb8" - integrity sha512-FBSn/3aYJzhN0sYAYhHB8y9JL8mVgxLy4M1kUXYbyo+8GLRQEN5rns8Vcb8TAlIzBWgVTOOptYBvxo0oj0h7Og== - dependencies: - tslib "^2.5.0" - -"@polkadot/x-bigint@12.3.2", "@polkadot/x-bigint@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.3.2.tgz#0e99489cc7938bed40762aaaed58ded6850ab54b" - integrity sha512-JLqLgfGXe/x+hZJETd5ZqfpVsbwyMsH5Nn1Q20ineMMjXN/ig+kVR8Mc15LXBMuw4g7LldFW6UUrotWnuMI8Yw== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - -"@polkadot/x-fetch@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.3.2.tgz#7e8d2113268e792dd5d1b259ef13839c6aa77996" - integrity sha512-3IEuZ5S+RI/t33NsdPLIIa5COfDCfpUW2sbaByEczn75aD1jLqJZSEDwiBniJ2osyNd4uUxBf6e5jw7LAZeZJg== - dependencies: - "@polkadot/x-global" "12.3.2" - node-fetch "^3.3.1" - tslib "^2.5.3" - -"@polkadot/x-global@12.3.2", "@polkadot/x-global@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.3.2.tgz#04ac0b0e559a35107f0b95ff7889fcade3796aa3" - integrity sha512-yVZq6oIegjlyh5rUZiTklgu+fL+W/DG1ypEa02683tUCB3avV5cA3PAHKptMSlb6FpweHu37lKKrqfAWrraDxg== - dependencies: - tslib "^2.5.3" - -"@polkadot/x-randomvalues@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.3.2.tgz#43ac489a998098bdd40b3f82f28adb5b542db2a5" - integrity sha512-ywjIs8CWpvOGmq+3cGCNPOHxAjPHdBUiXyDccftx5BRVdmtbt36gK/V84bKr6Xs73FGu0jprUAOSRRsLZX/3dg== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - -"@polkadot/x-textdecoder@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.3.2.tgz#bbd5682744f3552ce5d4d792ff48a3ca525eafcf" - integrity sha512-lY5bfA5xArJRWEJlYOlQQMJeTjWD8s0yMhchirVgf5xj8Id9vPGeUoneH+VFDEwgXxrqBvDFJ4smN4T/r6a/fg== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - -"@polkadot/x-textencoder@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.3.2.tgz#223e6f6dd78e2d81c6dcc6f244c76ceae7b08e32" - integrity sha512-iP3qEBiHzBckQ9zeY7ZHRWuu7mCEg5SMpOugs6UODRk8sx6KHzGQYlghBbWLit0uppPDVE0ifEwZ2n73djJHWQ== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - -"@polkadot/x-ws@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.3.2.tgz#422559dfbdaac4c965d5e1b406b6cc4529214f94" - integrity sha512-yM9Z64pLNlHpJE43+Xtr+iUXmYpFFY5u5hrke2PJt13O48H8f9Vb9cRaIh94appLyICoS0aekGhDkGH+MCspBA== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - ws "^8.13.0" - -"@scure/base@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== - -"@substrate/connect-extension-protocol@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz#fa5738039586c648013caa6a0c95c43265dbe77d" - integrity sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg== - -"@substrate/connect@0.7.26": - version "0.7.26" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.26.tgz#a0ee5180c9cb2f29250d1219a32f7b7e7dea1196" - integrity sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw== - dependencies: - "@substrate/connect-extension-protocol" "^1.0.1" - eventemitter3 "^4.0.7" - smoldot "1.0.4" - -"@substrate/ss58-registry@^1.40.0": - version "1.41.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.41.0.tgz#dd18e132f44b73c3cd31cf0db489c10af70bef36" - integrity sha512-TLz5VkEaJRNFzf1Oiix9gqknKer3aKbLfjK9XHBFCIhdxlQpI+S6lZGu3wT4DHAGXPakYfXb8+9ZIOtWLcQ/2Q== - -"@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== - dependencies: - "@types/node" "*" - -"@types/node@*": - version "20.4.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.9.tgz#c7164e0f8d3f12dfae336af0b1f7fdec8c6b204f" - integrity sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ== - -bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - -debug@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -eventemitter3@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -mock-socket@^9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.2.1.tgz#cc9c0810aa4d0afe02d721dcb2b7e657c00e2282" - integrity sha512-aw9F9T9G2zpGipLLhSNh6ZpgUyUl4frcVmRN08uE1NWPWg43Wx6+sGPDbQ7E5iFZZDJW5b5bypMeAEHqTbIFag== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nock@^13.3.1: - version "13.3.2" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.2.tgz#bfa6be92d37f744b1b758ea89b1105cdaf5c8b3f" - integrity sha512-CwbljitiWJhF1gL83NbanhoKs1l23TDlRioNraPTZrzZIEooPemrHRj5m0FZCPkB1ecdYCSWWGcHysJgX/ngnQ== - dependencies: - debug "^4.1.0" - json-stringify-safe "^5.0.1" - lodash "^4.17.21" - propagate "^2.0.0" - -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -pako@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" - integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== - -propagate@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" - integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== - -rxjs@^7.8.1: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - -smoldot@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-1.0.4.tgz#e4c38cedad68d699a11b5b9ce72bb75c891bfd98" - integrity sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A== - dependencies: - pako "^2.0.4" - ws "^8.8.1" - -tslib@^2.1.0, tslib@^2.5.0, tslib@^2.5.3: - version "2.6.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" - integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -ws@^8.13.0, ws@^8.8.1: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== diff --git a/docker-compose.yml b/docker-compose.yml index 002bca45f..9488e523e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,9 +10,9 @@ services: - "--validator" - "--alice" - "--tmp" - - "--unsafe-ws-external" - "--unsafe-rpc-external" - "--rpc-cors=all" + - "--rpc-port=9944" - "--node-key=0000000000000000000000000000000000000000000000000000000000000001" deploy: resources: @@ -23,24 +23,16 @@ services: cpus: "1" memory: "2512M" labels: - # WS config - # - "traefik.http.routers.bootnode-ws.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" - - "traefik.http.routers.bootnode-ws.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.bootnode-ws.entrypoints=substrate-ws" - - "traefik.http.routers.bootnode-ws.service=node-ws-svc" - - "traefik.http.services.node-ws-svc.loadbalancer.server.port=9944" - - "traefik.http.middlewares.bootnode-ws.headers.customrequestheaders.Upgrade=websocket" - - "traefik.http.middlewares.bootnode-ws.headers.customrequestheaders.Connection=Upgrade" - - "traefik.http.routers.bootnode-ws.tls=true" - - "traefik.http.routers.bootnode-ws.tls.certresolver=myresolver" - # HTTP config - # - "traefik.http.routers.bootnode-http.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && Path(`/http`)" - - "traefik.http.routers.bootnode-http.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.bootnode-http.entrypoints=substrate-http" - - "traefik.http.routers.bootnode-http.service=bootnode-http-svc" - - "traefik.http.services.bootnode-http-svc.loadbalancer.server.port=9933" - - "traefik.http.routers.bootnode-http.tls=true" - - "traefik.http.routers.bootnode-http.tls.certresolver=myresolver" + # RPC config + # - "traefik.http.routers.bootnode-rpc.rule=(Host(`127.0.0.1`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" + - "traefik.http.routers.bootnode-rpc.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" + - "traefik.http.routers.bootnode-rpc.entrypoints=substrate-rpc" + - "traefik.http.routers.bootnode-rpc.service=node-rpc-svc" + - "traefik.http.services.node-rpc-svc.loadbalancer.server.port=9944" + - "traefik.http.middlewares.bootnode-rpc.headers.customrequestheaders.Upgrade=websocket" + - "traefik.http.middlewares.bootnode-rpc.headers.customrequestheaders.Connection=Upgrade" + - "traefik.http.routers.bootnode-rpc.tls=true" + - "traefik.http.routers.bootnode-rpc.tls.certresolver=myresolver" validator1: image: "ghcr.io/futureversecom/fork-release-state-${NETWORK:-root}" @@ -52,9 +44,9 @@ services: - "--validator" - "--bob" - "--tmp" - - "--unsafe-ws-external" - "--unsafe-rpc-external" - "--rpc-cors=all" + - "--rpc-port=9944" - "--bootnodes=/dns/bootnode/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp" deploy: resources: @@ -67,24 +59,16 @@ services: depends_on: - bootnode labels: - # WS config - # - "traefik.http.routers.validator-1-ws.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" - - "traefik.http.routers.validator-1-ws.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.validator-1-ws.entrypoints=substrate-ws" - - "traefik.http.routers.validator-1-ws.service=node-ws-svc" - - "traefik.http.services.node-ws-svc.loadbalancer.server.port=9944" - - "traefik.http.middlewares.validator-1-ws.headers.customrequestheaders.Upgrade=websocket" - - "traefik.http.middlewares.validator-1-ws.headers.customrequestheaders.Connection=Upgrade" - - "traefik.http.routers.validator-1-ws.tls=true" - - "traefik.http.routers.validator-1-ws.tls.certresolver=myresolver" - # HTTP config - # - "traefik.http.routers.validator-1-http.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && Path(`/http`)" - - "traefik.http.routers.validator-1-http.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.validator-1-http.entrypoints=substrate-http" - - "traefik.http.routers.validator-1-http.service=node-http-svc" - - "traefik.http.services.node-http-svc.loadbalancer.server.port=9933" - - "traefik.http.routers.validator-1-http.tls=true" - - "traefik.http.routers.validator-1-http.tls.certresolver=myresolver" + # RPC config + # - "traefik.http.routers.validator-1-rpc.rule=(Host(`127.0.0.1`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" + - "traefik.http.routers.validator-1-rpc.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" + - "traefik.http.routers.validator-1-rpc.entrypoints=substrate-rpc" + - "traefik.http.routers.validator-1-rpc.service=node-rpc-svc" + - "traefik.http.services.node-rpc-svc.loadbalancer.server.port=9944" + - "traefik.http.middlewares.validator-1-rpc.headers.customrequestheaders.Upgrade=websocket" + - "traefik.http.middlewares.validator-1-rpc.headers.customrequestheaders.Connection=Upgrade" + - "traefik.http.routers.validator-1-rpc.tls=true" + - "traefik.http.routers.validator-1-rpc.tls.certresolver=myresolver" validator2: image: "ghcr.io/futureversecom/fork-release-state-${NETWORK:-root}" @@ -96,9 +80,9 @@ services: - "--validator" - "--charlie" - "--tmp" - - "--unsafe-ws-external" - "--unsafe-rpc-external" - "--rpc-cors=all" + - "--rpc-port=9944" - "--bootnodes=/dns/bootnode/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp" deploy: resources: @@ -111,24 +95,16 @@ services: depends_on: - bootnode labels: - # WS config - # - "traefik.http.routers.validator-2-ws.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" - - "traefik.http.routers.validator-2-ws.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.validator-2-ws.entrypoints=substrate-ws" - - "traefik.http.routers.validator-2-ws.service=node-ws-svc" - - "traefik.http.services.node-ws-svc.loadbalancer.server.port=9944" - - "traefik.http.middlewares.validator-2-ws.headers.customrequestheaders.Upgrade=websocket" - - "traefik.http.middlewares.validator-2-ws.headers.customrequestheaders.Connection=Upgrade" - - "traefik.http.routers.validator-2-ws.tls=true" - - "traefik.http.routers.validator-2-ws.tls.certresolver=myresolver" - # HTTP config - # - "traefik.http.routers.validator-2-http.rule=(Host(`localhost`) || Host(`devnet.cicd.rootnet.app`)) && Path(`/http`)" - - "traefik.http.routers.validator-2-http.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" - - "traefik.http.routers.validator-2-http.entrypoints=substrate-http" - - "traefik.http.routers.validator-2-http.service=node-http-svc" - - "traefik.http.services.node-http-svc.loadbalancer.server.port=9933" - - "traefik.http.routers.validator-2-http.tls=true" - - "traefik.http.routers.validator-2-http.tls.certresolver=myresolver" + # RPC config + # - "traefik.http.routers.validator-2-rpc.rule=(Host(`127.0.0.1`) || Host(`devnet.cicd.rootnet.app`)) && PathPrefix(`/`)" + - "traefik.http.routers.validator-2-rpc.rule=Host(`devnet.cicd.rootnet.app`) && Path(`/`)" + - "traefik.http.routers.validator-2-rpc.entrypoints=substrate-rpc" + - "traefik.http.routers.validator-2-rpc.service=node-rpc-svc" + - "traefik.http.services.node-rpc-svc.loadbalancer.server.port=9944" + - "traefik.http.middlewares.validator-2-rpc.headers.customrequestheaders.Upgrade=websocket" + - "traefik.http.middlewares.validator-2-rpc.headers.customrequestheaders.Connection=Upgrade" + - "traefik.http.routers.validator-2-rpc.tls=true" + - "traefik.http.routers.validator-2-rpc.tls.certresolver=myresolver" # network already exists - attach to existing traefik network networks: diff --git a/dockerimages/fork-state.Dockerfile b/dockerimages/fork-state.Dockerfile index 4c7d2df1d..3b006cffe 100644 --- a/dockerimages/fork-state.Dockerfile +++ b/dockerimages/fork-state.Dockerfile @@ -44,6 +44,6 @@ RUN apt update -y && apt install curl -y COPY --from=0 /workdir/output /output WORKDIR /output -EXPOSE 30333 9933 9944 +EXPOSE 30333 9944 -CMD /output/binary --chain=/output/fork.json --alice --tmp --unsafe-ws-external --unsafe-rpc-external --rpc-cors=all +CMD /output/binary --chain=/output/fork.json --alice --tmp --unsafe-rpc-external --rpc-port=9944 --rpc-cors=all diff --git a/e2e/README.md b/e2e/README.md index 7ac51a3a8..d42811daa 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -28,7 +28,7 @@ cp .env.example .env - Run node locally ```sh -cargo run -- --dev --unsafe-ws-external --unsafe-rpc-external --rpc-cors=all +cargo run -- --dev --unsafe-rpc-external --rpc-port=9944 --rpc-cors=all ``` - Note: You need to run specific test files, since the suite will not handle startup and shutdown of local node (state diff --git a/e2e/common/index.ts b/e2e/common/index.ts index 0a0fae133..3d4ed98aa 100644 --- a/e2e/common/index.ts +++ b/e2e/common/index.ts @@ -482,6 +482,18 @@ export const futurepassAddress = (nextId: number | string): string => { return web3.utils.toChecksumAddress(`0xFFFFFFFF${fpIdHex}`); }; +// `0xdddddddd` + <4-byte-asset_a-padded> + <4-byte-asset_b-padded> + `0000000000000000` (8 bytes) +export const poolAddress = (assetA: number | string, assetB: number | string): string => { + const assetAHex = (+assetA).toString(16).padStart(8, "0"); + const assetBHex = (+assetB).toString(16).padStart(8, "0"); + + // lower asset id comes first + if (assetA < assetB) { + return web3.utils.toChecksumAddress(`0xDdDddDdD${assetAHex}${assetBHex}0000000000000000`); + } + return web3.utils.toChecksumAddress(`0xDdDddDdD${assetBHex}${assetAHex}0000000000000000`); +}; + /** * Fields of a Polkadotjs event to match on */ diff --git a/e2e/common/node.ts b/e2e/common/node.ts index a8b2ce526..b75763c20 100644 --- a/e2e/common/node.ts +++ b/e2e/common/node.ts @@ -8,8 +8,7 @@ dotenv.config(); export type ConnectionType = "local" | "binary" | "docker"; interface NodeOpts { - httpPort: number; - wsPort: number; + rpcPort: number; dockerOpts: { image: string; pull: boolean; @@ -20,8 +19,7 @@ interface NodeOpts { } const defaultOpts: NodeOpts = { - httpPort: 9933, - wsPort: 9944, + rpcPort: 9944, dockerOpts: { // image: "ghcr.io/futureversecom/seed:latest", image: "seed/pr", @@ -35,8 +33,7 @@ const defaultOpts: NodeOpts = { export interface NodeProcess { id: string; wait: () => Promise; - httpPort: string; - wsPort: string; + rpcPort: string; stop: () => Promise; } @@ -57,13 +54,12 @@ export function startNode( if (type === "local") { // connect to an already running node - const wsPortStr = nodeOptions.wsPort.toString() ?? "9944"; + const rpcPort = nodeOptions.rpcPort.toString() ?? "9944"; return Promise.resolve({ id: "connect", - httpPort: nodeOptions.httpPort.toString() ?? "9933", - wsPort: wsPortStr, + rpcPort: rpcPort, wait: async () => { - await ApiPromise.create({ provider: new WsProvider(`ws://127.0.0.1:${wsPortStr}`) }); + await ApiPromise.create({ provider: new WsProvider(`ws://127.0.0.1:${rpcPort}`) }); }, stop: () => Promise.resolve(), }); @@ -75,7 +71,7 @@ export function startNode( } if (type === "binary") { // TODO integrate startStandaloneNode; path param may be required - // return startBinaryNode(httpPort, wsPort); + // return startBinaryNode(rpcPort); throw new Error(`Unsupported connection type: ${type}`); } @@ -86,7 +82,6 @@ interface DockerInspect { NetworkSettings: { Ports: { "9944/tcp": { HostPort: string }[]; - "9933/tcp": { HostPort: string }[]; }; }; } @@ -97,15 +92,13 @@ async function startStandaloneDockerNode(nodeOpts: NodeOpts): Promise((resolve, reject) => { + const { rpcPort } = await new Promise<{ rpcPort: string }>((resolve, reject) => { // let pollCount = 0; const interval = setInterval(async () => { // console.info(`getting ports for ${id} (${++pollCount})...`); @@ -152,13 +145,13 @@ async function startStandaloneDockerNode(nodeOpts: NodeOpts): Promise 0 && ports["9944/tcp"].length > 0) { - return resolve({ httpPort: ports["9933/tcp"][0].HostPort, wsPort: ports["9944/tcp"][0].HostPort }); + if (ports["9944/tcp"].length > 0) { + return resolve({ rpcPort: ports["9944/tcp"][0].HostPort }); } }); }, 100); }); - // console.info(`Docker node started: ${id} - http: ${httpPort} - ws: ${wsPort}`); + // console.info(`Docker node started: ${id} - rpc: ${rpcPort}`); const stop = () => new Promise((resolve, reject) => { @@ -175,10 +168,9 @@ async function startStandaloneDockerNode(nodeOpts: NodeOpts): Promise { - await ApiPromise.create({ provider: new WsProvider(`ws://127.0.0.1:${wsPort}`) }); + await ApiPromise.create({ provider: new WsProvider(`ws://127.0.0.1:${rpcPort}`) }); }, stop, }; diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index d3952be53..a627cf807 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -1,4 +1,3 @@ -# two node local network (alice + bob validators) version: "3" services: @@ -10,10 +9,8 @@ services: - --validator - --base-path=/mnt/data - --name=validator-0 - - --unsafe-ws-external - --unsafe-rpc-external + - --rpc-port=9944 - --rpc-cors=all ports: - - "9933:9933" - "9944:9944" - - "30333:30333" diff --git a/e2e/hardhat.config.ts b/e2e/hardhat.config.ts index 14dd4f55f..41769cec9 100644 --- a/e2e/hardhat.config.ts +++ b/e2e/hardhat.config.ts @@ -1,22 +1,12 @@ import "@nomicfoundation/hardhat-toolbox"; import * as dotenv from "dotenv"; import { utils } from "ethers"; -import { HardhatUserConfig, task } from "hardhat/config"; +import { HardhatUserConfig } from "hardhat/config"; import { ALITH_PRIVATE_KEY, BOB_PRIVATE_KEY } from "./common"; dotenv.config(); -// This is a sample Hardhat task. To learn how to create your own go to -// https://hardhat.org/guides/create-task.html -task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { - const accounts = await hre.ethers.getSigners(); - - for (const account of accounts) { - console.log(account.address); - } -}); - // You need to export an object to set up your config // Go to https://hardhat.org/config/ to learn more @@ -36,14 +26,11 @@ const config: HardhatUserConfig = { gasPrice: utils.parseUnits("100", "gwei").toNumber(), }, seed: { - url: "http://localhost:9933", + url: "http://127.0.0.1:9944", accounts: [ALITH_PRIVATE_KEY, BOB_PRIVATE_KEY], chainId: 7672, }, }, - etherscan: { - apiKey: process.env.ETHERSCAN_API_KEY, - }, mocha: { timeout: 120_000, // global tests timeout }, diff --git a/e2e/package.json b/e2e/package.json index c616f23bf..02c53d2fb 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -4,6 +4,9 @@ "description": "Integration tests for the Root network", "author": "Futureverse Devs", "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, "scripts": { "clean": "hardhat clean && rm -rf ./cache && hardhat typechain", "format": "prettier --check --config ./.prettierrc.yml \"**/*.{js,json,ts}\"", @@ -19,9 +22,9 @@ "@nomicfoundation/hardhat-toolbox": "^2.0.0", "@nomiclabs/hardhat-ethers": "^2.2.1", "@nomiclabs/hardhat-etherscan": "^3.1.2", - "@polkadot/api": "^9.6.1", - "@polkadot/types": "^9.6.1", - "@polkadot/util": "^10.1.11", + "@polkadot/api": "^11.0.3", + "@polkadot/types": "^11.0.3", + "@polkadot/util": "^12.6.2", "@therootnetwork/doughnut-nodejs": "^0.1.2", "@therootnetwork/pact-nodejs": "^0.0.3", "@trivago/prettier-plugin-sort-imports": "^4.0.0", diff --git a/e2e/test/AssetRPC.test.ts b/e2e/test/AssetRPC.test.ts index e2eba5155..854042f4d 100644 --- a/e2e/test/AssetRPC.test.ts +++ b/e2e/test/AssetRPC.test.ts @@ -16,7 +16,7 @@ describe("RPC", () => { node = await startNode(); await node.wait(); // wait for the node to be ready - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, rpc: rpcs }); alith = new Keyring({ type: "ethereum" }).addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); const tx1 = api.tx.assets.mint(2, "0x6D1eFDE1BbF146EF88c360AF255D9d54A5D39408", mintAmount); diff --git a/e2e/test/Crowdsale.test.ts b/e2e/test/Crowdsale.test.ts index 851f78864..cd2107fd3 100644 --- a/e2e/test/Crowdsale.test.ts +++ b/e2e/test/Crowdsale.test.ts @@ -28,7 +28,7 @@ describe("Crowdsale pallet", () => { node = await startNode(); // substrate variables - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); alith = new Keyring({ type: "ethereum" }).addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); }); @@ -157,7 +157,9 @@ describe("Crowdsale pallet", () => { const txs = [ // fund participants - 50 ROOT per participant to participate - ...participants.map((user) => api.tx.sudo.sudo(api.tx.balances.setBalance(user.address, 50_000_000, 0))), + ...participants.map((user) => + api.tx.sudo.sudo(api.tx.balances.setBalanceDeprecated(user.address, 50_000_000, 0)), + ), // fund participants - 2 XRP (GAS) per participant ...participants.map((user) => api.tx.assets.mint(GAS_TOKEN_ID, user.address, 2_000_000)), @@ -389,9 +391,7 @@ describe("Crowdsale pallet", () => { }) .catch((err) => reject(err)); }); - const { section, name } = dispatchError.registry.findMetaError(dispatchError.asModule); - expect(section).to.equal("assets"); - expect(name).to.equal("BalanceLow"); + expect((dispatchError.toJSON() as any).token).to.equal("FundsUnavailable"); // transfer vouchers from one user to another (to make whole) await finalizeTx( diff --git a/e2e/test/Dex/Dex.TxCosts.test.ts b/e2e/test/Dex/Dex.TxCosts.test.ts index 3335a3132..7005b255f 100644 --- a/e2e/test/Dex/Dex.TxCosts.test.ts +++ b/e2e/test/Dex/Dex.TxCosts.test.ts @@ -53,12 +53,12 @@ describe("Dex Gas Estimation", function () { node = await startNode(); // prepare works for precompile and extrinsic calls - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); alith = new Keyring({ type: "ethereum" }).addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); // setup JSON RPC - jsonProvider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); + jsonProvider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(jsonProvider); bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(jsonProvider); owner = Wallet.createRandom().connect(jsonProvider); diff --git a/e2e/test/Dex/DexPrecompile.test.ts b/e2e/test/Dex/DexPrecompile.test.ts index af7fd07de..08e1acb46 100644 --- a/e2e/test/Dex/DexPrecompile.test.ts +++ b/e2e/test/Dex/DexPrecompile.test.ts @@ -50,8 +50,8 @@ describe("DEX Precompile", function () { /// substrate setup /// - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); - trnJsonProvider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); + trnJsonProvider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); alith = new Keyring({ type: "ethereum" }).addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(trnJsonProvider); diff --git a/e2e/test/Dex/DexRPC.test.ts b/e2e/test/Dex/DexRPC.test.ts index 2eb1a569c..a2939edc9 100644 --- a/e2e/test/Dex/DexRPC.test.ts +++ b/e2e/test/Dex/DexRPC.test.ts @@ -4,126 +4,38 @@ import axios from "axios"; import { expect } from "chai"; import { utils } from "ethers"; -import { ALITH_PRIVATE_KEY, GAS_TOKEN_ID, NodeProcess, startNode, typedefs } from "../../common"; - -const TOKEN_ID = 1124; - -export const rpc = { - dex: { - quote: { - description: "Returns the amount of output token that can be obtained by swapping an amount of input token", - params: [ - { - name: "amountIn", - type: "u128", - }, - { - name: "reserveIn", - type: "u128", - }, - { - name: "reserveOut", - type: "u128", - }, - ], - type: "Json", - }, - getAmountsOut: { - description: "Returns the amount of output tokens that can be obtained by swapping an amount of inputs token", - params: [ - { - name: "amountIn", - type: "Balance", - }, - { - name: "path", - type: "Vec", - }, - ], - type: "Json", - }, - getAmountsIn: { - description: "Returns the amount of input tokens that can be obtained by swapping an amount of output token", - params: [ - { - name: "amountOut", - type: "Balance", - }, - { - name: "path", - type: "Vec", - }, - ], - type: "Json", - }, - getLPTokenID: { - description: "Returns the LP token ID from the given trading pair", - params: [ - { - name: "assetIdA", - type: "AssetId", - }, - { - name: "assetIdB", - type: "AssetId", - }, - ], - type: "Json", - }, - getLiquidity: { - description: "Returns the liquidity balances of the given trading pair", - params: [ - { - name: "assetIdA", - type: "AssetId", - }, - { - name: "assetIdB", - type: "AssetId", - }, - ], - type: "Json", - }, - getTradingPairStatus: { - description: "Returns the status of the given trading pair", - params: [ - { - name: "assetIdA", - type: "AssetId", - }, - { - name: "assetIdB", - type: "AssetId", - }, - ], - type: "Json", - }, - }, -}; +import { + ALITH_PRIVATE_KEY, + GAS_TOKEN_ID, + NodeProcess, + finalizeTx, + getNextAssetId, + rpcs, + startNode, + typedefs, +} from "../../common"; describe("DexRPC", () => { let node: NodeProcess; let api: ApiPromise; + let tokenId: number; before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); - api = await ApiPromise.create({ - provider: wsProvider, - types: typedefs, - rpc, - }); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); + api = await ApiPromise.create({ provider: wsProvider, types: typedefs, rpc: rpcs }); const keyring = new Keyring({ type: "ethereum" }); const alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); + tokenId = await getNextAssetId(api); const txs = [ api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), // create asset - api.tx.assets.mint(TOKEN_ID, alith.address, utils.parseEther("1000000").toString()), + api.tx.assets.mint(tokenId, alith.address, utils.parseEther("1000000").toString()), api.tx.dex.addLiquidity( // provide liquidity - TOKEN_ID, + tokenId, GAS_TOKEN_ID, utils.parseEther("1000").toString(), 250_000_000, @@ -134,25 +46,13 @@ describe("DexRPC", () => { ), ]; - await new Promise((resolve, reject) => { - api.tx.utility - .batch(txs) - .signAndSend(alith, ({ status }) => { - if (status.isInBlock) { - console.log(`setup block hash: ${status.asInBlock}`); - resolve(); - } - }) - .catch((err) => reject(err)); - }); - - console.log("done setting up dex liquidity."); + await finalizeTx(alith, api.tx.utility.batch(txs)); }); after(async () => node.stop()); it("quote rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_quote", @@ -171,11 +71,11 @@ describe("DexRPC", () => { }); it("getAmountsOut rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getAmountsOut", - params: [100, [GAS_TOKEN_ID, TOKEN_ID]], + params: [100, [GAS_TOKEN_ID, tokenId]], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -184,17 +84,17 @@ describe("DexRPC", () => { }); it("getAmountsOut rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getAmountsOut(100, [GAS_TOKEN_ID, TOKEN_ID]); + const result = await (api.rpc as any).dex.getAmountsOut(100, [GAS_TOKEN_ID, tokenId]); expect(result).to.haveOwnProperty("Ok"); expect(result.Ok).to.eqls([100, 398799840958623]); }); it("getAmountsIn rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getAmountsIn", - params: [100, [TOKEN_ID, GAS_TOKEN_ID]], + params: [100, [tokenId, GAS_TOKEN_ID]], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -203,55 +103,51 @@ describe("DexRPC", () => { }); it("getAmountsIn rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getAmountsIn(100, [TOKEN_ID, GAS_TOKEN_ID]); + const result = await (api.rpc as any).dex.getAmountsIn(100, [tokenId, GAS_TOKEN_ID]); expect(result).to.haveOwnProperty("Ok"); expect(result.Ok).to.eqls([401203771314007, 100]); }); it("getLPTokenID rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getLPTokenID", - params: [TOKEN_ID, GAS_TOKEN_ID], + params: [tokenId, GAS_TOKEN_ID], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); expect(httpResult.data.result).to.haveOwnProperty("Ok"); - expect(httpResult.data.result.Ok).to.eqls(2148); }); it("getLPTokenID rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getLPTokenID(TOKEN_ID, GAS_TOKEN_ID); + const result = await (api.rpc as any).dex.getLPTokenID(tokenId, GAS_TOKEN_ID); expect(result).to.haveOwnProperty("Ok"); - expect(result.Ok).to.eqls(2148); }); it("getLPTokenID with reversed trading pair rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getLPTokenID", - params: [GAS_TOKEN_ID, TOKEN_ID], + params: [GAS_TOKEN_ID, tokenId], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); expect(httpResult.data.result).to.haveOwnProperty("Ok"); - expect(httpResult.data.result.Ok).to.eqls(2148); }); it("getLPTokenID with reversed trading pair rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getLPTokenID(GAS_TOKEN_ID, TOKEN_ID); + const result = await (api.rpc as any).dex.getLPTokenID(GAS_TOKEN_ID, tokenId); expect(result).to.haveOwnProperty("Ok"); - expect(result.Ok).to.eqls(2148); }); it("getLiquidity rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getLiquidity", - params: [TOKEN_ID, GAS_TOKEN_ID], + params: [tokenId, GAS_TOKEN_ID], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -259,7 +155,7 @@ describe("DexRPC", () => { }); it("getLiquidity rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getLiquidity(TOKEN_ID, GAS_TOKEN_ID); + const result = await (api.rpc as any).dex.getLiquidity(tokenId, GAS_TOKEN_ID); expect(result).to.eqls( new Map([ ["0", 1000000000000000000000], @@ -269,11 +165,11 @@ describe("DexRPC", () => { }); it("getLiquidity with reversed trading pair rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getLiquidity", - params: [GAS_TOKEN_ID, TOKEN_ID], + params: [GAS_TOKEN_ID, tokenId], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -281,7 +177,7 @@ describe("DexRPC", () => { }); it("getLiquidity with reversed trading pair rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getLiquidity(GAS_TOKEN_ID, TOKEN_ID); + const result = await (api.rpc as any).dex.getLiquidity(GAS_TOKEN_ID, tokenId); expect(result).to.eqls( new Map([ ["0", 250000000], @@ -291,11 +187,11 @@ describe("DexRPC", () => { }); it("getTradingPairStatus rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getTradingPairStatus", - params: [TOKEN_ID, GAS_TOKEN_ID], + params: [tokenId, GAS_TOKEN_ID], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -303,26 +199,16 @@ describe("DexRPC", () => { }); it("getTradingPairStatus rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getTradingPairStatus(TOKEN_ID, GAS_TOKEN_ID); - expect(result).to.eqls( - new Map([ - ["0", "E"], - ["1", "n"], - ["2", "a"], - ["3", "b"], - ["4", "l"], - ["5", "e"], - ["6", "d"], - ]), - ); + const result = await (api.rpc as any).dex.getTradingPairStatus(tokenId, GAS_TOKEN_ID); + expect(result.toString()).to.eql("Enabled"); }); it("getTradingPairStatus with reversed trading pair rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "dex_getTradingPairStatus", - params: [GAS_TOKEN_ID, TOKEN_ID], + params: [GAS_TOKEN_ID, tokenId], }); expect(httpResult.status).to.eql(200); expect(httpResult.data).to.haveOwnProperty("result"); @@ -330,17 +216,7 @@ describe("DexRPC", () => { }); it("getTradingPairStatus with reversed trading pair rpc works [library]", async () => { - const result = await (api.rpc as any).dex.getTradingPairStatus(GAS_TOKEN_ID, TOKEN_ID); - expect(result).to.eqls( - new Map([ - ["0", "E"], - ["1", "n"], - ["2", "a"], - ["3", "b"], - ["4", "l"], - ["5", "e"], - ["6", "d"], - ]), - ); + const result = await (api.rpc as any).dex.getTradingPairStatus(GAS_TOKEN_ID, tokenId); + expect(result.toString()).to.eql("Enabled"); }); }); diff --git a/e2e/test/Dex/NetworkFee.test.ts b/e2e/test/Dex/NetworkFee.test.ts index 4bcc15f5d..dca67cd74 100644 --- a/e2e/test/Dex/NetworkFee.test.ts +++ b/e2e/test/Dex/NetworkFee.test.ts @@ -27,7 +27,7 @@ describe("NetworkFee", () => { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index 369082e54..f1fc1db14 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -1,21 +1,22 @@ ## Generated tx costs(Gas) for Dex Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :----------------------- | :----------: | :------------: | :-----------------------: | -| addLiquidity | 176010 | 102577 | 28021 | -| removeLiquidity | 152430 | 73769 | 23346 | -| swapExactTokensForTokens | 120570 | 53790 | 23342 | -| swapTokensForExactTokens | 120737 | 53838 | 25008 | +|:-------------------------|:------------:|:--------------:|:-------------------------:| +| addLiquidity | 218051 | 113629 | 28025 | +| removeLiquidity | 185060 | 79676 | 23515 | +| swapExactTokensForTokens | 151389 | 60462 | 23510 | +| swapTokensForExactTokens | 151534 | 61539 | 25177 | | quote | 23716 | 22377 | 0 | | getAmountOut | 26047 | 22447 | 0 | | getAmountsOut | 43843 | 42619 | 0 | | getAmountsIn | 44058 | 42611 | 0 | + ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :----------------------- | :-------------------: | :---------------------: | :--------------------: | -| addLiquidity | 2261896 | 1479087 | 420318 | -| removeLiquidity | 1722772 | 1043234 | 350197 | -| swapExactTokensForTokens | 1490489 | 804635 | 350130 | -| swapTokensForExactTokens | 1492814 | 805655 | 375130 | +|:-------------------------|:---------------------:|:-----------------------:|:----------------------:| +| addLiquidity | 2971497 | 1665256 | 420375 | +| removeLiquidity | 2387833 | 1148259 | 352731 | +| swapExactTokensForTokens | 2198004 | 906885 | 352664 | +| swapTokensForExactTokens | 2200330 | 922277 | 377668 | diff --git a/e2e/test/Doughnuts.test.ts b/e2e/test/Doughnuts.test.ts index f0113e717..fe8a9001d 100644 --- a/e2e/test/Doughnuts.test.ts +++ b/e2e/test/Doughnuts.test.ts @@ -34,7 +34,7 @@ describe("Doughnuts", () => { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); keyring = new Keyring({ type: "ethereum" }); @@ -800,11 +800,11 @@ describe("Doughnuts", () => { expect(eventData[index].event.data[1].toString()).to.equal("0xDDDDDDdD00000002000004640000000000000000"); expect(eventData[index].event.data[2].toString()).to.equal(futurepassAddress); - // assets Issued [2148,"0x6D6F646c7478666565706F740000000000000000",226] + // assets Issued [7268,"0x6D6F646c7478666565706F740000000000000000",226] index += 1; expect(eventData[index].event.section).to.equal("assets"); expect(eventData[index].event.method).to.equal("Issued"); - expect(eventData[index].event.data[0]).to.equal(2148); + expect(eventData[index].event.data[0]).to.equal(7268); // dex Swap ["0xFfFFFFff00000000000000000000000000000001",[1124,2],907864,905132,"0xFfFFFFff00000000000000000000000000000001"] index += 1; @@ -881,7 +881,7 @@ describe("Doughnuts", () => { expect(userAAssetBalanceAfter).to.be.eq(userAAssetBalanceBefore); // futurepass xrp balance should not be changed since gas was paid using another asset - expect(futurepassXRPBalanceAfter).to.be.eq(futurepassXRPBalanceBefore); + expect(futurepassXRPBalanceAfter).to.be.eq(futurepassXRPBalanceBefore + 1); // 1 existential deposit // futurepass asset balance should be lesser since gas is paid expect(futurepassAssetBalanceAfter).to.be.lessThan(futurepassAssetBalanceBefore); @@ -1021,11 +1021,11 @@ describe("Doughnuts", () => { expect(eventData[index].event.data[1].toString()).to.equal("0xDDDDDDdD00000002000004640000000000000000"); expect(eventData[index].event.data[2].toString()).to.equal(userA.address); - // assets Issued [2148,"0x6D6F646c7478666565706F740000000000000000",213] + // assets Issued [7268,"0x6D6F646c7478666565706F740000000000000000",213] index += 1; expect(eventData[index].event.section).to.equal("assets"); expect(eventData[index].event.method).to.equal("Issued"); - expect(eventData[index].event.data[0]).to.equal(2148); + expect(eventData[index].event.data[0]).to.equal(7268); // dex Swap ["0x3fAc4E88185Add21c375653b3204c1EF7fff9dE9",[1124,2],852669,850089,"0x3fAc4E88185Add21c375653b3204c1EF7fff9dE9"] index += 1; @@ -1082,7 +1082,7 @@ describe("Doughnuts", () => { ((await api.query.assets.account(GAS_TOKEN_ID, holder.address)).toJSON() as any)?.balance ?? 0; // userA xrp balance should be unchanged since the gas was paid using a different asset - expect(userAXRPBalanceAfter).to.be.eq(userAXRPBalanceBefore); + expect(userAXRPBalanceAfter).to.be.eq(userAXRPBalanceBefore + 1); // 1 existential deposit // userA asset balance should be lesser since gas is paid expect(userAAssetBalanceAfter).to.be.lessThan(userAAssetBalanceBefore); diff --git a/e2e/test/ERC1155/ERC1155.TxCosts.test.ts b/e2e/test/ERC1155/ERC1155.TxCosts.test.ts index bf2c80618..c3a540d8b 100644 --- a/e2e/test/ERC1155/ERC1155.TxCosts.test.ts +++ b/e2e/test/ERC1155/ERC1155.TxCosts.test.ts @@ -43,14 +43,14 @@ describe("ERC1155 Gas Estimates", function () { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); const keyring = new Keyring({ type: "ethereum" }); alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/ERC1155/ERC1155Precompile.test.ts b/e2e/test/ERC1155/ERC1155Precompile.test.ts index b32a2d4bf..7044618be 100644 --- a/e2e/test/ERC1155/ERC1155Precompile.test.ts +++ b/e2e/test/ERC1155/ERC1155Precompile.test.ts @@ -37,14 +37,14 @@ describe("ERC1155 Precompile", function () { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); const keyring = new Keyring({ type: "ethereum" }); const bob = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); - const provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + const provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index 74c8af59c..143016d1a 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -1,26 +1,27 @@ ## Generated tx costs(Gas) for ERC1155 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :-------------------- | :----------: | :------------: | :-----------------------: | +|:----------------------|:------------:|:--------------:|:-------------------------:| | uri | 27560 | 22400 | 0 | | balanceOf | 25957 | 22433 | 0 | | balanceOfBatch | 32585 | 24106 | 0 | -| setApprovalForAll | 47025 | 26460 | 0 | +| setApprovalForAll | 47025 | 26466 | 0 | | isApprovedForAll | 26076 | 23184 | 0 | -| safeTransferFrom | 56523 | 31766 | 23335 | -| safeBatchTransferFrom | 44583 | 32160 | 26668 | -| mint | 31840 | 29278 | 23502 | -| mintBatch | 36913 | 31817 | 26835 | -| burn | 28958 | 26435 | 20001 | -| burnBatch | 35511 | 29291 | 23335 | +| safeTransferFrom | 59163 | 31608 | 23335 | +| safeBatchTransferFrom | 50205 | 35107 | 26669 | +| mint | 33152 | 31645 | 23502 | +| mintBatch | 42210 | 32033 | 26835 | +| burn | 32581 | 26332 | 20002 | +| burnBatch | 38043 | 28962 | 23335 | + ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :-------------------- | :-------------------: | :---------------------: | :--------------------: | -| safeTransferFrom | 838463 | 449594 | 350029 | -| safeBatchTransferFrom | 644104 | 462196 | 400029 | -| mint | 451950 | 438808 | 352533 | -| mintBatch | 547854 | 451230 | 402533 | -| burn | 433648 | 394944 | 300029 | -| burnBatch | 527227 | 439333 | 350029 | +|:----------------------|:---------------------:|:-----------------------:|:----------------------:| +| safeTransferFrom | 880468 | 444524 | 350033 | +| safeBatchTransferFrom | 728112 | 515451 | 400049 | +| mint | 493954 | 445709 | 352539 | +| mintBatch | 589858 | 458130 | 402539 | +| burn | 475652 | 389438 | 300033 | +| burnBatch | 569231 | 433828 | 350033 | diff --git a/e2e/test/ERC20/Erc20.TxCosts.test.ts b/e2e/test/ERC20/Erc20.TxCosts.test.ts index eff012bbf..30b67bd95 100644 --- a/e2e/test/ERC20/Erc20.TxCosts.test.ts +++ b/e2e/test/ERC20/Erc20.TxCosts.test.ts @@ -43,11 +43,11 @@ describe("ERC20 Gas Estimates", function () { node = await startNode(); await node.wait(); // wait for the node to be ready - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); const keyring = new Keyring({ type: "ethereum" }); diff --git a/e2e/test/ERC20/Erc20Precompile.test.ts b/e2e/test/ERC20/Erc20Precompile.test.ts index 6c855c1ef..ea6b913ee 100644 --- a/e2e/test/ERC20/Erc20Precompile.test.ts +++ b/e2e/test/ERC20/Erc20Precompile.test.ts @@ -23,7 +23,7 @@ describe("ERC20 Precompile", function () { await node.wait(); // wait for the node to be ready // Setup JSON RPC - jsonProvider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); + jsonProvider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); seedSigner = new Wallet(BOB_PRIVATE_KEY).connect(jsonProvider); // 'development' seed xrpToken = new Contract(xrpTokenAddress, ERC20_ABI, seedSigner); @@ -52,7 +52,7 @@ describe("ERC20 Precompile", function () { expect(await xrpToken.balanceOf(receiverAddress)).to.be.equal(transferAmount); // Account should be decremented by the sent amount + fees - expect(await xrpToken.balanceOf(seedSigner.address)).to.be.lessThan(startingAmount - transferAmount); + expect(await xrpToken.balanceOf(seedSigner.address)).to.be.lessThan(startingAmount.sub(transferAmount)); }); it("XRP transfer amounts via EVM", async () => { diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index c1ddf5270..607fcff50 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -1,21 +1,22 @@ ## Generated tx costs(Gas) for ERC20 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :------------ | :----------: | :------------: | :-----------------------: | +|:--------------|:------------:|:--------------:|:-------------------------:| | totalSupply | 23717 | 22388 | 0 | | balanceOf | 25860 | 23974 | 0 | | allowance | 26064 | 23273 | 0 | -| approval | 47152 | 26359 | 19503 | -| transfer | 50730 | 23241 | 19505 | -| transferFrom | 35302 | 32411 | 22673 | +| approval | 47152 | 26364 | 20170 | +| transfer | 52698 | 44134 | 20173 | +| transferFrom | 44716 | 51794 | 23174 | | name | 25926 | 22388 | 0 | | decimals | 22354 | 22388 | 0 | | symbol | 25945 | 22388 | 0 | + ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :------------ | :-------------------: | :---------------------: | :--------------------: | -| approval | 702835 | 390894 | 292552 | -| transfer | 739318 | 344249 | 292588 | -| transferFrom | 521152 | 470172 | 340107 | +|:--------------|:---------------------:|:-----------------------:|:----------------------:| +| approval | 702835 | 391134 | 302559 | +| transfer | 781323 | 633958 | 302595 | +| transferFrom | 647164 | 761966 | 347616 | diff --git a/e2e/test/ERC721/ERC721Precompile.test.ts b/e2e/test/ERC721/ERC721Precompile.test.ts index 81af85ca3..40aa78ebf 100644 --- a/e2e/test/ERC721/ERC721Precompile.test.ts +++ b/e2e/test/ERC721/ERC721Precompile.test.ts @@ -38,14 +38,14 @@ describe("ERC721 Precompile", function () { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); const keyring = new Keyring({ type: "ethereum" }); const bob = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); - const provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + const provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/ERC721/Erc721.TxCosts.test.ts b/e2e/test/ERC721/Erc721.TxCosts.test.ts index 0f7ccf8b3..2ae6b3fef 100644 --- a/e2e/test/ERC721/Erc721.TxCosts.test.ts +++ b/e2e/test/ERC721/Erc721.TxCosts.test.ts @@ -50,10 +50,10 @@ describe("ERC721 Gas Estimates", function () { node = await startNode(); await node.wait(); // wait for the node to be ready - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); const keyring = new Keyring({ type: "ethereum" }); diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index 19e4ec5e5..0515906ca 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -1,32 +1,33 @@ ## Generated tx costs(Gas) for ERC721 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :---------------- | :----------: | :------------: | :-----------------------: | +|:------------------|:------------:|:--------------:|:-------------------------:| | balanceOf | 25895 | 23274 | 0 | | ownerOf | 25847 | 23242 | 0 | | getApproved | 27395 | 23242 | 0 | | isApprovedForAll | 26082 | 23973 | 0 | -| mint | 53211 | 31937 | 17335 | -| burn | 37888 | 36617 | 17170 | -| approve | 50740 | 28914 | 23835 | -| setApprovalForAll | 47011 | 27438 | 23335 | -| safetransferFrom | 67203 | 36832 | 0 | -| transferFrom | 66861 | 35757 | 20670 | +| mint | 53193 | 28898 | 17335 | +| burn | 37870 | 35114 | 17169 | +| approve | 50740 | 27831 | 23835 | +| setApprovalForAll | 47011 | 26360 | 23335 | +| safetransferFrom | 67181 | 35303 | 0 | +| transferFrom | 66839 | 34917 | 20669 | | name | 25932 | 22388 | 0 | | symbol | 25938 | 22388 | 0 | | tokenURI | 25964 | 23242 | 0 | | owner | 23728 | 22388 | 0 | -| transferOwnership | 29147 | 28901 | 19835 | -| renounceOwnership | 30272 | 28520 | 19835 | +| transferOwnership | 29147 | 27675 | 19835 | +| renounceOwnership | 30272 | 27559 | 19668 | + ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :---------------- | :-------------------: | :---------------------: | :--------------------: | -| mint | 792274 | 455055 | 260038 | -| burn | 491074 | 539618 | 257550 | -| approve | 739543 | 431848 | 357534 | -| setApprovalForAll | 699609 | 399384 | 350025 | -| transferFrom | 884878 | 534383 | 310050 | -| transferOwnership | 436153 | 431293 | 297533 | -| renounceOwnership | 352310 | 425952 | 297533 | +|:------------------|:---------------------:|:-----------------------:|:----------------------:| +| mint | 791884 | 431188 | 260036 | +| burn | 490684 | 515676 | 257548 | +| approve | 739543 | 417326 | 357535 | +| setApprovalForAll | 699609 | 390954 | 350028 | +| transferFrom | 884488 | 509930 | 310049 | +| transferOwnership | 436153 | 410231 | 297532 | +| renounceOwnership | 352310 | 404890 | 295032 | diff --git a/e2e/test/EVMGasCosts.test.ts b/e2e/test/EVMGasCosts.test.ts index 8e35ae663..d92a8f6ae 100644 --- a/e2e/test/EVMGasCosts.test.ts +++ b/e2e/test/EVMGasCosts.test.ts @@ -32,7 +32,7 @@ describe("EVM gas costs", () => { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, @@ -53,7 +53,7 @@ describe("EVM gas costs", () => { console.log("Created and minted asset:", FIRST_ASSET_ID); // EVM variables - provider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); }); @@ -156,8 +156,8 @@ describe("EVM gas costs", () => { // assert XRP used const xrpCost6DP = actualCost.div(10 ** 12).toNumber(); const xrpCostScaled = +utils.formatEther(actualCost); - expect(xrpCost6DP).to.eql(21803760); - expect(+xrpCostScaled.toFixed(6)).to.eql(21.80376); + expect(xrpCost6DP).to.eql(21810720); + expect(+xrpCostScaled.toFixed(6)).to.eql(21.81072); }); it("gas cost for token mint", async () => { diff --git a/e2e/test/FeePreferences/FeePreferences.test.ts b/e2e/test/FeePreferences.test.ts similarity index 88% rename from e2e/test/FeePreferences/FeePreferences.test.ts rename to e2e/test/FeePreferences.test.ts index fbfbad962..7f80095f3 100644 --- a/e2e/test/FeePreferences/FeePreferences.test.ts +++ b/e2e/test/FeePreferences.test.ts @@ -22,19 +22,19 @@ import { XRP_PRECOMPILE_ADDRESS, assetIdToERC20ContractAddress, finalizeTx, + getNextAssetId, rpcs, startNode, typedefs, -} from "../../common"; -import { ERC20 } from "../../typechain-types"; - -const FEE_TOKEN_ASSET_ID = 1124; +} from "../common"; +import { ERC20 } from "../typechain-types"; // Call an EVM transaction with fee preferences for an account that has zero native token balance, // ensuring that the preferred asset with liquidity is spent instead describe("Fee Preferences", function () { let node: NodeProcess; + let feeTokenAssetId: number; let api: ApiPromise; let alith: KeyringPair; let bob: KeyringPair; @@ -47,25 +47,26 @@ describe("Fee Preferences", function () { node = await startNode(); // Setup PolkadotJS rpc provider - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, rpc: rpcs }); const keyring = new Keyring({ type: "ethereum" }); alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); bob = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); // Setup JSON RPC provider - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + feeTokenAssetId = await getNextAssetId(api); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); emptyAccountSigner = Wallet.createRandom().connect(provider); xrpERC20Precompile = new Contract(XRP_PRECOMPILE_ADDRESS, ERC20_ABI, emptyAccountSigner); - feeToken = new Contract(assetIdToERC20ContractAddress(FEE_TOKEN_ASSET_ID), ERC20_ABI, emptyAccountSigner) as ERC20; + feeToken = new Contract(assetIdToERC20ContractAddress(feeTokenAssetId), ERC20_ABI, emptyAccountSigner) as ERC20; // add liquidity for XRP<->token - const txes = [ + const txs = [ api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, alith.address, 2_000_000_000_000_000), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, emptyAccountSigner.address, 2_000_000_000_000_000), + api.tx.assets.mint(feeTokenAssetId, alith.address, 2_000_000_000_000_000), + api.tx.assets.mint(feeTokenAssetId, emptyAccountSigner.address, 2_000_000_000_000_000), api.tx.dex.addLiquidity( - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, GAS_TOKEN_ID, 100_000_000_000, 100_000_000_000, @@ -75,7 +76,7 @@ describe("Fee Preferences", function () { null, ), ]; - await finalizeTx(alith, api.tx.utility.batch(txes)); + await finalizeTx(alith, api.tx.utility.batch(txs)); }); after(async () => await node.stop()); @@ -145,7 +146,7 @@ describe("Fee Preferences", function () { const transferInput = iface.encodeFunctionData("transfer", [bob.address, transferAmount]); const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI_DEPRECATED, emptyAccountSigner); const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); - const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, FEE_TOKEN_ASSET_ID, gasEstimate); // default to min payment + const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment const tx = await feeProxy .connect(emptyAccountSigner) .callWithFeePreferences(feeToken.address, 0, feeToken.address, transferInput, gasOverrides); @@ -182,7 +183,7 @@ describe("Fee Preferences", function () { const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); const { tokenCost, gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.maxFeePerGas!, // adding priority fee to maxFeePerGas ); @@ -222,7 +223,7 @@ describe("Fee Preferences", function () { const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); const { tokenCost, gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.lastBaseFeePerGas!.add(1), // adding priority fee to maxFeePerGas ); @@ -261,7 +262,7 @@ describe("Fee Preferences", function () { const transferInput = iface.encodeFunctionData("transfer", [bob.address, transferAmount]); const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI, emptyAccountSigner); const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); - const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, FEE_TOKEN_ASSET_ID, gasEstimate); // default to min payment + const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment const tx = await feeProxy .connect(emptyAccountSigner) .callWithFeePreferences(feeToken.address, feeToken.address, transferInput, gasOverrides); @@ -298,7 +299,7 @@ describe("Fee Preferences", function () { const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); const { tokenCost, gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.maxFeePerGas!, // adding priority fee to maxFeePerGas ); @@ -338,7 +339,7 @@ describe("Fee Preferences", function () { const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); const { tokenCost, gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.lastBaseFeePerGas!.add(1), // adding priority fee to maxFeePerGas ); @@ -379,7 +380,7 @@ describe("Fee Preferences", function () { const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); const { tokenCost, gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.lastBaseFeePerGas!.add(500_000), // adding priority fee to maxFeePerGas BigNumber.from(500_000), @@ -416,7 +417,7 @@ describe("Fee Preferences", function () { const { gasOverrides } = await calcPaymentAmounts( provider, - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, gasEstimate, fees.lastBaseFeePerGas!.add(500_000), // adding priority fee to maxFeePerGas BigNumber.from(600_000), // (base + priority fee) exceeds maxFeePerGas @@ -449,7 +450,7 @@ describe("Fee Preferences", function () { const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI, newAccount); const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); - const { gasOverrides } = await calcPaymentAmounts(provider, FEE_TOKEN_ASSET_ID, gasEstimate); // default to min payment + const { gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment const unsignedTx = { type: 2, from: newAccount.address, @@ -468,6 +469,46 @@ describe("Fee Preferences", function () { expect(error.reason).to.be.eq("insufficient funds for intrinsic transaction cost"); }); + it("Fails to pay fees in non-native token if insufficient liquidity", async () => { + // this is a new account which has no token balance + const newAccount = Wallet.createRandom().connect(provider); + + const paymentAssetId = await getNextAssetId(api); + const txs = [ + api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), + api.tx.assets.mint(paymentAssetId, alith.address, 2_000_000_000_000_000), + api.tx.assets.mint(paymentAssetId, newAccount.address, 2_000_000_000_000_000), + api.tx.dex.addLiquidity(paymentAssetId, GAS_TOKEN_ID, 100_000, 100_000, 100_000, 100_000, null, null), + ]; + await finalizeTx(alith, api.tx.utility.batch(txs)); + + const paymentToken = new Contract(assetIdToERC20ContractAddress(paymentAssetId), ERC20_ABI, newAccount) as ERC20; + + const transferAmount = 1; + const iface = new utils.Interface(ERC20_ABI); + const transferInput = iface.encodeFunctionData("transfer", [bob.address, transferAmount]); + + const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI, newAccount); + const gasEstimate = await paymentToken.estimateGas.transfer(bob.address, transferAmount); + const { gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment + const unsignedTx = { + type: 2, + from: newAccount.address, + to: FEE_PROXY_ADDRESS, + nonce: await newAccount.getTransactionCount(), + data: feeProxy.interface.encodeFunctionData("callWithFeePreferences", [ + paymentToken.address, + paymentToken.address, + transferInput, + ]), + ...gasOverrides, + }; + + const error = await newAccount.sendTransaction(unsignedTx).catch((e) => e); + expect(error.code).to.be.eq("INSUFFICIENT_FUNDS"); + expect(error.reason).to.be.eq("insufficient funds for intrinsic transaction cost"); + }); + it("Fails to pay fees in non-native token with gasLimit 0", async () => { // call `transfer` on erc20 token - via `callWithFeePreferences` precompile function const transferAmount = 1; @@ -516,8 +557,8 @@ describe("Fee Preferences", function () { await finalizeTx( alith, api.tx.utility.batch([ - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, owner.address, 2_000_000_000), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, futurepass.address, 1), + api.tx.assets.mint(feeTokenAssetId, owner.address, 2_000_000_000), + api.tx.assets.mint(feeTokenAssetId, futurepass.address, 1), ]), ); @@ -551,7 +592,7 @@ describe("Fee Preferences", function () { .connect(owner) .estimateGas.proxyCall(callTxType, feeToken.address, ethers.constants.Zero, transferCallData); - const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, FEE_TOKEN_ASSET_ID, gasEstimate); // default to min payment + const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment tx = await feeProxy .connect(owner) @@ -600,7 +641,7 @@ describe("Fee Preferences", function () { const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI, emptyAccountSigner); const gasEstimate = await feeToken.estimateGas.transfer(bob.address, transferAmount); - const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, FEE_TOKEN_ASSET_ID, gasEstimate); // default to min payment + const { tokenCost, gasOverrides } = await calcPaymentAmounts(provider, feeTokenAssetId, gasEstimate); // default to min payment const nonce = await emptyAccountSigner.getTransactionCount(); const unsignedTx = { @@ -643,37 +684,37 @@ describe("Fee Preferences", function () { const futurepassAddress = (await api.query.futurepass.holders(user.address)).toString(); // mint fee tokens to futurepass - await finalizeTx(alith, api.tx.assets.mint(FEE_TOKEN_ASSET_ID, futurepassAddress, 2_000_000_000_000)); + await finalizeTx(alith, api.tx.assets.mint(feeTokenAssetId, futurepassAddress, 2_000_000_000_000)); const eoaXRPBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; const eoaTokenBalanceBefore = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, user.address)).toJSON() as any)?.balance ?? 0; const fpXRPBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; const fpTokenBalanceBefore = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, futurepassAddress)).toJSON() as any)?.balance ?? 0; // console.table({ eoaXRPBalanceBefore, eoaTokenBalanceBefore, fpXRPBalanceBefore, fpTokenBalanceBefore }); const innerCall = api.tx.system.remark("sup"); const proxyExtrinsic = api.tx.futurepass.proxyExtrinsic(futurepassAddress, innerCall); - const feeproxiedCall = api.tx.feeProxy.callWithFeePreferences(FEE_TOKEN_ASSET_ID, 1000000, proxyExtrinsic); + const feeproxiedCall = api.tx.feeProxy.callWithFeePreferences(feeTokenAssetId, 1000000, proxyExtrinsic); await finalizeTx(userKeyring, feeproxiedCall); const eoaXRPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; const eoaTokenBalanceAfter = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, user.address)).toJSON() as any)?.balance ?? 0; const fpXRPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; const fpTokenBalanceAfter = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, futurepassAddress)).toJSON() as any)?.balance ?? 0; // futurepass should only fee lose tokens expect(eoaXRPBalanceBefore).to.be.eq(eoaXRPBalanceAfter); expect(eoaTokenBalanceBefore).to.be.eq(eoaTokenBalanceAfter); - expect(fpXRPBalanceBefore).to.be.eq(fpXRPBalanceAfter); + expect(fpXRPBalanceBefore + 1).to.be.eq(fpXRPBalanceAfter); // 1 existential deposit expect(fpTokenBalanceAfter).to.be.lessThan(fpTokenBalanceBefore); }); @@ -685,19 +726,19 @@ describe("Fee Preferences", function () { const futurepassAddress = (await api.query.futurepass.holders(user.address)).toString(); // mint fee tokens to futurepass - await finalizeTx(alith, api.tx.assets.mint(FEE_TOKEN_ASSET_ID, futurepassAddress, 2_000_000_000_000)); + await finalizeTx(alith, api.tx.assets.mint(feeTokenAssetId, futurepassAddress, 2_000_000_000_000)); const eoaXRPBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; const eoaTokenBalanceBefore = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, user.address)).toJSON() as any)?.balance ?? 0; const fpXRPBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; const fpTokenBalanceBefore = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, futurepassAddress)).toJSON() as any)?.balance ?? 0; // call `transfer` on erc20 token - via `callWithFeePreferences` precompile function - const erc20PrecompileAddress = assetIdToERC20ContractAddress(FEE_TOKEN_ASSET_ID); + const erc20PrecompileAddress = assetIdToERC20ContractAddress(feeTokenAssetId); const sender = futurepassAddress; const value = 0; //eth const gasLimit = 42953; @@ -722,7 +763,7 @@ describe("Fee Preferences", function () { // record bob's token balance const bobTokenBalanceBefore = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, bob.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, bob.address)).toJSON() as any)?.balance ?? 0; const evmCallGasEstimate = await evmCall.paymentInfo(sender); const evmCallGasEstimateinXRP = evmCallGasEstimate.partialFee; @@ -732,7 +773,7 @@ describe("Fee Preferences", function () { // Find estimate cost for feeProxy call const extrinsicInfo = await api.tx.feeProxy .callWithFeePreferences( - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, utils.parseEther("1").toString(), // 10e18 proxyExtrinsic, ) @@ -742,14 +783,14 @@ describe("Fee Preferences", function () { // cost for fee proxy with proxy_extrinsic + cost for evm call, but the actual cost will be lesser than this value. const estimatedTotalGasCost = evmCallGasEstimateinXRP.toNumber() + feeProxyGasEstimateinXRP.toNumber(); - // convert estimatedTotalGasCost to FEE_TOKEN_ASSET_ID amount + // convert estimatedTotalGasCost to feeTokenAssetId amount const { Ok: [estimatedTokenTxCost], - } = await (api.rpc as any).dex.getAmountsIn(estimatedTotalGasCost, [FEE_TOKEN_ASSET_ID, GAS_TOKEN_ID]); + } = await (api.rpc as any).dex.getAmountsIn(estimatedTotalGasCost, [feeTokenAssetId, GAS_TOKEN_ID]); // Now call the callWithFeePreferences with sufficient max_payment of estimatedTokenTxCost const feeproxiedCall = api.tx.feeProxy.callWithFeePreferences( - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, estimatedTokenTxCost, proxyExtrinsic, ); @@ -758,13 +799,13 @@ describe("Fee Preferences", function () { const eoaXRPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; const eoaTokenBalanceAfter = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, user.address)).toJSON() as any)?.balance ?? 0; const fpXRPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; const fpTokenBalanceAfter = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, futurepassAddress)).toJSON() as any)?.balance ?? 0; const bobTokenBalanceAfter = - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, bob.address)).toJSON() as any)?.balance ?? 0; + ((await api.query.assets.account(feeTokenAssetId, bob.address)).toJSON() as any)?.balance ?? 0; // eoa token and XRP balance should remain untouched. expect(eoaXRPBalanceBefore).to.be.eq(eoaXRPBalanceAfter); @@ -778,7 +819,7 @@ describe("Fee Preferences", function () { }); it("Pays fees in non-native token with extrinsic - check maxPayment works fine", async () => { - const erc20PrecompileAddress = assetIdToERC20ContractAddress(FEE_TOKEN_ASSET_ID); + const erc20PrecompileAddress = assetIdToERC20ContractAddress(feeTokenAssetId); const sender = alith.address; const value = 0; //eth const gasLimit = 22953; @@ -809,7 +850,7 @@ describe("Fee Preferences", function () { // Find estimate cost for feeProxy call const extrinsicInfo = await api.tx.feeProxy .callWithFeePreferences( - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, utils.parseEther("1").toString(), // 10e18 api.createType("Call", evmCall).toHex(), ) @@ -821,12 +862,12 @@ describe("Fee Preferences", function () { const { Ok: [estimatedTokenTxCost], - } = await (api.rpc as any).dex.getAmountsIn(estimatedTotalGasCost, [FEE_TOKEN_ASSET_ID, GAS_TOKEN_ID]); + } = await (api.rpc as any).dex.getAmountsIn(estimatedTotalGasCost, [feeTokenAssetId, GAS_TOKEN_ID]); const eventData = await new Promise((resolve, reject) => { api.tx.feeProxy .callWithFeePreferences( - FEE_TOKEN_ASSET_ID, + feeTokenAssetId, estimatedTokenTxCost.toString(), api.createType("Call", evmCall).toHex(), ) @@ -843,7 +884,7 @@ describe("Fee Preferences", function () { }); expect(eventData).to.exist; const [from, paymentAsset, maxPayment] = eventData; - expect(paymentAsset.toString()).to.equal(FEE_TOKEN_ASSET_ID.toString()); + expect(paymentAsset.toString()).to.equal(feeTokenAssetId.toString()); expect(from.toString()).to.equal(alith.address.toString()); expect(maxPayment.toString()).to.equal(estimatedTokenTxCost.toString()); }); diff --git a/e2e/test/FeePreferences/LowLiquidity.test.ts b/e2e/test/FeePreferences/LowLiquidity.test.ts deleted file mode 100644 index 5ca1066a0..000000000 --- a/e2e/test/FeePreferences/LowLiquidity.test.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { JsonRpcProvider } from "@ethersproject/providers"; -import { ApiPromise, Keyring, WsProvider } from "@polkadot/api"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { hexToU8a } from "@polkadot/util"; -import { expect } from "chai"; -import { Contract, Wallet, utils } from "ethers"; - -import { - ALITH_PRIVATE_KEY, - BOB_PRIVATE_KEY, - ERC20_ABI, - FEE_PROXY_ABI, - FEE_PROXY_ADDRESS, - GAS_TOKEN_ID, - NodeProcess, - assetIdToERC20ContractAddress, - startNode, - typedefs, -} from "../../common"; - -const feeTokenAssetId = 1124; -const EMPTY_ACCT_PRIVATE_KEY = "0xf8d74108dbe199c4a6e4ef457046db37c325ba3f709b14cabfa1885663e4c589"; - -describe("Fee Preferences under low token pair liquidity", function () { - let node: NodeProcess; - - let bob: KeyringPair; - let emptyAccountSigner: Wallet; - let feeToken: Contract; - let alithSigner: Wallet; - - before(async () => { - node = await startNode(); - - // Setup PolkadotJS rpc provider - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); - const api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); - - const keyring = new Keyring({ type: "ethereum" }); - bob = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); - const alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); - const emptyAcct = keyring.addFromSeed(hexToU8a(EMPTY_ACCT_PRIVATE_KEY)); - - const txes = [ - api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), - api.tx.assets.mint(feeTokenAssetId, alith.address, 2_000_000_000_000_000), - api.tx.assets.mint(feeTokenAssetId, emptyAcct.address, 2_000_000_000_000_000), - api.tx.dex.addLiquidity(feeTokenAssetId, GAS_TOKEN_ID, 100_000, 100_000, 100_000, 100_000, null, null), - ]; - await new Promise((resolve) => { - api.tx.utility.batch(txes).signAndSend(alith, ({ status }) => { - if (status.isInBlock) { - console.log(`setup block hash: ${status.asInBlock}`); - resolve(); - } - }); - }); - - // Setup JSON RPC provider - const jsonProvider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); - emptyAccountSigner = new Wallet(EMPTY_ACCT_PRIVATE_KEY).connect(jsonProvider); - alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(jsonProvider); - feeToken = new Contract(assetIdToERC20ContractAddress(feeTokenAssetId), ERC20_ABI, alithSigner); - }); - - after(async () => await node.stop()); - - it("Fails to pay fees in non-native token if insufficient liquidity", async () => { - // call `transfer` on erc20 token - via `callWithFeePreferences` precompile function - const transferAmount = 1; - const iface = new utils.Interface(ERC20_ABI); - const transferInput = iface.encodeFunctionData("transfer", [bob.address, transferAmount]); - - const feeProxy = new Contract(FEE_PROXY_ADDRESS, FEE_PROXY_ABI, emptyAccountSigner); - const nonce = await emptyAccountSigner.getTransactionCount(); - const chainId = 7672; - const maxPriorityFeePerGas = 0; // 1_500_000_000 = '0x59682f00' - const gasLimit = 23316; // '0x5b14' = 23316; - const maxFeePerGas = 30_001_500_000_0000; // 30_001_500_000_000 = '0x1b4944c00f00' - const unsignedTx = { - // eip1559 tx - type: 2, - from: emptyAccountSigner.address, - to: FEE_PROXY_ADDRESS, - nonce, - data: feeProxy.interface.encodeFunctionData("callWithFeePreferences", [ - feeToken.address, - feeToken.address, - transferInput, - ]), - gasLimit, - maxFeePerGas, - maxPriorityFeePerGas, - chainId, - }; - - // assert error from tx - const error = await emptyAccountSigner.sendTransaction(unsignedTx).catch((e) => e); - expect(error.code).to.be.eq("INSUFFICIENT_FUNDS"); - expect(error.reason).to.be.eq("insufficient funds for intrinsic transaction cost"); - }); -}); diff --git a/e2e/test/Futurepass/Futurepass.TxCosts.test.ts b/e2e/test/Futurepass/Futurepass.TxCosts.test.ts index f32bce856..801310f06 100644 --- a/e2e/test/Futurepass/Futurepass.TxCosts.test.ts +++ b/e2e/test/Futurepass/Futurepass.TxCosts.test.ts @@ -58,7 +58,7 @@ describe("Futurepass Precompile", function () { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, @@ -67,7 +67,7 @@ describe("Futurepass Precompile", function () { alithKeyring = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); // Ethereum variables - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); futurepassRegistrar = new Contract( diff --git a/e2e/test/Futurepass/FuturepassPrecompile.test.ts b/e2e/test/Futurepass/FuturepassPrecompile.test.ts index 167f3489a..cec617a2f 100644 --- a/e2e/test/Futurepass/FuturepassPrecompile.test.ts +++ b/e2e/test/Futurepass/FuturepassPrecompile.test.ts @@ -50,7 +50,7 @@ describe("Futurepass Precompile", function () { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, @@ -60,7 +60,7 @@ describe("Futurepass Precompile", function () { alithKeyring = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); // Ethereum variables - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); futurepassRegistrar = new Contract( @@ -919,7 +919,7 @@ describe("Futurepass Precompile", function () { // fund the FP, FP_DELEGATE_RESERVE amount of Root for the delegate reserve await fundAccount(api, alithKeyring, futurepassPrecompile.address, FP_DELEGATE_RESERVE); const fpBalance: any = (await api.query.system.account(futurepassPrecompile.address)).toJSON(); - expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE); + expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE + 1); // 1 existential deposit const deadline = (await provider.getBlockNumber()) + 20; const message = ethers.utils @@ -957,7 +957,7 @@ describe("Futurepass Precompile", function () { // fund the FP, FP_DELEGATE_RESERVE amount of Root for the delegate reserve await fundAccount(api, alithKeyring, futurepassPrecompile.address, FP_DELEGATE_RESERVE); const fpBalance: any = (await api.query.system.account(futurepassPrecompile.address)).toJSON(); - expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE); + expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE + 1); // 1 existential deposit const deadline = (await provider.getBlockNumber()) + 20; const message = ethers.utils @@ -1007,7 +1007,7 @@ describe("Futurepass Precompile", function () { // fund the FP, FP_DELEGATE_RESERVE amount of Root for the delegate reserve await fundAccount(api, alithKeyring, futurepassPrecompile.address, FP_DELEGATE_RESERVE); const fpBalance: any = (await api.query.system.account(futurepassPrecompile.address)).toJSON(); - expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE); + expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE + 1); // 1 existential deposit const deadline = (await provider.getBlockNumber()) + 20; const message = ethers.utils @@ -1049,7 +1049,7 @@ describe("Futurepass Precompile", function () { // fund the FP, FP_DELEGATE_RESERVE amount of Root for the delegate reserve await fundAccount(api, alithKeyring, futurepassPrecompile.address, FP_DELEGATE_RESERVE); const fpBalance: any = (await api.query.system.account(futurepassPrecompile.address)).toJSON(); - expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE); + expect(fpBalance.data.free).to.equal(FP_DELEGATE_RESERVE + 1); // 1 existential deposit // create() not allowed let callData = futurepassRegistrar.interface.encodeFunctionData("create", [other.address]); diff --git a/e2e/test/Futurepass/FuturepassRegistrarPrecompile.test.ts b/e2e/test/Futurepass/FuturepassRegistrarPrecompile.test.ts index 2508a4d21..52e13779e 100644 --- a/e2e/test/Futurepass/FuturepassRegistrarPrecompile.test.ts +++ b/e2e/test/Futurepass/FuturepassRegistrarPrecompile.test.ts @@ -24,14 +24,14 @@ describe("Futurepass Precompile", function () { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); await ApiPromise.create({ provider: wsProvider, types: typedefs, }); // Ethereum variables - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); futurepassRegistrarProxy = new Contract( diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index 16097b6f8..711adb490 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -1,19 +1,20 @@ ## Generated tx costs(Gas) for Futurepass Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :---------------------------- | :----------: | :------------: | :-----------------------: | -| create | 0 | 42815 | 19005 | -| registerDelegateWithSignature | 0 | 43044 | 34005 | -| unregisterDelegate | 0 | 37143 | 22337 | -| transferOwnership | 0 | 46053 | 22506 | -| proxyCall | 0 | 65694 | 23507 | +|:------------------------------|:------------:|:--------------:|:-------------------------:| +| create | 0 | 42795 | 19172 | +| registerDelegateWithSignature | 0 | 42933 | 34005 | +| unregisterDelegate | 0 | 38078 | 22338 | +| transferOwnership | 0 | 46431 | 22507 | +| proxyCall | 0 | 65694 | 24008 | + ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :---------------------------- | :-------------------: | :---------------------: | :--------------------: | -| create | 0 | 603705 | 285083 | -| registerDelegateWithSignature | 0 | 608940 | 510075 | -| unregisterDelegate | 0 | 554260 | 335069 | -| transferOwnership | 0 | 677737 | 337602 | -| proxyCall | 0 | 899654 | 352610 | +|:------------------------------|:---------------------:|:-----------------------:|:----------------------:| +| create | 0 | 603255 | 287587 | +| registerDelegateWithSignature | 0 | 606405 | 510080 | +| unregisterDelegate | 0 | 570177 | 335078 | +| transferOwnership | 0 | 686378 | 337609 | +| proxyCall | 0 | 899654 | 360130 | diff --git a/e2e/test/MarketPlace/MarketPlacePrecompile.test.ts b/e2e/test/MarketPlace/MarketPlacePrecompile.test.ts index 45c8b528b..c3c3aa814 100644 --- a/e2e/test/MarketPlace/MarketPlacePrecompile.test.ts +++ b/e2e/test/MarketPlace/MarketPlacePrecompile.test.ts @@ -37,14 +37,14 @@ describe("Marketplace Precompile", function () { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); const keyring = new Keyring({ type: "ethereum" }); const bob = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); - const provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + const provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/MarketPlace/Marketplace.TxCosts.test.ts b/e2e/test/MarketPlace/Marketplace.TxCosts.test.ts index 86c2925a0..249afe758 100644 --- a/e2e/test/MarketPlace/Marketplace.TxCosts.test.ts +++ b/e2e/test/MarketPlace/Marketplace.TxCosts.test.ts @@ -49,7 +49,7 @@ describe("Marketplace Precompile Gas Estimates", function () { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // Setup Root api instance and keyring api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); @@ -57,7 +57,7 @@ describe("Marketplace Precompile Gas Estimates", function () { bobKeyring = keyring.addFromSeed(hexToU8a(BOB_PRIVATE_KEY)); alithKeyring = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index 86b8ac57a..bbf42549f 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -2,29 +2,29 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:--------------------|:------------:|:--------------:|:-------------------------:| -| registerMarketplace | 0 | 32492 | 19836 | -| sellNft | 0 | 46114 | 27006 | -| auctionNft | 0 | 46030 | 23506 | -| makeSimpleOffer | 0 | 59796 | 27844 | -| buy | 0 | 23244 | 85010 | -| bid | 0 | 69927 | 687678 | -| cancelSale | 0 | 37754 | 18338 | -| updateFixedPrice | 0 | 32045 | 21002 | -| acceptOffer | 0 | 68258 | 17004 | -| cancelOffer | 0 | 53726 | 17002 | +| registerMarketplace | 0 | 31852 | 20003 | +| sellNft | 0 | 52474 | 27175 | +| auctionNft | 0 | 52664 | 23675 | +| makeSimpleOffer | 0 | 56998 | 28010 | +| buy | 0 | 46376 | 85174 | +| bid | 0 | 57868 | 687843 | +| cancelSale | 0 | 37001 | 18504 | +| updateFixedPrice | 0 | 28397 | 21168 | +| acceptOffer | 0 | 69853 | 17172 | +| cancelOffer | 0 | 52566 | 17168 | ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------------|:---------------------:|:-----------------------:|:----------------------:| -| registerMarketplace | 0 | 472817 | 297544 | -| sellNft | 0 | 679117 | 405092 | -| auctionNft | 0 | 677197 | 352593 | -| makeSimpleOffer | 0 | 993339 | 417660 | -| buy | 0 | 1344434 | 1275160 | -| bid | 0 | 10974932 | 10315183 | -| cancelSale | 0 | 561356 | 275070 | -| updateFixedPrice | 0 | 458505 | 315032 | -| acceptOffer | 0 | 945144 | 255074 | -| cancelOffer | 0 | 803155 | 255036 | +| registerMarketplace | 0 | 452340 | 300045 | +| sellNft | 0 | 776537 | 407628 | +| auctionNft | 0 | 780588 | 355127 | +| makeSimpleOffer | 0 | 948289 | 420154 | +| buy | 0 | 1685118 | 1277610 | +| bid | 0 | 10866246 | 10317659 | +| cancelSale | 0 | 550330 | 277571 | +| updateFixedPrice | 0 | 420702 | 317532 | +| acceptOffer | 0 | 973497 | 257587 | +| cancelOffer | 0 | 778402 | 257534 | diff --git a/e2e/test/NFTPrecompile.test.ts b/e2e/test/NFTPrecompile.test.ts index 0692fb3cc..e68b3ac25 100644 --- a/e2e/test/NFTPrecompile.test.ts +++ b/e2e/test/NFTPrecompile.test.ts @@ -28,14 +28,14 @@ describe("NFT Precompile", function () { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, }); // Ethereum variables - const provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + const provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); diff --git a/e2e/test/PegPrecompile.test.ts b/e2e/test/PegPrecompile.test.ts index 5538af5ec..0f651c2f2 100644 --- a/e2e/test/PegPrecompile.test.ts +++ b/e2e/test/PegPrecompile.test.ts @@ -36,7 +36,7 @@ describe("Peg Precompile", function () { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, @@ -44,7 +44,7 @@ describe("Peg Precompile", function () { const keyring = new Keyring({ type: "ethereum" }); // Ethereum variables - const provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + const provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); // 'development' seed bobSigner = new Wallet(BOB_PRIVATE_KEY).connect(provider); alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); diff --git a/e2e/test/SftRPC.test.ts b/e2e/test/SftRPC.test.ts index 5fe2526aa..566cf6713 100644 --- a/e2e/test/SftRPC.test.ts +++ b/e2e/test/SftRPC.test.ts @@ -28,7 +28,7 @@ describe("SftRPC", () => { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs, @@ -72,7 +72,7 @@ describe("SftRPC", () => { after(async () => node.stop()); it("token_uri rpc works [http - axios]", async () => { - const httpResult = await axios.post(`http://localhost:${node.httpPort}`, { + const httpResult = await axios.post(`http://127.0.0.1:${node.rpcPort}`, { id: 1, jsonrpc: "2.0", method: "sft_tokenUri", diff --git a/e2e/test/TestCall.GasEstimates.test.ts b/e2e/test/TestCall.GasEstimates.test.ts index 7c384b113..b4aefbfdc 100644 --- a/e2e/test/TestCall.GasEstimates.test.ts +++ b/e2e/test/TestCall.GasEstimates.test.ts @@ -19,7 +19,7 @@ describe("TestCall", () => { await node.wait(); // wait for the node to be ready - provider = new JsonRpcProvider(`http://127.0.0.1:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); const TestFactory = await ethers.getContractFactory("TestCall"); diff --git a/e2e/test/TxFeePotFeeAccruel.test.ts b/e2e/test/TxFeePotFeeAccruel.test.ts index 102642ad8..a037ded00 100644 --- a/e2e/test/TxFeePotFeeAccruel.test.ts +++ b/e2e/test/TxFeePotFeeAccruel.test.ts @@ -28,11 +28,8 @@ describe("TxFeePot fees accruel", () => { node = await startNode(); // Substrate variables - const wsProvider = new WsProvider(`ws://localhost:${node.wsPort}`); - api = await ApiPromise.create({ - provider: wsProvider, - types: typedefs, - }); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); + api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); const keyring = new Keyring({ type: "ethereum" }); alith = keyring.addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); @@ -44,7 +41,7 @@ describe("TxFeePot fees accruel", () => { }); // EVM variables - provider = new JsonRpcProvider(`http://localhost:${node.httpPort}`); + provider = new JsonRpcProvider(`http://127.0.0.1:${node.rpcPort}`); alithSigner = new Wallet(ALITH_PRIVATE_KEY).connect(provider); xrpInitialIssuance = +(await api.query.balances.totalIssuance()).toString(); diff --git a/e2e/test/Vortex.test.ts b/e2e/test/Vortex.test.ts index 574bed9cc..81e069d91 100644 --- a/e2e/test/Vortex.test.ts +++ b/e2e/test/Vortex.test.ts @@ -35,7 +35,7 @@ describe("Vortex Distribution", () => { before(async () => { node = await startNode(); - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); // const wsProvider = new WsProvider(`wss://archive.morel.micklelab.xyz/ws`); api = await ApiPromise.create({ provider: wsProvider, diff --git a/e2e/test/XRPL.test.ts b/e2e/test/XRPL.test.ts index 72cdcf076..9c4ea8892 100644 --- a/e2e/test/XRPL.test.ts +++ b/e2e/test/XRPL.test.ts @@ -11,7 +11,17 @@ import { deriveAddress, sign } from "ripple-keypairs"; import Web3 from "web3"; import * as AccountLib from "xrpl-accountlib"; -import { ALITH_PRIVATE_KEY, GAS_TOKEN_ID, NodeProcess, finalizeTx, startNode, stringToHex, typedefs } from "../common"; +import { + ALITH_PRIVATE_KEY, + GAS_TOKEN_ID, + NodeProcess, + finalizeTx, + getNextAssetId, + poolAddress, + startNode, + stringToHex, + typedefs, +} from "../common"; describe("XRPL pallet", () => { let node: NodeProcess; @@ -24,7 +34,7 @@ describe("XRPL pallet", () => { node = await startNode(); // substrate variables - const wsProvider = new WsProvider(`ws://127.0.0.1:${node.wsPort}`); + const wsProvider = new WsProvider(`ws://127.0.0.1:${node.rpcPort}`); api = await ApiPromise.create({ provider: wsProvider, types: typedefs }); alith = new Keyring({ type: "ethereum" }).addFromSeed(hexToU8a(ALITH_PRIVATE_KEY)); genesisHash = api.genesisHash.toHex().slice(2); @@ -439,8 +449,8 @@ describe("XRPL pallet", () => { ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; expect(xrpBalanceAfter).to.be.lessThan(xrpBalanceBefore); expect(xrpBalanceBefore - xrpBalanceAfter) - .to.be.greaterThan(865_000) - .and.lessThan(880_000); + .to.be.greaterThan(870_000) + .and.lessThan(885_000); }); it("can submit fee-proxy extrinsic", async () => { @@ -586,7 +596,7 @@ describe("XRPL pallet", () => { // user xrp balance should not change since tx fees paid in asset const xrpUserBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; - expect(xrpUserBalanceAfter).to.be.eq(xrpUserBalanceBefore); + expect(xrpUserBalanceAfter).to.be.eq(xrpUserBalanceBefore + 1); // 1 is existential deposit // assert token balance after < balance before (tx fee must be paid in asset) const assetUserBalanceAfter = BigNumber.from( @@ -714,8 +724,8 @@ describe("XRPL pallet", () => { ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; expect(xrpFPBalanceAfter).to.be.lessThan(xrpFPBalanceBefore); expect(xrpFPBalanceBefore - xrpFPBalanceAfter) - .to.be.greaterThan(920_000) - .and.lessThan(935_000); + .to.be.greaterThan(925_000) + .and.lessThan(940_000); }); it("can submit futurepass fee-proxy proxy-extrinsic", async () => { @@ -728,13 +738,13 @@ describe("XRPL pallet", () => { const futurepassAddress = (await api.query.futurepass.holders(user.address)).toString(); // add liquidity for XRP<->token; fund the futurepass account with tokens - const FEE_TOKEN_ASSET_ID = 1124; + const paymentToken = await getNextAssetId(api); const txs = [ api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, alith.address, 2_000_000_000_000_000), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, futurepassAddress, 2_000_000_000_000_000), + api.tx.assets.mint(paymentToken, alith.address, 2_000_000_000_000_000), + api.tx.assets.mint(paymentToken, futurepassAddress, 2_000_000_000_000_000), api.tx.dex.addLiquidity( - FEE_TOKEN_ASSET_ID, + paymentToken, GAS_TOKEN_ID, 100_000_000_000, 100_000_000_000, @@ -750,7 +760,7 @@ describe("XRPL pallet", () => { const innerCall = api.tx.system.remark("sup"); const futurepassCall = api.tx.futurepass.proxyExtrinsic(futurepassAddress, innerCall); const maxTokenPayment = 5_000_000; - const extrinsic = api.tx.feeProxy.callWithFeePreferences(FEE_TOKEN_ASSET_ID, maxTokenPayment, futurepassCall); + const extrinsic = api.tx.feeProxy.callWithFeePreferences(paymentToken, maxTokenPayment, futurepassCall); const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); const nonce = ((await api.query.system.account(user.address)).toJSON() as any)?.nonce; const maxBlockNumber = +(await api.query.system.number()).toString() + 5; @@ -760,10 +770,10 @@ describe("XRPL pallet", () => { const xrpFPBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; const assetUserBalanceBefore = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(paymentToken, user.address)).toJSON() as any)?.balance ?? 0, ); const assetFPBalanceBefore = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(paymentToken, futurepassAddress)).toJSON() as any)?.balance ?? 0, ); const xamanJsonTx = { @@ -805,7 +815,7 @@ describe("XRPL pallet", () => { // assets Transferred [1124,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac","0xDDDDDDdD00000002000004640000000000000000",727237] expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Transferred"); - expect(events[index].event.data[0]).to.equal(FEE_TOKEN_ASSET_ID); + expect(events[index].event.data[0]).to.equal(paymentToken); expect(events[index].event.data[1].toString()).to.equal(futurepassAddress); // assets Transferred [2,"0xDDDDDDdD00000002000004640000000000000000","0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",725039] @@ -813,21 +823,21 @@ describe("XRPL pallet", () => { expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Transferred"); expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); - expect(events[index].event.data[1].toString()).to.equal("0xDDDDDDdD00000002000004640000000000000000"); + expect(events[index].event.data[1].toString().toLowerCase()).to.equal(poolAddress(paymentToken, GAS_TOKEN_ID).toLocaleLowerCase()); expect(events[index].event.data[2].toString()).to.equal(futurepassAddress); // assets Issued [2148,"0x6D6F646c7478666565706F740000000000000000",181] index += 1; expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Issued"); - expect(events[index].event.data[0]).to.equal(2148); + // expect(events[index].event.data[0]).to.equal(paymentToken); // pool token // dex Swap ["0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",[1124,2],727237,725039,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac"] index += 1; expect(events[index].event.section).to.equal("dex"); expect(events[index].event.method).to.equal("Swap"); expect(events[index].event.data[0].toString()).to.equal(futurepassAddress); - expect(events[index].event.data[1].toString()).to.equal(`[${FEE_TOKEN_ASSET_ID}, ${GAS_TOKEN_ID}]`); + expect(events[index].event.data[1].toString()).to.equal(`[${paymentToken}, ${GAS_TOKEN_ID}]`); // assetsExt InternalWithdraw [2,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",725039] index += 1; @@ -852,7 +862,7 @@ describe("XRPL pallet", () => { expect(events[index].event.section).to.equal("feeProxy"); expect(events[index].event.method).to.equal("CallWithFeePreferences"); expect(events[index].event.data[0].toString()).to.equal(user.address); // TODO: should be futurepass address - expect(events[index].event.data[1]).to.equal(FEE_TOKEN_ASSET_ID); + expect(events[index].event.data[1]).to.equal(paymentToken); expect(events[index].event.data[2]).to.equal(maxTokenPayment); // xrpl XRPLExtrinsicExecuted ["0x02509540919faacf9ab52146c9aa40db68172d83777250b28e4679176e49ccdd9f","0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac","rDyqBotBNJeXv8PBHY18ABjyw6FQuWXQnu",{"callIndex":"0x1f00","args":{"payment_asset":1124,"max_payment":2000000,"call":{"callIndex":"0x0001","args":{"remark":"0x737570"}}}}] @@ -887,18 +897,18 @@ describe("XRPL pallet", () => { // user asset balance should not change since tx fees paid by futurepass in asset const assetUserBalanceAfter = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(paymentToken, user.address)).toJSON() as any)?.balance ?? 0, ); expect(assetUserBalanceAfter).to.be.eq(assetUserBalanceBefore); // futurepass xrp balance should not change since tx fees paid by futurepass in asset const xrpFPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; - expect(xrpFPBalanceAfter).to.be.eq(xrpFPBalanceBefore); + expect(xrpFPBalanceAfter).to.be.eq(xrpFPBalanceBefore + 1); // 1 is existential deposit // assert futurepass token balance after < balance before (tx fee must be paid in asset by futurepass) const assetFPBalanceAfter = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(paymentToken, futurepassAddress)).toJSON() as any)?.balance ?? 0, ); expect(assetFPBalanceAfter).to.be.lessThan(assetFPBalanceBefore); }); diff --git a/e2e/yarn.lock b/e2e/yarn.lock index d0c303ac0..154bc119b 100644 --- a/e2e/yarn.lock +++ b/e2e/yarn.lock @@ -85,13 +85,6 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== -"@babel/runtime@^7.20.13", "@babel/runtime@^7.20.6": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" - integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/template@^7.22.15": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.23.9.tgz#f881d0487cba2828d3259dcb9ef5005a9731011a" @@ -663,6 +656,13 @@ dependencies: "@noble/hashes" "1.3.3" +"@noble/curves@^1.3.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== + dependencies: + "@noble/hashes" "1.4.0" + "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" @@ -673,7 +673,7 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== -"@noble/hashes@^1.2.0": +"@noble/hashes@1.4.0", "@noble/hashes@^1.2.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== @@ -953,336 +953,383 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== -"@polkadot/api-augment@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-9.14.2.tgz#2c49cdcfdf7057523db1dc8d7b0801391a8a2e69" - integrity sha512-19MmW8AHEcLkdcUIo3LLk0eCQgREWqNSxkUyOeWn7UiNMY1AhDOOwMStUBNCvrIDK6VL6GGc1sY7rkPCLMuKSw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/api-base" "9.14.2" - "@polkadot/rpc-augment" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-augment" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/util" "^10.4.2" - -"@polkadot/api-base@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-9.14.2.tgz#605b44e3692a125bd8d97eed9cea8af9d0c454e2" - integrity sha512-ky9fmzG1Tnrjr/SBZ0aBB21l0TFr+CIyQenQczoUyVgiuxVaI/2Bp6R2SFrHhG28P+PW2/RcYhn2oIAR2Z2fZQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/rpc-core" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/util" "^10.4.2" - rxjs "^7.8.0" - -"@polkadot/api-derive@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-9.14.2.tgz#e8fcd4ee3f2b80b9fe34d4dec96169c3bdb4214d" - integrity sha512-yw9OXucmeggmFqBTMgza0uZwhNjPxS7MaT7lSCUIRKckl1GejdV+qMhL3XFxPFeYzXwzFpdPG11zWf+qJlalqw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/api" "9.14.2" - "@polkadot/api-augment" "9.14.2" - "@polkadot/api-base" "9.14.2" - "@polkadot/rpc-core" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/util" "^10.4.2" - "@polkadot/util-crypto" "^10.4.2" - rxjs "^7.8.0" - -"@polkadot/api@9.14.2", "@polkadot/api@^9.6.1": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-9.14.2.tgz#d5cee02236654c6063d7c4b70c78c290db5aba8d" - integrity sha512-R3eYFj2JgY1zRb+OCYQxNlJXCs2FA+AU4uIEiVcXnVLmR3M55tkRNEwYAZmiFxx0pQmegGgPMc33q7TWGdw24A== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/api-augment" "9.14.2" - "@polkadot/api-base" "9.14.2" - "@polkadot/api-derive" "9.14.2" - "@polkadot/keyring" "^10.4.2" - "@polkadot/rpc-augment" "9.14.2" - "@polkadot/rpc-core" "9.14.2" - "@polkadot/rpc-provider" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-augment" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/types-create" "9.14.2" - "@polkadot/types-known" "9.14.2" - "@polkadot/util" "^10.4.2" - "@polkadot/util-crypto" "^10.4.2" - eventemitter3 "^5.0.0" - rxjs "^7.8.0" - -"@polkadot/keyring@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-10.4.2.tgz#793377fdb9076df0af771df11388faa6be03c70d" - integrity sha512-7iHhJuXaHrRTG6cJDbZE9G+c1ts1dujp0qbO4RfAPmT7YUvphHvAtCKueN9UKPz5+TYDL+rP/jDEaSKU8jl/qQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/util" "10.4.2" - "@polkadot/util-crypto" "10.4.2" - -"@polkadot/networks@10.4.2", "@polkadot/networks@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-10.4.2.tgz#d7878c6aad8173c800a21140bfe5459261724456" - integrity sha512-FAh/znrEvWBiA/LbcT5GXHsCFUl//y9KqxLghSr/CreAmAergiJNT0MVUezC7Y36nkATgmsr4ylFwIxhVtuuCw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/util" "10.4.2" - "@substrate/ss58-registry" "^1.38.0" - -"@polkadot/rpc-augment@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-9.14.2.tgz#eb70d5511463dab8d995faeb77d4edfe4952fe26" - integrity sha512-mOubRm3qbKZTbP9H01XRrfTk7k5it9WyzaWAg72DJBQBYdgPUUkGSgpPD/Srkk5/5GAQTWVWL1I2UIBKJ4TJjQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/rpc-core" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/util" "^10.4.2" - -"@polkadot/rpc-core@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-9.14.2.tgz#26d4f00ac7abbf880f8280e9b96235880d35794b" - integrity sha512-krA/mtQ5t9nUQEsEVC1sjkttLuzN6z6gyJxK2IlpMS3S5ncy/R6w4FOpy+Q0H18Dn83JBo0p7ZtY7Y6XkK48Kw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/rpc-augment" "9.14.2" - "@polkadot/rpc-provider" "9.14.2" - "@polkadot/types" "9.14.2" - "@polkadot/util" "^10.4.2" - rxjs "^7.8.0" - -"@polkadot/rpc-provider@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-9.14.2.tgz#0dea667f3a03bf530f202cba5cd360df19b32e30" - integrity sha512-YTSywjD5PF01V47Ru5tln2LlpUwJiSOdz6rlJXPpMaY53hUp7+xMU01FVAQ1bllSBNisSD1Msv/mYHq84Oai2g== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/keyring" "^10.4.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-support" "9.14.2" - "@polkadot/util" "^10.4.2" - "@polkadot/util-crypto" "^10.4.2" - "@polkadot/x-fetch" "^10.4.2" - "@polkadot/x-global" "^10.4.2" - "@polkadot/x-ws" "^10.4.2" - eventemitter3 "^5.0.0" - mock-socket "^9.2.1" - nock "^13.3.0" - optionalDependencies: - "@substrate/connect" "0.7.19" - -"@polkadot/types-augment@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-9.14.2.tgz#1a478e18e713b04038f3e171287ee5abe908f0aa" - integrity sha512-WO9d7RJufUeY3iFgt2Wz762kOu1tjEiGBR5TT4AHtpEchVHUeosVTrN9eycC+BhleqYu52CocKz6u3qCT/jKLg== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/types" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/util" "^10.4.2" - -"@polkadot/types-codec@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-9.14.2.tgz#d625c80495d7a68237b3d5c0a60ff10d206131fa" - integrity sha512-AJ4XF7W1no4PENLBRU955V6gDxJw0h++EN3YoDgThozZ0sj3OxyFupKgNBZcZb2V23H8JxQozzIad8k+nJbO1w== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/util" "^10.4.2" - "@polkadot/x-bigint" "^10.4.2" - -"@polkadot/types-create@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-9.14.2.tgz#aec515a2d3bc7e7b7802095cdd35ece48dc442bc" - integrity sha512-nSnKpBierlmGBQT8r6/SHf6uamBIzk4WmdMsAsR4uJKJF1PtbIqx2W5PY91xWSiMSNMzjkbCppHkwaDAMwLGaw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/types-codec" "9.14.2" - "@polkadot/util" "^10.4.2" - -"@polkadot/types-known@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-9.14.2.tgz#17fe5034a5b907bd006093a687f112b07edadf10" - integrity sha512-iM8WOCgguzJ3TLMqlm4K1gKQEwWm2zxEKT1HZZ1irs/lAbBk9MquDWDvebryiw3XsLB8xgrp3RTIBn2Q4FjB2A== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/networks" "^10.4.2" - "@polkadot/types" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/types-create" "9.14.2" - "@polkadot/util" "^10.4.2" - -"@polkadot/types-support@9.14.2": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-9.14.2.tgz#d25e8d4e5ec3deef914cb55fc8bc5448431ddd18" - integrity sha512-VWCOPgXDK3XtXT7wMLyIWeNDZxUbNcw/8Pn6n6vMogs7o/n4h6WGbGMeTIQhPWyn831/RmkVs5+2DUC+2LlOhw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/util" "^10.4.2" - -"@polkadot/types@9.14.2", "@polkadot/types@^9.6.1": - version "9.14.2" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-9.14.2.tgz#5105f41eb9e8ea29938188d21497cbf1753268b8" - integrity sha512-hGLddTiJbvowhhUZJ3k+olmmBc1KAjWIQxujIUIYASih8FQ3/YJDKxaofGOzh0VygOKW3jxQBN2VZPofyDP9KQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/keyring" "^10.4.2" - "@polkadot/types-augment" "9.14.2" - "@polkadot/types-codec" "9.14.2" - "@polkadot/types-create" "9.14.2" - "@polkadot/util" "^10.4.2" - "@polkadot/util-crypto" "^10.4.2" - rxjs "^7.8.0" - -"@polkadot/util-crypto@10.4.2", "@polkadot/util-crypto@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-10.4.2.tgz#871fb69c65768bd48c57bb5c1f76a85d979fb8b5" - integrity sha512-RxZvF7C4+EF3fzQv8hZOLrYCBq5+wA+2LWv98nECkroChY3C2ZZvyWDqn8+aonNULt4dCVTWDZM0QIY6y4LUAQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@noble/hashes" "1.2.0" - "@noble/secp256k1" "1.7.1" - "@polkadot/networks" "10.4.2" - "@polkadot/util" "10.4.2" - "@polkadot/wasm-crypto" "^6.4.1" - "@polkadot/x-bigint" "10.4.2" - "@polkadot/x-randomvalues" "10.4.2" - "@scure/base" "1.1.1" - ed2curve "^0.3.0" - tweetnacl "^1.0.3" +"@polkadot-api/json-rpc-provider-proxy@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz#bb5c943642cdf0ec7bc48c0a2647558b9fcd7bdb" + integrity sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg== + +"@polkadot-api/json-rpc-provider@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz#333645d40ccd9bccfd1f32503f17e4e63e76e297" + integrity sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA== -"@polkadot/util@10.4.2", "@polkadot/util@^10.1.11", "@polkadot/util@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-10.4.2.tgz#df41805cb27f46b2b4dad24c371fa2a68761baa1" - integrity sha512-0r5MGICYiaCdWnx+7Axlpvzisy/bi1wZGXgCSw5+ZTyPTOqvsYRqM2X879yxvMsGfibxzWqNzaiVjToz1jvUaA== +"@polkadot-api/metadata-builders@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz#a76b48febef9ea72be8273d889e2677101045a05" + integrity sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA== dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-bigint" "10.4.2" - "@polkadot/x-global" "10.4.2" - "@polkadot/x-textdecoder" "10.4.2" - "@polkadot/x-textencoder" "10.4.2" - "@types/bn.js" "^5.1.1" - bn.js "^5.2.1" + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/utils" "0.0.1" -"@polkadot/wasm-bridge@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-6.4.1.tgz#e97915dd67ba543ec3381299c2a5b9330686e27e" - integrity sha512-QZDvz6dsUlbYsaMV5biZgZWkYH9BC5AfhT0f0/knv8+LrbAoQdP3Asbvddw8vyU9sbpuCHXrd4bDLBwUCRfrBQ== +"@polkadot-api/observable-client@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz#472045ea06a2bc4bccdc2db5c063eadcbf6f5351" + integrity sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A== dependencies: - "@babel/runtime" "^7.20.6" - -"@polkadot/wasm-crypto-asmjs@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-6.4.1.tgz#3cc76bbda5ea4a7a860982c64f9565907b312253" - integrity sha512-UxZTwuBZlnODGIQdCsE2Sn/jU0O2xrNQ/TkhRFELfkZXEXTNu4lw6NpaKq7Iey4L+wKd8h4lT3VPVkMcPBLOvA== - dependencies: - "@babel/runtime" "^7.20.6" - -"@polkadot/wasm-crypto-init@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-6.4.1.tgz#4d9ab0030db52cf177bf707ef8e77aa4ca721668" - integrity sha512-1ALagSi/nfkyFaH6JDYfy/QbicVbSn99K8PV9rctDUfxc7P06R7CoqbjGQ4OMPX6w1WYVPU7B4jPHGLYBlVuMw== - dependencies: - "@babel/runtime" "^7.20.6" - "@polkadot/wasm-bridge" "6.4.1" - "@polkadot/wasm-crypto-asmjs" "6.4.1" - "@polkadot/wasm-crypto-wasm" "6.4.1" - -"@polkadot/wasm-crypto-wasm@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-6.4.1.tgz#97180f80583b18f6a13c1054fa5f7e8da40b1028" - integrity sha512-3VV9ZGzh0ZY3SmkkSw+0TRXxIpiO0nB8lFwlRgcwaCihwrvLfRnH9GI8WE12mKsHVjWTEVR3ogzILJxccAUjDA== - dependencies: - "@babel/runtime" "^7.20.6" - "@polkadot/wasm-util" "6.4.1" - -"@polkadot/wasm-crypto@^6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-6.4.1.tgz#79310e23ad1ca62362ba893db6a8567154c2536a" - integrity sha512-FH+dcDPdhSLJvwL0pMLtn/LIPd62QDPODZRCmDyw+pFjLOMaRBc7raomWUOqyRWJTnqVf/iscc2rLVLNMyt7ag== - dependencies: - "@babel/runtime" "^7.20.6" - "@polkadot/wasm-bridge" "6.4.1" - "@polkadot/wasm-crypto-asmjs" "6.4.1" - "@polkadot/wasm-crypto-init" "6.4.1" - "@polkadot/wasm-crypto-wasm" "6.4.1" - "@polkadot/wasm-util" "6.4.1" - -"@polkadot/wasm-util@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-6.4.1.tgz#74aecc85bec427a9225d9874685944ea3dc3ab76" - integrity sha512-Uwo+WpEsDmFExWC5kTNvsVhvqXMZEKf4gUHXFn4c6Xz4lmieRT5g+1bO1KJ21pl4msuIgdV3Bksfs/oiqMFqlw== - dependencies: - "@babel/runtime" "^7.20.6" - -"@polkadot/x-bigint@10.4.2", "@polkadot/x-bigint@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-10.4.2.tgz#7eb2ec732259df48b5a00f07879a1331e05606ec" - integrity sha512-awRiox+/XSReLzimAU94fPldowiwnnMUkQJe8AebYhNocAj6SJU00GNoj6j6tAho6yleOwrTJXZaWFBaQVJQNg== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - -"@polkadot/x-fetch@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-10.4.2.tgz#bc6ba70de71a252472fbe36180511ed920e05f05" - integrity sha512-Ubb64yaM4qwhogNP+4mZ3ibRghEg5UuCYRMNaCFoPgNAY8tQXuDKrHzeks3+frlmeH9YRd89o8wXLtWouwZIcw== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - "@types/node-fetch" "^2.6.2" - node-fetch "^3.3.0" - -"@polkadot/x-global@10.4.2", "@polkadot/x-global@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-10.4.2.tgz#5662366e3deda0b4c8f024b2d902fa838f9e60a4" - integrity sha512-g6GXHD/ykZvHap3M6wh19dO70Zm43l4jEhlxf5LtTo5/0/UporFCXr2YJYZqfbn9JbQwl1AU+NroYio+vtJdiA== - dependencies: - "@babel/runtime" "^7.20.13" - -"@polkadot/x-randomvalues@10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-10.4.2.tgz#895f1220d5a4522a83d8d5014e3c1e03b129893e" - integrity sha512-mf1Wbpe7pRZHO0V3V89isPLqZOy5XGX2bCqsfUWHgb1NvV1MMx5TjVjdaYyNlGTiOkAmJKlOHshcfPU2sYWpNg== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - -"@polkadot/x-textdecoder@10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-10.4.2.tgz#93202f3e5ad0e7f75a3fa02d2b8a3343091b341b" - integrity sha512-d3ADduOKUTU+cliz839+KCFmi23pxTlabH7qh7Vs1GZQvXOELWdqFOqakdiAjtMn68n1KVF4O14Y+OUm7gp/zA== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - -"@polkadot/x-textencoder@10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-10.4.2.tgz#cd2e6c8a66b0b400a73f0164e99c510fb5c83501" - integrity sha512-mxcQuA1exnyv74Kasl5vxBq01QwckG088lYjc3KwmND6+pPrW2OWagbxFX5VFoDLDAE+UJtnUHsjdWyOTDhpQA== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - -"@polkadot/x-ws@^10.4.2": - version "10.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-10.4.2.tgz#4e9d88f37717570ccf942c6f4f63b06260f45025" - integrity sha512-3gHSTXAWQu1EMcMVTF5QDKHhEHzKxhAArweEyDXE7VsgKUP/ixxw4hVZBrkX122iI5l5mjSiooRSnp/Zl3xqDQ== - dependencies: - "@babel/runtime" "^7.20.13" - "@polkadot/x-global" "10.4.2" - "@types/websocket" "^1.0.5" - websocket "^1.0.34" + "@polkadot-api/metadata-builders" "0.0.1" + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/substrate-client" "0.0.1" + "@polkadot-api/utils" "0.0.1" -"@scure/base@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== +"@polkadot-api/substrate-bindings@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz#c4b7f4d6c3672d2c15cbc6c02964f014b73cbb0b" + integrity sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg== + dependencies: + "@noble/hashes" "^1.3.1" + "@polkadot-api/utils" "0.0.1" + "@scure/base" "^1.1.1" + scale-ts "^1.6.0" + +"@polkadot-api/substrate-client@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz#0e8010a0abe2fb47d6fa7ab94e45e1d0de083314" + integrity sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg== + +"@polkadot-api/utils@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.0.1.tgz#908b22becac705149d7cc946532143d0fb003bfc" + integrity sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw== + +"@polkadot/api-augment@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-11.0.3.tgz#bb2a7304ec5e4e7deb19f14c5002e82de7d555a6" + integrity sha512-O1QEUXiHpPJqVe398EQ+tywZLj1vDNZALzh2TKsyFSqEjT4N/EschCck9aFXpB0Bp0K2lm7+fKJf6eWPShNfFQ== + dependencies: + "@polkadot/api-base" "11.0.3" + "@polkadot/rpc-augment" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/types-augment" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/api-base@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-11.0.3.tgz#d1232af45df8da459e263a13a43d7a0b161d268a" + integrity sha512-e/KSsDcFIG17SPw+buBXAq5NnBOMMOWljTljazDF7Nq3Sz6P+SFqOSb3kdICtp1fYAxg5my/uTs2OOARxJRXKA== + dependencies: + "@polkadot/rpc-core" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/util" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api-derive@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-11.0.3.tgz#6e03fc7affeaf423216f50e05dab882c4f7e56d9" + integrity sha512-WJriPWX0WnDhHAETAYkgCxIhkKmnRPqSsBKUHZxq+GgMJByOA4wgo3gzq5aQLXgkcCLV3wM4a6hALodYz0urSw== + dependencies: + "@polkadot/api" "11.0.3" + "@polkadot/api-augment" "11.0.3" + "@polkadot/api-base" "11.0.3" + "@polkadot/rpc-core" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api@11.0.3", "@polkadot/api@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-11.0.3.tgz#6a7b316e0e219ad1c1b9530b1e5f643150b79b63" + integrity sha512-VYuS42s5MiUOLo/PP1deYsddelGP4/mb1KFonXyWk69XowsfihGbVjsjh+DA4jPXvoNJqdGnDdu3SeppTY9MZQ== + dependencies: + "@polkadot/api-augment" "11.0.3" + "@polkadot/api-base" "11.0.3" + "@polkadot/api-derive" "11.0.3" + "@polkadot/keyring" "^12.6.2" + "@polkadot/rpc-augment" "11.0.3" + "@polkadot/rpc-core" "11.0.3" + "@polkadot/rpc-provider" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/types-augment" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/types-create" "11.0.3" + "@polkadot/types-known" "11.0.3" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + eventemitter3 "^5.0.1" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/keyring@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.6.2.tgz#6067e6294fee23728b008ac116e7e9db05cecb9b" + integrity sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw== + dependencies: + "@polkadot/util" "12.6.2" + "@polkadot/util-crypto" "12.6.2" + tslib "^2.6.2" + +"@polkadot/networks@12.6.2", "@polkadot/networks@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.6.2.tgz#791779fee1d86cc5b6cd371858eea9b7c3f8720d" + integrity sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w== + dependencies: + "@polkadot/util" "12.6.2" + "@substrate/ss58-registry" "^1.44.0" + tslib "^2.6.2" + +"@polkadot/rpc-augment@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-11.0.3.tgz#a94eca4511406879ebeb438c82618f7d484294ba" + integrity sha512-Yuiv6EPwdRXMZmleKE0u/qVc20Ut+9O5mLoxKM6jCplg+aWvc51pbS2XOpXEpvWRIWWzCSpqzVc6WcMMYU6MTA== + dependencies: + "@polkadot/rpc-core" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/rpc-core@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-11.0.3.tgz#e991459629d38501891c25fa57bccf2ab2b3da67" + integrity sha512-DhMUoAVxRw1Cv49lkVQ889eLbrfXZbNCFBTEMyauNUQFZUyIDE8w/FLPiOsyhiXwUww5wTMWte9UnWxvBlppvQ== + dependencies: + "@polkadot/rpc-augment" "11.0.3" + "@polkadot/rpc-provider" "11.0.3" + "@polkadot/types" "11.0.3" + "@polkadot/util" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/rpc-provider@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-11.0.3.tgz#d6366afd6add7a79e6c4620e9969ed27b28ee508" + integrity sha512-xgfHOF4y9jAD9aDDX/i9WUCRw8N6duRs0P/ysw2AafGKUGSBA/pqP/WXN61dQqq+DzZYfzL/FsMyTcUirsEkJA== + dependencies: + "@polkadot/keyring" "^12.6.2" + "@polkadot/types" "11.0.3" + "@polkadot/types-support" "11.0.3" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + "@polkadot/x-fetch" "^12.6.2" + "@polkadot/x-global" "^12.6.2" + "@polkadot/x-ws" "^12.6.2" + eventemitter3 "^5.0.1" + mock-socket "^9.3.1" + nock "^13.5.0" + tslib "^2.6.2" + optionalDependencies: + "@substrate/connect" "0.8.10" + +"@polkadot/types-augment@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-11.0.3.tgz#7ddc14c17fe41f921b05d7be10db364a40f41ee8" + integrity sha512-/LXP/LDDr59ZigfeYXtYWrIr4qttYwlkEV7EMUnse5zYWAGH8mkras0Um7gX7kd/GndJAHvXAbbSdrduhg/uNA== + dependencies: + "@polkadot/types" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-codec@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-11.0.3.tgz#b399ddf0e14461fd74cdfc6675ab3b28b4834929" + integrity sha512-WSYmacSfUnnspKpLbagng8zo84eXLOztCYSppmqLoCrwtQE0zg5P/jF18qIeozvmPh+I/HMordXKt34JPgI/6w== + dependencies: + "@polkadot/util" "^12.6.2" + "@polkadot/x-bigint" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-create@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-11.0.3.tgz#70e9b6a692b721cb848be9e0ad5033e51c6ea811" + integrity sha512-/uK9BCaivd5kcqZZCeIOlN0pSFyIELk9VGVOM3HsitE6IQrOlYPrYe0RqrQhoU/kjNC5BHaWviYV3Hu3TlOJuw== + dependencies: + "@polkadot/types-codec" "11.0.3" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-known@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-11.0.3.tgz#2d5b2884ef1a7a721b91967b1633da874f997b3e" + integrity sha512-nuv/a32QYtZYCD7IMj+WKgcblgMJse2t3RuWO+ZtT/uscOmR7TjctkS2ayzSJDQ5wWCPGet1eIwYpJYfGFOPkw== + dependencies: + "@polkadot/networks" "^12.6.2" + "@polkadot/types" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/types-create" "11.0.3" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-support@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-11.0.3.tgz#c7b916870c8c79225453747155506ca0b984434a" + integrity sha512-U9EG48zbbx5Q8B3GgHav8+/8hNYDOTijvSnEhUWsshh8U0Z7sNCmjfD4y0zfEzxoJyP7PTad62lJXfhQtehEsQ== + dependencies: + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types@11.0.3", "@polkadot/types@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-11.0.3.tgz#6c3dbe2a7eb919758ecdcd238e97a1717a96fc52" + integrity sha512-7AGUaObaGKZntOzHX4IRKj+K1AjZpYBgrivnY73tqGCp7biByn8Ht6a74xFngGfay1yRrx7eS3NOeIpp4nKhrw== + dependencies: + "@polkadot/keyring" "^12.6.2" + "@polkadot/types-augment" "11.0.3" + "@polkadot/types-codec" "11.0.3" + "@polkadot/types-create" "11.0.3" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/util-crypto@12.6.2", "@polkadot/util-crypto@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz#d2d51010e8e8ca88951b7d864add797dad18bbfc" + integrity sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg== + dependencies: + "@noble/curves" "^1.3.0" + "@noble/hashes" "^1.3.3" + "@polkadot/networks" "12.6.2" + "@polkadot/util" "12.6.2" + "@polkadot/wasm-crypto" "^7.3.2" + "@polkadot/wasm-util" "^7.3.2" + "@polkadot/x-bigint" "12.6.2" + "@polkadot/x-randomvalues" "12.6.2" + "@scure/base" "^1.1.5" + tslib "^2.6.2" + +"@polkadot/util@12.6.2", "@polkadot/util@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.6.2.tgz#9396eff491221e1f0fd28feac55fc16ecd61a8dc" + integrity sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw== + dependencies: + "@polkadot/x-bigint" "12.6.2" + "@polkadot/x-global" "12.6.2" + "@polkadot/x-textdecoder" "12.6.2" + "@polkadot/x-textencoder" "12.6.2" + "@types/bn.js" "^5.1.5" + bn.js "^5.2.1" + tslib "^2.6.2" + +"@polkadot/wasm-bridge@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.3.2.tgz#e1b01906b19e06cbca3d94f10f5666f2ae0baadc" + integrity sha512-AJEXChcf/nKXd5Q/YLEV5dXQMle3UNT7jcXYmIffZAo/KI394a+/24PaISyQjoNC0fkzS1Q8T5pnGGHmXiVz2g== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-asmjs@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.2.tgz#c6d41bc4b48b5359d57a24ca3066d239f2d70a34" + integrity sha512-QP5eiUqUFur/2UoF2KKKYJcesc71fXhQFLT3D4ZjG28Mfk2ZPI0QNRUfpcxVQmIUpV5USHg4geCBNuCYsMm20Q== + dependencies: + tslib "^2.6.2" + +"@polkadot/wasm-crypto-init@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.2.tgz#7e1fe79ba978fb0a4a0f74a92d976299d38bc4b8" + integrity sha512-FPq73zGmvZtnuJaFV44brze3Lkrki3b4PebxCy9Fplw8nTmisKo9Xxtfew08r0njyYh+uiJRAxPCXadkC9sc8g== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-wasm@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.2.tgz#44e08ed5cf6499ce4a3aa7247071a5d01f6a74f4" + integrity sha512-15wd0EMv9IXs5Abp1ZKpKKAVyZPhATIAHfKsyoWCEFDLSOA0/K0QGOxzrAlsrdUkiKZOq7uzSIgIDgW8okx2Mw== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.3.2.tgz#61bbcd9e591500705c8c591e6aff7654bdc8afc9" + integrity sha512-+neIDLSJ6jjVXsjyZ5oLSv16oIpwp+PxFqTUaZdZDoA2EyFRQB8pP7+qLsMNk+WJuhuJ4qXil/7XiOnZYZ+wxw== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-init" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-util@7.3.2", "@polkadot/wasm-util@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.3.2.tgz#4fe6370d2b029679b41a5c02cd7ebf42f9b28de1" + integrity sha512-bmD+Dxo1lTZyZNxbyPE380wd82QsX+43mgCm40boyKrRppXEyQmWT98v/Poc7chLuskYb6X8IQ6lvvK2bGR4Tg== + dependencies: + tslib "^2.6.2" + +"@polkadot/x-bigint@12.6.2", "@polkadot/x-bigint@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz#59b7a615f205ae65e1ac67194aefde94d3344580" + integrity sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-fetch@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz#b1bca028db90263bafbad2636c18d838d842d439" + integrity sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw== + dependencies: + "@polkadot/x-global" "12.6.2" + node-fetch "^3.3.2" + tslib "^2.6.2" + +"@polkadot/x-global@12.6.2", "@polkadot/x-global@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.6.2.tgz#31d4de1c3d4c44e4be3219555a6d91091decc4ec" + integrity sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g== + dependencies: + tslib "^2.6.2" + +"@polkadot/x-randomvalues@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz#13fe3619368b8bf5cb73781554859b5ff9d900a2" + integrity sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-textdecoder@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz#b86da0f8e8178f1ca31a7158257e92aea90b10e4" + integrity sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-textencoder@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz#81d23bd904a2c36137a395c865c5fefa21abfb44" + integrity sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-ws@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.6.2.tgz#b99094d8e53a03be1de903d13ba59adaaabc767a" + integrity sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + ws "^8.15.1" + +"@scure/base@^1.1.1", "@scure/base@^1.1.5": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" + integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== "@scure/base@~1.1.0", "@scure/base@~1.1.4": version "1.1.5" @@ -1410,32 +1457,43 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@substrate/connect-extension-protocol@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz#fa5738039586c648013caa6a0c95c43265dbe77d" - integrity sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg== +"@substrate/connect-extension-protocol@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz#badaa6e6b5f7c7d56987d778f4944ddb83cd9ea7" + integrity sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg== -"@substrate/connect@0.7.19": - version "0.7.19" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.19.tgz#7c879cb275bc7ac2fe9edbf797572d4ff8d8b86a" - integrity sha512-+DDRadc466gCmDU71sHrYOt1HcI2Cbhm7zdCFjZfFVHXhC/E8tOdrVSglAH2HDEHR0x2SiHRxtxOGC7ak2Zjog== - dependencies: - "@substrate/connect-extension-protocol" "^1.0.1" - "@substrate/smoldot-light" "0.7.9" - eventemitter3 "^4.0.7" +"@substrate/connect-known-chains@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.1.4.tgz#1b0b4b19c7bd0c1b3ed6f567a22e9fb9c42b8e64" + integrity sha512-iT+BdKqvKl/uBLd8BAJysFM1BaMZXRkaXBP2B7V7ob/EyNs5h0EMhTVbO6MJxV/IEOg5OKsyl6FUqQK7pKnqyw== -"@substrate/smoldot-light@0.7.9": - version "0.7.9" - resolved "https://registry.yarnpkg.com/@substrate/smoldot-light/-/smoldot-light-0.7.9.tgz#68449873a25558e547e9468289686ee228a9930f" - integrity sha512-HP8iP7sFYlpSgjjbo0lqHyU+gu9lL2hbDNce6dWk5/10mFFF9jKIFGfui4zCecUY808o/Go9pan/31kMJoLbug== +"@substrate/connect@0.8.10": + version "0.8.10" + resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.10.tgz#810b6589f848828aa840c731a1f36b84fe0e5956" + integrity sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w== dependencies: - pako "^2.0.4" - ws "^8.8.1" + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + "@substrate/light-client-extension-helpers" "^0.0.6" + smoldot "2.0.22" -"@substrate/ss58-registry@^1.38.0": - version "1.46.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.46.0.tgz#bfe3e6a30d39929f57ecc178acde4e74a773e2b6" - integrity sha512-rBvWnlrBeFTd5LVG7oX3rOHzR16yqyffOFHKmUiVcblpXI3D89CXOvAljW9tWlA1H/2/FegaZnHPhdObPsvi+w== +"@substrate/light-client-extension-helpers@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.6.tgz#bec1c7997241226db50b44ad85a992b4348d21c3" + integrity sha512-girltEuxQ1BvkJWmc8JJlk4ZxnlGXc/wkLcNguhY+UoDEMBK0LsdtfzQKIfrIehi4QdeSBlFEFBoI4RqPmsZzA== + dependencies: + "@polkadot-api/json-rpc-provider" "0.0.1" + "@polkadot-api/json-rpc-provider-proxy" "0.0.1" + "@polkadot-api/observable-client" "0.1.0" + "@polkadot-api/substrate-client" "0.0.1" + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + rxjs "^7.8.1" + +"@substrate/ss58-registry@^1.44.0": + version "1.47.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.47.0.tgz#99b11fd3c16657f5eae483b3df7c545ca756d1fc" + integrity sha512-6kuIJedRcisUJS2pgksEH2jZf3hfSIVzqtFzs/AyjTW3ETbMg5q1Bb7VWa0WYaT6dTrEXp/6UoXM5B9pSIUmcw== "@szmarczak/http-timer@^4.0.5": version "4.0.6" @@ -1515,7 +1573,7 @@ dependencies: "@types/node" "*" -"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": +"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1", "@types/bn.js@^5.1.5": version "5.1.5" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== @@ -1605,14 +1663,6 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== -"@types/node-fetch@^2.6.2": - version "2.6.11" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" - integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== - dependencies: - "@types/node" "*" - form-data "^4.0.0" - "@types/node@*": version "20.11.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.7.tgz#cb49aedd758c978c30806d0c38b520ed2a3df6e0" @@ -1684,13 +1734,6 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== -"@types/websocket@^1.0.5": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.10.tgz#804b1a02780da522f5742bc184a6d16a2eb78c7c" - integrity sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww== - dependencies: - "@types/node" "*" - "@typescript-eslint/eslint-plugin@^5.44.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" @@ -2938,13 +2981,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ed2curve@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/ed2curve/-/ed2curve-0.3.0.tgz#322b575152a45305429d546b071823a93129a05d" - integrity sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ== - dependencies: - tweetnacl "1.x.x" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -3381,12 +3417,7 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== -eventemitter3@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -eventemitter3@^5.0.0: +eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== @@ -4895,7 +4926,7 @@ mock-fs@^4.1.0: resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== -mock-socket@^9.2.1: +mock-socket@^9.3.1: version "9.3.1" resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.3.1.tgz#24fb00c2f573c84812aa4a24181bb025de80cc8e" integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw== @@ -5005,10 +5036,10 @@ next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -nock@^13.3.0: - version "13.5.0" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.0.tgz#82cd33b0dba6095d3f5a28d0ff2edac970fa05ec" - integrity sha512-9hc1eCS2HtOz+sE9W7JQw/tXJktg0zoPSu48s/pYe73e25JW9ywiowbqnUSd7iZPeVawLcVpPZeZS312fwSY+g== +nock@^13.5.0: + version "13.5.4" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" + integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -5038,7 +5069,7 @@ node-fetch@^2.6.12: dependencies: whatwg-url "^5.0.0" -node-fetch@^3.3.0: +node-fetch@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== @@ -5235,11 +5266,6 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== -pako@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" - integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5519,11 +5545,6 @@ reduce-flatten@^2.0.0: resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== -regenerator-runtime@^0.14.0: - version "0.14.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" - integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== - req-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" @@ -5709,7 +5730,7 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@^7.8.0: +rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -5751,6 +5772,11 @@ sc-istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" +scale-ts@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/scale-ts/-/scale-ts-1.6.0.tgz#e9641093c5a9e50f964ddb1607139034e3e932e9" + integrity sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q== + scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" @@ -5936,6 +5962,13 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +smoldot@2.0.22: + version "2.0.22" + resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.22.tgz#1e924d2011a31c57416e79a2b97a460f462a31c7" + integrity sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g== + dependencies: + ws "^8.8.1" + solc@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" @@ -6315,7 +6348,7 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0: +tslib@^2.1.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -6344,16 +6377,16 @@ tweetnacl-util@^0.15.1: resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== -tweetnacl@1.x.x, tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -6923,6 +6956,11 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^8.15.1: + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + ws@^8.8.1: version "8.16.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" diff --git a/pallet/assets-ext/rpc/README.md b/pallet/assets-ext/rpc/README.md index e1953bb1b..b1c0ce26f 100644 --- a/pallet/assets-ext/rpc/README.md +++ b/pallet/assets-ext/rpc/README.md @@ -38,7 +38,7 @@ Returns the free balance of asset and user. curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method":"assetsExt_freeBalance", "params":[2, "0x25451A4de12dcCc2D166922fA938E900fCc4ED24"]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** @@ -57,7 +57,7 @@ For ROOT curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method":"assetsExt_freeBalance", "params":[1, "0xE04CC55ebEE1cBCE552f250e85c57B70B2E2625b"]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** diff --git a/pallet/dex/rpc/README.md b/pallet/dex/rpc/README.md index ca41146ac..284f51e13 100644 --- a/pallet/dex/rpc/README.md +++ b/pallet/dex/rpc/README.md @@ -46,7 +46,7 @@ Returns the amount of output token that can be obtained by swapping an amount of curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method":"dex_quote", "params":[ 1, 5, 10 ]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** @@ -95,7 +95,7 @@ Returns the amount of output tokens that you would receive if you sent an amount curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method": "dex_getAmountsOut", "params": [1000000000000, [2, 1124]]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (error)_** @@ -152,7 +152,7 @@ Returns the amount of input token that you would need to send to the DEX in orde curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method": "dex_getAmountsIn", "params": [1000000000000, [2, 1124]]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (error)_** @@ -207,7 +207,7 @@ Returns the LP token ID from the given trading pair. curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method": "dex_getLPTokenID", "params": [2, 1124]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** @@ -254,7 +254,7 @@ Returns the liquidity balances of the given trading pair. curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method": "dex_getLiquidity", "params": [2, 1124]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** @@ -301,7 +301,7 @@ Returns the status of the given trading pair. curl -X POST \ -H "Content-Type: application/json" \ -d '{"id":1, "jsonrpc":"2.0", "method": "dex_getTradingPairStatus", "params": [2, 1124]}' \ - http://localhost:9933 + http://127.0.0.1:9944 ``` **_Response (successful)_** diff --git a/pallet/dex/src/types.rs b/pallet/dex/src/types.rs index 1edc334eb..9aedbd00a 100644 --- a/pallet/dex/src/types.rs +++ b/pallet/dex/src/types.rs @@ -44,7 +44,8 @@ impl TradingPair { /// Returns the pool address for this trading pair /// Spec: - /// `0xdddddddd` + <8-byte-asset_a-padded> + `00000000` + `dddddddd` + <8-byte-asset_b-padded> + /// `0xdddddddd` + <4-byte-asset_a-padded> + <4-byte-asset_b-padded> + `0000000000000000` (8 + /// bytes) pub fn pool_address>(&self) -> AccountId { let asset_a_bytes = self.0.to_be_bytes(); let asset_b_bytes = self.1.to_be_bytes(); diff --git a/pallet/ethy/src/ethereum_http_cli.rs b/pallet/ethy/src/ethereum_http_cli.rs index 654bb7f12..3153dec95 100644 --- a/pallet/ethy/src/ethereum_http_cli.rs +++ b/pallet/ethy/src/ethereum_http_cli.rs @@ -107,7 +107,7 @@ impl EthereumRpcClient { fn query_eth_client(request_body: R) -> Result, BridgeRpcError> { // Load eth http URI from offchain storage // this should have been configured on start up by passing e.g. `--eth-http` - // e.g. `--eth-http=http://localhost:8545` + // e.g. `--eth-http=http://127.0.0.1:8545` let eth_http_uri = if let Some(value) = sp_io::offchain::local_storage_get(StorageKind::PERSISTENT, Ð_HTTP_URI) { From 7265a87584b4b47ad267f6162f7fc063d2c4494b Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 28 May 2024 00:22:29 +1200 Subject: [PATCH 073/112] yarn format --- e2e/test/XRPL.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/test/XRPL.test.ts b/e2e/test/XRPL.test.ts index 9c4ea8892..8993a15ba 100644 --- a/e2e/test/XRPL.test.ts +++ b/e2e/test/XRPL.test.ts @@ -823,7 +823,9 @@ describe("XRPL pallet", () => { expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Transferred"); expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); - expect(events[index].event.data[1].toString().toLowerCase()).to.equal(poolAddress(paymentToken, GAS_TOKEN_ID).toLocaleLowerCase()); + expect(events[index].event.data[1].toString().toLowerCase()).to.equal( + poolAddress(paymentToken, GAS_TOKEN_ID).toLocaleLowerCase(), + ); expect(events[index].event.data[2].toString()).to.equal(futurepassAddress); // assets Issued [2148,"0x6D6F646c7478666565706F740000000000000000",181] From de0860e119a4dfe1275d46ded72493a53a41a268 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 28 May 2024 10:01:50 +1200 Subject: [PATCH 074/112] bump rust version in docker files and workflows --- .github/workflows/generate-docs.yml | 2 +- .github/workflows/try-runtime.yml | 2 +- Dockerfile | 2 +- dockerimages/{rust-1.65.0.Dockerfile => rust-1.71.0.Dockerfile} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename dockerimages/{rust-1.65.0.Dockerfile => rust-1.71.0.Dockerfile} (84%) diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index f1a2613d6..7cb3a6843 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -25,7 +25,7 @@ jobs: ref: ${{ github.ref_name }} fetch-depth: 0 - - uses: dtolnay/rust-toolchain@1.69 + - uses: dtolnay/rust-toolchain@1.71 with: toolchain: nightly targets: wasm32-unknown-unknown diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 1c3a66841..438f2163b 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -20,7 +20,7 @@ jobs: run: mkdir -p output - name: Build image - run: podman build -t tchain -f ./dockerimages/rust-1.65.0.Dockerfile . + run: podman build -t tchain -f ./dockerimages/rust-1.71.0.Dockerfile . - name: Run try-runtime run: podman run --rm -v ./output:/output -t tchain /bin/bash ./ci-scripts/try-runtime.sh diff --git a/Dockerfile b/Dockerfile index c5bf65b8d..afece006d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1 - Build node -FROM docker.io/library/rust:1.69.0-bookworm AS builder +FROM docker.io/library/rust:1.71.0-bookworm AS builder # Copy local files to workdir ADD . ./workdir diff --git a/dockerimages/rust-1.65.0.Dockerfile b/dockerimages/rust-1.71.0.Dockerfile similarity index 84% rename from dockerimages/rust-1.65.0.Dockerfile rename to dockerimages/rust-1.71.0.Dockerfile index 9400074ba..9d97cfaad 100644 --- a/dockerimages/rust-1.65.0.Dockerfile +++ b/dockerimages/rust-1.71.0.Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/rust:1.65.0-buster as builder +FROM docker.io/library/rust:1.71.0-bookworm as builder ADD . ./workdir WORKDIR "/workdir" From 0530058069901494836316cd97b891f174403312 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 28 May 2024 12:06:12 +1200 Subject: [PATCH 075/112] disable security checks --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index afece006d..ed28538a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ADD . ./workdir WORKDIR "/workdir" # This installs all dependencies that we need. -RUN apt update -y && \ +RUN apt update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o Acquire::AllowUnauthenticated=true -y && \ apt install build-essential git clang curl libssl-dev llvm libudev-dev make cmake protobuf-compiler pkg-config -y # Install the right toolchain and build the node From 33331878e000c55d3fda32f774972fe4051272e6 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 28 May 2024 12:21:44 +1200 Subject: [PATCH 076/112] Revert "disable security checks" This reverts commit 0530058069901494836316cd97b891f174403312. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed28538a4..afece006d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ADD . ./workdir WORKDIR "/workdir" # This installs all dependencies that we need. -RUN apt update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o Acquire::AllowUnauthenticated=true -y && \ +RUN apt update -y && \ apt install build-essential git clang curl libssl-dev llvm libudev-dev make cmake protobuf-compiler pkg-config -y # Install the right toolchain and build the node From 7832bff555e664c9e53e65d97eb5a2c623fe9333 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Wed, 29 May 2024 18:24:10 +1200 Subject: [PATCH 077/112] removed dead code, cargo.toml client improvements --- Cargo.lock | 5 ++--- client/Cargo.toml | 2 +- client/src/service.rs | 9 --------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4e360924d..f970660a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4861,11 +4861,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", diff --git a/client/Cargo.toml b/client/Cargo.toml index 457ab49f0..308d54742 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -79,7 +79,7 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrat # These dependencies are used for runtime benchmarking frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", features = ["default", "rocksdb"] } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Local Dependencies ethy-gadget = { path = "../ethy-gadget" } diff --git a/client/src/service.rs b/client/src/service.rs index 66e7562fa..38bf98a34 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -27,7 +27,6 @@ use sc_client_api::{ use sc_consensus_babe::{self, BabeWorkerHandle, SlotProportion}; use sc_consensus_grandpa::SharedVoterState; pub use sc_executor::NativeElseWasmExecutor; -use sc_keystore::LocalKeystore; use sc_network_sync::SyncingService; use sc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncParams}; use sc_telemetry::{Telemetry, TelemetryWorker}; @@ -252,14 +251,6 @@ pub fn new_partial( }) } -#[allow(dead_code)] -fn remote_keystore(_url: &String) -> Result, &'static str> { - // FIXME: here would the concrete keystore be built, - // must return a concrete type (NOT `LocalKeystore`) that - // implements `Keystore` - Err("Remote Keystore not supported.") -} - /// Builds a new service for a full client. pub fn new_full(config: Configuration, cli: &Cli) -> Result { let sc_service::PartialComponents { From d0a7017457032a321d74d5766e1aa51f135aeb2d Mon Sep 17 00:00:00 2001 From: zees-dev Date: Wed, 29 May 2024 18:24:26 +1200 Subject: [PATCH 078/112] upd fork state dockerfile --- dockerimages/fork-state.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerimages/fork-state.Dockerfile b/dockerimages/fork-state.Dockerfile index 3b006cffe..a8c0aa9ed 100644 --- a/dockerimages/fork-state.Dockerfile +++ b/dockerimages/fork-state.Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 docker.io/library/rust:1.67.0-bullseye as builder +FROM --platform=linux/amd64 docker.io/library/rust:1.71.0-bullseye as builder RUN apt update -y && apt install -y \ build-essential \ From 7a273eef7c1248e637233f80aabb5cda3c97ee25 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Wed, 29 May 2024 18:27:20 +1200 Subject: [PATCH 079/112] added poolAddress function comment --- e2e/common/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/common/index.ts b/e2e/common/index.ts index 3d4ed98aa..3fd027a71 100644 --- a/e2e/common/index.ts +++ b/e2e/common/index.ts @@ -482,6 +482,7 @@ export const futurepassAddress = (nextId: number | string): string => { return web3.utils.toChecksumAddress(`0xFFFFFFFF${fpIdHex}`); }; +// Retrieve the dex liquidity pool address for a given pair of assets // `0xdddddddd` + <4-byte-asset_a-padded> + <4-byte-asset_b-padded> + `0000000000000000` (8 bytes) export const poolAddress = (assetA: number | string, assetB: number | string): string => { const assetAHex = (+assetA).toString(16).padStart(8, "0"); From a9010d428c70416cf7630631170b2a7f105f61a1 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:07:55 +1200 Subject: [PATCH 080/112] Review suggestions --- client/src/chain_spec.rs | 2 +- client/src/rpc.rs | 1 - client/src/service.rs | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/chain_spec.rs b/client/src/chain_spec.rs index e3c0d58e6..9fb960e1b 100644 --- a/client/src/chain_spec.rs +++ b/client/src/chain_spec.rs @@ -223,7 +223,7 @@ fn testnet_genesis( key: Some(root_key), }, ethereum: seed_runtime::EthereumConfig { ..Default::default() }, - evm: seed_runtime::EVMConfig { accounts: Default::default(), ..Default::default() }, + evm: seed_runtime::EVMConfig { ..Default::default() }, xrpl_bridge: XRPLBridgeConfig { xrp_relayers }, } } diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 070827adb..3a2d7fe87 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -234,7 +234,6 @@ where eth_forced_parent_hashes, } = deps; - // let BabeDeps { keystore, babe_config, shared_epoch_changes } = babe; let BabeDeps { babe_config, babe_worker_handle, keystore } = babe; let client_clone = client.clone(); diff --git a/client/src/service.rs b/client/src/service.rs index 38bf98a34..682e0f99e 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -20,7 +20,7 @@ use fc_db::{Backend as FrontierBackend, DatabaseSource}; use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; use fc_rpc::{EthTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; -use futures::{future, StreamExt}; +use futures::{future, FutureExt, StreamExt}; use sc_client_api::{ AuxStore, Backend, BlockBackend, BlockchainEvents, StateBackend, StorageProvider, }; @@ -328,8 +328,6 @@ pub fn new_full(config: Configuration, cli: &Cli) -> Result Date: Tue, 4 Jun 2024 17:22:08 +1200 Subject: [PATCH 081/112] Set pallet_evm create, create2, call function validate = true --- evm-precompiles/futurepass/src/lib.rs | 4 ++-- runtime/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evm-precompiles/futurepass/src/lib.rs b/evm-precompiles/futurepass/src/lib.rs index 88d31ae6d..d0552faa3 100644 --- a/evm-precompiles/futurepass/src/lib.rs +++ b/evm-precompiles/futurepass/src/lib.rs @@ -448,7 +448,7 @@ where None, // handled by EVM alloc::vec![], false, - false, // TODO: check why this is not true + true, // TODO: adjust accordingly None, None, @@ -495,7 +495,7 @@ where None, // handled by EVM alloc::vec![], false, - false, // TODO: check why this is not true + true, // TODO: adjust accordingly None, None, diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 9b1605bef..561c18e4f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1796,7 +1796,7 @@ impl_runtime_apis! { nonce, access_list.unwrap_or_default(), false, - false, // TODO: check why this is not true + true, // TODO: adjust accordingly None, None, From 110ca59e5b70eb97de3fc798cacf882e899b79fe Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:40:36 +1200 Subject: [PATCH 082/112] Review suggestions --- pallet/assets-ext/src/lib.rs | 2 -- pallet/fee-proxy/src/impls.rs | 5 +++-- runtime/src/impls.rs | 8 +++---- runtime/src/lib.rs | 39 +++++++++++++++++------------------ 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/pallet/assets-ext/src/lib.rs b/pallet/assets-ext/src/lib.rs index d2983c922..07493751a 100644 --- a/pallet/assets-ext/src/lib.rs +++ b/pallet/assets-ext/src/lib.rs @@ -508,8 +508,6 @@ impl Mutate for Pallet { ) } } - - // TODO - implement callback functions? } impl TransferExt for Pallet { diff --git a/pallet/fee-proxy/src/impls.rs b/pallet/fee-proxy/src/impls.rs index 611ae5ca5..23d8599ab 100644 --- a/pallet/fee-proxy/src/impls.rs +++ b/pallet/fee-proxy/src/impls.rs @@ -134,10 +134,11 @@ where // the minimum deposit onto the total_fee. // This is due to the preservation rules of the withdraw call made within // <::OnChargeTransaction as OnChargeTransaction>::withdraw_fee - let account_balance = pallet_assets_ext::Pallet::::balance(native_asset, &who); + let account_balance = + pallet_assets_ext::Pallet::::balance(native_asset.clone(), &who); // Minium balance is hardcoded to 1 // pallet_assets_ext::Pallet::::minimum_balance(native_asset); - let minimum_balance = 1; + let minimum_balance = pallet_assets_ext::Pallet::::minimum_balance(native_asset); if account_balance < minimum_balance { total_fee = total_fee.saturating_add(minimum_balance); } diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index bfd0d2e6f..f2a55ee32 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -23,7 +23,7 @@ use frame_support::{ pallet_prelude::*, traits::{ fungible::Inspect, - tokens::{DepositConsequence, WithdrawConsequence}, + tokens::{DepositConsequence, Fortitude, Preservation, Provenance, WithdrawConsequence}, CallMetadata, Currency, ExistenceRequirement, FindAuthor, GetCallMetadata, Imbalance, InstanceFilter, OnUnbalanced, ReservableCurrency, SignedImbalance, WithdrawReasons, }, @@ -34,8 +34,8 @@ use sp_core::{H160, U256}; use sp_runtime::{ generic::{Era, SignedPayload}, traits::{ - AccountIdConversion, Extrinsic, LookupError, SaturatedConversion, StaticLookup, Verify, - Zero, + AccountIdConversion, Dispatchable, Extrinsic, LookupError, SaturatedConversion, Saturating, + StaticLookup, UniqueSaturatedInto, Verify, Zero, }, ConsensusEngineId, Permill, }; @@ -60,8 +60,6 @@ use crate::{ UncheckedExtrinsic, EVM, }; use doughnut_rs::Topping; -use frame_support::traits::tokens::{Fortitude, Preservation, Provenance}; -use sp_runtime::traits::{Dispatchable, Saturating, UniqueSaturatedInto}; /// Constant factor for scaling CPAY to its smallest indivisible unit const XRP_UNIT_VALUE: Balance = 10_u128.pow(12); diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 561c18e4f..a45de551b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -41,23 +41,21 @@ use seed_pallet_common::MaintenanceCheck; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160, H256, U256}; use sp_runtime::{ - create_runtime_str, generic, + create_runtime_str, generic, impl_opaque_keys, traits::{ - Block as BlockT, DispatchInfoOf, Dispatchable, IdentityLookup, PostDispatchInfoOf, Verify, + Block as BlockT, Bounded, DispatchInfoOf, Dispatchable, IdentityLookup, NumberFor, + PostDispatchInfoOf, Verify, }, transaction_validity::{ InvalidTransaction, TransactionPriority, TransactionSource, TransactionValidity, TransactionValidityError, }, - ApplyExtrinsicResult, FixedPointNumber, Percent, Perquintill, + ApplyExtrinsicResult, FixedPointNumber, Perbill, Percent, Permill, Perquintill, }; -pub use sp_runtime::{impl_opaque_keys, traits::NumberFor, Perbill, Permill}; use sp_std::prelude::*; -use frame_support::traits::tokens::{Fortitude, Preservation}; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; -pub use sp_runtime::traits::Bounded; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -67,10 +65,14 @@ use sp_version::RuntimeVersion; pub use frame_support::{ construct_runtime, dispatch::{DispatchClass, GetDispatchInfo}, - ensure, parameter_types, + ensure, + pallet_prelude::Hooks, + parameter_types, traits::{ fungibles::{metadata::Inspect as InspectMetadata, Inspect}, - ConstU128, ConstU32, Everything, Get, IsInVec, KeyOwnerProofSystem, Randomness, + tokens::{Fortitude, Preservation}, + AsEnsureOriginWithArg, ConstU128, ConstU32, Everything, Get, IsInVec, KeyOwnerProofSystem, + Randomness, }, weights::{ constants::{ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, @@ -78,7 +80,6 @@ pub use frame_support::{ }, PalletId, StorageValue, }; -use frame_support::{pallet_prelude::Hooks, traits::AsEnsureOriginWithArg}; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -102,8 +103,8 @@ pub mod keys { pub use seed_pallet_common::FeeConfig; pub use seed_primitives::{ ethy::{crypto::AuthorityId as EthBridgeId, ValidatorSet}, - AccountId, Address, AssetId, BabeId, Balance, BlockNumber, CollectionUuid, Hash, Index, - SerialNumber, Signature, TokenCount, TokenId, + AccountId, Address, AssetId, BabeId, Balance, BlakeTwo256Hash, BlockNumber, CollectionUuid, + Hash, Index, SerialNumber, Signature, TokenCount, TokenId, }; mod bag_thresholds; @@ -119,7 +120,9 @@ use constants::{ pub mod impls; use impls::{ - AddressMapping, EthereumEventRouter, EthereumFindAuthor, EvmCurrencyScaler, HandleTxValidation, + AddressMapping, DoughnutCallValidator, DoughnutFuturepassLookup, EthereumEventRouter, + EthereumFindAuthor, EvmCurrencyScaler, FutureverseEVMCurrencyAdapter, + FutureverseEnsureAddressSame, HandleTxValidation, OnNewAssetSubscription, SlashImbalanceHandler, StakingSessionTracker, }; use pallet_fee_proxy::{get_fee_preferences_data, FeePreferencesData, FeePreferencesRunner}; @@ -135,13 +138,7 @@ use staking::OnChainAccuracy; pub mod migrations; mod weights; -use crate::impls::{ - DoughnutCallValidator, DoughnutFuturepassLookup, FutureverseEVMCurrencyAdapter, - FutureverseEnsureAddressSame, OnNewAssetSubscription, -}; - use precompile_utils::constants::FEE_PROXY_ADDRESS; -use seed_primitives::BlakeTwo256Hash; #[cfg(test)] mod tests; @@ -388,6 +385,7 @@ parameter_types! { // https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271 pub const MetadataDepositBase: Balance = 1 * 68; pub const MetadataDepositPerByte: Balance = 1; + pub const RemoveItemsLimit: u32 = 100; } pub type AssetsForceOrigin = EnsureRoot; @@ -406,7 +404,7 @@ impl pallet_assets::Config for Runtime { type Extra = (); type WeightInfo = weights::pallet_assets::WeightInfo; type AssetAccountDeposit = AssetAccountDeposit; - type RemoveItemsLimit = ConstU32<100>; + type RemoveItemsLimit = RemoveItemsLimit; type AssetIdParameter = AssetId; type CreateOrigin = AsEnsureOriginWithArg>; type CallbackHandle = (); @@ -1135,13 +1133,14 @@ impl pallet_evm::Config for Runtime { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; + pub const ExtraDataLength: u32 = 30; } impl pallet_ethereum::Config for Runtime { type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; type PostLogContent = PostBlockAndTxnHashes; - type ExtraDataLength = ConstU32<30>; + type ExtraDataLength = ExtraDataLength; type HandleTxValidation = HandleTxValidation; } From fb8b511665a97b189771aa9b07086e14b0868a09 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:09:17 +1200 Subject: [PATCH 083/112] Index -> Nonce --- client/src/rpc.rs | 4 ++-- primitives/src/lib.rs | 2 +- runtime/src/impls.rs | 4 ++-- runtime/src/lib.rs | 8 ++++---- runtime/src/tests/mod.rs | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 3a2d7fe87..1d83b932c 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -59,7 +59,7 @@ use sp_transaction_storage_proof::IndexedBody; // Runtime use ethy_gadget::notification::EthyEventProofStream; use ethy_gadget_rpc::{EthyApiServer, EthyRpcHandler}; -use seed_primitives::{ethy::EthyApi, opaque::Block, AccountId, Balance, BlockNumber, Hash, Index}; +use seed_primitives::{ethy::EthyApi, opaque::Block, AccountId, Balance, BlockNumber, Hash, Nonce}; use seed_runtime::Runtime; /// Extra RPC deps for Ethy @@ -184,7 +184,7 @@ where C: Send + Sync + 'static, C: CallApiAt, C: IndexedBody, - C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BabeApi, C::Api: BlockBuilder, C::Api: EthyApi, diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 90a8a95ad..61527273f 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -52,7 +52,7 @@ pub mod types { pub type Balance = u128; /// Index of a transaction in the chain. - pub type Index = u32; + pub type Nonce = u32; /// A hash of some data used by the chain. pub type Hash = sp_core::H256; diff --git a/runtime/src/impls.rs b/runtime/src/impls.rs index f2a55ee32..73e523f8e 100644 --- a/runtime/src/impls.rs +++ b/runtime/src/impls.rs @@ -53,7 +53,7 @@ use seed_pallet_common::{ EthereumEventRouter as EthereumEventRouterT, EthereumEventSubscriber, EventRouterError, EventRouterResult, FinalSessionTracker, MaintenanceCheck, OnNewAssetSubscriber, }; -use seed_primitives::{AccountId, Balance, Index, Signature}; +use seed_primitives::{AccountId, Balance, Nonce, Signature}; use crate::{ BlockHashCount, Runtime, RuntimeCall, Session, SessionsPerEra, SlashPotId, Staking, System, @@ -320,7 +320,7 @@ where call: RuntimeCall, public: ::Signer, account: AccountId, - nonce: Index, + nonce: Nonce, ) -> Option<(RuntimeCall, ::SignaturePayload)> { let tip = 0; // take the biggest period possible. diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index a45de551b..b2b057595 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -104,7 +104,7 @@ pub use seed_pallet_common::FeeConfig; pub use seed_primitives::{ ethy::{crypto::AuthorityId as EthBridgeId, ValidatorSet}, AccountId, Address, AssetId, BabeId, Balance, BlakeTwo256Hash, BlockNumber, CollectionUuid, - Hash, Index, SerialNumber, Signature, TokenCount, TokenId, + Hash, Nonce, SerialNumber, Signature, TokenCount, TokenId, }; mod bag_thresholds; @@ -291,7 +291,7 @@ impl frame_system::Config for Runtime { /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; /// The nonce type for storing how many extrinsics an account has signed. - type Nonce = Index; + type Nonce = Nonce; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. @@ -1558,8 +1558,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } diff --git a/runtime/src/tests/mod.rs b/runtime/src/tests/mod.rs index 4f31229f7..3c227bf9c 100644 --- a/runtime/src/tests/mod.rs +++ b/runtime/src/tests/mod.rs @@ -42,7 +42,7 @@ use crate::{ UncheckedExtrinsic, H256, U256, }; use seed_client::chain_spec::{authority_keys_from_seed, get_account_id_from_seed, AuthorityKeys}; -use seed_primitives::{AccountId, AccountId20, Balance, Index}; +use seed_primitives::{AccountId, AccountId20, Balance, Nonce}; use sp_runtime::BuildStorage; /// Base gas used for an EVM transaction @@ -227,7 +227,7 @@ pub fn charlie() -> AccountId { } /// Constructs transaction `SignedExtra` payload. -pub fn signed_extra(nonce: Index, tip: Balance) -> SignedExtra { +pub fn signed_extra(nonce: Nonce, tip: Balance) -> SignedExtra { ( frame_system::CheckNonZeroSender::new(), frame_system::CheckSpecVersion::new(), From ddfc365025dd008cd39c49c389bb16373f630b33 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:14:58 +1200 Subject: [PATCH 084/112] Update correct weights for OnChainSeqPhragmen --- runtime/src/lib.rs | 6 +- .../frame_election_provider_support.rs | 65 +++++++++++++++++++ runtime/src/weights/mod.rs | 1 + 3 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 runtime/src/weights/frame_election_provider_support.rs diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index b2b057595..aab5c4045 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -363,7 +363,7 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); // TODO - update to TXFeepot? + type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = weights::pallet_balances::WeightInfo; @@ -762,7 +762,7 @@ impl onchain::Config for OnChainSeqPhragmen { type System = Runtime; type Solver = SequentialPhragmen; type DataProvider = Staking; - type WeightInfo = (); // TODO - add proper weights here + type WeightInfo = weights::frame_election_provider_support::WeightInfo; type MaxWinners = MaxActiveValidators; type VotersBound = MaxElectingVoters; type TargetsBound = MaxElectableTargets; @@ -2230,7 +2230,7 @@ mod benches { [pallet_session, SessionBench::] [pallet_bags_list, VoterList] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] - [pallet_election_provider_support_benchmarking, EPSBench::] + [frame_election_provider_support, EPSBench::] [pallet_recovery, Recovery] [pallet_proxy, Proxy] [pallet_preimage, Preimage] diff --git a/runtime/src/weights/frame_election_provider_support.rs b/runtime/src/weights/frame_election_provider_support.rs new file mode 100644 index 000000000..873957c84 --- /dev/null +++ b/runtime/src/weights/frame_election_provider_support.rs @@ -0,0 +1,65 @@ + +//! Autogenerated weights for `frame_election_provider_support` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/seed +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=frame-election-provider-support +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./runtime/src/weights/frame_election_provider_support.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `frame_election_provider_support`. +pub struct WeightInfo(PhantomData); +impl frame_election_provider_support::WeightInfo for WeightInfo { + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. + fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_722_000_000 picoseconds. + Weight::from_parts(5_763_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 93_239 + .saturating_add(Weight::from_parts(4_132_852, 0).saturating_mul(v.into())) + // Standard Error: 9_532_522 + .saturating_add(Weight::from_parts(942_238_108, 0).saturating_mul(d.into())) + } + /// The range of component `v` is `[1000, 2000]`. + /// The range of component `t` is `[500, 1000]`. + /// The range of component `d` is `[5, 16]`. + fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_783_000_000 picoseconds. + Weight::from_parts(3_799_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 79_844 + .saturating_add(Weight::from_parts(3_036_309, 0).saturating_mul(v.into())) + // Standard Error: 8_163_018 + .saturating_add(Weight::from_parts(845_695_390, 0).saturating_mul(d.into())) + } +} diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index 251fd808e..b246dc300 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -1,3 +1,4 @@ +pub mod frame_election_provider_support; pub mod frame_system; pub mod pallet_assets; pub mod pallet_assets_ext; From 6f4a2f058371325ccc8f85636e85a123b6cd6513 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:57:07 +1200 Subject: [PATCH 085/112] Add correct weights for pallet_sudo --- runtime/Cargo.toml | 1 + runtime/src/lib.rs | 3 +- runtime/src/weights/mod.rs | 1 + runtime/src/weights/pallet_sudo.rs | 69 ++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 runtime/src/weights/pallet_sudo.rs diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 618b1642c..0a93f8c0d 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -319,6 +319,7 @@ runtime-benchmarks = [ "pallet-utility/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-staking/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index aab5c4045..7aef55077 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -965,7 +965,7 @@ impl pallet_babe::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type WeightInfo = (); // TODO - set correct weights + type WeightInfo = weights::pallet_sudo::WeightInfo; } impl pallet_tx_fee_pot::Config for Runtime { @@ -2234,6 +2234,7 @@ mod benches { [pallet_recovery, Recovery] [pallet_proxy, Proxy] [pallet_preimage, Preimage] + [pallet_sudo, Sudo] // Local [pallet_nft, Nft] [pallet_sft, Sft] diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index b246dc300..8d87bba81 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -25,6 +25,7 @@ pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_sft; pub mod pallet_staking; +pub mod pallet_sudo; pub mod pallet_timestamp; pub mod pallet_token_approvals; pub mod pallet_utility; diff --git a/runtime/src/weights/pallet_sudo.rs b/runtime/src/weights/pallet_sudo.rs new file mode 100644 index 000000000..cbefd215c --- /dev/null +++ b/runtime/src/weights/pallet_sudo.rs @@ -0,0 +1,69 @@ + +//! Autogenerated weights for `pallet_sudo` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/seed +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-sudo +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output +// ./runtime/src/weights/pallet_sudo.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_sudo`. +pub struct WeightInfo(PhantomData); +impl pallet_sudo::WeightInfo for WeightInfo { + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn set_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `86` + // Estimated: `1505` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 1505)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn sudo() -> Weight { + // Proof Size summary in bytes: + // Measured: `86` + // Estimated: `1505` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 1505)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + fn sudo_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `86` + // Estimated: `1505` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 1505)) + .saturating_add(T::DbWeight::get().reads(1)) + } +} From 499ae6593cf0d9cabb068ef1642369e9596ad2cf Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:55:04 +1200 Subject: [PATCH 086/112] review suggestions --- runtime/src/lib.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 7aef55077..1b00b0e58 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -577,6 +577,8 @@ parameter_types! { pub const DepositBase: Balance = deposit(1, 88); // Additional storage item size of 32 bytes. pub const DepositFactor: Balance = deposit(0, 32); + // The maximum amount of signatories allowed in the multisig + pub const MaxSignatories: u32 = 100; } impl pallet_multisig::Config for Runtime { @@ -585,7 +587,7 @@ impl pallet_multisig::Config for Runtime { type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; - type MaxSignatories = ConstU32<100>; + type MaxSignatories = MaxSignatories; type WeightInfo = weights::pallet_multisig::WeightInfo; } @@ -864,6 +866,8 @@ parameter_types! { pub const SlashPotId: PalletId = PalletId(*b"slashpot"); /// Holds XRP transaction fees for distribution to validators according to stake & undistributed reward remainders pub const TxFeePotId: PalletId = PalletId(*b"txfeepot"); + pub const MaxUnlockingChunks: u32 = 32; + pub const HistoryDepth: u32 = 84; } impl pallet_staking::Config for Runtime { @@ -901,10 +905,10 @@ impl pallet_staking::Config for Runtime { type GenesisElectionProvider = onchain::OnChainExecution; type VoterList = VoterList; type TargetList = pallet_staking::UseValidatorsMap; - type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; + type MaxUnlockingChunks = MaxUnlockingChunks; type BenchmarkingConfig = staking::StakingBenchmarkConfig; type WeightInfo = weights::pallet_staking::WeightInfo; - type HistoryDepth = frame_support::traits::ConstU32<84>; + type HistoryDepth = HistoryDepth; type EventListeners = (); } @@ -1260,6 +1264,8 @@ parameter_types! { // - 32 bytes Hasher (Blake2256) // - 4 bytes BlockNumber (u32) pub AnnouncementDepositFactor: Balance = deposit(0, 56); + pub const MaxProxies: u32 = 32; + pub const MaxPending: u32 = 32; } impl pallet_proxy::Config for Runtime { @@ -1270,8 +1276,8 @@ impl pallet_proxy::Config for Runtime { type ProxyType = impls::ProxyType; type ProxyDepositBase = ProxyDepositBase; type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = ConstU32<32>; - type MaxPending = ConstU32<32>; + type MaxProxies = MaxProxies; + type MaxPending = MaxPending; type CallHasher = BlakeTwo256Hash; type AnnouncementDepositBase = AnnouncementDepositBase; type AnnouncementDepositFactor = AnnouncementDepositFactor; @@ -1297,7 +1303,6 @@ parameter_types! { pub const VtxTxFeePotId: PalletId = PalletId(*b"vtx/fpot"); pub const UnsignedInterval: BlockNumber = MINUTES / 2; pub const PayoutBatchSize: u32 = 99; - pub const HistoryDepth: u32 = 84; pub const VortexAssetId: AssetId = VTX_ASSET_ID; pub const MaxAssetPrices: u32 = 500; pub const MaxRewards: u32 = 500; From 632791a5260dc1de3af380e48907a95c7b01acf8 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:39:48 +1200 Subject: [PATCH 087/112] vortex-distribution -> vortex --- .../Cargo.toml | 0 .../src/benchmarking.rs | 0 .../src/lib.rs | 0 .../src/mock.rs | 0 .../src/tests.rs | 0 .../src/weights.rs | 76 ++++++++----------- runtime/Cargo.toml | 2 +- runtime/src/weights/pallet_vortex.rs | 48 ++++++------ scripts/run_benchmarks.sh | 5 -- 9 files changed, 58 insertions(+), 73 deletions(-) rename pallet/{vortex-distribution => vortex}/Cargo.toml (100%) rename pallet/{vortex-distribution => vortex}/src/benchmarking.rs (100%) rename pallet/{vortex-distribution => vortex}/src/lib.rs (100%) rename pallet/{vortex-distribution => vortex}/src/mock.rs (100%) rename pallet/{vortex-distribution => vortex}/src/tests.rs (100%) rename pallet/{vortex-distribution => vortex}/src/weights.rs (87%) diff --git a/pallet/vortex-distribution/Cargo.toml b/pallet/vortex/Cargo.toml similarity index 100% rename from pallet/vortex-distribution/Cargo.toml rename to pallet/vortex/Cargo.toml diff --git a/pallet/vortex-distribution/src/benchmarking.rs b/pallet/vortex/src/benchmarking.rs similarity index 100% rename from pallet/vortex-distribution/src/benchmarking.rs rename to pallet/vortex/src/benchmarking.rs diff --git a/pallet/vortex-distribution/src/lib.rs b/pallet/vortex/src/lib.rs similarity index 100% rename from pallet/vortex-distribution/src/lib.rs rename to pallet/vortex/src/lib.rs diff --git a/pallet/vortex-distribution/src/mock.rs b/pallet/vortex/src/mock.rs similarity index 100% rename from pallet/vortex-distribution/src/mock.rs rename to pallet/vortex/src/mock.rs diff --git a/pallet/vortex-distribution/src/tests.rs b/pallet/vortex/src/tests.rs similarity index 100% rename from pallet/vortex-distribution/src/tests.rs rename to pallet/vortex/src/tests.rs diff --git a/pallet/vortex-distribution/src/weights.rs b/pallet/vortex/src/weights.rs similarity index 87% rename from pallet/vortex-distribution/src/weights.rs rename to pallet/vortex/src/weights.rs index 654c1a8e0..0276eec5f 100644 --- a/pallet/vortex-distribution/src/weights.rs +++ b/pallet/vortex/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_vortex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -34,7 +34,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./pallet/vortex-distribution/src/weights.rs +// ./pallet/vortex/src/weights.rs // --template // ./scripts/pallet_template.hbs @@ -62,30 +62,25 @@ pub trait WeightInfo { /// Weights for pallet_vortex using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) - /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AdminAccount` (r:0 w:1) + // Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_admin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_314_000 picoseconds. - Weight::from_parts(7_775_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_all(8_000_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(42_594_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(43_855_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -96,23 +91,23 @@ impl WeightInfo for SubstrateWeight { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(88_674_000 as u64) + Weight::from_all(32_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(30_464_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(8_664_027 as u64) - // Standard Error: 7_156 - .saturating_add(Weight::from_all(3_862_841 as u64).saturating_mul(b as u64)) + Weight::from_all(10_000_000 as u64) + // Standard Error: 3_066 + .saturating_add(Weight::from_all(1_773_534 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -122,7 +117,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(48_739_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -137,7 +132,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(322_213_000 as u64) + Weight::from_all(129_000_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -150,7 +145,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(146_962_000 as u64) + Weight::from_all(54_000_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -169,7 +164,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(224_448_000 as u64) + Weight::from_all(85_000_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -177,30 +172,25 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) - /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + // Storage: `VortexDistribution::AdminAccount` (r:0 w:1) + // Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_admin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_314_000 picoseconds. - Weight::from_parts(7_775_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(RocksDbWeight::get().writes(1)) + Weight::from_all(8_000_000 as u64) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) // Proof: `VortexDistribution::NextVortexId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(42_594_000 as u64) + Weight::from_all(13_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(43_855_000 as u64) + Weight::from_all(14_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -211,23 +201,23 @@ impl WeightInfo for () { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(88_674_000 as u64) + Weight::from_all(32_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(30_464_000 as u64) + Weight::from_all(10_000_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(8_664_027 as u64) - // Standard Error: 7_156 - .saturating_add(Weight::from_all(3_862_841 as u64).saturating_mul(b as u64)) + Weight::from_all(10_000_000 as u64) + // Standard Error: 3_066 + .saturating_add(Weight::from_all(1_773_534 as u64).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -237,7 +227,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(48_739_000 as u64) + Weight::from_all(15_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -252,7 +242,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(322_213_000 as u64) + Weight::from_all(129_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -265,7 +255,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(146_962_000 as u64) + Weight::from_all(54_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -284,7 +274,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(224_448_000 as u64) + Weight::from_all(85_000_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 0a93f8c0d..89fb23806 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -105,7 +105,7 @@ pallet-fee-control = { path = "../pallet/fee-control", default-features = false pallet-xls20 = { path = "../pallet/xls20", default-features = false } pallet-futurepass = { path = "../pallet/futurepass", default-features = false } pallet-marketplace = { path = "../pallet/marketplace", default-features = false } -pallet-vortex = { path = "../pallet/vortex-distribution", default-features = false } +pallet-vortex = { path = "../pallet/vortex", default-features = false } pallet-doughnut = { path = "../pallet/doughnut", default-features = false } pallet-maintenance-mode = { path = "../pallet/maintenance-mode", default-features = false } pallet-crowdsale = { path = "../pallet/crowdsale", default-features = false } diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index db0830cfd..b6d97e21b 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_vortex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` +//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_314_000 picoseconds. - Weight::from_parts(7_775_000, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -51,8 +51,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1489` - // Minimum execution time: 42_011_000 picoseconds. - Weight::from_parts(42_788_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -63,8 +63,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `3478` - // Minimum execution time: 42_772_000 picoseconds. - Weight::from_parts(43_629_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3478)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +79,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `539` // Estimated: `3627` - // Minimum execution time: 88_863_000 picoseconds. - Weight::from_parts(89_678_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -91,8 +91,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 30_043_000 picoseconds. - Weight::from_parts(30_689_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -103,11 +103,11 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 34_419_000 picoseconds. - Weight::from_parts(4_326_044, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(659_538, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 8_655 - .saturating_add(Weight::from_parts(3_918_804, 0).saturating_mul(b.into())) + // Standard Error: 4_276 + .saturating_add(Weight::from_parts(1_813_336, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into()))) } /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -120,8 +120,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `5023` - // Minimum execution time: 47_759_000 picoseconds. - Weight::from_parts(48_789_000, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 5023)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -140,8 +140,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1227` // Estimated: `8763` - // Minimum execution time: 324_986_000 picoseconds. - Weight::from_parts(327_149_000, 0) + // Minimum execution time: 124_000_000 picoseconds. + Weight::from_parts(127_000_000, 0) .saturating_add(Weight::from_parts(0, 8763)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -158,8 +158,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `936` // Estimated: `6160` - // Minimum execution time: 147_146_000 picoseconds. - Weight::from_parts(148_783_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -182,8 +182,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1071` // Estimated: `9056` - // Minimum execution time: 224_233_000 picoseconds. - Weight::from_parts(226_605_000, 0) + // Minimum execution time: 82_000_000 picoseconds. + Weight::from_parts(86_000_000, 0) .saturating_add(Weight::from_parts(0, 9056)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 3017984b4..09ea6788d 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -75,11 +75,6 @@ benchmark_pallet() { # remove the 'pallet-' prefix PALLET_FOLDER="./pallet/$(echo ${PALLET#pallet-})/src" - # Add exception to pallet-vortex non standard directory naming for now - if [ "$PALLET" == "pallet-vortex" ]; then - PALLET_FOLDER="./pallet/vortex-distribution/src" - fi - OUTPUT=$($BINARY_LOCATION benchmark pallet --chain=dev --steps=$STEPS --repeat=$REPEAT --pallet="$PALLET" --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output "$PALLET_FOLDER/weights.rs" $1 2>&1 ) if [ $? -ne 0 ]; then echo "$OUTPUT" >> "$ERR_FILE" From b056403fee3783854448f97c52ff16a3458e8da0 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 6 Jun 2024 00:33:09 +0000 Subject: [PATCH 088/112] Update benchmarks for pallet-vortex on feat/substrate-v1.0.0 --- pallet/vortex/src/weights.rs | 52 ++++++++++++++-------------- runtime/src/weights/pallet_vortex.rs | 48 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/pallet/vortex/src/weights.rs b/pallet/vortex/src/weights.rs index 0276eec5f..95f549daf 100644 --- a/pallet/vortex/src/weights.rs +++ b/pallet/vortex/src/weights.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for pallet_vortex //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::AdminAccount` (r:0 w:1) // Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_admin() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(26_829_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) @@ -73,14 +73,14 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(41_394_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_892_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -91,23 +91,23 @@ impl WeightInfo for SubstrateWeight { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(88_190_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(30_079_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(10_000_000 as u64) - // Standard Error: 3_066 - .saturating_add(Weight::from_all(1_773_534 as u64).saturating_mul(b as u64)) + Weight::from_all(15_827_056 as u64) + // Standard Error: 7_007 + .saturating_add(Weight::from_all(3_973_868 as u64).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -117,7 +117,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(47_391_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -132,7 +132,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(129_000_000 as u64) + Weight::from_all(324_891_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -145,7 +145,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(54_000_000 as u64) + Weight::from_all(145_308_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -164,7 +164,7 @@ impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(85_000_000 as u64) + Weight::from_all(227_405_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -175,7 +175,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::AdminAccount` (r:0 w:1) // Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_admin() -> Weight { - Weight::from_all(8_000_000 as u64) + Weight::from_all(26_829_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::NextVortexId` (r:1 w:1) @@ -183,14 +183,14 @@ impl WeightInfo for () { // Storage: `VortexDistribution::VtxDistStatuses` (r:0 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn create_vtx_dist() -> Weight { - Weight::from_all(13_000_000 as u64) + Weight::from_all(41_394_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:1) // Proof: `VortexDistribution::VtxDistStatuses` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`) fn disable_vtx_dist() -> Weight { - Weight::from_all(14_000_000 as u64) + Weight::from_all(42_892_000 as u64) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -201,23 +201,23 @@ impl WeightInfo for () { // Storage: `Assets::Asset` (r:1 w:1) // Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(162), added: 2637, mode: `MaxEncodedLen`) fn start_vtx_dist() -> Weight { - Weight::from_all(32_000_000 as u64) + Weight::from_all(88_190_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: `VortexDistribution::VtxDistEras` (r:0 w:1) // Proof: `VortexDistribution::VtxDistEras` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) fn set_vtx_dist_eras() -> Weight { - Weight::from_all(10_000_000 as u64) + Weight::from_all(30_079_000 as u64) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: `VortexDistribution::AssetPrices` (r:0 w:500) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 500]`. fn set_asset_prices(b: u32, ) -> Weight { - Weight::from_all(10_000_000 as u64) - // Standard Error: 3_066 - .saturating_add(Weight::from_all(1_773_534 as u64).saturating_mul(b as u64)) + Weight::from_all(15_827_056 as u64) + // Standard Error: 7_007 + .saturating_add(Weight::from_all(3_973_868 as u64).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64))) } // Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -227,7 +227,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::TotalVortex` (r:1 w:1) // Proof: `VortexDistribution::TotalVortex` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn register_rewards() -> Weight { - Weight::from_all(15_000_000 as u64) + Weight::from_all(47_391_000 as u64) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -242,7 +242,7 @@ impl WeightInfo for () { // Storage: `System::Account` (r:3 w:3) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn trigger_vtx_distribution() -> Weight { - Weight::from_all(129_000_000 as u64) + Weight::from_all(324_891_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } @@ -255,7 +255,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::AssetPrices` (r:2 w:0) // Proof: `VortexDistribution::AssetPrices` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn redeem_tokens_from_vault() -> Weight { - Weight::from_all(54_000_000 as u64) + Weight::from_all(145_308_000 as u64) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -274,7 +274,7 @@ impl WeightInfo for () { // Storage: `VortexDistribution::NextUnsignedAt` (r:0 w:1) // Proof: `VortexDistribution::NextUnsignedAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn pay_unsigned() -> Weight { - Weight::from_all(85_000_000 as u64) + Weight::from_all(227_405_000 as u64) .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex.rs index b6d97e21b..781e517b2 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_vortex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 26_577_000 picoseconds. + Weight::from_parts(26_995_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -51,8 +51,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1489` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 40_554_000 picoseconds. + Weight::from_parts(41_172_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -63,8 +63,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `3478` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 40_884_000 picoseconds. + Weight::from_parts(41_842_000, 0) .saturating_add(Weight::from_parts(0, 3478)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +79,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `539` // Estimated: `3627` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 86_109_000 picoseconds. + Weight::from_parts(87_827_000, 0) .saturating_add(Weight::from_parts(0, 3627)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -91,8 +91,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 29_287_000 picoseconds. + Weight::from_parts(30_018_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -103,11 +103,11 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(659_538, 0) + // Minimum execution time: 33_708_000 picoseconds. + Weight::from_parts(15_157_820, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_276 - .saturating_add(Weight::from_parts(1_813_336, 0).saturating_mul(b.into())) + // Standard Error: 7_163 + .saturating_add(Weight::from_parts(3_834_250, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into()))) } /// Storage: `VortexDistribution::VtxDistStatuses` (r:1 w:0) @@ -120,8 +120,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `202` // Estimated: `5023` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 46_736_000 picoseconds. + Weight::from_parts(47_236_000, 0) .saturating_add(Weight::from_parts(0, 5023)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -140,8 +140,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1227` // Estimated: `8763` - // Minimum execution time: 124_000_000 picoseconds. - Weight::from_parts(127_000_000, 0) + // Minimum execution time: 317_864_000 picoseconds. + Weight::from_parts(320_517_000, 0) .saturating_add(Weight::from_parts(0, 8763)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -158,8 +158,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `936` // Estimated: `6160` - // Minimum execution time: 54_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 143_343_000 picoseconds. + Weight::from_parts(144_662_000, 0) .saturating_add(Weight::from_parts(0, 6160)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -182,8 +182,8 @@ impl pallet_vortex::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1071` // Estimated: `9056` - // Minimum execution time: 82_000_000 picoseconds. - Weight::from_parts(86_000_000, 0) + // Minimum execution time: 222_017_000 picoseconds. + Weight::from_parts(223_796_000, 0) .saturating_add(Weight::from_parts(0, 9056)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) From 2bf5b1023b4e869900b055c01293f69acab9b855 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 6 Jun 2024 03:00:26 +0000 Subject: [PATCH 089/112] Update benchmarks for pallet-sudo on feat/substrate-v1.0.0 --- runtime/src/weights/pallet_sudo.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/src/weights/pallet_sudo.rs b/runtime/src/weights/pallet_sudo.rs index cbefd215c..90930f4b1 100644 --- a/runtime/src/weights/pallet_sudo.rs +++ b/runtime/src/weights/pallet_sudo.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `pallet_sudo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -38,8 +38,8 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `86` // Estimated: `1505` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 37_963_000 picoseconds. + Weight::from_parts(39_096_000, 0) .saturating_add(Weight::from_parts(0, 1505)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +50,8 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `86` // Estimated: `1505` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 38_796_000 picoseconds. + Weight::from_parts(39_528_000, 0) .saturating_add(Weight::from_parts(0, 1505)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -61,8 +61,8 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `86` // Estimated: `1505` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 38_357_000 picoseconds. + Weight::from_parts(39_503_000, 0) .saturating_add(Weight::from_parts(0, 1505)) .saturating_add(T::DbWeight::get().reads(1)) } From 0df217fbc986f5ffb7dcba4f5bd6c7ade3650dfc Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 6 Jun 2024 04:38:31 +0000 Subject: [PATCH 090/112] Update benchmarks for frame-election-provider-support on feat/substrate-v1.0.0 --- .../frame_election_provider_support.rs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/runtime/src/weights/frame_election_provider_support.rs b/runtime/src/weights/frame_election_provider_support.rs index 873957c84..7e51582ab 100644 --- a/runtime/src/weights/frame_election_provider_support.rs +++ b/runtime/src/weights/frame_election_provider_support.rs @@ -2,9 +2,9 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Surangas-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `ip-172-31-102-147`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -39,13 +39,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_722_000_000 picoseconds. - Weight::from_parts(5_763_000_000, 0) + // Minimum execution time: 14_460_556_000 picoseconds. + Weight::from_parts(14_523_233_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 93_239 - .saturating_add(Weight::from_parts(4_132_852, 0).saturating_mul(v.into())) - // Standard Error: 9_532_522 - .saturating_add(Weight::from_parts(942_238_108, 0).saturating_mul(d.into())) + // Standard Error: 280_873 + .saturating_add(Weight::from_parts(11_967_984, 0).saturating_mul(v.into())) + // Standard Error: 28_715_494 + .saturating_add(Weight::from_parts(2_962_076_091, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -54,12 +54,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_783_000_000 picoseconds. - Weight::from_parts(3_799_000_000, 0) + // Minimum execution time: 9_508_296_000 picoseconds. + Weight::from_parts(9_713_462_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 79_844 - .saturating_add(Weight::from_parts(3_036_309, 0).saturating_mul(v.into())) - // Standard Error: 8_163_018 - .saturating_add(Weight::from_parts(845_695_390, 0).saturating_mul(d.into())) + // Standard Error: 219_887 + .saturating_add(Weight::from_parts(9_225_335, 0).saturating_mul(v.into())) + // Standard Error: 22_480_542 + .saturating_add(Weight::from_parts(2_479_766_554, 0).saturating_mul(d.into())) } } From 27c2908e2c55b6102e558edb5e546ac066f7827f Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:28:29 +1200 Subject: [PATCH 091/112] EVM Weight V2 handling --- evm-precompiles/futurepass/src/lib.rs | 79 ++++++++++++++---- runtime/src/lib.rs | 112 ++++++++++++++++++++++---- 2 files changed, 162 insertions(+), 29 deletions(-) diff --git a/evm-precompiles/futurepass/src/lib.rs b/evm-precompiles/futurepass/src/lib.rs index d0552faa3..763c72707 100644 --- a/evm-precompiles/futurepass/src/lib.rs +++ b/evm-precompiles/futurepass/src/lib.rs @@ -24,7 +24,7 @@ use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, ensure, }; -use pallet_evm::{ExitReason, PrecompileFailure, PrecompileSet, Runner}; +use pallet_evm::{ExitReason, GasWeightMapping, PrecompileFailure, PrecompileSet, Runner}; use pallet_futurepass::ProxyProvider; use precompile_utils::{ constants::FUTUREPASS_PRECOMPILE_ADDRESS_PREFIX, data::Bytes32PostPad, get_selector, prelude::*, @@ -438,21 +438,46 @@ where }, CallType::Create => { handle.record_log_costs_manual(4, 32)?; + + let is_transactional = false; + let validate = true; + let evm_config = ::config(); + // TODO: refactor the code once we are on polkadot-v1.1.0, ref - https://github.com/polkadot-evm/frontier/pull/1121 + let estimated_transaction_len = call_data.inner.len() + + 20 + // from + 32 + // value + 32 + // gas_limit + 32 + // nonce + 1 + // TransactionAction + 8 + // chain id + 65; // signature + + let gas_limit = handle.remaining_gas().min(u64::MAX.into()); + let without_base_extrinsic_weight = true; + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight, + ) { + weight_limit if weight_limit.proof_size() > 0 => + (Some(weight_limit), Some(estimated_transaction_len as u64)), + _ => (None, None), + }; let execution_info = ::Runner::create( futurepass.into(), call_data.into_vec(), value, - handle.remaining_gas(), + gas_limit, None, None, None, // handled by EVM alloc::vec![], - false, - true, - // TODO: adjust accordingly - None, - None, - ::config(), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + evm_config, ) .map_err(|_| RevertReason::custom("Futurepass: create failed"))?; @@ -484,6 +509,33 @@ where .collect::>(); let salt = H256::from_slice(&salt); + let is_transactional = false; + let validate = true; + let evm_config = ::config(); + // TODO: refactor the code once we are on polkadot-v1.1.0, ref - https://github.com/polkadot-evm/frontier/pull/1121 + let estimated_transaction_len = call_data_vec.len() + + 20 + // from + 32 + // salt + 32 + // value + 32 + // gas_limit + 32 + // nonce + 1 + // TransactionAction + 8 + // chain id + 65; // signature + + let gas_limit = handle.remaining_gas().min(u64::MAX.into()); + let without_base_extrinsic_weight = true; + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight, + ) { + weight_limit if weight_limit.proof_size() > 0 => + (Some(weight_limit), Some(estimated_transaction_len as u64)), + _ => (None, None), + }; + let execution_info = ::Runner::create2( futurepass.into(), call_data_vec, // reuse the vector here @@ -494,12 +546,11 @@ where None, None, // handled by EVM alloc::vec![], - false, - true, - // TODO: adjust accordingly - None, - None, - ::config(), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + evm_config, ) .map_err(|_| RevertReason::custom("Futurepass: create2 failed"))?; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 1b00b0e58..e23777b6f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -34,7 +34,9 @@ use pallet_ethereum::{ Call::transact, InvalidTransactionWrapper, PostLogContent, Transaction as EthereumTransaction, TransactionAction, }; -use pallet_evm::{Account as EVMAccount, EnsureAddressNever, FeeCalculator, Runner as RunnerT}; +use pallet_evm::{ + Account as EVMAccount, EnsureAddressNever, FeeCalculator, GasWeightMapping, Runner as RunnerT, +}; use pallet_staking::RewardDestination; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use seed_pallet_common::MaintenanceCheck; @@ -95,6 +97,7 @@ pub use sp_runtime::BuildStorage; // Export for chain_specs #[cfg(feature = "std")] pub use pallet_staking::{Forcing, StakerStatus}; +use sp_runtime::traits::UniqueSaturatedInto; pub mod keys { pub use super::{BabeId, EthBridgeId, GrandpaId, ImOnlineId}; @@ -1789,22 +1792,60 @@ impl_runtime_apis! { None }; + let is_transactional = false; + let validate = true; + let evm_config = config.as_ref().unwrap_or(::config()); + + // TODO: refactor the code once we are on polkadot-v1.1.0, ref - https://github.com/polkadot-evm/frontier/pull/1121 + let mut estimated_transaction_len = data.len() + + 20 + // to + 20 + // from + 32 + // value + 32 + // gas_limit + 32 + // nonce + 1 + // TransactionAction + 8 + // chain id + 65; // signature + + if max_fee_per_gas.is_some() { + estimated_transaction_len += 32; + } + if max_priority_fee_per_gas.is_some() { + estimated_transaction_len += 32; + } + if access_list.is_some() { + estimated_transaction_len += access_list.encoded_size(); + } + + let gas_limit = gas_limit.min(u64::MAX.into()).low_u64(); + let without_base_extrinsic_weight = true; + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight + ) { + weight_limit if weight_limit.proof_size() > 0 => { + (Some(weight_limit), Some(estimated_transaction_len as u64)) + } + _ => (None, None), + }; + ::Runner::call( from, to, data, value, - gas_limit.low_u64(), + gas_limit.unique_saturated_into(), max_fee_per_gas, max_priority_fee_per_gas, nonce, access_list.unwrap_or_default(), - false, - true, - // TODO: adjust accordingly - None, - None, - config.as_ref().unwrap_or(::config()), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + evm_config, ).map_err(|err| err.error.into()) } @@ -1827,21 +1868,62 @@ impl_runtime_apis! { None }; + let is_transactional = false; + let validate = true; + let evm_config = config.as_ref().unwrap_or(::config()); + + // TODO: refactor the code once we are on polkadot-v1.1.0, ref - https://github.com/polkadot-evm/frontier/pull/1121 + let mut estimated_transaction_len = data.len() + + 20 + // from + 32 + // value + 32 + // gas_limit + 32 + // nonce + 1 + // TransactionAction + 8 + // chain id + 65; // signature + + if max_fee_per_gas.is_some() { + estimated_transaction_len += 32; + } + if max_priority_fee_per_gas.is_some() { + estimated_transaction_len += 32; + } + if access_list.is_some() { + estimated_transaction_len += access_list.encoded_size(); + } + + let gas_limit = if gas_limit > U256::from(u64::MAX) { + u64::MAX + } else { + gas_limit.low_u64() + }; + let without_base_extrinsic_weight = true; + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight + ) { + weight_limit if weight_limit.proof_size() > 0 => { + (Some(weight_limit), Some(estimated_transaction_len as u64)) + } + _ => (None, None), + }; + ::Runner::create( from, data, value, - gas_limit.low_u64(), + gas_limit.unique_saturated_into(), max_fee_per_gas, max_priority_fee_per_gas, nonce, access_list.unwrap_or_default(), - false, - false, // TODO: check why this is not true - // TODO: adjust accordingly - None, - None, - config.as_ref().unwrap_or(::config()), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + evm_config, ).map_err(|err| err.error.into()) } From 1b6ba18fe865ab09c3bbac8b84a86229a53ab108 Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:56:46 +1200 Subject: [PATCH 092/112] Add extra cost to is_precompile check for PrecompileSets (#848) * Add extra cost to is_precompile check for PrecompileSets * Update txCosts for 3 affected precompiles * Address PR comments --- e2e/test/ERC1155/TxCosts.md | 26 +++++++++++++------------- e2e/test/ERC20/TxCosts.md | 12 ++++++------ e2e/test/ERC721/TxCosts.md | 30 +++++++++++++++--------------- evm-precompiles/erc1155/src/lib.rs | 3 ++- evm-precompiles/erc20/src/lib.rs | 3 ++- evm-precompiles/erc721/src/lib.rs | 3 ++- 6 files changed, 40 insertions(+), 37 deletions(-) diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index 143016d1a..a77342e2b 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -5,23 +5,23 @@ | uri | 27560 | 22400 | 0 | | balanceOf | 25957 | 22433 | 0 | | balanceOfBatch | 32585 | 24106 | 0 | -| setApprovalForAll | 47025 | 26466 | 0 | +| setApprovalForAll | 47025 | 27501 | 0 | | isApprovedForAll | 26076 | 23184 | 0 | -| safeTransferFrom | 59163 | 31608 | 23335 | -| safeBatchTransferFrom | 50205 | 35107 | 26669 | -| mint | 33152 | 31645 | 23502 | -| mintBatch | 42210 | 32033 | 26835 | -| burn | 32581 | 26332 | 20002 | -| burnBatch | 38043 | 28962 | 23335 | +| safeTransferFrom | 59163 | 32160 | 23335 | +| safeBatchTransferFrom | 50205 | 35812 | 26670 | +| mint | 33152 | 32245 | 23503 | +| mintBatch | 42210 | 32633 | 26836 | +| burn | 32581 | 27608 | 20002 | +| burnBatch | 38043 | 31828 | 23335 | ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:----------------------|:---------------------:|:-----------------------:|:----------------------:| -| safeTransferFrom | 880468 | 444524 | 350033 | -| safeBatchTransferFrom | 728112 | 515451 | 400049 | -| mint | 493954 | 445709 | 352539 | -| mintBatch | 589858 | 458130 | 402539 | -| burn | 475652 | 389438 | 300033 | -| burnBatch | 569231 | 433828 | 350033 | +| safeTransferFrom | 880468 | 462181 | 350038 | +| safeBatchTransferFrom | 728112 | 535973 | 400055 | +| mint | 493954 | 464911 | 352545 | +| mintBatch | 589858 | 477332 | 402545 | +| burn | 475652 | 407185 | 300038 | +| burnBatch | 569231 | 451575 | 350038 | diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index 607fcff50..80c1bb628 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -5,9 +5,9 @@ | totalSupply | 23717 | 22388 | 0 | | balanceOf | 25860 | 23974 | 0 | | allowance | 26064 | 23273 | 0 | -| approval | 47152 | 26364 | 20170 | -| transfer | 52698 | 44134 | 20173 | -| transferFrom | 44716 | 51794 | 23174 | +| approval | 47152 | 26470 | 20170 | +| transfer | 52698 | 43641 | 20172 | +| transferFrom | 44716 | 51726 | 23340 | | name | 25926 | 22388 | 0 | | decimals | 22354 | 22388 | 0 | | symbol | 25945 | 22388 | 0 | @@ -17,6 +17,6 @@ | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------|:---------------------:|:-----------------------:|:----------------------:| -| approval | 702835 | 391134 | 302559 | -| transfer | 781323 | 633958 | 302595 | -| transferFrom | 647164 | 761966 | 347616 | +| approval | 702835 | 396804 | 302557 | +| transfer | 781323 | 622692 | 302592 | +| transferFrom | 647164 | 760526 | 350114 | diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index 0515906ca..d92947323 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -6,28 +6,28 @@ | ownerOf | 25847 | 23242 | 0 | | getApproved | 27395 | 23242 | 0 | | isApprovedForAll | 26082 | 23973 | 0 | -| mint | 53193 | 28898 | 17335 | -| burn | 37870 | 35114 | 17169 | -| approve | 50740 | 27831 | 23835 | -| setApprovalForAll | 47011 | 26360 | 23335 | -| safetransferFrom | 67181 | 35303 | 0 | -| transferFrom | 66839 | 34917 | 20669 | +| mint | 53193 | 31731 | 17336 | +| burn | 37870 | 35731 | 17170 | +| approve | 50740 | 28884 | 23835 | +| setApprovalForAll | 47011 | 26467 | 23335 | +| safetransferFrom | 67181 | 36625 | 0 | +| transferFrom | 66839 | 35560 | 20670 | | name | 25932 | 22388 | 0 | | symbol | 25938 | 22388 | 0 | | tokenURI | 25964 | 23242 | 0 | | owner | 23728 | 22388 | 0 | -| transferOwnership | 29147 | 27675 | 19835 | -| renounceOwnership | 30272 | 27559 | 19668 | +| transferOwnership | 29147 | 28498 | 19835 | +| renounceOwnership | 30272 | 28372 | 19835 | ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------|:---------------------:|:-----------------------:|:----------------------:| -| mint | 791884 | 431188 | 260036 | -| burn | 490684 | 515676 | 257548 | -| approve | 739543 | 417326 | 357535 | -| setApprovalForAll | 699609 | 390954 | 350028 | -| transferFrom | 884488 | 509930 | 310049 | -| transferOwnership | 436153 | 410231 | 297532 | -| renounceOwnership | 352310 | 404890 | 295032 | +| mint | 791884 | 448454 | 260041 | +| burn | 490684 | 533648 | 257553 | +| approve | 739543 | 430633 | 357539 | +| setApprovalForAll | 699609 | 396639 | 350030 | +| transferFrom | 884488 | 528637 | 310054 | +| transferOwnership | 436153 | 424962 | 297536 | +| renounceOwnership | 352310 | 419621 | 297536 | diff --git a/evm-precompiles/erc1155/src/lib.rs b/evm-precompiles/erc1155/src/lib.rs index 1dea4c847..7d130adec 100644 --- a/evm-precompiles/erc1155/src/lib.rs +++ b/evm-precompiles/erc1155/src/lib.rs @@ -216,10 +216,11 @@ where if let Some(collection_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC1155_PRECOMPILE_ADDRESS_PREFIX) { + let extra_cost = RuntimeHelper::::db_read_gas_cost(); // Check whether the collection exists IsPrecompileResult::Answer { is_precompile: pallet_sft::Pallet::::collection_exists(collection_id), - extra_cost: 0, // TODO: account gas for above storage read? + extra_cost, } } else { IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } diff --git a/evm-precompiles/erc20/src/lib.rs b/evm-precompiles/erc20/src/lib.rs index 14651160f..785431eb5 100644 --- a/evm-precompiles/erc20/src/lib.rs +++ b/evm-precompiles/erc20/src/lib.rs @@ -127,10 +127,11 @@ where if let Some(asset_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC20_PRECOMPILE_ADDRESS_PREFIX) { + let extra_cost = RuntimeHelper::::db_read_gas_cost(); // Check if the asset exists IsPrecompileResult::Answer { is_precompile: >::asset_exists(asset_id), - extra_cost: 0, // TODO: account gas for above storage read? + extra_cost, } } else { IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } diff --git a/evm-precompiles/erc721/src/lib.rs b/evm-precompiles/erc721/src/lib.rs index 110af70b8..109df83e9 100644 --- a/evm-precompiles/erc721/src/lib.rs +++ b/evm-precompiles/erc721/src/lib.rs @@ -230,10 +230,11 @@ where if let Some(collection_id) = Runtime::evm_id_to_runtime_id(Address(address), ERC721_PRECOMPILE_ADDRESS_PREFIX) { + let extra_cost = RuntimeHelper::::db_read_gas_cost(); // Check whether the collection exists IsPrecompileResult::Answer { is_precompile: pallet_nft::Pallet::::collection_exists(collection_id), - extra_cost: 0, // TODO: account gas for above storage read? + extra_cost, } } else { IsPrecompileResult::Answer { is_precompile: false, extra_cost: 0 } From 35bf4a118fe796ffe33e133e21cc36f97d642e9c Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:00:31 +1200 Subject: [PATCH 093/112] Address Substrate 1.0.0 Test comments (#846) * Address PR comments * Fix some XRPL tests * Fix ED25519 test --- e2e/test/XRPL.test.ts | 49 ++++++++++++++++++++++++++++++++-- ethy-gadget/src/gossip.rs | 6 ++--- pallet/vortex/src/lib.rs | 2 +- pallet/xrpl/src/tests.rs | 46 +++++++++++++------------------ runtime/src/lib.rs | 2 +- runtime/src/tests/evm_tests.rs | 2 +- 6 files changed, 72 insertions(+), 35 deletions(-) diff --git a/e2e/test/XRPL.test.ts b/e2e/test/XRPL.test.ts index 8993a15ba..5720a0137 100644 --- a/e2e/test/XRPL.test.ts +++ b/e2e/test/XRPL.test.ts @@ -43,7 +43,7 @@ describe("XRPL pallet", () => { after(async () => await node.stop()); // NOTE: use this test to generate a valid xaman tx (msg + signature) for mock runtime tests - it.skip("debug tx message and signature", async () => { + it.skip("debug ECDSA tx message and signature", async () => { // const user = Wallet.createRandom(); const publicKey = computePublicKey(alith.publicKey, true); // console.log(hexToU8a(publicKey)); @@ -80,6 +80,51 @@ describe("XRPL pallet", () => { console.log("signature", signature); }); + // NOTE: use this test to generate a valid xaman tx (msg + signature) for mock runtime tests + it.skip("debug ED25519 tx message and signature", async () => { + // const user = Wallet.createRandom(); + // const publicKey = computePublicKey(alith.publicKey, true); + const importedAccount = AccountLib.derive.familySeed("sEdS4rAgVysUtD5Zmm9F8i8uJBGik4K"); + const signerInstance = AccountLib.derive.privatekey(importedAccount.keypair.privateKey!); + const publicKey = computePublicKey(`0x${signerInstance.keypair.publicKey!}`, true); + const eoa = Web3.utils.toChecksumAddress( + // remove "ED" prefix from public key to compute EOA + // keccak hash produces 32 bytes (64 chars) - take last 20 bytes (40 chars) + // remove "0x" prefix from keccak hash output (2 chars) + // get last 20 bytes of the keccak hash output (12 bytes - 24 chars) + "0x" + keccak256(hexToU8a(`0x${publicKey.slice(4)}`)).slice(26), + ); + + await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, eoa, 2_000_000)); + + genesisHash = "0000000000000000000000000000000000000000000000000000000000000000"; + const extrinsic = api.tx.system.remark("Mischief Managed"); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + + const xamanJsonTx = { + AccountTxnID: "16969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580", + SigningPubKey: publicKey.slice(2), + Account: deriveAddress(publicKey.slice(2)), + Memos: [ + { + Memo: { + MemoType: stringToHex("extrinsic"), + // remove `0x` from extrinsic hex string + MemoData: stringToHex(`${genesisHash}:0:5:0:${hashedExtrinsicWithoutPrefix}`), + }, + }, + ], + }; + + // sign xaman tx + const message = encode(xamanJsonTx); + const encodedSigningMessage = encodeForSigning(xamanJsonTx); + const signature = sign(encodedSigningMessage, signerInstance.keypair.privateKey); + + console.log("message", message); + console.log("signature", signature); + }); + it("can submit system remark extrinsic - using ecdsa signature", async () => { const user = Wallet.createRandom(); const publicKey = computePublicKey(user.publicKey, true); @@ -186,7 +231,7 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, eoa, 2_000_000)); - const extrinsic = api.tx.system.remark("hi"); + const extrinsic = api.tx.system.remark("Mischief Managed"); const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const nonce = ((await api.query.system.account(eoa)).toJSON() as any)?.nonce; diff --git a/ethy-gadget/src/gossip.rs b/ethy-gadget/src/gossip.rs index a377cd8b5..f6ed929f3 100644 --- a/ethy-gadget/src/gossip.rs +++ b/ethy-gadget/src/gossip.rs @@ -415,7 +415,7 @@ mod tests { assert_validation_result!(ValidationResult::ProcessAndKeep(_), result); assert!(gv.is_tracking_event(&event_id)); - // set the finalized block number to 6. try to validate now. should fail since out of live + // set the finalized block number to 7. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 let block_hashes = net.peer(0).push_blocks(7, false); net.run_until_sync().await; @@ -464,7 +464,7 @@ mod tests { let result = gv.message_expired()(topic::(), witness.clone().encode().as_ref()); assert_eq!(result, false); - // set the finalized block number to 6. try to validate now. should fail since out of live + // set the finalized block number to 7. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 let block_hashes = net.peer(0).push_blocks(7, false); net.run_until_sync().await; @@ -518,7 +518,7 @@ mod tests { ); assert_eq!(result, true); - // set the finalized block number to 6. try to validate now. should fail since out of live + // set the finalized block number to 7. try to validate now. should fail since out of live // window. i.e. WINDOW_SIZE = 5 let block_hashes = net.peer(0).push_blocks(7, false); net.run_until_sync().await; diff --git a/pallet/vortex/src/lib.rs b/pallet/vortex/src/lib.rs index e1bba0193..373bd417a 100644 --- a/pallet/vortex/src/lib.rs +++ b/pallet/vortex/src/lib.rs @@ -282,7 +282,7 @@ pub mod pallet { if let Err(e) = Self::vtx_dist_offchain_worker(now) { log::info!( target: "vtx-dist", - "error happened in offchain worker at {:?}: {:?}", + "offchain worker not triggered at {:?}: {:?}", now, e, ); diff --git a/pallet/xrpl/src/tests.rs b/pallet/xrpl/src/tests.rs index ff94faf5a..39f1d395b 100644 --- a/pallet/xrpl/src/tests.rs +++ b/pallet/xrpl/src/tests.rs @@ -26,18 +26,18 @@ mod self_contained_call { #[test] fn transact_validations() { TestExt::::default().build().execute_with(|| { - // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark + // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark let call = mock::RuntimeCall::System(frame_system::Call::remark { remark: Default::default() }); - let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D48303A303A353A303A35633933633236383339613137636235616366323765383961616330306639646433663531643161316161346234383266363930663634333633396665383732E1F1").unwrap(); - assert_ok!(Xrpl::transact(frame_system::RawOrigin::None.into(), BoundedVec::truncate_from(tx_bytes.clone()), BoundedVec::default(), Box::new(call))); - }); + let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D48303A303A353A303A35633933633236383339613137636235616366323765383961616330306639646433663531643161316161346234383266363930663634333633396665383732E1F1").unwrap(); + assert_ok!(Xrpl::transact(frame_system::RawOrigin::None.into(), BoundedVec::truncate_from(tx_bytes.clone()), BoundedVec::default(), Box::new(call))); + }); } #[test] fn extrinsic_cannot_perform_privileged_operations() { TestExt::::default().build().execute_with(|| { let call = mock::RuntimeCall::System(frame_system::Call::set_code { code: Default::default() }); - // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::set_code + // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::set_code let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D48303A303A353A303A66633730373832313235333862623238393633373338393034303237373630313464393765303033656136393430303533303538386134383434393662333337E1F1").unwrap(); // executing xrpl encoded transaction fails since caller is not root/sudo account @@ -69,8 +69,6 @@ mod self_contained_call { }); } - // TODO Fix this once e2e tests are building - #[ignore] #[test] fn validate_nonce_too_high() { TestExt::::default() @@ -80,10 +78,10 @@ mod self_contained_call { let call = mock::RuntimeCall::System(frame_system::Call::remark { remark: b"Mischief Managed".to_vec() }); // encoded call for: genesis_hash = 0x0, nonce = 5, max_block_number = 5, tip = 0, extrinsic = System::remark; validates nonce too high - let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A353A353A303A33623832663037383031653632636437383966316233636333353936383236313436613163353136666165613766633633333263643362323563646666316331E1F1").unwrap(); + let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A353A353A303A33376635623466363237376431393362336134663037666135636538373239626137366235343735366238653066616539313531316264313830333032333265E1F1").unwrap(); let xt: mock::UncheckedExtrinsicT = fp_self_contained::UncheckedExtrinsic::new_unsigned(mock::RuntimeCall::Xrpl(crate::Call::transact { encoded_msg: BoundedVec::truncate_from(tx_bytes.clone()), - signature: BoundedVec::truncate_from(hex::decode("3045022100BD4846922C600DEDE58A0B1E15D728671538209DBE6A5A03ECE3C9731D7F5068022027FC270D8DE1FCBE3D7B76931BF1980F0E4BCDA6A764FC76E659620AE91C7841").unwrap()), + signature: BoundedVec::truncate_from(hex::decode("3045022100C17C9D3D04DB3B77BDA2F8C91B8A30E0E28CC324FAE88EE54A1E3A8A2CA7BF1B02201BCBBB1A66695CFEA0BA3216BE06DD026D520A05E14960C047AB9986152FB35F").unwrap()), call: Box::new(call.clone()), })); @@ -111,8 +109,8 @@ mod self_contained_call { // validate self contained extrinsic fails, call provided is not signed hashed extrinsic in memo data let xt: mock::UncheckedExtrinsicT = fp_self_contained::UncheckedExtrinsic::new_unsigned(mock::RuntimeCall::Xrpl(crate::Call::transact { - encoded_msg: BoundedVec::truncate_from(hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D0A303A303A353A303A3030E1F1").unwrap()), - signature: BoundedVec::truncate_from(hex::decode("304502210081C0EFD0B5C85AC8C20765B95B44DCD0891619E83529A63A2350907B341EE168022006365C3AB530A1D529606D6EDDE18C76ECF42334FF0DC2140AD392C20305F898").unwrap()), + encoded_msg: BoundedVec::truncate_from(hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33376635623466363237376431393362336134663037666135636538373239626137366235343735366238653066616539313531316264313830333032333265E1F1").unwrap()), + signature: BoundedVec::truncate_from(hex::decode("304402205CD628B33CD2A89D735EBC139F21A3F2F138F7D687BBAF3E2CDFBBF8951919DC02204B65FC7FF3C2C1B1EEF10186CF6BDAA1C96E8F0814099EE5811C12F65E26A81E").unwrap()), call: Box::new(call.clone()), })); assert_err!( @@ -122,8 +120,6 @@ mod self_contained_call { }); } - // TODO Fix this once e2e tests are building - #[ignore] #[test] fn validate_transaction_signature() { TestExt::::default() @@ -133,7 +129,7 @@ mod self_contained_call { let call = mock::RuntimeCall::System(frame_system::Call::remark { remark: b"Mischief Managed".to_vec() }); // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark - let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33623832663037383031653632636437383966316233636333353936383236313436613163353136666165613766633633333263643362323563646666316331E1F1").unwrap(); + let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33376635623466363237376431393362336134663037666135636538373239626137366235343735366238653066616539313531316264313830333032333265E1F1").unwrap(); // validate self contained extrinsic is invalid (no signature) let xt: mock::UncheckedExtrinsicT = fp_self_contained::UncheckedExtrinsic::new_unsigned(mock::RuntimeCall::Xrpl(crate::Call::transact { @@ -160,7 +156,7 @@ mod self_contained_call { // validate self contained extrinsic fails, user does not have funds to pay for transaction (corrected signature) let xt: mock::UncheckedExtrinsicT = fp_self_contained::UncheckedExtrinsic::new_unsigned(mock::RuntimeCall::Xrpl(crate::Call::transact { encoded_msg: BoundedVec::truncate_from(tx_bytes.clone()), - signature: BoundedVec::truncate_from(hex::decode("3045022100F21BB8B86C394E5A383881E3EFA7D2879D2E66E76174F7494C580B402643F45E02200DAB3D5E3B39E61E1020240BA718761EE9EFF148DFBAEC288EFFB4E3FD97DA1D").unwrap()), + signature: BoundedVec::truncate_from(hex::decode("3045022100AB93610B5A278148E75CC28E8308B963C6439B906D4F5EA9A38BA01567D061B1022021A5D789AD9D98BA6B63FD19676FF2ED72071C14BD8FE1745E72F769E03E005D").unwrap()), call: Box::new(call.clone()), })); assert_err!( @@ -176,8 +172,6 @@ mod self_contained_call { }); } - // TODO Fix this once e2e tests are building - #[ignore] #[test] fn ecdsa_system_remark_extrinsic_from_message_success() { TestExt::::default() @@ -186,9 +180,9 @@ mod self_contained_call { .execute_with(|| { let call = mock::RuntimeCall::System(frame_system::Call::remark { remark: b"Mischief Managed".to_vec() }); - // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark - let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33623832663037383031653632636437383966316233636333353936383236313436613163353136666165613766633633333263643362323563646666316331E1F1").unwrap(); - let signature = hex::decode("3045022100F21BB8B86C394E5A383881E3EFA7D2879D2E66E76174F7494C580B402643F45E02200DAB3D5E3B39E61E1020240BA718761EE9EFF148DFBAEC288EFFB4E3FD97DA1D").unwrap(); + // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark + let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580732102509540919FAACF9AB52146C9AA40DB68172D83777250B28E4679176E49CCDD9F81148E6106F6E98E7B21BFDFBFC3DEBA0EDED28A047AF9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33376635623466363237376431393362336134663037666135636538373239626137366235343735366238653066616539313531316264313830333032333265E1F1").unwrap(); + let signature = hex::decode("3045022100AB93610B5A278148E75CC28E8308B963C6439B906D4F5EA9A38BA01567D061B1022021A5D789AD9D98BA6B63FD19676FF2ED72071C14BD8FE1745E72F769E03E005D").unwrap(); // fund the user with XRP (to pay for tx fees) let tx = XRPLTransaction::try_from(tx_bytes.as_bytes_ref()).unwrap(); @@ -231,7 +225,7 @@ mod self_contained_call { System::assert_last_event(mock::RuntimeEvent::System( frame_system::Event::ExtrinsicSuccess { dispatch_info: DispatchInfo { - weight: Weight::from_all(311_960_000), + weight: Weight::from_parts(396_839_240, 220_300_000), class: DispatchClass::Normal, pays_fee: Pays::Yes, }, @@ -252,8 +246,6 @@ mod self_contained_call { }); } - // TODO - enable once e2e ready? - #[ignore] #[test] fn ed25519_system_remark_extrinsic_from_message_success() { TestExt::::default() @@ -262,9 +254,9 @@ mod self_contained_call { .execute_with(|| { let call = mock::RuntimeCall::System(frame_system::Call::remark { remark: b"Mischief Managed".to_vec() }); - // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark - let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C25807321EDFB2A3A850B43E24D2700532EF1F9CCB2475DFF4F62B634B0C58845F23C26396581145116224CEF7355137BEBBA8E277A9BE18E0596E7F9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33623832663037383031653632636437383966316233636333353936383236313436613163353136666165613766633633333263643362323563646666316331E1F1").unwrap(); - let signature = hex::decode("7B1FBDAC5A646259451329E9D57DD4C1D5AF5970F46232E893408001E762E9DB68E30E9E9D023229EAA290ACB6AFF1D527025161C7649DC61366C0574AC07A02").unwrap(); + // encoded call for: genesis_hash = 0x0, nonce = 0, max_block_number = 5, tip = 0, extrinsic = System::remark + let tx_bytes = hex::decode("5916969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C25807321EDFB2A3A850B43E24D2700532EF1F9CCB2475DFF4F62B634B0C58845F23C26396581145116224CEF7355137BEBBA8E277A9BE18E0596E7F9EA7C0965787472696E7369637D87303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303A303A353A303A33376635623466363237376431393362336134663037666135636538373239626137366235343735366238653066616539313531316264313830333032333265E1F1").unwrap(); + let signature = hex::decode("81D0291D0D4CBCD9152F882E09F339F35022617D3BD2178AD8900FD12D8BD1DF69AB9AAD58BA44EF8FC14FA8DB4203272FE24CF5135D25EA5F8492B538C99201").unwrap(); // fund the user with XRP (to pay for tx fees) let tx = XRPLTransaction::try_from(tx_bytes.as_bytes_ref()).unwrap(); @@ -307,7 +299,7 @@ mod self_contained_call { System::assert_last_event(mock::RuntimeEvent::System( frame_system::Event::ExtrinsicSuccess { dispatch_info: DispatchInfo { - weight: Weight::from_all(311_960_000), + weight: Weight::from_parts(396_839_240, 220_300_000), class: DispatchClass::Normal, pays_fee: Pays::Yes, }, diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index e23777b6f..045476b9f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -138,7 +138,7 @@ mod staking; use staking::OnChainAccuracy; -pub mod migrations; +mod migrations; mod weights; use precompile_utils::constants::FEE_PROXY_ADDRESS; diff --git a/runtime/src/tests/evm_tests.rs b/runtime/src/tests/evm_tests.rs index f43a95230..4e3957510 100644 --- a/runtime/src/tests/evm_tests.rs +++ b/runtime/src/tests/evm_tests.rs @@ -256,7 +256,7 @@ fn call_with_fee_preferences_futurepass_proxy_extrinsic() { RawOrigin::Signed(alice()).into(), payment_asset, alice(), - 20_000_000_000_000_000 + 10_000_000_000_000_000 )); // add liquidity to the dex, this will allow for exchange internally when the call is made From 31a3dd226cd278aab624e833a8c1275e35c53204 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:42:51 +1200 Subject: [PATCH 094/112] minor --- pallet/vortex/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallet/vortex/src/lib.rs b/pallet/vortex/src/lib.rs index 373bd417a..e751484b3 100644 --- a/pallet/vortex/src/lib.rs +++ b/pallet/vortex/src/lib.rs @@ -149,7 +149,7 @@ pub mod pallet { /// History depth #[pallet::constant] - type HistoryDepth: Get; //TODO: need to set to same value as pallet_staking + type HistoryDepth: Get; } #[pallet::pallet] From 48db351b278ab5e1db38aacd1fcb693375a1fbd4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:31:18 +1200 Subject: [PATCH 095/112] Updated MAXIMUM_BLOCK_WEIGHT to 1s. Cost files generated. (#849) --- e2e/test/Dex/TxCosts.md | 16 ++++++------- e2e/test/Futurepass/TxCosts.md | 20 ++++++++--------- e2e/test/MarketPlace/TxCosts.md | 40 ++++++++++++++++----------------- runtime/src/lib.rs | 10 ++++----- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index f1fc1db14..73d6e81ab 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -2,10 +2,10 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:-------------------------|:------------:|:--------------:|:-------------------------:| -| addLiquidity | 218051 | 113629 | 28025 | -| removeLiquidity | 185060 | 79676 | 23515 | -| swapExactTokensForTokens | 151389 | 60462 | 23510 | -| swapTokensForExactTokens | 151534 | 61539 | 25177 | +| addLiquidity | 217853 | 122103 | 28027 | +| removeLiquidity | 183441 | 86009 | 23350 | +| swapExactTokensForTokens | 150598 | 70507 | 23345 | +| swapTokensForExactTokens | 150743 | 71568 | 25012 | | quote | 23716 | 22377 | 0 | | getAmountOut | 26047 | 22447 | 0 | | getAmountsOut | 43843 | 42619 | 0 | @@ -16,7 +16,7 @@ | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:-------------------------|:---------------------:|:-----------------------:|:----------------------:| -| addLiquidity | 2971497 | 1665256 | 420375 | -| removeLiquidity | 2387833 | 1148259 | 352731 | -| swapExactTokensForTokens | 2198004 | 906885 | 352664 | -| swapTokensForExactTokens | 2200330 | 922277 | 377668 | +| addLiquidity | 2968616 | 1807995 | 420415 | +| removeLiquidity | 2365301 | 1260861 | 350263 | +| swapExactTokensForTokens | 2185298 | 985238 | 350186 | +| swapTokensForExactTokens | 2187623 | 1004110 | 375190 | diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index 711adb490..9e846c48c 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -2,19 +2,19 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:------------------------------|:------------:|:--------------:|:-------------------------:| -| create | 0 | 42795 | 19172 | -| registerDelegateWithSignature | 0 | 42933 | 34005 | -| unregisterDelegate | 0 | 38078 | 22338 | -| transferOwnership | 0 | 46431 | 22507 | -| proxyCall | 0 | 65694 | 24008 | +| create | 0 | 45155 | 19173 | +| registerDelegateWithSignature | 0 | 46072 | 34006 | +| unregisterDelegate | 0 | 43622 | 22339 | +| transferOwnership | 0 | 52086 | 22508 | +| proxyCall | 0 | 65694 | 24009 | ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------------------|:---------------------:|:-----------------------:|:----------------------:| -| create | 0 | 603255 | 287587 | -| registerDelegateWithSignature | 0 | 606405 | 510080 | -| unregisterDelegate | 0 | 570177 | 335078 | -| transferOwnership | 0 | 686378 | 337609 | -| proxyCall | 0 | 899654 | 360130 | +| create | 0 | 657200 | 287602 | +| registerDelegateWithSignature | 0 | 678157 | 510100 | +| unregisterDelegate | 0 | 622142 | 335093 | +| transferOwnership | 0 | 768256 | 337632 | +| proxyCall | 0 | 899654 | 360135 | diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index bbf42549f..aeb2a7062 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -2,29 +2,29 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:--------------------|:------------:|:--------------:|:-------------------------:| -| registerMarketplace | 0 | 31852 | 20003 | -| sellNft | 0 | 52474 | 27175 | -| auctionNft | 0 | 52664 | 23675 | -| makeSimpleOffer | 0 | 56998 | 28010 | -| buy | 0 | 46376 | 85174 | -| bid | 0 | 57868 | 687843 | -| cancelSale | 0 | 37001 | 18504 | -| updateFixedPrice | 0 | 28397 | 21168 | -| acceptOffer | 0 | 69853 | 17172 | -| cancelOffer | 0 | 52566 | 17168 | +| registerMarketplace | 0 | 32307 | 20003 | +| sellNft | 0 | 55445 | 27175 | +| auctionNft | 0 | 55709 | 23675 | +| makeSimpleOffer | 0 | 60972 | 28011 | +| buy | 0 | 50424 | 85174 | +| bid | 0 | 61632 | 687845 | +| cancelSale | 0 | 38090 | 18505 | +| updateFixedPrice | 0 | 29163 | 21169 | +| acceptOffer | 0 | 74959 | 17174 | +| cancelOffer | 0 | 56308 | 17169 | ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------------|:---------------------:|:-----------------------:|:----------------------:| -| registerMarketplace | 0 | 452340 | 300045 | -| sellNft | 0 | 776537 | 407628 | -| auctionNft | 0 | 780588 | 355127 | -| makeSimpleOffer | 0 | 948289 | 420154 | -| buy | 0 | 1685118 | 1277610 | -| bid | 0 | 10866246 | 10317659 | -| cancelSale | 0 | 550330 | 277571 | -| updateFixedPrice | 0 | 420702 | 317532 | -| acceptOffer | 0 | 973497 | 257587 | -| cancelOffer | 0 | 778402 | 257534 | +| registerMarketplace | 0 | 466921 | 300049 | +| sellNft | 0 | 816231 | 407639 | +| auctionNft | 0 | 821662 | 355139 | +| makeSimpleOffer | 0 | 1010831 | 420171 | +| buy | 0 | 1732808 | 1277623 | +| bid | 0 | 10924137 | 10317675 | +| cancelSale | 0 | 570522 | 277576 | +| updateFixedPrice | 0 | 436768 | 317537 | +| acceptOffer | 0 | 1064301 | 257612 | +| cancelOffer | 0 | 833923 | 257549 | diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 045476b9f..d49b9beab 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -190,10 +190,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); -//TODO - fix this -/// We allow for 2 seconds of compute with a 4 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), u64::MAX); +/// We allow for 1 seconds of compute with a 4 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, u64::MAX); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -1076,7 +1074,9 @@ impl pallet_evm_chain_id::Config for Runtime { /// Current approximation of the gas/s consumption considering /// EVM execution over compiled WASM (on 4.4Ghz CPU). /// Given the 500ms Weight, from which 75% only are used for transactions, -/// the total EVM execution gas limit is: GAS_PER_SECOND * 0.500 * 0.75 ~= 11_250_000. +// TODO: optimize for the correct value for block gas limit(i.e correct value for 11_250_000 * 2) or +// WEIGHT_PER_GAS +/// the total EVM execution gas limit is: GAS_PER_SECOND * 1 * 0.75 ~= 11_250_000 * 2. pub const GAS_PER_SECOND: u64 = 30_000_000; /// Approximate ratio of the amount of Weight per Gas. From 10096fd7d45175cd4265da7f1e6be0bae46cfc13 Mon Sep 17 00:00:00 2001 From: JasonTulp Date: Tue, 11 Jun 2024 15:57:19 +1200 Subject: [PATCH 096/112] =?UTF-8?q?Prettier=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- e2e/test/Dex/TxCosts.md | 5 ++--- e2e/test/ERC1155/TxCosts.md | 5 ++--- e2e/test/ERC20/TxCosts.md | 5 ++--- e2e/test/ERC721/TxCosts.md | 5 ++--- e2e/test/Futurepass/TxCosts.md | 5 ++--- e2e/test/MarketPlace/TxCosts.md | 5 ++--- e2e/test/XRPL.test.ts | 10 +++++----- 7 files changed, 17 insertions(+), 23 deletions(-) diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index 73d6e81ab..dad46e37d 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -1,7 +1,7 @@ ## Generated tx costs(Gas) for Dex Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:-------------------------|:------------:|:--------------:|:-------------------------:| +| :----------------------- | :----------: | :------------: | :-----------------------: | | addLiquidity | 217853 | 122103 | 28027 | | removeLiquidity | 183441 | 86009 | 23350 | | swapExactTokensForTokens | 150598 | 70507 | 23345 | @@ -11,11 +11,10 @@ | getAmountsOut | 43843 | 42619 | 0 | | getAmountsIn | 44058 | 42611 | 0 | - ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:-------------------------|:---------------------:|:-----------------------:|:----------------------:| +| :----------------------- | :-------------------: | :---------------------: | :--------------------: | | addLiquidity | 2968616 | 1807995 | 420415 | | removeLiquidity | 2365301 | 1260861 | 350263 | | swapExactTokensForTokens | 2185298 | 985238 | 350186 | diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index a77342e2b..2792d010c 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -1,7 +1,7 @@ ## Generated tx costs(Gas) for ERC1155 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:----------------------|:------------:|:--------------:|:-------------------------:| +| :-------------------- | :----------: | :------------: | :-----------------------: | | uri | 27560 | 22400 | 0 | | balanceOf | 25957 | 22433 | 0 | | balanceOfBatch | 32585 | 24106 | 0 | @@ -14,11 +14,10 @@ | burn | 32581 | 27608 | 20002 | | burnBatch | 38043 | 31828 | 23335 | - ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:----------------------|:---------------------:|:-----------------------:|:----------------------:| +| :-------------------- | :-------------------: | :---------------------: | :--------------------: | | safeTransferFrom | 880468 | 462181 | 350038 | | safeBatchTransferFrom | 728112 | 535973 | 400055 | | mint | 493954 | 464911 | 352545 | diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index 80c1bb628..22633816e 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -1,7 +1,7 @@ ## Generated tx costs(Gas) for ERC20 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:--------------|:------------:|:--------------:|:-------------------------:| +| :------------ | :----------: | :------------: | :-----------------------: | | totalSupply | 23717 | 22388 | 0 | | balanceOf | 25860 | 23974 | 0 | | allowance | 26064 | 23273 | 0 | @@ -12,11 +12,10 @@ | decimals | 22354 | 22388 | 0 | | symbol | 25945 | 22388 | 0 | - ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:--------------|:---------------------:|:-----------------------:|:----------------------:| +| :------------ | :-------------------: | :---------------------: | :--------------------: | | approval | 702835 | 396804 | 302557 | | transfer | 781323 | 622692 | 302592 | | transferFrom | 647164 | 760526 | 350114 | diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index d92947323..cf34e4679 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -1,7 +1,7 @@ ## Generated tx costs(Gas) for ERC721 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:------------------|:------------:|:--------------:|:-------------------------:| +| :---------------- | :----------: | :------------: | :-----------------------: | | balanceOf | 25895 | 23274 | 0 | | ownerOf | 25847 | 23242 | 0 | | getApproved | 27395 | 23242 | 0 | @@ -19,11 +19,10 @@ | transferOwnership | 29147 | 28498 | 19835 | | renounceOwnership | 30272 | 28372 | 19835 | - ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:------------------|:---------------------:|:-----------------------:|:----------------------:| +| :---------------- | :-------------------: | :---------------------: | :--------------------: | | mint | 791884 | 448454 | 260041 | | burn | 490684 | 533648 | 257553 | | approve | 739543 | 430633 | 357539 | diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index 9e846c48c..b3e62bf4f 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -1,18 +1,17 @@ ## Generated tx costs(Gas) for Futurepass Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:------------------------------|:------------:|:--------------:|:-------------------------:| +| :---------------------------- | :----------: | :------------: | :-----------------------: | | create | 0 | 45155 | 19173 | | registerDelegateWithSignature | 0 | 46072 | 34006 | | unregisterDelegate | 0 | 43622 | 22339 | | transferOwnership | 0 | 52086 | 22508 | | proxyCall | 0 | 65694 | 24009 | - ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:------------------------------|:---------------------:|:-----------------------:|:----------------------:| +| :---------------------------- | :-------------------: | :---------------------: | :--------------------: | | create | 0 | 657200 | 287602 | | registerDelegateWithSignature | 0 | 678157 | 510100 | | unregisterDelegate | 0 | 622142 | 335093 | diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index aeb2a7062..afe59c956 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -1,7 +1,7 @@ ## Generated tx costs(Gas) for Marketplace Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -|:--------------------|:------------:|:--------------:|:-------------------------:| +| :------------------ | :----------: | :------------: | :-----------------------: | | registerMarketplace | 0 | 32307 | 20003 | | sellNft | 0 | 55445 | 27175 | | auctionNft | 0 | 55709 | 23675 | @@ -13,11 +13,10 @@ | acceptOffer | 0 | 74959 | 17174 | | cancelOffer | 0 | 56308 | 17169 | - ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -|:--------------------|:---------------------:|:-----------------------:|:----------------------:| +| :------------------ | :-------------------: | :---------------------: | :--------------------: | | registerMarketplace | 0 | 466921 | 300049 | | sellNft | 0 | 816231 | 407639 | | auctionNft | 0 | 821662 | 355139 | diff --git a/e2e/test/XRPL.test.ts b/e2e/test/XRPL.test.ts index 5720a0137..fc71eb5e5 100644 --- a/e2e/test/XRPL.test.ts +++ b/e2e/test/XRPL.test.ts @@ -88,11 +88,11 @@ describe("XRPL pallet", () => { const signerInstance = AccountLib.derive.privatekey(importedAccount.keypair.privateKey!); const publicKey = computePublicKey(`0x${signerInstance.keypair.publicKey!}`, true); const eoa = Web3.utils.toChecksumAddress( - // remove "ED" prefix from public key to compute EOA - // keccak hash produces 32 bytes (64 chars) - take last 20 bytes (40 chars) - // remove "0x" prefix from keccak hash output (2 chars) - // get last 20 bytes of the keccak hash output (12 bytes - 24 chars) - "0x" + keccak256(hexToU8a(`0x${publicKey.slice(4)}`)).slice(26), + // remove "ED" prefix from public key to compute EOA + // keccak hash produces 32 bytes (64 chars) - take last 20 bytes (40 chars) + // remove "0x" prefix from keccak hash output (2 chars) + // get last 20 bytes of the keccak hash output (12 bytes - 24 chars) + "0x" + keccak256(hexToU8a(`0x${publicKey.slice(4)}`)).slice(26), ); await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, eoa, 2_000_000)); From 2ac55ff0cf7fa1c508a3a8f6ce00536a7aff81a9 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:56:10 +1200 Subject: [PATCH 097/112] Bump seed-client to 8.0.0 --- Cargo.lock | 2 +- client/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f970660a8..f4705ef85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9025,7 +9025,7 @@ dependencies = [ [[package]] name = "seed-client" -version = "7.0.0" +version = "8.0.0" dependencies = [ "clap", "ethy-gadget", diff --git a/client/Cargo.toml b/client/Cargo.toml index 308d54742..37571c64b 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "seed-client" -version = "7.0.0" +version = "8.0.0" authors = ["The Root Network Team"] edition = "2021" publish = false From ea074faa46e3f87e89d48c8dfb9a6657d41ec8a1 Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:56:46 +1200 Subject: [PATCH 098/112] Add disable-eth-p2p flag to cli (#852) * Add disable-eth-p2p flag to cli * Remove TODO * Rename to eth_p2p and add default as true * Simplify clap rules * Rename flag to ethy_p2p --- client/src/cli.rs | 11 +++++++++++ client/src/service.rs | 46 +++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/client/src/cli.rs b/client/src/cli.rs index cb91e1d4c..2956de1fd 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -14,6 +14,7 @@ // You may obtain a copy of the License at the root of this project source code use crate::custom_commands::VerifyProofSigSubCommand; +use clap::ArgAction; #[allow(missing_docs)] #[derive(Debug, clap::Parser)] @@ -39,6 +40,16 @@ pub struct RunCmd { // NOTE - check flags works as expected. #[clap(long = "xrp-http")] pub xrp_http: Option, + + /// Option to disable the ethy p2p protocol + /// p2p protocol is enabled by default + #[clap( + long = "ethy-p2p", + default_missing_value("true"), + default_value("true"), + action = ArgAction::Set, + )] + pub ethy_p2p: bool, } #[derive(Debug, clap::Parser)] diff --git a/client/src/service.rs b/client/src/service.rs index 682e0f99e..84a6b8376 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -303,11 +303,13 @@ pub fn new_full(config: Configuration, cli: &Cli) -> Result Result(ethy_params), - ); + // Start the ETHY bridge gadget. + task_manager.spawn_essential_handle().spawn_blocking( + "ethy-gadget", + None, + ethy_gadget::start_ethy_gadget::<_, _, _, _, _, _>(ethy_params), + ); + } let grandpa_config = sc_consensus_grandpa::Config { gossip_duration: Duration::from_millis(333), From 6cfe6cdd366f6155e8823343fba4a95e4a698b01 Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 18 Jun 2024 18:22:09 +1200 Subject: [PATCH 099/112] Cargo workspace dependency migration (#851) * futurepass_registrat -> futurepass-registrat dir * pallet_vertex -> pallet_vortex_distribution * pallet-vortex -> pallet-vortex-distribution * updated root cargo.toml with workspace features and all deps * client crate cargo workspace support * ethy-gadget crate cargo workspace support * ethy-gadget-rpc crate cargo workspace support * evm-precompile crates cargo workspace support * evm-precompile macro utils updates due to updated sha3 dep * pallet crates cargo workspace support * pallet rpc crates cargo workspace support * pallet rpc runtime-api crates cargo workspace support * seed-primitives crate cargo workspace support * seed-runtime-constants crate cargo workspace support * seed-runtime crate cargo workspace support * updated CI to test all crates and all features * updated Cargo.lock file * updated readme file * ethy-gadget added back original authors * seed-runtime default features false all dev deps * removed redundant dependency primitive-types --- .github/workflows/ci.yml | 4 +- Cargo.lock | 175 +++--------- Cargo.toml | 248 ++++++++++++++++++ README.md | 4 +- client/Cargo.toml | 142 +++++----- ethy-gadget/Cargo.toml | 87 +++--- ethy-gadget/rpc/Cargo.toml | 38 +-- evm-precompiles/dex/Cargo.toml | 32 +-- evm-precompiles/erc1155/Cargo.toml | 40 +-- evm-precompiles/erc20/Cargo.toml | 40 +-- evm-precompiles/erc721/Cargo.toml | 38 +-- .../futurepass-registrar/Cargo.toml | 44 ++++ .../README.md | 0 .../src/lib.rs | 0 evm-precompiles/futurepass/Cargo.toml | 32 +-- .../futurepass_registrar/Cargo.toml | 44 ---- evm-precompiles/marketplace/Cargo.toml | 32 +-- evm-precompiles/nft/Cargo.toml | 30 +-- evm-precompiles/peg/Cargo.toml | 32 +-- evm-precompiles/sft/Cargo.toml | 30 +-- evm-precompiles/utils/Cargo.toml | 36 +-- evm-precompiles/utils/macro/Cargo.toml | 12 +- evm-precompiles/utils/macro/src/lib.rs | 4 +- evm-precompiles/utils/macro/tests/tests.rs | 12 +- pallet/assets-ext/Cargo.toml | 40 +-- pallet/assets-ext/rpc/Cargo.toml | 33 +-- pallet/assets-ext/rpc/runtime-api/Cargo.toml | 19 +- pallet/common/Cargo.toml | 24 +- pallet/crowdsale/Cargo.toml | 40 +-- pallet/dex/Cargo.toml | 45 ++-- pallet/dex/rpc/Cargo.toml | 22 +- pallet/dex/rpc/runtime-api/Cargo.toml | 21 +- pallet/doughnut/Cargo.toml | 63 ++--- pallet/echo/Cargo.toml | 37 +-- pallet/erc20-peg/Cargo.toml | 45 ++-- pallet/ethy/Cargo.toml | 60 ++--- pallet/evm-chain-id/Cargo.toml | 39 ++- pallet/fee-control/Cargo.toml | 58 ++-- pallet/fee-proxy/Cargo.toml | 54 ++-- pallet/futurepass/Cargo.toml | 84 +++--- pallet/maintenance-mode/Cargo.toml | 56 ++-- pallet/marketplace/Cargo.toml | 71 +++-- pallet/nft-peg/Cargo.toml | 59 ++--- pallet/nft/Cargo.toml | 64 +++-- pallet/nft/rpc/Cargo.toml | 33 +-- pallet/nft/rpc/runtime-api/Cargo.toml | 23 +- pallet/sft/Cargo.toml | 62 +++-- pallet/sft/rpc/Cargo.toml | 33 +-- pallet/sft/rpc/runtime-api/Cargo.toml | 18 +- pallet/token-approvals/Cargo.toml | 40 ++- pallet/tx-fee-pot/Cargo.toml | 35 ++- pallet/vortex-distribution/Cargo.toml | 54 ++++ .../src/benchmarking.rs | 0 .../src/lib.rs | 0 .../src/mock.rs | 4 +- .../src/tests.rs | 0 .../src/weights.rs | 8 +- pallet/vortex/Cargo.toml | 56 ---- pallet/xls20/Cargo.toml | 39 ++- pallet/xrpl-bridge/Cargo.toml | 50 ++-- pallet/xrpl/Cargo.toml | 69 +++-- primitives/Cargo.toml | 47 ++-- runtime/Cargo.toml | 231 ++++++++-------- runtime/constants/Cargo.toml | 10 +- runtime/src/lib.rs | 8 +- runtime/src/weights/mod.rs | 2 +- ...ortex.rs => pallet_vortex_distribution.rs} | 10 +- 67 files changed, 1516 insertions(+), 1406 deletions(-) create mode 100644 evm-precompiles/futurepass-registrar/Cargo.toml rename evm-precompiles/{futurepass_registrar => futurepass-registrar}/README.md (100%) rename evm-precompiles/{futurepass_registrar => futurepass-registrar}/src/lib.rs (100%) delete mode 100644 evm-precompiles/futurepass_registrar/Cargo.toml create mode 100644 pallet/vortex-distribution/Cargo.toml rename pallet/{vortex => vortex-distribution}/src/benchmarking.rs (100%) rename pallet/{vortex => vortex-distribution}/src/lib.rs (100%) rename pallet/{vortex => vortex-distribution}/src/mock.rs (98%) rename pallet/{vortex => vortex-distribution}/src/tests.rs (100%) rename pallet/{vortex => vortex-distribution}/src/weights.rs (98%) delete mode 100644 pallet/vortex/Cargo.toml rename runtime/src/weights/{pallet_vortex.rs => pallet_vortex_distribution.rs} (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d3b81869..2be3708a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,11 @@ jobs: - name: Check run: | cargo -V - cargo check --release --all-features + cargo check --release --all --all-features - name: Test run: | cargo -V - cargo test --workspace --all-features + cargo test --all --all-features #- name: Benchmark (build only) # run: cargo check --features=runtime-benchmarks diff --git a/Cargo.lock b/Cargo.lock index f4705ef85..a493143ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -446,12 +446,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.1" @@ -1548,12 +1542,12 @@ dependencies = [ "clear_on_drop", "digest 0.10.7", "ed25519-dalek 1.0.1", - "libsecp256k1 0.7.1", + "libsecp256k1", "parity-scale-codec", "primitive-types 0.12.2", "schnorrkel 0.11.4", "serde", - "sha3 0.10.8", + "sha3", "trn-pact", ] @@ -1781,11 +1775,8 @@ checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ "ethereum-types 0.14.1", "hex", - "once_cell", - "regex", "serde", - "serde_json", - "sha3 0.10.8", + "sha3", "thiserror", "uint", ] @@ -1814,7 +1805,7 @@ dependencies = [ "fixed-hash 0.8.0", "impl-codec", "impl-rlp", - "impl-serde 0.4.0", + "impl-serde", "scale-info", "tiny-keccak", ] @@ -1834,7 +1825,7 @@ dependencies = [ "rlp-derive", "scale-info", "serde", - "sha3 0.10.8", + "sha3", "triehash", ] @@ -1852,7 +1843,7 @@ dependencies = [ "rlp", "scale-info", "serde", - "sha3 0.10.8", + "sha3", "triehash", ] @@ -1881,7 +1872,7 @@ dependencies = [ "fixed-hash 0.8.0", "impl-codec", "impl-rlp", - "impl-serde 0.4.0", + "impl-serde", "primitive-types 0.12.2", "scale-info", "uint", @@ -1896,7 +1887,7 @@ dependencies = [ "futures-timer", "hex", "hex-literal 0.3.4", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -1941,7 +1932,7 @@ dependencies = [ "ethy-gadget", "futures", "jsonrpsee", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "parity-scale-codec", "rustc-hex", @@ -2001,7 +1992,7 @@ dependencies = [ "rlp", "scale-info", "serde", - "sha3 0.10.8", + "sha3", ] [[package]] @@ -2021,7 +2012,7 @@ dependencies = [ "rlp", "scale-info", "serde", - "sha3 0.10.8", + "sha3", ] [[package]] @@ -2080,7 +2071,7 @@ dependencies = [ "environmental", "evm-core 0.36.0", "primitive-types 0.11.1", - "sha3 0.10.8", + "sha3", ] [[package]] @@ -2092,7 +2083,7 @@ dependencies = [ "environmental", "evm-core 0.39.0", "primitive-types 0.12.2", - "sha3 0.10.8", + "sha3", ] [[package]] @@ -2223,7 +2214,7 @@ dependencies = [ "futures", "hex", "jsonrpsee", - "libsecp256k1 0.7.1", + "libsecp256k1", "log", "pallet-evm", "parity-scale-codec", @@ -2458,8 +2449,8 @@ version = "1.0.0-dev" source = "git+https://github.com/futureversecom/frontier?branch=polkadot-v1.0.0-TRN#50660c0741fad8c76f68a20ec6fc7f9c5727715c" dependencies = [ "hex", - "impl-serde 0.4.0", - "libsecp256k1 0.7.1", + "impl-serde", + "libsecp256k1", "log", "parity-scale-codec", "scale-info", @@ -3488,15 +3479,6 @@ dependencies = [ "rlp", ] -[[package]] -name = "impl-serde" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" -dependencies = [ - "serde", -] - [[package]] name = "impl-serde" version = "0.4.0" @@ -4312,25 +4294,6 @@ dependencies = [ "tikv-jemalloc-sys", ] -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core 0.2.2", - "libsecp256k1-gen-ecmult 0.2.1", - "libsecp256k1-gen-genmult 0.2.1", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - [[package]] name = "libsecp256k1" version = "0.7.1" @@ -4341,26 +4304,15 @@ dependencies = [ "base64 0.13.1", "digest 0.9.0", "hmac-drbg", - "libsecp256k1-core 0.3.0", - "libsecp256k1-gen-ecmult 0.3.0", - "libsecp256k1-gen-genmult 0.3.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", ] -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - [[package]] name = "libsecp256k1-core" version = "0.3.0" @@ -4372,31 +4324,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core 0.2.2", -] - [[package]] name = "libsecp256k1-gen-ecmult" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" dependencies = [ - "libsecp256k1-core 0.3.0", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core 0.2.2", + "libsecp256k1-core", ] [[package]] @@ -4405,7 +4339,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" dependencies = [ - "libsecp256k1-core 0.3.0", + "libsecp256k1-core", ] [[package]] @@ -4785,7 +4719,7 @@ dependencies = [ "digest 0.10.7", "multihash-derive", "sha2 0.10.8", - "sha3 0.10.8", + "sha3", "unsigned-varint", ] @@ -5564,7 +5498,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -5603,7 +5536,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex", "hex-literal 0.3.4", "pallet-assets", "pallet-assets-ext", @@ -5661,7 +5593,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "seed-pallet-common", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -5987,7 +5918,6 @@ dependencies = [ "seed-pallet-common", "seed-primitives", "seed-runtime", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -6080,8 +6010,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", - "serde_json", "sp-core", "sp-io", "sp-runtime", @@ -6111,7 +6039,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex", "log", "pallet-assets", "pallet-assets-ext", @@ -6124,8 +6051,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", - "serde_json", "sp-core", "sp-io", "sp-runtime", @@ -6150,7 +6075,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -6342,8 +6266,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", - "serde_json", "sp-core", "sp-io", "sp-runtime", @@ -6455,7 +6377,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", "pallet-assets", "pallet-assets-ext", "pallet-balances", @@ -6464,7 +6385,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -6551,7 +6471,7 @@ dependencies = [ ] [[package]] -name = "pallet-vortex" +name = "pallet-vortex-distribution" version = "2.1.0" dependencies = [ "frame-benchmarking", @@ -6570,7 +6490,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", "sp-core", "sp-io", "sp-runtime", @@ -6609,7 +6528,7 @@ dependencies = [ "frame-support", "frame-system", "hex", - "libsecp256k1 0.7.1", + "libsecp256k1", "log", "pallet-assets", "pallet-assets-ext", @@ -6649,7 +6568,6 @@ dependencies = [ "scale-info", "seed-pallet-common", "seed-primitives", - "serde", "sp-core", "sp-io", "sp-keystore", @@ -7010,7 +6928,7 @@ dependencies = [ "pallet-evm", "parity-scale-codec", "precompile-utils-macro", - "sha3 0.10.8", + "sha3", "similar-asserts", "sp-core", "sp-io", @@ -7024,8 +6942,9 @@ dependencies = [ "num_enum 0.5.11", "proc-macro2", "quote", - "sha3 0.8.2", + "sha3", "syn 1.0.109", + "typenum", ] [[package]] @@ -7087,7 +7006,6 @@ dependencies = [ "fixed-hash 0.7.0", "impl-codec", "impl-rlp", - "impl-serde 0.3.2", "scale-info", "uint", ] @@ -7101,7 +7019,7 @@ dependencies = [ "fixed-hash 0.8.0", "impl-codec", "impl-rlp", - "impl-serde 0.4.0", + "impl-serde", "scale-info", "uint", ] @@ -9046,7 +8964,7 @@ dependencies = [ "hex", "hex-literal 0.3.4", "jsonrpsee", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "pallet-assets-ext-rpc", "pallet-dex-rpc", @@ -9120,8 +9038,8 @@ dependencies = [ "frame-system", "hex", "hex-literal 0.3.4", - "impl-serde 0.4.0", - "libsecp256k1 0.7.1", + "impl-serde", + "libsecp256k1", "log", "pallet-assets", "pallet-balances", @@ -9226,20 +9144,18 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-tx-fee-pot", "pallet-utility", - "pallet-vortex", + "pallet-vortex-distribution", "pallet-xls20", "pallet-xrpl", "pallet-xrpl-bridge", "parity-scale-codec", "precompile-utils", - "primitive-types 0.11.1", "rustc-hex", "scale-info", "seed-client", "seed-pallet-common", "seed-primitives", "seed-runtime-constants", - "serde", "sp-api", "sp-block-builder", "sp-consensus-babe", @@ -9393,19 +9309,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -dependencies = [ - "block-buffer 0.7.3", - "byte-tools", - "digest 0.8.1", - "keccak", - "opaque-debug 0.2.3", -] - [[package]] name = "sha3" version = "0.10.8" @@ -9763,9 +9666,9 @@ dependencies = [ "futures", "hash-db 0.16.0", "hash256-std-hasher", - "impl-serde 0.4.0", + "impl-serde", "lazy_static", - "libsecp256k1 0.7.1", + "libsecp256k1", "log", "merlin 2.0.1", "parity-scale-codec", @@ -9802,7 +9705,7 @@ dependencies = [ "byteorder", "digest 0.10.7", "sha2 0.10.8", - "sha3 0.10.8", + "sha3", "twox-hash", ] @@ -9868,7 +9771,7 @@ dependencies = [ "bytes", "ed25519 1.5.3", "ed25519-dalek 1.0.1", - "libsecp256k1 0.7.1", + "libsecp256k1", "log", "parity-scale-codec", "rustversion", @@ -10101,7 +10004,7 @@ name = "sp-storage" version = "13.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-serde 0.4.0", + "impl-serde", "parity-scale-codec", "ref-cast", "serde", @@ -10186,7 +10089,7 @@ name = "sp-version" version = "22.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "impl-serde 0.4.0", + "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", @@ -12223,7 +12126,7 @@ dependencies = [ "bytes", "hashbrown 0.14.3", "hex", - "libsecp256k1 0.7.1", + "libsecp256k1", "serde_json", "sha2 0.10.8", "spin 0.9.8", diff --git a/Cargo.toml b/Cargo.toml index ce693dbfa..9c37d9cdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,23 @@ members = [ "ethy-gadget", "evm-precompiles/*" ] +default-members = ["client"] + +# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021 +# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html resolver = "2" +[workspace.package] +version = "0.1.0" +edition = "2021" +authors = ["The Root Network Team"] +rust-version = "1.71" +publish = false +license = "Apache-2.0" +homepage = "https://www.futureverse.com/" +repository = "https://github.com/futureversecom/trn-seed" +exclude = [".github/", "chain-spec/", "e2e/", "dockerimages/", "scripts/", "ci-scripts/"] + [profile.release] panic = "unwind" opt-level = 3 @@ -80,3 +95,236 @@ uint = { opt-level = 3 } x25519-dalek = { opt-level = 3 } yamux = { opt-level = 3 } zeroize = { opt-level = 3 } + +[workspace.dependencies] +# trn-seed deps +seed-client = { path = "client", default-features = false } +ethy-gadget = { path = "ethy-gadget", default-features = false } +ethy-gadget-rpc = { path = "ethy-gadget/rpc", default-features = false } +seed-primitives = { path = "primitives", default-features = false } +seed-runtime = { path = "runtime", default-features = false } +seed-runtime-constants = { path = "runtime/constants", default-features = false } +## pallets +pallet-assets-ext = { path = "pallet/assets-ext", default-features = false } +pallet-assets-ext-rpc = { path = "pallet/assets-ext/rpc", default-features = false } +pallet-assets-ext-rpc-runtime-api = { path = "pallet/assets-ext/rpc/runtime-api", default-features = false } +seed-pallet-common = { path = "pallet/common", default-features = false } +pallet-crowdsale = { path = "pallet/crowdsale", default-features = false } +pallet-dex = { path = "pallet/dex", default-features = false } +pallet-dex-rpc = { path = "pallet/dex/rpc", default-features = false } +pallet-dex-rpc-runtime-api = { path = "pallet/dex/rpc/runtime-api", default-features = false } +pallet-doughnut = { path = "pallet/doughnut", default-features = false } +pallet-echo = { path = "pallet/echo", default-features = false } +pallet-erc20-peg = { path = "pallet/erc20-peg", default-features = false } +pallet-ethy = { path = "pallet/ethy", default-features = false } +pallet-evm-chain-id = { path = "pallet/evm-chain-id", default-features = false } +pallet-fee-control = { path = "pallet/fee-control", default-features = false } +pallet-fee-proxy = { path = "pallet/fee-proxy", default-features = false } +pallet-futurepass = { path = "pallet/futurepass", default-features = false } +pallet-maintenance-mode = { path = "pallet/maintenance-mode", default-features = false } +pallet-marketplace = { path = "pallet/marketplace", default-features = false } +pallet-nft = { path = "pallet/nft", default-features = false } +pallet-nft-rpc = { path = "pallet/nft/rpc", default-features = false } +pallet-nft-rpc-runtime-api = { path = "pallet/nft/rpc/runtime-api", default-features = false } +pallet-nft-peg = { path = "pallet/nft-peg", default-features = false } +pallet-sft = { path = "pallet/sft", default-features = false } +pallet-sft-rpc = { path = "pallet/sft/rpc", default-features = false } +pallet-sft-rpc-runtime-api = { path = "pallet/sft/rpc/runtime-api", default-features = false } +pallet-token-approvals = { path = "pallet/token-approvals", default-features = false } +pallet-tx-fee-pot = { path = "pallet/tx-fee-pot", default-features = false } +pallet-vortex-distribution = { path = "pallet/vortex-distribution", default-features = false } +pallet-xls20 = { path = "pallet/xls20", default-features = false } +pallet-xrpl = { path = "pallet/xrpl", default-features = false } +pallet-xrpl-bridge = { path = "pallet/xrpl-bridge", default-features = false } +## evm precompiles +pallet-evm-precompiles-dex = { path = "evm-precompiles/dex", default-features = false } +pallet-evm-precompiles-erc20 = { path = "evm-precompiles/erc20", default-features = false } +pallet-evm-precompiles-erc721 = { path = "evm-precompiles/erc721", default-features = false } +pallet-evm-precompiles-erc1155 = { path = "evm-precompiles/erc1155", default-features = false } +pallet-evm-precompiles-futurepass = { path = "evm-precompiles/futurepass", default-features = false } +pallet-evm-precompiles-futurepass-registrar = { path = "evm-precompiles/futurepass-registrar", default-features = false } +pallet-evm-precompiles-marketplace = { path = "evm-precompiles/marketplace", default-features = false } +pallet-evm-precompiles-nft = { path = "evm-precompiles/nft", default-features = false } +pallet-evm-precompiles-peg = { path = "evm-precompiles/peg", default-features = false } +pallet-evm-precompiles-sft = { path = "evm-precompiles/sft", default-features = false } +precompile-utils = { path = "evm-precompiles/utils", default-features = false } +precompile-utils-macro = { path = "evm-precompiles/utils/macro", default-features = false } + +# substrate deps +fork-tree = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-election-provider-solution-type = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support-procedural = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support-procedural-tools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support-procedural-tools-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +ry-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-allocator = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-chain-spec-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-informant = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-bitswap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-light = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-transactions = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-proposer-metrics = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-rpc-server = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-rpc-spec-v2 = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-state-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-tracing-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-api-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core-hashing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-core-hashing-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-database = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-debug-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-metadata-ir = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-panic-handler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-statement-store = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-version-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } + +# frontier deps +fc-consensus = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fc-db = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fc-mapping-sync = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fc-rpc = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fc-rpc-core = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fc-storage = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-account = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-consensus = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-ethereum = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-rpc = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +fp-storage = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-base-fee = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-ethereum = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", default-features = false } + +# misc. deps +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +evm = { version = "0.36.0", default-features = false } +ethabi = { version = "18.0.0", default-features = false } +ethereum-types = { version = "0.14.1", default-features = false } +doughnut-rs = { version = "0.2.2", default-features = false } +futures = { version = "0.3.25", default-features = false } +hex = { version = "0.4.3", default-features= false } +hex-literal = { version = "0.3.4", default-features = false } +impl-trait-for-tuples = { version = "0.2.2", default-features = false } +jsonrpsee = { version = "0.16.3", default-features = false } +libsecp256k1 = { version = "0.7", default-features = false } +log = { version = "0.4.17", default-features = false } +num_enum = { version = "0.5.3", default-features = false } +parking_lot = { version = "0.12.1", default-features = false } +rustc-hex = { version = "2.1.0", default-features = false } +scale-info = { version = "2.3.0", default-features = false } +serde = { version = "1.0.145", default-features = false } +serde_json = { version = "1.0.87", default-features = false } +sha2 = { version = "0.10", default-features = false } +sha3 = { version = "0.10", default-features = false } +thiserror = { version = "1.0", default-features = false } +tokio = { version = "1.19.2", default-features = false } +xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2", default-features = false } diff --git a/README.md b/README.md index 357392343..a56adf55b 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ rustup show ### Run Unit Tests ```bash -cargo test +cargo test --all --all-features ``` ### Run E2E Tests @@ -87,7 +87,7 @@ Refer to the instruction [here](./e2e) ### Formatting & Linting ``` -cargo fmt +cargo fmt --all ``` ### Benchmarks diff --git a/client/Cargo.toml b/client/Cargo.toml index 37571c64b..d4d8567a7 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "seed-client" version = "8.0.0" -authors = ["The Root Network Team"] -edition = "2021" -publish = false -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +publish.workspace = true +repository.workspace = true build = "build.rs" [package.metadata.docs.rs] @@ -18,85 +18,85 @@ name = "seed" path = "src/main.rs" [dependencies] -futures = "0.3.25" -clap = { version = "4.0.9", features = ["derive"] } -url = "2.3.1" -hex-literal = "0.3.4" -hex = "0.4" -libsecp256k1 = { version = "0.6.0" } -thiserror = "1.0" +clap = { version = "4.0.9", default-features = false, features = ["derive"] } +url = { version = "2.3.1", default-features = false } +futures = { workspace = true } +hex-literal = { workspace = true } +hex = { workspace = true } +libsecp256k1 = { workspace = true } +thiserror = { workspace = true } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate" , branch = "polkadot-v1.0.0" } -sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-cli = { workspace = true } +sp-core = { workspace = true } +sc-network = { workspace = true } +sc-network-sync = { workspace = true } +sc-executor = { workspace = true } +sc-service = { workspace = true } +sc-telemetry = { workspace = true } +sc-keystore = { workspace = true } +sc-transaction-pool = { workspace = true } +sc-transaction-pool-api = { workspace = true } +sc-consensus-babe = { workspace = true } +sc-consensus-babe-rpc = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-consensus = { workspace = true } +sc-consensus = { workspace = true } +sc-consensus-epochs = { workspace = true } +sc-consensus-grandpa = { workspace = true } +sc-consensus-grandpa-rpc = { workspace = true } +sp-consensus-grandpa = { workspace = true } +sc-client-api = { workspace = true } +sp-runtime = { workspace = true } +sp-timestamp = { workspace = true } +sp-inherents = { workspace = true } +sp-keyring = { workspace = true } +sp-keystore = { workspace = true } +sp-transaction-storage-proof = { workspace = true } +frame-system = { workspace = true } +pallet-transaction-payment = { workspace = true } +sc-offchain = { workspace = true } # Frontier -fc-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fc-db = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fc-mapping-sync = { default-features = false, features = ["sql"], git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fc-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = [ "rpc-binary-search-estimate" ] } -fc-rpc-core = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fp-consensus = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fp-storage = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fc-consensus = { workspace = true } +fc-db = { workspace = true } +fc-mapping-sync = { workspace = true, features = ["sql"] } +fc-rpc = { workspace = true, features = [ "rpc-binary-search-estimate" ] } +fc-rpc-core = { workspace = true } +fp-consensus = { workspace = true } +fp-rpc = { workspace = true } +fp-storage = { workspace = true } # These dependencies are used for the node template's RPCs -jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +jsonrpsee = { workspace = true } +sc-rpc = { workspace = true } +sp-api = { workspace = true } +sc-rpc-api = { workspace = true } +sp-blockchain = { workspace = true } +sp-block-builder = { workspace = true } +sc-basic-authorship = { workspace = true } +substrate-frame-rpc-system = { workspace = true } +pallet-transaction-payment-rpc = { workspace = true } # These dependencies are used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking = { workspace = true } +frame-benchmarking-cli = { workspace = true } # Local Dependencies -ethy-gadget = { path = "../ethy-gadget" } -ethy-gadget-rpc = { path = "../ethy-gadget/rpc" } -seed-primitives = { path = "../primitives" } -seed-runtime = { path = "../runtime" } -pallet-maintenance-mode = { path = "../pallet/maintenance-mode" } -pallet-dex-rpc = { path = "../pallet/dex/rpc" } -pallet-nft-rpc = { path = "../pallet/nft/rpc" } -pallet-sft-rpc = { path = "../pallet/sft/rpc" } -pallet-assets-ext-rpc = { path = "../pallet/assets-ext/rpc"} +ethy-gadget = { workspace = true, default-features = true } +ethy-gadget-rpc = { workspace = true, default-features = true } +seed-primitives = { workspace = true, default-features = true } +seed-runtime = { workspace = true, default-features = true } +pallet-maintenance-mode = { workspace = true, default-features = true } +pallet-dex-rpc = { workspace = true, default-features = true } +pallet-nft-rpc = { workspace = true, default-features = true } +pallet-sft-rpc = { workspace = true, default-features = true } +pallet-assets-ext-rpc = { workspace = true, default-features = true } # Diagnostics -log = "0.4.0" +log = { workspace = true } # Try Runtime -frame-try-runtime = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" } +frame-try-runtime = { workspace = true, optional = true } +try-runtime-cli = { workspace = true, optional = true } # CLI-specific dependencies diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index 9ad033379..5221c22d3 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -2,51 +2,52 @@ name = "ethy-gadget" version = "0.1.2" authors = ["Parity Technologies ", "The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +edition.workspace = true +license.workspace = true [dependencies] -ethabi = { version = "18.0.0" } -futures = "0.3.25" -futures-timer = "3.0.1" -hex = "0.4" -log = "0.4" -parking_lot = "0.12.1" -thiserror = "1.0" -codec = { version = "3.0.0", package = "parity-scale-codec", features = ["derive"] } -libsecp256k1 = { version = "0.6.0" } -prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", version = "0.10.0-dev"} -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +futures-timer = { version = "3.0.1", default-features = false } +parking_lot = { workspace = true } -seed-primitives = { path = "../primitives" } -xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2" } +ethabi = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +log = { workspace = true } +thiserror = { workspace = true } +codec = { workspace = true } +libsecp256k1 = { workspace = true } +prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", version = "0.10.0-dev", default-features = false } +sc-chain-spec = { workspace = true } +sc-client-api = { workspace = true } +sc-keystore = { workspace = true } +sc-network = { workspace = true } +sc-network-sync = { workspace = true } +sc-network-gossip = { workspace = true } +sc-utils = { workspace = true } +sp-api = { workspace = true } +sp-application-crypto = { workspace = true } +sp-arithmetic = { workspace = true } +sp-blockchain = { workspace = true } +sp-consensus = { workspace = true } +sp-core = { workspace = true } +sp-keystore = { workspace = true } +sp-runtime = { workspace = true } +sc-network-common = { workspace = true } + +seed-primitives = { workspace = true, default-features = true } +xrpl-codec = { workspace = true } [dev-dependencies] -hex-literal = "*" -serde = "1.0.136" -strum = { version = "0.24", features = ["derive"] } -tempfile = "3.1.0" -tokio = "1.17.0" -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +strum = { version = "0.24", default-features = false } +tempfile = { version = "3.1.0", default-features = false } +hex-literal = { workspace = true } +serde = { workspace = true } +tokio = { workspace = true } +sc-consensus = { workspace = true } +sc-service = { workspace = true } +sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-block-builder = { workspace = true } +sp-consensus-grandpa = { workspace = true } +sp-keyring = { workspace = true } +sp-tracing = { workspace = true } +substrate-test-runtime-client = { workspace = true } diff --git a/ethy-gadget/rpc/Cargo.toml b/ethy-gadget/rpc/Cargo.toml index ee2e8a7ac..3b14ec033 100644 --- a/ethy-gadget/rpc/Cargo.toml +++ b/ethy-gadget/rpc/Cargo.toml @@ -1,26 +1,26 @@ [package] name = "ethy-gadget-rpc" version = "0.1.0" -authors = ["Parity Technologies ", "The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", features = ["derive"] } -futures = { version = "0.3.24" } -jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } -libsecp256k1 = { version = "0.6.0" } -log = "0.4" -serde = { version = "1.0.145", features = ["derive"] } -serde_json = "1.0.64" -rustc-hex = { version = "2.1.0", default-features = false } +codec = { workspace = true } +futures = { workspace = true } +jsonrpsee = { workspace = true } +libsecp256k1 = { workspace = true } +log = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +rustc-hex = { workspace = true } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sc-client-api = { workspace = true } +sc-rpc = { workspace = true } +sc-utils = { workspace = true } +sp-api = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } -ethy-gadget = { path = "../." } -seed-primitives = { path = "../../primitives" } +ethy-gadget = { workspace = true } +seed-primitives = { workspace = true } diff --git a/evm-precompiles/dex/Cargo.toml b/evm-precompiles/dex/Cargo.toml index 720fd30cc..bc37fb0c0 100644 --- a/evm-precompiles/dex/Cargo.toml +++ b/evm-precompiles/dex/Cargo.toml @@ -1,30 +1,30 @@ [package] name = "pallet-evm-precompiles-dex" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -num_enum = { version = "0.5.3", default-features = false } +scale-info = { workspace = true } +num_enum = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +pallet-assets = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } # TRN -precompile-utils = { path = "../utils", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-dex = { path = "../../pallet/dex", default-features = false } +precompile-utils = { workspace = true } +seed-primitives = { workspace = true } +pallet-dex = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/erc1155/Cargo.toml b/evm-precompiles/erc1155/Cargo.toml index 0817d0dd3..484f4c700 100644 --- a/evm-precompiles/erc1155/Cargo.toml +++ b/evm-precompiles/erc1155/Cargo.toml @@ -1,33 +1,33 @@ [package] name = "pallet-evm-precompiles-erc1155" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2018" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -pallet-sft = { path = "../../pallet/sft", default-features = false } -pallet-nft = { path = "../../pallet/nft", default-features = false } -pallet-token-approvals = { path = "../../pallet/token-approvals", default-features = false } -seed-pallet-common = { path = "../../pallet/common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } +pallet-sft = { workspace = true } +pallet-nft = { workspace = true } +pallet-token-approvals = { workspace = true } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } +precompile-utils = { workspace = true } -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -precompile-utils = { path = "../utils", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -ethereum-types = { version = "0.14.1", default-features = false } +codec = { workspace = true } +num_enum = { workspace = true } +scale-info = { workspace = true } +ethereum-types = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/erc20/Cargo.toml b/evm-precompiles/erc20/Cargo.toml index 32bc919e3..223087353 100644 --- a/evm-precompiles/erc20/Cargo.toml +++ b/evm-precompiles/erc20/Cargo.toml @@ -1,39 +1,39 @@ [package] name = "pallet-evm-precompiles-erc20" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2018" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -pallet-assets-ext = { path = "../../pallet/assets-ext", default-features = false } -pallet-token-approvals = { path = "../../pallet/token-approvals", default-features = false } -seed-pallet-common = { path = "../../pallet/common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } +pallet-assets-ext = { workspace = true } +pallet-token-approvals = { workspace = true } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -precompile-utils = { path = "../utils", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +num_enum = { workspace = true } +precompile-utils = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-assets = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] std = [ "codec/std", "seed-primitives/std", - "scale-info/std", + "scale-info/std", "pallet-assets-ext/std", "pallet-assets/std", "pallet-token-approvals/std", diff --git a/evm-precompiles/erc721/Cargo.toml b/evm-precompiles/erc721/Cargo.toml index d504ab4ff..cf69ac8cd 100644 --- a/evm-precompiles/erc721/Cargo.toml +++ b/evm-precompiles/erc721/Cargo.toml @@ -1,32 +1,32 @@ [package] name = "pallet-evm-precompiles-erc721" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2018" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -pallet-nft = { path = "../../pallet/nft", default-features = false } -pallet-xls20 = { path = "../../pallet/xls20", default-features = false } -pallet-token-approvals = { path = "../../pallet/token-approvals", default-features = false } -seed-pallet-common = { path = "../../pallet/common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } +codec = { workspace = true } +num_enum = { workspace = true } +precompile-utils = { workspace = true } +scale-info = { workspace = true } -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -precompile-utils = { path = "../utils", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +pallet-nft = { workspace = true } +pallet-xls20 = { workspace = true } +pallet-token-approvals = { workspace = true } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/futurepass-registrar/Cargo.toml b/evm-precompiles/futurepass-registrar/Cargo.toml new file mode 100644 index 000000000..3bb9ae811 --- /dev/null +++ b/evm-precompiles/futurepass-registrar/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "pallet-evm-precompiles-futurepass-registrar" +version = "2.0.0" +authors.workspace = true +edition.workspace = true +repository.workspace = true + +[dependencies] +scale-info = { workspace = true } +precompile-utils = { workspace = true } +num_enum = { workspace = true } +seed-primitives = { workspace = true } +pallet-futurepass = { workspace = true } + +# Substrate +frame-system = { workspace = true } +frame-support = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +pallet-proxy = { workspace = true } + +# Frontier +fp-evm = { workspace = true } +pallet-evm = { workspace = true } + +[features] +default = ["std"] +std = [ + "scale-info/std", + "fp-evm/std", + "pallet-evm/std", + "frame-system/std", + "frame-support/std", + "num_enum/std", + "precompile-utils/std", + "sp-core/std", + "sp-runtime/std", + "sp-std/std", + "seed-primitives/std", + "pallet-futurepass/std", + "pallet-proxy/std", +] + diff --git a/evm-precompiles/futurepass_registrar/README.md b/evm-precompiles/futurepass-registrar/README.md similarity index 100% rename from evm-precompiles/futurepass_registrar/README.md rename to evm-precompiles/futurepass-registrar/README.md diff --git a/evm-precompiles/futurepass_registrar/src/lib.rs b/evm-precompiles/futurepass-registrar/src/lib.rs similarity index 100% rename from evm-precompiles/futurepass_registrar/src/lib.rs rename to evm-precompiles/futurepass-registrar/src/lib.rs diff --git a/evm-precompiles/futurepass/Cargo.toml b/evm-precompiles/futurepass/Cargo.toml index 0b5af8e68..48a120618 100644 --- a/evm-precompiles/futurepass/Cargo.toml +++ b/evm-precompiles/futurepass/Cargo.toml @@ -1,28 +1,28 @@ [package] name = "pallet-evm-precompiles-futurepass" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/cennznet/cennznet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -precompile-utils = { path = "../utils", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-futurepass = { path = "../../pallet/futurepass", default-features = false } +scale-info = { workspace = true } +precompile-utils = { workspace = true } +num_enum = { workspace = true } +seed-primitives = { workspace = true } +pallet-futurepass = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +pallet-proxy = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/futurepass_registrar/Cargo.toml b/evm-precompiles/futurepass_registrar/Cargo.toml deleted file mode 100644 index 0157d06e2..000000000 --- a/evm-precompiles/futurepass_registrar/Cargo.toml +++ /dev/null @@ -1,44 +0,0 @@ -[package] -name = "pallet-evm-precompiles-futurepass-registrar" -version = "2.0.0" -authors = ["Centrality Developers "] -edition = "2021" -repository = "https://github.com/cennznet/cennznet" - -[dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -precompile-utils = { path = "../utils", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-futurepass = { path = "../../pallet/futurepass", default-features = false } - -# Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } - -# Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } - -[features] -default = ["std"] -std = [ - "scale-info/std", - "fp-evm/std", - "pallet-evm/std", - "frame-system/std", - "frame-support/std", - "num_enum/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", - "seed-primitives/std", - "pallet-futurepass/std", - "pallet-proxy/std", -] - diff --git a/evm-precompiles/marketplace/Cargo.toml b/evm-precompiles/marketplace/Cargo.toml index c892b3b3c..c3f575dd8 100644 --- a/evm-precompiles/marketplace/Cargo.toml +++ b/evm-precompiles/marketplace/Cargo.toml @@ -1,30 +1,30 @@ [package] name = "pallet-evm-precompiles-marketplace" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -num_enum = { version = "0.5.3", default-features = false } +scale-info = { workspace = true } +num_enum = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +pallet-assets = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } # TRN -precompile-utils = { path = "../utils", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-marketplace = { path = "../../pallet/marketplace", default-features = false } +precompile-utils = { workspace = true } +seed-primitives = { workspace = true } +pallet-marketplace = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/nft/Cargo.toml b/evm-precompiles/nft/Cargo.toml index 40071d43c..de189c43c 100644 --- a/evm-precompiles/nft/Cargo.toml +++ b/evm-precompiles/nft/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "pallet-evm-precompiles-nft" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/cennznet/cennznet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -precompile-utils = { path = "../utils", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-nft = { path = "../../pallet/nft", default-features = false } +scale-info = { workspace = true } +precompile-utils = { workspace = true } +num_enum = { workspace = true } +seed-primitives = { workspace = true } +pallet-nft = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/peg/Cargo.toml b/evm-precompiles/peg/Cargo.toml index 99519a895..846ae9287 100644 --- a/evm-precompiles/peg/Cargo.toml +++ b/evm-precompiles/peg/Cargo.toml @@ -1,28 +1,28 @@ [package] name = "pallet-evm-precompiles-peg" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/cennznet/cennznet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -precompile-utils = { path = "../utils", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-nft-peg = { path = "../../pallet/nft-peg", default-features = false } -pallet-erc20-peg = { path = "../../pallet/erc20-peg", default-features = false } +scale-info = { workspace = true } +precompile-utils = { workspace = true } +num_enum = { workspace = true } +seed-primitives = { workspace = true } +pallet-nft-peg = { workspace = true } +pallet-erc20-peg = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/sft/Cargo.toml b/evm-precompiles/sft/Cargo.toml index f466883d1..6e5d105ca 100644 --- a/evm-precompiles/sft/Cargo.toml +++ b/evm-precompiles/sft/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "pallet-evm-precompiles-sft" version = "2.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/cennznet/cennznet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -precompile-utils = { path = "../utils", default-features = false } -num_enum = { version = "0.5.3", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -pallet-sft = { path = "../../pallet/sft", default-features = false } +scale-info = { workspace = true } +precompile-utils = { workspace = true } +num_enum = { workspace = true } +seed-primitives = { workspace = true } +pallet-sft = { workspace = true } # Substrate -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system = { workspace = true } +frame-support = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } # Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [features] default = ["std"] diff --git a/evm-precompiles/utils/Cargo.toml b/evm-precompiles/utils/Cargo.toml index 1d2812636..d9797a253 100644 --- a/evm-precompiles/utils/Cargo.toml +++ b/evm-precompiles/utils/Cargo.toml @@ -1,37 +1,37 @@ [package] name = "precompile-utils" -authors = ["The Root Network Team"] description = "Utils to write EVM precompiles." -edition = "2021" version = "0.1.0" +authors.workspace = true +edition.workspace = true [dependencies] affix = "0.1.2" -hex = { version = "0.4.3", default-features = false } -impl-trait-for-tuples = "0.2.2" -log = "0.4" -num_enum = { version = "0.5.3", default-features = false } -sha3 = { version = "0.10", default-features = false } similar-asserts = { version = "1.1.0", optional = true } +impl-trait-for-tuples = { workspace = true } +hex = { workspace = true } +log = { workspace = true } +num_enum = { workspace = true } +sha3 = { workspace = true } # Moonbeam -precompile-utils-macro = { path = "macro" } +precompile-utils-macro = { workspace = true } # Substrate -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } +codec = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-std = { workspace = true } # Frontier -evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +evm = { workspace = true } +fp-evm = { workspace = true } +pallet-evm = { workspace = true } [dev-dependencies] -hex-literal = "0.3.4" +hex-literal = { workspace = true } [features] default = [ "std" ] diff --git a/evm-precompiles/utils/macro/Cargo.toml b/evm-precompiles/utils/macro/Cargo.toml index 6aa32a719..7477a55f8 100644 --- a/evm-precompiles/utils/macro/Cargo.toml +++ b/evm-precompiles/utils/macro/Cargo.toml @@ -1,9 +1,8 @@ [package] name = "precompile-utils-macro" -authors = ["The Root Network Team"] -description = "" -edition = "2021" version = "0.1.0" +authors.workspace = true +edition.workspace = true [lib] proc-macro = true @@ -13,8 +12,11 @@ name = "tests" path = "tests/tests.rs" [dependencies] -num_enum = { version = "0.5.3", default-features = false } +num_enum = { workspace = true } proc-macro2 = "1.0" quote = "1.0" -sha3 = "0.8" +sha3 = { workspace = true } syn = { version = "1.0", features = [ "extra-traits", "fold", "full", "visit" ] } + +[dev-dependencies] +typenum = { version = "1.17.0", default-features = false } diff --git a/evm-precompiles/utils/macro/src/lib.rs b/evm-precompiles/utils/macro/src/lib.rs index eb5234a6c..3d5cca459 100644 --- a/evm-precompiles/utils/macro/src/lib.rs +++ b/evm-precompiles/utils/macro/src/lib.rs @@ -43,7 +43,7 @@ impl ::std::fmt::Debug for Bytes { pub fn keccak256(input: TokenStream) -> TokenStream { let lit_str = parse_macro_input!(input as LitStr); - let hash = Keccak256::digest(lit_str.value().as_ref()); + let hash = Keccak256::digest(lit_str.value().as_bytes()); let bytes = Bytes(hash.to_vec()); let eval_str = format!("{:?}", bytes); @@ -89,7 +89,7 @@ pub fn generate_function_selector(_: TokenStream, input: TokenStream) -> TokenSt match variant.discriminant { Some((_, Expr::Lit(ExprLit { lit, .. }))) => if let Lit::Str(lit_str) = lit { - let digest = Keccak256::digest(lit_str.value().as_ref()); + let digest = Keccak256::digest(lit_str.value().as_bytes()); let selector = u32::from_be_bytes([digest[0], digest[1], digest[2], digest[3]]); ident_expressions.push(variant.ident); variant_expressions.push(Expr::Lit(ExprLit { diff --git a/evm-precompiles/utils/macro/tests/tests.rs b/evm-precompiles/utils/macro/tests/tests.rs index d9bd56252..4a58d4c97 100644 --- a/evm-precompiles/utils/macro/tests/tests.rs +++ b/evm-precompiles/utils/macro/tests/tests.rs @@ -11,7 +11,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use sha3::{Digest, Keccak256}; +use sha3::{digest::generic_array::GenericArray, Digest, Keccak256}; +use typenum::U32; #[precompile_utils_macro::generate_function_selector] pub enum Action { @@ -21,14 +22,17 @@ pub enum Action { #[test] fn test_keccak256() { - assert_eq!(&precompile_utils_macro::keccak256!(""), Keccak256::digest(b"").as_ref(),); + assert_eq!( + &precompile_utils_macro::keccak256!(""), + as AsRef<[u8]>>::as_ref(&Keccak256::digest(b"")), + ); assert_eq!( &precompile_utils_macro::keccak256!("toto()"), - Keccak256::digest(b"toto()").as_ref(), + as AsRef<[u8]>>::as_ref(&Keccak256::digest(b"toto()")), ); assert_ne!( &precompile_utils_macro::keccak256!("toto()"), - Keccak256::digest(b"tata()").as_ref(), + as AsRef<[u8]>>::as_ref(&Keccak256::digest(b"tata()")), ); } diff --git a/pallet/assets-ext/Cargo.toml b/pallet/assets-ext/Cargo.toml index 618b86a27..a9f7124c0 100644 --- a/pallet/assets-ext/Cargo.toml +++ b/pallet/assets-ext/Cargo.toml @@ -1,37 +1,37 @@ [package] name = "pallet-assets-ext" version = "1.0.1" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Extended functionality for pallet-assets" +authors.workspace = true +edition.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } +precompile-utils = { workspace = true } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-fee-control = { path = "../fee-control" } +sp-core = { workspace = true } +sp-io = { workspace = true } +pallet-evm = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-fee-control = { workspace = true } [features] default = ["std"] diff --git a/pallet/assets-ext/rpc/Cargo.toml b/pallet/assets-ext/rpc/Cargo.toml index 06f85c0f5..8673afc38 100644 --- a/pallet/assets-ext/rpc/Cargo.toml +++ b/pallet/assets-ext/rpc/Cargo.toml @@ -2,23 +2,24 @@ [package] name = "pallet-assets-ext-rpc" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "GPL-3.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } +codec = { workspace = true } +jsonrpsee = { workspace = true } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-api = { workspace = true } +sp-arithmetic = { workspace = true } +sp-blockchain = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-rpc = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -pallet-assets-ext = { path = "../" } -pallet-assets-ext-rpc-runtime-api = { path = "./runtime-api" } -seed-primitives = { path = "../../../primitives" } +pallet-assets-ext = { workspace = true } +pallet-assets-ext-rpc-runtime-api = { workspace = true } +seed-primitives = { workspace = true } diff --git a/pallet/assets-ext/rpc/runtime-api/Cargo.toml b/pallet/assets-ext/rpc/runtime-api/Cargo.toml index 8a41b04c8..3bd8b7fe9 100644 --- a/pallet/assets-ext/rpc/runtime-api/Cargo.toml +++ b/pallet/assets-ext/rpc/runtime-api/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "pallet-assets-ext-rpc-runtime-api" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "GPL-3.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +codec = { workspace = true } +sp-api = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -pallet-assets-ext = { path = "../../../assets-ext", default-features = false } -seed-primitives = { path = "../../../../primitives", default-features = false} +pallet-assets-ext = { workspace = true } +seed-primitives = { workspace = true } [features] default = ["std"] diff --git a/pallet/common/Cargo.toml b/pallet/common/Cargo.toml index 9126d4772..99945820a 100644 --- a/pallet/common/Cargo.toml +++ b/pallet/common/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "seed-pallet-common" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Common types and traits used across multiple pallets" +authors.workspace = true +edition.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -impl-trait-for-tuples = "0.2.1" -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +impl-trait-for-tuples = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } +seed-primitives = { workspace = true } [features] default = ["std"] diff --git a/pallet/crowdsale/Cargo.toml b/pallet/crowdsale/Cargo.toml index beb0ee25a..6a77508cd 100644 --- a/pallet/crowdsale/Cargo.toml +++ b/pallet/crowdsale/Cargo.toml @@ -1,33 +1,33 @@ [package] name = "pallet-crowdsale" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Crowdsale pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +scale-info = { workspace = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-std = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } -pallet-assets-ext = { path = "../assets-ext", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } +pallet-assets-ext = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-nft = { path = "../nft" } +sp-runtime = { workspace = true } +sp-io = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-nft = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallet/dex/Cargo.toml b/pallet/dex/Cargo.toml index d71955c6d..4170a36ea 100644 --- a/pallet/dex/Cargo.toml +++ b/pallet/dex/Cargo.toml @@ -1,34 +1,35 @@ [package] name = "pallet-dex" version = "0.0.1" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network DEX module" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -hex={ version = "0.4.3", default-features= false } -serde = { version = "1.0.145", default-features= false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +hex = { workspace = true } +serde = { workspace = true } +scale-info = { workspace = true } +codec = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-arithmetic = { workspace = true } +sp-std = { workspace = true } + +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } +sp-io = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallet/dex/rpc/Cargo.toml b/pallet/dex/rpc/Cargo.toml index c8d74b6c0..1df8bf5e5 100644 --- a/pallet/dex/rpc/Cargo.toml +++ b/pallet/dex/rpc/Cargo.toml @@ -7,16 +7,16 @@ edition = "2021" license = "Apache-2.0" [dependencies] -jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } +jsonrpsee = { workspace = true } +serde_json = { workspace = true } -serde_json = "1.0.64" -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-api = { workspace = true } +sp-blockchain = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } -pallet-dex = { path = "../" } -pallet-dex-rpc-runtime-api = { path = "./runtime-api" } -seed-primitives = { path = "../../../primitives" } +pallet-dex = { workspace = true } +pallet-dex-rpc-runtime-api = { workspace = true } +seed-primitives = { workspace = true } diff --git a/pallet/dex/rpc/runtime-api/Cargo.toml b/pallet/dex/rpc/runtime-api/Cargo.toml index 021c0ae09..afe958330 100644 --- a/pallet/dex/rpc/runtime-api/Cargo.toml +++ b/pallet/dex/rpc/runtime-api/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "pallet-dex-rpc-runtime-api" version = "0.0.1" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-dex = { path = "../../", default-features = false } -seed-primitives = { path = "../../../../primitives", default-features = false} +sp-api = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +pallet-dex = { workspace = true } +seed-primitives = { workspace = true } [features] default = ["std"] diff --git a/pallet/doughnut/Cargo.toml b/pallet/doughnut/Cargo.toml index 5329ba3de..8c8bd660a 100644 --- a/pallet/doughnut/Cargo.toml +++ b/pallet/doughnut/Cargo.toml @@ -1,61 +1,62 @@ [package] name = "pallet-doughnut" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Root Network Doughnut pallet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -hex-literal = "0.3.4" -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +hex-literal = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } -doughnut-rs = { version = "0.2.2", default-features = false, features = ["crypto"] } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -seed-pallet-common = { path = "../common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +pallet-transaction-payment = { workspace = true } + +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } +doughnut-rs = { workspace = true, features = ["crypto"] } [dev-dependencies] -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-fee-control = { path = "../fee-control" } -pallet-fee-proxy = { path = "../fee-proxy" } -pallet-dex = { path = "../dex" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-futurepass = { path = "../futurepass" } +frame-executive = { workspace = true } +fp-self-contained = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true } +pallet-evm = { workspace = true } +pallet-fee-control = { workspace = true } +pallet-fee-proxy = { workspace = true, default-features = true } +pallet-dex = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-futurepass = { workspace = true } [features] default = ["std"] std = [ "codec/std", "scale-info/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "sp-runtime/std", - "sp-std/std", "sp-core/std", "sp-io/std", + "sp-runtime/std", + "sp-std/std", "pallet-assets/std", "pallet-balances/std", "pallet-transaction-payment/std", - "frame-benchmarking?/std", "seed-pallet-common/std", "seed-primitives/std", "doughnut-rs/std", diff --git a/pallet/echo/Cargo.toml b/pallet/echo/Cargo.toml index d83d020f5..dc70a61ad 100644 --- a/pallet/echo/Cargo.toml +++ b/pallet/echo/Cargo.toml @@ -1,31 +1,32 @@ [package] name = "pallet-echo" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Echo pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } +codec = { workspace = true } +ethabi = { workspace = true } +scale-info = { workspace = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -ethabi = { version = "18.0.0", default-features = false} -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-std = { workspace = true } + +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { workspace = true } +sp-io = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } [features] default = ["std"] diff --git a/pallet/erc20-peg/Cargo.toml b/pallet/erc20-peg/Cargo.toml index fcce0708e..922475691 100644 --- a/pallet/erc20-peg/Cargo.toml +++ b/pallet/erc20-peg/Cargo.toml @@ -1,35 +1,35 @@ [package] name = "pallet-erc20-peg" version = "2.0.1" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Seed Token Approvals module" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -log = "0.4" -ethabi = { version = "18.0.0", default-features = false } +codec = { workspace = true } +ethabi = { workspace = true } +log = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +scale-info = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +sp-core = { workspace = true } + +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -pallet-nft = { path = "../nft" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -hex-literal = { version = "0.3.4" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-nft = { workspace = true } +sp-io = { workspace = true } +hex-literal = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } [features] default = ["std"] @@ -37,7 +37,6 @@ std = [ "seed-primitives/std", "seed-pallet-common/std", "codec/std", - "serde", "sp-runtime/std", "sp-std/std", "frame-support/std", diff --git a/pallet/ethy/Cargo.toml b/pallet/ethy/Cargo.toml index b3a4f8c55..ec70f8bda 100644 --- a/pallet/ethy/Cargo.toml +++ b/pallet/ethy/Cargo.toml @@ -1,44 +1,42 @@ [package] name = "pallet-ethy" version = "1.0.1" -edition = "2021" -authors = ["The Root Network Team"] description = "Pallet for bridging Ethereum events" -license = "Apache-2.0" +edition.workspace = true +authors.workspace = true +license.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -ethabi = { version = "18.0.0", default-features = false} -ethereum-types = { version = "0.14.1", default-features = false, features = ["serialize", "codec"] } -hex = { version = "0.4.3", default-features = false } -hex-literal = { version = "0.3.4", default-features = false } -rustc-hex = { version = "2.1.0", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, features = ["derive"] } -serde_json = { version = "1.0.87", default-features = false, features = ["alloc"] } - -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } +codec = { workspace = true } +ethabi = { workspace = true } +ethereum-types = { workspace = true } +hex-literal = { workspace = true } +rustc-hex = { workspace = true } +scale-info = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } # Substrate packages -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-application-crypto = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -hex-literal = "0.3" -parking_lot = "0.12.1" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +parking_lot = { workspace = true } +sp-core = { workspace = true } +sp-keystore = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-scheduler = { workspace = true } [features] default = ["std"] diff --git a/pallet/evm-chain-id/Cargo.toml b/pallet/evm-chain-id/Cargo.toml index 194576f76..2a6d462af 100644 --- a/pallet/evm-chain-id/Cargo.toml +++ b/pallet/evm-chain-id/Cargo.toml @@ -1,45 +1,36 @@ [package] name = "pallet-evm-chain-id" version = "1.0.0-dev" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" description = "EVM chain id storage pallet" -repository = "https://github.com/futureversecom/seed" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -serde = { version = "1.0.145", features = ["derive"], optional = true } +codec = { workspace = true } +scale-info = { workspace = true } -# Parity -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } - -# Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } - -# Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-std = { workspace = true } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -seed-pallet-common = { path = "../common" } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +pallet-balances = { workspace = true } +seed-pallet-common = { workspace = true, default-features = true } [features] default = ["std"] std = [ - "serde", - # Parity "codec/std", "scale-info/std", - # Substrate FRAME "frame-support/std", "frame-system/std", "sp-std/std", diff --git a/pallet/fee-control/Cargo.toml b/pallet/fee-control/Cargo.toml index 8c1dc3035..ac4456b5d 100644 --- a/pallet/fee-control/Cargo.toml +++ b/pallet/fee-control/Cargo.toml @@ -1,48 +1,46 @@ [package] name = "pallet-fee-control" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Static and dynamic fee setting through a pallet" +authors.workspace = true +edition.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +scale-info = { workspace = true } -# Substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +sp-core = { workspace = true } -# Frontier -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +fp-evm = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } +precompile-utils = { workspace = true } [dev-dependencies] -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +pallet-evm = { workspace = true } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-fee-proxy = { path = "../fee-proxy" } -pallet-dex = { path = "../dex" } -pallet-assets-ext = { path = "../assets-ext" } -seed-pallet-common= { path = "../common" } -pallet-futurepass = { path = "../futurepass" } +sp-io = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-fee-proxy = { workspace = true, default-features = true } +pallet-dex = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-futurepass = { workspace = true } +seed-pallet-common= { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallet/fee-proxy/Cargo.toml b/pallet/fee-proxy/Cargo.toml index 72a550ece..ac02458c0 100644 --- a/pallet/fee-proxy/Cargo.toml +++ b/pallet/fee-proxy/Cargo.toml @@ -1,41 +1,41 @@ [package] name = "pallet-fee-proxy" version = "0.1.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Fee Proxy Pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -pallet-assets-ext = { path = "../assets-ext", default-features = false } -pallet-dex = { path = "../dex", default-features = false } -pallet-futurepass = { path = "../futurepass", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +codec = { workspace = true } +scale-info = { workspace = true } +ethabi = { workspace = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -ethabi = { version = "18.0.0", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-evm = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-dex = { workspace = true } +pallet-futurepass = { workspace = true } +pallet-transaction-payment = { workspace = true } +precompile-utils = { workspace = true } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -hex-literal = { version = "0.3.4" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-fee-control = { path = "../fee-control" } +sp-io = { workspace = true } +hex-literal = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-fee-control = { workspace = true } [features] default = ["std"] diff --git a/pallet/futurepass/Cargo.toml b/pallet/futurepass/Cargo.toml index 750b93f64..e9222b1ae 100644 --- a/pallet/futurepass/Cargo.toml +++ b/pallet/futurepass/Cargo.toml @@ -1,81 +1,69 @@ [package] name = "pallet-futurepass" version = "1.0.0-dev" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" description = "FuturePass" -repository = "https://github.com/futureversecom/trn-seed" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Parity -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +hex = { workspace = true } +hex-literal = { workspace = true, optional = true } +codec = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } # Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -# Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } - -# Custom -log = "0.4" -serde = { version = "1.0.145", features = ["derive"], optional = true } -hex = { version = "0.4.3", default-features = false } -hex-literal = { version = "0.3.4", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +precompile-utils = { workspace = true } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } [dev-dependencies] -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -seed-runtime = { path = "../../runtime" } - -seed-pallet-common= { path = "../common" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-fee-control = { path = "../fee-control" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-fee-proxy = { path = "../fee-proxy" } -pallet-dex = { path = "../dex" } -pallet-nft = { path = "../nft" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -hex-literal = { version = "0.3.4" } - +fp-evm = { workspace = true } +seed-runtime = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-proxy = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-fee-control = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-fee-proxy = { workspace = true, default-features = true } +pallet-dex = { workspace = true } +pallet-nft = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-evm = { workspace = true } +seed-pallet-common= { workspace = true, default-features = true } [features] default = ["std"] std = [ - "serde", # Parity + "hex/std", "codec/std", "scale-info/std", # Substrate FRAME + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "sp-core/std", "sp-std/std", "sp-runtime/std", # Custom - "hex/std", "seed-pallet-common/std", "seed-primitives/std", - "pallet-assets/std", - "pallet-balances/std", "precompile-utils/std", - "fp-evm/std", - "frame-benchmarking?/std", ] try-runtime = ["frame-support/try-runtime"] -runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks"] +runtime-benchmarks = ["frame-benchmarking", "hex-literal", "seed-runtime/runtime-benchmarks"] diff --git a/pallet/maintenance-mode/Cargo.toml b/pallet/maintenance-mode/Cargo.toml index d1c67ecb4..f24511077 100644 --- a/pallet/maintenance-mode/Cargo.toml +++ b/pallet/maintenance-mode/Cargo.toml @@ -1,51 +1,49 @@ [package] name = "pallet-maintenance-mode" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "GPL-3.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Maintenance Mode pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } +codec = { workspace = true } +scale-info = { workspace = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-ethy = { path = "../ethy" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } - +sp-io = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-ethy = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-sudo = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true } +pallet-im-online = { workspace = true, default-features = true } [features] default = ["std"] std = [ "codec/std", "scale-info/std", - "seed-primitives/std", - "seed-pallet-common/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", "sp-core/std", "sp-std/std", "sp-runtime/std", - "frame-support/std", - "frame-system/std", - "frame-benchmarking?/std", + "seed-primitives/std", + "seed-pallet-common/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/marketplace/Cargo.toml b/pallet/marketplace/Cargo.toml index e52f3fd86..db94b5ddb 100644 --- a/pallet/marketplace/Cargo.toml +++ b/pallet/marketplace/Cargo.toml @@ -1,56 +1,55 @@ [package] name = "pallet-marketplace" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Marketplace pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +scale-info = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -pallet-nft = { path = "../nft", default-features = false, optional = true } -pallet-sft = { path = "../sft", default-features = false, optional = true } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +pallet-nft = { workspace = true } +pallet-sft = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -serde_json = "1.0" -pallet-assets-ext = { path = "../assets-ext" } -pallet-fee-control = { path = "../fee-control" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-nft = { path = "../nft" } -pallet-sft = { path = "../sft" } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-fee-control = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-evm = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-nft = { workspace = true } +pallet-sft = { workspace = true } + [features] default = ["std"] std = [ - "seed-primitives/std", - "seed-pallet-common/std", - "pallet-nft/std", - "pallet-sft/std", "codec/std", - "serde", + "scale-info/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", - "frame-benchmarking?/std", + "pallet-nft/std", + "pallet-sft/std", + "seed-primitives/std", + "seed-pallet-common/std", ] runtime-benchmarks = ["frame-benchmarking", "pallet-nft/runtime-benchmarks", "pallet-sft/runtime-benchmarks"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/nft-peg/Cargo.toml b/pallet/nft-peg/Cargo.toml index 6c6c38c20..9a47fc9b2 100644 --- a/pallet/nft-peg/Cargo.toml +++ b/pallet/nft-peg/Cargo.toml @@ -1,52 +1,51 @@ [package] name = "pallet-nft-peg" version = "2.0.1" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Seed Token Approvals module" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -log = "0.4" -ethabi = { version = "18.0.0", default-features = false } -pallet-nft = { path = "../nft", default-features = false } +codec = { workspace = true } +ethabi = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +sp-core = { workspace = true } + +pallet-nft = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -hex-literal = { version = "0.3.4" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { workspace = true } +hex-literal = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } [features] default = ["std"] std = [ - "seed-primitives/std", - "seed-pallet-common/std", "codec/std", - "serde", - "sp-runtime/std", - "sp-std/std", + "ethabi/std", + "scale-info/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "scale-info/std", "sp-core/std", - "ethabi/std", + "sp-runtime/std", + "sp-std/std", "pallet-nft/std", - "frame-benchmarking?/std", + "seed-primitives/std", + "seed-pallet-common/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] \ No newline at end of file diff --git a/pallet/nft/Cargo.toml b/pallet/nft/Cargo.toml index 700163660..7a76d54ab 100644 --- a/pallet/nft/Cargo.toml +++ b/pallet/nft/Cargo.toml @@ -1,56 +1,52 @@ [package] name = "pallet-nft" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network NFT pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -hex = { version = "0.4.3", default-features = false } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +codec = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } -log = { default-features = false, version = "0.4.14"} +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } +precompile-utils = { workspace = true } [dev-dependencies] -serde_json = "1.0" -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-fee-control = { path = "../fee-control" } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-evm = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-fee-control = { workspace = true } [features] default = ["std"] std = [ - "hex/std", - "seed-primitives/std", - "seed-pallet-common/std", "codec/std", - "serde", + "scale-info/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", + "seed-primitives/std", + "seed-pallet-common/std", "precompile-utils/std", - "frame-benchmarking?/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/nft/rpc/Cargo.toml b/pallet/nft/rpc/Cargo.toml index 7afae80b6..4ff1a27b5 100644 --- a/pallet/nft/rpc/Cargo.toml +++ b/pallet/nft/rpc/Cargo.toml @@ -2,23 +2,24 @@ [package] name = "pallet-nft-rpc" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } +codec = { workspace = true } +jsonrpsee = { workspace = true, default-features = true} -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-api = { workspace = true } +sp-arithmetic = { workspace = true } +sp-blockchain = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-rpc = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -pallet-nft = { path = "../" } -pallet-nft-rpc-runtime-api = { path = "./runtime-api" } -seed-primitives = { path = "../../../primitives" } +pallet-nft = { workspace = true } +pallet-nft-rpc-runtime-api = { workspace = true } +seed-primitives = { workspace = true } diff --git a/pallet/nft/rpc/runtime-api/Cargo.toml b/pallet/nft/rpc/runtime-api/Cargo.toml index 1f65bd241..ee57d0a8a 100644 --- a/pallet/nft/rpc/runtime-api/Cargo.toml +++ b/pallet/nft/rpc/runtime-api/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-nft-rpc-runtime-api" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-nft = { path = "../../../nft", default-features = false } -seed-primitives = { path = "../../../../primitives", default-features = false} +codec = { workspace = true } +sp-api = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +pallet-nft = { workspace = true } +seed-primitives = { workspace = true } [features] default = ["std"] std = [ "codec/std", - "pallet-nft/std", "sp-api/std", - "codec/std", "sp-std/std", + "pallet-nft/std", + "codec/std", "seed-primitives/std", ] diff --git a/pallet/sft/Cargo.toml b/pallet/sft/Cargo.toml index 46ce56646..cc317cc59 100644 --- a/pallet/sft/Cargo.toml +++ b/pallet/sft/Cargo.toml @@ -1,55 +1,53 @@ [package] name = "pallet-sft" version = "2.0.1" -authors = ["Centrality Developers "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network SFT pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +log = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -pallet-nft = { path = "../nft", default-features = false } -log = { default-features = false, version = "0.4.14"} -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +pallet-nft = { workspace = true } +precompile-utils = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -serde_json = "1.0" -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-evm = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-evm = { workspace = true } +pallet-timestamp = { workspace = true } [features] default = ["std"] std = [ - "seed-primitives/std", - "seed-pallet-common/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", "codec/std", - "serde", + "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", "pallet-nft/std", "precompile-utils/std", - "frame-benchmarking?/std", + "seed-primitives/std", + "seed-pallet-common/std", ] runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallet/sft/rpc/Cargo.toml b/pallet/sft/rpc/Cargo.toml index 915230e19..fb6414f01 100644 --- a/pallet/sft/rpc/Cargo.toml +++ b/pallet/sft/rpc/Cargo.toml @@ -2,23 +2,24 @@ [package] name = "pallet-sft-rpc" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } -jsonrpsee = { version = "0.16.3", features = ["server", "macros"] } +codec = { workspace = true } +jsonrpsee = { workspace = true } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-rpc = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +sp-api = { workspace = true } +sp-arithmetic = { workspace = true } +sp-blockchain = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-rpc = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -pallet-sft = { path = "../" } -pallet-sft-rpc-runtime-api = { path = "./runtime-api" } -seed-primitives = { path = "../../../primitives" } +pallet-sft = { workspace = true } +pallet-sft-rpc-runtime-api = { workspace = true } +seed-primitives = { workspace = true } diff --git a/pallet/sft/rpc/runtime-api/Cargo.toml b/pallet/sft/rpc/runtime-api/Cargo.toml index 0b48a6a5c..5508c3ca7 100644 --- a/pallet/sft/rpc/runtime-api/Cargo.toml +++ b/pallet/sft/rpc/runtime-api/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "pallet-sft-rpc-runtime-api" version = "2.2.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" +authors.workspace = true +edition.workspace = true +license.workspace = true [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-sft = { path = "../../../sft", default-features = false } -seed-primitives = { path = "../../../../primitives", default-features = false} +codec = { workspace = true } +sp-api = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +pallet-sft = { workspace = true } +seed-primitives = { workspace = true } [features] default = ["std"] diff --git a/pallet/token-approvals/Cargo.toml b/pallet/token-approvals/Cargo.toml index 57e513fb2..92e7791b1 100644 --- a/pallet/token-approvals/Cargo.toml +++ b/pallet/token-approvals/Cargo.toml @@ -1,33 +1,30 @@ [package] name = "pallet-token-approvals" version = "2.0.1" -authors = ["The Root Network Team"] -edition = "2021" -repository = "https://github.com/futureversecom/seed" description = "Seed Token Approvals module" +authors.workspace = true +edition.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +sp-core = { workspace = true } -# Substrate -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -hex-literal = { version = "0.3.4" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-nft = { path = "../nft" } +sp-io = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-nft = { workspace = true, default-features = true } [features] default = ["std"] @@ -35,7 +32,6 @@ std = [ "seed-primitives/std", "seed-pallet-common/std", "codec/std", - "serde", "sp-runtime/std", "sp-std/std", "frame-support/std", diff --git a/pallet/tx-fee-pot/Cargo.toml b/pallet/tx-fee-pot/Cargo.toml index 56c238d78..f7f04b719 100644 --- a/pallet/tx-fee-pot/Cargo.toml +++ b/pallet/tx-fee-pot/Cargo.toml @@ -1,28 +1,27 @@ [package] name = "pallet-tx-fee-pot" version = "0.0.1" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Maintains a tx fee pot for validator payouts" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +frame-support = { workspace = true } +frame-system = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } - -pallet-assets-ext = { path = "../assets-ext", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } +pallet-assets-ext = { workspace = true } +pallet-balances = { workspace = true } +pallet-staking = { workspace = true } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } [features] default = ["std"] diff --git a/pallet/vortex-distribution/Cargo.toml b/pallet/vortex-distribution/Cargo.toml new file mode 100644 index 000000000..77b380c32 --- /dev/null +++ b/pallet/vortex-distribution/Cargo.toml @@ -0,0 +1,54 @@ +[package] +name = "pallet-vortex-distribution" +version = "2.1.0" +description = "Vortex distribution pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true + +[dependencies] +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +sp-staking = { workspace = true } + +pallet-staking = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } + +[dev-dependencies] +pallet-timestamp = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +frame-election-provider-support = { workspace = true } +pallet-session = { workspace = true } +pallet-bags-list = { workspace = true } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } + +[features] +default = ["std"] +std = [ + "seed-primitives/std", + "seed-pallet-common/std", + "codec/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", + "sp-staking/std", + "pallet-staking/std", + "frame-support/std", + "frame-system/std", + "scale-info/std", + "frame-benchmarking?/std", +] +try-runtime = ["frame-support/try-runtime"] +runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/vortex/src/benchmarking.rs b/pallet/vortex-distribution/src/benchmarking.rs similarity index 100% rename from pallet/vortex/src/benchmarking.rs rename to pallet/vortex-distribution/src/benchmarking.rs diff --git a/pallet/vortex/src/lib.rs b/pallet/vortex-distribution/src/lib.rs similarity index 100% rename from pallet/vortex/src/lib.rs rename to pallet/vortex-distribution/src/lib.rs diff --git a/pallet/vortex/src/mock.rs b/pallet/vortex-distribution/src/mock.rs similarity index 98% rename from pallet/vortex/src/mock.rs rename to pallet/vortex-distribution/src/mock.rs index 88dd71eee..a5faebd30 100644 --- a/pallet/vortex/src/mock.rs +++ b/pallet/vortex-distribution/src/mock.rs @@ -13,7 +13,7 @@ // limitations under the License. // You may obtain a copy of the License at the root of this project source code -use crate as pallet_vortex; +use crate as pallet_vortex_distrobution; use frame_support::traits::{ConstU32, Hooks}; use seed_pallet_common::test_prelude::*; use sp_runtime::{testing::TestXt, BuildStorage}; @@ -44,7 +44,7 @@ construct_runtime!( Assets: pallet_assets, AssetsExt: pallet_assets_ext, Timestamp: pallet_timestamp, - Vortex: pallet_vortex, + Vortex: pallet_vortex_distrobution, Staking: pallet_staking, } ); diff --git a/pallet/vortex/src/tests.rs b/pallet/vortex-distribution/src/tests.rs similarity index 100% rename from pallet/vortex/src/tests.rs rename to pallet/vortex-distribution/src/tests.rs diff --git a/pallet/vortex/src/weights.rs b/pallet/vortex-distribution/src/weights.rs similarity index 98% rename from pallet/vortex/src/weights.rs rename to pallet/vortex-distribution/src/weights.rs index 95f549daf..e2d38ecdd 100644 --- a/pallet/vortex/src/weights.rs +++ b/pallet/vortex-distribution/src/weights.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for pallet_vortex +//! Autogenerated weights for pallet_vortex_distribution //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2024-06-06, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` @@ -29,7 +29,7 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet-vortex +// --pallet=pallet-vortex-distribution // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 @@ -45,7 +45,7 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; -/// Weight functions needed for pallet_vortex. +/// Weight functions needed for pallet_vortex_distribution. pub trait WeightInfo { fn set_admin() -> Weight; fn create_vtx_dist() -> Weight; @@ -59,7 +59,7 @@ pub trait WeightInfo { fn pay_unsigned() -> Weight; } -/// Weights for pallet_vortex using the Substrate node and recommended hardware. +/// Weights for pallet_vortex_distribution using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: `VortexDistribution::AdminAccount` (r:0 w:1) diff --git a/pallet/vortex/Cargo.toml b/pallet/vortex/Cargo.toml deleted file mode 100644 index f4b462cd6..000000000 --- a/pallet/vortex/Cargo.toml +++ /dev/null @@ -1,56 +0,0 @@ -[package] -name = "pallet-vortex" -version = "2.1.0" -authors = ["Centrality Developers "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" -description = "Vortex distribution pallet" - -[dependencies] -serde = { version = "1.0.145", optional = true } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v1.0.0" } - -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } - -[dev-dependencies] -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } - -[features] -default = ["std"] -std = [ - "seed-primitives/std", - "seed-pallet-common/std", - "serde", - "codec/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "sp-staking/std", - "pallet-staking/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", - "frame-benchmarking?/std", -] -try-runtime = ["frame-support/try-runtime"] -runtime-benchmarks = ["frame-benchmarking"] diff --git a/pallet/xls20/Cargo.toml b/pallet/xls20/Cargo.toml index d7c1affe4..7dbd4435d 100644 --- a/pallet/xls20/Cargo.toml +++ b/pallet/xls20/Cargo.toml @@ -1,32 +1,31 @@ [package] name = "pallet-xls20" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed" description = "Root Network Echo pallet" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -pallet-nft = { path = "../nft", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } - -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +pallet-nft = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { workspace = true } +sp-core = { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } [features] default = ["std"] diff --git a/pallet/xrpl-bridge/Cargo.toml b/pallet/xrpl-bridge/Cargo.toml index 4b719f155..aad5b39aa 100644 --- a/pallet/xrpl-bridge/Cargo.toml +++ b/pallet/xrpl-bridge/Cargo.toml @@ -1,47 +1,43 @@ [package] name = "pallet-xrpl-bridge" version = "0.0.1" -authors = ["The Root Network Team"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/futureversecom/seed-network" description = "XRPL Bridge to process transactions" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [dependencies] -codec = { package = 'parity-scale-codec', version = '3.0.0', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -hex-literal = { version = "0.3.4", default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -scale-info = { version = '2.3.0', default-features = false, features = [ - 'derive', -] } -serde = { version = '1.0.145', features = ['derive'], optional = true } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0", default-features = false } -xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2" } +log = { workspace = true } +hex-literal = { workspace = true } +xrpl-codec = { workspace = true } -seed-primitives = { path = "../../primitives", default-features = false } -seed-pallet-common = { path = "../common", default-features = false } -pallet-assets-ext = { path = "../../pallet/assets-ext", default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -log = { version = "0.4", default-features = false } +pallet-assets = { workspace = true } +pallet-assets-ext = { workspace = true } +pallet-balances = { workspace = true } +pallet-timestamp = { workspace = true } +seed-primitives = { workspace = true } +seed-pallet-common = { workspace = true } [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v1.0.0" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { workspace = true } +sp-keystore = { workspace = true } [features] default = ['std'] std = [ - 'serde', 'codec/std', 'sp-runtime/std', 'sp-core/std', diff --git a/pallet/xrpl/Cargo.toml b/pallet/xrpl/Cargo.toml index fc241e2e0..8ead8d5d9 100644 --- a/pallet/xrpl/Cargo.toml +++ b/pallet/xrpl/Cargo.toml @@ -1,53 +1,48 @@ [package] name = "pallet-xrpl" version = "1.0.0-dev" -authors = ["The Root Network Team"] -edition = "2021" -license = "GPL-3.0" description = "XRPL Pallet" -repository = "https://github.com/futureversecom/trn-seed" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Parity -codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } - -# Substrate FRAME -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +hex = { workspace = true } +libsecp256k1 = { workspace = true } +log = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +xrpl_binary_codec = { git = "https://github.com/futureversecom/xrpl-sdk-rust", branch = "once-cell-support", default-features = false, features = ["json"] } +xrpl_types = { git = "https://github.com/futureversecom/xrpl-sdk-rust", branch = "once-cell-support", default-features = false } -# Benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true, default-features = false } +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +codec = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-std = { workspace = true } +sp-runtime = { workspace = true } +pallet-transaction-payment = { workspace = true } -# Custom -log = "0.4" -hex = { version = "0.4.3", default-features = false } -sha2 = { version = "0.10", default-features = false } -libsecp256k1 = { version = "0.7", default-features = false, features = [ "hmac" ] } -serde = { version = "1.0.145", default-features= false, features = ["derive"] } -serde_json = { version = "1.0.87", default-features = false, features = ["alloc"] } -xrpl_types = { git = "https://github.com/futureversecom/xrpl-sdk-rust", branch = "once-cell-support", default-features = false } -xrpl_binary_codec = { git = "https://github.com/futureversecom/xrpl-sdk-rust", branch = "once-cell-support", default-features = false, features = ["json"] } -seed-pallet-common = { path = "../common", default-features = false } -seed-primitives = { path = "../../primitives", default-features = false } -precompile-utils = { path = "../../evm-precompiles/utils", default-features = false } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } +precompile-utils = { workspace = true } [dev-dependencies] -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -fp-self-contained = { git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -seed-pallet-common= { path = "../common" } -pallet-assets-ext = { path = "../assets-ext" } -pallet-fee-control = { path = "../fee-control" } +frame-executive = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +fp-self-contained = { workspace = true, default-features = true } +seed-pallet-common= { workspace = true } +pallet-assets-ext = { workspace = true, default-features = true } +pallet-fee-control = { workspace = true } [features] default = ["std"] diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index fd04f530e..95b320a70 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,47 +1,46 @@ [package] name = "seed-primitives" version = "1.0.0" -authors = ["The Root Network Team"] -edition = "2021" description = "Types shared across parachain pallets, runtime, and client" +authors.workspace = true +edition.workspace = true [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false } impl-serde = { version = "0.4.0", default-features = false } -libsecp256k1 = { version = "0.7", default-features = false, features = [ "hmac" ] } -log = { version = "0.4", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, features = ["derive"] } +libsecp256k1 = { workspace = true } +log = { workspace = true } ripemd = { version = "0.1", default-features = false } -sha2 = { version = "0.10", default-features = false } -hex = { version = "0.4.3", default-features = false } +serde = { workspace = true } +sha2 = { workspace = true } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } -pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" } +codec = { workspace = true } +scale-info = { workspace = true } +sp-api = { workspace = true } +sp-application-crypto = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } + +pallet-balances = { workspace = true } +pallet-assets = { workspace = true } [dev-dependencies] -hex = "*" -hex-literal = "0.3" +hex = { workspace = true } +hex-literal = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-wasm-builder = { workspace = true } [features] default = ["std"] std = [ - "hex/std", "codec/std", "frame-support/std", "frame-system/std", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 89fb23806..594f84683 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -5,136 +5,135 @@ authors = ["The Root Network Team"] edition = "2021" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.145", default-features = false, optional = true, features = ["derive"] } +codec = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } # Substrate -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-multisig = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-executive = { workspace = true } +frame-election-provider-support = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +pallet-assets = { workspace = true } +pallet-authorship = { workspace = true } +pallet-babe = { workspace = true } +pallet-balances = { workspace = true } +pallet-bags-list = { workspace = true } +pallet-election-provider-multi-phase = { workspace = true } +pallet-grandpa = { workspace = true } +pallet-im-online = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nomination-pools = { workspace = true } +pallet-offences = { workspace = true } +pallet-proxy = { workspace = true } +pallet-recovery = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-preimage = { workspace = true } +pallet-session = { workspace = true } +pallet-staking = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-utility = { workspace = true } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-core = { workspace = true } +sp-npos-elections = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-staking = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } # EVM support -fp-rpc = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -fp-self-contained = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN", features = ["serde"] } -fp-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -evm = { version = "0.36.0", default-features = false, features = ["with-codec"] } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true, features = ["serde"] } +fp-evm = { workspace = true } +evm = { workspace = true } +pallet-base-fee = { workspace = true } +pallet-ethereum = { workspace = true } +pallet-evm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-evm-precompile-blake2 = { workspace = true } +pallet-evm-precompile-modexp = { workspace = true } +pallet-evm-precompile-simple = { workspace = true } +pallet-evm-precompile-sha3fips = { workspace = true } +pallet-evm-precompiles-erc721 = { workspace = true } +pallet-evm-precompiles-erc1155 = { workspace = true } +pallet-evm-precompiles-erc20 = { workspace = true } +pallet-evm-precompiles-nft = { workspace = true } +pallet-evm-precompiles-sft = { workspace = true } +pallet-evm-precompiles-peg = { workspace = true } +pallet-evm-precompiles-dex = { workspace = true } +pallet-evm-precompiles-futurepass = { workspace = true } +pallet-evm-precompiles-futurepass-registrar = { workspace = true } +pallet-evm-precompiles-marketplace = { workspace = true } +precompile-utils = { workspace = true } -hex = { version = "0.4.3", default-features= false } -hex-literal = { version = "0.3.4", default-features = false } -pallet-base-fee = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-ethereum = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm-chain-id = { path = "../pallet/evm-chain-id", default-features = false } -pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/futureversecom/frontier", branch = "polkadot-v1.0.0-TRN" } -precompile-utils = { path = "../evm-precompiles/utils", default-features = false } -pallet-evm-precompiles-erc721 = { path = "../evm-precompiles/erc721", default-features = false } -pallet-evm-precompiles-erc1155 = { path = "../evm-precompiles/erc1155", default-features = false } -pallet-evm-precompiles-erc20 = { path = "../evm-precompiles/erc20", default-features = false } -pallet-evm-precompiles-nft = { path = "../evm-precompiles/nft", default-features = false } -pallet-evm-precompiles-sft = { path = "../evm-precompiles/sft", default-features = false } -pallet-evm-precompiles-peg = { path = "../evm-precompiles/peg", default-features = false } -pallet-evm-precompiles-dex = { path = "../evm-precompiles/dex", default-features = false } -pallet-evm-precompiles-futurepass = { path = "../evm-precompiles/futurepass", default-features = false } -pallet-evm-precompiles-futurepass-registrar = { path = "../evm-precompiles/futurepass_registrar", default-features = false } -pallet-evm-precompiles-marketplace = { path = "../evm-precompiles/marketplace", default-features = false } -rustc-hex = { version = "2.1.0", default-features = false } -doughnut-rs = { version = "0.2.2", default-features = false } -trn-pact = { version = "0.2.1", default-features = false } +pallet-assets-ext = { workspace = true } +pallet-assets-ext-rpc-runtime-api = { workspace = true } +pallet-dex = { workspace = true } +pallet-dex-rpc-runtime-api = { workspace = true } +pallet-echo = { workspace = true } +pallet-ethy = { workspace = true } +pallet-fee-proxy = { workspace = true } +pallet-nft = { workspace = true } +pallet-nft-rpc-runtime-api = { workspace = true } +pallet-sft = { workspace = true } +pallet-sft-rpc-runtime-api = { workspace = true } +pallet-token-approvals = { workspace = true } +pallet-tx-fee-pot = { workspace = true } +pallet-xrpl-bridge = { workspace = true } +pallet-xrpl = { workspace = true } +pallet-erc20-peg = { workspace = true } +pallet-nft-peg = { workspace = true } +pallet-fee-control = { workspace = true } +pallet-xls20 = { workspace = true } +pallet-futurepass = { workspace = true } +pallet-marketplace = { workspace = true } +pallet-vortex-distribution = { workspace = true } +pallet-doughnut = { workspace = true } +pallet-maintenance-mode = { workspace = true } +pallet-crowdsale = { workspace = true } -pallet-assets-ext = { path = "../pallet/assets-ext", default-features = false } -pallet-assets-ext-rpc-runtime-api = { path = "../pallet/assets-ext/rpc/runtime-api", default-features = false } -pallet-dex = { path = "../pallet/dex", default-features = false } -pallet-dex-rpc-runtime-api = { path = "../pallet/dex/rpc/runtime-api", default-features = false } -pallet-echo = { path = "../pallet/echo", default-features = false } -pallet-ethy = { path = "../pallet/ethy", default-features = false } -pallet-fee-proxy = { path = "../pallet/fee-proxy", default-features = false } -pallet-nft = { path = "../pallet/nft", default-features = false } -pallet-nft-rpc-runtime-api = { path = "../pallet/nft/rpc/runtime-api", default-features = false } -pallet-sft = { path = "../pallet/sft", default-features = false } -pallet-sft-rpc-runtime-api = { path = "../pallet/sft/rpc/runtime-api", default-features = false } -pallet-token-approvals = { path = "../pallet/token-approvals", default-features = false } -pallet-tx-fee-pot = { path = "../pallet/tx-fee-pot", default-features = false } -pallet-xrpl-bridge = { path = "../pallet/xrpl-bridge", default-features = false } -pallet-xrpl = { path = "../pallet/xrpl", default-features = false } -pallet-erc20-peg = { path = "../pallet/erc20-peg", default-features = false } -pallet-nft-peg = { path = "../pallet/nft-peg", default-features = false } -pallet-fee-control = { path = "../pallet/fee-control", default-features = false } -pallet-xls20 = { path = "../pallet/xls20", default-features = false } -pallet-futurepass = { path = "../pallet/futurepass", default-features = false } -pallet-marketplace = { path = "../pallet/marketplace", default-features = false } -pallet-vortex = { path = "../pallet/vortex", default-features = false } -pallet-doughnut = { path = "../pallet/doughnut", default-features = false } -pallet-maintenance-mode = { path = "../pallet/maintenance-mode", default-features = false } -pallet-crowdsale = { path = "../pallet/crowdsale", default-features = false } +seed-pallet-common = { workspace = true } +seed-primitives = { workspace = true } +seed-runtime-constants = { workspace = true } -seed-pallet-common = { path = "../pallet/common", default-features = false } -seed-primitives = { path = "../primitives", default-features = false } -seed-runtime-constants = { path = "constants", default-features = false } -primitive-types = {version = "0.11.1", default-features = false, features = ["impl-codec", "impl-serde"] } +# External deps +hex = { workspace = true } +hex-literal = { workspace = true } +rustc-hex = { workspace = true } +doughnut-rs = { workspace = true } +trn-pact = { version = "0.2.1", default-features = false } # Try-runtime -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-try-runtime = { workspace = true, optional = true } +try-runtime-cli = { workspace = true, optional = true } # Benchmark dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-benchmarking = { workspace = true, optional = true } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-wasm-builder = { workspace = true, default-features = true } [dev-dependencies] -ethereum = { version = "0.14.0", features = ["with-codec"] } -seed-client = { path = "../client" } -ethabi = { version = "18.0.0" } -frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } -tokio = { version = "1.19.2", features = ["macros"] } -substrate-test-runtime-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +seed-client = { workspace = true } +ethabi = { workspace = true } +substrate-test-runtime-client = { workspace = true } +tokio = { workspace = true } +ethereum = { version = "0.14.0", default-features = false } +frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } [features] @@ -143,7 +142,6 @@ std = [ "codec/std", "log/std", "scale-info/std", - "serde", "frame-executive/std", "frame-election-provider-support/std", "frame-support/std", @@ -203,11 +201,10 @@ std = [ "pallet-xls20/std", "pallet-futurepass/std", "pallet-marketplace/std", - "pallet-vortex/std", + "pallet-vortex-distribution/std", "pallet-maintenance-mode/std", "pallet-crowdsale/std", "seed-primitives/std", - "primitive-types/std", "fp-rpc/std", "fp-self-contained/std", "pallet-base-fee/std", @@ -289,7 +286,7 @@ try-runtime = [ "pallet-xls20/try-runtime", "pallet-futurepass/try-runtime", "pallet-marketplace/try-runtime", - "pallet-vortex/try-runtime", + "pallet-vortex-distribution/try-runtime", "pallet-evm/try-runtime", "pallet-fee-control/try-runtime", "pallet-fee-proxy/try-runtime", @@ -343,7 +340,7 @@ runtime-benchmarks = [ "pallet-xls20/runtime-benchmarks", "pallet-futurepass/runtime-benchmarks", "pallet-marketplace/runtime-benchmarks", - "pallet-vortex/runtime-benchmarks", + "pallet-vortex-distribution/runtime-benchmarks", "pallet-evm/runtime-benchmarks", "pallet-fee-proxy/runtime-benchmarks", "pallet-doughnut/runtime-benchmarks", diff --git a/runtime/constants/Cargo.toml b/runtime/constants/Cargo.toml index ae81263e0..5a77ff573 100644 --- a/runtime/constants/Cargo.toml +++ b/runtime/constants/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "seed-runtime-constants" version = "0.9.28" -authors = ["The Root Network Team"] -edition = "2021" +authors.workspace = true +edition.workspace = true [dependencies] -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-runtime = { workspace = true } +sp-core = { workspace = true } +sp-weights = { workspace = true } [features] default = ["std"] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index d49b9beab..2bd1888cb 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1312,9 +1312,9 @@ parameter_types! { pub const MaxStringLength: u32 = 1_000; } -impl pallet_vortex::Config for Runtime { +impl pallet_vortex_distribution::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_vortex::WeightInfo; + type WeightInfo = weights::pallet_vortex_distribution::WeightInfo; type NativeAssetId = RootAssetId; type VtxAssetId = VortexAssetId; type VtxDistPotId = VtxVortexPotId; @@ -1404,7 +1404,7 @@ construct_runtime!( Echo: pallet_echo = 21, Marketplace: pallet_marketplace = 44, Preimage: pallet_preimage = 45, - VortexDistribution: pallet_vortex = 46, + VortexDistribution: pallet_vortex_distribution = 46, FeeProxy: pallet_fee_proxy = 31, FeeControl: pallet_fee_control = 40, Xls20: pallet_xls20 = 42, @@ -2337,7 +2337,7 @@ mod benches { [pallet_token_approvals, TokenApprovals] [pallet_xls20, Xls20] [pallet_futurepass, Futurepass] - [pallet_vortex, VortexDistribution] + [pallet_vortex_distribution, VortexDistribution] [pallet_dex, Dex] [pallet_marketplace, Marketplace] [pallet_doughnut, Doughnut] diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index 8d87bba81..ab260715d 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -29,7 +29,7 @@ pub mod pallet_sudo; pub mod pallet_timestamp; pub mod pallet_token_approvals; pub mod pallet_utility; -pub mod pallet_vortex; +pub mod pallet_vortex_distribution; pub mod pallet_xls20; pub mod pallet_xrpl; pub mod pallet_xrpl_bridge; diff --git a/runtime/src/weights/pallet_vortex.rs b/runtime/src/weights/pallet_vortex_distribution.rs similarity index 96% rename from runtime/src/weights/pallet_vortex.rs rename to runtime/src/weights/pallet_vortex_distribution.rs index 781e517b2..8b2a4a529 100644 --- a/runtime/src/weights/pallet_vortex.rs +++ b/runtime/src/weights/pallet_vortex_distribution.rs @@ -1,5 +1,5 @@ -//! Autogenerated weights for `pallet_vortex` +//! Autogenerated weights for `pallet_vortex_distribution` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` @@ -14,12 +14,12 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet-vortex +// --pallet=pallet-vortex-distribution // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 // --output -// ./runtime/src/weights/pallet_vortex.rs +// ./runtime/src/weights/pallet_vortex_distribution.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -29,9 +29,9 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `pallet_vortex`. +/// Weight functions for `pallet_vortex_distribution`. pub struct WeightInfo(PhantomData); -impl pallet_vortex::WeightInfo for WeightInfo { +impl pallet_vortex_distribution::WeightInfo for WeightInfo { /// Storage: `VortexDistribution::AdminAccount` (r:0 w:1) /// Proof: `VortexDistribution::AdminAccount` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_admin() -> Weight { From a07d03b32e6fccbe7732dddbc7339fb69fb70343 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:30:30 +1200 Subject: [PATCH 100/112] Skip Staking storage when generating the fork state. --- scripts/get_state.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/get_state.py b/scripts/get_state.py index 8240f2ad2..fc65e8094 100644 --- a/scripts/get_state.py +++ b/scripts/get_state.py @@ -117,7 +117,7 @@ def xxh6464(x): def list_of_prefixes_to_migrate(substrate): # Importing these modules will cause the chain to not work correctly skip_modules = ['System', 'Session', 'Babe', 'Grandpa', - 'GrandpaFinality', 'FinalityTracker', 'Authorship'] + 'GrandpaFinality', 'FinalityTracker', 'Authorship', 'Staking'] # We definitely want to keep System.Account data and the Runtime :) enabled_prefixes = [ @@ -170,7 +170,7 @@ def populate_dev_chain(substrate, forked_storage, chain_name): # '0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8') # To prevent the validator set from changing mid-test, set Staking.ForceEra to ForceNone ('0x02') - base_storage['0x5f3e4907f716ac89b6347d15ececedcaf7dad0317324aecae8744b87fc95f2f3'] = '0x02' + # base_storage['0x5f3e4907f716ac89b6347d15ececedcaf7dad0317324aecae8744b87fc95f2f3'] = '0x02' # Write the updated base chain specification to a file with open(FORK_SPEC, 'w') as outfile: From 0e8240bb1b0cce6e0db4478a09b8d07c00ae91db Mon Sep 17 00:00:00 2001 From: zees-dev Date: Tue, 25 Jun 2024 15:27:45 +1200 Subject: [PATCH 101/112] CLI options for frontier sqlite backend (#855) * structs for frontier sqlite backend * cli options for frontier sqlite backend * impl support for frontier sqlite backend cli opts --- client/src/cli.rs | 39 +++++++++++++++++++- client/src/cli_opt.rs | 41 +++++++++++++++++++++ client/src/command.rs | 33 ++++++++++++----- client/src/main.rs | 1 + client/src/rpc.rs | 19 +++++----- client/src/service.rs | 85 +++++++++++++++++++++++++++++++------------ 6 files changed, 174 insertions(+), 44 deletions(-) create mode 100644 client/src/cli_opt.rs diff --git a/client/src/cli.rs b/client/src/cli.rs index 2956de1fd..e08b827a6 100644 --- a/client/src/cli.rs +++ b/client/src/cli.rs @@ -13,7 +13,7 @@ // limitations under the License. // You may obtain a copy of the License at the root of this project source code -use crate::custom_commands::VerifyProofSigSubCommand; +use crate::{cli_opt, custom_commands::VerifyProofSigSubCommand}; use clap::ArgAction; #[allow(missing_docs)] @@ -24,6 +24,27 @@ pub struct RunCmd { #[clap(flatten)] pub base: sc_cli::RunCmd, + /// Sets the frontier backend type (KeyValue or Sql) + #[arg(long, value_enum, ignore_case = true, default_value_t = cli_opt::FrontierBackendType::default())] + pub frontier_backend_type: cli_opt::FrontierBackendType, + + // Sets the SQL backend's pool size. + #[arg(long, default_value = "100")] + pub frontier_sql_backend_pool_size: u32, + + /// Sets the SQL backend's query timeout in number of VM ops. + #[arg(long, default_value = "10000000")] + pub frontier_sql_backend_num_ops_timeout: u32, + + /// Sets the SQL backend's auxiliary thread limit. + #[arg(long, default_value = "4")] + pub frontier_sql_backend_thread_count: u32, + + /// Sets the SQL backend's query timeout in number of VM ops. + /// Default value is 200MB. + #[arg(long, default_value = "209715200")] + pub frontier_sql_backend_cache_size: u64, + /// Maximum number of logs in a query (EVM). #[clap(long, default_value = "10000")] pub max_past_logs: u32, @@ -52,6 +73,22 @@ pub struct RunCmd { pub ethy_p2p: bool, } +impl RunCmd { + pub fn new_rpc_config(&self) -> cli_opt::RpcConfig { + cli_opt::RpcConfig { + frontier_backend_config: match self.frontier_backend_type { + cli_opt::FrontierBackendType::KeyValue => cli_opt::FrontierBackendConfig::KeyValue, + cli_opt::FrontierBackendType::Sql => cli_opt::FrontierBackendConfig::Sql { + pool_size: self.frontier_sql_backend_pool_size, + num_ops_timeout: self.frontier_sql_backend_num_ops_timeout, + thread_count: self.frontier_sql_backend_thread_count, + cache_size: self.frontier_sql_backend_cache_size, + }, + }, + } + } +} + #[derive(Debug, clap::Parser)] pub struct Cli { #[clap(subcommand)] diff --git a/client/src/cli_opt.rs b/client/src/cli_opt.rs new file mode 100644 index 000000000..9badbfe75 --- /dev/null +++ b/client/src/cli_opt.rs @@ -0,0 +1,41 @@ +// Copyright 2019-2022 PureStake Inc. +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + +/// Available frontier backend types. +#[derive(Debug, Copy, Clone, Default, clap::ValueEnum)] +pub enum FrontierBackendType { + /// Either RocksDb or ParityDb as per inherited from the global backend settings. + #[default] + KeyValue, + /// Sql database with custom log indexing. + Sql, +} + +/// Defines the frontier backend configuration. +pub enum FrontierBackendConfig { + KeyValue, + Sql { pool_size: u32, num_ops_timeout: u32, thread_count: u32, cache_size: u64 }, +} + +impl Default for FrontierBackendConfig { + fn default() -> FrontierBackendConfig { + FrontierBackendConfig::KeyValue + } +} + +pub struct RpcConfig { + pub frontier_backend_config: FrontierBackendConfig, +} diff --git a/client/src/command.rs b/client/src/command.rs index 855be0c52..f3bda13e8 100644 --- a/client/src/command.rs +++ b/client/src/command.rs @@ -71,33 +71,37 @@ pub fn run() -> sc_cli::Result<()> { }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; + let rpc_config = cli.run.new_rpc_config(); runner.async_run(|config| { let PartialComponents { client, task_manager, import_queue, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; Ok((cmd.run(client, import_queue), task_manager)) }) }, Some(Subcommand::ExportBlocks(cmd)) => { let runner = cli.create_runner(cmd)?; + let rpc_config = cli.run.new_rpc_config(); runner.async_run(|config| { let PartialComponents { client, task_manager, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; Ok((cmd.run(client, config.database), task_manager)) }) }, Some(Subcommand::ExportState(cmd)) => { let runner = cli.create_runner(cmd)?; + let rpc_config = cli.run.new_rpc_config(); runner.async_run(|config| { let PartialComponents { client, task_manager, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; Ok((cmd.run(client, config.chain_spec), task_manager)) }) }, Some(Subcommand::ImportBlocks(cmd)) => { let runner = cli.create_runner(cmd)?; + let rpc_config = cli.run.new_rpc_config(); runner.async_run(|config| { let PartialComponents { client, task_manager, import_queue, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; Ok((cmd.run(client, import_queue), task_manager)) }) }, @@ -107,9 +111,10 @@ pub fn run() -> sc_cli::Result<()> { }, Some(Subcommand::Revert(cmd)) => { let runner = cli.create_runner(cmd)?; + let rpc_config = cli.run.new_rpc_config(); runner.async_run(|config| { let PartialComponents { client, task_manager, backend, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; let aux_revert = Box::new(|client, _, blocks| { sc_consensus_grandpa::revert(client, blocks)?; Ok(()) @@ -143,7 +148,9 @@ pub fn run() -> sc_cli::Result<()> { cmd.run::(config) }, BenchmarkCmd::Block(cmd) => { - let PartialComponents { client, .. } = service::new_partial(&config, &cli)?; + let rpc_config = cli.run.new_rpc_config(); + let PartialComponents { client, .. } = + service::new_partial(&config, &cli, &rpc_config)?; cmd.run(client) }, #[cfg(not(feature = "runtime-benchmarks"))] @@ -153,15 +160,18 @@ pub fn run() -> sc_cli::Result<()> { ), #[cfg(feature = "runtime-benchmarks")] BenchmarkCmd::Storage(cmd) => { + let rpc_config = cli.run.new_rpc_config(); let PartialComponents { client, backend, .. } = - service::new_partial(&config, &cli)?; + service::new_partial(&config, &cli, &rpc_config)?; let db = backend.expose_db(); let storage = backend.expose_storage(); cmd.run(config, client, db, storage) }, BenchmarkCmd::Overhead(cmd) => { - let PartialComponents { client, .. } = service::new_partial(&config, &cli)?; + let rpc_config = cli.run.new_rpc_config(); + let PartialComponents { client, .. } = + service::new_partial(&config, &cli, &rpc_config)?; let ext_builder = RemarkBuilder::new(client.clone()); cmd.run( @@ -173,7 +183,9 @@ pub fn run() -> sc_cli::Result<()> { ) }, BenchmarkCmd::Extrinsic(cmd) => { - let PartialComponents { client, .. } = service::new_partial(&config, &cli)?; + let rpc_config = cli.run.new_rpc_config(); + let PartialComponents { client, .. } = + service::new_partial(&config, &cli, &rpc_config)?; // Register the *Remark* and *TKA* builders. let alice: sp_core::ecdsa::Pair = sp_core::ecdsa::Pair::from_string("//Alice", None).unwrap().into(); @@ -232,7 +244,8 @@ pub fn run() -> sc_cli::Result<()> { None => { let runner = cli.create_runner(&cli.run.base)?; runner.run_node_until_exit(|config| async move { - service::new_full(config, &cli).map_err(sc_cli::Error::Service) + let rpc_config = cli.run.new_rpc_config(); + service::new_full(config, &cli, &rpc_config).map_err(sc_cli::Error::Service) }) }, } diff --git a/client/src/main.rs b/client/src/main.rs index 2e72a352d..0aa09ad4f 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -21,6 +21,7 @@ mod chain_spec; mod service; mod benchmarking; mod cli; +mod cli_opt; mod command; mod consensus_data_providers; mod custom_commands; diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 1d83b932c..ca0c8ad7e 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -22,6 +22,8 @@ use std::{collections::BTreeMap, sync::Arc}; +use fp_rpc::EthereumRuntimeRPCApi; + use jsonrpsee::RpcModule; // Substrate use sc_client_api::{ @@ -44,7 +46,7 @@ use sp_blockchain::{ use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; use sp_keystore::KeystorePtr; -use sp_runtime::traits::BlakeTwo256; +use sp_runtime::traits::Block as BlockT; // Frontier use fc_rpc::{ @@ -136,16 +138,13 @@ pub struct FullDeps { pub eth_forced_parent_hashes: Option>, } -pub fn overrides_handle(client: Arc) -> Arc> +pub fn overrides_handle(client: Arc) -> Arc> where - C: ProvideRuntimeApi + StorageProvider + AuxStore, - C: HeaderBackend + HeaderMetadata, - C: Send + Sync + 'static, - C::Api: sp_api::ApiExt - + fp_rpc::EthereumRuntimeRPCApi - + fp_rpc::ConvertTransactionRuntimeApi, - BE: Backend + 'static, - BE::State: StateBackend, + B: BlockT, + C: ProvideRuntimeApi, + C::Api: EthereumRuntimeRPCApi, + C: HeaderBackend + StorageProvider + 'static, + BE: Backend + 'static, { // NB: the following is used to redefine storage schema after certain blocks // on live chains diff --git a/client/src/service.rs b/client/src/service.rs index 84a6b8376..8a5d1f77d 100644 --- a/client/src/service.rs +++ b/client/src/service.rs @@ -36,6 +36,7 @@ use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_runtime::{offchain::OffchainStorage, traits::BlakeTwo256}; use std::{ collections::BTreeMap, + path::Path, sync::{Arc, Mutex}, time::Duration, }; @@ -43,7 +44,11 @@ use std::{ use seed_primitives::{ethy::ETH_HTTP_URI, opaque::Block, XRP_HTTP_URI}; use seed_runtime::{self, RuntimeApi}; -use crate::{cli::Cli, consensus_data_providers::BabeConsensusDataProvider}; +use crate::{ + cli::Cli, + cli_opt::{FrontierBackendConfig, RpcConfig}, + consensus_data_providers::BabeConsensusDataProvider, +}; // Our native executor instance. pub struct ExecutorDispatch; @@ -90,6 +95,7 @@ pub fn frontier_database_dir(config: &Configuration, path: &str) -> std::path::P pub fn open_frontier_backend( client: Arc, config: &Configuration, + rpc_config: &RpcConfig, ) -> Result, String> where C: ProvideRuntimeApi + StorageProvider + AuxStore, @@ -99,32 +105,61 @@ where BE: Backend + 'static, BE::State: StateBackend, { - // TODO - take cli arg for frontier-backend-type and create accordingly. - Ok(fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( - client, - &fc_db::kv::DatabaseSettings { - source: match config.database { - DatabaseSource::RocksDb { .. } => DatabaseSource::RocksDb { - path: frontier_database_dir(config, "db"), - cache_size: 0, - }, - DatabaseSource::ParityDb { .. } => - DatabaseSource::ParityDb { path: frontier_database_dir(config, "paritydb") }, - DatabaseSource::Auto { .. } => DatabaseSource::Auto { - rocksdb_path: frontier_database_dir(config, "db"), - paritydb_path: frontier_database_dir(config, "paritydb"), - cache_size: 0, + let frontier_backend = match rpc_config.frontier_backend_config { + FrontierBackendConfig::KeyValue => + fc_db::Backend::KeyValue(fc_db::kv::Backend::::new( + client, + &fc_db::kv::DatabaseSettings { + source: match config.database { + DatabaseSource::RocksDb { .. } => DatabaseSource::RocksDb { + path: frontier_database_dir(config, "db"), + cache_size: 0, + }, + DatabaseSource::ParityDb { .. } => DatabaseSource::ParityDb { + path: frontier_database_dir(config, "paritydb"), + }, + DatabaseSource::Auto { .. } => DatabaseSource::Auto { + rocksdb_path: frontier_database_dir(config, "db"), + paritydb_path: frontier_database_dir(config, "paritydb"), + cache_size: 0, + }, + _ => + return Err( + "Supported db sources: `rocksdb` | `paritydb` | `auto`".to_string() + ), + }, }, - _ => - return Err("Supported db sources: `rocksdb` | `paritydb` | `auto`".to_string()), - }, + )?), + FrontierBackendConfig::Sql { pool_size, num_ops_timeout, thread_count, cache_size } => { + let overrides = crate::rpc::overrides_handle(client.clone()); + let sqlite_db_path = frontier_database_dir(config, "sql"); + std::fs::create_dir_all(&sqlite_db_path).expect("failed creating sql db directory"); + let backend = futures::executor::block_on(fc_db::sql::Backend::new( + fc_db::sql::BackendConfig::Sqlite(fc_db::sql::SqliteBackendConfig { + path: Path::new("sqlite:///") + .join(sqlite_db_path) + .join("frontier.db3") + .to_str() + .expect("frontier sql path error"), + create_if_missing: true, + thread_count, + cache_size, + }), + pool_size, + std::num::NonZeroU32::new(num_ops_timeout), + overrides.clone(), + )) + .unwrap_or_else(|err| panic!("failed creating sql backend: {:?}", err)); + fc_db::Backend::Sql(backend) }, - )?)) + }; + Ok(frontier_backend) } pub fn new_partial( config: &Configuration, cli: &Cli, + rpc_config: &RpcConfig, ) -> Result< sc_service::PartialComponents< FullClient, @@ -183,7 +218,7 @@ pub fn new_partial( client.clone(), ); - let frontier_backend = open_frontier_backend(client.clone(), config)?; + let frontier_backend = open_frontier_backend(client.clone(), config, rpc_config)?; let filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); @@ -252,7 +287,11 @@ pub fn new_partial( } /// Builds a new service for a full client. -pub fn new_full(config: Configuration, cli: &Cli) -> Result { +pub fn new_full( + config: Configuration, + cli: &Cli, + rpc_config: &RpcConfig, +) -> Result { let sc_service::PartialComponents { client, backend, @@ -270,7 +309,7 @@ pub fn new_full(config: Configuration, cli: &Cli) -> Result Date: Tue, 25 Jun 2024 15:29:36 +1200 Subject: [PATCH 102/112] XRPL e2e test improvements (#854) * added function to get prefix length * using getPrefixLength function to strip prefix length for extrinsic signing * can submit fee-proxy extrinsic xrpl test robustness, using dynamic asset id * updated xrpl ed25519 based signature e2e test * xrpl xaman futurepass fee-proxy proxy-extrinsic e2e test updated to use evm inner call * additional test to validate prefix length bounds --- e2e/test/XRPL.test.ts | 221 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 189 insertions(+), 32 deletions(-) diff --git a/e2e/test/XRPL.test.ts b/e2e/test/XRPL.test.ts index fc71eb5e5..0263d567b 100644 --- a/e2e/test/XRPL.test.ts +++ b/e2e/test/XRPL.test.ts @@ -1,10 +1,11 @@ import { ApiPromise, Keyring, WsProvider } from "@polkadot/api"; +import { SubmittableExtrinsic } from "@polkadot/api/types"; import type { KeyringPair } from "@polkadot/keyring/types"; import { DispatchError } from "@polkadot/types/interfaces"; import { hexToU8a } from "@polkadot/util"; import { expect } from "chai"; import { blake256 } from "codechain-primitives"; -import { BigNumber, Wallet } from "ethers"; +import { BigNumber, Wallet, utils } from "ethers"; import { computePublicKey, keccak256 } from "ethers/lib/utils"; import { encode, encodeForSigning } from "ripple-binary-codec"; import { deriveAddress, sign } from "ripple-keypairs"; @@ -13,8 +14,10 @@ import * as AccountLib from "xrpl-accountlib"; import { ALITH_PRIVATE_KEY, + ERC20_ABI, GAS_TOKEN_ID, NodeProcess, + assetIdToERC20ContractAddress, finalizeTx, getNextAssetId, poolAddress, @@ -54,7 +57,7 @@ describe("XRPL pallet", () => { // genesis hash for mock runtime tests genesisHash = "0000000000000000000000000000000000000000000000000000000000000000"; const extrinsic = api.tx.system.remark("Mischief Managed"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const xamanJsonTx = { AccountTxnID: "16969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580", @@ -99,7 +102,7 @@ describe("XRPL pallet", () => { genesisHash = "0000000000000000000000000000000000000000000000000000000000000000"; const extrinsic = api.tx.system.remark("Mischief Managed"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const xamanJsonTx = { AccountTxnID: "16969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580", @@ -133,7 +136,7 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, user.address, 1_000_000)); const extrinsic = api.tx.system.remark("hello world"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xrpBalanceBefore = @@ -232,7 +235,7 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, eoa, 2_000_000)); const extrinsic = api.tx.system.remark("Mischief Managed"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const nonce = ((await api.query.system.account(eoa)).toJSON() as any)?.nonce; @@ -304,8 +307,80 @@ describe("XRPL pallet", () => { const xrpBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, eoa)).toJSON() as any)?.balance ?? 0; expect(xrpBalanceAfter).to.be.lessThan(xrpBalanceBefore); expect(xrpBalanceBefore - xrpBalanceAfter) - .to.greaterThan(800_000) - .and.lessThan(815_000); + .to.greaterThan(835_000) + .and.lessThan(850_000); + }); + + it("can submit system remark extrinsic of differing lengths", async () => { + const publicKey = computePublicKey(alith.publicKey, true); + + let extrinsic = api.tx.system.remark("z".repeat(59)); // length = 63; encoded length = 64 + expect(extrinsic.length).to.equal(63); + expect(extrinsic.encodedLength).to.equal(64); + expect(getPrefixLength(extrinsic)).to.equal(6); + let hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); + let maxBlockNumber = +(await api.query.system.number()).toString() + 5; + let nonce = ((await api.query.system.account(alith.address)).toJSON() as any)?.nonce; + let xamanJsonTx = { + AccountTxnID: "16969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580", + SigningPubKey: publicKey.slice(2), + Account: deriveAddress(publicKey.slice(2)), + Memos: [ + { + Memo: { + MemoType: stringToHex("extrinsic"), + // remove `0x` from extrinsic hex string + MemoData: stringToHex(`${genesisHash}:${nonce}:${maxBlockNumber}:0:${hashedExtrinsicWithoutPrefix}`), + }, + }, + ], + }; + + // sign xaman tx + let message = encode(xamanJsonTx); + let encodedSigningMessage = encodeForSigning(xamanJsonTx); + let signature = sign(encodedSigningMessage, ALITH_PRIVATE_KEY.slice(2)); + // execute xaman tx extrinsic + await new Promise(async (resolve) => { + await api.tx.xrpl.transact(`0x${message}`, `0x${signature}`, extrinsic).send(({ events = [], status }) => { + if (status.isInBlock) resolve(events); + }); + }); + + extrinsic = api.tx.system.remark("z".repeat(60)); // length = 64; encoded length = 66 + expect(extrinsic.length).to.equal(64); + expect(extrinsic.encodedLength).to.equal(66); + expect(getPrefixLength(extrinsic)).to.equal(8); + hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); + maxBlockNumber = +(await api.query.system.number()).toString() + 5; + nonce = ((await api.query.system.account(alith.address)).toJSON() as any)?.nonce; + xamanJsonTx = { + AccountTxnID: "16969036626990000000000000000000F236FD752B5E4C84810AB3D41A3C2580", + SigningPubKey: publicKey.slice(2), + Account: deriveAddress(publicKey.slice(2)), + Memos: [ + { + Memo: { + MemoType: stringToHex("extrinsic"), + // remove `0x` from extrinsic hex string + MemoData: stringToHex(`${genesisHash}:${nonce}:${maxBlockNumber}:0:${hashedExtrinsicWithoutPrefix}`), + }, + }, + ], + }; + + // sign xaman tx + message = encode(xamanJsonTx); + encodedSigningMessage = encodeForSigning(xamanJsonTx); + signature = sign(encodedSigningMessage, ALITH_PRIVATE_KEY.slice(2)); + // execute xaman tx extrinsic + const events = await new Promise(async (resolve) => { + await api.tx.xrpl.transact(`0x${message}`, `0x${signature}`, extrinsic).send(({ events = [], status }) => { + if (status.isInBlock) resolve(events); + }); + }); + // events.forEach(({ event: { data, method, section } }) => console.log(`${section}\t${method}\t${data}`)); + expect(events.length).to.equal(5); }); it("can submit system remark extrinsic with tip", async () => { @@ -316,7 +391,7 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, user.address, 2_000_000)); const extrinsic = api.tx.system.remark("hello world"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xrpBalanceBefore = @@ -408,7 +483,7 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.assets.transfer(GAS_TOKEN_ID, user.address, 10_000_000)); const extrinsic = api.tx.assets.transfer(GAS_TOKEN_ID, alith.address, 1000); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xrpBalanceBefore = @@ -503,13 +578,13 @@ describe("XRPL pallet", () => { const publicKey = computePublicKey(user.publicKey, true); // add liquidity for XRP<->token; fund user account with tokens - const FEE_TOKEN_ASSET_ID = 1124; + const nextAssetId = await getNextAssetId(api); const txs = [ api.tx.assetsExt.createAsset("test", "TEST", 18, 1, alith.address), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, alith.address, 2_000_000_000_000_000), - api.tx.assets.mint(FEE_TOKEN_ASSET_ID, user.address, 2_000_000_000_000_000), + api.tx.assets.mint(nextAssetId, alith.address, 2_000_000_000_000_000), + api.tx.assets.mint(nextAssetId, user.address, 2_000_000_000_000_000), api.tx.dex.addLiquidity( - FEE_TOKEN_ASSET_ID, + nextAssetId, GAS_TOKEN_ID, 100_000_000_000, 100_000_000_000, @@ -524,15 +599,15 @@ describe("XRPL pallet", () => { const innerCall = api.tx.system.remark("sup"); const maxTokenPayment = 2_000_000; - const extrinsic = api.tx.feeProxy.callWithFeePreferences(FEE_TOKEN_ASSET_ID, maxTokenPayment, innerCall); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const extrinsic = api.tx.feeProxy.callWithFeePreferences(nextAssetId, maxTokenPayment, innerCall); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const nonce = ((await api.query.system.account(user.address)).toJSON() as any)?.nonce; const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xrpUserBalanceBefore = ((await api.query.assets.account(GAS_TOKEN_ID, user.address)).toJSON() as any)?.balance ?? 0; const assetUserBalanceBefore = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(nextAssetId, user.address)).toJSON() as any)?.balance ?? 0, ); const xamanJsonTx = { @@ -574,7 +649,7 @@ describe("XRPL pallet", () => { // assets Transferred [1124,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac","0xDDDDDDdD00000002000004640000000000000000",727237] expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Transferred"); - expect(events[index].event.data[0]).to.equal(FEE_TOKEN_ASSET_ID); + expect(events[index].event.data[0]).to.equal(nextAssetId); expect(events[index].event.data[1].toString()).to.equal(user.address); // assets Transferred [2,"0xDDDDDDdD00000002000004640000000000000000","0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",725039] @@ -582,21 +657,21 @@ describe("XRPL pallet", () => { expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Transferred"); expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); - expect(events[index].event.data[1].toString()).to.equal("0xDDDDDDdD00000002000004640000000000000000"); + expect(events[index].event.data[1].toString()).to.equal(poolAddress(GAS_TOKEN_ID, nextAssetId)); expect(events[index].event.data[2].toString()).to.equal(user.address); // assets Issued [2148,"0x6D6F646c7478666565706F740000000000000000",181] index += 1; expect(events[index].event.section).to.equal("assets"); expect(events[index].event.method).to.equal("Issued"); - expect(events[index].event.data[0]).to.equal(2148); + // expect(events[index].event.data[0]).to.equal(nextAssetId); // pool token id // dex Swap ["0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",[1124,2],727237,725039,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac"] index += 1; expect(events[index].event.section).to.equal("dex"); expect(events[index].event.method).to.equal("Swap"); expect(events[index].event.data[0].toString()).to.equal(user.address); - expect(events[index].event.data[1].toString()).to.equal(`[${FEE_TOKEN_ASSET_ID}, ${GAS_TOKEN_ID}]`); + expect(events[index].event.data[1].toString()).to.equal(`[${nextAssetId}, ${GAS_TOKEN_ID}]`); // assetsExt InternalWithdraw [2,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",725039] index += 1; @@ -610,7 +685,7 @@ describe("XRPL pallet", () => { expect(events[index].event.section).to.equal("feeProxy"); expect(events[index].event.method).to.equal("CallWithFeePreferences"); expect(events[index].event.data[0].toString()).to.equal(user.address); - expect(events[index].event.data[1]).to.equal(FEE_TOKEN_ASSET_ID); + expect(events[index].event.data[1]).to.equal(nextAssetId); expect(events[index].event.data[2]).to.equal(maxTokenPayment); // xrpl XRPLExtrinsicExecuted ["0x02509540919faacf9ab52146c9aa40db68172d83777250b28e4679176e49ccdd9f","0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac","rDyqBotBNJeXv8PBHY18ABjyw6FQuWXQnu",{"callIndex":"0x1f00","args":{"payment_asset":1124,"max_payment":2000000,"call":{"callIndex":"0x0001","args":{"remark":"0x737570"}}}}] @@ -645,7 +720,7 @@ describe("XRPL pallet", () => { // assert token balance after < balance before (tx fee must be paid in asset) const assetUserBalanceAfter = BigNumber.from( - ((await api.query.assets.account(FEE_TOKEN_ASSET_ID, user.address)).toJSON() as any)?.balance ?? 0, + ((await api.query.assets.account(nextAssetId, user.address)).toJSON() as any)?.balance ?? 0, ); expect(assetUserBalanceAfter).to.be.lessThan(assetUserBalanceBefore); }); @@ -665,7 +740,7 @@ describe("XRPL pallet", () => { // futurepass balance transfer back to alice - in xaman encoded extrinsic const innerCall = api.tx.assets.transfer(GAS_TOKEN_ID, alith.address, 1000); const extrinsic = api.tx.futurepass.proxyExtrinsic(futurepassAddress, innerCall); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xrpUserBalanceBefore = @@ -773,7 +848,7 @@ describe("XRPL pallet", () => { .and.lessThan(940_000); }); - it("can submit futurepass fee-proxy proxy-extrinsic", async () => { + it("can submit futurepass fee-proxy proxy-extrinsic evm call", async () => { const user = Wallet.createRandom(); const publicKey = computePublicKey(user.publicKey, true); @@ -802,11 +877,31 @@ describe("XRPL pallet", () => { await finalizeTx(alith, api.tx.utility.batch(txs)); // console.log("liquidity setup complete..."); - const innerCall = api.tx.system.remark("sup"); + const maxFeePerGas = "15000000000000"; + const iface = new utils.Interface(ERC20_ABI); + const txData = iface.encodeFunctionData("transfer", [alith.address, 100]); + const to = assetIdToERC20ContractAddress(paymentToken); + const gasLimit = await api.rpc.eth.estimateGas({ + to, + from: futurepassAddress, + data: txData, + }); + // evm call to transfer tokens from futurepass to alith + const innerCall = api.tx.evm.call( + futurepassAddress, + to, + txData, + 0, // value + gasLimit, + maxFeePerGas, + 0, // max priority fee + null, // nonce + [], // access list + ); const futurepassCall = api.tx.futurepass.proxyExtrinsic(futurepassAddress, innerCall); const maxTokenPayment = 5_000_000; const extrinsic = api.tx.feeProxy.callWithFeePreferences(paymentToken, maxTokenPayment, futurepassCall); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const nonce = ((await api.query.system.account(user.address)).toJSON() as any)?.nonce; const maxBlockNumber = +(await api.query.system.number()).toString() + 5; @@ -842,7 +937,7 @@ describe("XRPL pallet", () => { const signature = sign(encodedSigningMessage, user.privateKey.slice(2)); const cost = await api.tx.xrpl.transact(`0x${message}`, `0x${signature}`, extrinsic).paymentInfo(futurepassAddress); - expect(cost.partialFee.toNumber()).to.be.greaterThan(1_150_000).and.lessThan(1_165_000); + expect(cost.partialFee.toNumber()).to.be.greaterThan(1_685_000).and.lessThan(1_700_000); // execute xaman tx extrinsic const events = await new Promise(async (resolve) => { @@ -854,7 +949,7 @@ describe("XRPL pallet", () => { // events.forEach(({ event: { data, method, section } }) => console.log(`${section}\t${method}\t${data}`)); // assert events - expect(events.length).to.equal(12); + expect(events.length).to.equal(18); let index = 0; // assets Transferred [1124,"0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac","0xDDDDDDdD00000002000004640000000000000000",727237] @@ -893,6 +988,63 @@ describe("XRPL pallet", () => { expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); expect(events[index].event.data[1].toString()).to.equal(futurepassAddress); + // assetsExt InternalWithdraw [2,"0xFFffFFFF00000000000000000000000000000004",654735] + index += 1; + expect(events[index].event.section).to.equal("assetsExt"); + expect(events[index].event.method).to.equal("InternalWithdraw"); + expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); + expect(events[index].event.data[1].toString()).to.equal(futurepassAddress); + + // assets Transferred [15460,"0xfFFFFfff00000000000000000000000000000008","0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac",100] + index += 1; + expect(events[index].event.section).to.equal("assets"); + expect(events[index].event.method).to.equal("Transferred"); + expect(events[index].event.data[0]).to.equal(paymentToken); + expect(events[index].event.data[1].toString()).to.equal(futurepassAddress); + expect(events[index].event.data[2].toString()).to.equal(alith.address); + expect(events[index].event.data[3]).to.equal(100); + + // assetsExt InternalDeposit [2,"0xFFffFFFF00000000000000000000000000000004",32025] + index += 1; + expect(events[index].event.section).to.equal("assetsExt"); + expect(events[index].event.method).to.equal("InternalDeposit"); + expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); + expect(events[index].event.data[1].toString()).to.equal(futurepassAddress); + + // assetsExt InternalDeposit [2,"0x6D6F646c7478666565706F740000000000000000",622710] + index += 1; + expect(events[index].event.section).to.equal("assetsExt"); + expect(events[index].event.method).to.equal("InternalDeposit"); + expect(events[index].event.data[0]).to.equal(GAS_TOKEN_ID); + + // evm Log [ + // { + // "address":"0xcccccccc00001c64000000000000000000000000", + // "topics": [ + // "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + // "0x000000000000000000000000ffffffff00000000000000000000000000000004", + // "0x000000000000000000000000f24ff3a9cf04c71dbc94d0b566f7a27b94566cac" + // ], + // "data":"0x0000000000000000000000000000000000000000000000000000000000000064", + // } + // ] + index += 1; + expect(events[index].event.section).to.equal("evm"); + expect(events[index].event.method).to.equal("Log"); + const logData = JSON.parse(events[index].event.data[0]); + // console.log(logData) + expect(to).to.equal(Web3.utils.toChecksumAddress(logData.address)); + expect("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef").to.equal(logData.topics[0]); + expect(futurepassAddress).to.equal(Web3.utils.toChecksumAddress("0x" + logData.topics[1].slice(26))); + expect(alith.address).to.equal(Web3.utils.toChecksumAddress("0x" + logData.topics[2].slice(26))); + expect(100).to.equal(parseInt(logData.data)); // amount + + // evm Executed ["0xcccccccc00001c64000000000000000000000000"] + index += 1; + expect(events[index].event.section).to.equal("evm"); + expect(events[index].event.method).to.equal("Executed"); + expect(to).to.equal(Web3.utils.toChecksumAddress(events[index].event.data[0].toString())); + // proxy ProxyExecuted [{"ok":null}] index += 1; expect(events[index].event.section).to.equal("proxy"); @@ -951,7 +1103,7 @@ describe("XRPL pallet", () => { // futurepass xrp balance should not change since tx fees paid by futurepass in asset const xrpFPBalanceAfter = ((await api.query.assets.account(GAS_TOKEN_ID, futurepassAddress)).toJSON() as any)?.balance ?? 0; - expect(xrpFPBalanceAfter).to.be.eq(xrpFPBalanceBefore + 1); // 1 is existential deposit + expect(xrpFPBalanceAfter).to.be.eq(xrpFPBalanceBefore + 32025 + 1); // 32025= fee-proxy swap-excess, 1 is ED // assert futurepass token balance after < balance before (tx fee must be paid in asset by futurepass) const assetFPBalanceAfter = BigNumber.from( @@ -975,7 +1127,7 @@ describe("XRPL pallet", () => { ); const extrinsic = api.tx.system.remark("hello world"); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); // try remark with maintenance mode pallet blocked { @@ -1075,7 +1227,7 @@ describe("XRPL pallet", () => { const innerCall = api.tx.system.remark("hello world"); const extrinsic = api.tx.futurepass.proxyExtrinsic(user.address, innerCall); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xamanJsonTx = { @@ -1119,7 +1271,7 @@ describe("XRPL pallet", () => { const innerCall = api.tx.system.remark("hello world"); const extrinsic = api.tx.xrpl.transact(`0x00000000`, `0x00000000`, innerCall); - const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(6)).toString(); + const hashedExtrinsicWithoutPrefix = blake256(extrinsic.toHex().slice(getPrefixLength(extrinsic))).toString(); const maxBlockNumber = +(await api.query.system.number()).toString() + 5; const xamanJsonTx = { @@ -1157,3 +1309,8 @@ describe("XRPL pallet", () => { expect(errorFound).to.be.true; }); }); + +function getPrefixLength(encoded: SubmittableExtrinsic): number { + if (encoded.encodedLength < 66) return 6; + return 8; +} From 8543c734d02c8a52a2dcbe2a95bf86470e417b3b Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:40:23 +1200 Subject: [PATCH 103/112] Update FeeControl values as same as the mainnet (#856) * Update FeeControl configs as same as the mainnet. * Add cost figures --- e2e/test/Dex/TxCosts.md | 21 +++++++-------- e2e/test/ERC1155/TxCosts.md | 29 +++++++++++---------- e2e/test/ERC20/TxCosts.md | 17 +++++++------ e2e/test/ERC721/TxCosts.md | 33 ++++++++++++------------ e2e/test/Futurepass/TxCosts.md | 25 +++++++++--------- e2e/test/MarketPlace/TxCosts.md | 45 +++++++++++++++++---------------- pallet/common/src/lib.rs | 11 ++++---- 7 files changed, 94 insertions(+), 87 deletions(-) diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index dad46e37d..53039407e 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -1,21 +1,22 @@ ## Generated tx costs(Gas) for Dex Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :----------------------- | :----------: | :------------: | :-----------------------: | -| addLiquidity | 217853 | 122103 | 28027 | -| removeLiquidity | 183441 | 86009 | 23350 | -| swapExactTokensForTokens | 150598 | 70507 | 23345 | -| swapTokensForExactTokens | 150743 | 71568 | 25012 | +|:-------------------------|:------------:|:--------------:|:-------------------------:| +| addLiquidity | 217853 | 122103 | 52139 | +| removeLiquidity | 183441 | 86009 | 34620 | +| swapExactTokensForTokens | 150598 | 70507 | 26392 | +| swapTokensForExactTokens | 150743 | 71568 | 27375 | | quote | 23716 | 22377 | 0 | | getAmountOut | 26047 | 22447 | 0 | | getAmountsOut | 43843 | 42619 | 0 | | getAmountsIn | 44058 | 42611 | 0 | + ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :----------------------- | :-------------------: | :---------------------: | :--------------------: | -| addLiquidity | 2968616 | 1807995 | 420415 | -| removeLiquidity | 2365301 | 1260861 | 350263 | -| swapExactTokensForTokens | 2185298 | 985238 | 350186 | -| swapTokensForExactTokens | 2187623 | 1004110 | 375190 | +|:-------------------------|:---------------------:|:-----------------------:|:----------------------:| +| addLiquidity | 1484456 | 904088 | 391044 | +| removeLiquidity | 1182769 | 630493 | 259652 | +| swapExactTokensForTokens | 1092758 | 492668 | 197943 | +| swapTokensForExactTokens | 1093921 | 502105 | 205316 | diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index 2792d010c..823305ccc 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -1,26 +1,27 @@ ## Generated tx costs(Gas) for ERC1155 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :-------------------- | :----------: | :------------: | :-----------------------: | +|:----------------------|:------------:|:--------------:|:-------------------------:| | uri | 27560 | 22400 | 0 | | balanceOf | 25957 | 22433 | 0 | | balanceOfBatch | 32585 | 24106 | 0 | | setApprovalForAll | 47025 | 27501 | 0 | | isApprovedForAll | 26076 | 23184 | 0 | -| safeTransferFrom | 59163 | 32160 | 23335 | -| safeBatchTransferFrom | 50205 | 35812 | 26670 | -| mint | 33152 | 32245 | 23503 | -| mintBatch | 42210 | 32633 | 26836 | -| burn | 32581 | 27608 | 20002 | -| burnBatch | 38043 | 31828 | 23335 | +| safeTransferFrom | 59163 | 32160 | 10552 | +| safeBatchTransferFrom | 50205 | 35812 | 13298 | +| mint | 33152 | 32245 | 11374 | +| mintBatch | 42210 | 32633 | 12307 | +| burn | 32581 | 27608 | 9631 | +| burnBatch | 38043 | 31828 | 10564 | + ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :-------------------- | :-------------------: | :---------------------: | :--------------------: | -| safeTransferFrom | 880468 | 462181 | 350038 | -| safeBatchTransferFrom | 728112 | 535973 | 400055 | -| mint | 493954 | 464911 | 352545 | -| mintBatch | 589858 | 477332 | 402545 | -| burn | 475652 | 407185 | 300038 | -| burnBatch | 569231 | 451575 | 350038 | +|:----------------------|:---------------------:|:-----------------------:|:----------------------:| +| safeTransferFrom | 440278 | 231113 | 79145 | +| safeBatchTransferFrom | 364092 | 268013 | 99741 | +| mint | 247001 | 232478 | 85307 | +| mintBatch | 294958 | 238690 | 92307 | +| burn | 237850 | 203613 | 72233 | +| burnBatch | 284644 | 225810 | 79233 | diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index 22633816e..86453a39c 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -1,21 +1,22 @@ ## Generated tx costs(Gas) for ERC20 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :------------ | :----------: | :------------: | :-----------------------: | +|:--------------|:------------:|:--------------:|:-------------------------:| | totalSupply | 23717 | 22388 | 0 | | balanceOf | 25860 | 23974 | 0 | | allowance | 26064 | 23273 | 0 | -| approval | 47152 | 26470 | 20170 | -| transfer | 52698 | 43641 | 20172 | -| transferFrom | 44716 | 51726 | 23340 | +| approval | 47152 | 26470 | 11782 | +| transfer | 52698 | 43641 | 15507 | +| transferFrom | 44716 | 51726 | 18731 | | name | 25926 | 22388 | 0 | | decimals | 22354 | 22388 | 0 | | symbol | 25945 | 22388 | 0 | + ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :------------ | :-------------------: | :---------------------: | :--------------------: | -| approval | 702835 | 396804 | 302557 | -| transfer | 781323 | 622692 | 302592 | -| transferFrom | 647164 | 760526 | 350114 | +|:--------------|:---------------------:|:-----------------------:|:----------------------:| +| approval | 351452 | 198422 | 88369 | +| transfer | 390700 | 311427 | 116305 | +| transferFrom | 323614 | 380276 | 140487 | diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index cf34e4679..f5df046fb 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -1,32 +1,33 @@ ## Generated tx costs(Gas) for ERC721 Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :---------------- | :----------: | :------------: | :-----------------------: | +|:------------------|:------------:|:--------------:|:-------------------------:| | balanceOf | 25895 | 23274 | 0 | | ownerOf | 25847 | 23242 | 0 | | getApproved | 27395 | 23242 | 0 | | isApprovedForAll | 26082 | 23973 | 0 | -| mint | 53193 | 31731 | 17336 | -| burn | 37870 | 35731 | 17170 | -| approve | 50740 | 28884 | 23835 | -| setApprovalForAll | 47011 | 26467 | 23335 | +| mint | 53193 | 31731 | 9216 | +| burn | 37870 | 35731 | 10523 | +| approve | 50740 | 28884 | 10852 | +| setApprovalForAll | 47011 | 26467 | 9700 | | safetransferFrom | 67181 | 36625 | 0 | -| transferFrom | 66839 | 35560 | 20670 | +| transferFrom | 66839 | 35560 | 11585 | | name | 25932 | 22388 | 0 | | symbol | 25938 | 22388 | 0 | | tokenURI | 25964 | 23242 | 0 | | owner | 23728 | 22388 | 0 | -| transferOwnership | 29147 | 28498 | 19835 | -| renounceOwnership | 30272 | 28372 | 19835 | +| transferOwnership | 29147 | 28498 | 9501 | +| renounceOwnership | 30272 | 28372 | 9455 | + ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :---------------- | :-------------------: | :---------------------: | :--------------------: | -| mint | 791884 | 448454 | 260041 | -| burn | 490684 | 533648 | 257553 | -| approve | 739543 | 430633 | 357539 | -| setApprovalForAll | 699609 | 396639 | 350030 | -| transferFrom | 884488 | 528637 | 310054 | -| transferOwnership | 436153 | 424962 | 297536 | -| renounceOwnership | 352310 | 419621 | 297536 | +|:------------------|:---------------------:|:-----------------------:|:----------------------:| +| mint | 395981 | 224249 | 69126 | +| burn | 245366 | 266850 | 78929 | +| approve | 369808 | 215338 | 81394 | +| setApprovalForAll | 349839 | 198339 | 72754 | +| transferFrom | 442288 | 264345 | 86893 | +| transferOwnership | 218098 | 212502 | 71263 | +| renounceOwnership | 176172 | 209831 | 70913 | diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index b3e62bf4f..9b8509650 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -1,19 +1,20 @@ ## Generated tx costs(Gas) for Futurepass Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :---------------------------- | :----------: | :------------: | :-----------------------: | -| create | 0 | 45155 | 19173 | -| registerDelegateWithSignature | 0 | 46072 | 34006 | -| unregisterDelegate | 0 | 43622 | 22339 | -| transferOwnership | 0 | 52086 | 22508 | -| proxyCall | 0 | 65694 | 24009 | +|:------------------------------|:------------:|:--------------:|:-------------------------:| +| create | 0 | 45155 | 16355 | +| registerDelegateWithSignature | 0 | 46056 | 20190 | +| unregisterDelegate | 0 | 43622 | 16203 | +| transferOwnership | 0 | 52086 | 20410 | +| proxyCall | 0 | 65694 | 21155 | + ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :---------------------------- | :-------------------: | :---------------------: | :--------------------: | -| create | 0 | 657200 | 287602 | -| registerDelegateWithSignature | 0 | 678157 | 510100 | -| unregisterDelegate | 0 | 622142 | 335093 | -| transferOwnership | 0 | 768256 | 337632 | -| proxyCall | 0 | 899654 | 360135 | +|:------------------------------|:---------------------:|:-----------------------:|:----------------------:| +| create | 0 | 328633 | 122663 | +| registerDelegateWithSignature | 0 | 338932 | 151432 | +| unregisterDelegate | 0 | 311102 | 121523 | +| transferOwnership | 0 | 384166 | 153079 | +| proxyCall | 0 | 449872 | 158668 | diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index afe59c956..f1c8f7fcc 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -1,29 +1,30 @@ ## Generated tx costs(Gas) for Marketplace Precompiles | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | -| :------------------ | :----------: | :------------: | :-----------------------: | -| registerMarketplace | 0 | 32307 | 20003 | -| sellNft | 0 | 55445 | 27175 | -| auctionNft | 0 | 55709 | 23675 | -| makeSimpleOffer | 0 | 60972 | 28011 | -| buy | 0 | 50424 | 85174 | -| bid | 0 | 61632 | 687845 | -| cancelSale | 0 | 38090 | 18505 | -| updateFixedPrice | 0 | 29163 | 21169 | -| acceptOffer | 0 | 74959 | 17174 | -| cancelOffer | 0 | 56308 | 17169 | +|:--------------------|:------------:|:--------------:|:-------------------------:| +| registerMarketplace | 0 | 32307 | 10843 | +| sellNft | 0 | 55445 | 22404 | +| auctionNft | 0 | 55709 | 21416 | +| makeSimpleOffer | 0 | 60972 | 37599 | +| buy | 0 | 50424 | 151674 | +| bid | 0 | 61632 | 1358014 | +| cancelSale | 0 | 38090 | 13321 | +| updateFixedPrice | 0 | 29163 | 9867 | +| acceptOffer | 0 | 74959 | 27394 | +| cancelOffer | 0 | 56308 | 20784 | + ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | -| :------------------ | :-------------------: | :---------------------: | :--------------------: | -| registerMarketplace | 0 | 466921 | 300049 | -| sellNft | 0 | 816231 | 407639 | -| auctionNft | 0 | 821662 | 355139 | -| makeSimpleOffer | 0 | 1010831 | 420171 | -| buy | 0 | 1732808 | 1277623 | -| bid | 0 | 10924137 | 10317675 | -| cancelSale | 0 | 570522 | 277576 | -| updateFixedPrice | 0 | 436768 | 317537 | -| acceptOffer | 0 | 1064301 | 257612 | -| cancelOffer | 0 | 833923 | 257549 | +|:--------------------|:---------------------:|:-----------------------:|:----------------------:| +| registerMarketplace | 0 | 233484 | 81325 | +| sellNft | 0 | 408156 | 168036 | +| auctionNft | 0 | 410872 | 160620 | +| makeSimpleOffer | 0 | 555461 | 281997 | +| buy | 0 | 1366440 | 1137559 | +| bid | 0 | 10462114 | 10185109 | +| cancelSale | 0 | 285289 | 99912 | +| updateFixedPrice | 0 | 218406 | 74004 | +| acceptOffer | 0 | 532153 | 205460 | +| cancelOffer | 0 | 416953 | 155886 | diff --git a/pallet/common/src/lib.rs b/pallet/common/src/lib.rs index a17e77666..b48c9574f 100644 --- a/pallet/common/src/lib.rs +++ b/pallet/common/src/lib.rs @@ -371,15 +371,16 @@ pub trait FeeConfig { impl FeeConfig for () { fn evm_base_fee_per_gas() -> U256 { // Floor network base fee per gas - // 0.000015 XRP per gas, 15000 GWEI - U256::from(15_000_000_000_000u128) + // set the same values as the mainnet. 7,500 GWEI. + // This will result a transfer tx costs 0.0000075*21000 = 0.1575 XRP + U256::from(7_500_000_000_000u128) } fn weight_multiplier() -> Perbill { - Perbill::from_parts(125) - } + Perbill::from_parts(100_000) + } // 0.01% fn length_multiplier() -> Balance { - Balance::from(2_500u32) + Balance::from(350u32) } } From e9d85ee9d5559d41d0c101e2ac8e273bb6e7323e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:24:04 +1200 Subject: [PATCH 104/112] Eth `BLOCK_GAS_LIMIT` Optimizations (#853) * pallet-evm benchmarks * Switch to BLOCK_GAS_LIMIT. * Remove redundant code. * Increase BLOCK_GAS_LIMIT to 150mil * Update the BLOCK_GAS_LIMIT to 14_800_000 * Add new cost figures. * Update the BLOCK_GAS_LIMIT to 15m * Cost figures added. * Add cost numbers. (#858) --- e2e/test/Dex/Dex.TxCosts.test.ts | 2 +- e2e/test/Dex/TxCosts.md | 26 ++++++------- e2e/test/ERC1155/TxCosts.md | 34 ++++++++--------- e2e/test/ERC20/TxCosts.md | 22 +++++------ e2e/test/ERC721/TxCosts.md | 46 +++++++++++------------ e2e/test/Futurepass/TxCosts.md | 20 +++++----- e2e/test/MarketPlace/TxCosts.md | 40 ++++++++++---------- runtime/src/lib.rs | 63 ++++++++++---------------------- 8 files changed, 114 insertions(+), 139 deletions(-) diff --git a/e2e/test/Dex/Dex.TxCosts.test.ts b/e2e/test/Dex/Dex.TxCosts.test.ts index 7005b255f..629acb2e3 100644 --- a/e2e/test/Dex/Dex.TxCosts.test.ts +++ b/e2e/test/Dex/Dex.TxCosts.test.ts @@ -216,7 +216,7 @@ describe("Dex Gas Estimation", function () { after(async () => { saveTxGas(allCosts, "Dex/TxCosts.md", "Dex Precompiles"); - saveTxFees(allTxFeeCosts, "Dex/TxCosts.md", "ERC20 Precompiles"); + saveTxFees(allTxFeeCosts, "Dex/TxCosts.md", "Dex Precompiles"); await node.stop(); }); diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index 53039407e..7479496da 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -2,21 +2,21 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:-------------------------|:------------:|:--------------:|:-------------------------:| -| addLiquidity | 217853 | 122103 | 52139 | -| removeLiquidity | 183441 | 86009 | 34620 | -| swapExactTokensForTokens | 150598 | 70507 | 26392 | -| swapTokensForExactTokens | 150743 | 71568 | 27375 | -| quote | 23716 | 22377 | 0 | -| getAmountOut | 26047 | 22447 | 0 | -| getAmountsOut | 43843 | 42619 | 0 | -| getAmountsIn | 44058 | 42611 | 0 | +| addLiquidity | 198248 | 89797 | 52137 | +| removeLiquidity | 171138 | 69284 | 34619 | +| swapExactTokensForTokens | 134389 | 52657 | 26391 | +| swapTokensForExactTokens | 134532 | 53269 | 27374 | +| quote | 44688 | 22377 | 0 | +| getAmountOut | 44688 | 22423 | 0 | +| getAmountsOut | 120661 | 34893 | 0 | +| getAmountsIn | 120661 | 34886 | 0 | -## Generated tx costs(fees) for ERC20 Precompiles +## Generated tx costs(fees) for Dex Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:-------------------------|:---------------------:|:-----------------------:|:----------------------:| -| addLiquidity | 1484456 | 904088 | 391044 | -| removeLiquidity | 1182769 | 630493 | 259652 | -| swapExactTokensForTokens | 1092758 | 492668 | 197943 | -| swapTokensForExactTokens | 1093921 | 502105 | 205316 | +| addLiquidity | 1341853 | 664167 | 391030 | +| removeLiquidity | 1074942 | 481791 | 259644 | +| swapExactTokensForTokens | 971294 | 390258 | 197937 | +| swapTokensForExactTokens | 972456 | 396791 | 205309 | diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index 823305ccc..863a94159 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -2,26 +2,26 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:----------------------|:------------:|:--------------:|:-------------------------:| -| uri | 27560 | 22400 | 0 | -| balanceOf | 25957 | 22433 | 0 | -| balanceOfBatch | 32585 | 24106 | 0 | -| setApprovalForAll | 47025 | 27501 | 0 | -| isApprovedForAll | 26076 | 23184 | 0 | -| safeTransferFrom | 59163 | 32160 | 10552 | -| safeBatchTransferFrom | 50205 | 35812 | 13298 | -| mint | 33152 | 32245 | 11374 | -| mintBatch | 42210 | 32633 | 12307 | -| burn | 32581 | 27608 | 9631 | -| burnBatch | 38043 | 31828 | 10564 | +| uri | 27560 | 22377 | 0 | +| balanceOf | 25957 | 22409 | 0 | +| balanceOfBatch | 32585 | 23723 | 0 | +| setApprovalForAll | 47025 | 26244 | 0 | +| isApprovedForAll | 26076 | 22433 | 0 | +| safeTransferFrom | 74307 | 28902 | 10552 | +| safeBatchTransferFrom | 75516 | 32865 | 13298 | +| mint | 74473 | 28847 | 11374 | +| mintBatch | 75540 | 31515 | 12307 | +| burn | 32581 | 26154 | 9630 | +| burnBatch | 38043 | 28483 | 10564 | ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:----------------------|:---------------------:|:-----------------------:|:----------------------:| -| safeTransferFrom | 440278 | 231113 | 79145 | -| safeBatchTransferFrom | 364092 | 268013 | 99741 | -| mint | 247001 | 232478 | 85307 | -| mintBatch | 294958 | 238690 | 92307 | -| burn | 237850 | 203613 | 72233 | -| burnBatch | 284644 | 225810 | 79233 | +| safeTransferFrom | 440278 | 215698 | 79144 | +| safeBatchTransferFrom | 364092 | 242395 | 99740 | +| mint | 247001 | 214572 | 85306 | +| mintBatch | 294958 | 220784 | 92306 | +| burn | 237850 | 189997 | 72232 | +| burnBatch | 284644 | 212194 | 79232 | diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index 86453a39c..6881292c8 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -2,21 +2,21 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:--------------|:------------:|:--------------:|:-------------------------:| -| totalSupply | 23717 | 22388 | 0 | -| balanceOf | 25860 | 23974 | 0 | +| totalSupply | 23717 | 22365 | 0 | +| balanceOf | 25860 | 23694 | 0 | | allowance | 26064 | 23273 | 0 | -| approval | 47152 | 26470 | 11782 | -| transfer | 52698 | 43641 | 15507 | -| transferFrom | 44716 | 51726 | 18731 | -| name | 25926 | 22388 | 0 | -| decimals | 22354 | 22388 | 0 | -| symbol | 25945 | 22388 | 0 | +| approval | 47152 | 26142 | 11782 | +| transfer | 52698 | 35599 | 15506 | +| transferFrom | 44716 | 43768 | 18731 | +| name | 25926 | 22365 | 0 | +| decimals | 22354 | 22365 | 0 | +| symbol | 25945 | 22365 | 0 | ## Generated tx costs(fees) for ERC20 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------|:---------------------:|:-----------------------:|:----------------------:| -| approval | 351452 | 198422 | 88369 | -| transfer | 390700 | 311427 | 116305 | -| transferFrom | 323614 | 380276 | 140487 | +| approval | 351452 | 189675 | 88368 | +| transfer | 390700 | 265015 | 116302 | +| transferFrom | 323614 | 312725 | 140484 | diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index f5df046fb..17be1dde4 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -2,32 +2,32 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:------------------|:------------:|:--------------:|:-------------------------:| -| balanceOf | 25895 | 23274 | 0 | -| ownerOf | 25847 | 23242 | 0 | -| getApproved | 27395 | 23242 | 0 | -| isApprovedForAll | 26082 | 23973 | 0 | -| mint | 53193 | 31731 | 9216 | -| burn | 37870 | 35731 | 10523 | -| approve | 50740 | 28884 | 10852 | -| setApprovalForAll | 47011 | 26467 | 9700 | -| safetransferFrom | 67181 | 36625 | 0 | -| transferFrom | 66839 | 35560 | 11585 | -| name | 25932 | 22388 | 0 | -| symbol | 25938 | 22388 | 0 | -| tokenURI | 25964 | 23242 | 0 | -| owner | 23728 | 22388 | 0 | -| transferOwnership | 29147 | 28498 | 9501 | -| renounceOwnership | 30272 | 28372 | 9455 | +| balanceOf | 25895 | 23239 | 0 | +| ownerOf | 25847 | 23207 | 0 | +| getApproved | 27395 | 23207 | 0 | +| isApprovedForAll | 26082 | 23734 | 0 | +| mint | 81095 | 27752 | 9216 | +| burn | 37870 | 32480 | 10523 | +| approve | 50740 | 27489 | 10852 | +| setApprovalForAll | 47011 | 26139 | 9700 | +| safetransferFrom | 77443 | 32663 | 0 | +| transferFrom | 66839 | 32429 | 11585 | +| name | 25932 | 22365 | 0 | +| symbol | 25938 | 22365 | 0 | +| tokenURI | 25964 | 23207 | 0 | +| owner | 23728 | 22365 | 0 | +| transferOwnership | 29147 | 27434 | 9501 | +| renounceOwnership | 30272 | 26415 | 9454 | ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------|:---------------------:|:-----------------------:|:----------------------:| -| mint | 395981 | 224249 | 69126 | -| burn | 245366 | 266850 | 78929 | -| approve | 369808 | 215338 | 81394 | -| setApprovalForAll | 349839 | 198339 | 72754 | -| transferFrom | 442288 | 264345 | 86893 | -| transferOwnership | 218098 | 212502 | 71263 | -| renounceOwnership | 176172 | 209831 | 70913 | +| mint | 395981 | 206891 | 69125 | +| burn | 245366 | 236244 | 78928 | +| approve | 369808 | 200890 | 81393 | +| setApprovalForAll | 349839 | 189592 | 72754 | +| transferFrom | 442288 | 235419 | 86892 | +| transferOwnership | 218098 | 199622 | 71262 | +| renounceOwnership | 176172 | 196951 | 70912 | diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index 9b8509650..6d7042bb6 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -2,19 +2,19 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:------------------------------|:------------:|:--------------:|:-------------------------:| -| create | 0 | 45155 | 16355 | -| registerDelegateWithSignature | 0 | 46056 | 20190 | -| unregisterDelegate | 0 | 43622 | 16203 | -| transferOwnership | 0 | 52086 | 20410 | -| proxyCall | 0 | 65694 | 21155 | +| create | 0 | 37062 | 16354 | +| registerDelegateWithSignature | 0 | 38495 | 20190 | +| unregisterDelegate | 0 | 35566 | 16202 | +| transferOwnership | 0 | 43883 | 20410 | +| proxyCall | 0 | 65262 | 21155 | ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------------------|:---------------------:|:-----------------------:|:----------------------:| -| create | 0 | 328633 | 122663 | -| registerDelegateWithSignature | 0 | 338932 | 151432 | -| unregisterDelegate | 0 | 311102 | 121523 | -| transferOwnership | 0 | 384166 | 153079 | -| proxyCall | 0 | 449872 | 158668 | +| create | 0 | 276040 | 122660 | +| registerDelegateWithSignature | 0 | 288305 | 151429 | +| unregisterDelegate | 0 | 264442 | 121520 | +| transferOwnership | 0 | 314095 | 153075 | +| proxyCall | 0 | 446031 | 158664 | diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index f1c8f7fcc..f01f84280 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -2,29 +2,29 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:--------------------|:------------:|:--------------:|:-------------------------:| -| registerMarketplace | 0 | 32307 | 10843 | -| sellNft | 0 | 55445 | 22404 | -| auctionNft | 0 | 55709 | 21416 | -| makeSimpleOffer | 0 | 60972 | 37599 | -| buy | 0 | 50424 | 151674 | -| bid | 0 | 61632 | 1358014 | -| cancelSale | 0 | 38090 | 13321 | -| updateFixedPrice | 0 | 29163 | 9867 | -| acceptOffer | 0 | 74959 | 27394 | -| cancelOffer | 0 | 56308 | 20784 | +| registerMarketplace | 0 | 28523 | 10843 | +| sellNft | 0 | 45619 | 22404 | +| auctionNft | 0 | 45698 | 21415 | +| makeSimpleOffer | 0 | 49994 | 37598 | +| buy | 0 | 42799 | 151674 | +| bid | 0 | 50373 | 1358013 | +| cancelSale | 0 | 33131 | 13321 | +| updateFixedPrice | 0 | 27601 | 9867 | +| acceptOffer | 0 | 55842 | 27393 | +| cancelOffer | 0 | 45669 | 20784 | ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------------|:---------------------:|:-----------------------:|:----------------------:| -| registerMarketplace | 0 | 233484 | 81325 | -| sellNft | 0 | 408156 | 168036 | -| auctionNft | 0 | 410872 | 160620 | -| makeSimpleOffer | 0 | 555461 | 281997 | -| buy | 0 | 1366440 | 1137559 | -| bid | 0 | 10462114 | 10185109 | -| cancelSale | 0 | 285289 | 99912 | -| updateFixedPrice | 0 | 218406 | 74004 | -| acceptOffer | 0 | 532153 | 205460 | -| cancelOffer | 0 | 416953 | 155886 | +| registerMarketplace | 0 | 213050 | 81324 | +| sellNft | 0 | 333944 | 168032 | +| auctionNft | 0 | 334836 | 160616 | +| makeSimpleOffer | 0 | 461842 | 281992 | +| buy | 0 | 1301702 | 1137556 | +| bid | 0 | 10365893 | 10185104 | +| cancelSale | 0 | 246664 | 99910 | +| updateFixedPrice | 0 | 203425 | 74003 | +| acceptOffer | 0 | 412144 | 205453 | +| cancelOffer | 0 | 334406 | 155882 | diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 2bd1888cb..4d6064889 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -26,7 +26,7 @@ extern crate alloc; use alloc::string::String; use codec::{Decode, Encode}; -use core::ops::Mul; +use fp_evm::weight_per_gas; use fp_rpc::TransactionStatus; use frame_election_provider_support::{generate_solution_type, onchain, SequentialPhragmen}; use pallet_dex::TradingPairStatus; @@ -77,7 +77,10 @@ pub use frame_support::{ Randomness, }, weights::{ - constants::{ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, + constants::{ + ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_MILLIS, + WEIGHT_REF_TIME_PER_SECOND, + }, ConstantMultiplier, IdentityFee, Weight, }, PalletId, StorageValue, @@ -190,8 +193,10 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); -/// We allow for 1 seconds of compute with a 4 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, u64::MAX); +/// We allow for 1 seconds of compute with a 4 seconds average block time. +pub const WEIGHT_MILLISECS_PER_BLOCK: u64 = 1000; +pub const MAXIMUM_BLOCK_WEIGHT: Weight = + Weight::from_parts(WEIGHT_MILLISECS_PER_BLOCK * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -1070,53 +1075,22 @@ impl pallet_evm_chain_id::Config for Runtime { } // Start frontier/EVM stuff - -/// Current approximation of the gas/s consumption considering -/// EVM execution over compiled WASM (on 4.4Ghz CPU). -/// Given the 500ms Weight, from which 75% only are used for transactions, -// TODO: optimize for the correct value for block gas limit(i.e correct value for 11_250_000 * 2) or -// WEIGHT_PER_GAS -/// the total EVM execution gas limit is: GAS_PER_SECOND * 1 * 0.75 ~= 11_250_000 * 2. -pub const GAS_PER_SECOND: u64 = 30_000_000; - -/// Approximate ratio of the amount of Weight per Gas. -/// u64 works for approximations because Weight is a very small unit compared to gas. -pub const WEIGHT_PER_GAS: u64 = WEIGHT_REF_TIME_PER_SECOND / GAS_PER_SECOND; - -pub struct FutureverseGasWeightMapping; - -impl pallet_evm::GasWeightMapping for FutureverseGasWeightMapping { - fn gas_to_weight(gas: u64, without_base_weight: bool) -> Weight { - let mut weight = gas.saturating_mul(WEIGHT_PER_GAS); - - if without_base_weight { - weight = weight.saturating_sub( - ::BlockWeights::get() - .get(frame_support::dispatch::DispatchClass::Normal) - .base_extrinsic - .ref_time(), - ); - } - - Weight::from_all(weight) - } - fn weight_to_gas(weight: Weight) -> u64 { - weight.div(WEIGHT_PER_GAS).ref_time() - } -} +// Number suitable for TRN, based on the gas benchmarks on current standard spec. +const BLOCK_GAS_LIMIT: u64 = 15_000_000; +// Default value from Frontier +const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; parameter_types! { - pub BlockGasLimit: U256 - = U256::from(NORMAL_DISPATCH_RATIO.mul(MAXIMUM_BLOCK_WEIGHT.ref_time()) / WEIGHT_PER_GAS); + pub BlockGasLimit: U256 = U256::from(BLOCK_GAS_LIMIT); + // https://github.com/polkadot-evm/frontier/pull/1039#issuecomment-1600291912 + pub const GasLimitPovSizeRatio: u64 = BLOCK_GAS_LIMIT.saturating_div(MAX_POV_SIZE); pub PrecompilesValue: FutureversePrecompiles = FutureversePrecompiles::<_>::new(); - pub WeightPerGas: Weight = Weight::from_all(WEIGHT_PER_GAS); - // TRN is a solo chain. Otherwise -> https://github.com/polkadot-evm/frontier/pull/1039 - pub GasLimitPovSizeRatio: u64 = 0; + pub WeightPerGas: Weight = Weight::from_parts(weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK), 0); } impl pallet_evm::Config for Runtime { type FeeCalculator = FeeControl; - type GasWeightMapping = FutureverseGasWeightMapping; + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = FutureverseEnsureAddressSame; type WithdrawOrigin = EnsureAddressNever; @@ -2343,5 +2317,6 @@ mod benches { [pallet_doughnut, Doughnut] [pallet_maintenance_mode, MaintenanceMode] [pallet_crowdsale, Crowdsale] + [pallet_evm, EVM] ); } From c82f00b3e66d60c3f86dfdd7ff897b4c6caaf19c Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:51:23 +1200 Subject: [PATCH 105/112] Update Substrate deps for native support (#857) * Update deps to custom Substrate branch * Move all deps to workspace cargo.toml * Add patch for substrate branch * Update nightly version to 2024-04-29 (First build for Rust 1.80.0) * Update nightly to latest, remove default-features from patch --- Cargo.lock | 1668 +++++++++++++------------ Cargo.toml | 148 ++- client/Cargo.toml | 2 +- ethy-gadget/Cargo.toml | 4 +- ethy-gadget/src/lib.rs | 2 +- ethy-gadget/src/metrics.rs | 2 +- pallet/vortex-distribution/Cargo.toml | 2 +- runtime/Cargo.toml | 10 +- rust-toolchain.toml | 2 +- 9 files changed, 994 insertions(+), 846 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a493143ee..fd7e1cf0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,11 +23,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "gimli 0.28.1", + "gimli 0.29.0", ] [[package]] @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -82,23 +82,23 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -145,47 +145,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -193,9 +194,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "approx" @@ -208,9 +209,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "6.2.2" +version = "6.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" [[package]] name = "arrayref" @@ -288,18 +289,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite", "parking", "polling", - "rustix 0.38.31", + "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", @@ -316,35 +317,35 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", + "event-listener 5.3.1", "event-listener-strategy", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -357,7 +358,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -369,16 +370,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "atomic-write-file" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf54d4588732bdfc5ebc3eb9f74f20e027112fc31de412fc7ff0cd1c6896dae" -dependencies = [ - "nix 0.28.0", - "rand 0.8.5", -] - [[package]] name = "atty" version = "0.2.14" @@ -410,27 +401,27 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ - "addr2line 0.21.0", + "addr2line 0.22.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object 0.36.1", "rustc-demangle", ] @@ -494,13 +485,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.16", + "prettyplease 0.2.20", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -517,9 +508,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -566,9 +557,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -636,9 +627,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "sha2 0.10.8", "tinyvec", @@ -657,9 +648,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -676,9 +667,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -694,9 +685,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" [[package]] name = "byteorder" @@ -706,9 +697,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2-sys" @@ -723,18 +714,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -747,7 +738,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.21", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -755,12 +746,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -774,9 +766,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", ] @@ -819,16 +811,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -857,9 +849,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -868,9 +860,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" dependencies = [ "clap_builder", "clap_derive", @@ -878,9 +870,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" dependencies = [ "anstream", "anstyle", @@ -890,21 +882,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "clear_on_drop" @@ -927,26 +919,26 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "comfy-table" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", + "strum 0.26.3", + "strum_macros 0.26.4", "unicode-width", ] [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -985,7 +977,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -1136,7 +1128,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.5", + "itertools", "log", "smallvec", "wasmparser", @@ -1160,9 +1152,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1197,9 +1189,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1242,9 +1234,9 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", "subtle", @@ -1287,16 +1279,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -1310,14 +1301,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "cxx" -version = "1.0.119" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" +checksum = "273dcfd3acd4e1e276af13ed2a43eea7001318823e7a726a6b3ed39b4acc0b82" dependencies = [ "cc", "cxxbridge-flags", @@ -1327,9 +1318,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.119" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" +checksum = "d8b2766fbd92be34e9ed143898fce6c572dc009de39506ed6903e5a05b68914e" dependencies = [ "cc", "codespan-reporting", @@ -1337,37 +1328,37 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "cxxbridge-flags" -version = "1.0.119" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" +checksum = "839fcd5e43464614ffaa989eaf1c139ef1f0c51672a1ed08023307fa1b909ccd" [[package]] name = "cxxbridge-macro" -version = "1.0.119" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" +checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "data-encoding-macro" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -1375,9 +1366,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" dependencies = [ "data-encoding", "syn 1.0.109", @@ -1385,9 +1376,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1429,13 +1420,13 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.68", ] [[package]] @@ -1517,13 +1508,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1586,9 +1577,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -1610,7 +1601,7 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature 1.4.0", + "signature 1.6.4", ] [[package]] @@ -1643,7 +1634,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.3", "ed25519 2.2.3", "rand_core 0.6.4", "serde", @@ -1668,9 +1659,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -1706,7 +1697,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -1714,22 +1705,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1759,9 +1750,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1890,7 +1881,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -1955,23 +1946,23 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 4.0.3", - "pin-project-lite 0.2.13", + "event-listener 5.3.1", + "pin-project-lite 0.2.14", ] [[package]] @@ -2097,15 +2088,17 @@ dependencies = [ [[package]] name = "expander" -version = "2.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" dependencies = [ "blake2", + "file-guard", "fs-err", + "prettyplease 0.2.20", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2122,9 +2115,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fc-consensus" @@ -2158,7 +2151,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-client-db", "smallvec", @@ -2184,7 +2177,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-utils", "sp-api", @@ -2302,9 +2295,19 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "file-per-thread-logger" @@ -2340,7 +2343,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "scale-info", ] @@ -2376,9 +2379,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "libz-sys", @@ -2429,7 +2432,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", ] @@ -2550,7 +2553,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-support-procedural", @@ -2575,7 +2578,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "Inflector", "array-bytes", @@ -2587,7 +2590,7 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools 0.10.5", + "itertools", "lazy_static", "linked-hash-map", "log", @@ -2623,18 +2626,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2651,7 +2654,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -2680,7 +2683,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-recursion", "futures", @@ -2701,7 +2704,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "bitflags 1.3.2", "environmental", @@ -2735,47 +2738,47 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "expander", "frame-support-procedural-tools", - "itertools 0.10.5", + "itertools", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "cfg-if", "frame-support", @@ -2794,7 +2797,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -2809,7 +2812,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "sp-api", @@ -2818,7 +2821,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "parity-scale-codec", @@ -2903,7 +2906,7 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] @@ -2914,12 +2917,12 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -2930,7 +2933,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2958,9 +2961,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -2975,7 +2978,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "pin-utils", "slab", ] @@ -3032,9 +3035,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -3053,11 +3056,11 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "polyval", ] @@ -3074,9 +3077,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -3091,10 +3094,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", - "bstr 1.9.0", + "bstr 1.9.1", "log", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -3110,9 +3113,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -3120,7 +3123,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.2", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -3168,7 +3171,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -3177,16 +3180,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "allocator-api2", ] @@ -3196,7 +3199,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -3208,6 +3211,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -3219,9 +3228,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -3257,7 +3272,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", "digest 0.9.0", ] @@ -3283,11 +3298,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3303,9 +3318,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -3320,7 +3335,7 @@ checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3331,9 +3346,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3349,9 +3364,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -3363,8 +3378,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.13", - "socket2 0.5.5", + "pin-project-lite 0.2.14", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -3381,7 +3396,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3390,9 +3405,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3512,12 +3527,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -3544,9 +3559,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -3566,7 +3581,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -3583,7 +3598,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg", @@ -3597,53 +3612,50 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.4", - "rustix 0.38.31", + "hermit-abi 0.3.9", + "libc", "windows-sys 0.52.0", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" -version = "0.12.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -3701,7 +3713,7 @@ dependencies = [ "globset", "hyper", "jsonrpsee-types", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "rustc-hash", "serde", @@ -3737,7 +3749,7 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -3830,7 +3842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] @@ -3841,7 +3853,7 @@ checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "regex", "rocksdb", "smallvec", @@ -3849,9 +3861,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -3861,18 +3873,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.6", ] [[package]] @@ -3884,7 +3896,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.12", + "getrandom 0.2.15", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -3949,7 +3961,7 @@ dependencies = [ "multihash", "multistream-select", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -3969,7 +3981,7 @@ dependencies = [ "futures", "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "smallvec", "trust-dns-resolver", ] @@ -4131,7 +4143,7 @@ dependencies = [ "libp2p-identity", "libp2p-tls", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "quinn-proto", "rand 0.8.5", "rustls 0.20.9", @@ -4182,7 +4194,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "heck", + "heck 0.4.1", "quote", "syn 1.0.109", ] @@ -4247,7 +4259,7 @@ dependencies = [ "futures-rustls", "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "quicksink", "rw-stream-sink", "soketto", @@ -4270,13 +4282,12 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -4355,9 +4366,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "pkg-config", @@ -4405,15 +4416,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -4421,9 +4432,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -4445,9 +4456,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "d6eab492fe7f8651add23237ea56dbf11b3c4ff762ab83d40a47f11433421f91" dependencies = [ "libc", "lz4-sys", @@ -4455,9 +4466,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" dependencies = [ "cc", "libc", @@ -4481,7 +4492,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4495,7 +4506,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4506,7 +4517,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4517,7 +4528,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4559,9 +4570,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -4569,7 +4580,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.34", ] [[package]] @@ -4631,18 +4642,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -4759,9 +4770,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.4" +version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" +checksum = "7b5c17de023a86f59ed79891b2e5d5a94c705dbe904a5b5c9c952ea6221b03e4" dependencies = [ "approx", "matrixmultiply", @@ -4775,13 +4786,13 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.68", ] [[package]] @@ -4865,9 +4876,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", "futures", @@ -4887,18 +4898,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "cfg_aliases", - "libc", -] - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4923,9 +4922,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -4937,20 +4936,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -4973,19 +4971,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -4994,11 +4991,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -5006,9 +5002,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -5019,7 +5015,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", ] @@ -5062,7 +5058,7 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -5085,9 +5081,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -5115,9 +5111,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" @@ -5125,7 +5121,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -5142,7 +5138,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -5166,7 +5162,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5235,7 +5231,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -5249,7 +5245,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5273,7 +5269,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5293,7 +5289,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5447,7 +5443,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5470,7 +5466,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5542,7 +5538,7 @@ dependencies = [ "pallet-balances", "pallet-scheduler", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rustc-hex", "scale-info", "seed-pallet-common", @@ -5927,7 +5923,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5950,7 +5946,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6019,7 +6015,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6115,7 +6111,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -6132,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -6149,7 +6145,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6166,7 +6162,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6181,7 +6177,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6196,7 +6192,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6213,7 +6209,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -6234,7 +6230,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6306,7 +6302,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6329,18 +6325,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6355,7 +6351,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6394,7 +6390,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-support", "frame-system", @@ -6410,7 +6406,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6426,7 +6422,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6457,7 +6453,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6590,7 +6586,7 @@ dependencies = [ "log", "lz4", "memmap2", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "siphasher", "snap", @@ -6599,9 +6595,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -6614,11 +6610,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6655,12 +6651,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -6679,15 +6675,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -6698,9 +6694,9 @@ checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -6708,7 +6704,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", ] [[package]] @@ -6743,9 +6739,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.6" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -6754,9 +6750,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.6" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -6764,22 +6760,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.6" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "pest_meta" -version = "2.7.6" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -6788,32 +6784,32 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.2", + "indexmap 2.2.6", ] [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -6824,9 +6820,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -6846,26 +6842,21 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "platforms" -version = "3.3.0" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" -version = "3.3.2" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "pin-project-lite 0.2.13", - "rustix 0.38.31", + "hermit-abi 0.4.0", + "pin-project-lite 0.2.14", + "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] @@ -6877,19 +6868,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "universal-hash", ] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "universal-hash", ] @@ -6955,7 +6946,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools 0.10.5", + "itertools", "normalize-line-endings", "predicates-core", "regex", @@ -6989,12 +6980,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -7036,12 +7027,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.21.1", ] [[package]] @@ -7076,29 +7066,29 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ "cfg-if", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "thiserror", ] @@ -7110,7 +7100,7 @@ checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "prometheus-client-derive-encode", ] @@ -7122,7 +7112,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -7142,8 +7132,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", - "itertools 0.10.5", + "heck 0.4.1", + "itertools", "lazy_static", "log", "multimap", @@ -7164,7 +7154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", "syn 1.0.109", @@ -7247,9 +7237,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -7319,7 +7309,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -7348,9 +7338,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -7396,35 +7386,44 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -7441,14 +7440,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -7462,13 +7461,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.4", ] [[package]] @@ -7479,9 +7478,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "resolv-conf" @@ -7520,16 +7519,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "getrandom 0.2.12", + "cfg-if", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7594,7 +7594,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix 0.24.3", + "nix", "thiserror", "tokio", ] @@ -7611,9 +7611,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -7633,7 +7633,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.21", + "semver 1.0.23", ] [[package]] @@ -7661,14 +7661,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] @@ -7686,12 +7686,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki", "sct", ] @@ -7723,15 +7723,15 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rw-stream-sink" @@ -7746,15 +7746,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "safe_arch" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" dependencies = [ "bytemuck", ] @@ -7771,7 +7771,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "log", "sp-core", @@ -7782,7 +7782,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "futures-timer", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7820,7 +7820,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -7839,18 +7839,18 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "chrono", @@ -7889,13 +7889,13 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -7915,7 +7915,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -7925,7 +7925,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-state-db", "schnellru", @@ -7941,7 +7941,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -7949,7 +7949,7 @@ dependencies = [ "libp2p-identity", "log", "mockall", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-utils", "serde", @@ -7966,7 +7966,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -7995,7 +7995,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "fork-tree", @@ -8005,7 +8005,7 @@ dependencies = [ "num-rational", "num-traits", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -8031,7 +8031,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "jsonrpsee", @@ -8053,7 +8053,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8066,9 +8066,9 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "array-bytes", "async-trait", "dyn-clone", @@ -8078,7 +8078,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -8107,7 +8107,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "finality-grandpa", "futures", @@ -8127,7 +8127,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -8150,10 +8150,10 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-executor-common", "sc-executor-wasmtime", "schnellru", @@ -8172,7 +8172,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -8184,7 +8184,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "anyhow", "cfg-if", @@ -8201,7 +8201,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "ansi_term", "futures", @@ -8217,10 +8217,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "serde_json", "sp-application-crypto", "sp-core", @@ -8231,7 +8231,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "async-channel", @@ -8248,7 +8248,7 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "partial_sort", "pin-project", "rand 0.8.5", @@ -8272,7 +8272,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-channel", "cid", @@ -8292,7 +8292,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -8309,9 +8309,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "futures", "futures-timer", "libp2p", @@ -8327,7 +8327,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "async-channel", @@ -8348,7 +8348,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "async-channel", @@ -8382,14 +8382,14 @@ dependencies = [ [[package]] name = "sc-network-test" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "sc-block-builder", "sc-client-api", @@ -8413,7 +8413,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "futures", @@ -8431,7 +8431,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "bytes", @@ -8445,7 +8445,7 @@ dependencies = [ "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "sc-client-api", "sc-network", @@ -8465,7 +8465,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8474,13 +8474,13 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8505,7 +8505,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8524,7 +8524,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "http", "jsonrpsee", @@ -8539,7 +8539,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "futures", @@ -8548,7 +8548,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", @@ -8565,7 +8565,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "directories", @@ -8575,7 +8575,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "sc-block-builder", @@ -8629,18 +8629,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sp-core", ] [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "libc", @@ -8659,13 +8659,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "chrono", "futures", "libp2p", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "sc-utils", @@ -8678,7 +8678,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "ansi_term", "atty", @@ -8686,7 +8686,7 @@ dependencies = [ "lazy_static", "libc", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "regex", "rustc-hash", "sc-client-api", @@ -8707,18 +8707,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -8726,7 +8726,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -8744,7 +8744,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -8760,23 +8760,23 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-channel", "futures", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "prometheus", "sp-arithmetic", ] [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "bitvec", "cfg-if", @@ -8788,11 +8788,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -8809,11 +8809,11 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] @@ -8845,7 +8845,7 @@ dependencies = [ "aead", "arrayref", "arrayvec 0.7.4", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin 3.0.0", "rand_core 0.6.4", @@ -8873,7 +8873,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -8920,11 +8920,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -8933,9 +8933,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -9198,9 +9198,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -9213,38 +9213,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -9253,9 +9253,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -9270,7 +9270,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -9295,7 +9295,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -9336,18 +9336,18 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.4.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "signature" @@ -9374,9 +9374,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" dependencies = [ "bstr 0.2.17", "unicode-segmentation", @@ -9415,9 +9415,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snap" @@ -9434,9 +9434,9 @@ dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.3", "rand_core 0.6.4", - "ring 0.17.7", + "ring 0.17.8", "rustc_version", "sha2 0.10.8", "subtle", @@ -9454,12 +9454,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -9482,7 +9482,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "hash-db 0.16.0", "log", @@ -9503,7 +9503,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "Inflector", "blake2", @@ -9511,13 +9511,13 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -9530,7 +9530,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "integer-sqrt", "num-traits", @@ -9544,7 +9544,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "sp-api", "sp-inherents", @@ -9555,12 +9555,12 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "schnellru", "sp-api", "sp-consensus", @@ -9573,7 +9573,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "futures", @@ -9588,7 +9588,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "parity-scale-codec", @@ -9605,7 +9605,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "parity-scale-codec", @@ -9624,7 +9624,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "finality-grandpa", "log", @@ -9642,7 +9642,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -9654,7 +9654,7 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "bitflags 1.3.2", @@ -9672,7 +9672,7 @@ dependencies = [ "log", "merlin 2.0.1", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "paste", "primitive-types 0.12.2", "rand 0.8.5", @@ -9699,7 +9699,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "blake2b_simd", "byteorder", @@ -9712,36 +9712,36 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "environmental", "parity-scale-codec", @@ -9752,7 +9752,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9766,7 +9766,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "bytes", "ed25519 1.5.3", @@ -9791,7 +9791,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "lazy_static", "sp-core", @@ -9802,10 +9802,10 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sp-core", "sp-externalities", "thiserror", @@ -9814,7 +9814,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9823,7 +9823,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -9834,7 +9834,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -9848,7 +9848,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "sp-api", "sp-core", @@ -9858,7 +9858,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "backtrace", "lazy_static", @@ -9868,7 +9868,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "rustc-hash", "serde", @@ -9878,7 +9878,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "either", "hash256-std-hasher", @@ -9900,7 +9900,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9918,19 +9918,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -9945,7 +9945,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9959,12 +9959,12 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "hash-db 0.16.0", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "smallvec", "sp-core", @@ -9980,7 +9980,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -9997,12 +9997,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10015,7 +10015,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "parity-scale-codec", @@ -10028,7 +10028,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "sp-std", @@ -10040,7 +10040,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "sp-api", "sp-runtime", @@ -10049,7 +10049,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "parity-scale-codec", @@ -10064,16 +10064,16 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "hash-db 0.16.0", "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "scale-info", "schnellru", "sp-core", @@ -10087,7 +10087,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10104,18 +10104,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10128,7 +10128,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "parity-scale-codec", "scale-info", @@ -10178,20 +10178,19 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" dependencies = [ - "itertools 0.12.1", "nom", "unicode_categories", ] [[package]] name = "sqlx" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", @@ -10200,17 +10199,16 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "atoi", "byteorder", "bytes", "crc", "crossbeam-queue", - "dotenvy", "either", "event-listener 2.5.3", "futures-channel", @@ -10220,7 +10218,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.2", + "indexmap 2.2.6", "log", "memchr", "native-tls", @@ -10240,9 +10238,9 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" dependencies = [ "proc-macro2", "quote", @@ -10253,14 +10251,13 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" dependencies = [ - "atomic-write-file", "dotenvy", "either", - "heck", + "heck 0.4.1", "hex", "once_cell", "proc-macro2", @@ -10278,9 +10275,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" dependencies = [ "atoi", "flume", @@ -10301,9 +10298,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.46.0" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" dependencies = [ "Inflector", "num-format", @@ -10356,9 +10353,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -10371,9 +10368,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -10381,7 +10378,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -10390,26 +10387,26 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "substrate-bip39" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sha2 0.9.9", "zeroize", ] @@ -10417,12 +10414,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10441,7 +10438,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "hyper", "log", @@ -10453,7 +10450,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "jsonrpsee", @@ -10466,7 +10463,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "async-trait", @@ -10492,7 +10489,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "array-bytes", "frame-executive", @@ -10532,7 +10529,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "futures", "sc-block-builder", @@ -10550,7 +10547,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "ansi_term", "build-helper", @@ -10567,9 +10564,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" @@ -10584,9 +10581,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -10634,20 +10631,19 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.4.1", - "rustix 0.38.31", + "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -10668,22 +10664,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -10694,9 +10690,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -10723,9 +10719,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -10744,9 +10740,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -10782,9 +10778,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" dependencies = [ "tinyvec_macros", ] @@ -10797,32 +10793,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite 0.2.13", + "parking_lot 0.12.3", + "pin-project-lite 0.2.14", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -10842,35 +10838,34 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tokio-util", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", - "tracing", ] [[package]] @@ -10896,9 +10891,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -10909,7 +10904,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -10918,11 +10913,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.6", "toml_datetime", "winnow", ] @@ -10944,14 +10939,14 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", ] @@ -10975,7 +10970,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tracing-attributes", "tracing-core", ] @@ -10988,7 +10983,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -11133,7 +11128,7 @@ dependencies = [ "ipconfig", "lazy_static", "lru-cache", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "resolv-conf", "smallvec", "thiserror", @@ -11151,7 +11146,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/futureversecom/trn-substrate?branch=polkadot-v1.0.0-TRN#03763de688b09f9a21eea07fc9bce31c62a5cb7c" dependencies = [ "async-trait", "clap", @@ -11240,24 +11235,24 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -11307,9 +11302,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna 0.5.0", @@ -11324,9 +11319,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -11354,9 +11349,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -11385,9 +11380,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -11395,24 +11390,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -11422,9 +11417,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -11432,22 +11427,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" @@ -11720,9 +11715,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -11734,7 +11729,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -11762,14 +11757,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.31", + "rustix 0.38.34", ] [[package]] name = "wide" -version = "0.7.15" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" +checksum = "2caba658a80831539b30698ae9862a72db6697dfdd7151e46920f5f2755c3ce2" dependencies = [ "bytemuck", "safe_arch", @@ -11777,9 +11772,9 @@ dependencies = [ [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -11799,11 +11794,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -11837,7 +11832,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -11864,7 +11859,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -11899,17 +11894,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -11926,9 +11922,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -11944,9 +11940,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -11962,9 +11958,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -11980,9 +11982,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -11998,9 +12000,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -12016,9 +12018,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -12034,15 +12036,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.36" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818ce546a11a9986bc24f93d0cdf38a8a1a400f1473ea8c82e59f6e0ffab9249" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -12115,7 +12117,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -12124,7 +12126,7 @@ version = "0.15.0" source = "git+https://github.com/futureversecom/xrpl-sdk-rust?branch=once-cell-support#afb40e77a22d5934aeb59e0201d3bf58dcd2be25" dependencies = [ "bytes", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "libsecp256k1", "serde_json", @@ -12139,7 +12141,7 @@ version = "0.15.0" source = "git+https://github.com/futureversecom/xrpl-sdk-rust?branch=once-cell-support#afb40e77a22d5934aeb59e0201d3bf58dcd2be25" dependencies = [ "ascii", - "bs58 0.5.0", + "bs58 0.5.1", "enumflags2", "hex", "serde", @@ -12155,7 +12157,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "static_assertions", ] @@ -12171,29 +12173,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -12206,7 +12208,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -12249,9 +12251,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.11+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 9c37d9cdb..fbc3dde58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,11 +157,13 @@ frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", bran frame-election-provider-solution-type = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-support-procedural = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-support-procedural-tools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-support-procedural-tools-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false} frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -170,6 +172,7 @@ pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polka pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false} pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -180,14 +183,15 @@ pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polk pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -ry-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-allocator = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -222,6 +226,7 @@ sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-rpc-server = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-rpc-spec-v2 = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-state-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -247,6 +252,7 @@ sp-core-hashing = { git = "https://github.com/paritytech/substrate", branch = "p sp-core-hashing-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-database = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-debug-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -275,6 +281,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-version-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } @@ -328,3 +335,142 @@ sha3 = { version = "0.10", default-features = false } thiserror = { version = "1.0", default-features = false } tokio = { version = "1.19.2", default-features = false } xrpl-codec = { git = "https://github.com/futureversecom/xrpl-tx-codec", version = "0.1.2", default-features = false } + +[patch."https://github.com/paritytech/substrate"] +fork-tree = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-benchmarking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-benchmarking-cli = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-election-provider-solution-type = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-election-provider-support = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-executive = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-remote-externalities = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-support = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-support-procedural = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-support-procedural-tools = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-support-procedural-tools-derive = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-system = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-system-benchmarking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN"} +frame-system-rpc-runtime-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +frame-try-runtime = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-assets = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-authorship = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-babe = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-bags-list = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-balances = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-election-provider-multi-phase = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-election-provider-support-benchmarking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN"} +pallet-grandpa = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-im-online = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-multisig = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-nomination-pools = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-offences = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-preimage = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-proxy = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-recovery = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-scheduler = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-session = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-session-benchmarking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-staking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-staking-reward-curve = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-sudo = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-timestamp = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-transaction-payment = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-transaction-payment-rpc = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +pallet-utility = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-allocator = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-basic-authorship = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-block-builder = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-chain-spec = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-chain-spec-derive = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-cli = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-client-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-client-db = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-aura = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-babe = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-babe-rpc = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-epochs = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-grandpa = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-grandpa-rpc = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-consensus-slots = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-executor = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-executor-common = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-executor-wasmtime = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-informant = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-keystore = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-bitswap = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-common = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-gossip = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-light = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-sync = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-transactions = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-offchain = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-proposer-metrics = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-rpc = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-rpc-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-rpc-server = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-rpc-spec-v2 = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-network-test = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-service = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-state-db = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-sysinfo = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-telemetry = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-tracing = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-tracing-proc-macro = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-transaction-pool = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-transaction-pool-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sc-utils = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-api = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-api-proc-macro = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-application-crypto = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-arithmetic = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-block-builder = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-blockchain = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-consensus = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-consensus-aura = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-consensus-babe = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-consensus-grandpa = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-consensus-slots = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-core = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-core-hashing = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-core-hashing-proc-macro = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-database = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-debug-derive = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-externalities = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-inherents = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-io = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-keyring = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-keystore = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-maybe-compressed-blob = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-metadata-ir = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-npos-elections = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-offchain = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-panic-handler = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-rpc = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-runtime = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-runtime-interface = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-runtime-interface-proc-macro = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-session = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-staking = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-state-machine = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-statement-store = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-std = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-storage = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-timestamp = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-tracing = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-transaction-pool = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-transaction-storage-proof = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-trie = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-version = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-version-proc-macro = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-wasm-interface = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +sp-weights = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-build-script-utils = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-frame-rpc-system = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-prometheus-endpoint = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-rpc-client = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-test-runtime-client = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +substrate-wasm-builder = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } +try-runtime-cli = { git = "https://github.com/futureversecom/trn-substrate", branch = "polkadot-v1.0.0-TRN" } diff --git a/client/Cargo.toml b/client/Cargo.toml index d4d8567a7..a8b3dbe9d 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -101,7 +101,7 @@ try-runtime-cli = { workspace = true, optional = true } # CLI-specific dependencies [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +substrate-build-script-utils = { workspace = true, default-features = true } [features] default = ["rocksdb"] diff --git a/ethy-gadget/Cargo.toml b/ethy-gadget/Cargo.toml index 5221c22d3..ad2a011fd 100644 --- a/ethy-gadget/Cargo.toml +++ b/ethy-gadget/Cargo.toml @@ -16,7 +16,7 @@ log = { workspace = true } thiserror = { workspace = true } codec = { workspace = true } libsecp256k1 = { workspace = true } -prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", version = "0.10.0-dev", default-features = false } +substrate-prometheus-endpoint = { workspace = true } sc-chain-spec = { workspace = true } sc-client-api = { workspace = true } sc-keystore = { workspace = true } @@ -45,7 +45,7 @@ serde = { workspace = true } tokio = { workspace = true } sc-consensus = { workspace = true } sc-service = { workspace = true } -sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +sc-network-test = { workspace = true } sc-block-builder = { workspace = true } sp-consensus-grandpa = { workspace = true } sp-keyring = { workspace = true } diff --git a/ethy-gadget/src/lib.rs b/ethy-gadget/src/lib.rs index 4a9c53689..44948ef02 100644 --- a/ethy-gadget/src/lib.rs +++ b/ethy-gadget/src/lib.rs @@ -27,7 +27,7 @@ use std::sync::Arc; use log::debug; -use prometheus::Registry; +use substrate_prometheus_endpoint::Registry; use sc_client_api::{Backend, BlockchainEvents, Finalizer}; use sc_network::ProtocolName; diff --git a/ethy-gadget/src/metrics.rs b/ethy-gadget/src/metrics.rs index bfb67a7d1..38154cc91 100644 --- a/ethy-gadget/src/metrics.rs +++ b/ethy-gadget/src/metrics.rs @@ -15,7 +15,7 @@ //! ETHY Prometheus metrics definition -use prometheus::{register, Counter, Gauge, PrometheusError, Registry, U64}; +use substrate_prometheus_endpoint::{register, Counter, Gauge, PrometheusError, Registry, U64}; /// ETHY metrics exposed through Prometheus pub(crate) struct Metrics { diff --git a/pallet/vortex-distribution/Cargo.toml b/pallet/vortex-distribution/Cargo.toml index 77b380c32..536face8b 100644 --- a/pallet/vortex-distribution/Cargo.toml +++ b/pallet/vortex-distribution/Cargo.toml @@ -31,7 +31,7 @@ pallet-assets-ext = { workspace = true, default-features = true } frame-election-provider-support = { workspace = true } pallet-session = { workspace = true } pallet-bags-list = { workspace = true } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-staking-reward-curve = { workspace = true } [features] default = ["std"] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 594f84683..92f3774b3 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -120,9 +120,9 @@ try-runtime-cli = { workspace = true, optional = true } # Benchmark dependencies frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-system-benchmarking = { workspace = true, optional = true } +pallet-session-benchmarking = { workspace = true, optional = true } +pallet-election-provider-support-benchmarking = { workspace = true, optional = true } [build-dependencies] substrate-wasm-builder = { workspace = true, default-features = true } @@ -133,8 +133,8 @@ ethabi = { workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true } ethereum = { version = "0.14.0", default-features = false } -frame-remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-remote-externalities = { workspace = true } +sp-externalities = { workspace = true } [features] default = [ "std" ] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index be5341847..1a8dea1a7 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-05-22" +channel = "nightly-2024-06-17" targets = ["wasm32-unknown-unknown"] profile = "default" # include rustfmt, clippy From 549b023dafca96547ce313c2e3da165480442084 Mon Sep 17 00:00:00 2001 From: JasonT <50426640+JasonTulp@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:53:14 +1200 Subject: [PATCH 106/112] Update transaction-payment default (#859) * Add transaction payment to Genesis config and update ERC721 costs * Update TxCosts and add temporary package.json script * Update txCosts --- client/src/chain_spec.rs | 7 ++++-- e2e/package.json | 1 + e2e/test/Dex/TxCosts.md | 16 ++++++------- e2e/test/ERC1155/TxCosts.md | 24 ++++++++++---------- e2e/test/ERC20/TxCosts.md | 12 +++++----- e2e/test/ERC721/TxCosts.md | 32 +++++++++++++------------- e2e/test/Futurepass/TxCosts.md | 20 ++++++++--------- e2e/test/MarketPlace/TxCosts.md | 40 ++++++++++++++++----------------- 8 files changed, 78 insertions(+), 74 deletions(-) diff --git a/client/src/chain_spec.rs b/client/src/chain_spec.rs index 9fb960e1b..d752873c8 100644 --- a/client/src/chain_spec.rs +++ b/client/src/chain_spec.rs @@ -14,6 +14,7 @@ // You may obtain a copy of the License at the root of this project source code use hex_literal::hex; +use pallet_transaction_payment::Multiplier; use sc_service::ChainType; use seed_runtime::{ constants::{ @@ -24,7 +25,8 @@ use seed_runtime::{ keys::*, AccountId, AssetsConfig, BabeConfig, Balance, BalancesConfig, EthBridgeConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys, Signature, StakerStatus, StakingConfig, - SudoConfig, SystemConfig, XRPLBridgeConfig, BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY, + SudoConfig, SystemConfig, TransactionPaymentConfig, XRPLBridgeConfig, + BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY, }; use sp_core::{ecdsa, Pair, Public}; use sp_runtime::{ @@ -168,6 +170,7 @@ fn testnet_genesis( endowed_balances.push((account, 1_000_000 * ONE_ROOT)); } const VALIDATOR_BOND: Balance = 100_000 * ONE_ROOT; + let multiplier: Multiplier = Multiplier::from_rational(1_u128, 1_000_000_000_u128); RuntimeGenesisConfig { system: SystemConfig { @@ -189,7 +192,7 @@ fn testnet_genesis( im_online: Default::default(), nft: Default::default(), marketplace: Default::default(), - transaction_payment: Default::default(), + transaction_payment: TransactionPaymentConfig { multiplier, ..Default::default() }, // NOTE(surangap): keeping xrpl stuff inside the eth bridge isn't elegant. Refactor this to // validator-set pallet in the future. eth_bridge: EthBridgeConfig { xrp_door_signers }, diff --git a/e2e/package.json b/e2e/package.json index 02c53d2fb..d48f7675a 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -14,6 +14,7 @@ "lint": "eslint --config ./.eslintrc.yml --ignore-path ./.eslintignore --ext .js,.ts . --quiet", "test": "hardhat test", "test:parallel": "hardhat test --parallel", + "test:txcosts": "hardhat test test/*/*.TxCosts.test.ts", "seed": "docker-compose up && docker-compose rm -fsv" }, "devDependencies": { diff --git a/e2e/test/Dex/TxCosts.md b/e2e/test/Dex/TxCosts.md index 7479496da..62f1109a3 100644 --- a/e2e/test/Dex/TxCosts.md +++ b/e2e/test/Dex/TxCosts.md @@ -2,10 +2,10 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:-------------------------|:------------:|:--------------:|:-------------------------:| -| addLiquidity | 198248 | 89797 | 52137 | -| removeLiquidity | 171138 | 69284 | 34619 | -| swapExactTokensForTokens | 134389 | 52657 | 26391 | -| swapTokensForExactTokens | 134532 | 53269 | 27374 | +| addLiquidity | 198248 | 89797 | 9498 | +| removeLiquidity | 171138 | 69284 | 8192 | +| swapExactTokensForTokens | 134389 | 52657 | 8192 | +| swapTokensForExactTokens | 134532 | 53269 | 8658 | | quote | 44688 | 22377 | 0 | | getAmountOut | 44688 | 22423 | 0 | | getAmountsOut | 120661 | 34893 | 0 | @@ -16,7 +16,7 @@ | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:-------------------------|:---------------------:|:-----------------------:|:----------------------:| -| addLiquidity | 1341853 | 664167 | 391030 | -| removeLiquidity | 1074942 | 481791 | 259644 | -| swapExactTokensForTokens | 971294 | 390258 | 197937 | -| swapTokensForExactTokens | 972456 | 396791 | 205309 | +| addLiquidity | 1341853 | 664167 | 71241 | +| removeLiquidity | 1074942 | 481791 | 61441 | +| swapExactTokensForTokens | 971294 | 390258 | 61441 | +| swapTokensForExactTokens | 972456 | 396791 | 64941 | diff --git a/e2e/test/ERC1155/TxCosts.md b/e2e/test/ERC1155/TxCosts.md index 863a94159..c313d3a55 100644 --- a/e2e/test/ERC1155/TxCosts.md +++ b/e2e/test/ERC1155/TxCosts.md @@ -7,21 +7,21 @@ | balanceOfBatch | 32585 | 23723 | 0 | | setApprovalForAll | 47025 | 26244 | 0 | | isApprovedForAll | 26076 | 22433 | 0 | -| safeTransferFrom | 74307 | 28902 | 10552 | -| safeBatchTransferFrom | 75516 | 32865 | 13298 | -| mint | 74473 | 28847 | 11374 | -| mintBatch | 75540 | 31515 | 12307 | -| burn | 32581 | 26154 | 9630 | -| burnBatch | 38043 | 28483 | 10564 | +| safeTransferFrom | 74307 | 28902 | 8145 | +| safeBatchTransferFrom | 75516 | 32865 | 9078 | +| mint | 74473 | 28847 | 8192 | +| mintBatch | 75540 | 31515 | 9125 | +| burn | 32581 | 26154 | 7212 | +| burnBatch | 38043 | 28483 | 8145 | ## Generated tx costs(fees) for ERC1155 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:----------------------|:---------------------:|:-----------------------:|:----------------------:| -| safeTransferFrom | 440278 | 215698 | 79144 | -| safeBatchTransferFrom | 364092 | 242395 | 99740 | -| mint | 247001 | 214572 | 85306 | -| mintBatch | 294958 | 220784 | 92306 | -| burn | 237850 | 189997 | 72232 | -| burnBatch | 284644 | 212194 | 79232 | +| safeTransferFrom | 440278 | 215698 | 61091 | +| safeBatchTransferFrom | 364092 | 242395 | 68091 | +| mint | 247001 | 214572 | 61441 | +| mintBatch | 294958 | 220784 | 68441 | +| burn | 237850 | 189997 | 54091 | +| burnBatch | 284644 | 212194 | 61091 | diff --git a/e2e/test/ERC20/TxCosts.md b/e2e/test/ERC20/TxCosts.md index 6881292c8..21bd0e7bf 100644 --- a/e2e/test/ERC20/TxCosts.md +++ b/e2e/test/ERC20/TxCosts.md @@ -5,9 +5,9 @@ | totalSupply | 23717 | 22365 | 0 | | balanceOf | 25860 | 23694 | 0 | | allowance | 26064 | 23273 | 0 | -| approval | 47152 | 26142 | 11782 | -| transfer | 52698 | 35599 | 15506 | -| transferFrom | 44716 | 43768 | 18731 | +| approval | 47152 | 26142 | 7258 | +| transfer | 52698 | 35599 | 7258 | +| transferFrom | 44716 | 43768 | 8145 | | name | 25926 | 22365 | 0 | | decimals | 22354 | 22365 | 0 | | symbol | 25945 | 22365 | 0 | @@ -17,6 +17,6 @@ | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------|:---------------------:|:-----------------------:|:----------------------:| -| approval | 351452 | 189675 | 88368 | -| transfer | 390700 | 265015 | 116302 | -| transferFrom | 323614 | 312725 | 140484 | +| approval | 351452 | 189675 | 54441 | +| transfer | 390700 | 265015 | 54441 | +| transferFrom | 323614 | 312725 | 61091 | diff --git a/e2e/test/ERC721/TxCosts.md b/e2e/test/ERC721/TxCosts.md index 17be1dde4..f7f7c4211 100644 --- a/e2e/test/ERC721/TxCosts.md +++ b/e2e/test/ERC721/TxCosts.md @@ -6,28 +6,28 @@ | ownerOf | 25847 | 23207 | 0 | | getApproved | 27395 | 23207 | 0 | | isApprovedForAll | 26082 | 23734 | 0 | -| mint | 81095 | 27752 | 9216 | -| burn | 37870 | 32480 | 10523 | -| approve | 50740 | 27489 | 10852 | -| setApprovalForAll | 47011 | 26139 | 9700 | -| safetransferFrom | 77443 | 32663 | 0 | -| transferFrom | 66839 | 32429 | 11585 | +| mint | 81129 | 27752 | 6465 | +| burn | 37888 | 32480 | 6418 | +| approve | 50740 | 27489 | 8285 | +| setApprovalForAll | 47011 | 26139 | 8145 | +| safetransferFrom | 77471 | 32663 | 0 | +| transferFrom | 66861 | 32429 | 7445 | | name | 25932 | 22365 | 0 | | symbol | 25938 | 22365 | 0 | | tokenURI | 25964 | 23207 | 0 | -| owner | 23728 | 22365 | 0 | -| transferOwnership | 29147 | 27434 | 9501 | -| renounceOwnership | 30272 | 26415 | 9454 | +| owner | 23951 | 22365 | 0 | +| transferOwnership | 29147 | 27434 | 7212 | +| renounceOwnership | 30445 | 26415 | 7165 | ## Generated tx costs(fees) for ERC721 Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------|:---------------------:|:-----------------------:|:----------------------:| -| mint | 395981 | 206891 | 69125 | -| burn | 245366 | 236244 | 78928 | -| approve | 369808 | 200890 | 81393 | -| setApprovalForAll | 349839 | 189592 | 72754 | -| transferFrom | 442288 | 235419 | 86892 | -| transferOwnership | 218098 | 199622 | 71262 | -| renounceOwnership | 176172 | 196951 | 70912 | +| mint | 396176 | 206891 | 48491 | +| burn | 245561 | 236244 | 48141 | +| approve | 369808 | 200890 | 62141 | +| setApprovalForAll | 349839 | 189592 | 61091 | +| transferFrom | 442483 | 235419 | 55841 | +| transferOwnership | 218098 | 199622 | 54091 | +| renounceOwnership | 179180 | 196951 | 53741 | diff --git a/e2e/test/Futurepass/TxCosts.md b/e2e/test/Futurepass/TxCosts.md index 6d7042bb6..53c7a53dc 100644 --- a/e2e/test/Futurepass/TxCosts.md +++ b/e2e/test/Futurepass/TxCosts.md @@ -2,19 +2,19 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:------------------------------|:------------:|:--------------:|:-------------------------:| -| create | 0 | 37062 | 16354 | -| registerDelegateWithSignature | 0 | 38495 | 20190 | -| unregisterDelegate | 0 | 35566 | 16202 | -| transferOwnership | 0 | 43883 | 20410 | -| proxyCall | 0 | 65262 | 21155 | +| create | 0 | 37068 | 7025 | +| registerDelegateWithSignature | 0 | 38495 | 11178 | +| unregisterDelegate | 0 | 35566 | 7912 | +| transferOwnership | 0 | 43883 | 7958 | +| proxyCall | 0 | 65272 | 8378 | ## Generated tx costs(fees) for Futurepass Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:------------------------------|:---------------------:|:-----------------------:|:----------------------:| -| create | 0 | 276040 | 122660 | -| registerDelegateWithSignature | 0 | 288305 | 151429 | -| unregisterDelegate | 0 | 264442 | 121520 | -| transferOwnership | 0 | 314095 | 153075 | -| proxyCall | 0 | 446031 | 158664 | +| create | 0 | 276130 | 52691 | +| registerDelegateWithSignature | 0 | 288305 | 83841 | +| unregisterDelegate | 0 | 264442 | 59341 | +| transferOwnership | 0 | 314095 | 59691 | +| proxyCall | 0 | 446121 | 62841 | diff --git a/e2e/test/MarketPlace/TxCosts.md b/e2e/test/MarketPlace/TxCosts.md index f01f84280..6b2ea5ff0 100644 --- a/e2e/test/MarketPlace/TxCosts.md +++ b/e2e/test/MarketPlace/TxCosts.md @@ -2,29 +2,29 @@ | Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) | |:--------------------|:------------:|:--------------:|:-------------------------:| -| registerMarketplace | 0 | 28523 | 10843 | -| sellNft | 0 | 45619 | 22404 | -| auctionNft | 0 | 45698 | 21415 | -| makeSimpleOffer | 0 | 49994 | 37598 | -| buy | 0 | 42799 | 151674 | -| bid | 0 | 50373 | 1358013 | -| cancelSale | 0 | 33131 | 13321 | -| updateFixedPrice | 0 | 27601 | 9867 | -| acceptOffer | 0 | 55842 | 27393 | -| cancelOffer | 0 | 45669 | 20784 | +| registerMarketplace | 0 | 28523 | 7212 | +| sellNft | 0 | 45619 | 9218 | +| auctionNft | 0 | 45698 | 8238 | +| makeSimpleOffer | 0 | 49994 | 20965 | +| buy | 0 | 42799 | 140172 | +| bid | 0 | 50373 | 1340918 | +| cancelSale | 0 | 33131 | 6792 | +| updateFixedPrice | 0 | 27601 | 7538 | +| acceptOffer | 0 | 55842 | 6405 | +| cancelOffer | 0 | 45669 | 6452 | ## Generated tx costs(fees) for Marketplace Precompiles | Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) | |:--------------------|:---------------------:|:-----------------------:|:----------------------:| -| registerMarketplace | 0 | 213050 | 81324 | -| sellNft | 0 | 333944 | 168032 | -| auctionNft | 0 | 334836 | 160616 | -| makeSimpleOffer | 0 | 461842 | 281992 | -| buy | 0 | 1301702 | 1137556 | -| bid | 0 | 10365893 | 10185104 | -| cancelSale | 0 | 246664 | 99910 | -| updateFixedPrice | 0 | 203425 | 74003 | -| acceptOffer | 0 | 412144 | 205453 | -| cancelOffer | 0 | 334406 | 155882 | +| registerMarketplace | 0 | 213050 | 54091 | +| sellNft | 0 | 333944 | 69141 | +| auctionNft | 0 | 334836 | 61791 | +| makeSimpleOffer | 0 | 461842 | 157241 | +| buy | 0 | 1301702 | 1051291 | +| bid | 0 | 10365893 | 10056891 | +| cancelSale | 0 | 246664 | 50941 | +| updateFixedPrice | 0 | 203425 | 56541 | +| acceptOffer | 0 | 412144 | 48041 | +| cancelOffer | 0 | 334406 | 48391 | From 6d903b618e4d92dc80c7e8ebca8c4eec939414d5 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:00:44 +1200 Subject: [PATCH 107/112] fmt --- ethy-gadget/src/witness_record.rs | 6 +++++- evm-precompiles/marketplace/src/lib.rs | 8 ++++++-- pallet/dex/src/tests.rs | 5 +++-- pallet/doughnut/src/lib.rs | 10 +++++++--- pallet/marketplace/src/impls.rs | 4 +--- pallet/marketplace/src/tests.rs | 3 ++- pallet/nft/src/impls.rs | 4 ++-- pallet/nft/src/types.rs | 7 ++++--- pallet/sft/src/impls.rs | 8 ++------ pallet/sft/src/types.rs | 4 +++- pallet/xrpl-bridge/src/tests.rs | 4 ++-- primitives/src/nft.rs | 3 ++- runtime/src/tests/staker_payouts.rs | 2 +- 13 files changed, 40 insertions(+), 28 deletions(-) diff --git a/ethy-gadget/src/witness_record.rs b/ethy-gadget/src/witness_record.rs index c7788562f..5726db7d6 100644 --- a/ethy-gadget/src/witness_record.rs +++ b/ethy-gadget/src/witness_record.rs @@ -199,7 +199,11 @@ impl WitnessRecord { // didn't sign a different message) store `witness` as unconfirmed for verification later if let Some(metadata) = self.event_metadata(witness.event_id) { // verify the signature against locally found digest info from metadata - let Some(digest) = data_to_digest(metadata.chain_id, metadata.digest_data.clone(), EthyEcdsaToPublicKey::convert(witness.authority_id.clone())) else { + let Some(digest) = data_to_digest( + metadata.chain_id, + metadata.digest_data.clone(), + EthyEcdsaToPublicKey::convert(witness.authority_id.clone()), + ) else { error!(target: "ethy", "💎 error creating digest"); return Err(WitnessError::DigestCreationFailed) }; diff --git a/evm-precompiles/marketplace/src/lib.rs b/evm-precompiles/marketplace/src/lib.rs index 601a85e20..71dd43a3b 100644 --- a/evm-precompiles/marketplace/src/lib.rs +++ b/evm-precompiles/marketplace/src/lib.rs @@ -932,8 +932,12 @@ where revert("Marketplace: Expected marketplace id <= 2^32") ); let marketplace_id: MarketplaceId = marketplace_id.saturated_into(); - let Some(marketplace_account) = pallet_marketplace::RegisteredMarketplaces::::get(marketplace_id) else { - return Err(revert("Marketplace: The account_id hasn't been registered as a marketplace")); + let Some(marketplace_account) = + pallet_marketplace::RegisteredMarketplaces::::get(marketplace_id) + else { + return Err(revert( + "Marketplace: The account_id hasn't been registered as a marketplace", + )); }; let marketplace_account_h160: H160 = marketplace_account.account.into(); Ok(succeed(EvmDataWriter::new().write(Address::from(marketplace_account_h160)).build())) diff --git a/pallet/dex/src/tests.rs b/pallet/dex/src/tests.rs index bbaa66fa6..1168f74d0 100644 --- a/pallet/dex/src/tests.rs +++ b/pallet/dex/src/tests.rs @@ -1203,8 +1203,9 @@ fn perform_multiple_pair_swap_with_exact_supply() { let alice_c = AssetsExt::balance(c, &alice); assert_eq!(alice_a, to_eth(100) - 100_000_000u128 - 50_000u128); // Initial minted - liquidity added - swap a for c assert_eq!(alice_b, to_eth(100) - 200_000_000u128); // Initial minted - liquidity added ( in pool [a-b] & [b-c] - assert_eq!(alice_c, to_eth(100) - 100_000_000u128 + 49_650u128); // Initial minted - liquidity added - // + swap a for c + assert_eq!(alice_c, to_eth(100) - 100_000_000u128 + 49_650u128); // Initial minted - liquidity + // added + // + swap a for c }); } diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index 63d24fa6f..45cefae5f 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -428,7 +428,9 @@ pub mod pallet { ensure_none(origin)?; // run doughnut common validations - let Doughnut::V1(doughnut_v1) = Self::run_doughnut_common_validations(doughnut.clone())? else { + let Doughnut::V1(doughnut_v1) = + Self::run_doughnut_common_validations(doughnut.clone())? + else { return Err(Error::::UnsupportedDoughnutVersion)?; }; @@ -487,7 +489,9 @@ pub mod pallet { ) -> DispatchResult { let who = ensure_signed(origin.clone())?; // run doughnut common validations - let Ok(Doughnut::V1(doughnut_v1)) = Self::run_doughnut_common_validations(doughnut.clone()) else { + let Ok(Doughnut::V1(doughnut_v1)) = + Self::run_doughnut_common_validations(doughnut.clone()) + else { return Err(Error::::UnsupportedDoughnutVersion)?; }; // Only the issuer of the doughnut can revoke the doughnut @@ -566,7 +570,7 @@ where // only supports v1 for now let Doughnut::V1(_) = doughnut_decoded.clone() else { - log!(info,"🍩 unsupported doughnut version"); + log!(info, "🍩 unsupported doughnut version"); return Err(Error::::UnsupportedDoughnutVersion)?; }; diff --git a/pallet/marketplace/src/impls.rs b/pallet/marketplace/src/impls.rs index e2c645f64..d0907b781 100644 --- a/pallet/marketplace/src/impls.rs +++ b/pallet/marketplace/src/impls.rs @@ -430,9 +430,7 @@ impl Pallet { pub(crate) fn close_listings_at(now: BlockNumberFor) -> u32 { let mut removed = 0_u32; for (listing_id, _) in ListingEndSchedule::::drain_prefix(now).into_iter() { - let Some(listing_outer) = Listings::::get(listing_id) else { - continue - }; + let Some(listing_outer) = Listings::::get(listing_id) else { continue }; match listing_outer.clone() { Listing::FixedPrice(listing) => { Self::remove_listing(listing_outer, listing_id); diff --git a/pallet/marketplace/src/tests.rs b/pallet/marketplace/src/tests.rs index b94a6463f..dd88cc3bd 100644 --- a/pallet/marketplace/src/tests.rs +++ b/pallet/marketplace/src/tests.rs @@ -3261,7 +3261,8 @@ mod buy_sft { assert_eq!( AssetsExt::balance(NativeAssetId::get(), &token_owner), initial_balance_seller + sale_price - - royalties - network_fee - marketplace_royalties + royalties - network_fee - + marketplace_royalties ); assert_eq!(AssetsExt::total_issuance(NativeAssetId::get()), presale_issuance); diff --git a/pallet/nft/src/impls.rs b/pallet/nft/src/impls.rs index 5d6fd4fc4..b48fc6c42 100644 --- a/pallet/nft/src/impls.rs +++ b/pallet/nft/src/impls.rs @@ -592,8 +592,8 @@ impl NFTExt for Pallet { fn get_token_owner(token_id: &TokenId) -> Option { let Some(collection) = CollectionInfo::::get(token_id.0) else { - return None; - }; + return None; + }; collection.get_token_owner(token_id.1) } diff --git a/pallet/nft/src/types.rs b/pallet/nft/src/types.rs index 15800dd1b..d0a4059ad 100644 --- a/pallet/nft/src/types.rs +++ b/pallet/nft/src/types.rs @@ -154,9 +154,10 @@ where /// Get's the token owner pub fn get_token_owner(&self, serial_number: SerialNumber) -> Option { - let Some(token) = self.owned_tokens.iter().find(|x| x.contains_serial(&serial_number)) else { - return None; - }; + let Some(token) = self.owned_tokens.iter().find(|x| x.contains_serial(&serial_number)) + else { + return None; + }; Some(token.owner.clone()) } diff --git a/pallet/sft/src/impls.rs b/pallet/sft/src/impls.rs index 5aa64ba25..c2f42ec8a 100644 --- a/pallet/sft/src/impls.rs +++ b/pallet/sft/src/impls.rs @@ -447,17 +447,13 @@ impl Pallet { // Returns the balance of who of a token_id pub fn balance_of(who: &T::AccountId, token_id: TokenId) -> Balance { - let Some(token_info) = TokenInfo::::get(token_id) else { - return Balance::zero() - }; + let Some(token_info) = TokenInfo::::get(token_id) else { return Balance::zero() }; token_info.free_balance_of(who) } /// Returns the total supply of a specified token_id pub fn total_supply(token_id: TokenId) -> Balance { - let Some(token_info) = TokenInfo::::get(token_id) else { - return Balance::zero() - }; + let Some(token_info) = TokenInfo::::get(token_id) else { return Balance::zero() }; token_info.token_issuance } diff --git a/pallet/sft/src/types.rs b/pallet/sft/src/types.rs index a87a77eff..3ee6fb558 100644 --- a/pallet/sft/src/types.rs +++ b/pallet/sft/src/types.rs @@ -113,7 +113,9 @@ where who: &AccountId, amount: Balance, ) -> Result<(), TokenBalanceError> { - let Some((_, existing_balance)) = self.owned_tokens.iter_mut().find(|(account, _)| account == who) else { + let Some((_, existing_balance)) = + self.owned_tokens.iter_mut().find(|(account, _)| account == who) + else { return Err(TokenBalanceError::InsufficientBalance.into()); }; diff --git a/pallet/xrpl-bridge/src/tests.rs b/pallet/xrpl-bridge/src/tests.rs index 306451396..e48fe2b9c 100644 --- a/pallet/xrpl-bridge/src/tests.rs +++ b/pallet/xrpl-bridge/src/tests.rs @@ -1721,7 +1721,7 @@ fn process_delayed_payments_nothing_to_process_works() { let door = XrplAccountId::from_slice(b"5490B68F2d16B3E87cba"); assert_ok!(XRPLBridge::set_door_address(RuntimeOrigin::root(), door)); let delayed_payment_block_limit = DelayedPaymentBlockLimit::get(); // 1000 - // Set next process block to 0 + // Set next process block to 0 NextDelayProcessBlock::::put(0); // Call process delayed payments with enough weight to process 1000 blocks let weight_used = XRPLBridge::process_delayed_payments( @@ -1753,7 +1753,7 @@ fn process_delayed_payments_does_not_exceed_max_delayed_payments() { let door = XrplAccountId::from_slice(b"5490B68F2d16B3E87cba"); assert_ok!(XRPLBridge::set_door_address(RuntimeOrigin::root(), door)); let delayed_payment_block_limit = DelayedPaymentBlockLimit::get(); // 1000 - // Set next process block to 0 + // Set next process block to 0 NextDelayProcessBlock::::put(0); // Call process delayed payments with more than max_payments_per_block let weight_used = XRPLBridge::process_delayed_payments( diff --git a/primitives/src/nft.rs b/primitives/src/nft.rs index f13d67db5..898ca2b08 100644 --- a/primitives/src/nft.rs +++ b/primitives/src/nft.rs @@ -95,7 +95,8 @@ impl RoyaltiesSchedule { self.entitlements .iter() .map(|(_who, share)| share.deconstruct() as u32) - .sum::() <= Permill::ACCURACY + .sum::() <= + Permill::ACCURACY } /// Calculate the total % entitled for royalties /// It will return `0` if the `entitlements` are overcommitted diff --git a/runtime/src/tests/staker_payouts.rs b/runtime/src/tests/staker_payouts.rs index 384bc5c33..d5d4d71e5 100644 --- a/runtime/src/tests/staker_payouts.rs +++ b/runtime/src/tests/staker_payouts.rs @@ -268,7 +268,7 @@ fn staking_final_session_tracking_ethy() { assert!(::FinalSessionTracker::is_active_session_final()); advance_session(); // era 3 starts (forced) and keys contain the updated key - // Call on_initialize for scheduler to update keys and unpause bridge + // Call on_initialize for scheduler to update keys and unpause bridge let scheduled_block: BlockNumber = System::block_number() + 75_u32; Scheduler::on_initialize(scheduled_block.into()); assert!(pallet_ethy::NotaryKeys::::get() From da69197b9f33729aee46229670c531d333c8fd71 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:06:24 +1200 Subject: [PATCH 108/112] Bump spec version to 56 --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 4d6064889..7e30668f7 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -158,7 +158,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("root"), impl_name: create_runtime_str!("root"), authoring_version: 1, - spec_version: 55, + spec_version: 56, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 10, From 3d5a4c256c2d4c2b8bf758d87913bb9071ea66c4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:44:37 +1200 Subject: [PATCH 109/112] Fix tests --- runtime/src/tests/evm_tests.rs | 2 +- runtime/src/tests/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/tests/evm_tests.rs b/runtime/src/tests/evm_tests.rs index 4e3957510..9d6d9b4cb 100644 --- a/runtime/src/tests/evm_tests.rs +++ b/runtime/src/tests/evm_tests.rs @@ -351,7 +351,7 @@ fn transactions_cost_goes_to_tx_pot() { assert_ok!(Ethereum::transact(origin, tx)); // Check - let expected_change = 315_000u128; + let expected_change = 157_500u128; assert_eq!(TxFeePot::era_tx_fees(), old_pot + expected_change); }) } diff --git a/runtime/src/tests/mod.rs b/runtime/src/tests/mod.rs index 3c227bf9c..8299ba10d 100644 --- a/runtime/src/tests/mod.rs +++ b/runtime/src/tests/mod.rs @@ -47,7 +47,7 @@ use sp_runtime::BuildStorage; /// Base gas used for an EVM transaction pub const BASE_TX_GAS_COST: u128 = 21000; -pub const MINIMUM_XRP_TX_COST: u128 = 315_000; +pub const MINIMUM_XRP_TX_COST: u128 = 157_500; /// Default gas params in ethers pub const MAX_PRIORITY_FEE_PER_GAS: u128 = 1_500_000_000; From a401942bc86d6c141beb04352ebf0201b50c68f4 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:42:50 +1200 Subject: [PATCH 110/112] Fix warnings. --- pallet/doughnut/src/lib.rs | 4 ++-- pallet/ethy/src/ethereum_http_cli.rs | 2 +- pallet/futurepass/Cargo.toml | 4 ++-- pallet/nft/src/lib.rs | 1 - pallet/sft/src/lib.rs | 1 - pallet/token-approvals/src/tests.rs | 1 + pallet/tx-fee-pot/src/lib.rs | 4 ++-- pallet/xrpl/src/types.rs | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/pallet/doughnut/src/lib.rs b/pallet/doughnut/src/lib.rs index 45cefae5f..fa23d3c79 100644 --- a/pallet/doughnut/src/lib.rs +++ b/pallet/doughnut/src/lib.rs @@ -458,10 +458,10 @@ pub mod pallet { ); // permission domain - topping validations - let Some(topping_payload) = doughnut_v1.get_topping(TRN_PERMISSION_DOMAIN) else { + let Some(mut topping_payload) = doughnut_v1.get_topping(TRN_PERMISSION_DOMAIN) else { return Err(Error::::TRNDomainNotfound)? }; - let topping = Topping::decode(&mut topping_payload.clone()) + let topping = Topping::decode(&mut topping_payload) .map_err(|_| Error::::ToppingDecodeFailed)?; // check topping permissions diff --git a/pallet/ethy/src/ethereum_http_cli.rs b/pallet/ethy/src/ethereum_http_cli.rs index 3153dec95..a49d94b28 100644 --- a/pallet/ethy/src/ethereum_http_cli.rs +++ b/pallet/ethy/src/ethereum_http_cli.rs @@ -18,7 +18,7 @@ use sp_std::prelude::*; #[cfg(not(feature = "std"))] use sp_std::alloc::string::ToString; -#[cfg(std)] +#[cfg(feature = "std")] use std::string::ToString; use seed_pallet_common::log; diff --git a/pallet/futurepass/Cargo.toml b/pallet/futurepass/Cargo.toml index e9222b1ae..8ec4bcdce 100644 --- a/pallet/futurepass/Cargo.toml +++ b/pallet/futurepass/Cargo.toml @@ -12,7 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] hex = { workspace = true } -hex-literal = { workspace = true, optional = true } +hex-literal = { workspace = true } codec = { workspace = true } log = { workspace = true } scale-info = { workspace = true } @@ -66,4 +66,4 @@ std = [ "precompile-utils/std", ] try-runtime = ["frame-support/try-runtime"] -runtime-benchmarks = ["frame-benchmarking", "hex-literal", "seed-runtime/runtime-benchmarks"] +runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks"] diff --git a/pallet/nft/src/lib.rs b/pallet/nft/src/lib.rs index ef8b11b68..7f79e1c13 100644 --- a/pallet/nft/src/lib.rs +++ b/pallet/nft/src/lib.rs @@ -59,7 +59,6 @@ mod impls; pub mod traits; mod types; -pub use impls::*; pub use pallet::*; pub use types::*; diff --git a/pallet/sft/src/lib.rs b/pallet/sft/src/lib.rs index 31eea7b56..5137e87c8 100644 --- a/pallet/sft/src/lib.rs +++ b/pallet/sft/src/lib.rs @@ -40,7 +40,6 @@ mod weights; pub use weights::WeightInfo; -pub use impls::*; pub use pallet::*; pub use types::*; diff --git a/pallet/token-approvals/src/tests.rs b/pallet/token-approvals/src/tests.rs index c2fc3b6ac..25eb53ba3 100644 --- a/pallet/token-approvals/src/tests.rs +++ b/pallet/token-approvals/src/tests.rs @@ -22,6 +22,7 @@ pub fn create_account(seed: u64) -> AccountId { AccountId::from(H160::from_low_u64_be(seed)) } +#[allow(dead_code)] pub struct TestData { pub coll_owner: AccountId, pub coll_id: CollectionUuid, diff --git a/pallet/tx-fee-pot/src/lib.rs b/pallet/tx-fee-pot/src/lib.rs index b25e02670..51aa33b61 100644 --- a/pallet/tx-fee-pot/src/lib.rs +++ b/pallet/tx-fee-pot/src/lib.rs @@ -125,7 +125,7 @@ impl OnUnbalanced> for Pallet { // this amount was burnt from caller when tx fees were paid (incl. tip), move the funds into // the pot let note_amount = amount.peek(); - T::FeeCurrency::deposit_creating(&Self::account_id(), note_amount); + let _ = T::FeeCurrency::deposit_creating(&Self::account_id(), note_amount); Self::accrue_era_tx_fees(note_amount); } @@ -160,7 +160,7 @@ impl OnUnbalanced> for Pallet { let note_amount = amount.peek(); // mint `note_amount` (offsets `amount` imbalance) - T::StakeCurrency::deposit_creating(&Self::account_id(), note_amount); + let _ = T::StakeCurrency::deposit_creating(&Self::account_id(), note_amount); } } diff --git a/pallet/xrpl/src/types.rs b/pallet/xrpl/src/types.rs index 72bc78ed8..f1fbbc87e 100644 --- a/pallet/xrpl/src/types.rs +++ b/pallet/xrpl/src/types.rs @@ -240,7 +240,7 @@ impl TryFrom<&[u8]> for XRPLTransaction { type Error = &'static str; fn try_from(value: &[u8]) -> Result { - let deserializer = &mut Deserializer::new(value.clone().to_vec(), field_info_lookup()); + let deserializer = &mut Deserializer::new(value.to_vec(), field_info_lookup()); let tx_json = deserializer .to_json(&TypeCode::Object, &value) .map_err(|_e| "failed to convert encoded_msg to json value")?; From f74652f0ec55443d8db6db98749087c86f987c8e Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:15:46 +1200 Subject: [PATCH 111/112] Update spec version to 55 --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 7e30668f7..4d6064889 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -158,7 +158,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("root"), impl_name: create_runtime_str!("root"), authoring_version: 1, - spec_version: 56, + spec_version: 55, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 10, From f51efb3d98dbef0abc0db9ea8c9812aae3343c12 Mon Sep 17 00:00:00 2001 From: surangap <19677661+surangap@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:43:50 +1200 Subject: [PATCH 112/112] Revert version changes for now. --- runtime/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 4d6064889..8382d46a1 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -158,10 +158,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("root"), impl_name: create_runtime_str!("root"), authoring_version: 1, - spec_version: 55, + spec_version: 54, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 10, + transaction_version: 9, state_version: 0, };