Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] AHM: Pallet migration controller #496

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
953 changes: 308 additions & 645 deletions Cargo.lock

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repository = "https://github.com/polkadot-fellows/runtimes.git"
license = "GPL-3.0-only" # TODO <https://github.com/polkadot-fellows/runtimes/issues/29>

[workspace.dependencies]
pallet-ahm-controller = { path = "ahm-controller", default-features = false }
assert_matches = { version = "1.5.0" }
asset-hub-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/assets/asset-hub-kusama" }
asset-hub-kusama-runtime = { path = "system-parachains/asset-hubs/asset-hub-kusama" }
Expand Down Expand Up @@ -254,6 +255,7 @@ ss58-registry = { version = "1.47.0" }
resolver = "2"

members = [
"ahm-controller",
"chain-spec-generator",
"integration-tests/emulated/chains/parachains/assets/asset-hub-kusama",
"integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot",
Expand Down Expand Up @@ -314,3 +316,205 @@ opt-level = 3
inherits = "release"
lto = true
codegen-units = 1

[profile.testnet]
inherits = "release"
debug = 1 # debug symbols are useful for profilers
debug-assertions = true
overflow-checks = true

[patch.crates-io]
assert_matches = { path = "../vendor/assert_matches" }
asset-test-utils = { path = "../vendor/asset-test-utils" }
assets-common = { path = "../vendor/assets-common" }
binary-merkle-tree = { path = "../vendor/binary-merkle-tree" }
bp-bridge-hub-cumulus = { path = "../vendor/bp-bridge-hub-cumulus" }
bp-header-chain = { path = "../vendor/bp-header-chain" }
bp-kusama = { path = "../vendor/bp-kusama" }
bp-messages = { path = "../vendor/bp-messages" }
bp-parachains = { path = "../vendor/bp-parachains" }
bp-polkadot = { path = "../vendor/bp-polkadot" }
bp-polkadot-bulletin = { path = "../vendor/bp-polkadot-bulletin" }
bp-polkadot-core = { path = "../vendor/bp-polkadot-core" }
bp-relayers = { path = "../vendor/bp-relayers" }
bp-runtime = { path = "../vendor/bp-runtime" }
bp-xcm-bridge-hub-router = { path = "../vendor/bp-xcm-bridge-hub-router" }
bridge-hub-common = { path = "../vendor/bridge-hub-common" }
bridge-hub-test-utils = { path = "../vendor/bridge-hub-test-utils" }
bridge-runtime-common = { path = "../vendor/bridge-runtime-common" }
clap = { path = "../vendor/clap" }
cumulus-pallet-aura-ext = { path = "../vendor/cumulus-pallet-aura-ext" }
cumulus-pallet-parachain-system = { path = "../vendor/cumulus-pallet-parachain-system" }
cumulus-pallet-session-benchmarking = { path = "../vendor/cumulus-pallet-session-benchmarking" }
cumulus-pallet-xcm = { path = "../vendor/cumulus-pallet-xcm" }
cumulus-pallet-xcmp-queue = { path = "../vendor/cumulus-pallet-xcmp-queue" }
cumulus-primitives-aura = { path = "../vendor/cumulus-primitives-aura" }
cumulus-primitives-core = { path = "../vendor/cumulus-primitives-core" }
cumulus-primitives-utility = { path = "../vendor/cumulus-primitives-utility" }
emulated-integration-tests-common = { path = "../vendor/emulated-integration-tests-common" }
encointer-balances-tx-payment = { path = "../vendor/encointer-balances-tx-payment" }
encointer-balances-tx-payment-rpc-runtime-api = { path = "../vendor/encointer-balances-tx-payment-rpc-runtime-api" }
encointer-primitives = { path = "../vendor/encointer-primitives" }
enumflags2 = { path = "../vendor/enumflags2" }
frame-benchmarking = { path = "../vendor/frame-benchmarking" }
frame-election-provider-support = { path = "../vendor/frame-election-provider-support" }
frame-executive = { path = "../vendor/frame-executive" }
frame-support = { path = "../vendor/frame-support" }
frame-system = { path = "../vendor/frame-system" }
frame-system-benchmarking = { path = "../vendor/frame-system-benchmarking" }
frame-system-rpc-runtime-api = { path = "../vendor/frame-system-rpc-runtime-api" }
frame-try-runtime = { path = "../vendor/frame-try-runtime" }
hex-literal = { path = "../vendor/hex-literal" }
log = { path = "../vendor/log" }
pallet-alliance = { path = "../vendor/pallet-alliance" }
pallet-asset-conversion = { path = "../vendor/pallet-asset-conversion" }
pallet-asset-conversion-tx-payment = { path = "../vendor/pallet-asset-conversion-tx-payment" }
pallet-asset-rate = { path = "../vendor/pallet-asset-rate" }
pallet-asset-tx-payment = { path = "../vendor/pallet-asset-tx-payment" }
pallet-assets = { path = "../vendor/pallet-assets" }
pallet-aura = { path = "../vendor/pallet-aura" }
pallet-authority-discovery = { path = "../vendor/pallet-authority-discovery" }
pallet-authorship = { path = "../vendor/pallet-authorship" }
pallet-babe = { path = "../vendor/pallet-babe" }
pallet-bags-list = { path = "../vendor/pallet-bags-list" }
pallet-balances = { path = "../vendor/pallet-balances" }
pallet-beefy = { path = "../vendor/pallet-beefy" }
pallet-beefy-mmr = { path = "../vendor/pallet-beefy-mmr" }
pallet-bounties = { path = "../vendor/pallet-bounties" }
pallet-bridge-grandpa = { path = "../vendor/pallet-bridge-grandpa" }
pallet-bridge-messages = { path = "../vendor/pallet-bridge-messages" }
pallet-bridge-parachains = { path = "../vendor/pallet-bridge-parachains" }
pallet-bridge-relayers = { path = "../vendor/pallet-bridge-relayers" }
pallet-broker = { path = "../vendor/pallet-broker" }
pallet-child-bounties = { path = "../vendor/pallet-child-bounties" }
pallet-collator-selection = { path = "../vendor/pallet-collator-selection" }
pallet-collective = { path = "../vendor/pallet-collective" }
pallet-conviction-voting = { path = "../vendor/pallet-conviction-voting" }
pallet-core-fellowship = { path = "../vendor/pallet-core-fellowship" }
pallet-election-provider-multi-phase = { path = "../vendor/pallet-election-provider-multi-phase" }
pallet-election-provider-support-benchmarking = { path = "../vendor/pallet-election-provider-support-benchmarking" }
pallet-encointer-balances = { path = "../vendor/pallet-encointer-balances" }
pallet-encointer-bazaar = { path = "../vendor/pallet-encointer-bazaar" }
pallet-encointer-bazaar-rpc-runtime-api = { path = "../vendor/pallet-encointer-bazaar-rpc-runtime-api" }
pallet-encointer-ceremonies = { path = "../vendor/pallet-encointer-ceremonies" }
pallet-encointer-ceremonies-rpc-runtime-api = { path = "../vendor/pallet-encointer-ceremonies-rpc-runtime-api" }
pallet-encointer-communities = { path = "../vendor/pallet-encointer-communities" }
pallet-encointer-communities-rpc-runtime-api = { path = "../vendor/pallet-encointer-communities-rpc-runtime-api" }
pallet-encointer-democracy = { path = "../vendor/pallet-encointer-democracy" }
pallet-encointer-faucet = { path = "../vendor/pallet-encointer-faucet" }
pallet-encointer-reputation-commitments = { path = "../vendor/pallet-encointer-reputation-commitments" }
pallet-encointer-scheduler = { path = "../vendor/pallet-encointer-scheduler" }
pallet-encointer-treasuries = { path = "../vendor/pallet-encointer-treasuries" }
pallet-encointer-treasuries-rpc-runtime-api = { path = "../vendor/pallet-encointer-treasuries-rpc-runtime-api" }
pallet-fast-unstake = { path = "../vendor/pallet-fast-unstake" }
pallet-glutton = { path = "../vendor/pallet-glutton" }
pallet-grandpa = { path = "../vendor/pallet-grandpa" }
pallet-identity = { path = "../vendor/pallet-identity" }
pallet-im-online = { path = "../vendor/pallet-im-online" }
pallet-indices = { path = "../vendor/pallet-indices" }
pallet-insecure-randomness-collective-flip = { path = "../vendor/pallet-insecure-randomness-collective-flip" }
pallet-membership = { path = "../vendor/pallet-membership" }
pallet-message-queue = { path = "../vendor/pallet-message-queue" }
pallet-mmr = { path = "../vendor/pallet-mmr" }
pallet-multisig = { path = "../vendor/pallet-multisig" }
pallet-nft-fractionalization = { path = "../vendor/pallet-nft-fractionalization" }
pallet-nfts = { path = "../vendor/pallet-nfts" }
pallet-nfts-runtime-api = { path = "../vendor/pallet-nfts-runtime-api" }
pallet-nis = { path = "../vendor/pallet-nis" }
pallet-nomination-pools = { path = "../vendor/pallet-nomination-pools" }
pallet-nomination-pools-benchmarking = { path = "../vendor/pallet-nomination-pools-benchmarking" }
pallet-nomination-pools-runtime-api = { path = "../vendor/pallet-nomination-pools-runtime-api" }
pallet-offences = { path = "../vendor/pallet-offences" }
pallet-offences-benchmarking = { path = "../vendor/pallet-offences-benchmarking" }
pallet-parameters = { path = "../vendor/pallet-parameters" }
pallet-preimage = { path = "../vendor/pallet-preimage" }
pallet-proxy = { path = "../vendor/pallet-proxy" }
pallet-ranked-collective = { path = "../vendor/pallet-ranked-collective" }
pallet-recovery = { path = "../vendor/pallet-recovery" }
pallet-referenda = { path = "../vendor/pallet-referenda" }
pallet-salary = { path = "../vendor/pallet-salary" }
pallet-scheduler = { path = "../vendor/pallet-scheduler" }
pallet-session = { path = "../vendor/pallet-session" }
pallet-session-benchmarking = { path = "../vendor/pallet-session-benchmarking" }
pallet-society = { path = "../vendor/pallet-society" }
pallet-staking = { path = "../vendor/pallet-staking" }
pallet-staking-reward-curve = { path = "../vendor/pallet-staking-reward-curve" }
pallet-staking-reward-fn = { path = "../vendor/pallet-staking-reward-fn" }
pallet-staking-runtime-api = { path = "../vendor/pallet-staking-runtime-api" }
pallet-state-trie-migration = { path = "../vendor/pallet-state-trie-migration" }
pallet-sudo = { path = "../vendor/pallet-sudo" }
pallet-timestamp = { path = "../vendor/pallet-timestamp" }
pallet-transaction-payment = { path = "../vendor/pallet-transaction-payment" }
pallet-transaction-payment-rpc-runtime-api = { path = "../vendor/pallet-transaction-payment-rpc-runtime-api" }
pallet-treasury = { path = "../vendor/pallet-treasury" }
pallet-uniques = { path = "../vendor/pallet-uniques" }
pallet-utility = { path = "../vendor/pallet-utility" }
pallet-vesting = { path = "../vendor/pallet-vesting" }
pallet-whitelist = { path = "../vendor/pallet-whitelist" }
pallet-xcm = { path = "../vendor/pallet-xcm" }
pallet-xcm-benchmarks = { path = "../vendor/pallet-xcm-benchmarks" }
pallet-xcm-bridge-hub = { path = "../vendor/pallet-xcm-bridge-hub" }
pallet-xcm-bridge-hub-router = { path = "../vendor/pallet-xcm-bridge-hub-router" }
parachains-common = { path = "../vendor/parachains-common" }
parachains-runtimes-test-utils = { path = "../vendor/parachains-runtimes-test-utils" }
paste = { path = "../vendor/paste" }
penpal-runtime = { path = "../vendor/penpal-runtime" }
polkadot-core-primitives = { path = "../vendor/polkadot-core-primitives" }
polkadot-parachain-primitives = { path = "../vendor/polkadot-parachain-primitives" }
polkadot-primitives = { path = "../vendor/polkadot-primitives" }
polkadot-runtime-common = { path = "../vendor/polkadot-runtime-common" }
primitive-types = { path = "../vendor/primitive-types" }
frame-metadata-hash-extension = { path = "../vendor/frame-metadata-hash-extension" }
sc-chain-spec = { path = "../vendor/sc-chain-spec" }
sc-network = { path = "../vendor/sc-network" }
scale-info = { path = "../vendor/scale-info" }
separator = { path = "../vendor/separator" }
serde = { path = "../vendor/serde" }
serde_json = { path = "../vendor/serde_json" }
smallvec = { path = "../vendor/smallvec" }
snowbridge-beacon-primitives = { path = "../vendor/snowbridge-beacon-primitives" }
snowbridge-core = { path = "../vendor/snowbridge-core" }
snowbridge-outbound-queue-runtime-api = { path = "../vendor/snowbridge-outbound-queue-runtime-api" }
snowbridge-pallet-ethereum-client = { path = "../vendor/snowbridge-pallet-ethereum-client" }
snowbridge-pallet-inbound-queue = { path = "../vendor/snowbridge-pallet-inbound-queue" }
snowbridge-pallet-inbound-queue-fixtures = { path = "../vendor/snowbridge-pallet-inbound-queue-fixtures" }
snowbridge-pallet-outbound-queue = { path = "../vendor/snowbridge-pallet-outbound-queue" }
snowbridge-pallet-system = { path = "../vendor/snowbridge-pallet-system" }
snowbridge-router-primitives = { path = "../vendor/snowbridge-router-primitives" }
snowbridge-runtime-common = { path = "../vendor/snowbridge-runtime-common" }
snowbridge-runtime-test-common = { path = "../vendor/snowbridge-runtime-test-common" }
snowbridge-system-runtime-api = { path = "../vendor/snowbridge-system-runtime-api" }
sp-api = { path = "../vendor/sp-api" }
sp-application-crypto = { path = "../vendor/sp-application-crypto" }
sp-arithmetic = { path = "../vendor/sp-arithmetic" }
sp-block-builder = { path = "../vendor/sp-block-builder" }
sp-consensus-aura = { path = "../vendor/sp-consensus-aura" }
sp-core = { path = "../vendor/sp-core-31.0.0" }
sp-debug-derive = { path = "../vendor/sp-debug-derive" }
sp-genesis-builder = { path = "../vendor/sp-genesis-builder" }
sp-inherents = { path = "../vendor/sp-inherents" }
sp-io = { path = "../vendor/sp-io-33.0.0" }
sp-keyring = { path = "../vendor/sp-keyring" }
sp-npos-elections = { path = "../vendor/sp-npos-elections" }
sp-offchain = { path = "../vendor/sp-offchain" }
sp-runtime = { path = "../vendor/sp-runtime" }
sp-session = { path = "../vendor/sp-session" }
sp-staking = { path = "../vendor/sp-staking" }
sp-std = { path = "../vendor/sp-std" }
sp-storage = { path = "../vendor/sp-storage" }
sp-tracing = { path = "../vendor/sp-tracing-16.0.0" }
sp-transaction-pool = { path = "../vendor/sp-transaction-pool" }
sp-trie = { path = "../vendor/sp-trie-32.0.0" }
sp-version = { path = "../vendor/sp-version" }
sp-weights = { path = "../vendor/sp-weights-30.0.0" }
static_assertions = { path = "../vendor/static_assertions" }
substrate-wasm-builder = { path = "../vendor/substrate-wasm-builder" }
tokio = { path = "../vendor/tokio" }
xcm-emulator = { path = "../vendor/xcm-emulator" }
xcm-runtime-apis = { path = "../vendor/xcm-runtime-apis" }
anyhow = { path = "../vendor/anyhow" }
subxt = { path = "../vendor/subxt" }
tracing-subscriber = { path = "../vendor/tracing-subscriber-0.2.25" }
zombienet-sdk = { path = "../vendor/zombienet-sdk" }
tuplex = { path = "../vendor/tuplex" }
ss58-registry = { path = "../vendor/ss58-registry" }
45 changes: 45 additions & 0 deletions ahm-controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "pallet-ahm-controller"
repository.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true

[dependencies]
codec = { features = ["derive", "max-encoded-len"], workspace = true }
scale-info = { features = ["derive"], workspace = true }

frame-support = { workspace = true }
frame-system = { workspace = true }
xcm = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }

pallet-indices = { workspace = true }
pallet-balances = { workspace = true }

[features]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-io/std",
"xcm/std",
"pallet-indices/std",
"pallet-balances/std"
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-indices/try-runtime",
"pallet-balances/try-runtime"
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-balances/runtime-benchmarks"
]
Loading