From b88d1514625dfcdd9afed301795f8db37d79faaa Mon Sep 17 00:00:00 2001 From: icodezjb <8869892+icodezjb@users.noreply.github.com> Date: Sun, 13 Mar 2022 20:11:14 +0800 Subject: [PATCH] Fix transaction payment (#613) * Fix transaction payment * Remove CustomOnRuntimeUpgrades Co-authored-by: icodezjb --- Cargo.lock | 519 ++++++------------ Cargo.toml | 69 +-- cli/Cargo.toml | 2 +- executor/Cargo.toml | 2 +- primitives/Cargo.toml | 2 +- primitives/assets-registrar/Cargo.toml | 2 +- primitives/gateway/bitcoin/Cargo.toml | 2 +- primitives/gateway/common/Cargo.toml | 2 +- primitives/genesis-builder/Cargo.toml | 2 +- primitives/io/Cargo.toml | 2 +- primitives/mining/common/Cargo.toml | 2 +- primitives/mining/staking/Cargo.toml | 2 +- primitives/protocol/Cargo.toml | 2 +- primitives/rpc/Cargo.toml | 2 +- primitives/runtime/Cargo.toml | 2 +- rpc/Cargo.toml | 2 +- runtime/chainx/Cargo.toml | 2 +- runtime/chainx/src/constants.rs | 41 ++ runtime/chainx/src/lib.rs | 9 +- runtime/chainx/src/migrations.rs | 20 +- runtime/dev/Cargo.toml | 2 +- runtime/dev/src/constants.rs | 41 ++ runtime/dev/src/lib.rs | 9 +- runtime/dev/src/migrations.rs | 20 +- runtime/malan/Cargo.toml | 2 +- runtime/malan/src/constants.rs | 41 ++ runtime/malan/src/lib.rs | 9 +- runtime/malan/src/migrations.rs | 20 +- service/Cargo.toml | 2 +- xpallets/assets-registrar/Cargo.toml | 2 +- xpallets/assets/Cargo.toml | 2 +- xpallets/assets/rpc/Cargo.toml | 2 +- xpallets/assets/rpc/runtime-api/Cargo.toml | 2 +- xpallets/dex/spot/Cargo.toml | 2 +- xpallets/dex/spot/rpc/Cargo.toml | 2 +- xpallets/dex/spot/rpc/runtime-api/Cargo.toml | 2 +- xpallets/gateway/bitcoin/Cargo.toml | 2 +- xpallets/gateway/common/Cargo.toml | 2 +- xpallets/gateway/common/rpc/Cargo.toml | 2 +- .../gateway/common/rpc/runtime-api/Cargo.toml | 2 +- xpallets/gateway/records/Cargo.toml | 2 +- xpallets/gateway/records/rpc/Cargo.toml | 2 +- .../records/rpc/runtime-api/Cargo.toml | 2 +- xpallets/genesis-builder/Cargo.toml | 2 +- xpallets/mining/asset/Cargo.toml | 2 +- xpallets/mining/asset/rpc/Cargo.toml | 2 +- .../mining/asset/rpc/runtime-api/Cargo.toml | 2 +- xpallets/mining/staking/Cargo.toml | 2 +- xpallets/mining/staking/rpc/Cargo.toml | 2 +- .../mining/staking/rpc/runtime-api/Cargo.toml | 2 +- xpallets/support/Cargo.toml | 2 +- xpallets/system/Cargo.toml | 2 +- xpallets/transaction-fee/Cargo.toml | 2 +- xpallets/transaction-fee/rpc/Cargo.toml | 2 +- .../rpc/runtime-api/Cargo.toml | 2 +- 55 files changed, 387 insertions(+), 499 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e16ccf22f..956c59f27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -797,14 +797,14 @@ dependencies = [ [[package]] name = "chainx" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-cli", ] [[package]] name = "chainx-cli" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-executor", "chainx-primitives", @@ -830,7 +830,7 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "sc-consensus-slots", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sc-finality-grandpa", "sc-network", "sc-rpc", @@ -860,19 +860,19 @@ dependencies = [ [[package]] name = "chainx-executor" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-runtime", "dev-runtime", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "malan-runtime", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "xp-io", ] [[package]] name = "chainx-primitives" -version = "4.0.0" +version = "4.1.0" dependencies = [ "frame-system", "parity-scale-codec", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "chainx-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "chainx-runtime", @@ -935,11 +935,11 @@ dependencies = [ [[package]] name = "chainx-runtime" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "chainx-runtime-common", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", @@ -1038,7 +1038,7 @@ dependencies = [ [[package]] name = "chainx-service" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-executor", "chainx-primitives", @@ -1057,7 +1057,7 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-slots", "sc-consensus-uncles", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sc-finality-grandpa", "sc-network", "sc-rpc", @@ -1066,7 +1066,7 @@ dependencies = [ "sc-transaction-pool", "sp-api", "sp-authority-discovery", - "sp-authorship 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-authorship", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -1530,11 +1530,11 @@ dependencies = [ [[package]] name = "dev-runtime" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "chainx-runtime-common", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", @@ -1991,26 +1991,6 @@ dependencies = [ "sp-storage", ] -[[package]] -name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "frame-support", - "frame-system", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "sp-api", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", -] - [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" @@ -2018,7 +1998,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57 dependencies = [ "Inflector", "chrono", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "handlebars", "linked-hash-map", @@ -2026,7 +2006,7 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-client-db", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sc-service", "serde", "sp-core", @@ -2040,7 +2020,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -2068,7 +2048,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "bitflags", "frame-metadata", @@ -2095,7 +2075,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2107,7 +2087,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -2119,7 +2099,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "proc-macro2", "quote", @@ -2129,7 +2109,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "log", @@ -2148,7 +2128,7 @@ name = "frame-system-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -2161,7 +2141,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "sp-api", @@ -3997,11 +3977,11 @@ dependencies = [ [[package]] name = "malan-runtime" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "chainx-runtime-common", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", @@ -4671,14 +4651,14 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-authorship 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sp-authorship", "sp-runtime", "sp-std", ] @@ -4686,9 +4666,9 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4710,9 +4690,9 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4742,9 +4722,9 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4759,9 +4739,9 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -4775,7 +4755,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4792,9 +4772,9 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4815,10 +4795,10 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "enumflags2", - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -4831,7 +4811,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4850,7 +4830,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4858,7 +4838,7 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-keyring 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sp-keyring", "sp-runtime", "sp-std", ] @@ -4866,9 +4846,9 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4883,7 +4863,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4897,7 +4877,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4914,7 +4894,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4928,9 +4908,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -4944,7 +4924,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4965,7 +4945,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -4979,9 +4959,9 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -5014,7 +4994,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -5048,7 +5028,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5059,7 +5039,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -5075,7 +5055,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "frame-support", "frame-system", @@ -6094,17 +6074,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "log", - "sp-core", - "sp-wasm-interface", - "thiserror", -] - [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" @@ -6129,7 +6098,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6152,7 +6121,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6225,9 +6194,9 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", - "sp-keyring 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-keyring", "sp-keystore", - "sp-panic-handler 3.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-panic-handler", "sp-runtime", "sp-version", "structopt", @@ -6239,7 +6208,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "fnv", "futures 0.3.17", @@ -6247,7 +6216,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.11.2", - "sc-executor 0.10.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sc-executor", "sc-transaction-pool-api", "sc-utils", "sp-api", @@ -6261,7 +6230,7 @@ dependencies = [ "sp-state-machine", "sp-storage", "sp-trie", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6309,7 +6278,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "thiserror", ] @@ -6353,7 +6322,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-version", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6425,7 +6394,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "sc-client-api", - "sp-authorship 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-authorship", "sp-runtime", "thiserror", ] @@ -6440,41 +6409,16 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.11.2", - "sc-executor-common 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sc-executor-wasmi 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor-common", + "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", "sp-core", "sp-externalities", "sp-io", - "sp-panic-handler 3.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-panic-handler", "sp-runtime-interface", - "sp-tasks 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "lazy_static", - "libsecp256k1 0.6.0", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor-common 0.10.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sc-executor-wasmi 0.10.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler 3.0.0 (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sp-runtime-interface", - "sp-tasks 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sp-tasks", "sp-trie", "sp-version", "sp-wasm-interface", @@ -6490,28 +6434,10 @@ dependencies = [ "environmental", "parity-scale-codec", "pwasm-utils", - "sc-allocator 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-allocator", "sp-core", - "sp-maybe-compressed-blob 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sp-serializer 3.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sp-wasm-interface", - "thiserror", - "wasmi", -] - -[[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "derive_more", - "environmental", - "parity-scale-codec", - "pwasm-utils", - "sc-allocator 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sp-core", - "sp-maybe-compressed-blob 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sp-serializer 3.0.0 (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sp-maybe-compressed-blob", + "sp-serializer", "sp-wasm-interface", "thiserror", "wasmi", @@ -6524,24 +6450,8 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57 dependencies = [ "log", "parity-scale-codec", - "sc-allocator 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sc-executor-common 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "log", - "parity-scale-codec", - "sc-allocator 4.0.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", - "sc-executor-common 0.10.0-dev (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sc-allocator", + "sc-executor-common", "scoped-tls", "sp-core", "sp-runtime-interface", @@ -6559,8 +6469,8 @@ dependencies = [ "log", "parity-scale-codec", "parity-wasm 0.42.2", - "sc-allocator 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", - "sc-executor-common 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-allocator", + "sc-executor-common", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -6601,7 +6511,7 @@ dependencies = [ "sp-finality-grandpa", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6669,7 +6579,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.2", "sc-client-api", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sp-api", "sp-blockchain", "sp-core", @@ -6722,7 +6632,7 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", "void", @@ -6741,7 +6651,7 @@ dependencies = [ "lru", "sc-network", "sp-runtime", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "tracing", ] @@ -6791,7 +6701,7 @@ version = "0.9.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "log", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6863,7 +6773,7 @@ dependencies = [ "jsonrpc-ws-server", "log", "serde_json", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "tokio", ] @@ -6891,7 +6801,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sc-informant", "sc-keystore", "sc-light", @@ -6924,7 +6834,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "tempfile", "thiserror", "tokio", @@ -7049,14 +6959,14 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-transaction-pool", - "substrate-prometheus-endpoint 0.9.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "derive_more", "futures 0.3.17", @@ -7070,7 +6980,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7513,7 +7423,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "hash-db", "log", @@ -7530,7 +7440,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -7542,7 +7452,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -7555,7 +7465,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "integer-sqrt", "num-traits", @@ -7570,7 +7480,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -7592,22 +7502,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "sp-api", @@ -7619,7 +7517,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "futures 0.3.17", "log", @@ -7637,7 +7535,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "async-trait", "futures 0.3.17", @@ -7656,7 +7554,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "async-trait", "merlin", @@ -7679,7 +7577,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -7690,7 +7588,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7702,7 +7600,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "base58", "blake2-rfc", @@ -7747,7 +7645,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -7756,7 +7654,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "proc-macro2", "quote", @@ -7766,7 +7664,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "environmental", "parity-scale-codec", @@ -7777,7 +7675,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "finality-grandpa", "log", @@ -7795,7 +7693,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -7809,7 +7707,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "futures 0.3.17", "hash-db", @@ -7841,21 +7739,10 @@ dependencies = [ "strum", ] -[[package]] -name = "sp-keyring" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "lazy_static", - "sp-core", - "sp-runtime", - "strum", -] - [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "async-trait", "derive_more", @@ -7877,18 +7764,10 @@ dependencies = [ "zstd", ] -[[package]] -name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "zstd", -] - [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -7903,7 +7782,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -7914,7 +7793,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "sp-api", "sp-core", @@ -7929,14 +7808,6 @@ dependencies = [ "backtrace", ] -[[package]] -name = "sp-panic-handler" -version = "3.0.0" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "backtrace", -] - [[package]] name = "sp-rpc" version = "4.0.0-dev" @@ -7950,7 +7821,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "either", "hash256-std-hasher", @@ -7972,7 +7843,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7989,7 +7860,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -8007,19 +7878,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -8033,7 +7895,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "scale-info", @@ -8044,7 +7906,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "hash-db", "log", @@ -8055,7 +7917,7 @@ dependencies = [ "smallvec", "sp-core", "sp-externalities", - "sp-panic-handler 3.0.0 (git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371)", + "sp-panic-handler", "sp-std", "sp-trie", "thiserror", @@ -8067,12 +7929,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8095,23 +7957,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -8127,7 +7976,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "erased-serde", "log", @@ -8145,7 +7994,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "sp-api", "sp-runtime", @@ -8170,7 +8019,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "hash-db", "memory-db", @@ -8185,7 +8034,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8201,7 +8050,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8212,7 +8061,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11#57346f6b24875f8935280dba51fa8ab0a9ba1e39" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8359,20 +8208,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/chainx-org/substrate?rev=79f50470dadedec5c54461eea5ce7d468d054371#79f50470dadedec5c54461eea5ce7d468d054371" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] - [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" @@ -8381,7 +8216,7 @@ dependencies = [ "ansi_term 0.12.1", "build-helper", "cargo_metadata", - "sp-maybe-compressed-blob 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-maybe-compressed-blob", "tempfile", "toml", "walkdir", @@ -8825,7 +8660,7 @@ dependencies = [ "remote-externalities", "sc-chain-spec", "sc-cli", - "sc-executor 0.10.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sc-executor", "sc-service", "serde", "sp-core", @@ -9549,7 +9384,7 @@ dependencies = [ [[package]] name = "xp-assets-registrar" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "impl-trait-for-tuples", @@ -9562,7 +9397,7 @@ dependencies = [ [[package]] name = "xp-gateway-bitcoin" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "frame-support", @@ -9579,7 +9414,7 @@ dependencies = [ [[package]] name = "xp-gateway-common" -version = "4.0.0" +version = "4.1.0" dependencies = [ "bs58 0.3.1", "frame-support", @@ -9590,7 +9425,7 @@ dependencies = [ [[package]] name = "xp-genesis-builder" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "serde", @@ -9599,7 +9434,7 @@ dependencies = [ [[package]] name = "xp-io" -version = "4.0.0" +version = "4.1.0" dependencies = [ "hex", "parity-scale-codec", @@ -9610,7 +9445,7 @@ dependencies = [ [[package]] name = "xp-mining-common" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "sp-arithmetic", @@ -9619,7 +9454,7 @@ dependencies = [ [[package]] name = "xp-mining-staking" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "sp-runtime", @@ -9629,7 +9464,7 @@ dependencies = [ [[package]] name = "xp-protocol" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -9640,7 +9475,7 @@ dependencies = [ [[package]] name = "xp-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "hex", "jsonrpc-core", @@ -9650,7 +9485,7 @@ dependencies = [ [[package]] name = "xp-runtime" -version = "4.0.0" +version = "4.1.0" dependencies = [ "hex", "parity-scale-codec", @@ -9663,12 +9498,12 @@ dependencies = [ [[package]] name = "xpallet-assets" -version = "4.0.0" +version = "4.1.0" dependencies = [ "bitflags", "chainx-primitives", "env_logger 0.7.1", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "orml-traits", @@ -9687,10 +9522,10 @@ dependencies = [ [[package]] name = "xpallet-assets-registrar" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -9709,7 +9544,7 @@ dependencies = [ [[package]] name = "xpallet-assets-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9724,7 +9559,7 @@ dependencies = [ [[package]] name = "xpallet-assets-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -9735,11 +9570,11 @@ dependencies = [ [[package]] name = "xpallet-dex-spot" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "env_logger 0.7.1", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", @@ -9759,7 +9594,7 @@ dependencies = [ [[package]] name = "xpallet-dex-spot-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9775,7 +9610,7 @@ dependencies = [ [[package]] name = "xpallet-dex-spot-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -9785,11 +9620,11 @@ dependencies = [ [[package]] name = "xpallet-gateway-bitcoin" -version = "4.0.0" +version = "4.1.0" dependencies = [ "bs58 0.3.1", "chainx-primitives", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "hex", @@ -9806,7 +9641,7 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-keyring 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "sp-keyring", "sp-runtime", "sp-std", "xp-assets-registrar", @@ -9822,10 +9657,10 @@ dependencies = [ [[package]] name = "xpallet-gateway-common" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "hex", @@ -9853,7 +9688,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-common-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "hex", "jsonrpc-core", @@ -9869,7 +9704,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-common-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -9883,10 +9718,10 @@ dependencies = [ [[package]] name = "xpallet-gateway-records" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "orml-utilities", @@ -9907,7 +9742,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-records-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9923,7 +9758,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-records-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -9935,7 +9770,7 @@ dependencies = [ [[package]] name = "xpallet-genesis-builder" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "frame-support", @@ -9956,11 +9791,11 @@ dependencies = [ [[package]] name = "xpallet-mining-asset" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "env_logger 0.7.1", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", @@ -9985,7 +9820,7 @@ dependencies = [ [[package]] name = "xpallet-mining-asset-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10000,7 +9835,7 @@ dependencies = [ [[package]] name = "xpallet-mining-asset-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10011,11 +9846,11 @@ dependencies = [ [[package]] name = "xpallet-mining-staking" -version = "4.0.0" +version = "4.1.0" dependencies = [ "chainx-primitives", "env_logger 0.7.1", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.11)", + "frame-benchmarking", "frame-support", "frame-system", "micromath", @@ -10042,7 +9877,7 @@ dependencies = [ [[package]] name = "xpallet-mining-staking-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10057,7 +9892,7 @@ dependencies = [ [[package]] name = "xpallet-mining-staking-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -10067,7 +9902,7 @@ dependencies = [ [[package]] name = "xpallet-support" -version = "4.0.0" +version = "4.1.0" dependencies = [ "hex", "sp-std", @@ -10075,7 +9910,7 @@ dependencies = [ [[package]] name = "xpallet-system" -version = "4.0.0" +version = "4.1.0" dependencies = [ "frame-support", "frame-system", @@ -10089,7 +9924,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee" -version = "4.0.0" +version = "4.1.0" dependencies = [ "frame-support", "frame-system", @@ -10103,7 +9938,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee-rpc" -version = "4.0.0" +version = "4.1.0" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10121,7 +9956,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" dependencies = [ "parity-scale-codec", "sp-api", diff --git a/Cargo.toml b/Cargo.toml index 283d6c3ab..5e0b7b97d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" description = "Fully Decentralized Interchain Crypto Asset Management on Polkadot" @@ -11,73 +11,6 @@ cli = { package = "chainx-cli", path = "cli" } [target.'cfg(target_arch="x86_64")'.dependencies] cli = { package = "chainx-cli", path = "cli", features = ["wasmtime"] } -[patch."https://github.com/paritytech/substrate"] - -sp-api = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-application-crypto = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-arithmetic = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-authority-discovery = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-blockchain = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-block-builder = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-consensus = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-consensus-babe = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-consensus-slots = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-consensus-vrf = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-core = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-database = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-externalities = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-finality-grandpa = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-inherents = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-io = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-keystore = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-offchain = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-runtime = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-runtime-interface = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-session = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-staking = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-state-machine = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-std = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-storage = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-timestamp = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-tracing = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-transaction-pool = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-trie = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-version = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sp-wasm-interface = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } - -sc-client-api = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sc-transaction-pool-api = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -sc-utils = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } - - -frame-executive = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -frame-support = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -frame-system = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -frame-system-rpc-runtime-api = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } - -pallet-authorship = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-babe = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-balances = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-collective = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-democracy = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-elections-phragmen = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-grandpa = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-identity = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-im-online = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-indices = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-membership = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-multisig = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-offences = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-proxy = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-scheduler = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-session = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-sudo = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-timestamp = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-transaction-payment = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-treasury = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } -pallet-utility = { git = "https://github.com/chainx-org/substrate", rev = "79f50470dadedec5c54461eea5ce7d468d054371" } - [workspace] members = [ "cli", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0068a352b..c38f28c32 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-cli" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] description = "Implementation of protocol https://chainx.org in Rust based on the Substrate framework." edition = "2018" diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 33314e763..e8b827dbc 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-executor" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 40eba168b..d471d42dc 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-primitives" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/assets-registrar/Cargo.toml b/primitives/assets-registrar/Cargo.toml index 8ccec5a58..6ebf434fc 100644 --- a/primitives/assets-registrar/Cargo.toml +++ b/primitives/assets-registrar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-assets-registrar" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/gateway/bitcoin/Cargo.toml b/primitives/gateway/bitcoin/Cargo.toml index 3a8c00ce5..e6e901cf2 100644 --- a/primitives/gateway/bitcoin/Cargo.toml +++ b/primitives/gateway/bitcoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-gateway-bitcoin" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/gateway/common/Cargo.toml b/primitives/gateway/common/Cargo.toml index 36bc2ca8a..fc37dd1f0 100644 --- a/primitives/gateway/common/Cargo.toml +++ b/primitives/gateway/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-gateway-common" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/genesis-builder/Cargo.toml b/primitives/genesis-builder/Cargo.toml index e9fffed25..c0b775b86 100644 --- a/primitives/genesis-builder/Cargo.toml +++ b/primitives/genesis-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-genesis-builder" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index 930123bb6..c9c12f314 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-io" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/mining/common/Cargo.toml b/primitives/mining/common/Cargo.toml index f1cce8153..2f58783be 100644 --- a/primitives/mining/common/Cargo.toml +++ b/primitives/mining/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-mining-common" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/mining/staking/Cargo.toml b/primitives/mining/staking/Cargo.toml index f0bb389ee..6e4d033e1 100644 --- a/primitives/mining/staking/Cargo.toml +++ b/primitives/mining/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-mining-staking" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/protocol/Cargo.toml b/primitives/protocol/Cargo.toml index c8508d1a2..68fde4cb1 100644 --- a/primitives/protocol/Cargo.toml +++ b/primitives/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-protocol" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index a1d559b89..63a067755 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 030df31a2..3ab15385c 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-runtime" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 56ac656e6..2e686db81 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/runtime/chainx/Cargo.toml b/runtime/chainx/Cargo.toml index 554ccf269..6ab3cfee4 100644 --- a/runtime/chainx/Cargo.toml +++ b/runtime/chainx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-runtime" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/runtime/chainx/src/constants.rs b/runtime/chainx/src/constants.rs index 322239a1f..11d934022 100644 --- a/runtime/chainx/src/constants.rs +++ b/runtime/chainx/src/constants.rs @@ -32,3 +32,44 @@ pub mod time { // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); } + +/// Fee-related. +pub mod fee { + use frame_support::weights::{ + constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients, + WeightToFeePolynomial, + }; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + use chainx_primitives::Balance; + + /// The block saturation level. Fees will be updates based on this value. + pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); + + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the + /// node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, frame_system::MaximumBlockWeight] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = super::currency::CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } +} diff --git a/runtime/chainx/src/lib.rs b/runtime/chainx/src/lib.rs index 2b4393929..275f4d6c2 100644 --- a/runtime/chainx/src/lib.rs +++ b/runtime/chainx/src/lib.rs @@ -63,7 +63,7 @@ pub use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - IdentityFee, Weight, + Weight, }, StorageValue, }; @@ -103,14 +103,13 @@ mod migrations; use self::constants::{currency::*, time::*}; use self::impls::{ChargeExtraFee, DealWithFees, SlowAdjustingFeeUpdate}; -use self::migrations::*; /// This runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-net"), authoring_version: 1, - spec_version: 12, + spec_version: 13, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 3, @@ -417,7 +416,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; + type WeightToFee = self::constants::fee::WeightToFee; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; } @@ -1194,7 +1193,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPallets, - CustomOnRuntimeUpgrades, + (), >; impl_runtime_apis! { diff --git a/runtime/chainx/src/migrations.rs b/runtime/chainx/src/migrations.rs index f889dac7a..4e6be20ef 100644 --- a/runtime/chainx/src/migrations.rs +++ b/runtime/chainx/src/migrations.rs @@ -39,12 +39,12 @@ impl frame_support::traits::OnRuntimeUpgrade for PhragmenElectionDepositRuntimeU } } -pub struct SystemToTripleRefCount; -impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_system::migrations::migrate_from_unique_to_triple_ref_count::() - } -} +// pub struct SystemToTripleRefCount; +// impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { +// fn on_runtime_upgrade() -> frame_support::weights::Weight { +// frame_system::migrations::migrate_from_unique_to_triple_ref_count::() +// } +// } impl pallet_babe::migrations::BabePalletPrefix for Runtime { fn pallet_prefix() -> &'static str { @@ -249,10 +249,10 @@ impl OnRuntimeUpgrade for CustomOnRuntimeUpgrades { weight += ::on_runtime_upgrade(); frame_support::log::info!("🚀 PhragmenElectionDepositRuntimeUpgrade end"); - // 4. SystemToTripleRefCount - frame_support::log::info!("🔍️ SystemToTripleRefCount start"); - weight += ::on_runtime_upgrade(); - frame_support::log::info!("🚀 SystemToTripleRefCount end"); + // // 4. SystemToTripleRefCount + // frame_support::log::info!("🔍️ SystemToTripleRefCount start"); + // weight += ::on_runtime_upgrade(); + // frame_support::log::info!("🚀 SystemToTripleRefCount end"); // 5. BabeEpochConfigMigrations frame_support::log::info!("🔍️ BabeEpochConfigMigrations start"); diff --git a/runtime/dev/Cargo.toml b/runtime/dev/Cargo.toml index 3b872ddae..0dfe94fb7 100644 --- a/runtime/dev/Cargo.toml +++ b/runtime/dev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dev-runtime" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/runtime/dev/src/constants.rs b/runtime/dev/src/constants.rs index 322239a1f..11d934022 100644 --- a/runtime/dev/src/constants.rs +++ b/runtime/dev/src/constants.rs @@ -32,3 +32,44 @@ pub mod time { // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); } + +/// Fee-related. +pub mod fee { + use frame_support::weights::{ + constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients, + WeightToFeePolynomial, + }; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + use chainx_primitives::Balance; + + /// The block saturation level. Fees will be updates based on this value. + pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); + + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the + /// node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, frame_system::MaximumBlockWeight] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = super::currency::CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } +} diff --git a/runtime/dev/src/lib.rs b/runtime/dev/src/lib.rs index 941d8d366..0e4ca2808 100644 --- a/runtime/dev/src/lib.rs +++ b/runtime/dev/src/lib.rs @@ -63,7 +63,7 @@ pub use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - IdentityFee, Weight, + Weight, }, StorageValue, }; @@ -103,14 +103,13 @@ mod migrations; use self::constants::{currency::*, time::*}; use self::impls::{ChargeExtraFee, DealWithFees, SlowAdjustingFeeUpdate}; -use self::migrations::*; /// This runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-dev"), authoring_version: 1, - spec_version: 12, + spec_version: 13, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 3, @@ -417,7 +416,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; + type WeightToFee = self::constants::fee::WeightToFee; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; } @@ -1201,7 +1200,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPallets, - CustomOnRuntimeUpgrades, + (), >; impl_runtime_apis! { diff --git a/runtime/dev/src/migrations.rs b/runtime/dev/src/migrations.rs index f889dac7a..4e6be20ef 100644 --- a/runtime/dev/src/migrations.rs +++ b/runtime/dev/src/migrations.rs @@ -39,12 +39,12 @@ impl frame_support::traits::OnRuntimeUpgrade for PhragmenElectionDepositRuntimeU } } -pub struct SystemToTripleRefCount; -impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_system::migrations::migrate_from_unique_to_triple_ref_count::() - } -} +// pub struct SystemToTripleRefCount; +// impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { +// fn on_runtime_upgrade() -> frame_support::weights::Weight { +// frame_system::migrations::migrate_from_unique_to_triple_ref_count::() +// } +// } impl pallet_babe::migrations::BabePalletPrefix for Runtime { fn pallet_prefix() -> &'static str { @@ -249,10 +249,10 @@ impl OnRuntimeUpgrade for CustomOnRuntimeUpgrades { weight += ::on_runtime_upgrade(); frame_support::log::info!("🚀 PhragmenElectionDepositRuntimeUpgrade end"); - // 4. SystemToTripleRefCount - frame_support::log::info!("🔍️ SystemToTripleRefCount start"); - weight += ::on_runtime_upgrade(); - frame_support::log::info!("🚀 SystemToTripleRefCount end"); + // // 4. SystemToTripleRefCount + // frame_support::log::info!("🔍️ SystemToTripleRefCount start"); + // weight += ::on_runtime_upgrade(); + // frame_support::log::info!("🚀 SystemToTripleRefCount end"); // 5. BabeEpochConfigMigrations frame_support::log::info!("🔍️ BabeEpochConfigMigrations start"); diff --git a/runtime/malan/Cargo.toml b/runtime/malan/Cargo.toml index 014f59f94..b26cfedfc 100644 --- a/runtime/malan/Cargo.toml +++ b/runtime/malan/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "malan-runtime" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/runtime/malan/src/constants.rs b/runtime/malan/src/constants.rs index 322239a1f..11d934022 100644 --- a/runtime/malan/src/constants.rs +++ b/runtime/malan/src/constants.rs @@ -32,3 +32,44 @@ pub mod time { // 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); } + +/// Fee-related. +pub mod fee { + use frame_support::weights::{ + constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients, + WeightToFeePolynomial, + }; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + use chainx_primitives::Balance; + + /// The block saturation level. Fees will be updates based on this value. + pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); + + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the + /// node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, frame_system::MaximumBlockWeight] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = super::currency::CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } +} diff --git a/runtime/malan/src/lib.rs b/runtime/malan/src/lib.rs index f82b9f4e1..bcf8b635d 100644 --- a/runtime/malan/src/lib.rs +++ b/runtime/malan/src/lib.rs @@ -63,7 +63,7 @@ pub use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - IdentityFee, Weight, + Weight, }, StorageValue, }; @@ -103,14 +103,13 @@ mod migrations; use self::constants::{currency::*, time::*}; use self::impls::{ChargeExtraFee, DealWithFees, SlowAdjustingFeeUpdate}; -use self::migrations::*; /// This runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-malan"), authoring_version: 1, - spec_version: 12, + spec_version: 13, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 3, @@ -417,7 +416,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; + type WeightToFee = self::constants::fee::WeightToFee; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; } @@ -1201,7 +1200,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPallets, - CustomOnRuntimeUpgrades, + (), >; impl_runtime_apis! { diff --git a/runtime/malan/src/migrations.rs b/runtime/malan/src/migrations.rs index f889dac7a..4e6be20ef 100644 --- a/runtime/malan/src/migrations.rs +++ b/runtime/malan/src/migrations.rs @@ -39,12 +39,12 @@ impl frame_support::traits::OnRuntimeUpgrade for PhragmenElectionDepositRuntimeU } } -pub struct SystemToTripleRefCount; -impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_system::migrations::migrate_from_unique_to_triple_ref_count::() - } -} +// pub struct SystemToTripleRefCount; +// impl frame_support::traits::OnRuntimeUpgrade for SystemToTripleRefCount { +// fn on_runtime_upgrade() -> frame_support::weights::Weight { +// frame_system::migrations::migrate_from_unique_to_triple_ref_count::() +// } +// } impl pallet_babe::migrations::BabePalletPrefix for Runtime { fn pallet_prefix() -> &'static str { @@ -249,10 +249,10 @@ impl OnRuntimeUpgrade for CustomOnRuntimeUpgrades { weight += ::on_runtime_upgrade(); frame_support::log::info!("🚀 PhragmenElectionDepositRuntimeUpgrade end"); - // 4. SystemToTripleRefCount - frame_support::log::info!("🔍️ SystemToTripleRefCount start"); - weight += ::on_runtime_upgrade(); - frame_support::log::info!("🚀 SystemToTripleRefCount end"); + // // 4. SystemToTripleRefCount + // frame_support::log::info!("🔍️ SystemToTripleRefCount start"); + // weight += ::on_runtime_upgrade(); + // frame_support::log::info!("🚀 SystemToTripleRefCount end"); // 5. BabeEpochConfigMigrations frame_support::log::info!("🔍️ BabeEpochConfigMigrations start"); diff --git a/service/Cargo.toml b/service/Cargo.toml index bad3d2e98..5fb16554f 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-service" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/assets-registrar/Cargo.toml b/xpallets/assets-registrar/Cargo.toml index 7c4bcf122..7ba3ca27a 100644 --- a/xpallets/assets-registrar/Cargo.toml +++ b/xpallets/assets-registrar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-registrar" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/assets/Cargo.toml b/xpallets/assets/Cargo.toml index 6714cbb01..5fbf83670 100644 --- a/xpallets/assets/Cargo.toml +++ b/xpallets/assets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/assets/rpc/Cargo.toml b/xpallets/assets/rpc/Cargo.toml index 941304b78..8d6228543 100644 --- a/xpallets/assets/rpc/Cargo.toml +++ b/xpallets/assets/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/assets/rpc/runtime-api/Cargo.toml b/xpallets/assets/rpc/runtime-api/Cargo.toml index 5edfa819a..bd424859d 100644 --- a/xpallets/assets/rpc/runtime-api/Cargo.toml +++ b/xpallets/assets/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/dex/spot/Cargo.toml b/xpallets/dex/spot/Cargo.toml index 5353c2b41..5e06f96cb 100644 --- a/xpallets/dex/spot/Cargo.toml +++ b/xpallets/dex/spot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/dex/spot/rpc/Cargo.toml b/xpallets/dex/spot/rpc/Cargo.toml index 4675ac5b2..dcc2cca23 100644 --- a/xpallets/dex/spot/rpc/Cargo.toml +++ b/xpallets/dex/spot/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/dex/spot/rpc/runtime-api/Cargo.toml b/xpallets/dex/spot/rpc/runtime-api/Cargo.toml index 0ea4f5c70..665dd2d1c 100644 --- a/xpallets/dex/spot/rpc/runtime-api/Cargo.toml +++ b/xpallets/dex/spot/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/bitcoin/Cargo.toml b/xpallets/gateway/bitcoin/Cargo.toml index 96d47a023..59f742c13 100644 --- a/xpallets/gateway/bitcoin/Cargo.toml +++ b/xpallets/gateway/bitcoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-bitcoin" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/common/Cargo.toml b/xpallets/gateway/common/Cargo.toml index cc5395c08..4419d07b7 100644 --- a/xpallets/gateway/common/Cargo.toml +++ b/xpallets/gateway/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/common/rpc/Cargo.toml b/xpallets/gateway/common/rpc/Cargo.toml index 0225a3435..f13e27acd 100644 --- a/xpallets/gateway/common/rpc/Cargo.toml +++ b/xpallets/gateway/common/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/common/rpc/runtime-api/Cargo.toml b/xpallets/gateway/common/rpc/runtime-api/Cargo.toml index 2577a6dfc..f17094119 100644 --- a/xpallets/gateway/common/rpc/runtime-api/Cargo.toml +++ b/xpallets/gateway/common/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/records/Cargo.toml b/xpallets/gateway/records/Cargo.toml index 9d241c5d7..2afea9830 100644 --- a/xpallets/gateway/records/Cargo.toml +++ b/xpallets/gateway/records/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/records/rpc/Cargo.toml b/xpallets/gateway/records/rpc/Cargo.toml index af0d044a0..1a7a8aced 100644 --- a/xpallets/gateway/records/rpc/Cargo.toml +++ b/xpallets/gateway/records/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/gateway/records/rpc/runtime-api/Cargo.toml b/xpallets/gateway/records/rpc/runtime-api/Cargo.toml index 583c114ec..e6b3916b5 100644 --- a/xpallets/gateway/records/rpc/runtime-api/Cargo.toml +++ b/xpallets/gateway/records/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/genesis-builder/Cargo.toml b/xpallets/genesis-builder/Cargo.toml index a8697ec57..fa818645b 100644 --- a/xpallets/genesis-builder/Cargo.toml +++ b/xpallets/genesis-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-genesis-builder" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/asset/Cargo.toml b/xpallets/mining/asset/Cargo.toml index f781b5282..b66e87b2d 100644 --- a/xpallets/mining/asset/Cargo.toml +++ b/xpallets/mining/asset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/asset/rpc/Cargo.toml b/xpallets/mining/asset/rpc/Cargo.toml index a2c0728fe..8670336bd 100644 --- a/xpallets/mining/asset/rpc/Cargo.toml +++ b/xpallets/mining/asset/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/asset/rpc/runtime-api/Cargo.toml b/xpallets/mining/asset/rpc/runtime-api/Cargo.toml index 2a0b87849..d7a0f2c75 100644 --- a/xpallets/mining/asset/rpc/runtime-api/Cargo.toml +++ b/xpallets/mining/asset/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/staking/Cargo.toml b/xpallets/mining/staking/Cargo.toml index 4bef8fd56..6b53dbf22 100644 --- a/xpallets/mining/staking/Cargo.toml +++ b/xpallets/mining/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/staking/rpc/Cargo.toml b/xpallets/mining/staking/rpc/Cargo.toml index 4d57b035c..b633a109d 100644 --- a/xpallets/mining/staking/rpc/Cargo.toml +++ b/xpallets/mining/staking/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/mining/staking/rpc/runtime-api/Cargo.toml b/xpallets/mining/staking/rpc/runtime-api/Cargo.toml index 7cb0d096b..e95fa8d27 100644 --- a/xpallets/mining/staking/rpc/runtime-api/Cargo.toml +++ b/xpallets/mining/staking/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/support/Cargo.toml b/xpallets/support/Cargo.toml index 9db218d6a..c0c54fa9e 100644 --- a/xpallets/support/Cargo.toml +++ b/xpallets/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-support" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/system/Cargo.toml b/xpallets/system/Cargo.toml index f89bb9294..2789910a4 100644 --- a/xpallets/system/Cargo.toml +++ b/xpallets/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-system" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/transaction-fee/Cargo.toml b/xpallets/transaction-fee/Cargo.toml index 3eaf4f8ea..8d3a19d40 100644 --- a/xpallets/transaction-fee/Cargo.toml +++ b/xpallets/transaction-fee/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/transaction-fee/rpc/Cargo.toml b/xpallets/transaction-fee/rpc/Cargo.toml index 1c74357b3..8222d8d31 100644 --- a/xpallets/transaction-fee/rpc/Cargo.toml +++ b/xpallets/transaction-fee/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee-rpc" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018" diff --git a/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml b/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml index d49ed29ba..46e9ebaff 100644 --- a/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml +++ b/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee-rpc-runtime-api" -version = "4.0.0" +version = "4.1.0" authors = ["The ChainX Authors"] edition = "2018"