diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 37c552f73f..fe24977ffc 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -222,9 +222,12 @@ jobs: /usr/local/cargo/registry key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }} - name: Run benchmarks tests - run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock - name: Run benchmarks tests run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap + # NOTE: MGX-742 + - name: Run benchmarks tests + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake build-and-run-try-runtime: name: Run try-runtime checks diff --git a/Cargo.lock b/Cargo.lock index d76e1b0f16..7a1974e40c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -554,7 +554,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "extrinsic-shuffler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "derive_more", "log", @@ -2781,7 +2781,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", ] @@ -2804,7 +2804,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-support-procedural", @@ -2830,7 +2830,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -2883,7 +2883,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2894,7 +2894,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2911,7 +2911,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -2945,7 +2945,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -2961,7 +2961,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bitflags", "environmental", @@ -2995,7 +2995,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "cfg-expr", @@ -3010,7 +3010,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3022,7 +3022,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -3032,7 +3032,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "extrinsic-shuffler", "frame-support", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-api", @@ -3091,7 +3091,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "parity-scale-codec", @@ -3235,6 +3235,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper", +] [[package]] name = "futures-util" @@ -3370,6 +3374,51 @@ dependencies = [ "regex", ] +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[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 = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "group" version = "0.12.1" @@ -3638,6 +3687,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots", ] [[package]] @@ -3906,10 +3956,13 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ + "jsonrpsee-client-transport", "jsonrpsee-core", + "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", + "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tracing", ] @@ -3920,7 +3973,11 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", "futures-util", + "gloo-net", "http", "jsonrpsee-core", "jsonrpsee-types", @@ -3961,6 +4018,26 @@ dependencies = [ "thiserror", "tokio", "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", ] [[package]] @@ -4012,6 +4089,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77310456f43c6c89bcba1f6b2fc2a28300da7c341f320f5128f8c83cc63232d" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.2" @@ -4943,6 +5031,7 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", @@ -5014,6 +5103,8 @@ dependencies = [ "polkadot-runtime-common", "polkadot-service", "polkadot-test-service", + "proof-of-stake-rpc", + "proof-of-stake-runtime-api", "sc-basic-authorship-ver", "sc-block-builder-ver", "sc-chain-spec", @@ -5131,6 +5222,7 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", @@ -5180,7 +5272,7 @@ dependencies = [ [[package]] name = "mangata-support" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "mangata-types", @@ -5193,7 +5285,7 @@ dependencies = [ [[package]] name = "mangata-types" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -5361,7 +5453,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -5381,7 +5473,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "jsonrpsee", @@ -6019,7 +6111,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6035,7 +6127,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6051,7 +6143,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6065,7 +6157,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6089,7 +6181,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6109,7 +6201,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6124,7 +6216,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6143,10 +6235,10 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", - "binary-merkle-tree 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "binary-merkle-tree 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "frame-support", "frame-system", "log", @@ -6199,7 +6291,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6217,7 +6309,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6236,7 +6328,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6253,7 +6345,7 @@ dependencies = [ [[package]] name = "pallet-collective-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6270,7 +6362,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6287,7 +6379,7 @@ dependencies = [ [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" -source = "git+https://github.com/mangata-finance//crowdloan-rewards?branch=mangata-dev#6d7f6cc5c8c5122e031e88062ffc48d7c6bc8f3e" +source = "git+https://github.com/mangata-finance//crowdloan-rewards?branch=feature/3rdparty-rewards#0ad74b0080bc823cb488eca35d72718e9406c5a8" dependencies = [ "ed25519-dalek", "frame-benchmarking", @@ -6311,7 +6403,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6329,14 +6421,14 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", - "pallet-election-provider-support-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "pallet-election-provider-support-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "parity-scale-codec", "rand 0.8.5", "scale-info", @@ -6352,7 +6444,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6378,7 +6470,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6396,7 +6488,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6443,7 +6535,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6466,7 +6558,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6482,7 +6574,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6502,7 +6594,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6571,7 +6663,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6588,7 +6680,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6635,7 +6727,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6651,7 +6743,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6667,7 +6759,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6704,7 +6796,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6715,7 +6807,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6756,7 +6848,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6786,11 +6878,13 @@ dependencies = [ "log", "mangata-support", "mangata-types", + "mockall", "orml-tokens", "orml-traits", "pallet-bootstrap", "pallet-issuance", "pallet-vesting-mangata", + "pallet-xyk", "parity-scale-codec", "rustc-hex", "scale-info", @@ -6808,7 +6902,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6823,7 +6917,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6841,7 +6935,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6856,7 +6950,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6890,7 +6984,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6907,7 +7001,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6944,7 +7038,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6958,7 +7052,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6981,7 +7075,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6992,7 +7086,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sp-arithmetic", @@ -7010,7 +7104,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7027,7 +7121,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7041,7 +7135,7 @@ dependencies = [ [[package]] name = "pallet-sudo-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7073,7 +7167,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7091,7 +7185,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7110,7 +7204,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7126,7 +7220,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7142,7 +7236,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "pallet-transaction-payment-mangata-rpc-runtime-api", @@ -7158,7 +7252,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-transaction-payment-mangata", "parity-scale-codec", @@ -7170,7 +7264,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7186,7 +7280,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7198,7 +7292,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7215,7 +7309,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7231,7 +7325,7 @@ dependencies = [ [[package]] name = "pallet-utility-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7247,7 +7341,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7262,7 +7356,7 @@ dependencies = [ [[package]] name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7278,7 +7372,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7381,7 +7475,7 @@ dependencies = [ [[package]] name = "parachain-staking" version = "3.0.0" -source = "git+https://github.com/mangata-finance//moonbeam?branch=mangata-dev#2ac7a339be795ee58603e3cb68e65fedc1b1c295" +source = "git+https://github.com/mangata-finance//moonbeam?branch=feature/3rdparty-rewards#508b9d4bf3940fdb6e984d84d07da8367baea915" dependencies = [ "aquamarine", "frame-benchmarking", @@ -8499,7 +8593,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", @@ -8790,7 +8884,7 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "sc-consensus-beefy", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-consensus-slots", "sc-executor", "sc-keystore", @@ -8953,7 +9047,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-executor", "sc-network", "sc-service", @@ -9184,6 +9278,38 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "proof-of-stake-rpc" +version = "2.0.0" +dependencies = [ + "jsonrpsee", + "mangata-types", + "parity-scale-codec", + "proof-of-stake-runtime-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "proof-of-stake-runtime-api" +version = "2.0.0" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "serde_json", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "prost" version = "0.11.9" @@ -9979,7 +10105,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sp-core", @@ -9990,7 +10116,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10018,7 +10144,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "futures-timer", @@ -10041,7 +10167,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "futures", @@ -10067,7 +10193,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10082,7 +10208,7 @@ dependencies = [ [[package]] name = "sc-block-builder-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -10103,7 +10229,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10122,7 +10248,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10133,7 +10259,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -10173,7 +10299,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "fnv", "futures", @@ -10199,7 +10325,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -10225,7 +10351,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10250,7 +10376,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10279,7 +10405,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "fork-tree", @@ -10320,7 +10446,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "jsonrpsee", @@ -10396,7 +10522,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10409,7 +10535,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -10497,7 +10623,7 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-rpc", "serde", "sp-blockchain", @@ -10509,7 +10635,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10534,7 +10660,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10558,7 +10684,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10571,7 +10697,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sc-allocator", @@ -10584,7 +10710,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "cfg-if", @@ -10602,7 +10728,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "futures", @@ -10618,7 +10744,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10633,7 +10759,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -10677,7 +10803,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "cid", "futures", @@ -10697,7 +10823,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10725,7 +10851,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ahash 0.8.3", "futures", @@ -10744,7 +10870,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10766,7 +10892,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10800,7 +10926,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10820,7 +10946,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10851,7 +10977,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "libp2p", @@ -10864,7 +10990,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10873,7 +10999,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "hash-db 0.15.2", @@ -10904,7 +11030,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10924,7 +11050,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "http", @@ -10940,7 +11066,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10966,7 +11092,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "directories", @@ -10998,7 +11124,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor 0.1.0 (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-storage-monitor 0.1.0 (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -11038,7 +11164,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "parity-scale-codec", @@ -11049,7 +11175,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "clap", "fs4", @@ -11081,7 +11207,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11089,7 +11215,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "serde", "serde_json", "sp-blockchain", @@ -11100,7 +11226,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "libc", @@ -11119,7 +11245,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "chrono", "futures", @@ -11138,7 +11264,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "atty", @@ -11169,7 +11295,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11180,7 +11306,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11207,7 +11333,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11221,7 +11347,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-channel", "futures", @@ -11429,6 +11555,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "separator" version = "0.4.1" @@ -11728,7 +11860,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -11746,7 +11878,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "blake2", @@ -11760,7 +11892,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11773,7 +11905,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "integer-sqrt", "num-traits", @@ -11787,7 +11919,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11800,7 +11932,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-api", @@ -11812,7 +11944,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -11830,7 +11962,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11845,7 +11977,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "parity-scale-codec", @@ -11863,7 +11995,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "merlin", @@ -11886,7 +12018,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11905,7 +12037,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "finality-grandpa", "log", @@ -11923,7 +12055,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11937,7 +12069,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11950,7 +12082,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11994,7 +12126,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "blake2b_simd", "byteorder", @@ -12008,7 +12140,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -12019,7 +12151,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12028,7 +12160,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -12038,7 +12170,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "environmental", "parity-scale-codec", @@ -12049,7 +12181,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -12064,7 +12196,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bytes", "ed25519", @@ -12089,7 +12221,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lazy_static", "sp-core", @@ -12100,7 +12232,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -12117,7 +12249,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "thiserror", "zstd", @@ -12126,7 +12258,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12144,7 +12276,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12158,7 +12290,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sp-api", "sp-core", @@ -12168,7 +12300,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "backtrace", "lazy_static", @@ -12178,7 +12310,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "rustc-hash", "serde", @@ -12188,7 +12320,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "either", "hash256-std-hasher", @@ -12211,7 +12343,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12229,7 +12361,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "proc-macro-crate", @@ -12241,7 +12373,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12255,7 +12387,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12267,7 +12399,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -12287,12 +12419,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12305,7 +12437,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures-timer", @@ -12320,7 +12452,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-std", @@ -12332,7 +12464,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sp-api", "sp-runtime", @@ -12341,7 +12473,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "log", @@ -12357,7 +12489,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -12380,7 +12512,7 @@ dependencies = [ [[package]] name = "sp-ver" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "log", @@ -12398,7 +12530,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12415,7 +12547,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12426,7 +12558,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12440,7 +12572,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12619,7 +12751,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "platforms 2.0.0", ] @@ -12627,7 +12759,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12646,7 +12778,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hyper", "log", @@ -12658,7 +12790,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "jsonrpsee", @@ -12671,7 +12803,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "log", @@ -12690,7 +12822,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12716,7 +12848,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "build-helper", @@ -13360,7 +13492,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "clap", @@ -13573,7 +13705,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "ver-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "derive_more", "futures", @@ -14903,16 +15035,6 @@ dependencies = [ ] [[patch.unused]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" - -[[patch.unused]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" - -[[patch.unused]] -name = "sp-authorship" +name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" diff --git a/Cargo.toml b/Cargo.toml index aeae1a639f..594fb89de6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,11 +55,11 @@ orml-tokens = { git = "https://github.com/mangata-finance//open-runtime-module-l # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/moonbeam"] # parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/update-staking-benchmarks" } -parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } +parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/3rdparty-rewards" } # parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] -pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "mangata-dev" } +pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "feature/3rdparty-rewards" } # pallet-crowdloan-rewards = { path = "../crowdloan-rewards" } # patch generated by ./scripts/dev_manifest.sh @@ -370,556 +370,559 @@ xcm-procedural = { git = "https://github.com/mangata-finance//polkadot", branch # xcm = { path = "../polkadot/xcm" } # xcm-procedural = { path = "../polkadot/xcm/procedural" } +[patch."https://github.com/mangata-finance//substrate"] +pallet-vesting-mangata = { git = "https://github.com/mangata-finance/substrate", branch = "feature/3rdparty-rewards" } + # patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/mangata-finance/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } # patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/paritytech/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } - sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } + sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } # patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/PureStake/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } # # patch generated by ./scripts/dev_manifest.sh diff --git a/devops/parachain-launch/config.yml b/devops/parachain-launch/config.yml index 5f733fcd56..388bee31c5 100644 --- a/devops/parachain-launch/config.yml +++ b/devops/parachain-launch/config.yml @@ -17,7 +17,7 @@ relaychain: - name: bob parachains: -- image: mangatasolutions/mangata-node:develop +- image: mangatasolutions/mangata-node:dev chain: base: rococo-local collators: diff --git a/node/Cargo.toml b/node/Cargo.toml index 000f3df6aa..5d888bf37f 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -143,6 +143,8 @@ polkadot-test-service = { git = "https://github.com/mangata-finance/polkadot", b # Mangata dependencies xyk-rpc = { default-features = false, version = '2.0.0', path = '../pallets/xyk/rpc' } xyk-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/xyk/runtime-api' } +proof-of-stake-runtime-api = { version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } +proof-of-stake-rpc = { version = '2.0.0', path = '../pallets/proof-of-stake/rpc' } [dev-dependencies] diff --git a/node/src/rpc.rs b/node/src/rpc.rs index 3c8abbe28d..63023cac00 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -46,11 +46,13 @@ where C::Api: pallet_transaction_payment_mangata_rpc::TransactionPaymentRuntimeApi, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: xyk_rpc::XykRuntimeApi, + C::Api: proof_of_stake_rpc::ProofOfStakeRuntimeApi, C::Api: BlockBuilder, C::Api: VerNonceApi, P: TransactionPool + Sync + Send + 'static, { use pallet_transaction_payment_mangata_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use proof_of_stake_rpc::{ProofOfStake, ProofOfStakeApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; use xyk_rpc::{Xyk, XykApiServer}; @@ -60,6 +62,7 @@ where module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; module.merge(TransactionPayment::new(client.clone()).into_rpc())?; module.merge(Xyk::new(client.clone()).into_rpc())?; + module.merge(ProofOfStake::new(client.clone()).into_rpc())?; Ok(module) } diff --git a/node/src/service.rs b/node/src/service.rs index 5ebfe00e75..0b2e5a2201 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -308,6 +308,7 @@ where + substrate_frame_rpc_system::AccountNonceApi + ver_api::VerApi + ver_api::VerNonceApi + + proof_of_stake_rpc::ProofOfStakeRuntimeApi + xyk_rpc::XykRuntimeApi + sp_consensus_aura::AuraApi, sc_client_api::StateBackendFor, Block>: sp_api::StateBackend, @@ -532,6 +533,7 @@ where + ver_api::VerApi + ver_api::VerNonceApi + xyk_rpc::XykRuntimeApi + + proof_of_stake_rpc::ProofOfStakeRuntimeApi + sp_consensus_aura::AuraApi, { start_node_impl::( diff --git a/pallets/bootstrap/src/mock.rs b/pallets/bootstrap/src/mock.rs index 41e286b08a..115f68e478 100644 --- a/pallets/bootstrap/src/mock.rs +++ b/pallets/bootstrap/src/mock.rs @@ -165,6 +165,10 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10000>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; + type ValuationApi = Xyk; } impl BootstrapBenchmarkingConfig for Test {} diff --git a/pallets/bootstrap/src/tests.rs b/pallets/bootstrap/src/tests.rs index 487daafd98..150850e8ea 100644 --- a/pallets/bootstrap/src/tests.rs +++ b/pallets/bootstrap/src/tests.rs @@ -728,10 +728,8 @@ fn test_bootstrap_state_transitions() { Bootstrap::on_initialize(BOOTSTRAP_PUBLIC_START); assert_eq!(Bootstrap::phase(), BootstrapPhase::Public); - println!("{:?}", Bootstrap::phase()); for i in BOOTSTRAP_PUBLIC_START..BOOTSTRAP_FINISH { Bootstrap::on_initialize(i); - println!("{:?}", Bootstrap::phase()); assert_eq!(Bootstrap::phase(), BootstrapPhase::Public); } diff --git a/pallets/fee-lock/src/mock.rs b/pallets/fee-lock/src/mock.rs index 0e3dbab812..22632c8737 100644 --- a/pallets/fee-lock/src/mock.rs +++ b/pallets/fee-lock/src/mock.rs @@ -14,7 +14,7 @@ use crate as pallet_fee_lock; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, Contains, Everything}, - weights::{constants::RocksDbWeight, Weight}, + weights::constants::RocksDbWeight, PalletId, }; use frame_system as system; @@ -163,6 +163,13 @@ impl Valuate for MockPoolReservesProvider { _ => Err(pallet_fee_lock::Error::::UnexpectedFailure.into()), } } + + fn valuate_non_liquidity_token( + liquidity_token_id: Self::CurrencyId, + liquidity_token_amount: Self::Balance, + ) -> Self::Balance { + unimplemented!() + } } parameter_types! { diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index 68feb0a224..c6aedfa0ad 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -41,6 +41,8 @@ lazy_static = "1.1.1" env_logger = "0.9.0" serial_test = { version = "0.6.0", default-features = false } test-case = "2.0.2" +mockall = "0.11.0" +pallet-xyk = { path = "../xyk" } [features] default = ['std'] @@ -60,7 +62,10 @@ std = [ "scale-info/std", ] -runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "mangata-support/runtime-benchmarks", +] try-runtime = [ "frame-support/try-runtime", diff --git a/pallets/proof-of-stake/rpc/Cargo.toml b/pallets/proof-of-stake/rpc/Cargo.toml new file mode 100644 index 0000000000..4a76093273 --- /dev/null +++ b/pallets/proof-of-stake/rpc/Cargo.toml @@ -0,0 +1,37 @@ +[package] +authors = ['Mangata team'] +name = "proof-of-stake-rpc" +version = "2.0.0" +edition = "2018" +description = "RPC calls for Proof of Stake" +license = "GPL-3.0-or-later" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0" } +jsonrpsee = { version = "0.16.2", features = ["server", "client", "macros"] } +serde = { version = "1.0.126", features = ["derive"], optional = true } + +# Substrate packages + +sp-api = { version = '4.0.0-dev', default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-blockchain = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-rpc = { version = '6.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-core = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-std = { version = '5.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-runtime = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +mangata-types = { default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } + +# local packages + +proof-of-stake-runtime-api = { version = "2.0.0", path = "../runtime-api", default-features = false } + +[features] +default = ["std"] +std = [ + "serde", + "sp-api/std", + "sp-core/std", + "sp-std/std", + "sp-runtime/std", + "proof-of-stake-runtime-api/std" +] diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs new file mode 100644 index 0000000000..a3832a91d1 --- /dev/null +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -0,0 +1,133 @@ +// Copyright (C) 2021 Mangata team + +use codec::Codec; +use jsonrpsee::{ + core::{async_trait, Error as JsonRpseeError, RpcResult}, + proc_macros::rpc, + types::error::{CallError, ErrorObject}, +}; +pub use proof_of_stake_runtime_api::ProofOfStakeApi as ProofOfStakeRuntimeApi; +// use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::HeaderBackend; +use sp_core::U256; +use sp_rpc::number::NumberOrHex; +use sp_runtime::{ + generic::BlockId, + traits::{Block as BlockT, MaybeDisplay, MaybeFromStr}, +}; +use sp_std::convert::{TryFrom, TryInto}; +use std::sync::Arc; + +#[rpc(client, server)] +pub trait ProofOfStakeApi { + #[method(name = "pos_calculate_native_rewards_amount")] + fn calculate_native_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + at: Option, + ) -> RpcResult; + + #[method(name = "pos_calculate_3rdparty_rewards_amount")] + fn calculate_3rdparty_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + rewards_token: TokenId, + at: Option, + ) -> RpcResult; + + #[method(name = "pos_calculate_3rdparty_rewards_all")] + fn calculate_3rdparty_rewards_all( + &self, + account: AccountId, + at: Option, + ) -> RpcResult>; +} + +pub struct ProofOfStake { + client: Arc, + _marker: std::marker::PhantomData, +} + +impl ProofOfStake { + pub fn new(client: Arc) -> Self { + Self { client, _marker: Default::default() } + } +} + +#[async_trait] +impl + ProofOfStakeApiServer<::Hash, Balance, TokenId, AccountId> + for ProofOfStake +where + Block: BlockT, + C: Send + Sync + 'static, + C: ProvideRuntimeApi, + C: HeaderBackend, + C::Api: ProofOfStakeRuntimeApi, + Balance: Codec + MaybeDisplay + MaybeFromStr + Into, + TokenId: Codec + MaybeDisplay + MaybeFromStr, + AccountId: Codec + MaybeDisplay + MaybeFromStr, +{ + fn calculate_native_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + at: Option<::Hash>, + ) -> RpcResult { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_native_rewards_amount(at, account, liquidity_token) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) + } + + fn calculate_3rdparty_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + reward_token: TokenId, + at: Option<::Hash>, + ) -> RpcResult { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_3rdparty_rewards_amount(at, account, liquidity_token, reward_token) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) + } + + fn calculate_3rdparty_rewards_all( + &self, + account: AccountId, + at: Option<::Hash>, + ) -> RpcResult> { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_3rdparty_rewards_all(at, account) + .map(|vec| vec.into_iter().map(|(token1, token2, balance)| (token1, token2, Into::::into(balance))).collect()) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) + } +} diff --git a/pallets/proof-of-stake/runtime-api/Cargo.toml b/pallets/proof-of-stake/runtime-api/Cargo.toml new file mode 100644 index 0000000000..34d8be4bf3 --- /dev/null +++ b/pallets/proof-of-stake/runtime-api/Cargo.toml @@ -0,0 +1,30 @@ +[package] +authors = ['Mangata team'] +name = "proof-of-stake-runtime-api" +version = "2.0.0" +edition = "2018" +license = "GPL-3.0-or-later" + +[dependencies] +serde = { version = "1.0.126", optional = true, features = ["derive"] } +sp-api = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-std = { default-features = false, version = '5.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-runtime = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +frame-support = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +frame-system = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-core = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } + +[dev-dependencies] +serde_json = "1.0.68" + +[features] +default = ["std"] +std = [ + "serde", + "sp-api/std", + "codec/std", + "sp-runtime/std", + "frame-support/std", + 'frame-system/std' +] diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs new file mode 100644 index 0000000000..217cd6e479 --- /dev/null +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -0,0 +1,28 @@ +// Copyright (C) 2021 Mangata team +#![cfg_attr(not(feature = "std"), no_std)] +use codec::{Codec, Decode, Encode}; +use sp_runtime::traits::{MaybeDisplay, MaybeFromStr}; +use sp_std::vec::Vec; + +sp_api::decl_runtime_apis! { + pub trait ProofOfStakeApi where + Balance: Codec + MaybeDisplay + MaybeFromStr, + TokenId: Codec + MaybeDisplay + MaybeFromStr, + AccountId: Codec + MaybeDisplay + MaybeFromStr,{ + + fn calculate_native_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Balance; + + fn calculate_3rdparty_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + reward_asset_id: TokenId, + ) -> Balance; + + fn calculate_3rdparty_rewards_all( + user: AccountId, + ) -> Vec<(TokenId, TokenId, Balance)>; + } +} diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 4066363d90..cc80f637a3 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -3,6 +3,7 @@ use super::*; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_support::traits::WithdrawReasons; use frame_system::RawOrigin; use mangata_support::traits::{ComputeIssuance, ProofOfStakeRewardsApi}; use orml_tokens::MultiTokenCurrencyExtended; @@ -12,47 +13,55 @@ use crate::Pallet as PoS; const MILION: u128 = 1_000__000_000__000_000; -#[macro_export] -macro_rules! init { - () => { - frame_system::Pallet::::set_block_number(1_u32.into()); - pallet_issuance::Pallet::::initialize(); - }; +fn init() +where + T: frame_system::Config, + T: pallet_issuance::Config, +{ + frame_system::Pallet::::set_block_number(1_u32.into()); + pallet_issuance::Pallet::::initialize(); } -#[macro_export] -macro_rules! forward_to_next_session { - () => { - let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); - - let blocks_per_session: u32 = PoS::::rewards_period(); - let target_block_nr: u32; - let target_session_nr: u32; - - if (current_block == 0_u32 || current_block == 1_u32) { - target_session_nr = 1_u32; - target_block_nr = blocks_per_session; - } else { - // to fail on user trying to manage block nr on its own - assert!(current_block % blocks_per_session == 0); - target_session_nr = (current_block / blocks_per_session) + 1_u32; - target_block_nr = (target_session_nr * blocks_per_session); - } - - frame_system::Pallet::::set_block_number(target_block_nr.into()); - pallet_issuance::Pallet::::compute_issuance(target_session_nr); - }; +type TokensOf = ::Currency; +type AccountIdOf = ::AccountId; +type XykOf = ::ValuationApi; + +fn forward_to_next_session() +where + T: frame_system::Config, + // T: pallet_issuance::Config, + T: Config, +{ + crate::utils::roll_to_next_session::(); + // let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); + // + // let blocks_per_session: u32 = PoS::::rewards_period(); + // let target_block_nr: u32; + // let target_session_nr: u32; + // + // if current_block == 0_u32 || current_block == 1_u32 { + // target_session_nr = 1_u32; + // target_block_nr = blocks_per_session; + // } else { + // // to fail on user trying to manage block nr on its own + // assert!(current_block % blocks_per_session == 0); + // target_session_nr = (current_block / blocks_per_session) + 1_u32; + // target_block_nr = target_session_nr * blocks_per_session; + // } + // + // frame_system::Pallet::::set_block_number(target_block_nr.into()); + // pallet_issuance::Pallet::::compute_issuance(target_session_nr); } benchmarks! { - claim_rewards_all{ + claim_native_rewards{ // 1. create // 2. promote // 3. mint // 4. wait some // 5. claim all - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -61,7 +70,7 @@ benchmarks! { let non_native_asset_id2 : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); let liquidity_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); - PoS::::update_pool_promotion(RawOrigin::Root.into(), liquidity_asset_id, 1u8).unwrap(); + PoS::::update_pool_promotion(RawOrigin::Root.into(), liquidity_asset_id, 1u8).unwrap(); assert_eq!( ::Currency::total_issuance(liquidity_asset_id.into()), @@ -72,16 +81,16 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity.into() / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity.into() / 4_u128; - forward_to_next_session!(); + forward_to_next_session::(); - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); - forward_to_next_session!(); - forward_to_next_session!(); + forward_to_next_session::(); + forward_to_next_session::(); assert!(PoS::::calculate_rewards_amount(caller.clone(), liquidity_asset_id).unwrap() > 0); - }: claim_rewards_all(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id) + }: claim_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id) verify { assert_eq!( @@ -105,7 +114,7 @@ benchmarks! { ); } - activate_liquidity{ + activate_liquidity_for_native_rewards{ // activate : // 1 crate pool // 2 promote pool @@ -113,7 +122,7 @@ benchmarks! { // 4 wait some time // 5 mint some - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -133,16 +142,16 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity / 4_u128; - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, quater_of_minted_liquidity ); - forward_to_next_session!(); + forward_to_next_session::(); - }: activate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity, None) + }: activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity, None) verify { assert_eq!( @@ -151,14 +160,14 @@ benchmarks! { ) } - deactivate_liquidity{ + deactivate_liquidity_for_native_rewards{ // deactivate // 1 crate pool // 2 promote pool // 3 mint some tokens // deactivate some tokens (all or some - to be checked) - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -177,16 +186,16 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity.into() / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity.into() / 4_u128; - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id.into(), half_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id.into(), half_of_minted_liquidity, None).unwrap(); assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, half_of_minted_liquidity ); - forward_to_next_session!(); + forward_to_next_session::(); - }: deactivate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity.into()) + }: deactivate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity.into()) verify { assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, @@ -194,5 +203,284 @@ benchmarks! { ); } + reward_pool{ + // 1 crate as many schedules as possible + // 2 wait for one of the schedules to expire + // 3 create new schedule that will replace the expired one + + init::(); + + let schedules_limit = 10u32; + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + + loop { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * 10u128; + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit + 1); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + for _ in 0 .. schedules_limit - 1 { + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token = token_id + 1; + let balance:u128 = TokensOf::::free_balance(reward_token.into(), &caller).into(); + assert_eq!(balance, REWARDS_AMOUNT); + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, token_id), + reward_token.into(), + (REWARDS_AMOUNT).into(), + 10u32.into(), + ).unwrap(); + } + + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token = token_id + 1; + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, token_id), + reward_token.into(), + REWARDS_AMOUNT, + 2u32.into(), + ).unwrap(); + + forward_to_next_session::(); + forward_to_next_session::(); + forward_to_next_session::(); + + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token = token_id + 1; + + assert_eq!( + PoS::::tail().unwrap(), + (schedules_limit - 1 ) as u64 + ); + + }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), REWARDS_AMOUNT, 10u32.into()) + verify { + + assert_eq!( + PoS::::tail().unwrap(), + schedules_limit as u64 + ); + + } + + activate_liquidity_for_3rdparty_rewards{ + // 1 create pool that can be rewarded + // 2 create token that is used as reward + // 3 activate rewards + + init::(); + + let schedules_limit = 10u32; + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * (schedules_limit as u128); + + loop { + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + REWARDS_AMOUNT, + 2u32.into(), + ).unwrap(); + + }: activate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) + verify { + forward_to_next_session::(); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id, reward_token_id).unwrap(), + REWARDS_AMOUNT/2 + ) + } + + deactivate_liquidity_for_3rdparty_rewards{ + // 1 create pool that can be rewarded + // 2 create token that is used as reward + // 3 activate rewards + // 4 deactivate rewards and unlock them + + init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); + + loop { + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + REWARDS_AMOUNT, + 2u32.into(), + ).unwrap(); + + assert!(TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + REWARDS_AMOUNT.into(), + WithdrawReasons::all(), + Default::default(), + ).is_ok()); + + PoS::::activate_liquidity_for_3rdparty_rewards( + RawOrigin::Signed(caller.clone().into()).into(), + liquidity_asset_id, + 10_000u128, + reward_token_id, + None + ).unwrap(); + + assert!( + TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + REWARDS_AMOUNT.into(), + WithdrawReasons::all(), + Default::default(), + ).is_err() + ); + + + }: deactivate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) + verify { + + assert!(TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + REWARDS_AMOUNT.into(), + WithdrawReasons::all(), + Default::default(), + ).is_ok()); + } + + + claim_3rdparty_rewards{ + // 1 create pool that can be rewarded + // 2 create token that is used as reward + // 3 activate rewards + // 4 wait for rewards to be avialble + // 5 claim rewards + + init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); + + loop { + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + REWARDS_AMOUNT, + 2u32.into(), + ).unwrap(); + + PoS::::activate_liquidity_for_3rdparty_rewards( + RawOrigin::Signed(caller.clone().into()).into(), + liquidity_asset_id, + 10_000u128, + reward_token_id, + None + ).unwrap(); + + forward_to_next_session::(); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + REWARDS_AMOUNT / 2 + ); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + REWARDS_AMOUNT + ); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + REWARDS_AMOUNT + ); + + let balance_before:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); + + }: claim_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, reward_token_id) + verify { + + let balance_after:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + 0u128 + ); + + assert_eq!(balance_after - balance_before, REWARDS_AMOUNT); + } + impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 426009495e..dbed364c27 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1,12 +1,120 @@ #![cfg_attr(not(feature = "std"), no_std)] +//! # Proof of Stake Module +//! +//! The goal of the Proof of Stake module is to reward people for providing liquidity to the Mangata DEX. +//! +//! ## Types of Rewards +//! +//! ### Native Rewards +//! +//! As described in Mangata tokenomics, during each session, some of the rewards are minted and distributed +//! among promoted pools. The council decides which pool to promote, and each promoted pool has a weight +//! assigned that determines how much of the rewards should +//! be distributed to that pool. +//! +//! The final amount of tokens that a user receives depends on: +//! - the amount of activated liquidity - rewards are distributed proportionally to the amount of +//! activated liquidity. +//! - the liquidity token itself - the more weight is assigned to the pool, the more rewards it receives. +//! - the time of liquidity activation - the longer a user stores liquidity, the more rewards they receive +//! (based on an asymptotic curve). +//! +//! Activated Liquidity cannot be transferred to another account; it is considered locked. The moment +//! liquidity is unlocked, the user loses the ability to claim rewards for that liquidity. +//! +//! #### Storage entries +//! +//! - [`TotalActivatedLiquidity`] - Stores information about the total amount of activated liquidity for +//! each liquidity token. +//! - [`PromotedPoolRewards`] - Stores information about the total amount of rewards for each liquidity +//! token. +//! - [`RewardsInfo`] - Stores information about rewards for liquidity mining. +//! - [`ThirdPartyActivationKind`] - Wrapper over origin ActivateKind that is used in +//! +//! #### Extrinsics +//! +//! - [`Pallet::activate_liquidity`] - Activates liquidity for liquidity mining rewards. +//! - [`Pallet::deactivate_liquidity_for_native_rewards`] - Deactivates liquidity for liquidity mining rewards. +//! - [`Pallet::claim_native_rewards`] - Claims all rewards for all liquidity tokens. +//! - [`Pallet::update_pool_promotion`] - Enables/disables the pool for liquidity mining rewards. +//! +//! ### 3rd Party Rewards +//! +//! Anyone can provide tokens to reward people who store a particular liquidity token. Any +//! liquidity token can be rewarded with any other token provided by the user. Liquidity can be +//! activated for multiple scheduled rewards related to that liquidity token. Tokens will remain +//! locked (untransferable) as long as there is at least one schedule for which these rewards are +//! activated. +//! +//! #### Storage entries +//! +//! - [`RewardsInfoForScheduleRewards`] - Stores information about rewards for scheduled rewards. +//! - [`ScheduleRewardsPerSingleLiquidity`] - Stores the amount of rewards per single liquidity token. +//! - [`RewardsSchedules`] - Stores information about scheduled rewards. +//! - [`ScheduleId`] - Stores the unique id of the schedule. +//! - [`RewardTokensPerPool`] - Stores information about which reward tokens are used for a particular +//! liquidity token. +//! - [`TotalActivatedLiquidityForSchedules`] - Stores information about the total amount of activated +//! liquidity for each schedule. +//! - [`ActivatedLiquidityForSchedules`] - Stores information about how much liquidity was activated for +//! each schedule. +//! - [`ActivatedLockedLiquidityForSchedules`] - Stores information about how much liquidity was activated +//! for each schedule and not yet liquidity mining rewards. +//! +//! +//! #### Extrinsics +//! +//! - [`Pallet::reward_pool`] - Schedules rewards for the selected liquidity token. +//! - [`Pallet::activate_liquidity_for_3rdparty_rewards`] - Activates liquidity for scheduled rewards. +//! - [`Pallet::deactivate_liquidity_for_3rdparty_rewards`] - Deactivates liquidity for scheduled rewards. +//! - [`Pallet::claim_3rdparty_rewards`] - Claims all scheduled rewards for all liquidity tokens. +//! +//! ## Reusing a Single Liquidity Token for Multiple Rewards +//! +//! It may happen that a single liquidity token is rewarded with: +//! - Liquidity Mining Rewards - because the pool was promoted by the council. +//! - Scheduled rewards with token X - because Alice decided to do so. +//! - Scheduled rewards with token Y - because Bob decided to do so. +//! +//! In that case, a single liquidity token can be used to obtain rewards from multiple sources. There are +//! several options to do that: +//! +//! - The user can reuse liquidity used for liquidity mining rewards to claim scheduled rewards. In +//! this case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::LiquidityMining`]. +//! +//! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. +//! +//! - The user can't directly provide liquidity activated for scheduled rewards to activate it for liquidity mining rewards. Instead: +//! * Liquidity used for schedule rewards can be deactivated +//! [`Pallet::deactivate_liquidity_for_3rdparty_rewards`]. +//! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. +//! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_3rdparty_rewards`] with [`ThirdPartyActivationKind::Mining`]. + +use frame_support::pallet_prelude::*; + +pub type ScheduleId = u64; + +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub struct Schedule { + scheduled_at: u64, + last_session: u64, + liq_token: TokenId, + reward_token: TokenId, + amount_per_session: Balance, +} + use frame_benchmarking::Zero; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, + dispatch::{DispatchError, DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, + storage::bounded_btree_map::BoundedBTreeMap, + traits::Nothing, }; use frame_system::ensure_signed; +use mangata_support::traits::Valuate; use sp_core::U256; +use sp_runtime::traits::AccountIdConversion; use frame_support::{ pallet_prelude::*, @@ -15,7 +123,7 @@ use frame_support::{ }; use frame_system::pallet_prelude::*; use mangata_support::traits::{ - ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, + ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait, }; use mangata_types::{multipurpose_liquidity::ActivateKind, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyExtended, MultiTokenReservableCurrency}; @@ -25,16 +133,25 @@ use sp_runtime::{traits::SaturatedConversion, Perbill}; use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::RewardInfo; +use reward_info::{RewardInfo, RewardsCalculator}; + +mod schedule_rewards_calculator; +use schedule_rewards_calculator::{ + ActivatedLiquidityPerSchedule, ScheduleRewards, ScheduleRewardsCalculator, +}; + mod benchmarking; #[cfg(test)] mod mock; -#[cfg(test)] +#[cfg(all(test, not(feature = "runtime-benchmarks")))] mod tests; -pub(crate) const LOG_TARGET: &str = "proof-of-stake"; +#[cfg(any(feature = "runtime-benchmarks", test))] +mod utils; + +pub(crate) const LOG_TARGET: &str = "pos"; // syntactic sugar for logging. #[macro_export] @@ -54,8 +171,24 @@ pub use weights::WeightInfo; type AccountIdOf = ::AccountId; +/// Wrapper over origin ActivateKind that is used in [`Pallet::activat_liquidity`] +/// with extension that allows activating liquidity that was already used for: +/// - `ActivatedLiquidity` - already activated liquidity (for scheduled rewards) +/// - `LiquidityMining` - already activated liquidity (for liquidity mining rewards) +#[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +pub enum ThirdPartyActivationKind { + ActivateKind(Option), + ActivatedLiquidity(TokenId), + LiquidityMining, +} + +const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); +pub type SessionId = u64; + #[frame_support::pallet] pub mod pallet { + use frame_support::traits::Currency; + use super::*; #[pallet::pallet] @@ -63,7 +196,110 @@ pub mod pallet { pub struct Pallet(PhantomData); #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks for Pallet { + fn on_initialize(_n: T::BlockNumber) -> Weight { + let session_id = Self::session_index() as u64; + + // NOTE: 1R + if Self::is_new_session() { + ScheduleListPos::::kill(); + return Default::default() + } + + const AMOUNT_PER_BLOCK: u64 = 5; + + for _ in 0..AMOUNT_PER_BLOCK { + // READS PER ITERTION + // + // ON VALID SCHEDULE (AVERAGE) ====> 3R + 1 W + N*R + N*W + // 3 x READ HEAD,TAIL,POS : ALWAYS + // 1 x WRITE ScheduleListPos : ALWAYS (pesimistic) + // PER ITER: + // - READ RewardsSchedulesList : ALWAYS + // - WRITE ScheduleRewardsTotal : ALWAYS (pesemisitic) + + // ON OUTDATED SCHEDULE (PESIMITIC) =====> 3R + 1W + (N-1)*W + 2W + // 3 x READ HEAD,TAIL,POS : ALWAYS + // 1 x WRITE ScheduleListPos `next` : ONCE (pesemisitic) + // REMOVE N-1 SCHEDULES IN THE MIDDDLE + // - 1 x WRITE update previous schedudle `next` : ALWAYS (pesemisitic) + // REMOVE LAST ELEM: + // - 1 x WRITE update list tail + // - 1 x WRITE update elem before last : ALWAYS (pesemisitic) + + // NOTE: 1R + let last_valid = ScheduleListPos::::get(); + // NOTE: 1R + let pos = match (last_valid, ScheduleListHead::::get()) { + (Some(pos), _) => { + if let Some((_schedule, next)) = RewardsSchedulesList::::get(pos) { + next + } else { + None + } + }, + (None, Some(head)) => Some(head), + _ => None, + }; + + if let Some(pos_val) = pos { + // NOTE: 1R + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val) { + if schedule.last_session >= session_id { + if schedule.scheduled_at < session_id { + // NOTE: 1R 1W + ScheduleRewardsTotal::::mutate( + (schedule.liq_token, schedule.reward_token), + |s| s.provide_rewards(session_id, schedule.amount_per_session), + ); + } + // NOTE: 1W + ScheduleListPos::::put(pos_val); + } else { + // NOTE: 2R + match (Self::head(), Self::tail()) { + (Some(head), Some(tail)) if head == pos_val && head != tail => + if let Some(next) = next { + // NOTE: 1W + ScheduleListHead::::put(next); + }, + (Some(head), Some(tail)) if tail == pos_val && head == tail => { + // NOTE: 3W + ScheduleListTail::::kill(); + ScheduleListHead::::kill(); + ScheduleListPos::::kill(); + }, + (Some(head), Some(tail)) if tail == pos_val && head != tail => + if let Some(last_valid) = last_valid { + // NOTE: 1W + ScheduleListTail::::put(last_valid); + // NOTE: 1R 1W + RewardsSchedulesList::::mutate(last_valid, |data| { + if let Some((_schedule, next)) = data.as_mut() { + *next = None + } + }); + }, + (Some(_head), Some(_tail)) => + if let Some(last_valid) = last_valid { + // NOTE: 1R 1W + RewardsSchedulesList::::mutate(last_valid, |data| { + if let Some((_schedule, prev_next)) = data.as_mut() { + *prev_next = next + } + }); + }, + _ => {}, + } + } + } + } else { + break + } + } + Default::default() + } + } #[cfg(feature = "runtime-benchmarks")] pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} @@ -72,10 +308,39 @@ pub mod pallet { #[cfg(not(feature = "runtime-benchmarks"))] pub trait PoSBenchmarkingConfig {} - #[cfg(not(feature = "runtime-benchmarks"))] impl PoSBenchmarkingConfig for T {} + #[cfg(not(feature = "runtime-benchmarks"))] + pub trait ValutationApiTrait: + Valuate + { + } + + #[cfg(feature = "runtime-benchmarks")] + pub trait ValutationApiTrait: + Valuate + + XykFunctionsTrait + { + } + + #[cfg(not(feature = "runtime-benchmarks"))] + impl ValutationApiTrait for T + where + C: Config, + T: Valuate, + { + } + + #[cfg(feature = "runtime-benchmarks")] + impl ValutationApiTrait for T + where + C: Config, + T: Valuate, + T: XykFunctionsTrait, + { + } + #[pallet::config] pub trait Config: frame_system::Config + PoSBenchmarkingConfig { type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -90,7 +355,13 @@ pub mod pallet { type LiquidityMiningIssuanceVault: Get; #[pallet::constant] type RewardsDistributionPeriod: Get; + /// The maximum number of schedules that can be active at one moment + type RewardsSchedulesLimit: Get; + /// The minimum number of rewards per session for schedule rewards + type Min3rdPartyRewardValutationPerSession: Get; + type Min3rdPartyRewardVolume: Get; type WeightInfo: WeightInfo; + type ValuationApi: ValutationApiTrait; } #[pallet::error] @@ -112,6 +383,18 @@ pub mod pallet { CalculateRewardsAllMathError, MissingRewardsInfoError, DeprecatedExtrinsic, + /// Cannot schedule rewards in past + CannotScheduleRewardsInPast, + /// Pool does not exist + PoolDoesNotExist, + /// Too many schedules + TooManySchedules, + /// Too little rewards per session + TooLittleRewards, + /// Too small volume of the pool + TooSmallVolume, + // Liquidity is reused for 3rdparty rewards + LiquidityLockedIn3rdpartyRewards, } #[pallet::event] @@ -159,12 +442,117 @@ pub mod pallet { pub type TotalActivatedLiquidity = StorageMap<_, Twox64Concat, TokenId, u128, ValueQuery>; + // ////////////////////////////////////////////////////////////////////////////////////////////// + // 3rd Party Rewards + // ////////////////////////////////////////////////////////////////////////////////////////////// + + /// Stores information about pool weight and accumulated rewards + #[pallet::storage] + pub type RewardsInfoForScheduleRewards = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + (TokenId, TokenId), + RewardInfo, + ValueQuery, + >; + + /// How much scheduled rewards per single liquidty_token should be distribute_rewards + /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic + #[pallet::storage] + pub type ScheduleRewardsTotal = + StorageMap<_, Twox64Concat, (TokenId, TokenId), ScheduleRewards, ValueQuery>; + + #[pallet::storage] + pub type ScheduleRewardsPerLiquidity = + StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; + + /// List of activated schedules sorted by expiry date + #[pallet::storage] + #[pallet::getter(fn schedules)] + pub type RewardsSchedules = StorageValue< + _, + BoundedBTreeMap< + (T::BlockNumber, TokenId, TokenId, Balance, u64), + (), + T::RewardsSchedulesLimit, + >, + ValueQuery, + >; + + #[pallet::storage] + #[pallet::getter(fn pos)] + pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + #[pallet::getter(fn head)] + pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + #[pallet::getter(fn tail)] + pub type ScheduleListTail = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + pub type RewardsSchedulesList = + StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; + + /// Maps liquidity token to list of tokens that it ever was rewarded with + #[pallet::storage] + pub type RewardTokensPerPool = + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; + + /// Tracks number of activated liquidity per schedule. It is used for calculation of + /// "cumulative rewrds amount" per 1 liquidity token. Therefore activation/deactivation needs + /// to be deffered same way as schedule rewards are delayed. + #[pallet::storage] + pub type TotalActivatedLiquidityForSchedules = StorageDoubleMap< + _, + Twox64Concat, + TokenId, + Twox64Concat, + TokenId, + ActivatedLiquidityPerSchedule, + ValueQuery, + >; + + /// Tracks how much liquidity user activated for particular (liq token, reward token) pair + /// StorageNMap was used because it only require single read to know if user deactivated all + /// liquidity associated with particular liquidity_token that is rewarded. If so part of the + /// liquididty tokens can be unlocked. + #[pallet::storage] + pub type ActivatedLiquidityForSchedules = StorageNMap< + _, + ( + NMapKey>, + NMapKey, + NMapKey, + ), + u128, + OptionQuery, + >; + + /// Tracks how much of the liquidity was activated for schedule rewards and not yet + /// liquidity mining rewards. That information is essential to properly handle token unlcocks + /// when liquidity is deactivated. + #[pallet::storage] + pub type ActivatedLockedLiquidityForSchedules = + StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + + /// Tracks how much of the liquidity was activated for schedule rewards and not yet + /// liquidity mining rewards. That information is essential to properly handle token unlcocks + /// when liquidity is deactivated. + #[pallet::storage] + pub type ActivatedNativeRewardsLiq = + StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + #[pallet::call] impl Pallet { /// Claims liquidity mining rewards #[transactional] #[pallet::call_index(0)] - #[pallet::weight(<::WeightInfo>::claim_rewards_all())] + #[pallet::weight(<::WeightInfo>::claim_native_rewards())] + #[deprecated(note = "claim_native_rewards should be used instead")] pub fn claim_rewards_all( origin: OriginFor, liquidity_token_id: TokenId, @@ -208,7 +596,8 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(2)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_native_rewards())] + #[deprecated(note = "activate_liquidity_for_native_rewards should be used instead")] pub fn activate_liquidity( origin: OriginFor, liquidity_token_id: TokenId, @@ -217,7 +606,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::activate_liquidity( + Self::activate_liquidity_for_native_rewards_impl( sender, liquidity_token_id, amount, @@ -228,7 +617,8 @@ pub mod pallet { /// Decreases number of tokens used for liquidity mining purposes #[transactional] #[pallet::call_index(3)] - #[pallet::weight(<::WeightInfo>::deactivate_liquidity())] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_native_rewards())] + #[deprecated(note = "deactivate_liquidity_for_native_rewards should be used instead")] pub fn deactivate_liquidity( origin: OriginFor, liquidity_token_id: TokenId, @@ -236,18 +626,426 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::deactivate_liquidity( + Self::deactivate_liquidity_for_native_rewards_impl(sender, liquidity_token_id, amount) + } + + /// Schedules rewards for selected liquidity token + /// - tokens - pair of tokens + /// - amount - amount of the token + /// - schedule_end - id of the last rewarded seession. Rewards will be distributedd equally between sessions in range (now .. + /// schedule_end). Distribution starts from the *next* session till `schedule_end`. + #[transactional] + #[pallet::call_index(4)] + #[pallet::weight(<::WeightInfo>::reward_pool())] + pub fn reward_pool( + origin: OriginFor, + pool: (TokenId, TokenId), + token_id: TokenId, + amount: Balance, + schedule_end: T::BlockNumber, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + Self::reward_pool_impl(sender, pool, token_id, amount, schedule_end) + } + + /// Increases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used. If set to `None` then tokens will + /// be taken from available balance + #[transactional] + #[pallet::call_index(5)] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards())] + pub fn activate_liquidity_for_3rdparty_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + reward_token: TokenId, + use_balance_from: Option, + ) -> DispatchResultWithPostInfo { + let sender = ensure_signed(origin)?; + + Self::activate_liquidity_for_3rdparty_rewards_impl( sender, liquidity_token_id, amount, + use_balance_from.unwrap_or(ThirdPartyActivationKind::ActivateKind(None)), + reward_token, ) + .map_err(|err| DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some( + <::WeightInfo>::activate_liquidity_for_3rdparty_rewards(), + ), + pays_fee: Pays::Yes, + }, + error: err, + })?; + Ok(Pays::No.into()) + } + + /// Decreases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used + #[transactional] + #[pallet::call_index(6)] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_3rdparty_rewards())] + pub fn deactivate_liquidity_for_3rdparty_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + reward_token: TokenId, + ) -> DispatchResultWithPostInfo { + let sender = ensure_signed(origin)?; + + Self::deactivate_liquidity_for_3rdparty_rewards_impl( + sender, + liquidity_token_id, + amount, + reward_token, + ) + .map_err(|err| DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some( + <::WeightInfo>::activate_liquidity_for_3rdparty_rewards(), + ), + pays_fee: Pays::Yes, + }, + error: err, + })?; + Ok(Pays::No.into()) + } + + /// Claims liquidity mining rewards + /// - tokens - pair of tokens + /// - amount - amount of the token + /// - reward_token - id of the token that is rewarded + #[transactional] + #[pallet::call_index(7)] + #[pallet::weight(<::WeightInfo>::claim_3rdparty_rewards())] + pub fn claim_3rdparty_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + reward_token: TokenId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + ScheduleRewardsCalculator::::update_cumulative_rewards( + liquidity_token_id, + reward_token, + ); + Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; + Ok(()) + } + + /// Increases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used + #[transactional] + #[pallet::call_index(8)] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_native_rewards())] + pub fn activate_liquidity_for_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + use_balance_from: Option, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::activate_liquidity_for_native_rewards_impl( + sender, + liquidity_token_id, + amount, + use_balance_from, + ) + } + + /// Decreases number of tokens used for liquidity mining purposes + #[transactional] + #[pallet::call_index(9)] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_native_rewards())] + pub fn deactivate_liquidity_for_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::deactivate_liquidity_for_native_rewards_impl(sender, liquidity_token_id, amount) + } + + #[transactional] + #[pallet::call_index(10)] + #[pallet::weight(<::WeightInfo>::claim_native_rewards())] + #[deprecated(note = "claim_native_rewards should be used instead")] + pub fn claim_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + >::claim_rewards_all( + sender, + liquidity_token_id, + )?; + + Ok(()) } } } impl Pallet { + fn activate_liquidity_for_native_rewards_impl( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + use_balance_from: Option, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + ensure!( + ::ActivationReservesProvider::can_activate( + liquidity_asset_id, + &user, + amount, + use_balance_from.clone() + ), + Error::::NotEnoughAssets + ); + + Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; + + ::ActivationReservesProvider::activate( + liquidity_asset_id, + &user, + amount, + use_balance_from, + )?; + Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + + Ok(()) + } + + pub fn calculate_native_rewards_amount( + user: AccountIdOf, + liquidity_asset_id: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) + .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; + + let current_rewards = match rewards_info.activated_amount { + 0 => 0u128, + _ => { + let calc = + RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, + }; + + Ok(current_rewards + .checked_add(rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) + .ok_or(Error::::CalculateRewardsMathError)?) + } + + fn deactivate_liquidity_for_native_rewards_impl( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + ) -> DispatchResult { + ensure!( + ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id) == 0, + Error::::LiquidityLockedIn3rdpartyRewards + ); + + if amount > 0 { + Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; + Pallet::::deposit_event(Event::LiquidityDeactivated( + user, + liquidity_asset_id, + amount, + )); + } + Ok(()) + } + + fn activate_liquidity_for_3rdparty_rewards_impl( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + use_balance_from: ThirdPartyActivationKind, + reward_token: TokenId, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + match use_balance_from { + // 1R 1W + ThirdPartyActivationKind::ActivateKind(ref use_balance_from) => { + ensure!( + ::ActivationReservesProvider::can_activate( + liquidity_asset_id, + &user, + amount, + use_balance_from.clone(), + ), + Error::::NotEnoughAssets + ); + ActivatedLockedLiquidityForSchedules::::mutate( + user.clone(), + liquidity_asset_id, + |val| *val += amount, + ); + }, + // 2R + ThirdPartyActivationKind::ActivatedLiquidity(token_id) => { + let already_activated_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, reward_token), + ) + .activated_amount; + let available_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, token_id), + ) + .activated_amount; + ensure!( + already_activated_amount + amount <= available_amount, + Error::::NotEnoughAssets + ); + }, + ThirdPartyActivationKind::LiquidityMining => { + let already_activated_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, reward_token), + ) + .activated_amount; + let available_amount = + RewardsInfo::::get(user.clone(), liquidity_asset_id).activated_amount; + ensure!( + already_activated_amount + amount <= available_amount, + Error::::NotEnoughAssets + ); + ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { + *val += amount + }); + }, + } + + Self::set_liquidity_minting_checkpoint_3rdparty( + user.clone(), + liquidity_asset_id, + amount, + reward_token, + )?; + + match use_balance_from { + ThirdPartyActivationKind::ActivateKind(use_balance_from) => { + ::ActivationReservesProvider::activate( + liquidity_asset_id, + &user, + amount, + use_balance_from, + )?; + }, + _ => {}, + } + + Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + + Ok(()) + } + + fn deactivate_liquidity_for_3rdparty_rewards_impl( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + rewards_asset_id: TokenId, + ) -> DispatchResult { + if amount > 0 { + Self::set_liquidity_burning_checkpoint_for_schedule( + user.clone(), + liquidity_asset_id, + amount, + rewards_asset_id, + )?; + Pallet::::deposit_event(Event::LiquidityDeactivated( + user, + liquidity_asset_id, + amount, + )); + } + Ok(()) + } + + pub fn calculate_3rdparty_rewards_all( + user: AccountIdOf, + ) -> Result, DispatchError> { + let mut result = RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) + .map(|((liq_token, reward_token), _)| { + Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) + .map(|amount| (liq_token, reward_token, amount)) + }) + .collect::, _>>(); + result.as_mut().map(|v| v.sort()); + result + } + + pub fn calculate_3rdparty_rewards_amount( + user: AccountIdOf, + liquidity_asset_id: TokenId, + rewards_asset_id: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + if let Ok(info) = RewardsInfoForScheduleRewards::::try_get( + user.clone(), + (liquidity_asset_id, rewards_asset_id), + ) { + let current_rewards = match info.activated_amount { + 0 => 0u128, + _ => { + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + rewards_asset_id, + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, + }; + + Ok(current_rewards + .checked_add(info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(info.rewards_already_claimed)) + .ok_or(Error::::CalculateRewardsMathError)?) + } else { + Ok(0u128) + } + } + + fn pallet_account() -> T::AccountId { + PALLET_ID.into_account_truncating() + } + + pub fn session_index() -> u32 { + Self::get_current_rewards_time().unwrap_or_default() + } + pub fn rewards_period() -> u32 { - ::RewardsDistributionPeriod::get() + T::RewardsDistributionPeriod::get() + } + + pub fn is_new_session() -> bool { + let block_nr = frame_system::Pallet::::block_number().saturated_into::(); + (block_nr + 1) % Self::rewards_period() == 0u32 } fn native_token_id() -> TokenId { @@ -270,7 +1068,11 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - if Self::get_pool_rewards(liquidity_asset_id).is_ok() { + if Self::get_pool_rewards(liquidity_asset_id).is_ok() || + RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id) + .next() + .is_some() + { Ok(()) } else { Err(DispatchError::from(Error::::NotAPromotedPool)) @@ -283,26 +1085,16 @@ impl Pallet { liquidity_assets_added: Balance, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let current_time: u32 = Self::get_current_rewards_time()?; - let pool_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .unwrap_or(RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, - last_checkpoint: current_time, - pool_ratio_at_last_checkpoint: pool_ratio_current, - missing_at_last_checkpoint: U256::from(0u128), - }); - rewards_info.activate_more::( - current_time, - pool_ratio_current, - liquidity_assets_added, - )?; - RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); + { + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; + + RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); + } - //TODO: refactor storage name TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { if let Some(val) = active_amount.checked_add(liquidity_assets_added) { *active_amount = val; @@ -316,6 +1108,59 @@ impl Pallet { Ok(()) } + fn set_liquidity_minting_checkpoint_3rdparty( + user: AccountIdOf, + liquidity_asset_id: TokenId, + liquidity_assets_added: Balance, + liquidity_assets_reward: TokenId, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + ScheduleRewardsCalculator::::update_cumulative_rewards( + liquidity_asset_id, + liquidity_assets_reward, + ); + { + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + liquidity_assets_reward, + )?; + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, liquidity_assets_reward), + rewards_info, + ); + } + + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, liquidity_assets_reward), + |v| { + match v { + Some(x) => { + v.as_mut().map(|a| *a += liquidity_assets_added); + }, + None => { + *v = Some(liquidity_assets_added); + }, + }; + Ok::<(), Error>(()) + }, + )?; + + ScheduleRewardsCalculator::::update_total_activated_liqudity( + liquidity_asset_id, + liquidity_assets_reward, + liquidity_assets_added, + true, + ); + + Ok(()) + } + fn set_liquidity_burning_checkpoint( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -332,11 +1177,11 @@ impl Pallet { Error::::NotEnoughAssets ); - rewards_info.activate_less::( - current_time, - pool_ratio_current, - liquidity_assets_burned, - )?; + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + let rewards_info = calc + .activate_less(liquidity_assets_burned) + .map_err(|err| Into::>::into(err))?; + RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { @@ -357,6 +1202,237 @@ impl Pallet { Ok(()) } + + fn set_liquidity_burning_checkpoint_for_schedule( + user: AccountIdOf, + liquidity_asset_id: TokenId, + liquidity_assets_burned: Balance, + reward_token: TokenId, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, reward_token); + + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + reward_token, + )?; + + let rewards_info = calc + .activate_less(liquidity_assets_burned) + .map_err(|err| Into::>::into(err))?; + + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, reward_token), + rewards_info, + ); + + ScheduleRewardsCalculator::::update_total_activated_liqudity( + liquidity_asset_id, + reward_token, + liquidity_assets_burned, + false, + ); + + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, reward_token), + |v| { + v.and_then(|a| { + a.checked_sub(liquidity_assets_burned).and_then(|val| { + if val > 0 { + *v = Some(val); + } else { + *v = None; + } + Some(val) + }) + }) + .ok_or(Error::::MathOverflow) + }, + )?; + + if let None = ActivatedLiquidityForSchedules::::iter_prefix_values(( + user.clone(), + liquidity_asset_id, + )) + .next() + { + let amount = ActivatedLockedLiquidityForSchedules::::mutate( + user.clone(), + liquidity_asset_id, + |val| { + let prev = *val; + *val = 0; + prev + }, + ); + + ::ActivationReservesProvider::deactivate( + liquidity_asset_id, + &user, + amount, + ); + + let amount = + ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { + let prev = *val; + *val = 0; + prev + }); + } + + Ok(()) + } + + fn claim_schedule_rewards_all_impl( + user: T::AccountId, + liquidity_asset_id: TokenId, + reward_token: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + reward_token, + )?; + let (rewards_info, total_available_rewards) = + calc.claim_rewards().map_err(|err| Into::>::into(err))?; + + ::Currency::transfer( + reward_token.into(), + &Self::pallet_account(), + &user, + total_available_rewards.into(), + ExistenceRequirement::KeepAlive, + )?; + + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, reward_token), + rewards_info, + ); + + Pallet::::deposit_event(Event::RewardsClaimed( + user, + liquidity_asset_id, + total_available_rewards, + )); + + Ok(total_available_rewards) + } + + pub(crate) fn reward_pool_impl( + sender: T::AccountId, + pool: (TokenId, TokenId), + token_id: TokenId, + amount: Balance, + schedule_end: T::BlockNumber, + ) -> DispatchResult { + let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) + .map_err(|_| Error::::PoolDoesNotExist)?; + + let current_session = Self::session_index(); + ensure!( + schedule_end.saturated_into::() > current_session, + Error::::CannotScheduleRewardsInPast + ); + + let amount_per_session = schedule_end + .saturated_into::() + .checked_sub(current_session) + .and_then(|v| amount.checked_div(v.into())) + .ok_or(Error::::MathOverflow)?; + + ensure!( + Self::verify_rewards_min_amount(token_id, amount_per_session), + Error::::TooLittleRewards + ); + + ensure!(Self::verify_rewards_min_volume(token_id), Error::::TooSmallVolume); + + RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); + + T::Currency::transfer( + token_id.into(), + &sender, + &Self::pallet_account(), + amount.into(), + ExistenceRequirement::KeepAlive, + )?; + + let head = ScheduleListHead::::get(); + let tail = ScheduleListTail::::get(); + let schedule = Schedule { + scheduled_at: Self::session_index() as u64, + last_session: schedule_end.saturated_into::(), + liq_token: liquidity_token_id, + reward_token: token_id, + amount_per_session, + }; + + match (head, tail) { + (None, None) => { + // first schedule + RewardsSchedulesList::::insert(0, (schedule, None::)); + ScheduleListHead::::put(0); + ScheduleListTail::::put(0); + }, + (Some(_head), Some(tail)) => { + RewardsSchedulesList::::mutate(tail, |info| { + if let Some((_schedule, next)) = info.as_mut() { + *next = Some(tail + 1u64) + } + }); + RewardsSchedulesList::::insert(tail + 1, (schedule, None::)); + ScheduleListTail::::put(tail + 1); + }, + _ => {}, // invariant assures this will never happen + } + + Ok(()) + } + + fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { + if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= + T::Min3rdPartyRewardValutationPerSession::get() + { + return true + } + + if token_id == Into::::into(Self::native_token_id()) && + amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() + { + return true + } + + if ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) >= + T::Min3rdPartyRewardValutationPerSession::get() + { + return true + } + + return false + } + + fn verify_rewards_min_volume(token_id: TokenId) -> bool { + if token_id == Into::::into(Self::native_token_id()) { + return true + } + + if let Some((mga_reserves, _)) = ::ValuationApi::get_pool_state(token_id) { + return mga_reserves >= T::Min3rdPartyRewardVolume::get() + } + + if let Ok((mga_reserves, _)) = + ::ValuationApi::get_reserves(Self::native_token_id(), token_id) + { + return mga_reserves >= T::Min3rdPartyRewardVolume::get() + } + + return false + } } impl ProofOfStakeRewardsApi for Pallet { @@ -364,6 +1440,43 @@ impl ProofOfStakeRewardsApi for Pallet { type CurrencyId = TokenId; + #[cfg(feature = "runtime-benchmarks")] + fn enable_3rdparty_rewards( + account: T::AccountId, + pool: (Self::CurrencyId, Self::CurrencyId), + reward_token_id: Self::CurrencyId, + last_session: u32, + amount: Self::Balance, + ) { + let liquidity_token_id = + ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); + Pallet::::reward_pool_impl( + account.clone(), + pool, + reward_token_id, + amount, + last_session.into(), + ) + .expect("call should pass"); + } + + #[cfg(feature = "runtime-benchmarks")] + fn activate_liquidity_for_3rdparty_rewards( + account: T::AccountId, + liquidity_token: Self::CurrencyId, + amount: Self::Balance, + reward_token_id: Self::CurrencyId, + ) { + Pallet::::activate_liquidity_for_3rdparty_rewards_impl( + account, + liquidity_token, + amount, + ThirdPartyActivationKind::ActivateKind(None), + reward_token_id, + ) + .expect("call should pass") + } + fn enable(liquidity_token_id: TokenId, weight: u8) { PromotedPoolRewards::::mutate(|promoted_pools| { promoted_pools @@ -393,21 +1506,9 @@ impl ProofOfStakeRewardsApi for Pallet { ) -> Result { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let pool_rewards_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; - - let current_rewards = rewards_info - .calculate_rewards(Self::get_current_rewards_time()?, pool_rewards_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; - - let total_available_rewards = current_rewards - .checked_add(rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsAllMathError)?; - - rewards_info.rewards_not_yet_claimed = 0_u128; - rewards_info.rewards_already_claimed = current_rewards; + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + let (rewards_info, total_available_rewards) = + calc.claim_rewards().map_err(|err| Into::>::into(err))?; ::Currency::transfer( Self::native_token_id().into(), @@ -434,29 +1535,12 @@ impl ProofOfStakeRewardsApi for Pallet { amount: Self::Balance, use_balance_from: Option, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - ensure!( - ::ActivationReservesProvider::can_activate( - liquidity_asset_id, - &user, - amount, - use_balance_from.clone() - ), - Error::::NotEnoughAssets - ); - - Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; - - // This must not fail due storage edits above - ::ActivationReservesProvider::activate( + Self::activate_liquidity_for_native_rewards_impl( + user, liquidity_asset_id, - &user, amount, use_balance_from, - )?; - Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); - - Ok(()) + ) } fn deactivate_liquidity( @@ -464,39 +1548,14 @@ impl ProofOfStakeRewardsApi for Pallet { liquidity_asset_id: Self::CurrencyId, amount: Self::Balance, ) -> DispatchResult { - if amount > 0 { - Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; - Pallet::::deposit_event(Event::LiquidityDeactivated( - user, - liquidity_asset_id, - amount, - )); - } - - Ok(()) + Self::deactivate_liquidity_for_native_rewards_impl(user, liquidity_asset_id, amount) } fn calculate_rewards_amount( user: AccountIdOf, liquidity_asset_id: TokenId, ) -> Result { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let current_rewards = match rewards_info.activated_amount { - 0 => 0u128, - _ => rewards_info - .calculate_rewards( - Self::get_current_rewards_time()?, - Self::get_pool_rewards(liquidity_asset_id)?, - ) - .ok_or(Error::::CalculateRewardsMathError)?, - }; - - Ok(current_rewards - .checked_add(rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsMathError)?) + Self::calculate_native_rewards_amount(user, liquidity_asset_id) } } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index fa95825027..1d542db89b 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -1,9 +1,11 @@ // Copyright (C) 2020 Mangata team use super::*; +use mangata_support::traits::GetMaintenanceStatusTrait; use sp_core::H256; +use pallet_xyk::AssetMetadataMutationTrait; use sp_runtime::{ testing::Header, traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, @@ -12,7 +14,7 @@ use sp_runtime::{ use crate as pos; use frame_support::{ construct_runtime, parameter_types, - traits::{tokens::currency::MultiTokenCurrency, ConstU32, Contains, Everything}, + traits::{tokens::currency::MultiTokenCurrency, ConstU128, ConstU32, Contains, Everything}, PalletId, }; @@ -21,7 +23,7 @@ pub use mangata_support::traits::ProofOfStakeRewardsApi; use mangata_types::{assets::CustomMetadata, Amount, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyAdapter, MultiTokenCurrencyExtended}; use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; -use sp_runtime::{Perbill, Percent}; +use sp_runtime::{Perbill, Percent, Saturating}; use std::{collections::HashMap, sync::Mutex}; pub const NATIVE_CURRENCY_ID: u32 = 0; @@ -43,6 +45,7 @@ construct_runtime!( ProofOfStake: pos::{Pallet, Call, Storage, Event}, Vesting: pallet_vesting_mangata::{Pallet, Call, Storage, Event}, Issuance: pallet_issuance::{Pallet, Event, Storage}, + Xyk: pallet_xyk::{Pallet, Event, Storage}, } ); @@ -167,7 +170,7 @@ parameter_types! { pub const ImmediateTGEReleasePercent: Percent = Percent::from_percent(20); pub const TGEReleasePeriod: u32 = 100u32; // 2 years pub const TGEReleaseBegin: u32 = 10u32; // Two weeks into chain start - pub const BlocksPerRound: u32 = 5u32; + pub const BlocksPerRound: u32 = 10u32; pub const HistoryLimit: u32 = 10u32; } @@ -193,15 +196,92 @@ lazy_static::lazy_static! { }; } +mockall::mock! { + pub ValuationApi {} + + impl Valuate for ValuationApi { + type Balance = Balance; + type CurrencyId = TokenId; + + fn get_liquidity_asset( + first_asset_id: TokenId, + second_asset_id: TokenId, + ) -> Result; + + fn get_liquidity_token_mga_pool( + liquidity_token_id: TokenId, + ) -> Result<(TokenId, TokenId), DispatchError>; + + fn valuate_liquidity_token( + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance; + + fn valuate_non_liquidity_token( + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance; + + fn scale_liquidity_by_mga_valuation( + mga_valuation: Balance, + liquidity_token_amount: Balance, + mga_token_amount: Balance, + ) -> Balance; + + fn get_pool_state(liquidity_token_id: TokenId) -> Option<(Balance, Balance)>; + + fn get_reserves( + first_asset_id: TokenId, + second_asset_id: TokenId, + ) -> Result<(Balance, Balance), DispatchError>; + } +} + +pub struct AssetMetadataMutation; +impl AssetMetadataMutationTrait for AssetMetadataMutation { + fn set_asset_info( + _asset: TokenId, + _name: Vec, + _symbol: Vec, + _decimals: u32, + ) -> DispatchResult { + Ok(()) + } +} + pub struct MockMaintenanceStatusProvider; +impl GetMaintenanceStatusTrait for MockMaintenanceStatusProvider { + fn is_maintenance() -> bool { + false + } -lazy_static::lazy_static! { - static ref MAINTENANCE_STATUS: Mutex = { - let m: bool = false; - Mutex::new(m) - }; + fn is_upgradable() -> bool { + true + } } +impl pallet_xyk::XykBenchmarkingConfig for Test {} + +impl pallet_xyk::Config for Test { + type RuntimeEvent = RuntimeEvent; + type MaintenanceStatusProvider = MockMaintenanceStatusProvider; + type ActivationReservesProvider = TokensActivationPassthrough; + type Currency = MultiTokenCurrencyAdapter; + type NativeCurrencyId = NativeCurrencyId; + type TreasuryPalletId = TreasuryPalletId; + type BnbTreasurySubAccDerive = BnbTreasurySubAccDerive; + type LiquidityMiningRewards = ProofOfStake; + type PoolFeePercentage = ConstU128<20>; + type TreasuryFeePercentage = ConstU128<5>; + type BuyAndBurnFeePercentage = ConstU128<5>; + type WeightInfo = (); + type DisallowedPools = (); + type DisabledTokens = Nothing; + type VestingProvider = Vesting; + type AssetMetadataMutation = AssetMetadataMutation; +} + +#[cfg(not(feature = "runtime-benchmarks"))] impl pos::Config for Test { type RuntimeEvent = RuntimeEvent; type ActivationReservesProvider = TokensActivationPassthrough; @@ -209,7 +289,26 @@ impl pos::Config for Test { type Currency = MultiTokenCurrencyAdapter; type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); + type ValuationApi = MockValuationApi; +} + +#[cfg(feature = "runtime-benchmarks")] +impl pos::Config for Test { + type RuntimeEvent = RuntimeEvent; + type ActivationReservesProvider = TokensActivationPassthrough; + type NativeCurrencyId = NativeCurrencyId; + type Currency = MultiTokenCurrencyAdapter; + type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; + type RewardsDistributionPeriod = ConstU32<10>; + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<100_000>; + type Min3rdPartyRewardVolume = ConstU128<10>; + type WeightInfo = (); + type ValuationApi = Xyk; } pub struct TokensActivationPassthrough(PhantomData); @@ -300,6 +399,58 @@ pub fn new_test_ext() -> sp_io::TestExternalities { ext } +pub struct ExtBuilder { + ext: sp_io::TestExternalities, +} + +fn min_req_volume() -> u128 { + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() +} + +impl ExtBuilder { + pub fn new() -> Self { + let t = frame_system::GenesisConfig::default() + .build_storage::() + .expect("Frame system builds valid default genesis config"); + + let mut ext = sp_io::TestExternalities::new(t); + Self { ext } + } + + fn create_if_does_not_exists(&mut self, token_id: TokenId) { + self.ext.execute_with(|| { + while token_id >= Tokens::next_asset_id() { + Tokens::create(RuntimeOrigin::root(), 0, 0).unwrap(); + } + }); + } + + pub fn issue(mut self, who: AccountId, token_id: TokenId, balance: Balance) -> Self { + self.create_if_does_not_exists(token_id); + self.ext + .execute_with(|| Tokens::mint(RuntimeOrigin::root(), token_id, who, balance).unwrap()); + return self + } + + pub fn build(self) -> sp_io::TestExternalities { + self.ext + } + + pub fn execute_with_default_mocks(mut self, f: impl FnOnce() -> R) -> R { + self.ext.execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); + f() + }) + } +} + /// Compares the system events with passed in events /// Prints highlighted diff iff assert_eq fails #[macro_export] diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 6909f83a7b..b8c0b46837 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -1,8 +1,8 @@ use frame_support::dispatch::DispatchResult; -use crate::{Config, Error}; +use crate::{schedule_rewards_calculator::ScheduleRewardsCalculator, Config, Error, Pallet}; use frame_support::pallet_prelude::*; -use mangata_types::Balance; +use mangata_types::{Balance, TokenId}; use sp_core::U256; use sp_std::{convert::TryInto, prelude::*}; @@ -33,118 +33,117 @@ pub struct RewardInfo { pub missing_at_last_checkpoint: U256, } -impl RewardInfo { - pub fn calculate_missing_at_checkpoint(&self, current_time: u32) -> Option { - let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); - let q_pow = calculate_q_pow(Q, time_passed); - Some(self.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) - } +pub struct RewardsContext { + pub current_time: u32, + pub pool_ratio_current: U256, +} - pub fn activate_more( - &mut self, - current_time: u32, - pool_ratio_current: U256, - liquidity_assets_added: Balance, - ) -> DispatchResult { - let activated_amount = self - .activated_amount - .checked_add(liquidity_assets_added) - .ok_or(Error::::LiquidityCheckpointMathError)?; +pub struct RewardsCalculator { + rewards_context: RewardsContext, + rewards_info: RewardInfo, + _curve: sp_std::marker::PhantomData, +} - let missing_at_last_checkpoint = self - .calculate_missing_at_checkpoint(current_time) - .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) - .ok_or(Error::::LiquidityCheckpointMathError)?; +impl RewardsCalculator { + pub fn mining_rewards( + user: T::AccountId, + asset_id: TokenId, + ) -> sp_std::result::Result { + let current_time: u32 = Pallet::::get_current_rewards_time()?; + let pool_ratio_current = Pallet::::get_pool_rewards(asset_id)?; + let default_rewards = RewardInfo { + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current, + missing_at_last_checkpoint: U256::from(0u128), + }; - let user_current_rewards = self - .calculate_rewards(current_time, pool_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; + let rewards_info = + crate::RewardsInfo::::try_get(user.clone(), asset_id).unwrap_or(default_rewards); - let rewards_not_yet_claimed = user_current_rewards - .checked_add(self.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_already_claimed)) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - self.activated_amount = activated_amount; - self.pool_ratio_at_last_checkpoint = pool_ratio_current; - self.rewards_already_claimed = 0_u128; - self.missing_at_last_checkpoint = missing_at_last_checkpoint; - self.rewards_not_yet_claimed = rewards_not_yet_claimed; - self.last_checkpoint = current_time; - Ok(()) + Ok(Self { + rewards_context: RewardsContext { + current_time: Pallet::::get_current_rewards_time()?, + pool_ratio_current: Pallet::::get_pool_rewards(asset_id)?, + }, + rewards_info, + _curve: PhantomData::, + }) } +} - pub fn activate_less( - &mut self, - current_time: u32, - pool_ratio_current: U256, - liquidity_assets_removed: Balance, - ) -> DispatchResult { - let activated_amount = self - .activated_amount - .checked_sub(liquidity_assets_removed) - .ok_or(Error::::LiquidityCheckpointMathError)?; +impl RewardsCalculator { + pub fn schedule_rewards( + user: T::AccountId, + asset_id: TokenId, + reward_asset_id: TokenId, + ) -> sp_std::result::Result { + let current_time: u32 = Pallet::::get_current_rewards_time()?; + ensure!( + crate::RewardTokensPerPool::::try_get(asset_id, reward_asset_id).is_ok(), + crate::Error::::NotAPromotedPool + ); + let pool_ratio_current = + ScheduleRewardsCalculator::::total_rewards_for_liquidity(asset_id, reward_asset_id); - let missing_at_checkpoint_new = self - .calculate_missing_at_checkpoint(current_time) - .ok_or(Error::::LiquidityCheckpointMathError)?; + let default_rewards = RewardInfo { + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current.into(), + missing_at_last_checkpoint: U256::from(0u128), + }; - let activated_amount_new = self - .activated_amount - .checked_sub(liquidity_assets_removed) - .ok_or(Error::::LiquidityCheckpointMathError)?; - let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) - .checked_mul(missing_at_checkpoint_new) - .and_then(|v| v.checked_div(self.activated_amount.into())) - .ok_or(Error::::LiquidityCheckpointMathError)?; + let rewards_info = crate::RewardsInfoForScheduleRewards::::try_get( + user.clone(), + (asset_id, reward_asset_id), + ) + .unwrap_or(default_rewards); - let user_current_rewards = self - .calculate_rewards(current_time, pool_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; - let total_available_rewards = user_current_rewards - .checked_add(self.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_already_claimed)) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - self.activated_amount = activated_amount; - self.pool_ratio_at_last_checkpoint = pool_ratio_current; - self.rewards_already_claimed = 0_u128; - self.missing_at_last_checkpoint = missing_at_checkpoint_after_burn; - self.rewards_not_yet_claimed = total_available_rewards; - self.last_checkpoint = current_time; - Ok(()) + Ok(Self { + rewards_context: RewardsContext { + current_time: Pallet::::get_current_rewards_time()?, + pool_ratio_current: pool_ratio_current.into(), + }, + rewards_info, + _curve: PhantomData::, + }) + } +} + +pub trait CurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; +} + +pub struct ConstCurveRewards(RewardsContext, RewardInfo); +pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); + +impl CurveRewards for AsymptoticCurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); + let q_pow = calculate_q_pow(Q, time_passed); + Some(user_info.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) } - pub fn calculate_rewards( - &self, - current_time: u32, - pool_rewards_ratio_current: U256, - ) -> Option { + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { let pool_rewards_ratio_new = - pool_rewards_ratio_current.checked_sub(self.pool_ratio_at_last_checkpoint)?; + ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; - let user_rewards_base: U256 = U256::from(self.activated_amount) + let rewards_base: U256 = U256::from(user_info.activated_amount) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - let (cumulative_work, cummulative_work_max_possible) = - self.calculate_cumulative_work_max_ratio(current_time)?; - - user_rewards_base - .checked_mul(cumulative_work)? - .checked_div(cummulative_work_max_possible)? - .try_into() - .ok() - } - - fn calculate_cumulative_work_max_ratio(&self, current_time: u32) -> Option<(U256, U256)> { - let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); // .ok_or(Error::::PastTimeCalculation)?; let mut cummulative_work = U256::from(0); let mut cummulative_work_max_possible_for_ratio = U256::from(1); - if time_passed != 0 && self.activated_amount != 0 { - let liquidity_assets_amount_u256: U256 = self.activated_amount.into(); + if time_passed != 0 && user_info.activated_amount != 0 { + let liquidity_assets_amount_u256: U256 = user_info.activated_amount.into(); // whole formula: missing_at_last_checkpoint*106/6 - missing_at_last_checkpoint*106*precision/6/q_pow // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well @@ -154,7 +153,7 @@ impl RewardInfo { // whole formula: missing_at_last_checkpoint*Q*100/(Q*100-100) - missing_at_last_checkpoint*Q*100/(Q*100-100)*REWARDS_PRECISION/q_pow // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well - let base = self + let base = user_info .missing_at_last_checkpoint .checked_mul(U256::from(libm::floor(Q * 100_f64) as u128))? .checked_div(U256::from(libm::floor(Q * 100_f64 - 100_f64) as u128))?; @@ -163,12 +162,143 @@ impl RewardInfo { let cummulative_missing_new = base - base * U256::from(REWARDS_PRECISION) / q_pow - - self.missing_at_last_checkpoint; + user_info.missing_at_last_checkpoint; cummulative_work = - cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)?; + cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)? } - Some((cummulative_work, cummulative_work_max_possible_for_ratio)) + rewards_base + .checked_mul(cummulative_work)? + .checked_div(cummulative_work_max_possible_for_ratio)? + .try_into() + .ok() + } +} + +impl CurveRewards for ConstCurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + Some(U256::from(0)) + } + + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + let pool_rewards_ratio_new = + ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; + + let rewards_base: U256 = U256::from(user_info.activated_amount) + .checked_mul(pool_rewards_ratio_new)? + .checked_div(U256::from(u128::MAX))?; // always fit into u128 + + rewards_base.try_into().ok() + } +} + +#[derive(Debug)] +pub enum RewardsCalcError { + CheckpointMathError, +} + +impl Into> for RewardsCalcError { + fn into(self) -> Error { + Error::::LiquidityCheckpointMathError + } +} + +impl RewardsCalculator { + pub fn activate_more( + self, + liquidity_assets_added: Balance, + ) -> sp_std::result::Result { + let activated_amount = self + .rewards_info + .activated_amount + .checked_add(liquidity_assets_added) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let missing_at_last_checkpoint = + T::calculate_curve_position(&self.rewards_context, &self.rewards_info) + .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let user_current_rewards = self.calculate_rewards_impl()?; + + let rewards_not_yet_claimed = user_current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + Ok(RewardInfo { + activated_amount, + pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, + rewards_already_claimed: 0_u128, + missing_at_last_checkpoint, + rewards_not_yet_claimed, + last_checkpoint: self.rewards_context.current_time, + }) + } + + pub fn activate_less( + self, + liquidity_assets_removed: Balance, + ) -> sp_std::result::Result { + let activated_amount = self + .rewards_info + .activated_amount + .checked_sub(liquidity_assets_removed) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let missing_at_checkpoint_new = + T::calculate_curve_position(&self.rewards_context, &self.rewards_info) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let activated_amount_new = self + .rewards_info + .activated_amount + .checked_sub(liquidity_assets_removed) + .ok_or(RewardsCalcError::CheckpointMathError)?; + let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) + .checked_mul(missing_at_checkpoint_new) + .and_then(|v| v.checked_div(self.rewards_info.activated_amount.into())) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let user_current_rewards = self.calculate_rewards_impl()?; + + let total_available_rewards = user_current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + Ok(RewardInfo { + activated_amount, + pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, + rewards_already_claimed: 0_u128, + missing_at_last_checkpoint: missing_at_checkpoint_after_burn, + rewards_not_yet_claimed: total_available_rewards, + last_checkpoint: self.rewards_context.current_time, + }) + } + + pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { + let current_rewards = self.calculate_rewards_impl()?; + + let total_available_rewards = current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let mut info = self.rewards_info.clone(); + + info.rewards_not_yet_claimed = 0_u128; + info.rewards_already_claimed = current_rewards; + Ok((info, total_available_rewards)) + } + + pub fn calculate_rewards(self) -> sp_std::result::Result { + self.calculate_rewards_impl() + } + + fn calculate_rewards_impl(&self) -> sp_std::result::Result { + T::calculate_curve_rewards(&self.rewards_context, &self.rewards_info) + .ok_or(RewardsCalcError::CheckpointMathError) } } diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs new file mode 100644 index 0000000000..3922e74c0f --- /dev/null +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -0,0 +1,205 @@ +use crate::{ + Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, SessionId, + TotalActivatedLiquidityForSchedules, +}; +use core::marker::PhantomData; +use frame_support::pallet_prelude::*; +use mangata_types::{Balance, TokenId}; +use sp_core::U256; + +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] +pub struct ActivatedLiquidityPerSchedule { + pending_positive: u128, + pending_negative: u128, + pending_session_id: SessionId, + total: u128, +} + +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] +pub enum LiquidityModification { + Increase, + Decrease, +} + +impl ActivatedLiquidityPerSchedule { + fn total(&self, now: SessionId) -> u128 { + if now <= self.pending_session_id { + self.total + } else { + self.total + self.pending_positive - self.pending_negative + } + } + + fn update(&mut self, now: SessionId, amount: u128, kind: LiquidityModification) { + if now <= self.pending_session_id { + if kind == LiquidityModification::Increase { + self.pending_positive += amount; + } else { + self.pending_negative += amount; + } + } else { + self.total = self.total + self.pending_positive - self.pending_negative; + if kind == LiquidityModification::Increase { + self.pending_positive = amount; + self.pending_negative = 0u128; + } else { + self.pending_positive = 0u128; + self.pending_negative = amount; + }; + self.pending_session_id = now; + } + } +} + +/// Information about single token rewards. Automatically accumulates new rewards into `pending` +/// and once `pending_session_id < current_session` they are moved to `total` and become ready for +/// distribution to end users +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] +pub struct ScheduleRewards { + // Accumulated rewards in current or past session. Once `now > pending_session_id` they + // should be moved to total + pending: u128, + + // id of the session when pending_rewards were recently updated + pending_session_id: SessionId, + + // total amount of rewards ready for distribution + total: u128, +} + +impl ScheduleRewards { + pub fn provide_rewards(&mut self, now: SessionId, amount: u128) { + if now <= self.pending_session_id { + self.pending += amount; + } else { + self.total += self.pending; + self.pending = amount; + self.pending_session_id = now; + } + } + + pub fn total_rewards(&self, now: SessionId) -> u128 { + if now <= self.pending_session_id { + self.total + } else { + self.total + self.pending + } + } + + pub fn transfer_pending(&mut self, now: SessionId) { + if now > self.pending_session_id { + self.total += self.pending; + self.pending = 0; + self.pending_session_id = now; + } + } + + pub fn clear(&mut self, now: SessionId) { + self.total = 0; + self.pending = 0; + self.pending_session_id = now; + } +} + +pub struct ScheduleRewardsCalculator { + data: PhantomData, +} + +/// Class responsible for maintaining and periodically updating cumulative +/// calculations required for 3rdparty rewards +impl ScheduleRewardsCalculator { + /// updates cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of + /// precision. + pub fn update_cumulative_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) { + let session_id = Pallet::::session_index() as u64; + + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + if total_activated_liquidity > 0 { + ScheduleRewardsTotal::::mutate( + (liquidity_asset_id, liquidity_assets_reward), + |schedule| { + schedule.transfer_pending(session_id); + schedule.clear(session_id); + }, + ); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + ScheduleRewardsPerLiquidity::::insert( + (liquidity_asset_id, liquidity_assets_reward), + (cumulative + pending, (Pallet::::session_index() as u64)), + ); + } + } + } + + /// returns cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of + /// precision. + pub fn total_rewards_for_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> U256 { + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + cumulative + pending + } + } + + /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` + /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations + pub fn total_schedule_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)) + .total_rewards(Pallet::::session_index() as u64) + } + + /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` + /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations + pub fn update_total_activated_liqudity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + diff: Balance, + change: bool, + ) { + let session_id = Pallet::::session_index() as u64; + let kind = + if change { LiquidityModification::Increase } else { LiquidityModification::Decrease }; + TotalActivatedLiquidityForSchedules::::mutate( + liquidity_asset_id, + liquidity_assets_reward, + |s| s.update(session_id, diff, kind), + ); + } + + /// returns info about total activated liquidity per schedule + pub fn total_activated_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let session_id = Pallet::::session_index() as u64; + TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) + .total(session_id) + } +} diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index ea311c85d2..0f5c0fe6d0 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1,18 +1,23 @@ // Copyright (C) 2020 Mangata team -#![cfg(not(feature = "runtime-benchmarks"))] #![allow(non_snake_case)] use super::*; -use crate::mock::*; -use frame_support::{assert_err, assert_ok}; +use crate::{mock::*, utils::*}; +use frame_support::{assert_err, assert_err_ignore_postinfo, assert_ok}; +use mockall::predicate::eq; +use serial_test::serial; use mangata_support::traits::{ComputeIssuance, GetIssuance}; -type TokensOf = ::Currency; - fn mint_and_activate_tokens(who: AccountId, token_id: TokenId, amount: Balance) { TokensOf::::mint(token_id, &who, amount).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(who), token_id, amount, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(who), + token_id, + amount, + None, + ) + .unwrap(); } fn initialize_liquidity_rewards() { @@ -31,30 +36,32 @@ fn initialize_liquidity_rewards() { pools.get_mut(&4).unwrap().rewards = U256::from(0); }); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None) + .unwrap(); } -fn forward_to_block(n: u32) { - forward_to_block_with_custom_rewards(n, 10000); -} +fn process_all_schedules_in_current_session() { + let session = ProofOfStake::session_index(); + loop { + if ProofOfStake::session_index() > session { + panic!("couldnt process all schedules within the session"); + } -fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { - while System::block_number().saturated_into::() <= n { - if System::block_number().saturated_into::() % ProofOfStake::rewards_period() == 0 { - println!("NEW SESSION"); - ProofOfStake::distribute_rewards(rewards); + if !ProofOfStake::is_new_session() && ProofOfStake::pos() == ProofOfStake::tail() { + break } - System::set_block_number(System::block_number().saturated_into::() + 1); + roll_to_next_block::(); } } #[test] +#[serial] fn liquidity_rewards_single_user_mint_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -66,8 +73,13 @@ fn liquidity_rewards_single_user_mint_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 2u8).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -114,12 +126,13 @@ fn liquidity_rewards_single_user_mint_W() { } #[test] +#[serial] fn liquidity_rewards_three_users_burn_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -135,20 +148,26 @@ fn liquidity_rewards_three_users_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(100); + forward_to_block::(100); mint_and_activate_tokens(3, 4, 10000); - forward_to_block(200); + forward_to_block::(200); mint_and_activate_tokens(4, 4, 10000); - forward_to_block(240); + forward_to_block::(240); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 5000).unwrap(); - forward_to_block(400); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000) + .unwrap(); + forward_to_block::(400); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 95965); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 44142); @@ -157,12 +176,13 @@ fn liquidity_rewards_three_users_burn_W() { } #[test] +#[serial] fn liquidity_rewards_claim_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -180,27 +200,33 @@ fn liquidity_rewards_claim_W() { TokensOf::::create(&acc_id, 10000).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(10); - forward_to_block(90); + forward_to_block::(10); + forward_to_block::(90); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12142); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 2562); }); } #[test] +#[serial] fn liquidity_rewards_promote_pool_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -212,12 +238,13 @@ fn liquidity_rewards_promote_pool_W() { } #[test] +#[serial] fn liquidity_rewards_promote_pool_already_promoted_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -231,12 +258,13 @@ fn liquidity_rewards_promote_pool_already_promoted_NW() { } #[test] +#[serial] fn liquidity_rewards_work_after_burn_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -251,36 +279,43 @@ fn liquidity_rewards_work_after_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); mint_and_activate_tokens(3, 4, 10000); - forward_to_block(200); + forward_to_block::(200); mint_and_activate_tokens(4, 4, 10000); - forward_to_block(240); + forward_to_block::(240); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 10000).unwrap(); - forward_to_block(400); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 10000) + .unwrap(); + forward_to_block::(400); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 948); mint_and_activate_tokens(4, 4, 20000); - forward_to_block(500); + forward_to_block::(500); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 8299); }); } #[test] +#[serial] fn liquidity_rewards_deactivate_transfer_controled_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -292,30 +327,40 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); assert_err!( TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath), orml_tokens::Error::::BalanceTooLow, ); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) - .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + ) + .unwrap(); TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath).unwrap(); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); }); } #[test] +#[serial] fn liquidity_rewards_deactivate_more_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -326,10 +371,15 @@ fn liquidity_rewards_deactivate_more_NW() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); assert_err!( - ProofOfStake::deactivate_liquidity( + ProofOfStake::deactivate_liquidity_for_native_rewards( RuntimeOrigin::signed(2), 4, liquidity_tokens_owned + 1 @@ -340,12 +390,13 @@ fn liquidity_rewards_deactivate_more_NW() { } #[test] +#[serial] fn liquidity_rewards_activate_more_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -357,7 +408,7 @@ fn liquidity_rewards_activate_more_NW() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); assert_err!( - ProofOfStake::activate_liquidity( + ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(2), 4, liquidity_tokens_owned + 1, @@ -369,12 +420,13 @@ fn liquidity_rewards_activate_more_NW() { } #[test] +#[serial] fn liquidity_rewards_calculate_rewards_pool_not_promoted() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -387,12 +439,13 @@ fn liquidity_rewards_calculate_rewards_pool_not_promoted() { } #[test] +#[serial] fn liquidity_rewards_claim_pool_not_promoted() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -400,15 +453,16 @@ fn liquidity_rewards_claim_pool_not_promoted() { TokensOf::::create(&acc_id, amount).unwrap(); assert_err!( - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 7), + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 7), Error::::NotAPromotedPool, ); }); } #[test] +#[serial] fn liquidity_rewards_transfer_not_working() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { initialize_liquidity_rewards(); assert_err!( @@ -419,12 +473,13 @@ fn liquidity_rewards_transfer_not_working() { } #[test] +#[serial] fn liquidity_rewards_not_yet_claimed_already_claimed_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -443,25 +498,39 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(10); + forward_to_block::(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) - .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + ) + .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 291); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12433); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_already_claimed, 12142); @@ -469,12 +538,13 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { } #[test] +#[serial] fn extreme_case_pool_ratio() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -484,7 +554,8 @@ fn extreme_case_pool_ratio() { TokensOf::::create(&acc_id, max).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 1, None) + .unwrap(); PromotedPoolRewards::::mutate(|pools| { pools.get_mut(&4).unwrap().rewards = U256::from(u128::MAX) * U256::from(u128::MAX); @@ -499,12 +570,13 @@ fn extreme_case_pool_ratio() { } #[test] +#[serial] fn rewards_rounding_during_often_mint() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -560,7 +632,7 @@ fn rewards_rounding_during_often_mint() { let mut higher_rewards_cumulative = 0; for n in 1..10000 { System::set_block_number(n); - if (n + 1) % (ProofOfStake::rewards_period() as u64) == 0 { + if ProofOfStake::is_new_session() { ProofOfStake::distribute_rewards(10000); mint_and_activate_tokens( @@ -589,12 +661,13 @@ fn rewards_rounding_during_often_mint() { } #[test] +#[serial] fn rewards_storage_right_amounts_start1() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -621,23 +694,29 @@ fn rewards_storage_right_amounts_start1() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); mint_and_activate_tokens(6, 4, 10000); - forward_to_block_with_custom_rewards(100, 50000); // No clue why we considr 50k rewards per + forward_to_block_with_custom_rewards::(100, 50000); // No clue why we considr 50k rewards per assert_eq!( U256::from(u128::MAX) * U256::from(10), PromotedPoolRewards::::get().get(&4).unwrap().rewards ); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(4), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(5), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(6), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(4), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(5), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(6), 4).unwrap(); let mut rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 0); @@ -655,7 +734,7 @@ fn rewards_storage_right_amounts_start1() { assert_eq!(rewards_info.rewards_not_yet_claimed, 0); assert_eq!(rewards_info.rewards_already_claimed, 14704); - forward_to_block_with_custom_rewards(200, 50000); + forward_to_block_with_custom_rewards::(200, 50000); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 36530); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 36530); @@ -667,7 +746,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 3 claim (all) let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -678,7 +757,8 @@ fn rewards_storage_right_amounts_start1() { // usecase 6 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -701,7 +781,8 @@ fn rewards_storage_right_amounts_start1() { // usecase 8 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -712,7 +793,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 16 claim some user_balance_before = TokensOf::::free_balance(0, &6); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(6), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(6), 4).unwrap(); user_balance_after = TokensOf::::free_balance(0, &6); rewards_info = ProofOfStake::get_rewards_info(6, 4); @@ -725,12 +806,13 @@ fn rewards_storage_right_amounts_start1() { // starting point, user burned some rewards, then new rewards were generated (yellow) #[test] +#[serial] fn rewards_storage_right_amounts_start2() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -758,24 +840,34 @@ fn rewards_storage_right_amounts_start2() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); - forward_to_block_with_custom_rewards(100, 40000); + forward_to_block_with_custom_rewards::(100, 40000); assert_eq!( U256::from(u128::MAX) * U256::from(10), PromotedPoolRewards::::get().get(&4).unwrap().rewards ); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); - forward_to_block_with_custom_rewards(200, 20000); //its really weird that rewards are - //decreased from 40k to 20k in single + forward_to_block_with_custom_rewards::(200, 20000); //its really weird that rewards are + //decreased from 40k to 20k in single assert_eq!( U256::from(u128::MAX) * U256::from(20), PromotedPoolRewards::::get().get(&4).unwrap().rewards @@ -803,7 +895,7 @@ fn rewards_storage_right_amounts_start2() { // usecase 2 claim_all let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -814,7 +906,8 @@ fn rewards_storage_right_amounts_start2() { // usecase 9 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -836,7 +929,8 @@ fn rewards_storage_right_amounts_start2() { // usecase 11 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -849,12 +943,13 @@ fn rewards_storage_right_amounts_start2() { // starting point, just new rewards were generated (green) #[test] +#[serial] fn rewards_storage_right_amounts_start3() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = 100_000_000_000_000u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -879,10 +974,16 @@ fn rewards_storage_right_amounts_start3() { TokensOf::::transfer(1, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); - forward_to_block_with_custom_rewards(100, 20000); + forward_to_block_with_custom_rewards::(100, 20000); let mut rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 0); @@ -898,7 +999,7 @@ fn rewards_storage_right_amounts_start3() { // usecase 1 claim (all) let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -909,7 +1010,7 @@ fn rewards_storage_right_amounts_start3() { // usecase 17 claim some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -921,12 +1022,13 @@ fn rewards_storage_right_amounts_start3() { } #[test] +#[serial] fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -956,47 +1058,28 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { ) .unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(3), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(3), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 14704); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); }); } -pub(crate) fn roll_to_while_minting(n: u64, expected_amount_minted: Option) { - let mut session_number: u32; - let mut session_issuance: (Balance, Balance); - let mut block_issuance: Balance; - while System::block_number() < n { - System::on_finalize(System::block_number()); - System::set_block_number(System::block_number() + 1); - System::on_initialize(System::block_number()); - session_number = System::block_number().saturated_into::() / BlocksPerRound::get(); - session_issuance = ::get_all_issuance(session_number) - .expect("session issuance is always populated in advance"); - block_issuance = (session_issuance.0 + session_issuance.1) / - (BlocksPerRound::get().saturated_into::()); - - if let Some(x) = expected_amount_minted { - assert_eq!(x, block_issuance); - } - - // Compute issuance for the next session only after all issuance has been issued is current session - // To avoid overestimating the missing issuance and overshooting the cap - if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { - ::compute_issuance(session_number + 1u32); - } - } -} - #[test] +#[serial] fn test_migrated_from_pallet_issuance() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { env_logger::try_init(); System::set_block_number(1); + const LIQUIDITY_ISSUANCE: Balance = 450045; let token_id = TokensOf::::create(&99999, 2000_000_000).unwrap(); assert_eq!(token_id, 0); @@ -1013,51 +1096,64 @@ fn test_migrated_from_pallet_issuance() { assert_eq!(1, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(1, 1u8); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(99999), 1, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(99999), + 1, + 1, + None, + ) + .unwrap(); - roll_to_while_minting(4, None); + forward_to_block_with_custom_rewards::(9, LIQUIDITY_ISSUANCE); assert_eq!( - U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + U256::from_dec_str("153142377820933750789374425201630124724265475").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - roll_to_while_minting(9, None); + forward_to_block_with_custom_rewards::(19, LIQUIDITY_ISSUANCE); assert_eq!( - U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), + U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(2, 1u8); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(99999), 2, 1, None).unwrap(); - roll_to_while_minting(14, None); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(99999), + 2, + 1, + None, + ) + .unwrap(); + forward_to_block_with_custom_rewards::(29, LIQUIDITY_ISSUANCE); assert_eq!( - U256::from_dec_str("191427546923208537313638702283778366195067525").unwrap(), + U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); assert_eq!( - U256::from_dec_str("38285509384641707462727740456755673239013505").unwrap(), + U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), ProofOfStake::get_pool_rewards(2).unwrap() ); - roll_to_while_minting(19, None); + forward_to_block_with_custom_rewards::(39, LIQUIDITY_ISSUANCE); assert_eq!( - U256::from_dec_str("229713056307850244776366442740534039434081030").unwrap(), + U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); assert_eq!( - U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), ProofOfStake::get_pool_rewards(2).unwrap() ); }); } #[test] +#[serial] fn claim_rewards_from_pool_that_has_been_disabled() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -1076,17 +1172,2921 @@ fn claim_rewards_from_pool_that_has_been_disabled() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); - forward_to_block(10); + forward_to_block::(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 0u8).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 0); }); } + +const MILLION: u128 = 1_000_000; +const REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); +const FIRST_REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); +const SECOND_REWARDED_PAIR: (TokenId, TokenId) = (0u32, 5u32); +const REWARD_AMOUNT: u128 = 10_000u128; +const REWARD_TOKEN: u32 = 5u32; +const FIRST_REWARD_TOKEN: u32 = REWARD_TOKEN; +const SECOND_REWARD_TOKEN: u32 = 6u32; +const LIQUIDITY_TOKEN: u32 = 10; +const FIRST_LIQUIDITY_TOKEN: u32 = 10; +const SECOND_LIQUIDITY_TOKEN: u32 = 11; +const TOKEN_PAIRED_WITH_MGX: u32 = 15; +const ALICE: u128 = 2; +const BOB: u128 = 3; +const CHARLIE: u128 = 4; +const EVE: u128 = 5; + +fn min_req_volume() -> u128 { + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() +} + +#[test] +#[serial] +fn user_can_provide_3rdparty_rewards() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(5); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 6u32.into(), + ) + .unwrap(); + }); +} + +#[test] +#[serial] +fn cant_schedule_rewards_in_past() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + roll_to_session::(5); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 4u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + }); +} + +#[test] +#[serial] +fn cannot_reward_unexisting_pool() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock + .expect() + .return_const(Err(Error::::PoolDoesNotExist.into())); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ), + Error::::PoolDoesNotExist + ); + }); +} + +#[test] +#[serial] +fn rewards_are_stored_in_pallet_account() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_eq!( + TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), + 0 + ); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), REWARD_AMOUNT); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ),); + + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), 0); + assert_eq!( + TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), + REWARD_AMOUNT + ); + }); +} + +#[test] +#[serial] +fn rewards_schedule_is_stored() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ),); + + let rewards_per_session = REWARD_AMOUNT / 5; + assert_eq!( + RewardsSchedulesList::::get(0).unwrap(), + ( + Schedule { + scheduled_at: 0u64, + last_session: 5u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: rewards_per_session, + }, + None + ) + ); + assert_eq!(ScheduleListTail::::get(), Some(0u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + }); +} + +#[test] +#[serial] +fn rewards_linked_list_insert_multiple_schedules() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ),); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 2u32.into() + ),); + + assert_eq!( + RewardsSchedulesList::::get(0).unwrap(), + ( + Schedule { + scheduled_at: 0u64, + last_session: 1u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 1, + }, + Some(1) + ) + ); + + assert_eq!( + RewardsSchedulesList::::get(1).unwrap(), + ( + Schedule { + scheduled_at: 0u64, + last_session: 2u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 2, + }, + None + ) + ); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + }); +} + +#[test] +#[serial] +fn rewards_linked_list_removes_outdated_schedule_automatically() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ),); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 2u32.into() + ),); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + + forward_to_block::(2); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); + + forward_to_block::(5); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); + + forward_to_block::(11); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); + + forward_to_block::(21); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); + + forward_to_block::(25); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); + + forward_to_block::(29); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + + forward_to_block::(30); + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); + assert_eq!(ScheduleListPos::::get(), None); + }); +} + +// rewards_first_schedule_from_linked_list +// rewards_last_schedule_from_linked_list +// rewards_middle_schedule_from_linked_list +// rewards_multipleall_schedule_from_linked_list + +fn insert_schedule_ending_at_session(n: u32) { + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + n.into(), + ),); +} + +#[test] +#[serial] +fn rewards_first_schedule_from_linked_list_of_four() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_last_schedule_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_middle_schedule_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_first_few_elems_at_once_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(20); + + assert_eq!(ScheduleListHead::::get(), Some(2u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_few_last_elems_at_once_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_few_middle_elements_from_linkedd_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_random_elements_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 5 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(4).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(4u64)); + + forward_to_block::(21); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_random_elements_from_linked_list_over_time() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 7 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(3); // 0 + insert_schedule_ending_at_session(2); // 1 + insert_schedule_ending_at_session(1); // 2 + insert_schedule_ending_at_session(2); // 3 + insert_schedule_ending_at_session(2); // 4 + insert_schedule_ending_at_session(1); // 5 + insert_schedule_ending_at_session(3); // 6 + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + + roll_to_session::(2); + process_all_schedules_in_current_session(); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); + + roll_to_session::(3); + process_all_schedules_in_current_session(); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + insert_schedule_ending_at_session(3); // 0 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 2 + insert_schedule_ending_at_session(1); // 3 + insert_schedule_ending_at_session(1); // 4 + insert_schedule_ending_at_session(1); // 5 + insert_schedule_ending_at_session(3); // 6 + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(8u64)); + + forward_to_block::(24); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(8u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); + assert_eq!(RewardsSchedulesList::::get(8u64).unwrap().1, None); + + forward_to_block::(100); + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); + }); +} + +#[test] +#[ignore] +#[serial] +fn number_of_active_schedules_is_limited() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, MILLION) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let max_schedules: u32 = + <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); + for i in 0..(max_schedules) { + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + (5u32 + i).into() + )); + } + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 100u32.into() + ), + Error::::TooManySchedules + ); + + roll_to_session::(10); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 100u32.into() + )); + }); +} + +#[test] +#[serial] +fn duplicated_schedules_works() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 5u32.into() + )); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(0u64)); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 5u32.into() + )); + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + }); +} + +#[test] +#[serial] +fn reject_schedule_with_too_little_rewards_per_session() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(1u128); + + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(0u128); + + roll_to_session::(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 1, + 5u32.into() + ), + Error::::TooLittleRewards + ); + }); +} + +#[test] +#[serial] +fn accept_schedule_valuated_in_native_token() { + ExtBuilder::new() + .issue(ALICE, ProofOfStake::native_token_id(), REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); + + roll_to_session::(4); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + ProofOfStake::native_token_id(), + 10, + 5u32.into() + ),); + }); +} + +#[test] +#[serial] +fn accept_schedule_valuated_in_token_paired_with_native_token() { + ExtBuilder::new() + .issue(ALICE, ProofOfStake::native_token_id(), REWARD_AMOUNT) + .issue(ALICE, TOKEN_PAIRED_WITH_MGX, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); + + roll_to_session::(4); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + TOKEN_PAIRED_WITH_MGX, + REWARD_AMOUNT, + 5u32.into() + ),); + }); +} + +#[test] +#[serial] +fn user_can_claim_3rdparty_rewards() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session::(2); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + + roll_to_session::(3); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); +} + +#[test] +#[serial] +fn overlapping_3rdparty_rewards_works() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN: u32 = 5; + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); + + let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_reward_token, + amount, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_reward_token, + None, + ) + .unwrap(); + + roll_to_session::(5); + let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_reward_token_id, + 100_000, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_reward_token_id, + None, + ) + .unwrap(); + + roll_to_session::(7); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + second_reward_token_id + ), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + first_reward_token + ), + Ok(6000) + ); + }); +} + +#[test] +#[serial] +fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 200) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(5); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 100_000, + 15u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); + + roll_to_session::(7); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(6000) + ); + }); +} + +#[test] +#[serial] +fn deactivate_3rdparty_rewards() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(2); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(500) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + + roll_to_session::(3); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); +} + +#[test] +#[serial] +fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, 2 * REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 4 * REWARD_AMOUNT) + .issue(BOB, FIRST_LIQUIDITY_TOKEN, 100) + .issue(BOB, SECOND_LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock + .expect() + .with(eq(FIRST_REWARDED_PAIR.0), eq(FIRST_REWARDED_PAIR.1)) + .return_const(Ok(FIRST_LIQUIDITY_TOKEN)); + get_liquidity_asset_mock + .expect() + .with(eq(SECOND_REWARDED_PAIR.0), eq(SECOND_REWARDED_PAIR.1)) + .return_const(Ok(SECOND_LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); + + System::set_block_number(1); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + FIRST_REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100u128, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(2); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![(FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128),] + ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + FIRST_REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 12u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100u128, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); + + roll_to_session::(3); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0 * 2000u128), + ] + ); + + roll_to_session::(4); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 3 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + SECOND_REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 14u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100u128, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(5); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 4 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 2 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0 * 1000u128), + ] + ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + SECOND_REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100u128, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); + + roll_to_session::(7); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 6 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + ] + ); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + ] + ); + }); +} + +#[test] +#[serial] +fn liquidity_minting_liquidity_can_be_resused() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + Some(ThirdPartyActivationKind::LiquidityMining), + ) + .unwrap(); + + roll_to_session::(2); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(1000) + ); + }); +} + +#[test] +#[serial] +fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { + // 1. activate tokens for native rewards + // 2. re-activate tokens for 3rdparty rewards + // 4. deactivate tokens for 3rdparty rewards + // 5. fail to transfer assets as they are still locked + // 6. deactivate tokens for native rewards + // 7. successfully transfer unlocked tokens + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + Some(ThirdPartyActivationKind::LiquidityMining), + ) + .unwrap(); + + assert_err!( + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + ), + Error::::LiquidityLockedIn3rdpartyRewards + ); + + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + ) + .unwrap(); + + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + )); + }); +} + +#[test] +#[serial] +fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + Some(ThirdPartyActivationKind::LiquidityMining), + ) + .unwrap(); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 200, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 101, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + )); + }); +} + +#[test] +#[serial] +fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); + + assert_err!( + TokensOf::::transfer( + 0, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ),); + }); +} + +#[test] +#[serial] +fn can_claim_schedule_rewards() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); + + forward_to_block::(20); + + assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); + assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); + + assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 1000); + assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(0) + ); + }); +} + +#[test] +#[serial] +fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_liq_minting() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + + assert_err_ignore_postinfo!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + }); +} + +#[test] +#[serial] +fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_schedule_rewards() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + assert_err!( + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ), + Error::::NotAPromotedPool + ); + }); +} + +use frame_support::dispatch::{GetDispatchInfo, Pays}; +use sp_runtime::{traits::Dispatchable, Permill}; + +#[test] +#[serial] +fn activate_deactivate_calls_are_free_of_charge() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + let activate_call = + mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + }); + + let deactivate_call = + mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + }); + + assert_eq!( + activate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap().pays_fee, + Pays::No + ); + + assert_eq!( + deactivate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap().pays_fee, + Pays::No + ); + }); +} + +#[test] +#[serial] +fn unsuccessul_activate_deactivate_calls_charges_fees() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let activate_call = + mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + }); + + let deactivate_call = + mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + }); + + assert_eq!( + activate_call + .dispatch(RuntimeOrigin::signed(BOB)) + .unwrap_err() + .post_info + .pays_fee, + Pays::Yes + ); + + assert_eq!( + deactivate_call + .dispatch(RuntimeOrigin::signed(BOB)) + .unwrap_err() + .post_info + .pays_fee, + Pays::Yes + ); + }); +} + +#[test] +#[serial] +fn claim_rewards_from_multiple_sessions_at_once() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session::(2); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + + roll_to_session::(5); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(4000) + ); + }); +} + +#[test] +#[serial] +fn multi_user_rewards_distributeion_scenario() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session::(2); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + + roll_to_session::(3); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); +} + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_instantly() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(12); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(7); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(15); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finished() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(15); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(16); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} + +#[test] +#[serial] +fn test_multiple_activations_in_same_block() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(2); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT / 10 / 2) + ); + }); +} + +#[test] +#[serial] +fn rewards_are_available_in_next_session_after_rewards_are_provided() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10 * 3 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + roll_to_session::(1); + + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + roll_to_session::(2); + + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + roll_to_session::(3); + + assert_eq!( + 15_000u128 + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128 + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + }); +} + +#[test] +#[serial] +fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedule() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) + .issue(ALICE, LIQUIDITY_TOKEN, 100) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + /// 1000 rewards per session + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(2); + + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + roll_to_session::(3); + + assert_eq!( + 1000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + assert_eq!( + 1000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + + roll_to_session::(4); + + assert_eq!( + 1249u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 749u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 749u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 249u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + }); +} + +#[test] +#[serial] +fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_for_the_first_time() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + assert_err_ignore_postinfo!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 2u8) + .unwrap(); + + assert_err_ignore_postinfo!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 10u32.into(), + ) + .unwrap(); + + assert_ok!(ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + )); + }); +} + +#[test] +#[serial] +fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let too_small_volume = Some((min_req_volume() - 1, min_req_volume() - 1)); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(too_small_volume); + + roll_to_session::(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); + }); +} + +#[test] +#[serial] +fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let min_volume = Some((min_req_volume(), min_req_volume())); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(min_volume); + + roll_to_session::(4); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ),); + }); +} + +#[test] +#[serial] +fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let too_small_volume = Some((min_req_volume() - 1, min_req_volume() - 1)); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(None); + + let get_reserves_mock = MockValuationApi::get_reserves_context(); + get_reserves_mock.expect().return_const(Ok((9u128, 0u128))); + + roll_to_session::(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); + }); +} + +#[test] +#[serial] +fn accept_3rdparty_rewards_with_liq_token_and_min_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(None); + + let get_reserves_mock = MockValuationApi::get_reserves_context(); + get_reserves_mock.expect().return_const(Ok((min_req_volume(), 0u128))); + + roll_to_session::(4); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ),); + }); +} diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs new file mode 100644 index 0000000000..552618d632 --- /dev/null +++ b/pallets/proof-of-stake/src/utils.rs @@ -0,0 +1,74 @@ +use crate as pos; +use frame_support::traits::Hooks; +use frame_system::{Config, Pallet}; +use mangata_support::traits::LiquidityMiningApi; +use sp_core::Get; +use sp_runtime::Saturating; + +pub type TokensOf = ::Currency; +use orml_tokens::MultiTokenCurrencyExtended; + +pub fn roll_to_next_block() +where + T: pos::Config, + T: frame_system::Config, +{ + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + forward_to_block::(new_block_number); +} + +pub fn roll_to_next_session() +where + T: pos::Config, + T: frame_system::Config, +{ + let current_session = pos::Pallet::::session_index(); + roll_to_session::(current_session + 1); +} + +pub fn roll_to_session(n: u32) +where + T: pos::Config, + T: frame_system::Config, +{ + while pos::Pallet::::session_index() < n { + roll_to_next_block::(); + } +} + +pub fn forward_to_block(n: T::BlockNumber) +where + T: pos::Config, + T: frame_system::Config, +{ + forward_to_block_with_custom_rewards::(n, 10000); +} + +pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) +where + T: pos::Config, + T: frame_system::Config, +{ + while frame_system::Pallet::::block_number() < n { + let new_block_number = + frame_system::Pallet::::block_number().saturating_add(1u32.into()); + frame_system::Pallet::::set_block_number(new_block_number); + + frame_system::Pallet::::on_initialize(new_block_number); + pos::Pallet::::on_initialize(new_block_number); + + if pos::Pallet::::is_new_session() { + TokensOf::::mint( + pos::Pallet::::native_token_id().into(), + &::LiquidityMiningIssuanceVault::get().into(), + rewards.into(), + ) + .unwrap(); + + pos::Pallet::::distribute_rewards(rewards); + } + + pos::Pallet::::on_finalize(new_block_number); + frame_system::Pallet::::on_finalize(new_block_number); + } +} diff --git a/pallets/proof-of-stake/src/weights.rs b/pallets/proof-of-stake/src/weights.rs index 49e10aa4c8..7e015e5147 100644 --- a/pallets/proof-of-stake/src/weights.rs +++ b/pallets/proof-of-stake/src/weights.rs @@ -55,22 +55,18 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn reward_pool() -> Weight; } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Storage: Tokens Accounts (r:2 w:2) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(97_590_000, 0)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) fn update_pool_promotion() -> Weight { (Weight::from_parts(52_090_000, 0)) @@ -82,7 +78,7 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Storage: ProofOfStake RewardsInfo (r:1 w:1) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(116_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -92,7 +88,37 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Storage: Tokens Accounts (r:1 w:1) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight{ + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn claim_native_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 79db4e5682..9bb92742da 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -3427,6 +3427,21 @@ impl Valuate for Pallet { .unwrap_or(Balance::max_value()) } + fn valuate_non_liquidity_token( + non_liquidity_token_id: Self::CurrencyId, + amount: Self::Balance, + ) -> Self::Balance { + let native_token_id = Pallet::::native_token_id(); + + let (native_reserves, token_reserves) = + match Pallet::::get_reserves(native_token_id, non_liquidity_token_id) { + Ok(reserves) => reserves, + Err(_) => return Default::default(), + }; + Pallet::::calculate_sell_price_no_fee(token_reserves, native_reserves, amount) + .unwrap_or_default() + } + fn scale_liquidity_by_mga_valuation( mga_valuation: Self::Balance, liquidity_token_amount: Self::Balance, diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index cefb152129..ed70bc8179 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -329,6 +329,10 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; + type ValuationApi = XykStorage; } #[cfg(feature = "runtime-benchmarks")] @@ -340,6 +344,10 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<1200>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; + type ValuationApi = XykStorage; } pub struct TokensActivationPassthrough(PhantomData); diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index 9ffe728bf7..b935817478 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -2595,3 +2595,40 @@ fn buy_W_maintenance_mode() { ); }); } + +#[test] +#[serial] +fn valuate_token_paired_with_mgx() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let native_token_id = XykStorage::create_new_token(&DUMMY_USER_ID, 2_000_000_u128); + assert_eq!(native_token_id, XykStorage::native_token_id()); + + let first_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let second_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let first_token_pool = second_token + 1; + let second_token_pool = second_token + 2; + + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + native_token_id, + 1_000_000_u128, + first_token, + 500_000_u128, + ) + .unwrap(); + + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + second_token, + 1_000_000_u128, + native_token_id, + 500_000_u128, + ) + .unwrap(); + + assert_eq!( as Valuate>::valuate_non_liquidity_token(first_token, 100), 199); + + assert_eq!( as Valuate>::valuate_non_liquidity_token(second_token, 100), 49); + }); +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 7eb1bfdb64..2ad77371eb 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1150,13 +1150,13 @@ where /// Reward payments delay (number of rounds) pub const RewardPaymentDelay: u32 = 2; /// Minimum collators selected per round, default at genesis and minimum forever after - pub const MinSelectedCandidates: u32 = 25; + pub const MinSelectedCandidates: u32 = 50; /// Maximum collator candidates allowed - pub const MaxCollatorCandidates: u32 = 50; + pub const MaxCollatorCandidates: u32 = 100; /// Maximum delegators allowed per candidate - pub const MaxTotalDelegatorsPerCandidate: u32 = 25; + pub const MaxTotalDelegatorsPerCandidate: u32 = 30; /// Maximum delegators counted per candidate - pub const MaxDelegatorsPerCandidate: u32 = 12; + pub const MaxDelegatorsPerCandidate: u32 = 30; /// Maximum delegations per delegator pub const MaxDelegationsPerDelegator: u32 = 30; /// Default fixed percent a collator takes off the top of due rewards @@ -1366,4 +1366,15 @@ where pub const AnnouncementDepositFactor: Balance = deposit(0, 68); } } + + pub mod pallet_proof_of_stake { + use super::*; + + parameter_types! { + pub const RewardsSchedulesLimit: u32 = 100_000u32; + // TODO: allign properly + pub const Min3rdPartyRewardValutationPerSession: u128 = 100 * 30_000 * currency::DOLLARS; + pub const Min3rdPartyRewardVolume: u128 = 100 * 30_000 * currency::DOLLARS; + } + } } diff --git a/runtime/mangata-kusama/Cargo.toml b/runtime/mangata-kusama/Cargo.toml index 9c6ca2cd7d..041c170072 100644 --- a/runtime/mangata-kusama/Cargo.toml +++ b/runtime/mangata-kusama/Cargo.toml @@ -32,6 +32,7 @@ pallet-multipurpose-liquidity = { path = '../../pallets/multipurpose-liquidity', pallet-maintenance = { path = '../../pallets/maintenance', default-features = false } pallet-fee-lock = { path = '../../pallets/fee-lock', default-features = false} mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false} # Substrate Dependencies ## Substrate Primitive Dependencies @@ -169,6 +170,7 @@ std = [ "pallet-treasury/std", "pallet-xyk/std", "pallet-proof-of-stake/std", + "proof-of-stake-runtime-api/std", "pallet-bootstrap/std", "xyk-runtime-api/std", "parachain-staking/std", diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index ac4dc22e4e..142e7c38f4 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -273,10 +273,14 @@ impl pallet_proof_of_stake::Config for Runtime { type ActivationReservesProvider = MultiPurposeLiquidity; type NativeCurrencyId = tokens::MgxTokenId; type Currency = orml_tokens::MultiTokenCurrencyAdapter; - //TODO: fix type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; + type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; + type Min3rdPartyRewardValutationPerSession = + cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; + type ValuationApi = Xyk; } impl pallet_bootstrap::BootstrapBenchmarkingConfig for Runtime {} @@ -529,7 +533,6 @@ impl pallet_issuance::Config for Runtime { type RuntimeEvent = RuntimeEvent; type NativeCurrencyId = tokens::MgxTokenId; type Tokens = orml_tokens::MultiTokenCurrencyAdapter; - //TODO type BlocksPerRound = cfg::parachain_staking::BlocksPerRound; type HistoryLimit = cfg::pallet_issuance::HistoryLimit; type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; @@ -767,6 +770,32 @@ mod benches { impl_runtime_apis! { + impl proof_of_stake_runtime_api::ProofOfStakeApi for Runtime{ + fn calculate_native_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Balance{ + pallet_proof_of_stake::Pallet::::calculate_native_rewards_amount(user, liquidity_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + reward_asset_id: TokenId, + ) -> Balance{ + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_amount(user, liquidity_asset_id, reward_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_all( + user: AccountId, + ) -> Vec<(TokenId, TokenId, Balance)>{ + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) + .unwrap_or_default() + } + } + impl ver_api::VerApi for Runtime { fn get_signer( tx: ::Extrinsic, diff --git a/runtime/mangata-kusama/src/weights/block_weights.rs b/runtime/mangata-kusama/src/weights/block_weights.rs index 1e38e0097a..6d27c66767 100644 --- a/runtime/mangata-kusama/src/weights/block_weights.rs +++ b/runtime/mangata-kusama/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_631_910, 8_052_540 - /// Average: 7_692_887 - /// Median: 7_661_290 - /// Std-Dev: 104885.3 + /// Min, Max: 7_983_500, 8_609_050 + /// Average: 8_057_882 + /// Median: 8_023_430 + /// Std-Dev: 118109.32 /// /// Percentiles nanoseconds: - /// 99th: 8_034_380 - /// 95th: 8_023_380 - /// 75th: 7_674_100 + /// 99th: 8_567_140 + /// 95th: 8_382_280 + /// 75th: 8_036_000 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(7_692_887), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs index 92fca50754..ddceb8ee70 100644 --- a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 114_329, 115_887 - /// Average: 114_756 - /// Median: 114_639 - /// Std-Dev: 309.81 + /// Min, Max: 116_665, 118_803 + /// Average: 117_078 + /// Median: 117_010 + /// Std-Dev: 306.32 /// /// Percentiles nanoseconds: - /// 99th: 115_799 - /// 95th: 115_437 - /// 75th: 114_859 + /// 99th: 118_109 + /// 95th: 117_513 + /// 75th: 117_236 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(114_756), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/frame_system.rs b/runtime/mangata-kusama/src/weights/frame_system.rs index e2b9f77ec8..9bcfdbb3d8 100644 --- a/runtime/mangata-kusama/src/weights/frame_system.rs +++ b/runtime/mangata-kusama/src/weights/frame_system.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,46 +68,46 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .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) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).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))) } @@ -116,46 +116,46 @@ impl frame_system::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).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))) } diff --git a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs index 341ffe99df..8242233fca 100644 --- a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -72,7 +72,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -81,7 +81,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn register_asset() -> Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn update_asset() -> Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/orml_tokens.rs b/runtime/mangata-kusama/src/weights/orml_tokens.rs index 06359ec572..5508f3d7cb 100644 --- a/runtime/mangata-kusama/src/weights/orml_tokens.rs +++ b/runtime/mangata-kusama/src/weights/orml_tokens.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -73,7 +73,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -82,7 +82,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -91,7 +91,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -109,7 +109,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,7 +122,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -135,7 +135,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,7 +148,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -166,7 +166,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -175,7 +175,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -184,7 +184,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -197,7 +197,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -210,7 +210,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs index b07baf19f9..7ebdf94b14 100644 --- a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -78,7 +78,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -103,7 +103,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -136,7 +136,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -167,7 +167,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -188,7 +188,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -213,7 +213,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -246,7 +246,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -277,7 +277,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs index ff2788893c..ded612958c 100644 --- a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -80,11 +80,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -93,11 +93,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -105,11 +105,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -125,13 +125,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -140,58 +140,58 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -199,20 +199,20 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -220,13 +220,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -239,9 +239,9 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -258,11 +258,11 @@ impl WeightInfo for () { // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) @@ -271,11 +271,11 @@ impl WeightInfo for () { // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -283,11 +283,11 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -303,13 +303,13 @@ impl WeightInfo for () { // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -318,58 +318,58 @@ impl WeightInfo for () { // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -377,20 +377,20 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -398,13 +398,13 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -417,9 +417,9 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs index dbdf56c152..a0016cb225 100644 --- a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,220 +68,234 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) + .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs index 5320f4b45e..7057d5cf29 100644 --- a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -81,7 +81,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -92,7 +92,7 @@ impl WeightInfo for () { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_issuance.rs b/runtime/mangata-kusama/src/weights/pallet_issuance.rs index 5df4b34f6d..c7f3821ac2 100644 --- a/runtime/mangata-kusama/src/weights/pallet_issuance.rs +++ b/runtime/mangata-kusama/src/weights/pallet_issuance.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -71,14 +71,14 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -97,9 +97,9 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -116,14 +116,14 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -142,9 +142,9 @@ impl WeightInfo for () { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs index 3fb479e9b7..4e536d93e4 100644 --- a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -76,7 +76,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -91,7 +91,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -112,7 +112,7 @@ impl WeightInfo for () { // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -127,7 +127,7 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs index d7f3024fd8..6aac9c8080 100644 --- a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -56,10 +56,14 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn reward_pool() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -71,15 +75,15 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,8 +97,8 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { - (Weight::from_parts(94_130_000, 0)) + fn activate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(100_109_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -108,11 +112,95 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { - (Weight::from_parts(82_600_000, 0)) + fn deactivate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(91_990_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(120_360_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } } // For backwards compatibility and tests @@ -123,15 +211,15 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -145,8 +233,8 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { - (Weight::from_parts(94_130_000, 0)) + fn activate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(100_109_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -160,9 +248,93 @@ impl WeightInfo for () { // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { - (Weight::from_parts(82_600_000, 0)) + fn deactivate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(91_990_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(120_360_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } } diff --git a/runtime/mangata-kusama/src/weights/pallet_session.rs b/runtime/mangata-kusama/src/weights/pallet_session.rs index 1a2b8fef84..3b9299b1a8 100644 --- a/runtime/mangata-kusama/src/weights/pallet_session.rs +++ b/runtime/mangata-kusama/src/weights/pallet_session.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,7 +77,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -90,7 +90,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -99,7 +99,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs index a2a3ba9ec3..a32d4dafb2 100644 --- a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,12 +66,12 @@ impl pallet_timestamp::WeightInfo for ModuleWeight { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } @@ -80,11 +80,11 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_treasury.rs b/runtime/mangata-kusama/src/weights/pallet_treasury.rs index 34eb8ab30f..89616a60b5 100644 --- a/runtime/mangata-kusama/src/weights/pallet_treasury.rs +++ b/runtime/mangata-kusama/src/weights/pallet_treasury.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -77,7 +77,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -88,7 +88,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -97,16 +97,16 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -121,9 +121,9 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).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(1 as u64)) @@ -133,7 +133,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -142,7 +142,7 @@ impl WeightInfo for () { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -153,7 +153,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -162,16 +162,16 @@ impl WeightInfo for () { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -186,9 +186,9 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).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(1 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs index 8f55cdf831..933c8abfba 100644 --- a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs index f58fc1d6e6..1c975632c9 100644 --- a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -75,9 +75,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -88,9 +88,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +101,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -116,9 +116,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -131,9 +131,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -144,9 +144,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -157,9 +157,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -174,9 +174,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -187,9 +187,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -200,9 +200,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -215,9 +215,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -230,9 +230,9 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -243,9 +243,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -256,9 +256,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_xyk.rs b/runtime/mangata-kusama/src/weights/pallet_xyk.rs index 62a52673ce..c1f831ff19 100644 --- a/runtime/mangata-kusama/src/weights/pallet_xyk.rs +++ b/runtime/mangata-kusama/src/weights/pallet_xyk.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -90,7 +90,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,6 +98,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -105,12 +109,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -119,14 +127,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -134,6 +140,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -141,28 +151,30 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(T::DbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -187,7 +199,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -208,17 +220,17 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -230,17 +242,19 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(14 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -249,16 +263,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -272,16 +282,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -289,7 +299,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -316,7 +326,7 @@ impl WeightInfo for () { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } @@ -324,6 +334,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -331,12 +345,16 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -345,14 +363,12 @@ impl WeightInfo for () { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -360,6 +376,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -367,28 +387,30 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(RocksDbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -413,7 +435,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } @@ -434,17 +456,17 @@ impl WeightInfo for () { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -456,17 +478,19 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) - .saturating_add(RocksDbWeight::get().writes(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -475,16 +499,12 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } @@ -498,16 +518,16 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -515,7 +535,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/parachain_staking.rs b/runtime/mangata-kusama/src/weights/parachain_staking.rs index b2b31ca20e..aa9ad00b32 100644 --- a/runtime/mangata-kusama/src/weights/parachain_staking.rs +++ b/runtime/mangata-kusama/src/weights/parachain_staking.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -99,14 +99,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +133,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,9 +148,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -158,20 +158,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -182,9 +182,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -195,7 +195,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -206,7 +206,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -219,7 +219,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -234,7 +234,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -251,7 +251,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -268,21 +268,21 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -307,11 +307,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -320,7 +320,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -339,9 +339,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -350,7 +350,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -359,7 +359,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -372,7 +372,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -381,7 +381,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -400,7 +400,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -419,7 +419,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -438,28 +438,28 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -468,22 +468,22 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -492,8 +492,8 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(T::DbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -503,20 +503,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(T::DbWeight::get().reads(30 as u64)) - .saturating_add(T::DbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(T::DbWeight::get().reads(66 as u64)) + .saturating_add(T::DbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -525,14 +525,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -551,9 +551,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -571,37 +571,41 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(226 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(119 as u64)) + .saturating_add(T::DbWeight::get().writes(220 as u64)) } } @@ -610,14 +614,14 @@ impl WeightInfo for () { // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -644,11 +648,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -659,9 +663,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -669,20 +673,20 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -693,9 +697,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -706,7 +710,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -717,7 +721,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -730,7 +734,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -745,7 +749,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -762,7 +766,7 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -779,21 +783,21 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -818,11 +822,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -831,7 +835,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -850,9 +854,9 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -861,7 +865,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -870,7 +874,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -883,7 +887,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -892,7 +896,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -911,7 +915,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -930,7 +934,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -949,28 +953,28 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -979,22 +983,22 @@ impl WeightInfo for () { // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -1003,8 +1007,8 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(RocksDbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -1014,20 +1018,20 @@ impl WeightInfo for () { // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(RocksDbWeight::get().reads(30 as u64)) - .saturating_add(RocksDbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(RocksDbWeight::get().reads(66 as u64)) + .saturating_add(RocksDbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -1036,14 +1040,14 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -1062,9 +1066,9 @@ impl WeightInfo for () { // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -1082,36 +1086,40 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(226 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(119 as u64)) + .saturating_add(RocksDbWeight::get().writes(220 as u64)) } } diff --git a/runtime/mangata-rococo/Cargo.toml b/runtime/mangata-rococo/Cargo.toml index 4d78499f5d..d93243be28 100644 --- a/runtime/mangata-rococo/Cargo.toml +++ b/runtime/mangata-rococo/Cargo.toml @@ -32,6 +32,7 @@ pallet-multipurpose-liquidity = { path = '../../pallets/multipurpose-liquidity', pallet-maintenance = { path = '../../pallets/maintenance', default-features = false } pallet-fee-lock = { path = '../../pallets/fee-lock', default-features = false} mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false} # Substrate Dependencies ## Substrate Primitive Dependencies @@ -175,6 +176,7 @@ std = [ "pallet-treasury/std", "pallet-xyk/std", "pallet-proof-of-stake/std", + "proof-of-stake-runtime-api/std", "pallet-bootstrap/std", "xyk-runtime-api/std", "parachain-staking/std", diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 4544151282..e31a12b60c 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -276,6 +276,11 @@ impl pallet_proof_of_stake::Config for Runtime { type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; + type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; + type Min3rdPartyRewardValutationPerSession = + cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; + type ValuationApi = Xyk; } impl pallet_bootstrap::BootstrapBenchmarkingConfig for Runtime {} @@ -780,6 +785,34 @@ mod benches { impl_runtime_apis! { + + impl proof_of_stake_runtime_api::ProofOfStakeApi for Runtime{ + fn calculate_native_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Balance{ + pallet_proof_of_stake::Pallet::::calculate_native_rewards_amount(user, liquidity_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + reward_asset_id: TokenId, + ) -> Balance{ + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_amount(user, liquidity_asset_id, reward_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_all( + user: AccountId, + ) -> Vec<(TokenId, TokenId, Balance)>{ + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) + .unwrap_or_default() + } + } + + impl ver_api::VerApi for Runtime { fn get_signer( tx: ::Extrinsic, diff --git a/runtime/mangata-rococo/src/weights/block_weights.rs b/runtime/mangata-rococo/src/weights/block_weights.rs index 1e38e0097a..6d27c66767 100644 --- a/runtime/mangata-rococo/src/weights/block_weights.rs +++ b/runtime/mangata-rococo/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_631_910, 8_052_540 - /// Average: 7_692_887 - /// Median: 7_661_290 - /// Std-Dev: 104885.3 + /// Min, Max: 7_983_500, 8_609_050 + /// Average: 8_057_882 + /// Median: 8_023_430 + /// Std-Dev: 118109.32 /// /// Percentiles nanoseconds: - /// 99th: 8_034_380 - /// 95th: 8_023_380 - /// 75th: 7_674_100 + /// 99th: 8_567_140 + /// 95th: 8_382_280 + /// 75th: 8_036_000 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(7_692_887), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs index 92fca50754..ddceb8ee70 100644 --- a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 114_329, 115_887 - /// Average: 114_756 - /// Median: 114_639 - /// Std-Dev: 309.81 + /// Min, Max: 116_665, 118_803 + /// Average: 117_078 + /// Median: 117_010 + /// Std-Dev: 306.32 /// /// Percentiles nanoseconds: - /// 99th: 115_799 - /// 95th: 115_437 - /// 75th: 114_859 + /// 99th: 118_109 + /// 95th: 117_513 + /// 75th: 117_236 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(114_756), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/frame_system.rs b/runtime/mangata-rococo/src/weights/frame_system.rs index e2b9f77ec8..9bcfdbb3d8 100644 --- a/runtime/mangata-rococo/src/weights/frame_system.rs +++ b/runtime/mangata-rococo/src/weights/frame_system.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,46 +68,46 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .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) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).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))) } @@ -116,46 +116,46 @@ impl frame_system::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).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))) } diff --git a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs index 341ffe99df..8242233fca 100644 --- a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -72,7 +72,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -81,7 +81,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn register_asset() -> Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn update_asset() -> Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/orml_tokens.rs b/runtime/mangata-rococo/src/weights/orml_tokens.rs index 06359ec572..5508f3d7cb 100644 --- a/runtime/mangata-rococo/src/weights/orml_tokens.rs +++ b/runtime/mangata-rococo/src/weights/orml_tokens.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -73,7 +73,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -82,7 +82,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -91,7 +91,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -109,7 +109,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,7 +122,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -135,7 +135,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,7 +148,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -166,7 +166,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -175,7 +175,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -184,7 +184,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -197,7 +197,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -210,7 +210,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs index b07baf19f9..7ebdf94b14 100644 --- a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -78,7 +78,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -103,7 +103,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -136,7 +136,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -167,7 +167,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -188,7 +188,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -213,7 +213,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -246,7 +246,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -277,7 +277,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs index ff2788893c..ded612958c 100644 --- a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -80,11 +80,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -93,11 +93,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -105,11 +105,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -125,13 +125,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -140,58 +140,58 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -199,20 +199,20 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -220,13 +220,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -239,9 +239,9 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -258,11 +258,11 @@ impl WeightInfo for () { // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) @@ -271,11 +271,11 @@ impl WeightInfo for () { // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -283,11 +283,11 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -303,13 +303,13 @@ impl WeightInfo for () { // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -318,58 +318,58 @@ impl WeightInfo for () { // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -377,20 +377,20 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -398,13 +398,13 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -417,9 +417,9 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs index dbdf56c152..a0016cb225 100644 --- a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,220 +68,234 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) + .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs index 5320f4b45e..7057d5cf29 100644 --- a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -81,7 +81,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -92,7 +92,7 @@ impl WeightInfo for () { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_issuance.rs b/runtime/mangata-rococo/src/weights/pallet_issuance.rs index 5df4b34f6d..c7f3821ac2 100644 --- a/runtime/mangata-rococo/src/weights/pallet_issuance.rs +++ b/runtime/mangata-rococo/src/weights/pallet_issuance.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -71,14 +71,14 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -97,9 +97,9 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -116,14 +116,14 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -142,9 +142,9 @@ impl WeightInfo for () { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs index 3fb479e9b7..4e536d93e4 100644 --- a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -76,7 +76,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -91,7 +91,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -112,7 +112,7 @@ impl WeightInfo for () { // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -127,7 +127,7 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs index d7f3024fd8..6aac9c8080 100644 --- a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -56,10 +56,14 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn reward_pool() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -71,15 +75,15 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,8 +97,8 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { - (Weight::from_parts(94_130_000, 0)) + fn activate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(100_109_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -108,11 +112,95 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { - (Weight::from_parts(82_600_000, 0)) + fn deactivate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(91_990_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(120_360_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } } // For backwards compatibility and tests @@ -123,15 +211,15 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -145,8 +233,8 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { - (Weight::from_parts(94_130_000, 0)) + fn activate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(100_109_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -160,9 +248,93 @@ impl WeightInfo for () { // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { - (Weight::from_parts(82_600_000, 0)) + fn deactivate_liquidity_for_native_rewards() -> Weight { + (Weight::from_parts(91_990_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(120_360_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } } diff --git a/runtime/mangata-rococo/src/weights/pallet_session.rs b/runtime/mangata-rococo/src/weights/pallet_session.rs index 1a2b8fef84..3b9299b1a8 100644 --- a/runtime/mangata-rococo/src/weights/pallet_session.rs +++ b/runtime/mangata-rococo/src/weights/pallet_session.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,7 +77,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -90,7 +90,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -99,7 +99,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs index a2a3ba9ec3..a32d4dafb2 100644 --- a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,12 +66,12 @@ impl pallet_timestamp::WeightInfo for ModuleWeight { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } @@ -80,11 +80,11 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_treasury.rs b/runtime/mangata-rococo/src/weights/pallet_treasury.rs index 34eb8ab30f..89616a60b5 100644 --- a/runtime/mangata-rococo/src/weights/pallet_treasury.rs +++ b/runtime/mangata-rococo/src/weights/pallet_treasury.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -77,7 +77,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -88,7 +88,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -97,16 +97,16 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -121,9 +121,9 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).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(1 as u64)) @@ -133,7 +133,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -142,7 +142,7 @@ impl WeightInfo for () { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -153,7 +153,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -162,16 +162,16 @@ impl WeightInfo for () { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -186,9 +186,9 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).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(1 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs index 8f55cdf831..933c8abfba 100644 --- a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs index f58fc1d6e6..1c975632c9 100644 --- a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -75,9 +75,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -88,9 +88,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +101,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -116,9 +116,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -131,9 +131,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -144,9 +144,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -157,9 +157,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -174,9 +174,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -187,9 +187,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -200,9 +200,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -215,9 +215,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -230,9 +230,9 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -243,9 +243,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -256,9 +256,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_xyk.rs b/runtime/mangata-rococo/src/weights/pallet_xyk.rs index 62a52673ce..c1f831ff19 100644 --- a/runtime/mangata-rococo/src/weights/pallet_xyk.rs +++ b/runtime/mangata-rococo/src/weights/pallet_xyk.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -90,7 +90,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,6 +98,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -105,12 +109,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -119,14 +127,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -134,6 +140,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -141,28 +151,30 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(T::DbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -187,7 +199,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -208,17 +220,17 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -230,17 +242,19 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(14 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -249,16 +263,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -272,16 +282,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -289,7 +299,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -316,7 +326,7 @@ impl WeightInfo for () { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } @@ -324,6 +334,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -331,12 +345,16 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -345,14 +363,12 @@ impl WeightInfo for () { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -360,6 +376,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -367,28 +387,30 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(RocksDbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -413,7 +435,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } @@ -434,17 +456,17 @@ impl WeightInfo for () { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -456,17 +478,19 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) - .saturating_add(RocksDbWeight::get().writes(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -475,16 +499,12 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } @@ -498,16 +518,16 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -515,7 +535,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/parachain_staking.rs b/runtime/mangata-rococo/src/weights/parachain_staking.rs index b2b31ca20e..aa9ad00b32 100644 --- a/runtime/mangata-rococo/src/weights/parachain_staking.rs +++ b/runtime/mangata-rococo/src/weights/parachain_staking.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -99,14 +99,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +133,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,9 +148,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -158,20 +158,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -182,9 +182,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -195,7 +195,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -206,7 +206,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -219,7 +219,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -234,7 +234,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -251,7 +251,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -268,21 +268,21 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -307,11 +307,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -320,7 +320,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -339,9 +339,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -350,7 +350,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -359,7 +359,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -372,7 +372,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -381,7 +381,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -400,7 +400,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -419,7 +419,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -438,28 +438,28 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -468,22 +468,22 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -492,8 +492,8 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(T::DbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -503,20 +503,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(T::DbWeight::get().reads(30 as u64)) - .saturating_add(T::DbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(T::DbWeight::get().reads(66 as u64)) + .saturating_add(T::DbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -525,14 +525,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -551,9 +551,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -571,37 +571,41 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(226 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(119 as u64)) + .saturating_add(T::DbWeight::get().writes(220 as u64)) } } @@ -610,14 +614,14 @@ impl WeightInfo for () { // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -644,11 +648,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -659,9 +663,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -669,20 +673,20 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -693,9 +697,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -706,7 +710,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -717,7 +721,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -730,7 +734,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -745,7 +749,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -762,7 +766,7 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -779,21 +783,21 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -818,11 +822,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -831,7 +835,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -850,9 +854,9 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -861,7 +865,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -870,7 +874,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -883,7 +887,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -892,7 +896,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -911,7 +915,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -930,7 +934,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -949,28 +953,28 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -979,22 +983,22 @@ impl WeightInfo for () { // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -1003,8 +1007,8 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(RocksDbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -1014,20 +1018,20 @@ impl WeightInfo for () { // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(RocksDbWeight::get().reads(30 as u64)) - .saturating_add(RocksDbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(RocksDbWeight::get().reads(66 as u64)) + .saturating_add(RocksDbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -1036,14 +1040,14 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -1062,9 +1066,9 @@ impl WeightInfo for () { // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -1082,36 +1086,40 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(226 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(119 as u64)) + .saturating_add(RocksDbWeight::get().writes(220 as u64)) } }