diff --git a/Cargo.lock b/Cargo.lock index db45cb47d..9824fc177 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -619,21 +619,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "bp-header-chain" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "finality-grandpa", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "parity-scale-codec", - "serde 1.0.130", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-finality-grandpa", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "bp-header-chain" version = "0.1.0" @@ -649,40 +634,14 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "bp-message-dispatch" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "parity-scale-codec", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "bp-message-dispatch" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "parity-scale-codec", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - -[[package]] -name = "bp-messages" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bitvec", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "bp-runtime", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "impl-trait-for-tuples", "parity-scale-codec", - "serde 1.0.130", "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] @@ -692,7 +651,7 @@ version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ "bitvec", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-runtime", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "impl-trait-for-tuples", @@ -701,23 +660,6 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "bp-runtime" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "hash-db", - "num-traits 0.2.14", - "parity-scale-codec", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-io 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-state-machine 0.9.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-trie 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "bp-runtime" version = "0.1.0" @@ -735,27 +677,12 @@ dependencies = [ "sp-trie 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "bp-test-utils" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "ed25519-dalek", - "finality-grandpa", - "parity-scale-codec", - "sp-application-crypto 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-finality-grandpa", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "bp-test-utils" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", "ed25519-dalek", "finality-grandpa", "parity-scale-codec", @@ -779,77 +706,19 @@ dependencies = [ "uint 0.8.5", ] -[[package]] -name = "bridge-primitives" -version = "0.11.6" -source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6#c5143a275f834f61c5a9c3fccb462943b194395d" -dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "common-primitives 0.11.6", - "darwinia-fee-market 2.6.10", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "sp-api", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - -[[package]] -name = "bridge-primitives" -version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" -dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "common-primitives 2.7.0", - "darwinia-fee-market 2.7.0", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "sp-api", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - -[[package]] -name = "bridge-runtime-common" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "hash-db", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-transaction-payment", - "parity-scale-codec", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-state-machine 0.9.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-trie 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "bridge-runtime-common" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "hash-db", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-dispatch", + "pallet-bridge-grandpa", + "pallet-bridge-messages", "pallet-transaction-payment", "parity-scale-codec", "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -889,7 +758,7 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bsc-primitives" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "ethbloom", @@ -1119,33 +988,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "common-primitives" -version = "0.11.6" -source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6#c5143a275f834f61c5a9c3fccb462943b194395d" -dependencies = [ - "parity-scale-codec", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - -[[package]] -name = "common-primitives" -version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" -dependencies = [ - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "common-runtime" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "common-primitives 2.7.0", "darwinia-balances 2.7.0", "darwinia-support 2.7.0", + "drml-common-primitives", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "max-encoded-len", @@ -1164,12 +1014,12 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 0.11.6", + "bp-messages", + "bp-runtime", "bridge-traits", - "common-primitives 0.11.6", "crab-runtime", + "darwinia-bridge-primitives", + "darwinia-common-primitives", "dp-fee 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -1191,12 +1041,12 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 0.11.6", + "bp-messages", + "bp-runtime", "bridge-traits", - "common-primitives 0.11.6", "darwinia-bridge-ethereum 2.6.10", + "darwinia-bridge-primitives", + "darwinia-common-primitives", "darwinia-runtime", "dp-fee 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -1220,7 +1070,7 @@ dependencies = [ "anyhow", "array-bytes", "async-trait", - "bridge-primitives 0.4.8", + "bridge-primitives", "bridge-traits", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "jsonrpsee-types", @@ -1274,13 +1124,13 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 2.7.0", + "bp-messages", + "bp-runtime", "bridge-traits", - "common-primitives 2.7.0", "darwinia-bridge-ethereum 2.7.0", "dp-fee 2.7.0", + "drml-bridge-primitives", + "drml-common-primitives", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "futures-test", @@ -1328,12 +1178,12 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 2.7.0", + "bp-messages", + "bp-runtime", "bridge-traits", - "common-primitives 2.7.0", "dp-fee 2.7.0", + "drml-bridge-primitives", + "drml-common-primitives", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "headers-relay", @@ -1487,18 +1337,19 @@ dependencies = [ [[package]] name = "crab-runtime" version = "0.11.6" -source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6#c5143a275f834f61c5a9c3fccb462943b194395d" +source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6-bridger#e958663969c69a23cebeafbf2a9df5b538260419" dependencies = [ "array-bytes", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bridge-primitives 0.11.6", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "common-primitives 0.11.6", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "darwinia-balances 2.6.10", "darwinia-balances-rpc-runtime-api 2.6.10", + "darwinia-bridge-primitives", "darwinia-claims 2.6.10", + "darwinia-common-primitives", + "darwinia-common-runtime", "darwinia-democracy 2.6.10", "darwinia-elections-phragmen 2.6.10", "darwinia-evm 2.6.10", @@ -1508,7 +1359,6 @@ dependencies = [ "darwinia-fee-market-rpc-runtime-api 2.6.10", "darwinia-header-mmr 2.6.10", "darwinia-header-mmr-rpc-runtime-api 2.6.6", - "darwinia-runtime-common", "darwinia-staking 2.6.10", "darwinia-staking-rpc-runtime-api 2.6.10", "darwinia-support 2.6.10", @@ -1529,9 +1379,9 @@ dependencies = [ "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "pallet-babe", "pallet-bounties", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "pallet-bridge-dispatch", + "pallet-bridge-grandpa", + "pallet-bridge-messages", "pallet-collective", "pallet-election-provider-multi-phase", "pallet-grandpa", @@ -1773,7 +1623,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-balances-rpc-runtime-api 2.6.10", "darwinia-support 2.6.10", @@ -1789,7 +1639,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-balances-rpc-runtime-api 2.7.0", "darwinia-support 2.7.0", @@ -1805,7 +1655,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "parity-scale-codec", @@ -1817,7 +1667,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "parity-scale-codec", @@ -1829,7 +1679,7 @@ dependencies = [ [[package]] name = "darwinia-bridge-bsc" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "bsc-primitives", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -1844,7 +1694,7 @@ dependencies = [ [[package]] name = "darwinia-bridge-ethereum" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "blake2-rfc", @@ -1868,7 +1718,7 @@ dependencies = [ [[package]] name = "darwinia-bridge-ethereum" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "blake2-rfc", @@ -1889,13 +1739,31 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] +[[package]] +name = "darwinia-bridge-primitives" +version = "0.11.6" +source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6-bridger#e958663969c69a23cebeafbf2a9df5b538260419" +dependencies = [ + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "darwinia-common-primitives", + "darwinia-fee-market 2.6.10", + "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "pallet-bridge-dispatch", + "sp-api", + "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", +] + [[package]] name = "darwinia-bridger" version = "0.4.8" dependencies = [ "anyhow", "async-recursion", - "bridge-primitives 0.4.8", + "bridge-primitives", "bridge-traits", "colored", "component-state", @@ -1924,7 +1792,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "darwinia-support 2.6.10", @@ -1942,7 +1810,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "darwinia-support 2.7.0", @@ -1957,10 +1825,40 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] +[[package]] +name = "darwinia-common-primitives" +version = "0.11.6" +source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6-bridger#e958663969c69a23cebeafbf2a9df5b538260419" +dependencies = [ + "parity-scale-codec", + "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", +] + +[[package]] +name = "darwinia-common-runtime" +version = "0.11.6" +source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6-bridger#e958663969c69a23cebeafbf2a9df5b538260419" +dependencies = [ + "darwinia-balances 2.6.10", + "darwinia-common-primitives", + "darwinia-support 2.6.10", + "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "max-encoded-len", + "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "pallet-transaction-payment", + "pallet-treasury", + "parity-scale-codec", + "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "static_assertions", +] + [[package]] name = "darwinia-democracy" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -1975,7 +1873,7 @@ dependencies = [ [[package]] name = "darwinia-democracy" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -1990,7 +1888,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2007,7 +1905,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2024,7 +1922,7 @@ dependencies = [ [[package]] name = "darwinia-evm" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "darwinia-balances 2.6.10", @@ -2052,7 +1950,7 @@ dependencies = [ [[package]] name = "darwinia-evm" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "darwinia-balances 2.7.0", @@ -2080,7 +1978,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-bridge-ethereum" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-evm 2.7.0", "darwinia-evm-precompile-utils", @@ -2096,10 +1994,10 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-bridge-s2s" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-runtime", "darwinia-evm 2.7.0", "darwinia-evm-precompile-utils", "darwinia-support 2.7.0", @@ -2119,7 +2017,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-dispatch" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-evm 2.7.0", "darwinia-support 2.7.0", @@ -2134,7 +2032,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-simple" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "dp-evm 2.6.10", "evm", @@ -2146,7 +2044,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-simple" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "dp-evm 2.7.0", "evm", @@ -2158,7 +2056,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-transfer" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "darwinia-evm 2.6.10", @@ -2183,7 +2081,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-transfer" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "darwinia-evm 2.7.0", @@ -2208,7 +2106,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-utils" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-evm-precompile-utils-macro", "darwinia-support 2.7.0", @@ -2218,7 +2116,7 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-utils-macro" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "evm", "proc-macro2", @@ -2231,18 +2129,18 @@ dependencies = [ [[package]] name = "darwinia-fee-market" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "bitvec", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "bp-messages", + "bp-runtime", "darwinia-support 2.6.10", "dp-fee 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "log", "num-traits 0.2.14", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "pallet-bridge-messages", "pallet-timestamp", "parity-scale-codec", "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2254,18 +2152,18 @@ dependencies = [ [[package]] name = "darwinia-fee-market" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "bitvec", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", + "bp-runtime", "darwinia-support 2.7.0", "dp-fee 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "log", "num-traits 0.2.14", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-messages", "pallet-timestamp", "parity-scale-codec", "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2277,9 +2175,9 @@ dependencies = [ [[package]] name = "darwinia-fee-market-rpc-runtime-api" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "bp-messages", "parity-scale-codec", "serde 1.0.130", "sp-api", @@ -2290,9 +2188,9 @@ dependencies = [ [[package]] name = "darwinia-fee-market-rpc-runtime-api" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", "parity-scale-codec", "serde 1.0.130", "sp-api", @@ -2303,7 +2201,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api 2.6.6", @@ -2323,7 +2221,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api 2.7.0", @@ -2343,7 +2241,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "2.6.6" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "parity-scale-codec", @@ -2356,7 +2254,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "parity-scale-codec", @@ -2369,7 +2267,7 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-relay-primitives 2.6.10", "darwinia-support 2.6.10", @@ -2384,7 +2282,7 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-relay-primitives 2.7.0", "darwinia-support 2.7.0", @@ -2399,7 +2297,7 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "parity-scale-codec", @@ -2410,7 +2308,7 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "parity-scale-codec", @@ -2421,7 +2319,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-relay-primitives 2.6.10", "darwinia-support 2.6.10", @@ -2436,7 +2334,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-relay-primitives 2.7.0", "darwinia-support 2.7.0", @@ -2451,17 +2349,18 @@ dependencies = [ [[package]] name = "darwinia-runtime" version = "0.11.6" -source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6#c5143a275f834f61c5a9c3fccb462943b194395d" -dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bridge-primitives 0.11.6", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "common-primitives 0.11.6", +source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6-bridger#e958663969c69a23cebeafbf2a9df5b538260419" +dependencies = [ + "bp-message-dispatch", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "darwinia-balances 2.6.10", "darwinia-balances-rpc-runtime-api 2.6.10", "darwinia-bridge-ethereum 2.6.10", + "darwinia-bridge-primitives", + "darwinia-common-primitives", + "darwinia-common-runtime", "darwinia-democracy 2.6.10", "darwinia-elections-phragmen 2.6.10", "darwinia-fee-market 2.6.10", @@ -2471,7 +2370,6 @@ dependencies = [ "darwinia-relay-authorities 2.6.10", "darwinia-relay-primitives 2.6.10", "darwinia-relayer-game 2.6.10", - "darwinia-runtime-common", "darwinia-staking 2.6.10", "darwinia-staking-rpc-runtime-api 2.6.10", "darwinia-support 2.6.10", @@ -2488,9 +2386,9 @@ dependencies = [ "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "pallet-babe", "pallet-bounties", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "pallet-bridge-dispatch", + "pallet-bridge-grandpa", + "pallet-bridge-messages", "pallet-collective", "pallet-election-provider-multi-phase", "pallet-grandpa", @@ -2536,31 +2434,10 @@ dependencies = [ "to-tron-backing 2.6.10", ] -[[package]] -name = "darwinia-runtime-common" -version = "0.11.6" -source = "git+https://github.com/darwinia-network/darwinia.git?tag=v0.11.6#c5143a275f834f61c5a9c3fccb462943b194395d" -dependencies = [ - "common-primitives 0.11.6", - "darwinia-balances 2.6.10", - "darwinia-staking 2.6.10", - "darwinia-support 2.6.10", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "max-encoded-len", - "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "pallet-transaction-payment", - "pallet-treasury", - "parity-scale-codec", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "static_assertions", -] - [[package]] name = "darwinia-staking" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-staking-rpc-runtime-api 2.6.10", "darwinia-support 2.6.10", @@ -2584,7 +2461,7 @@ dependencies = [ [[package]] name = "darwinia-staking" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-staking-rpc-runtime-api 2.7.0", "darwinia-support 2.7.0", @@ -2608,7 +2485,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "parity-scale-codec", @@ -2620,7 +2497,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "parity-scale-codec", @@ -2632,10 +2509,10 @@ dependencies = [ [[package]] name = "darwinia-support" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "bp-messages", + "bp-runtime", "ethereum", "ethereum-primitives 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2654,10 +2531,10 @@ dependencies = [ [[package]] name = "darwinia-support" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", + "bp-runtime", "ethereum", "ethereum-primitives 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2676,7 +2553,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2689,7 +2566,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2807,7 +2684,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dp-asset" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "ethereum-types", "parity-scale-codec", @@ -2818,7 +2695,7 @@ dependencies = [ [[package]] name = "dp-consensus" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "ethereum", "parity-scale-codec", @@ -2832,7 +2709,7 @@ dependencies = [ [[package]] name = "dp-consensus" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "ethereum", "parity-scale-codec", @@ -2846,9 +2723,9 @@ dependencies = [ [[package]] name = "dp-contract" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", "dp-asset", "ethabi 13.0.0", "ethereum-primitives 2.7.0", @@ -2859,7 +2736,7 @@ dependencies = [ [[package]] name = "dp-evm" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "evm", "impl-trait-for-tuples", @@ -2872,7 +2749,7 @@ dependencies = [ [[package]] name = "dp-evm" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "evm", "impl-trait-for-tuples", @@ -2885,9 +2762,9 @@ dependencies = [ [[package]] name = "dp-fee" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", + "bp-messages", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "parity-scale-codec", "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2897,9 +2774,9 @@ dependencies = [ [[package]] name = "dp-fee" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "parity-scale-codec", "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -2909,11 +2786,11 @@ dependencies = [ [[package]] name = "dp-s2s" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-runtime", "dp-asset", "dp-contract", "parity-scale-codec", @@ -2925,12 +2802,39 @@ dependencies = [ [[package]] name = "dp-storage" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" [[package]] name = "dp-storage" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" + +[[package]] +name = "drml-bridge-primitives" +version = "2.7.0" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" +dependencies = [ + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "darwinia-fee-market 2.7.0", + "drml-common-primitives", + "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "pallet-bridge-dispatch", + "sp-api", + "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", +] + +[[package]] +name = "drml-common-primitives" +version = "2.7.0" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" +dependencies = [ + "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", + "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", +] [[package]] name = "dtoa" @@ -2941,7 +2845,7 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "dvm-ethereum" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-evm 2.6.10", "darwinia-support 2.6.10", @@ -2970,7 +2874,7 @@ dependencies = [ [[package]] name = "dvm-ethereum" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-evm 2.7.0", "darwinia-support 2.7.0", @@ -2999,7 +2903,7 @@ dependencies = [ [[package]] name = "dvm-rpc-runtime-api" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-evm 2.6.10", "darwinia-support 2.6.10", @@ -3017,7 +2921,7 @@ dependencies = [ [[package]] name = "dvm-rpc-runtime-api" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-evm 2.7.0", "darwinia-support 2.7.0", @@ -3247,7 +3151,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "ethash", @@ -3266,7 +3170,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "ethash", @@ -3420,7 +3324,7 @@ dependencies = [ "async-std", "async-trait", "backoff", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", "futures 0.3.17", "headers-relay", "log", @@ -3765,7 +3669,7 @@ dependencies = [ [[package]] name = "from-ethereum-issuing" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "darwinia-bridge-ethereum 2.7.0", @@ -3789,12 +3693,12 @@ dependencies = [ [[package]] name = "from-substrate-issuing" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", "darwinia-evm 2.7.0", "darwinia-support 2.7.0", "dp-asset", @@ -3992,7 +3896,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4001,7 +3905,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check", ] @@ -5334,7 +5238,7 @@ dependencies = [ "rand 0.7.3", "sha2 0.8.2", "subtle 2.4.1", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5353,7 +5257,7 @@ dependencies = [ "rand 0.7.3", "serde 1.0.130", "sha2 0.9.8", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5622,7 +5526,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -5633,7 +5537,7 @@ dependencies = [ [[package]] name = "merkle-patricia-trie" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -5661,8 +5565,8 @@ dependencies = [ "anyhow", "async-std", "async-trait", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-messages", + "bp-runtime", "futures 0.3.17", "hex", "log", @@ -5747,7 +5651,7 @@ dependencies = [ [[package]] name = "module-transaction-pause" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -5833,7 +5737,7 @@ dependencies = [ "rand 0.8.4", "rand_distr", "simba", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6138,29 +6042,13 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "pallet-bridge-dispatch" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "log", - "parity-scale-codec", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-runtime", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "log", @@ -6170,35 +6058,14 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "pallet-bridge-grandpa" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-test-utils 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "finality-grandpa", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "log", - "num-traits 0.2.14", - "parity-scale-codec", - "serde 1.0.130", - "sp-finality-grandpa", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-trie 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-test-utils 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", + "bp-runtime", + "bp-test-utils", "finality-grandpa", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -6212,35 +6079,15 @@ dependencies = [ "sp-trie 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", ] -[[package]] -name = "pallet-bridge-messages" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3#e26d59105acb795161881e49eb14992b8b0c22fa" -dependencies = [ - "bitvec", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-3)", - "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "log", - "num-traits 0.2.14", - "parity-scale-codec", - "serde 1.0.130", - "sp-core 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-runtime 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", - "sp-std 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", -] - [[package]] name = "pallet-bridge-messages" version = "0.1.0" source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" dependencies = [ "bitvec", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "log", @@ -6652,15 +6499,13 @@ dependencies = [ [[package]] name = "pangolin-runtime" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 2.7.0", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "common-primitives 2.7.0", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "common-runtime", "darwinia-balances 2.7.0", "darwinia-balances-rpc-runtime-api 2.7.0", @@ -6691,6 +6536,8 @@ dependencies = [ "dp-evm 2.7.0", "dp-fee 2.7.0", "dp-s2s", + "drml-bridge-primitives", + "drml-common-primitives", "dvm-ethereum 2.7.0", "dvm-rpc-runtime-api 2.7.0", "ethereum-primitives 2.7.0", @@ -6711,9 +6558,9 @@ dependencies = [ "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "pallet-babe", "pallet-bounties", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-dispatch", + "pallet-bridge-grandpa", + "pallet-bridge-messages", "pallet-collective", "pallet-election-provider-multi-phase", "pallet-grandpa", @@ -6763,16 +6610,14 @@ dependencies = [ [[package]] name = "pangoro-runtime" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 2.7.0", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "common-primitives 2.7.0", + "bp-header-chain", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "common-runtime", "darwinia-balances 2.7.0", "darwinia-balances-rpc-runtime-api 2.7.0", @@ -6784,6 +6629,8 @@ dependencies = [ "dp-asset", "dp-fee 2.7.0", "dp-s2s", + "drml-bridge-primitives", + "drml-common-primitives", "frame-benchmarking", "frame-election-provider-support", "frame-executive", @@ -6797,9 +6644,9 @@ dependencies = [ "pallet-authority-discovery", "pallet-authorship 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "pallet-babe", - "pallet-bridge-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-grandpa 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-dispatch", + "pallet-bridge-grandpa", + "pallet-bridge-messages", "pallet-election-provider-multi-phase", "pallet-grandpa", "pallet-im-online 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -6855,9 +6702,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8975095a2a03bbbdc70a74ab11a4f76a6d0b84680d87c68d722531b0ac28e8a9" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ "arrayvec 0.7.1", "bitvec", @@ -6869,9 +6716,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dbbfef7f0a1143c5b06e0d76a6278e25dac0bc1af4be51a0fbb73f07e7ad09" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7663,8 +7510,8 @@ source = "git+https://github.com/darwinia-network/parity-bridges-common.git?tag= dependencies = [ "async-std", "async-trait", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", + "bp-runtime", "finality-relay", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "frame-system 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -10148,11 +9995,13 @@ dependencies = [ [[package]] name = "substrate-fixed" -version = "0.5.6" -source = "git+https://github.com/encointer/substrate-fixed?branch=master#b33d186888c60f38adafcfc0ec3a21aab263aef1" +version = "0.5.7" +source = "git+https://github.com/encointer/substrate-fixed?branch=master#2f353acee3c7cf7a386863a89fc6cb805048561f" dependencies = [ "parity-scale-codec", - "typenum", + "scale-info", + "serde 1.0.130", + "typenum 1.14.0 (git+https://github.com/encointer/typenum)", ] [[package]] @@ -10177,10 +10026,10 @@ dependencies = [ "anyhow", "async-std", "async-trait", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "finality-grandpa", "finality-relay", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -10188,7 +10037,7 @@ dependencies = [ "log", "messages-relay", "num-traits 0.2.14", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-messages", "parity-scale-codec", "relay-substrate-client", "relay-utils", @@ -10278,7 +10127,7 @@ name = "support-ethereum" version = "0.4.8" dependencies = [ "anyhow", - "bridge-primitives 0.4.8", + "bridge-primitives", "frame-support 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", "pallet-im-online 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -10309,7 +10158,7 @@ name = "support-proc-macro" version = "0.4.8" dependencies = [ "anyhow", - "bridge-primitives 0.4.8", + "bridge-primitives", "proc-macro2", "proc_macro_roids", "quote", @@ -10398,19 +10247,19 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 0.11.6", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "bridge-traits", - "common-primitives 0.11.6", "component-crab-s2s", "component-darwinia-s2s", "component-subscan", "crab-runtime", + "darwinia-bridge-primitives", + "darwinia-common-primitives", + "darwinia-common-runtime", "darwinia-runtime", - "darwinia-runtime-common", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "futures 0.3.17", "futures-timer", @@ -10418,7 +10267,7 @@ dependencies = [ "lifeline", "log", "messages-relay", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-messages", "parity-scale-codec", "postage", "relay-substrate-client", @@ -10474,17 +10323,17 @@ version = "0.4.8" dependencies = [ "anyhow", "async-trait", - "bp-header-chain 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bridge-primitives 2.7.0", - "bridge-runtime-common 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", "bridge-traits", - "common-primitives 2.7.0", "common-runtime", "component-pangolin-s2s", "component-pangoro-s2s", "component-subscan", + "drml-bridge-primitives", + "drml-common-primitives", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", "futures 0.3.17", "futures-timer", @@ -10492,7 +10341,7 @@ dependencies = [ "lifeline", "log", "messages-relay", - "pallet-bridge-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "pallet-bridge-messages", "pangolin-runtime", "pangoro-runtime", "parity-scale-codec", @@ -10728,7 +10577,7 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "to-ethereum-backing" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "array-bytes", "darwinia-relay-primitives 2.6.10", @@ -10749,7 +10598,7 @@ dependencies = [ [[package]] name = "to-ethereum-backing" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", "darwinia-relay-primitives 2.7.0", @@ -10770,12 +10619,12 @@ dependencies = [ [[package]] name = "to-substrate-backing" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "array-bytes", - "bp-message-dispatch 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-messages 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", - "bp-runtime 0.1.0 (git+https://github.com/darwinia-network/parity-bridges-common.git?tag=darwinia-v0.11.6-4)", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", "darwinia-support 2.7.0", "dp-asset", "dp-contract", @@ -10796,7 +10645,7 @@ dependencies = [ [[package]] name = "to-tron-backing" version = "2.6.10" -source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-3#ed73e1a2619107dbe02ce636f174c4570552c946" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=darwinia-v0.11.6-4#6c27522f0ca65f7734144482bc8215c1eb4c3ac7" dependencies = [ "darwinia-support 2.6.10", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -10808,7 +10657,7 @@ dependencies = [ [[package]] name = "to-tron-backing" version = "2.7.0" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=bump-deps#dee6b8606aac443d4199d55797aaa3ac6202d74b" +source = "git+https://github.com/darwinia-network/darwinia-common.git?tag=v2.7.0-1#65a867c33948bf545fea3ff73cc08b677bf4c549" dependencies = [ "darwinia-support 2.7.0", "frame-support 3.0.0 (git+https://github.com/darwinia-network/substrate.git?tag=darwinia-v0.11.6-1)", @@ -11110,7 +10959,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "rand 0.3.23", "static_assertions", ] @@ -11121,6 +10970,14 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +[[package]] +name = "typenum" +version = "1.14.0" +source = "git+https://github.com/encointer/typenum#ec35bb80fcfb495de2e1f6966381c3f85e8a6509" +dependencies = [ + "scale-info", +] + [[package]] name = "ucd-trie" version = "0.1.3" diff --git a/components/client-crab-s2s/Cargo.toml b/components/client-crab-s2s/Cargo.toml index ab25f98fe..9f1b95ca3 100644 --- a/components/client-crab-s2s/Cargo.toml +++ b/components/client-crab-s2s/Cargo.toml @@ -33,10 +33,10 @@ bp-messages = { git = "https://github.com/darwinia-network/parity-bri bp-runtime = { git = "https://github.com/darwinia-network/parity-bridges-common.git", tag = "darwinia-v0.11.6-4" } ## Bridge dependencies -crab-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-3" } +crab-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-4" } diff --git a/components/client-crab-s2s/src/api.rs b/components/client-crab-s2s/src/api.rs index 5c180e7e1..0e54c67df 100644 --- a/components/client-crab-s2s/src/api.rs +++ b/components/client-crab-s2s/src/api.rs @@ -1,10 +1,12 @@ use bp_messages::{LaneId, MessageNonce}; use codec::Encode; -use common_primitives::AccountId; -use common_primitives::Balance; -use common_primitives::BlockNumber; +use darwinia_common_primitives::AccountId; +use darwinia_common_primitives::Balance; +use darwinia_common_primitives::BlockNumber; use dp_fee::{Order, Relayer}; use relay_substrate_client::{ChainBase, Client, TransactionSignScheme, UnsignedTransaction}; +use relay_utils::relay_loop::Client as RelayLoopClient; +use relay_utils::MaybeConnectionError; use sp_core::storage::StorageKey; use sp_core::{Bytes, Pair}; @@ -22,96 +24,110 @@ impl CrabApi { } impl CrabApi { - pub async fn client(&self) -> &Client { - &self.client - } - /// Query assigned relayers - pub async fn assigned_relayers(&self) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()) - .to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn assigned_relayers(&mut self) -> anyhow::Result>> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query order pub async fn order( - &self, + &mut self, laned_id: LaneId, message_nonce: MessageNonce, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "Orders", + (laned_id, message_nonce).encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query all relayers - pub async fn relayers(&self) -> anyhow::Result> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn relayers(&mut self) -> anyhow::Result> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query relayer info by account id pub async fn relayer( - &self, + &mut self, account: AccountId, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "RelayersMap", - account.encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "RelayersMap", + account.encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - pub async fn is_relayer(&self, account: AccountId) -> anyhow::Result { + pub async fn is_relayer(&mut self, account: AccountId) -> anyhow::Result { self.relayer(account).await.map(|item| item.is_some()) } /// Return number of the best finalized block. pub async fn best_finalized_header_number( - &self, - ) -> anyhow::Result { - Ok(self.client.best_finalized_header_number().await?) + &mut self, + ) -> anyhow::Result { + match self.client.best_finalized_header_number().await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update relay fee pub async fn update_relay_fee( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( CrabChain::sign_transaction( @@ -126,19 +142,28 @@ impl CrabApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update locked collateral pub async fn update_locked_collateral( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( CrabChain::sign_transaction( @@ -153,7 +178,15 @@ impl CrabApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } } diff --git a/components/client-crab-s2s/src/crab.rs b/components/client-crab-s2s/src/crab.rs index 9359fd075..bec964c1a 100644 --- a/components/client-crab-s2s/src/crab.rs +++ b/components/client-crab-s2s/src/crab.rs @@ -11,7 +11,10 @@ use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; use std::time::Duration; /// Pangoro header id. -pub type HeaderId = relay_utils::HeaderId; +pub type HeaderId = relay_utils::HeaderId< + darwinia_common_primitives::Hash, + darwinia_common_primitives::BlockNumber, +>; /// Pangoro chain definition. #[derive(Debug, Clone, Copy)] @@ -22,23 +25,24 @@ impl BridgeChain for CrabChain { } impl ChainBase for CrabChain { - type BlockNumber = common_primitives::BlockNumber; - type Hash = common_primitives::Hash; - type Hasher = common_primitives::Hashing; - type Header = common_primitives::Header; - - type AccountId = common_primitives::AccountId; - type Balance = common_primitives::Balance; - type Index = common_primitives::Nonce; - type Signature = common_primitives::Signature; + type BlockNumber = darwinia_common_primitives::BlockNumber; + type Hash = darwinia_common_primitives::Hash; + type Hasher = darwinia_common_primitives::Hashing; + type Header = darwinia_common_primitives::Header; + + type AccountId = darwinia_common_primitives::AccountId; + type Balance = darwinia_common_primitives::Balance; + type Index = darwinia_common_primitives::Nonce; + type Signature = darwinia_common_primitives::Signature; } impl Chain for CrabChain { const NAME: &'static str = "Crab"; const AVERAGE_BLOCK_INTERVAL: Duration = - Duration::from_millis(common_primitives::MILLISECS_PER_BLOCK); - const STORAGE_PROOF_OVERHEAD: u32 = bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; - const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; + Duration::from_millis(darwinia_common_primitives::MILLISECS_PER_BLOCK); + const STORAGE_PROOF_OVERHEAD: u32 = darwinia_bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; + const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = + darwinia_bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; type SignedBlock = crab_runtime::SignedBlock; type Call = crab_runtime::Call; @@ -110,7 +114,7 @@ impl TransactionSignScheme for CrabChain { tx.signature .as_ref() .map(|(address, _, _)| { - let account_id: common_primitives::AccountId = + let account_id: darwinia_common_primitives::AccountId = (*signer.public().as_array_ref()).into(); *address == crab_runtime::Address::from(account_id) }) @@ -135,4 +139,4 @@ impl TransactionSignScheme for CrabChain { pub type SigningParams = sp_core::sr25519::Pair; /// Pangoro header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; +pub type SyncHeader = relay_substrate_client::SyncHeader; diff --git a/components/client-crab-s2s/src/feemarket.rs b/components/client-crab-s2s/src/feemarket.rs index 0b239ea07..1eef8c071 100644 --- a/components/client-crab-s2s/src/feemarket.rs +++ b/components/client-crab-s2s/src/feemarket.rs @@ -1,6 +1,6 @@ use std::ops::Range; -use common_primitives::AccountId; +use darwinia_common_primitives::AccountId; use messages_relay::message_lane::MessageLane; use messages_relay::message_lane_loop::{ SourceClient as MessageLaneSourceClient, TargetClient as MessageLaneTargetClient, @@ -32,7 +32,7 @@ impl CrabRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { log::trace!( @@ -42,7 +42,7 @@ impl CrabRelayStrategy { let nonce = &reference.nonce; let order = self .api - .order(bridge_primitives::DARWINIA_CRAB_LANE, *nonce) + .order(darwinia_bridge_primitives::DARWINIA_CRAB_LANE, *nonce) .await .map_err(|e| { log::error!("[Pangoro] Failed to query order: {:?}", e); @@ -101,7 +101,7 @@ impl CrabRelayStrategy { let ranges = relayers .iter() .map(|item| item.valid_range.clone()) - .collect::>>(); + .collect::>>(); let mut maximum_timeout = 0; for range in ranges { @@ -126,7 +126,7 @@ impl RelayStrategy for CrabRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { let decide = self.handle(reference).await; diff --git a/components/client-darwinia-s2s/Cargo.toml b/components/client-darwinia-s2s/Cargo.toml index 729859423..9d6777565 100644 --- a/components/client-darwinia-s2s/Cargo.toml +++ b/components/client-darwinia-s2s/Cargo.toml @@ -33,11 +33,11 @@ bp-messages = { git = "https://github.com/darwinia-network/parity-bri bp-runtime = { git = "https://github.com/darwinia-network/parity-bridges-common.git", tag = "darwinia-v0.11.6-4" } ## Bridge dependencies -darwinia-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -darwinia-bridge-ethereum = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-3" } -dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-3" } +darwinia-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-bridge-ethereum = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-4" } +dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.6-4" } diff --git a/components/client-darwinia-s2s/src/api.rs b/components/client-darwinia-s2s/src/api.rs index 335de2132..406306b9d 100644 --- a/components/client-darwinia-s2s/src/api.rs +++ b/components/client-darwinia-s2s/src/api.rs @@ -1,10 +1,12 @@ use bp_messages::{LaneId, MessageNonce}; use codec::Encode; -use common_primitives::AccountId; -use common_primitives::Balance; -use common_primitives::BlockNumber; +use darwinia_common_primitives::AccountId; +use darwinia_common_primitives::Balance; +use darwinia_common_primitives::BlockNumber; use dp_fee::{Order, Relayer}; use relay_substrate_client::{ChainBase, Client, TransactionSignScheme, UnsignedTransaction}; +use relay_utils::relay_loop::Client as RelayLoopClient; +use relay_utils::MaybeConnectionError; use sp_core::storage::StorageKey; use sp_core::{Bytes, Pair}; @@ -22,96 +24,110 @@ impl DarwiniaApi { } impl DarwiniaApi { - pub async fn client(&self) -> &Client { - &self.client + /// Query assigned relayers + pub async fn assigned_relayers(&mut self) -> anyhow::Result>> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - /// Query assigned relayers - pub async fn assigned_relayers(&self) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()) - .to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + /// Query order + pub async fn order( + &mut self, + laned_id: LaneId, + message_nonce: MessageNonce, + ) -> anyhow::Result>> { + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "Orders", + (laned_id, message_nonce).encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query all relayers - pub async fn relayers(&self) -> anyhow::Result> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn relayers(&mut self) -> anyhow::Result> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query relayer info by account id pub async fn relayer( - &self, + &mut self, account: AccountId, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "RelayersMap", - account.encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "RelayersMap", + account.encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - pub async fn is_relayer(&self, account: AccountId) -> anyhow::Result { + pub async fn is_relayer(&mut self, account: AccountId) -> anyhow::Result { self.relayer(account).await.map(|item| item.is_some()) } - /// Query order - pub async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ), - None, - ) - .await?) - } - /// Return number of the best finalized block. pub async fn best_finalized_header_number( - &self, - ) -> anyhow::Result { - Ok(self.client.best_finalized_header_number().await?) + &mut self, + ) -> anyhow::Result { + match self.client.best_finalized_header_number().await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update relay fee pub async fn update_relay_fee( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( DarwiniaChain::sign_transaction( @@ -126,19 +142,28 @@ impl DarwiniaApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update locked collateral pub async fn update_locked_collateral( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( DarwiniaChain::sign_transaction( @@ -154,7 +179,15 @@ impl DarwiniaApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } } diff --git a/components/client-darwinia-s2s/src/darwinia.rs b/components/client-darwinia-s2s/src/darwinia.rs index bf2a3a2b8..f18344af5 100644 --- a/components/client-darwinia-s2s/src/darwinia.rs +++ b/components/client-darwinia-s2s/src/darwinia.rs @@ -10,10 +10,13 @@ use sp_core::{storage::StorageKey, Pair}; use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; /// Pangolin header id. -pub type HeaderId = relay_utils::HeaderId; +pub type HeaderId = relay_utils::HeaderId< + darwinia_common_primitives::Hash, + darwinia_common_primitives::BlockNumber, +>; /// Rialto header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; +pub type SyncHeader = relay_substrate_client::SyncHeader; /// Millau chain definition. #[derive(Debug, Clone, Copy)] @@ -24,23 +27,24 @@ impl BridgeChain for DarwiniaChain { } impl ChainBase for DarwiniaChain { - type BlockNumber = common_primitives::BlockNumber; - type Hash = common_primitives::Hash; - type Hasher = common_primitives::Hashing; - type Header = common_primitives::Header; - - type AccountId = common_primitives::AccountId; - type Balance = common_primitives::Balance; - type Index = common_primitives::Nonce; - type Signature = common_primitives::Signature; + type BlockNumber = darwinia_common_primitives::BlockNumber; + type Hash = darwinia_common_primitives::Hash; + type Hasher = darwinia_common_primitives::Hashing; + type Header = darwinia_common_primitives::Header; + + type AccountId = darwinia_common_primitives::AccountId; + type Balance = darwinia_common_primitives::Balance; + type Index = darwinia_common_primitives::Nonce; + type Signature = darwinia_common_primitives::Signature; } impl Chain for DarwiniaChain { const NAME: &'static str = "Darwinia"; const AVERAGE_BLOCK_INTERVAL: Duration = - Duration::from_millis(common_primitives::MILLISECS_PER_BLOCK); - const STORAGE_PROOF_OVERHEAD: u32 = bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; - const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; + Duration::from_millis(darwinia_common_primitives::MILLISECS_PER_BLOCK); + const STORAGE_PROOF_OVERHEAD: u32 = darwinia_bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; + const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = + darwinia_bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; type SignedBlock = darwinia_runtime::SignedBlock; type Call = darwinia_runtime::Call; @@ -110,7 +114,7 @@ impl TransactionSignScheme for DarwiniaChain { tx.signature .as_ref() .map(|(address, _, _)| { - let account_id: common_primitives::AccountId = + let account_id: darwinia_common_primitives::AccountId = (*signer.public().as_array_ref()).into(); *address == darwinia_runtime::Address::from(account_id) }) diff --git a/components/client-darwinia-s2s/src/feemarket.rs b/components/client-darwinia-s2s/src/feemarket.rs index 2855da4fb..29d119292 100644 --- a/components/client-darwinia-s2s/src/feemarket.rs +++ b/components/client-darwinia-s2s/src/feemarket.rs @@ -1,6 +1,6 @@ use std::ops::Range; -use common_primitives::AccountId; +use darwinia_common_primitives::AccountId; use messages_relay::message_lane::MessageLane; use messages_relay::message_lane_loop::{ SourceClient as MessageLaneSourceClient, TargetClient as MessageLaneTargetClient, @@ -33,13 +33,13 @@ impl RelayStrategy for DarwiniaRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { let nonce = &reference.nonce; let order = self .api - .order(bridge_primitives::DARWINIA_CRAB_LANE, *nonce) + .order(darwinia_bridge_primitives::DARWINIA_CRAB_LANE, *nonce) .await .map_err(|e| { log::error!("Failed to query order: {:?}", e); @@ -94,7 +94,7 @@ impl RelayStrategy for DarwiniaRelayStrategy { let ranges = relayers .iter() .map(|item| item.valid_range.clone()) - .collect::>>(); + .collect::>>(); let mut maximum_timeout = 0; for range in ranges { diff --git a/components/client-pangolin-s2s/Cargo.toml b/components/client-pangolin-s2s/Cargo.toml index 4bdcba28b..9d48c01c5 100644 --- a/components/client-pangolin-s2s/Cargo.toml +++ b/components/client-pangolin-s2s/Cargo.toml @@ -33,11 +33,11 @@ bp-messages = { git = "https://github.com/darwinia-network/parity-bri bp-runtime = { git = "https://github.com/darwinia-network/parity-bridges-common.git", tag = "darwinia-v0.11.6-4" } ## Bridge dependencies -pangolin-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -darwinia-bridge-ethereum = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } +pangolin-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +drml-common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +drml-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +darwinia-bridge-ethereum = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } diff --git a/components/client-pangolin-s2s/src/api.rs b/components/client-pangolin-s2s/src/api.rs index e18ffaae9..724472e3d 100644 --- a/components/client-pangolin-s2s/src/api.rs +++ b/components/client-pangolin-s2s/src/api.rs @@ -1,10 +1,12 @@ use bp_messages::{LaneId, MessageNonce}; use codec::Encode; -use common_primitives::AccountId; -use common_primitives::Balance; -use common_primitives::BlockNumber; use dp_fee::{Order, Relayer}; +use drml_common_primitives::AccountId; +use drml_common_primitives::Balance; +use drml_common_primitives::BlockNumber; use relay_substrate_client::{ChainBase, Client, TransactionSignScheme, UnsignedTransaction}; +use relay_utils::relay_loop::Client as RelayLoopClient; +use relay_utils::MaybeConnectionError; use sp_core::storage::StorageKey; use sp_core::{Bytes, Pair}; @@ -22,96 +24,110 @@ impl PangolinApi { } impl PangolinApi { - pub async fn client(&self) -> &Client { - &self.client + /// Query assigned relayers + pub async fn assigned_relayers(&mut self) -> anyhow::Result>> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - /// Query assigned relayers - pub async fn assigned_relayers(&self) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()) - .to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + /// Query order + pub async fn order( + &mut self, + laned_id: LaneId, + message_nonce: MessageNonce, + ) -> anyhow::Result>> { + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "Orders", + (laned_id, message_nonce).encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query all relayers - pub async fn relayers(&self) -> anyhow::Result> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn relayers(&mut self) -> anyhow::Result> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query relayer info by account id pub async fn relayer( - &self, + &mut self, account: AccountId, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "RelayersMap", - account.encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "RelayersMap", + account.encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - pub async fn is_relayer(&self, account: AccountId) -> anyhow::Result { + pub async fn is_relayer(&mut self, account: AccountId) -> anyhow::Result { self.relayer(account).await.map(|item| item.is_some()) } - /// Query order - pub async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ), - None, - ) - .await?) - } - /// Return number of the best finalized block. pub async fn best_finalized_header_number( - &self, - ) -> anyhow::Result { - Ok(self.client.best_finalized_header_number().await?) + &mut self, + ) -> anyhow::Result { + match self.client.best_finalized_header_number().await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update relay fee pub async fn update_relay_fee( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( PangolinChain::sign_transaction( @@ -126,19 +142,28 @@ impl PangolinApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update locked collateral pub async fn update_locked_collateral( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( PangolinChain::sign_transaction( @@ -154,7 +179,15 @@ impl PangolinApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } } diff --git a/components/client-pangolin-s2s/src/feemarket.rs b/components/client-pangolin-s2s/src/feemarket.rs index 0e5331235..275480505 100644 --- a/components/client-pangolin-s2s/src/feemarket.rs +++ b/components/client-pangolin-s2s/src/feemarket.rs @@ -1,6 +1,6 @@ use std::ops::Range; -use common_primitives::AccountId; +use drml_common_primitives::AccountId; use messages_relay::message_lane::MessageLane; use messages_relay::message_lane_loop::{ SourceClient as MessageLaneSourceClient, TargetClient as MessageLaneTargetClient, @@ -33,13 +33,13 @@ impl RelayStrategy for PangolinRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { let nonce = &reference.nonce; let order = self .api - .order(bridge_primitives::PANGORO_PANGOLIN_LANE, *nonce) + .order(drml_bridge_primitives::PANGORO_PANGOLIN_LANE, *nonce) .await .map_err(|e| { log::error!("Failed to query order: {:?}", e); @@ -94,7 +94,7 @@ impl RelayStrategy for PangolinRelayStrategy { let ranges = relayers .iter() .map(|item| item.valid_range.clone()) - .collect::>>(); + .collect::>>(); let mut maximum_timeout = 0; for range in ranges { diff --git a/components/client-pangolin-s2s/src/pangolin.rs b/components/client-pangolin-s2s/src/pangolin.rs index a5ca133e6..3394074ff 100644 --- a/components/client-pangolin-s2s/src/pangolin.rs +++ b/components/client-pangolin-s2s/src/pangolin.rs @@ -10,10 +10,11 @@ use sp_core::{storage::StorageKey, Pair}; use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; /// Pangolin header id. -pub type HeaderId = relay_utils::HeaderId; +pub type HeaderId = + relay_utils::HeaderId; /// Rialto header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; +pub type SyncHeader = relay_substrate_client::SyncHeader; /// Millau chain definition. #[derive(Debug, Clone, Copy)] @@ -24,23 +25,24 @@ impl BridgeChain for PangolinChain { } impl ChainBase for PangolinChain { - type BlockNumber = common_primitives::BlockNumber; - type Hash = common_primitives::Hash; - type Hasher = common_primitives::Hashing; - type Header = common_primitives::Header; - - type AccountId = common_primitives::AccountId; - type Balance = common_primitives::Balance; - type Index = common_primitives::Nonce; - type Signature = common_primitives::Signature; + type BlockNumber = drml_common_primitives::BlockNumber; + type Hash = drml_common_primitives::Hash; + type Hasher = drml_common_primitives::Hashing; + type Header = drml_common_primitives::Header; + + type AccountId = drml_common_primitives::AccountId; + type Balance = drml_common_primitives::Balance; + type Index = drml_common_primitives::Nonce; + type Signature = drml_common_primitives::Signature; } impl Chain for PangolinChain { const NAME: &'static str = "Pangolin"; const AVERAGE_BLOCK_INTERVAL: Duration = - Duration::from_millis(common_primitives::MILLISECS_PER_BLOCK); - const STORAGE_PROOF_OVERHEAD: u32 = bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; - const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; + Duration::from_millis(drml_common_primitives::MILLISECS_PER_BLOCK); + const STORAGE_PROOF_OVERHEAD: u32 = drml_bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; + const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = + drml_bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; type SignedBlock = pangolin_runtime::SignedBlock; type Call = pangolin_runtime::Call; @@ -110,7 +112,7 @@ impl TransactionSignScheme for PangolinChain { tx.signature .as_ref() .map(|(address, _, _)| { - let account_id: common_primitives::AccountId = + let account_id: drml_common_primitives::AccountId = (*signer.public().as_array_ref()).into(); *address == pangolin_runtime::Address::from(account_id) }) diff --git a/components/client-pangolin-s2s/tests/client_substrate.rs b/components/client-pangolin-s2s/tests/client_substrate.rs index a890630cc..9083e6743 100644 --- a/components/client-pangolin-s2s/tests/client_substrate.rs +++ b/components/client-pangolin-s2s/tests/client_substrate.rs @@ -5,7 +5,7 @@ fn test_account() { let signer = "//Alice"; let pair = sp_core::sr25519::Pair::from_string(&signer, None).unwrap(); let public = pair.public(); - let account = common_primitives::AccountId::from(public.0); + let account = drml_common_primitives::AccountId::from(public.0); assert_eq!( account.to_string(), "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" diff --git a/components/client-pangoro-s2s/Cargo.toml b/components/client-pangoro-s2s/Cargo.toml index ec3764ac6..9025399f0 100644 --- a/components/client-pangoro-s2s/Cargo.toml +++ b/components/client-pangoro-s2s/Cargo.toml @@ -34,10 +34,10 @@ bp-runtime = { git = "https://github.com/darwinia-network/parity-bri ## Bridge dependencies -pangoro-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } +pangoro-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +drml-common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +drml-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +dp-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } diff --git a/components/client-pangoro-s2s/src/api.rs b/components/client-pangoro-s2s/src/api.rs index f74b5b3d6..d0edc1402 100644 --- a/components/client-pangoro-s2s/src/api.rs +++ b/components/client-pangoro-s2s/src/api.rs @@ -1,10 +1,12 @@ use bp_messages::{LaneId, MessageNonce}; use codec::Encode; -use common_primitives::AccountId; -use common_primitives::Balance; -use common_primitives::BlockNumber; use dp_fee::{Order, Relayer}; +use drml_common_primitives::AccountId; +use drml_common_primitives::Balance; +use drml_common_primitives::BlockNumber; use relay_substrate_client::{ChainBase, Client, TransactionSignScheme, UnsignedTransaction}; +use relay_utils::relay_loop::Client as RelayLoopClient; +use relay_utils::MaybeConnectionError; use sp_core::storage::StorageKey; use sp_core::{Bytes, Pair}; @@ -22,96 +24,110 @@ impl PangoroApi { } impl PangoroApi { - pub async fn client(&self) -> &Client { - &self.client - } - /// Query assigned relayers - pub async fn assigned_relayers(&self) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()) - .to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn assigned_relayers(&mut self) -> anyhow::Result>> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "AssignedRelayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query order pub async fn order( - &self, + &mut self, laned_id: LaneId, message_nonce: MessageNonce, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "Orders", + (laned_id, message_nonce).encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query all relayers - pub async fn relayers(&self) -> anyhow::Result> { - Ok(self - .client - .storage_value( - StorageKey( - patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), - ), - None, - ) - .await? - .unwrap_or_else(Vec::new)) + pub async fn relayers(&mut self) -> anyhow::Result> { + let storage_key = StorageKey( + patch::storage_prefix("FeeMarket".as_bytes(), "Relayers".as_bytes()).to_vec(), + ); + match self.client.storage_value(storage_key, None).await { + Ok(v) => Ok(v.unwrap_or_default()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Query relayer info by account id pub async fn relayer( - &self, + &mut self, account: AccountId, ) -> anyhow::Result>> { - Ok(self - .client - .storage_value( - bp_runtime::storage_map_final_key_blake2_128concat( - "FeeMarket", - "RelayersMap", - account.encode().as_slice(), - ), - None, - ) - .await?) + let storage_key = bp_runtime::storage_map_final_key_blake2_128concat( + "FeeMarket", + "RelayersMap", + account.encode().as_slice(), + ); + match self.client.storage_value(storage_key.clone(), None).await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } - pub async fn is_relayer(&self, account: AccountId) -> anyhow::Result { + pub async fn is_relayer(&mut self, account: AccountId) -> anyhow::Result { self.relayer(account).await.map(|item| item.is_some()) } /// Return number of the best finalized block. pub async fn best_finalized_header_number( - &self, - ) -> anyhow::Result { - Ok(self.client.best_finalized_header_number().await?) + &mut self, + ) -> anyhow::Result { + match self.client.best_finalized_header_number().await { + Ok(v) => Ok(v), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update relay fee pub async fn update_relay_fee( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( PangoroChain::sign_transaction( @@ -126,19 +142,28 @@ impl PangoroApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } /// Update locked collateral pub async fn update_locked_collateral( - &self, + &mut self, signer: ::AccountKeyPair, amount: ::Balance, ) -> anyhow::Result<()> { let signer_id = (*signer.public().as_array_ref()).into(); let genesis_hash = *self.client.genesis_hash(); - self.client + match self + .client .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { Bytes( PangoroChain::sign_transaction( @@ -153,7 +178,15 @@ impl PangoroApi { .encode(), ) }) - .await?; - Ok(()) + .await + { + Ok(_v) => Ok(()), + Err(e) => { + if e.is_connection_error() { + self.client.reconnect().await?; + } + Err(e.into()) + } + } } } diff --git a/components/client-pangoro-s2s/src/feemarket.rs b/components/client-pangoro-s2s/src/feemarket.rs index d84eabe66..fd15f3532 100644 --- a/components/client-pangoro-s2s/src/feemarket.rs +++ b/components/client-pangoro-s2s/src/feemarket.rs @@ -1,6 +1,6 @@ use std::ops::Range; -use common_primitives::AccountId; +use drml_common_primitives::AccountId; use messages_relay::message_lane::MessageLane; use messages_relay::message_lane_loop::{ SourceClient as MessageLaneSourceClient, TargetClient as MessageLaneTargetClient, @@ -32,7 +32,7 @@ impl PangoroRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { log::trace!( @@ -42,7 +42,7 @@ impl PangoroRelayStrategy { let nonce = &reference.nonce; let order = self .api - .order(bridge_primitives::PANGORO_PANGOLIN_LANE, *nonce) + .order(drml_bridge_primitives::PANGORO_PANGOLIN_LANE, *nonce) .await .map_err(|e| { log::error!("[Pangoro] Failed to query order: {:?}", e); @@ -101,7 +101,7 @@ impl PangoroRelayStrategy { let ranges = relayers .iter() .map(|item| item.valid_range.clone()) - .collect::>>(); + .collect::>>(); let mut maximum_timeout = 0; for range in ranges { @@ -126,7 +126,7 @@ impl RelayStrategy for PangoroRelayStrategy { SourceClient: MessageLaneSourceClient

, TargetClient: MessageLaneTargetClient

, >( - &self, + &mut self, reference: &mut RelayReference, ) -> bool { let decide = self.handle(reference).await; diff --git a/components/client-pangoro-s2s/src/pangoro.rs b/components/client-pangoro-s2s/src/pangoro.rs index 3abb41663..c3d2965e6 100644 --- a/components/client-pangoro-s2s/src/pangoro.rs +++ b/components/client-pangoro-s2s/src/pangoro.rs @@ -11,7 +11,8 @@ use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; use std::time::Duration; /// Pangoro header id. -pub type HeaderId = relay_utils::HeaderId; +pub type HeaderId = + relay_utils::HeaderId; /// Pangoro chain definition. #[derive(Debug, Clone, Copy)] @@ -22,23 +23,24 @@ impl BridgeChain for PangoroChain { } impl ChainBase for PangoroChain { - type BlockNumber = common_primitives::BlockNumber; - type Hash = common_primitives::Hash; - type Hasher = common_primitives::Hashing; - type Header = common_primitives::Header; - - type AccountId = common_primitives::AccountId; - type Balance = common_primitives::Balance; - type Index = common_primitives::Nonce; - type Signature = common_primitives::Signature; + type BlockNumber = drml_common_primitives::BlockNumber; + type Hash = drml_common_primitives::Hash; + type Hasher = drml_common_primitives::Hashing; + type Header = drml_common_primitives::Header; + + type AccountId = drml_common_primitives::AccountId; + type Balance = drml_common_primitives::Balance; + type Index = drml_common_primitives::Nonce; + type Signature = drml_common_primitives::Signature; } impl Chain for PangoroChain { const NAME: &'static str = "Pangoro"; const AVERAGE_BLOCK_INTERVAL: Duration = - Duration::from_millis(common_primitives::MILLISECS_PER_BLOCK); - const STORAGE_PROOF_OVERHEAD: u32 = bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; - const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; + Duration::from_millis(drml_common_primitives::MILLISECS_PER_BLOCK); + const STORAGE_PROOF_OVERHEAD: u32 = drml_bridge_primitives::EXTRA_STORAGE_PROOF_SIZE; + const MAXIMAL_ENCODED_ACCOUNT_ID_SIZE: u32 = + drml_bridge_primitives::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE; type SignedBlock = pangoro_runtime::SignedBlock; type Call = pangoro_runtime::Call; @@ -106,7 +108,7 @@ impl TransactionSignScheme for PangoroChain { tx.signature .as_ref() .map(|(address, _, _)| { - let account_id: common_primitives::AccountId = + let account_id: drml_common_primitives::AccountId = (*signer.public().as_array_ref()).into(); *address == pangoro_runtime::Address::from(account_id) }) @@ -131,4 +133,4 @@ impl TransactionSignScheme for PangoroChain { pub type SigningParams = sp_core::sr25519::Pair; /// Pangoro header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; +pub type SyncHeader = relay_substrate_client::SyncHeader; diff --git a/task/task-darwinia-crab/Cargo.toml b/task/task-darwinia-crab/Cargo.toml index 765b27f01..a82b2a02d 100644 --- a/task/task-darwinia-crab/Cargo.toml +++ b/task/task-darwinia-crab/Cargo.toml @@ -64,13 +64,13 @@ component-crab-s2s = { path = "../../components/client-crab-s2s" } component-subscan = { path = "../../components/subscan" } ## darwinia common -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } -darwinia-runtime-common = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } +darwinia-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-common-primitives = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } +darwinia-common-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } ## darwinia -darwinia-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } +darwinia-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } ## crab -crab-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6" } +crab-runtime = { git = "https://github.com/darwinia-network/darwinia.git", tag = "v0.11.6-bridger" } diff --git a/task/task-darwinia-crab/src/chains/crab.rs b/task/task-darwinia-crab/src/chains/crab.rs index 827c5c3cd..d89c0be85 100644 --- a/task/task-darwinia-crab/src/chains/crab.rs +++ b/task/task-darwinia-crab/src/chains/crab.rs @@ -27,33 +27,33 @@ mod s2s_const { impl ChainConst for CrabChainConst { const OUTBOUND_LANE_MESSAGE_DETAILS_METHOD: &'static str = - bridge_primitives::TO_CRAB_MESSAGE_DETAILS_METHOD; + darwinia_bridge_primitives::TO_CRAB_MESSAGE_DETAILS_METHOD; const OUTBOUND_LANE_LATEST_GENERATED_NONCE_METHOD: &'static str = - bridge_primitives::TO_CRAB_LATEST_GENERATED_NONCE_METHOD; + darwinia_bridge_primitives::TO_CRAB_LATEST_GENERATED_NONCE_METHOD; const OUTBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::TO_CRAB_LATEST_RECEIVED_NONCE_METHOD; + darwinia_bridge_primitives::TO_CRAB_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_CRAB_LATEST_RECEIVED_NONCE_METHOD; + darwinia_bridge_primitives::FROM_CRAB_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_CRAB_LATEST_CONFIRMED_NONCE_METHOD; + darwinia_bridge_primitives::FROM_CRAB_LATEST_CONFIRMED_NONCE_METHOD; const INBOUND_LANE_UNREWARDED_RELAYERS_STATE: &'static str = - bridge_primitives::FROM_CRAB_UNREWARDED_RELAYERS_STATE; + darwinia_bridge_primitives::FROM_CRAB_UNREWARDED_RELAYERS_STATE; const BEST_FINALIZED_SOURCE_HEADER_ID_AT_TARGET: &'static str = - bridge_primitives::BEST_FINALIZED_CRAB_HEADER_METHOD; + darwinia_bridge_primitives::BEST_FINALIZED_CRAB_HEADER_METHOD; const BEST_FINALIZED_TARGET_HEADER_ID_AT_SOURCE: &'static str = - bridge_primitives::BEST_FINALIZED_CRAB_HEADER_METHOD; + darwinia_bridge_primitives::BEST_FINALIZED_CRAB_HEADER_METHOD; const MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; + darwinia_bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; const MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; + darwinia_bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; const AVERAGE_BLOCK_INTERVAL: Duration = DarwiniaChain::AVERAGE_BLOCK_INTERVAL; - const BRIDGE_CHAIN_ID: ChainId = bridge_primitives::CRAB_CHAIN_ID; + const BRIDGE_CHAIN_ID: ChainId = darwinia_bridge_primitives::CRAB_CHAIN_ID; const MESSAGE_PALLET_NAME_AT_SOURCE: &'static str = - bridge_primitives::WITH_DARWINIA_MESSAGES_PALLET_NAME; + darwinia_bridge_primitives::WITH_DARWINIA_MESSAGES_PALLET_NAME; const MESSAGE_PALLET_NAME_AT_TARGET: &'static str = - bridge_primitives::WITH_CRAB_MESSAGES_PALLET_NAME; + darwinia_bridge_primitives::WITH_CRAB_MESSAGES_PALLET_NAME; const PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_TARGET_CHAIN: Weight = - bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; + darwinia_bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; type SigningParams = sp_core::sr25519::Pair; } @@ -111,7 +111,7 @@ mod s2s_headers { type TargetChain = DarwiniaChain; - fn transactions_author(&self) -> common_primitives::AccountId { + fn transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.finality_pipeline.target_sign.public().as_array_ref()).into() } @@ -120,7 +120,7 @@ mod s2s_headers { era: bp_runtime::TransactionEraOf, transaction_nonce: IndexOf, header: component_crab_s2s::SyncHeader, - proof: GrandpaJustification, + proof: GrandpaJustification, ) -> Bytes { let call = darwinia_runtime::BridgeGrandpaCall::< darwinia_runtime::Runtime, @@ -217,7 +217,7 @@ mod s2s_messages { type SourceChain = CrabChain; type TargetChain = DarwiniaChain; - fn source_transactions_author(&self) -> common_primitives::AccountId { + fn source_transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.message_lane.source_sign.public().as_array_ref()).into() } @@ -248,14 +248,14 @@ mod s2s_messages { TARGET_NAME, SOURCE_NAME, call_weight, - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), transaction.encode().len(), - darwinia_runtime_common::max_extrinsic_size(), + darwinia_common_runtime::max_extrinsic_size(), ); Bytes(transaction.encode()) } - fn target_transactions_author(&self) -> common_primitives::AccountId { + fn target_transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.message_lane.target_sign.public().as_array_ref()).into() } @@ -298,9 +298,9 @@ mod s2s_messages { SOURCE_NAME, TARGET_NAME, call_weight, - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), transaction.encode().len(), - darwinia_runtime_common::max_extrinsic_size(), + darwinia_common_runtime::max_extrinsic_size(), ); Bytes(transaction.encode()) } @@ -342,13 +342,13 @@ mod s2s_messages { // 2/3 is reserved for proofs and tx overhead let max_messages_size_in_single_batch = - darwinia_runtime_common::max_extrinsic_size() / 3; + darwinia_common_runtime::max_extrinsic_size() / 3; let (max_messages_in_single_batch, max_messages_weight_in_single_batch) = substrate_relay_helper::messages_lane::select_delivery_transaction_limits::< // todo: there can be change to special weight pallet_bridge_messages::weights::RialtoWeight, >( - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), DarwiniaChainConst::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE, ); diff --git a/task/task-darwinia-crab/src/chains/darwinia.rs b/task/task-darwinia-crab/src/chains/darwinia.rs index c783ece24..76432001d 100644 --- a/task/task-darwinia-crab/src/chains/darwinia.rs +++ b/task/task-darwinia-crab/src/chains/darwinia.rs @@ -26,33 +26,33 @@ mod s2s_const { impl ChainConst for DarwiniaChainConst { const OUTBOUND_LANE_MESSAGE_DETAILS_METHOD: &'static str = - bridge_primitives::TO_DARWINIA_MESSAGE_DETAILS_METHOD; + darwinia_bridge_primitives::TO_DARWINIA_MESSAGE_DETAILS_METHOD; const OUTBOUND_LANE_LATEST_GENERATED_NONCE_METHOD: &'static str = - bridge_primitives::TO_DARWINIA_LATEST_GENERATED_NONCE_METHOD; + darwinia_bridge_primitives::TO_DARWINIA_LATEST_GENERATED_NONCE_METHOD; const OUTBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::TO_DARWINIA_LATEST_RECEIVED_NONCE_METHOD; + darwinia_bridge_primitives::TO_DARWINIA_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_DARWINIA_LATEST_RECEIVED_NONCE_METHOD; + darwinia_bridge_primitives::FROM_DARWINIA_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_DARWINIA_LATEST_CONFIRMED_NONCE_METHOD; + darwinia_bridge_primitives::FROM_DARWINIA_LATEST_CONFIRMED_NONCE_METHOD; const INBOUND_LANE_UNREWARDED_RELAYERS_STATE: &'static str = - bridge_primitives::FROM_DARWINIA_UNREWARDED_RELAYERS_STATE; + darwinia_bridge_primitives::FROM_DARWINIA_UNREWARDED_RELAYERS_STATE; const BEST_FINALIZED_SOURCE_HEADER_ID_AT_TARGET: &'static str = - bridge_primitives::BEST_FINALIZED_DARWINIA_HEADER_METHOD; + darwinia_bridge_primitives::BEST_FINALIZED_DARWINIA_HEADER_METHOD; const BEST_FINALIZED_TARGET_HEADER_ID_AT_SOURCE: &'static str = - bridge_primitives::BEST_FINALIZED_DARWINIA_HEADER_METHOD; + darwinia_bridge_primitives::BEST_FINALIZED_DARWINIA_HEADER_METHOD; const MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; + darwinia_bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; const MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; + darwinia_bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; const AVERAGE_BLOCK_INTERVAL: Duration = DarwiniaChain::AVERAGE_BLOCK_INTERVAL; - const BRIDGE_CHAIN_ID: ChainId = bridge_primitives::DARWINIA_CHAIN_ID; + const BRIDGE_CHAIN_ID: ChainId = darwinia_bridge_primitives::DARWINIA_CHAIN_ID; const MESSAGE_PALLET_NAME_AT_SOURCE: &'static str = - bridge_primitives::WITH_CRAB_MESSAGES_PALLET_NAME; + darwinia_bridge_primitives::WITH_CRAB_MESSAGES_PALLET_NAME; const MESSAGE_PALLET_NAME_AT_TARGET: &'static str = - bridge_primitives::WITH_DARWINIA_MESSAGES_PALLET_NAME; + darwinia_bridge_primitives::WITH_DARWINIA_MESSAGES_PALLET_NAME; const PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_TARGET_CHAIN: Weight = - bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; + darwinia_bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; type SigningParams = sp_core::sr25519::Pair; } @@ -110,7 +110,7 @@ mod s2s_headers { type TargetChain = CrabChain; - fn transactions_author(&self) -> common_primitives::AccountId { + fn transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.finality_pipeline.target_sign.public().as_array_ref()).into() } @@ -119,7 +119,7 @@ mod s2s_headers { era: bp_runtime::TransactionEraOf, transaction_nonce: IndexOf, header: component_darwinia_s2s::SyncHeader, - proof: GrandpaJustification, + proof: GrandpaJustification, ) -> Bytes { let call = crab_runtime::BridgeGrandpaCall::< crab_runtime::Runtime, @@ -216,7 +216,7 @@ mod s2s_messages { type SourceChain = DarwiniaChain; type TargetChain = CrabChain; - fn source_transactions_author(&self) -> common_primitives::AccountId { + fn source_transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.message_lane.source_sign.public().as_array_ref()).into() } @@ -247,14 +247,14 @@ mod s2s_messages { TARGET_NAME, SOURCE_NAME, call_weight, - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), transaction.encode().len(), - darwinia_runtime_common::max_extrinsic_size(), + darwinia_common_runtime::max_extrinsic_size(), ); Bytes(transaction.encode()) } - fn target_transactions_author(&self) -> common_primitives::AccountId { + fn target_transactions_author(&self) -> darwinia_common_primitives::AccountId { (*self.message_lane.target_sign.public().as_array_ref()).into() } @@ -297,9 +297,9 @@ mod s2s_messages { SOURCE_NAME, TARGET_NAME, call_weight, - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), transaction.encode().len(), - darwinia_runtime_common::max_extrinsic_size(), + darwinia_common_runtime::max_extrinsic_size(), ); Bytes(transaction.encode()) } @@ -341,13 +341,13 @@ mod s2s_messages { // 2/3 is reserved for proofs and tx overhead let max_messages_size_in_single_batch = - darwinia_runtime_common::max_extrinsic_size() / 3; + darwinia_common_runtime::max_extrinsic_size() / 3; let (max_messages_in_single_batch, max_messages_weight_in_single_batch) = substrate_relay_helper::messages_lane::select_delivery_transaction_limits::< // todo: there can be change to special weight pallet_bridge_messages::weights::RialtoWeight, >( - darwinia_runtime_common::max_extrinsic_weight(), + darwinia_common_runtime::max_extrinsic_weight(), CrabChainConst::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE, ); diff --git a/task/task-darwinia-crab/src/fee/strategy/common.rs b/task/task-darwinia-crab/src/fee/strategy/common.rs index 940d9970e..d688a4bdb 100644 --- a/task/task-darwinia-crab/src/fee/strategy/common.rs +++ b/task/task-darwinia-crab/src/fee/strategy/common.rs @@ -49,12 +49,15 @@ impl StrategyHelper { } impl StrategyHelper { - pub fn darwinia_api(&self) -> &DarwiniaApi { - &self.darwinia_api + pub fn darwinia_api_mut(&mut self) -> &mut DarwiniaApi { + &mut self.darwinia_api } - pub fn crab_api(&self) -> &CrabApi { - &self.crab_api + pub fn crab_api_mut(&mut self) -> &mut CrabApi { + &mut self.crab_api } +} + +impl StrategyHelper { pub fn darwinia_signer(&self) -> &::AccountKeyPair { &self.darwinia_signer } diff --git a/task/task-darwinia-crab/src/fee/strategy/crazy_strategy.rs b/task/task-darwinia-crab/src/fee/strategy/crazy_strategy.rs index 37fa98299..30d2ac246 100644 --- a/task/task-darwinia-crab/src/fee/strategy/crazy_strategy.rs +++ b/task/task-darwinia-crab/src/fee/strategy/crazy_strategy.rs @@ -1,4 +1,4 @@ -use common_primitives::AccountId; +use darwinia_common_primitives::AccountId; use sp_core::Pair; use bridge_traits::bridge::task::BridgeSand; @@ -22,7 +22,7 @@ impl CrazyStrategy { #[async_trait::async_trait] impl UpdateFeeStrategy for CrazyStrategy { - async fn handle(&self) -> anyhow::Result<()> { + async fn handle(&mut self) -> anyhow::Result<()> { self.handle_darwinia().await?; self.handle_crab().await?; Ok(()) @@ -30,9 +30,11 @@ impl UpdateFeeStrategy for CrazyStrategy { } impl CrazyStrategy { - async fn handle_darwinia(&self) -> anyhow::Result<()> { - let darwinia_api = self.helper.darwinia_api(); + async fn handle_darwinia(&mut self) -> anyhow::Result<()> { let my_id = AccountId::from(self.helper.darwinia_signer().public().0); + let darwinia_signer = self.helper.darwinia_signer().clone(); + + let darwinia_api = self.helper.darwinia_api_mut(); if !darwinia_api.is_relayer(my_id.clone()).await? { log::warn!( @@ -64,14 +66,15 @@ impl CrazyStrategy { new_fee ); darwinia_api - .update_relay_fee(self.helper.darwinia_signer().clone(), new_fee) + .update_relay_fee(darwinia_signer, new_fee) .await?; Ok(()) } - async fn handle_crab(&self) -> anyhow::Result<()> { - let crab_api = self.helper.crab_api(); + async fn handle_crab(&mut self) -> anyhow::Result<()> { let my_id = AccountId::from(self.helper.crab_signer().public().0); + let crab_signer = self.helper.crab_signer().clone(); + let crab_api = self.helper.crab_api_mut(); if !crab_api.is_relayer(my_id.clone()).await? { log::warn!( @@ -102,9 +105,7 @@ impl CrazyStrategy { "[crazy] Update crab fee: {}", new_fee ); - crab_api - .update_relay_fee(self.helper.crab_signer().clone(), new_fee) - .await?; + crab_api.update_relay_fee(crab_signer, new_fee).await?; Ok(()) } } diff --git a/task/task-darwinia-crab/src/fee/strategy/reasonable_strategy.rs b/task/task-darwinia-crab/src/fee/strategy/reasonable_strategy.rs index 5fef07aa7..4fe73ca4b 100644 --- a/task/task-darwinia-crab/src/fee/strategy/reasonable_strategy.rs +++ b/task/task-darwinia-crab/src/fee/strategy/reasonable_strategy.rs @@ -11,8 +11,8 @@ use crate::fee::strategy::common::StrategyHelper; use crate::fee::UpdateFeeStrategy; use crate::task::DarwiniaCrabTask; -const MIN_RELAY_FEE_DARWINIA: u128 = 15 * common_primitives::COIN; -const MIN_RELAY_FEE_CRAB: u128 = 15 * common_primitives::COIN; +const MIN_RELAY_FEE_DARWINIA: u128 = 15 * darwinia_common_primitives::COIN; +const MIN_RELAY_FEE_CRAB: u128 = 15 * darwinia_common_primitives::COIN; #[derive(Clone)] pub struct ReasonableStrategy { @@ -79,8 +79,8 @@ impl ReasonableStrategy { async fn conversion_darwinia_to_crab( &self, - darwinia_currency: common_primitives::Balance, - ) -> anyhow::Result { + darwinia_currency: darwinia_common_primitives::Balance, + ) -> anyhow::Result { let price_darwinia = self._darwinia_open_price().await?; let price_crab = self._crab_open_price().await?; let rate = price_darwinia / price_crab; @@ -90,8 +90,8 @@ impl ReasonableStrategy { } async fn conversion_crab_to_darwinia( &self, - crab_currency: common_primitives::Balance, - ) -> anyhow::Result { + crab_currency: darwinia_common_primitives::Balance, + ) -> anyhow::Result { let price_darwinia = self._darwinia_open_price().await?; let price_crab = self._crab_open_price().await?; let rate = price_crab / price_darwinia; @@ -103,7 +103,7 @@ impl ReasonableStrategy { #[async_trait::async_trait] impl UpdateFeeStrategy for ReasonableStrategy { - async fn handle(&self) -> anyhow::Result<()> { + async fn handle(&mut self) -> anyhow::Result<()> { let top100_darwinia = self.subscan_darwinia.extrinsics(1, 100).await?; let top100_crab = self.subscan_crab.extrinsics(1, 100).await?; let top100_darwinia = top100_darwinia.data()?.ok_or_else(|| { @@ -137,14 +137,16 @@ impl UpdateFeeStrategy for ReasonableStrategy { let expect_fee_darwinia = MIN_RELAY_FEE_DARWINIA + (top100_max_cost_darwinia * 15); let expect_fee_crab = MIN_RELAY_FEE_CRAB + (top100_max_cost_crab * 15); + let crab_signer = self.helper.crab_signer().clone(); + let darwinia_signer = self.helper.darwinia_signer().clone(); log::info!( target: DarwiniaCrabTask::NAME, "[reasonable] Update crab fee: {}", expect_fee_crab ); - let crab_api = self.helper.crab_api(); + let crab_api = self.helper.crab_api_mut(); crab_api - .update_relay_fee(self.helper.crab_signer().clone(), expect_fee_crab) + .update_relay_fee(crab_signer, expect_fee_crab) .await?; log::info!( @@ -152,9 +154,9 @@ impl UpdateFeeStrategy for ReasonableStrategy { "[reasonable] Update darwinia fee: {}", expect_fee_darwinia ); - let darwinia_api = self.helper.darwinia_api(); + let darwinia_api = self.helper.darwinia_api_mut(); darwinia_api - .update_relay_fee(self.helper.darwinia_signer().clone(), expect_fee_darwinia) + .update_relay_fee(darwinia_signer, expect_fee_darwinia) .await?; Ok(()) } diff --git a/task/task-darwinia-crab/src/fee/traits.rs b/task/task-darwinia-crab/src/fee/traits.rs index fb735cf2c..d5253ca02 100644 --- a/task/task-darwinia-crab/src/fee/traits.rs +++ b/task/task-darwinia-crab/src/fee/traits.rs @@ -1,4 +1,4 @@ #[async_trait::async_trait] pub trait UpdateFeeStrategy { - async fn handle(&self) -> anyhow::Result<()>; + async fn handle(&mut self) -> anyhow::Result<()>; } diff --git a/task/task-darwinia-crab/src/service/fee.rs b/task/task-darwinia-crab/src/service/fee.rs index d5de626e4..3861294b3 100644 --- a/task/task-darwinia-crab/src/service/fee.rs +++ b/task/task-darwinia-crab/src/service/fee.rs @@ -74,14 +74,14 @@ async fn run_update_fee(config_task: TaskConfig) -> anyhow::Result<()> { if !exists_subscan_config { return Ok(()); } - let strategy = CrazyStrategy::new().await?; + let mut strategy = CrazyStrategy::new().await?; strategy.handle().await } UpdateFeeStrategyType::Reasonable => { if !exists_subscan_config { return Ok(()); } - let strategy = ReasonableStrategy::new().await?; + let mut strategy = ReasonableStrategy::new().await?; strategy.handle().await } } diff --git a/task/task-darwinia-crab/src/service/relay.rs b/task/task-darwinia-crab/src/service/relay.rs index 3cc35d68c..fca24fe30 100644 --- a/task/task-darwinia-crab/src/service/relay.rs +++ b/task/task-darwinia-crab/src/service/relay.rs @@ -1,4 +1,4 @@ -use common_primitives::AccountId; +use darwinia_common_primitives::AccountId; use futures::{FutureExt, TryFutureExt}; use lifeline::{Bus, Lifeline, Receiver, Service, Task}; use relay_substrate_client::{AccountIdOf, Chain, Client, TransactionSignScheme}; @@ -116,7 +116,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result if relay_info.create_relayers_fund_accounts { let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< AccountIdOf, - bridge_primitives::AccountIdConverter, + darwinia_bridge_primitives::AccountIdConverter, >(); let relayers_fund_account_balance = darwinia_client .free_native_balance(relayer_fund_acount_id.clone()) @@ -135,7 +135,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< AccountIdOf, - bridge_primitives::AccountIdConverter, + darwinia_bridge_primitives::AccountIdConverter, >(); let relayers_fund_account_balance = crab_client .free_native_balance(relayer_fund_acount_id.clone()) @@ -158,7 +158,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result crab_client.clone(), pangoro_transactions_mortality, DarwiniaFinalityToCrab::new(crab_client.clone(), pangoro_sign.clone()), - common_primitives::DARWINIA_BLOCKS_PER_SESSION, + darwinia_common_primitives::DARWINIA_BLOCKS_PER_SESSION, relay_info.only_mandatory_headers, ); let crab_to_darwinia_on_demand_headers = OnDemandHeadersRelay::new( @@ -166,7 +166,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result darwinia_client.clone(), darwinia_transactions_mortality, CrabFinalityToDarwinia::new(darwinia_client.clone(), darwinia_sign.clone()), - common_primitives::CRAB_BLOCKS_PER_SESSION, + darwinia_common_primitives::CRAB_BLOCKS_PER_SESSION, relay_info.only_mandatory_headers, ); diff --git a/task/task-pangolin-pangoro/Cargo.toml b/task/task-pangolin-pangoro/Cargo.toml index 53ce18948..85f174f45 100644 --- a/task/task-pangolin-pangoro/Cargo.toml +++ b/task/task-pangolin-pangoro/Cargo.toml @@ -64,13 +64,13 @@ component-pangoro-s2s = { path = "../../components/client-pangoro-s2s" } component-subscan = { path = "../../components/subscan" } ## darwinia common -common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } -common-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } +drml-common-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +drml-bridge-primitives = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } +common-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } ## pangolin -pangolin-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } +pangolin-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } ## pangoro -pangoro-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "bump-deps" } +pangoro-runtime = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "v2.7.0-1" } diff --git a/task/task-pangolin-pangoro/src/chains/pangolin.rs b/task/task-pangolin-pangoro/src/chains/pangolin.rs index 2bc0d085b..a9847c27b 100644 --- a/task/task-pangolin-pangoro/src/chains/pangolin.rs +++ b/task/task-pangolin-pangoro/src/chains/pangolin.rs @@ -26,34 +26,34 @@ mod s2s_const { impl ChainConst for PangolinChainConst { const OUTBOUND_LANE_MESSAGE_DETAILS_METHOD: &'static str = - bridge_primitives::TO_PANGOLIN_MESSAGE_DETAILS_METHOD; + drml_bridge_primitives::TO_PANGOLIN_MESSAGE_DETAILS_METHOD; const OUTBOUND_LANE_LATEST_GENERATED_NONCE_METHOD: &'static str = - bridge_primitives::TO_PANGOLIN_LATEST_GENERATED_NONCE_METHOD; + drml_bridge_primitives::TO_PANGOLIN_LATEST_GENERATED_NONCE_METHOD; const OUTBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::TO_PANGOLIN_LATEST_RECEIVED_NONCE_METHOD; + drml_bridge_primitives::TO_PANGOLIN_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_PANGOLIN_LATEST_RECEIVED_NONCE_METHOD; + drml_bridge_primitives::FROM_PANGOLIN_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_PANGOLIN_LATEST_CONFIRMED_NONCE_METHOD; + drml_bridge_primitives::FROM_PANGOLIN_LATEST_CONFIRMED_NONCE_METHOD; const INBOUND_LANE_UNREWARDED_RELAYERS_STATE: &'static str = - bridge_primitives::FROM_PANGOLIN_UNREWARDED_RELAYERS_STATE; + drml_bridge_primitives::FROM_PANGOLIN_UNREWARDED_RELAYERS_STATE; const BEST_FINALIZED_SOURCE_HEADER_ID_AT_TARGET: &'static str = - bridge_primitives::BEST_FINALIZED_PANGOLIN_HEADER_METHOD; + drml_bridge_primitives::BEST_FINALIZED_PANGOLIN_HEADER_METHOD; const BEST_FINALIZED_TARGET_HEADER_ID_AT_SOURCE: &'static str = - bridge_primitives::BEST_FINALIZED_PANGOLIN_HEADER_METHOD; + drml_bridge_primitives::BEST_FINALIZED_PANGOLIN_HEADER_METHOD; const MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; + drml_bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; const MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; + drml_bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; const AVERAGE_BLOCK_INTERVAL: Duration = PangolinChain::AVERAGE_BLOCK_INTERVAL; - const BRIDGE_CHAIN_ID: ChainId = bridge_primitives::PANGOLIN_CHAIN_ID; + const BRIDGE_CHAIN_ID: ChainId = drml_bridge_primitives::PANGOLIN_CHAIN_ID; const MESSAGE_PALLET_NAME_AT_SOURCE: &'static str = - bridge_primitives::WITH_PANGORO_MESSAGES_PALLET_NAME; + drml_bridge_primitives::WITH_PANGORO_MESSAGES_PALLET_NAME; const MESSAGE_PALLET_NAME_AT_TARGET: &'static str = - bridge_primitives::WITH_PANGOLIN_MESSAGES_PALLET_NAME; + drml_bridge_primitives::WITH_PANGOLIN_MESSAGES_PALLET_NAME; const PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_TARGET_CHAIN: Weight = - bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; - type SigningParams = common_primitives::SigningParams; + drml_bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; + type SigningParams = drml_common_primitives::SigningParams; } // === end @@ -110,7 +110,7 @@ mod s2s_headers { type TargetChain = PangoroChain; - fn transactions_author(&self) -> common_primitives::AccountId { + fn transactions_author(&self) -> drml_common_primitives::AccountId { (*self.finality_pipeline.target_sign.public().as_array_ref()).into() } @@ -119,7 +119,7 @@ mod s2s_headers { era: bp_runtime::TransactionEraOf, transaction_nonce: IndexOf, header: component_pangolin_s2s::SyncHeader, - proof: GrandpaJustification, + proof: GrandpaJustification, ) -> Bytes { let call = pangoro_runtime::BridgeGrandpaCall::< pangoro_runtime::Runtime, @@ -216,7 +216,7 @@ mod s2s_messages { type SourceChain = PangolinChain; type TargetChain = PangoroChain; - fn source_transactions_author(&self) -> common_primitives::AccountId { + fn source_transactions_author(&self) -> drml_common_primitives::AccountId { (*self.message_lane.source_sign.public().as_array_ref()).into() } @@ -254,7 +254,7 @@ mod s2s_messages { Bytes(transaction.encode()) } - fn target_transactions_author(&self) -> common_primitives::AccountId { + fn target_transactions_author(&self) -> drml_common_primitives::AccountId { (*self.message_lane.target_sign.public().as_array_ref()).into() } diff --git a/task/task-pangolin-pangoro/src/chains/pangoro.rs b/task/task-pangolin-pangoro/src/chains/pangoro.rs index 34bdcf9cd..5e5936e4f 100644 --- a/task/task-pangolin-pangoro/src/chains/pangoro.rs +++ b/task/task-pangolin-pangoro/src/chains/pangoro.rs @@ -27,34 +27,34 @@ mod s2s_const { impl ChainConst for PangoroChainConst { const OUTBOUND_LANE_MESSAGE_DETAILS_METHOD: &'static str = - bridge_primitives::TO_PANGORO_MESSAGE_DETAILS_METHOD; + drml_bridge_primitives::TO_PANGORO_MESSAGE_DETAILS_METHOD; const OUTBOUND_LANE_LATEST_GENERATED_NONCE_METHOD: &'static str = - bridge_primitives::TO_PANGORO_LATEST_GENERATED_NONCE_METHOD; + drml_bridge_primitives::TO_PANGORO_LATEST_GENERATED_NONCE_METHOD; const OUTBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::TO_PANGORO_LATEST_RECEIVED_NONCE_METHOD; + drml_bridge_primitives::TO_PANGORO_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_PANGORO_LATEST_RECEIVED_NONCE_METHOD; + drml_bridge_primitives::FROM_PANGORO_LATEST_RECEIVED_NONCE_METHOD; const INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD: &'static str = - bridge_primitives::FROM_PANGORO_LATEST_CONFIRMED_NONCE_METHOD; + drml_bridge_primitives::FROM_PANGORO_LATEST_CONFIRMED_NONCE_METHOD; const INBOUND_LANE_UNREWARDED_RELAYERS_STATE: &'static str = - bridge_primitives::FROM_PANGORO_UNREWARDED_RELAYERS_STATE; + drml_bridge_primitives::FROM_PANGORO_UNREWARDED_RELAYERS_STATE; const BEST_FINALIZED_SOURCE_HEADER_ID_AT_TARGET: &'static str = - bridge_primitives::BEST_FINALIZED_PANGORO_HEADER_METHOD; + drml_bridge_primitives::BEST_FINALIZED_PANGORO_HEADER_METHOD; const BEST_FINALIZED_TARGET_HEADER_ID_AT_SOURCE: &'static str = - bridge_primitives::BEST_FINALIZED_PANGORO_HEADER_METHOD; + drml_bridge_primitives::BEST_FINALIZED_PANGORO_HEADER_METHOD; const MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; + drml_bridge_primitives::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; const MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE: MessageNonce = - bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; + drml_bridge_primitives::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; const AVERAGE_BLOCK_INTERVAL: Duration = PangolinChain::AVERAGE_BLOCK_INTERVAL; - const BRIDGE_CHAIN_ID: ChainId = bridge_primitives::PANGORO_CHAIN_ID; + const BRIDGE_CHAIN_ID: ChainId = drml_bridge_primitives::PANGORO_CHAIN_ID; const MESSAGE_PALLET_NAME_AT_SOURCE: &'static str = - bridge_primitives::WITH_PANGOLIN_MESSAGES_PALLET_NAME; + drml_bridge_primitives::WITH_PANGOLIN_MESSAGES_PALLET_NAME; const MESSAGE_PALLET_NAME_AT_TARGET: &'static str = - bridge_primitives::WITH_PANGORO_MESSAGES_PALLET_NAME; + drml_bridge_primitives::WITH_PANGORO_MESSAGES_PALLET_NAME; const PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_TARGET_CHAIN: Weight = - bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; - type SigningParams = common_primitives::SigningParams; + drml_bridge_primitives::PAY_INBOUND_DISPATCH_FEE_WEIGHT; + type SigningParams = drml_common_primitives::SigningParams; } // === end @@ -111,7 +111,7 @@ mod s2s_headers { type TargetChain = PangolinChain; - fn transactions_author(&self) -> common_primitives::AccountId { + fn transactions_author(&self) -> drml_common_primitives::AccountId { (*self.finality_pipeline.target_sign.public().as_array_ref()).into() } @@ -120,7 +120,7 @@ mod s2s_headers { era: bp_runtime::TransactionEraOf, transaction_nonce: IndexOf, header: component_pangoro_s2s::SyncHeader, - proof: GrandpaJustification, + proof: GrandpaJustification, ) -> Bytes { let call = pangolin_runtime::BridgeGrandpaCall::< pangolin_runtime::Runtime, @@ -217,7 +217,7 @@ mod s2s_messages { type SourceChain = PangoroChain; type TargetChain = PangolinChain; - fn source_transactions_author(&self) -> common_primitives::AccountId { + fn source_transactions_author(&self) -> drml_common_primitives::AccountId { (*self.message_lane.source_sign.public().as_array_ref()).into() } @@ -255,7 +255,7 @@ mod s2s_messages { Bytes(transaction.encode()) } - fn target_transactions_author(&self) -> common_primitives::AccountId { + fn target_transactions_author(&self) -> drml_common_primitives::AccountId { (*self.message_lane.target_sign.public().as_array_ref()).into() } diff --git a/task/task-pangolin-pangoro/src/fee/strategy/common.rs b/task/task-pangolin-pangoro/src/fee/strategy/common.rs index 6d1235532..a7c746f8d 100644 --- a/task/task-pangolin-pangoro/src/fee/strategy/common.rs +++ b/task/task-pangolin-pangoro/src/fee/strategy/common.rs @@ -51,12 +51,15 @@ impl StrategyHelper { } impl StrategyHelper { - pub fn pangolin_api(&self) -> &PangolinApi { - &self.pangolin_api + pub fn pangolin_api_mut(&mut self) -> &mut PangolinApi { + &mut self.pangolin_api } - pub fn pangoro_api(&self) -> &PangoroApi { - &self.pangoro_api + pub fn pangoro_api_mut(&mut self) -> &mut PangoroApi { + &mut self.pangoro_api } +} + +impl StrategyHelper { pub fn pangolin_signer(&self) -> &::AccountKeyPair { &self.pangolin_signer } diff --git a/task/task-pangolin-pangoro/src/fee/strategy/crazy_strategy.rs b/task/task-pangolin-pangoro/src/fee/strategy/crazy_strategy.rs index 997cb71d6..fa4b11c59 100644 --- a/task/task-pangolin-pangoro/src/fee/strategy/crazy_strategy.rs +++ b/task/task-pangolin-pangoro/src/fee/strategy/crazy_strategy.rs @@ -1,4 +1,4 @@ -use common_primitives::AccountId; +use drml_common_primitives::AccountId; use sp_core::Pair; use bridge_traits::bridge::task::BridgeSand; @@ -22,7 +22,7 @@ impl CrazyStrategy { #[async_trait::async_trait] impl UpdateFeeStrategy for CrazyStrategy { - async fn handle(&self) -> anyhow::Result<()> { + async fn handle(&mut self) -> anyhow::Result<()> { self.handle_pangolin().await?; self.handle_pangoro().await?; Ok(()) @@ -30,9 +30,10 @@ impl UpdateFeeStrategy for CrazyStrategy { } impl CrazyStrategy { - async fn handle_pangolin(&self) -> anyhow::Result<()> { - let pangolin_api = self.helper.pangolin_api(); + async fn handle_pangolin(&mut self) -> anyhow::Result<()> { let my_id = AccountId::from(self.helper.pangolin_signer().public().0); + let pangolin_signer = self.helper.pangolin_signer().clone(); + let pangolin_api = self.helper.pangolin_api_mut(); if !pangolin_api.is_relayer(my_id.clone()).await? { log::warn!( @@ -64,14 +65,15 @@ impl CrazyStrategy { new_fee ); pangolin_api - .update_relay_fee(self.helper.pangolin_signer().clone(), new_fee) + .update_relay_fee(pangolin_signer, new_fee) .await?; Ok(()) } - async fn handle_pangoro(&self) -> anyhow::Result<()> { - let pangoro_api = self.helper.pangoro_api(); + async fn handle_pangoro(&mut self) -> anyhow::Result<()> { let my_id = AccountId::from(self.helper.pangoro_signer().public().0); + let pangoro_signer = self.helper.pangoro_signer().clone(); + let pangoro_api = self.helper.pangoro_api_mut(); if !pangoro_api.is_relayer(my_id.clone()).await? { log::warn!( @@ -103,7 +105,7 @@ impl CrazyStrategy { new_fee ); pangoro_api - .update_relay_fee(self.helper.pangoro_signer().clone(), new_fee) + .update_relay_fee(pangoro_signer, new_fee) .await?; Ok(()) } diff --git a/task/task-pangolin-pangoro/src/fee/strategy/reasonable_strategy.rs b/task/task-pangolin-pangoro/src/fee/strategy/reasonable_strategy.rs index 29968a800..d32ae03e4 100644 --- a/task/task-pangolin-pangoro/src/fee/strategy/reasonable_strategy.rs +++ b/task/task-pangolin-pangoro/src/fee/strategy/reasonable_strategy.rs @@ -11,8 +11,8 @@ use crate::fee::strategy::common::StrategyHelper; use crate::fee::UpdateFeeStrategy; use crate::task::PangolinPangoroTask; -const MIN_RELAY_FEE_PANGOLIN: u128 = 15 * common_primitives::COIN; -const MIN_RELAY_FEE_PANGORO: u128 = 15 * common_primitives::COIN; +const MIN_RELAY_FEE_PANGOLIN: u128 = 15 * drml_common_primitives::COIN; +const MIN_RELAY_FEE_PANGORO: u128 = 15 * drml_common_primitives::COIN; #[derive(Clone)] pub struct ReasonableStrategy { @@ -80,8 +80,8 @@ impl ReasonableStrategy { async fn conversion_pangolin_to_pangoro( &self, - pangolin_currency: common_primitives::Balance, - ) -> anyhow::Result { + pangolin_currency: drml_common_primitives::Balance, + ) -> anyhow::Result { let price_pangolin = self._pangolin_open_price().await?; let price_pangoro = self._pangoro_open_price().await?; let rate = price_pangolin / price_pangoro; @@ -91,8 +91,8 @@ impl ReasonableStrategy { } async fn conversion_pangoro_to_pangolin( &self, - pangoro_currency: common_primitives::Balance, - ) -> anyhow::Result { + pangoro_currency: drml_common_primitives::Balance, + ) -> anyhow::Result { let price_pangolin = self._pangolin_open_price().await?; let price_pangoro = self._pangoro_open_price().await?; let rate = price_pangoro / price_pangolin; @@ -104,7 +104,7 @@ impl ReasonableStrategy { #[async_trait::async_trait] impl UpdateFeeStrategy for ReasonableStrategy { - async fn handle(&self) -> anyhow::Result<()> { + async fn handle(&mut self) -> anyhow::Result<()> { let top100_pangolin = self.subscan_pangolin.extrinsics(1, 100).await?; let top100_pangoro = self.subscan_pangoro.extrinsics(1, 100).await?; let top100_pangolin = top100_pangolin.data()?.ok_or_else(|| { @@ -145,9 +145,13 @@ impl UpdateFeeStrategy for ReasonableStrategy { "[reasonable] Update pangoro fee: {}", expect_fee_pangoro ); - let pangoro_api = self.helper.pangoro_api(); + + let pangoro_signer = self.helper.pangoro_signer().clone(); + let pangolin_signer = self.helper.pangolin_signer().clone(); + + let pangoro_api = self.helper.pangoro_api_mut(); pangoro_api - .update_relay_fee(self.helper.pangoro_signer().clone(), expect_fee_pangoro) + .update_relay_fee(pangoro_signer, expect_fee_pangoro) .await?; log::info!( @@ -155,9 +159,9 @@ impl UpdateFeeStrategy for ReasonableStrategy { "[reasonable] Update pangolin fee: {}", expect_fee_pangolin ); - let pangolin_api = self.helper.pangolin_api(); + let pangolin_api = self.helper.pangolin_api_mut(); pangolin_api - .update_relay_fee(self.helper.pangolin_signer().clone(), expect_fee_pangolin) + .update_relay_fee(pangolin_signer, expect_fee_pangolin) .await?; Ok(()) } diff --git a/task/task-pangolin-pangoro/src/fee/traits.rs b/task/task-pangolin-pangoro/src/fee/traits.rs index fb735cf2c..d5253ca02 100644 --- a/task/task-pangolin-pangoro/src/fee/traits.rs +++ b/task/task-pangolin-pangoro/src/fee/traits.rs @@ -1,4 +1,4 @@ #[async_trait::async_trait] pub trait UpdateFeeStrategy { - async fn handle(&self) -> anyhow::Result<()>; + async fn handle(&mut self) -> anyhow::Result<()>; } diff --git a/task/task-pangolin-pangoro/src/service/fee.rs b/task/task-pangolin-pangoro/src/service/fee.rs index 34b941c86..a672a7edc 100644 --- a/task/task-pangolin-pangoro/src/service/fee.rs +++ b/task/task-pangolin-pangoro/src/service/fee.rs @@ -74,14 +74,14 @@ async fn run_update_fee(config_task: TaskConfig) -> anyhow::Result<()> { if !exists_subscan_config { return Ok(()); } - let strategy = CrazyStrategy::new().await?; + let mut strategy = CrazyStrategy::new().await?; strategy.handle().await } UpdateFeeStrategyType::Reasonable => { if !exists_subscan_config { return Ok(()); } - let strategy = ReasonableStrategy::new().await?; + let mut strategy = ReasonableStrategy::new().await?; strategy.handle().await } } diff --git a/task/task-pangolin-pangoro/src/service/relay.rs b/task/task-pangolin-pangoro/src/service/relay.rs index 65f3d563c..11b20d6b1 100644 --- a/task/task-pangolin-pangoro/src/service/relay.rs +++ b/task/task-pangolin-pangoro/src/service/relay.rs @@ -1,4 +1,4 @@ -use common_primitives::AccountId; +use drml_common_primitives::AccountId; use futures::{FutureExt, TryFutureExt}; use lifeline::{Bus, Lifeline, Receiver, Service, Task}; use relay_substrate_client::{AccountIdOf, Chain, Client, TransactionSignScheme}; @@ -137,7 +137,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result if relay_info.create_relayers_fund_accounts { let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< AccountIdOf, - bridge_primitives::AccountIdConverter, + drml_bridge_primitives::AccountIdConverter, >(); let relayers_fund_account_balance = pangolin_client .free_native_balance(relayer_fund_acount_id.clone()) @@ -156,7 +156,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< AccountIdOf, - bridge_primitives::AccountIdConverter, + drml_bridge_primitives::AccountIdConverter, >(); let relayers_fund_account_balance = pangoro_client .free_native_balance(relayer_fund_acount_id.clone()) @@ -179,7 +179,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result pangoro_client.clone(), pangoro_transactions_mortality, PangolinFinalityToPangoro::new(pangoro_client.clone(), pangoro_sign.clone()), - common_primitives::PANGOLIN_BLOCKS_PER_SESSION, + drml_common_primitives::PANGOLIN_BLOCKS_PER_SESSION, relay_info.only_mandatory_headers, ); let pangoro_to_pangolin_on_demand_headers = OnDemandHeadersRelay::new( @@ -187,7 +187,7 @@ async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> anyhow::Result pangolin_client.clone(), pangolin_transactions_mortality, PangoroFinalityToPangolin::new(pangolin_client.clone(), pangolin_sign.clone()), - common_primitives::PANGORO_BLOCKS_PER_SESSION, + drml_common_primitives::PANGORO_BLOCKS_PER_SESSION, relay_info.only_mandatory_headers, );