Upgrade evm-template to polkadot-stable2503 (#417)

* init 2503 upgrade for evm template need to upgrade frontier forks

* start upgrading frontier

* wip upgrading tanssi deps and synchronizing deps therein

* update tanssi wip

* fix dep tree for evm template and move onto resolving errors

* resolve 17 of 29 compilation errors 12 remaining most related to updating weight files

* resolve weight related compilation errors and evm abstraction and proc macro require updates

* impl DecodeWithMemTracking for custom origins 5 errors left requiring changes to astractions

* update evm abstraction runtime compiles

* node in progress frontier txpool requires more changes

* update txpool for node and node release compiles

* remove unused code commented out

* fix tanssi registrar benchmarking compilation

* fix pallet registrar benchmarks and unit tests

* update tanssi runtime apis to have benchmark features

* clean and fix some errors tests are recently requiring benchmark hidden impls oddly

* combine ci steps for running test and checking benchmark compilation to see if output changes

* update xcm core buyer 2412 dep to 2503 release ty @KitHat

* rm conditional compilation for runtime benchmarks inside a few declarative macro definitions

* apply clippy fix

* move runtime benchmarks declarations for referenda conviction voting and assets common into the runtime not sure why only those require explicit feature declaration

* break build but apply suggestions from @KitHat

* fix build

* fix toml sort

* fix tanssi build
This commit is contained in:
Amar Singh
2025-08-01 10:28:26 -04:00
committed by GitHub
parent 93d31c3ed5
commit 2bfcbf94d5
28 changed files with 3076 additions and 2978 deletions
+2582 -2622
View File
File diff suppressed because it is too large Load Diff
+145 -148
View File
@@ -27,180 +27,177 @@ serde_derive = { version = "1.0.121", default-features = false }
serde_json = "1.0.121" serde_json = "1.0.121"
smallvec = "1.11.0" smallvec = "1.11.0"
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# TODO: upgrade to release frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# Branches: frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } openzeppelin-pallet-abstractions = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } openzeppelin-pallet-abstractions-proc = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-stable2503", default-features = false }
frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-asset-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
openzeppelin-pallet-abstractions = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-branch-stable2412", default-features = false } pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
openzeppelin-pallet-abstractions-proc = { git = "https://github.com/OpenZeppelin/openzeppelin-pallet-abstractions", branch = "polkadot-branch-stable2412", default-features = false } pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-asset-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503" }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524" } substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524" }
# Polkadot # Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524" } xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# Cumulus # Cumulus
assets-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } assets-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "110d90bb85f866cc757287526022a66f3d576524", default-features = false } parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2503" }
# EVM # EVM
ethereum = { git = "https://github.com/rust-ethereum/ethereum", rev = "3be0d8fd4c2ad1ba216b69ef65b9382612efc8ba" } ethereum = { git = "https://github.com/rust-ethereum/ethereum", rev = "bbb544622208ef6e9890a2dbc224248f6dd13318" }
fc-api = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-api = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-consensus = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-consensus = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-db = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-db = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-mapping-sync = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-mapping-sync = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-rpc = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-rpc = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-rpc-core = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-rpc-core = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fc-storage = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fc-storage = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-account = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false, features = [ fp-account = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
"serde", "serde",
] } ] }
fp-dynamic-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fp-dynamic-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fp-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-rpc = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fp-rpc = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
fp-self-contained = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } fp-self-contained = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-base-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } pallet-base-fee = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-ethereum = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false, features = [ pallet-ethereum = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
"forbid-evm-reentrancy", "forbid-evm-reentrancy",
] } ] }
pallet-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false, features = [ pallet-evm = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false, features = [
"forbid-evm-reentrancy", "forbid-evm-reentrancy",
] } ] }
pallet-evm-chain-id = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } pallet-evm-chain-id = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } pallet-evm-precompile-modexp = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } pallet-evm-precompile-sha3fips = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-branch-stable2412", default-features = false } pallet-evm-precompile-simple = { git = "https://github.com/OpenZeppelin/frontier", branch = "polkadot-stable2503", default-features = false }
# ORML # ORML
orml-oracle = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-branch-stable2412", default-features = false } orml-oracle = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
orml-oracle-runtime-api = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-branch-stable2412", default-features = false } orml-oracle-runtime-api = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
orml-traits = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-branch-stable2412", default-features = false } orml-traits = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
orml-xcm-support = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-branch-stable2412", default-features = false } orml-xcm-support = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
orml-xtokens = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-branch-stable2412", default-features = false } orml-xtokens = { git = "https://github.com/OpenZeppelin/open-runtime-module-library", branch = "polkadot-stable2503", default-features = false }
# Moonbeam # Moonbeam
pallet-asset-manager = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2412", default-features = false } pallet-asset-manager = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-erc20-xcm-bridge = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2412", default-features = false } pallet-erc20-xcm-bridge = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-xcm-transactor = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2412", default-features = false } pallet-xcm-transactor = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
pallet-xcm-weight-trader = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2412", default-features = false } pallet-xcm-weight-trader = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
xcm-primitives = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2412", default-features = false } xcm-primitives = { git = "https://github.com/OpenZeppelin/moonbeam.git", branch = "polkadot-stable2503", default-features = false }
# Fuzzer # Fuzzer
substrate-runtimes-fuzzers = { git = "https://github.com/srlabs/substrate-runtime-fuzzer.git", default-features = false, tag = "polkadot-v1.12.0" } substrate-runtimes-fuzzers = { git = "https://github.com/srlabs/substrate-runtime-fuzzer.git", default-features = false, tag = "polkadot-v1.12.0" }
ziggy = { version = "0.8", default-features = false } ziggy = { version = "0.8", default-features = false }
# Moonkit # Moonkit
nimbus-consensus = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-branch-stable2412", default-features = false } nimbus-consensus = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
nimbus-primitives = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-branch-stable2412", default-features = false } nimbus-primitives = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
pallet-author-inherent = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-branch-stable2412", default-features = false } pallet-author-inherent = { git = "https://github.com/OpenZeppelin/moonkit", branch = "polkadot-stable2503", default-features = false }
# Dancekit # Dancekit
ccp-authorities-noting-inherent = { git = "https://github.com/OpenZeppelin/dancekit", rev = "37e9218e4039942a803fc8a1b7a76ed52aab5a3d", default-features = false } ccp-authorities-noting-inherent = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
dp-consensus = { git = "https://github.com/OpenZeppelin/dancekit", rev = "37e9218e4039942a803fc8a1b7a76ed52aab5a3d", default-features = false } dp-consensus = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
pallet-cc-authorities-noting = { git = "https://github.com/OpenZeppelin/dancekit", rev = "37e9218e4039942a803fc8a1b7a76ed52aab5a3d", default-features = false } pallet-cc-authorities-noting = { git = "https://github.com/OpenZeppelin/dancekit", branch = "polkadot-stable2503", default-features = false }
# Tanssi # Tanssi
tc-consensus = { git = "https://github.com/4meta5/tanssi", branch = "polkadot-branch-stable2412", default-features = false } tc-consensus = { git = "https://github.com/KitHat/tanssi", branch = "polkadot-stable2503", default-features = false }
# [patch."https://github.com/paritytech/polkadot-sdk"] # [patch."https://github.com/paritytech/polkadot-sdk"]
# Make pallet-migrations optional to avoid the error # Make pallet-migrations optional to avoid the error
+1 -1
View File
@@ -101,7 +101,7 @@ substrate-build-script-utils = { workspace = true }
[features] [features]
default = [] default = []
async-backing = [] async-backing = []
runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks" ] runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "tc-consensus/runtime-benchmarks" ]
tanssi = [] tanssi = []
try-runtime = [ try-runtime = [
"evm-runtime-template/try-runtime", "evm-runtime-template/try-runtime",
File diff suppressed because one or more lines are too long
+6 -8
View File
@@ -15,7 +15,6 @@ use sc_client_api::{
use sc_network::service::traits::NetworkService; use sc_network::service::traits::NetworkService;
use sc_network_sync::SyncingService; use sc_network_sync::SyncingService;
use sc_rpc::SubscriptionTaskExecutor; use sc_rpc::SubscriptionTaskExecutor;
use sc_transaction_pool::{ChainApi, Pool};
use sc_transaction_pool_api::TransactionPool; use sc_transaction_pool_api::TransactionPool;
use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_block_builder::BlockBuilder as BlockBuilderApi;
@@ -26,13 +25,13 @@ use sp_inherents::CreateInherentDataProviders;
use sp_runtime::traits::Block as BlockT; use sp_runtime::traits::Block as BlockT;
/// Extra dependencies for Ethereum compatibility. /// Extra dependencies for Ethereum compatibility.
pub struct EthDeps<B: BlockT, C, P, A: ChainApi, CT, CIDP> { pub struct EthDeps<B: BlockT, C, P, CT, CIDP> {
/// The client instance to use. /// The client instance to use.
pub client: Arc<C>, pub client: Arc<C>,
/// Transaction pool instance. /// Transaction pool instance.
pub pool: Arc<P>, pub pool: Arc<P>,
/// Graph pool instance. /// Graph pool instance.
pub graph: Arc<Pool<A>>, pub graph: Arc<P>,
/// Ethereum transaction converter. /// Ethereum transaction converter.
pub converter: Option<CT>, pub converter: Option<CT>,
/// The Node authority flag /// The Node authority flag
@@ -67,9 +66,9 @@ pub struct EthDeps<B: BlockT, C, P, A: ChainApi, CT, CIDP> {
} }
/// Instantiate Ethereum-compatible RPC extensions. /// Instantiate Ethereum-compatible RPC extensions.
pub fn create_eth<B, C, BE, P, A, CT, CIDP, EC>( pub fn create_eth<B, C, BE, P, CT, CIDP, EC>(
mut io: RpcModule<()>, mut io: RpcModule<()>,
deps: EthDeps<B, C, P, A, CT, CIDP>, deps: EthDeps<B, C, P, CT, CIDP>,
subscription_task_executor: SubscriptionTaskExecutor, subscription_task_executor: SubscriptionTaskExecutor,
pubsub_notification_sinks: Arc< pubsub_notification_sinks: Arc<
fc_mapping_sync::EthereumBlockNotificationSinks< fc_mapping_sync::EthereumBlockNotificationSinks<
@@ -87,8 +86,7 @@ where
C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError>, C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError>,
C: BlockchainEvents<B> + AuxStore + UsageProvider<B> + StorageProvider<B, BE> + 'static, C: BlockchainEvents<B> + AuxStore + UsageProvider<B> + StorageProvider<B, BE> + 'static,
BE: Backend<B> + 'static, BE: Backend<B> + 'static,
P: TransactionPool<Block = B> + 'static, P: TransactionPool<Block = B, Hash = B::Hash> + 'static,
A: ChainApi<Block = B> + 'static,
CT: ConvertTransaction<<B as BlockT>::Extrinsic> + Send + Sync + 'static, CT: ConvertTransaction<<B as BlockT>::Extrinsic> + Send + Sync + 'static,
CIDP: CreateInherentDataProviders<B, ()> + Send + 'static, CIDP: CreateInherentDataProviders<B, ()> + Send + 'static,
EC: EthConfig<B, C>, EC: EthConfig<B, C>,
@@ -128,7 +126,7 @@ where
} }
io.merge( io.merge(
Eth::<B, C, P, CT, BE, A, CIDP, EC>::new( Eth::<B, C, P, CT, BE, CIDP, EC>::new(
client.clone(), client.clone(),
pool.clone(), pool.clone(),
graph.clone(), graph.clone(),
+6 -8
View File
@@ -10,7 +10,6 @@ use std::sync::Arc;
use evm_runtime_template::{opaque::Block, AccountId, Balance, Nonce}; use evm_runtime_template::{opaque::Block, AccountId, Balance, Nonce};
use sc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider}; use sc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
use sc_rpc::SubscriptionTaskExecutor; use sc_rpc::SubscriptionTaskExecutor;
use sc_transaction_pool::ChainApi;
use sc_transaction_pool_api::TransactionPool; use sc_transaction_pool_api::TransactionPool;
use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder; use sp_block_builder::BlockBuilder;
@@ -26,13 +25,13 @@ use crate::rpc::eth::create_eth;
pub type RpcExtension = jsonrpsee::RpcModule<()>; pub type RpcExtension = jsonrpsee::RpcModule<()>;
/// Full client dependencies /// Full client dependencies
pub struct FullDeps<C, P, A: ChainApi, CT, CIDP> { pub struct FullDeps<C, P, CT, CIDP> {
/// The client instance to use. /// The client instance to use.
pub client: Arc<C>, pub client: Arc<C>,
/// Transaction pool instance. /// Transaction pool instance.
pub pool: Arc<P>, pub pool: Arc<P>,
/// Ethereum-compatibility specific dependencies. /// Ethereum-compatibility specific dependencies.
pub eth: EthDeps<Block, C, P, A, CT, CIDP>, pub eth: EthDeps<Block, C, P, CT, CIDP>,
} }
pub struct DefaultEthConfig<C, BE>(std::marker::PhantomData<(C, BE)>); pub struct DefaultEthConfig<C, BE>(std::marker::PhantomData<(C, BE)>);
@@ -48,8 +47,8 @@ where
} }
/// Instantiate all RPC extensions. /// Instantiate all RPC extensions.
pub fn create_full<C, P, A, CT, CIDP, BE>( pub fn create_full<C, P, CT, CIDP, BE>(
deps: FullDeps<C, P, A, CT, CIDP>, deps: FullDeps<C, P, CT, CIDP>,
subscription_task_executor: SubscriptionTaskExecutor, subscription_task_executor: SubscriptionTaskExecutor,
pubsub_notification_sinks: Arc< pubsub_notification_sinks: Arc<
fc_mapping_sync::EthereumBlockNotificationSinks< fc_mapping_sync::EthereumBlockNotificationSinks<
@@ -75,8 +74,7 @@ where
C::Api: BlockBuilder<Block>, C::Api: BlockBuilder<Block>,
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>, C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>, C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
P: TransactionPool<Block = Block> + Sync + Send + 'static, P: TransactionPool<Block = Block, Hash = sp_core::H256> + Sync + Send + 'static,
A: ChainApi<Block = Block> + 'static,
CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static, CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,
CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static, CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static,
BE: Backend<Block> + 'static, BE: Backend<Block> + 'static,
@@ -89,7 +87,7 @@ where
module.merge(System::new(client.clone(), pool).into_rpc())?; module.merge(System::new(client.clone(), pool).into_rpc())?;
module.merge(TransactionPayment::new(client).into_rpc())?; module.merge(TransactionPayment::new(client).into_rpc())?;
let module = create_eth::<_, _, _, _, _, _, _, DefaultEthConfig<C, BE>>( let module = create_eth::<_, _, _, _, _, _, DefaultEthConfig<C, BE>>(
module, module,
eth, eth,
subscription_task_executor, subscription_task_executor,
+4 -11
View File
@@ -297,7 +297,7 @@ async fn start_node_impl(
#[cfg(not(feature = "tanssi"))] #[cfg(not(feature = "tanssi"))]
let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = let (network, system_rpc_tx, tx_handler_controller, sync_service) =
build_network(BuildNetworkParams { build_network(BuildNetworkParams {
parachain_config: &parachain_config, parachain_config: &parachain_config,
net_config, net_config,
@@ -373,18 +373,11 @@ async fn start_node_impl(
let overrides = overrides.clone(); let overrides = overrides.clone();
let fee_history_cache = fee_history_cache.clone(); let fee_history_cache = fee_history_cache.clone();
let pubsub_notification_sinks = pubsub_notification_sinks.clone(); let pubsub_notification_sinks = pubsub_notification_sinks.clone();
let graph_api = Arc::new(sc_transaction_pool::FullChainApi::new(
client.clone(),
None,
&task_manager.spawn_essential_handle(),
));
let graph =
Arc::new(sc_transaction_pool::Pool::new(Default::default(), true.into(), graph_api));
Box::new(move |subscription_task_executor| { Box::new(move |subscription_task_executor| {
let eth = crate::rpc::EthDeps { let eth = crate::rpc::EthDeps {
client: client.clone(), client: client.clone(),
pool: pool.clone(), pool: pool.clone(),
graph: graph.clone(), graph: pool.clone(),
converter: Some(TransactionConverter), converter: Some(TransactionConverter),
is_authority: validator, is_authority: validator,
enable_dev_signer, enable_dev_signer,
@@ -521,8 +514,6 @@ async fn start_node_impl(
)?; )?;
} }
start_network.start_network();
Ok((task_manager, client)) Ok((task_manager, client))
} }
@@ -623,6 +614,8 @@ fn start_consensus(
collation_request_receiver: None, collation_request_receiver: None,
#[cfg(feature = "async-backing")] #[cfg(feature = "async-backing")]
reinitialize: false, reinitialize: false,
#[cfg(feature = "async-backing")]
max_pov_percentage: None,
}; };
#[cfg(not(feature = "async-backing"))] #[cfg(not(feature = "async-backing"))]
+2 -2
View File
@@ -77,11 +77,11 @@ assets-common = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-weight-reclaim = { workspace = true }
cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true }
cumulus-primitives-aura = { workspace = true } cumulus-primitives-aura = { workspace = true }
cumulus-primitives-core = { workspace = true } cumulus-primitives-core = { workspace = true }
cumulus-primitives-storage-weight-reclaim = { workspace = true }
cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-timestamp = { workspace = true }
cumulus-primitives-utility = { workspace = true } cumulus-primitives-utility = { workspace = true }
pallet-collator-selection = { workspace = true } pallet-collator-selection = { workspace = true }
@@ -138,11 +138,11 @@ std = [
"cumulus-pallet-aura-ext/std", "cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std", "cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std", "cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-weight-reclaim/std",
"cumulus-pallet-xcm/std", "cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std", "cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-aura/std", "cumulus-primitives-aura/std",
"cumulus-primitives-core/std", "cumulus-primitives-core/std",
"cumulus-primitives-storage-weight-reclaim/std",
"cumulus-primitives-utility/std", "cumulus-primitives-utility/std",
"dp-consensus/std", "dp-consensus/std",
"fp-account/std", "fp-account/std",
@@ -1,5 +1,5 @@
use frame_support::{dispatch::GetDispatchInfo, weights::Weight}; use frame_support::{dispatch::GetDispatchInfo, weights::Weight};
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo; use scale_info::TypeInfo;
use sp_core::{H160, H256}; use sp_core::{H160, H256};
use sp_runtime::traits::Hash as THash; use sp_runtime::traits::Hash as THash;
@@ -30,7 +30,9 @@ pallet_assets::runtime_benchmarks_enabled! {
} }
// Our AssetType. For now we only handle Xcm Assets // Our AssetType. For now we only handle Xcm Assets
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] #[derive(
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
)]
pub enum AssetType { pub enum AssetType {
Xcm(xcm::v4::Location), Xcm(xcm::v4::Location),
} }
@@ -92,7 +94,19 @@ impl From<AssetType> for AssetId {
} }
} }
#[derive(Clone, Default, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] #[derive(
Clone,
Default,
Eq,
Debug,
PartialEq,
Ord,
PartialOrd,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
)]
pub struct AssetRegistrarMetadata { pub struct AssetRegistrarMetadata {
pub name: Vec<u8>, pub name: Vec<u8>,
pub symbol: Vec<u8>, pub symbol: Vec<u8>,
@@ -14,7 +14,17 @@ pub mod pallet_custom_origins {
#[pallet::pallet] #[pallet::pallet]
pub struct Pallet<T>(_); pub struct Pallet<T>(_);
#[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] #[derive(
PartialEq,
Eq,
Clone,
MaxEncodedLen,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
RuntimeDebug,
)]
#[pallet::origin] #[pallet::origin]
pub enum Origin { pub enum Origin {
/// Origin for spending (any amount of) funds. /// Origin for spending (any amount of) funds.
@@ -1,5 +1,10 @@
//! Track configurations for governance. //! Track configurations for governance.
use alloc::borrow::Cow;
use pallet_referenda::Track;
use sp_runtime::str_array as s;
use super::*; use super::*;
use crate::constants::MINUTES; use crate::constants::MINUTES;
@@ -34,156 +39,155 @@ const APP_WHITELISTED_CALLER: Curve =
const SUP_WHITELISTED_CALLER: Curve = const SUP_WHITELISTED_CALLER: Curve =
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 10] = [
(
0,
pallet_referenda::TrackInfo {
name: "root",
max_deciding: 1,
decision_deposit: 100 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_ROOT,
min_support: SUP_ROOT,
},
),
(
1,
pallet_referenda::TrackInfo {
name: "whitelisted_caller",
max_deciding: 100,
decision_deposit: 10 * GRAND,
prepare_period: 6 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 4 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_WHITELISTED_CALLER,
min_support: SUP_WHITELISTED_CALLER,
},
),
(
11,
pallet_referenda::TrackInfo {
name: "treasurer",
max_deciding: 10,
decision_deposit: GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_TREASURER,
min_support: SUP_TREASURER,
},
),
(
20,
pallet_referenda::TrackInfo {
name: "referendum_canceller",
max_deciding: 1_000,
decision_deposit: 10 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_REFERENDUM_CANCELLER,
min_support: SUP_REFERENDUM_CANCELLER,
},
),
(
21,
pallet_referenda::TrackInfo {
name: "referendum_killer",
max_deciding: 1_000,
decision_deposit: 50 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_REFERENDUM_KILLER,
min_support: SUP_REFERENDUM_KILLER,
},
),
(
30,
pallet_referenda::TrackInfo {
name: "small_tipper",
max_deciding: 200,
decision_deposit: 3 * CENTS,
prepare_period: MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 4 * MINUTES,
min_enactment_period: MINUTES,
min_approval: APP_SMALL_TIPPER,
min_support: SUP_SMALL_TIPPER,
},
),
(
31,
pallet_referenda::TrackInfo {
name: "big_tipper",
max_deciding: 100,
decision_deposit: 10 * 3 * CENTS,
prepare_period: 4 * MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_BIG_TIPPER,
min_support: SUP_BIG_TIPPER,
},
),
(
32,
pallet_referenda::TrackInfo {
name: "small_spender",
max_deciding: 50,
decision_deposit: 100 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 10 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_SMALL_SPENDER,
min_support: SUP_SMALL_SPENDER,
},
),
(
33,
pallet_referenda::TrackInfo {
name: "medium_spender",
max_deciding: 50,
decision_deposit: 200 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_MEDIUM_SPENDER,
min_support: SUP_MEDIUM_SPENDER,
},
),
(
34,
pallet_referenda::TrackInfo {
name: "big_spender",
max_deciding: 50,
decision_deposit: 400 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 14 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_BIG_SPENDER,
min_support: SUP_BIG_SPENDER,
},
),
];
pub struct TracksInfo; pub struct TracksInfo;
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo { impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = u16; type Id = u16;
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin; type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] { fn tracks() -> impl Iterator<Item = Cow<'static, Track<Self::Id, Balance, BlockNumber>>> {
&TRACKS_DATA[..] static DATA: [Track<u16, Balance, BlockNumber>; 10] = [
Track {
id: 0u16,
info: pallet_referenda::TrackInfo {
name: s("root"),
max_deciding: 1,
decision_deposit: 100 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_ROOT,
min_support: SUP_ROOT,
},
},
Track {
id: 1u16,
info: pallet_referenda::TrackInfo {
name: s("whitelisted_caller"),
max_deciding: 100,
decision_deposit: 10 * GRAND,
prepare_period: 6 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 4 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_WHITELISTED_CALLER,
min_support: SUP_WHITELISTED_CALLER,
},
},
Track {
id: 11u16,
info: pallet_referenda::TrackInfo {
name: s("treasurer"),
max_deciding: 10,
decision_deposit: GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_TREASURER,
min_support: SUP_TREASURER,
},
},
Track {
id: 20u16,
info: pallet_referenda::TrackInfo {
name: s("referendum_canceller"),
max_deciding: 1_000,
decision_deposit: 10 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_REFERENDUM_CANCELLER,
min_support: SUP_REFERENDUM_CANCELLER,
},
},
Track {
id: 21u16,
info: pallet_referenda::TrackInfo {
name: s("referendum_killer"),
max_deciding: 1_000,
decision_deposit: 50 * GRAND,
prepare_period: 8 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 8 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_REFERENDUM_KILLER,
min_support: SUP_REFERENDUM_KILLER,
},
},
Track {
id: 30u16,
info: pallet_referenda::TrackInfo {
name: s("small_tipper"),
max_deciding: 200,
decision_deposit: 3 * CENTS,
prepare_period: MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 4 * MINUTES,
min_enactment_period: MINUTES,
min_approval: APP_SMALL_TIPPER,
min_support: SUP_SMALL_TIPPER,
},
},
Track {
id: 31u16,
info: pallet_referenda::TrackInfo {
name: s("big_tipper"),
max_deciding: 100,
decision_deposit: 10 * 3 * CENTS,
prepare_period: 4 * MINUTES,
decision_period: 14 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 3 * MINUTES,
min_approval: APP_BIG_TIPPER,
min_support: SUP_BIG_TIPPER,
},
},
Track {
id: 32u16,
info: pallet_referenda::TrackInfo {
name: s("small_spender"),
max_deciding: 50,
decision_deposit: 100 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 10 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_SMALL_SPENDER,
min_support: SUP_SMALL_SPENDER,
},
},
Track {
id: 33u16,
info: pallet_referenda::TrackInfo {
name: s("medium_spender"),
max_deciding: 50,
decision_deposit: 200 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 12 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_MEDIUM_SPENDER,
min_support: SUP_MEDIUM_SPENDER,
},
},
Track {
id: 34u16,
info: pallet_referenda::TrackInfo {
name: s("big_spender"),
max_deciding: 50,
decision_deposit: 400 * 3 * CENTS,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 14 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: APP_BIG_SPENDER,
min_support: SUP_BIG_SPENDER,
},
},
];
DATA.iter().map(Cow::Borrowed)
} }
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> { fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
@@ -211,7 +215,6 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
} }
} }
} }
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
+4 -2
View File
@@ -45,7 +45,9 @@ use openzeppelin_pallet_abstractions::{
use openzeppelin_pallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig, TanssiWeight}; use openzeppelin_pallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig, TanssiWeight};
use pallet_asset_tx_payment::HandleCredit; use pallet_asset_tx_payment::HandleCredit;
use pallet_ethereum::PostLogContent; use pallet_ethereum::PostLogContent;
use pallet_evm::{EVMCurrencyAdapter, EnsureAccountId20, IdentityAddressMapping}; use pallet_evm::{
EVMCurrencyAdapter, EnsureAccountId20, FrameSystemAccountProvider, IdentityAddressMapping,
};
use parachains_common::{ use parachains_common::{
impls::AccountIdOf, impls::AccountIdOf,
message_queue::{NarrowOriginToSibling, ParaIdToSibling}, message_queue::{NarrowOriginToSibling, ParaIdToSibling},
@@ -87,7 +89,7 @@ use crate::{
constants::{ constants::{
currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, MICROCENTS, MILLICENTS}, currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, MICROCENTS, MILLICENTS},
AVERAGE_ON_INITIALIZE_RATIO, DAYS, MAXIMUM_BLOCK_WEIGHT, MAX_BLOCK_LENGTH, AVERAGE_ON_INITIALIZE_RATIO, DAYS, MAXIMUM_BLOCK_WEIGHT, MAX_BLOCK_LENGTH,
NORMAL_DISPATCH_RATIO, SLOT_DURATION, WEIGHT_PER_GAS, NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION, WEIGHT_PER_GAS,
}, },
opaque, opaque,
types::{ types::{
@@ -8,7 +8,7 @@ use frame_support::{
use orml_traits::{location::Reserve, parameter_type_with_key}; use orml_traits::{location::Reserve, parameter_type_with_key};
use orml_xcm_support::MultiNativeAsset; use orml_xcm_support::MultiNativeAsset;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use polkadot_parachain_primitives::primitives::{self, Sibling}; use polkadot_parachain_primitives::primitives::{self, Sibling};
use scale_info::TypeInfo; use scale_info::TypeInfo;
use sp_core::H160; use sp_core::H160;
@@ -312,7 +312,9 @@ parameter_type_with_key! {
} }
// Our currencyId. We distinguish for now between SelfReserve, and Others, defined by their Id. // Our currencyId. We distinguish for now between SelfReserve, and Others, defined by their Id.
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] #[derive(
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
)]
pub enum CurrencyId { pub enum CurrencyId {
// Our native token // Our native token
SelfReserve, SelfReserve,
@@ -483,7 +485,9 @@ impl frame_support::traits::Contains<Location> for AssetFeesFilter {
// For now we only allow to transact in the relay, although this might change in the future // For now we only allow to transact in the relay, although this might change in the future
// Transactors just defines the chains in which we allow transactions to be issued through // Transactors just defines the chains in which we allow transactions to be issued through
// xcm // xcm
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] #[derive(
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
)]
pub enum Transactors { pub enum Transactors {
Relay, Relay,
} }
+2
View File
@@ -2,6 +2,8 @@
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"] #![recursion_limit = "256"]
extern crate alloc;
// Make the WASM binary available. // Make the WASM binary available.
#[cfg(feature = "std")] #[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+18 -15
View File
@@ -6,7 +6,7 @@ use frame_support::{parameter_types, traits::InstanceFilter, weights::Weight, Pa
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
#[cfg(not(feature = "tanssi"))] #[cfg(not(feature = "tanssi"))]
use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use polkadot_runtime_common::impls::{ use polkadot_runtime_common::impls::{
LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
}; };
@@ -42,7 +42,7 @@ pub use crate::{
/// Unchecked extrinsic type as expected by this runtime. /// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = pub type UncheckedExtrinsic =
fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
/// Ethereum Signature /// Ethereum Signature
pub type Signature = EthereumSignature; pub type Signature = EthereumSignature;
@@ -74,19 +74,21 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// Block type as expected by this runtime. /// Block type as expected by this runtime.
pub type Block = generic::Block<Header, UncheckedExtrinsic>; pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// The SignedExtension to the basic transaction logic. /// The TransactionExtension to the basic transaction logic.
pub type SignedExtra = ( pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
frame_system::CheckNonZeroSender<Runtime>, Runtime,
frame_system::CheckSpecVersion<Runtime>, (
frame_system::CheckTxVersion<Runtime>, frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckGenesis<Runtime>, frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckEra<Runtime>, frame_system::CheckTxVersion<Runtime>,
frame_system::CheckNonce<Runtime>, frame_system::CheckGenesis<Runtime>,
frame_system::CheckWeight<Runtime>, frame_system::CheckEra<Runtime>,
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>, frame_system::CheckNonce<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>, frame_system::CheckWeight<Runtime>,
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim<Runtime>, pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
); frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
),
>;
/// Executive: handles dispatch to the various modules. /// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive< pub type Executive = frame_executive::Executive<
@@ -144,6 +146,7 @@ pub type TreasuryPaymaster = PayOverXcm<
Copy, Copy,
Clone, Clone,
Decode, Decode,
DecodeWithMemTracking,
Default, Default,
Encode, Encode,
Eq, Eq,
@@ -53,8 +53,31 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1) /// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn enqueue_xcmp_message() -> Weight { /// The range of component `n` is `[1, 105467]`.
fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `5487`
// Minimum execution time: 12_977_000 picoseconds.
Weight::from_parts(9_165_318, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 6
.saturating_add(Weight::from_parts(943, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn enqueue_2_empty_xcmp_messages() -> Weight {
// Proof Size summary in bytes: // Proof Size summary in bytes:
// Measured: `82` // Measured: `82`
// Estimated: `5487` // Estimated: `5487`
@@ -109,6 +109,20 @@ impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T>
.saturating_add(Weight::from_parts(0, 0)) .saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes(2))
} }
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
fn set_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `198`
// Estimated: `3517`
// Minimum execution time: 7_257_000 picoseconds.
Weight::from_parts(7_582_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1) /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0) /// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
@@ -144,4 +144,19 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes(1))
} }
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn poke_deposit(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `487 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 29_451_000 picoseconds.
Weight::from_parts(31_338_818, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_549
.saturating_add(Weight::from_parts(147_032, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
} }
@@ -205,4 +205,20 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes(1))
} }
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
fn poke_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `487`
// Estimated: `5698`
// Minimum execution time: 47_219_000 picoseconds.
Weight::from_parts(48_694_000, 0)
.saturating_add(Weight::from_parts(0, 5698))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
} }
@@ -81,4 +81,20 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
// Standard Error: 3_876 // Standard Error: 3_876
.saturating_add(Weight::from_parts(4_814_960, 0).saturating_mul(c.into())) .saturating_add(Weight::from_parts(4_814_960, 0).saturating_mul(c.into()))
} }
fn dispatch_as_fallible() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_848_000 picoseconds.
Weight::from_parts(7_202_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn if_else() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_510_000 picoseconds.
Weight::from_parts(8_903_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
} }
@@ -32,6 +32,28 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`. /// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>); pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> { impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
// Estimated: `3963`
// Minimum execution time: 19_789_000 picoseconds.
Weight::from_parts(20_317_000, 3963)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `4002`
// Minimum execution time: 20_805_000 picoseconds.
Weight::from_parts(21_481_000, 4002)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
@@ -86,6 +86,7 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
(PARA_ALICE.into(), INITIAL_BALANCE), (PARA_ALICE.into(), INITIAL_BALANCE),
(parent_account_id(), INITIAL_BALANCE), (parent_account_id(), INITIAL_BALANCE),
], ],
..Default::default()
} }
.assimilate_storage(&mut t) .assimilate_storage(&mut t)
.unwrap(); .unwrap();
@@ -110,6 +111,7 @@ pub fn relay_ext() -> sp_io::TestExternalities {
(child_account_id(1), INITIAL_BALANCE), (child_account_id(1), INITIAL_BALANCE),
(child_account_id(2), INITIAL_BALANCE), (child_account_id(2), INITIAL_BALANCE),
], ],
..Default::default()
} }
.assimilate_storage(&mut t) .assimilate_storage(&mut t)
.unwrap(); .unwrap();
@@ -4,7 +4,7 @@ use core::marker::PhantomData;
use evm_runtime_template::configs::xcm_config::SignedToAccountId20; use evm_runtime_template::configs::xcm_config::SignedToAccountId20;
use frame_support::{ use frame_support::{
construct_runtime, derive_impl, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{ConstU128, ContainsPair, Everything, Nothing}, traits::{ConstU128, ContainsPair, Disabled, Everything, Nothing},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
}; };
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
@@ -68,6 +68,8 @@ pub type TrustedLockers = TrustedLockerCase<RelayTokenForRelay>;
impl pallet_xcm::Config for Runtime { impl pallet_xcm::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>; type AdminOrigin = EnsureRoot<AccountId>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
// Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`.
type AuthorizedAliasConsideration = Disabled;
type Currency = Balances; type Currency = Balances;
type CurrencyMatcher = (); type CurrencyMatcher = ();
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>; type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
@@ -42,6 +42,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalAliases = Nothing; type UniversalAliases = Nothing;
type UniversalLocation = constants::UniversalLocation; type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher; type Weigher = weigher::Weigher;
type XcmEventEmitter = PolkadotXcm;
type XcmRecorder = PolkadotXcm; type XcmRecorder = PolkadotXcm;
type XcmSender = XcmRouter; type XcmSender = XcmRouter;
} }
@@ -1,7 +1,7 @@
mod xcm_config; mod xcm_config;
use frame_support::{ use frame_support::{
construct_runtime, derive_impl, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{ConstU128, Everything, Nothing, ProcessMessage, ProcessMessageError}, traits::{ConstU128, Disabled, Everything, Nothing, ProcessMessage, ProcessMessageError},
weights::{Weight, WeightMeter}, weights::{Weight, WeightMeter},
}; };
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
@@ -53,6 +53,8 @@ pub type LocalOriginToLocation =
impl pallet_xcm::Config for Runtime { impl pallet_xcm::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>; type AdminOrigin = EnsureRoot<AccountId>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
// Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`.
type AuthorizedAliasConsideration = Disabled;
type Currency = Balances; type Currency = Balances;
type CurrencyMatcher = IsConcrete<constants::TokenLocation>; type CurrencyMatcher = IsConcrete<constants::TokenLocation>;
// Anyone can execute XCM messages locally... // Anyone can execute XCM messages locally...
@@ -43,6 +43,7 @@ impl Config for XcmConfig {
type UniversalAliases = Nothing; type UniversalAliases = Nothing;
type UniversalLocation = constants::UniversalLocation; type UniversalLocation = constants::UniversalLocation;
type Weigher = weigher::Weigher; type Weigher = weigher::Weigher;
type XcmEventEmitter = XcmPallet;
type XcmRecorder = XcmPallet; type XcmRecorder = XcmPallet;
type XcmSender = XcmRouter; type XcmSender = XcmRouter;
} }
+1 -1
View File
@@ -1,4 +1,4 @@
[toolchain] [toolchain]
channel = "nightly-2024-06-12" channel = "nightly-2025-02-20"
targets = ["wasm32-unknown-unknown"] targets = ["wasm32-unknown-unknown"]
components = ["rustfmt", "clippy", "rust-src"] components = ["rustfmt", "clippy", "rust-src"]
+2 -2
View File
@@ -50,7 +50,7 @@ fn generate_genesis(accounts: &[AccountId]) -> Storage {
RuntimeGenesisConfig { RuntimeGenesisConfig {
system: Default::default(), system: Default::default(),
balances: BalancesConfig { balances }, balances: BalancesConfig { balances, ..Default::default() },
#[cfg(not(feature = "tanssi"))] #[cfg(not(feature = "tanssi"))]
session: SessionConfig { keys: session_keys, non_authority_keys: vec![] }, session: SessionConfig { keys: session_keys, non_authority_keys: vec![] },
#[cfg(not(feature = "tanssi"))] #[cfg(not(feature = "tanssi"))]
@@ -230,7 +230,7 @@ fn recursive_call_filter(call: &RuntimeCall, origin: usize) -> bool {
pallet_utility::Call::force_batch { calls } pallet_utility::Call::force_batch { calls }
| pallet_utility::Call::batch { calls } | pallet_utility::Call::batch { calls }
| pallet_utility::Call::batch_all { calls }, | pallet_utility::Call::batch_all { calls },
) => calls.iter().map(|call| recursive_call_filter(call, origin)).all(|e| e), ) => calls.iter().all(|call| recursive_call_filter(call, origin)),
RuntimeCall::Scheduler( RuntimeCall::Scheduler(
pallet_scheduler::Call::schedule_named_after { pallet_scheduler::Call::schedule_named_after {
id: _, id: _,