mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-22 03:36:18 +00:00
Update bridges subtree (#1392)
* Move the bridges subtree under root * Squashed 'bridges/' changes from 277f0d5496..e50398d1c5 e50398d1c5 bridges subtree fixes (#2528) 99af07522d Markdown linter (#1309) (#2526) 733ff0fe7a `polkadot-staging` branch: Use polkadot-sdk dependencies (#2524) e8a59f141e Fix benchmark with new XCM::V3 `MAX_INSTRUCTIONS_TO_DECODE` (#2514) 62b185de15 Backport `polkadot-sdk` changes to `polkadot-staging` (#2518) d9658f4d5b Fix equivocation detection containers startup (#2516) (#2517) d65db28a8f Backport: building images from locally built binaries (#2513) 5fdbaf45f6 Start the equivocation detection loop from the complex relayer (#2507) (#2512) 7fbb67de46 Backport: Implement basic equivocations detection loop (#2375) cb7efe245c Manually update deps in polkadot staging (#2371) d17981fc33 #2351 to polkadot-staging (#2359) git-subtree-dir: bridges git-subtree-split: e50398d1c594e4e96df70b0bd376e565d17e8558 * Reapply diener workspacify * Fix Cargo.toml * Fix test * Adjustments
This commit is contained in:
1 parent
fbf5a814f0
commit
142a11ad95
134 files changed
+397
-342
No files matched your search
@@ -39,7 +39,7 @@ rules:
|
||||
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
|
||||
- name: Bridges subtree files
|
||||
check_type: changed_files
|
||||
condition: ^cumulus/bridges/.*
|
||||
condition: ^bridges/.*
|
||||
min_approvals: 1
|
||||
teams:
|
||||
- bridges-core
|
||||
|
||||
File renamed without changes.
+25
-25
@@ -8,31 +8,31 @@ license = "GPL-3.0-only"
|
||||
resolver = "2"
|
||||
|
||||
members = [
|
||||
"cumulus/bridges/bin/runtime-common",
|
||||
"cumulus/bridges/modules/grandpa",
|
||||
"cumulus/bridges/modules/messages",
|
||||
"cumulus/bridges/modules/parachains",
|
||||
"cumulus/bridges/modules/relayers",
|
||||
"cumulus/bridges/modules/xcm-bridge-hub-router",
|
||||
"cumulus/bridges/primitives/chain-asset-hub-kusama",
|
||||
"cumulus/bridges/primitives/chain-asset-hub-polkadot",
|
||||
"cumulus/bridges/primitives/chain-bridge-hub-cumulus",
|
||||
"cumulus/bridges/primitives/chain-bridge-hub-kusama",
|
||||
"cumulus/bridges/primitives/chain-bridge-hub-polkadot",
|
||||
"cumulus/bridges/primitives/chain-bridge-hub-rococo",
|
||||
"cumulus/bridges/primitives/chain-bridge-hub-wococo",
|
||||
"cumulus/bridges/primitives/chain-kusama",
|
||||
"cumulus/bridges/primitives/chain-polkadot",
|
||||
"cumulus/bridges/primitives/chain-rococo",
|
||||
"cumulus/bridges/primitives/chain-wococo",
|
||||
"cumulus/bridges/primitives/header-chain",
|
||||
"cumulus/bridges/primitives/messages",
|
||||
"cumulus/bridges/primitives/parachains",
|
||||
"cumulus/bridges/primitives/polkadot-core",
|
||||
"cumulus/bridges/primitives/relayers",
|
||||
"cumulus/bridges/primitives/runtime",
|
||||
"cumulus/bridges/primitives/test-utils",
|
||||
"cumulus/bridges/primitives/xcm-bridge-hub-router",
|
||||
"bridges/bin/runtime-common",
|
||||
"bridges/modules/grandpa",
|
||||
"bridges/modules/messages",
|
||||
"bridges/modules/parachains",
|
||||
"bridges/modules/relayers",
|
||||
"bridges/modules/xcm-bridge-hub-router",
|
||||
"bridges/primitives/chain-asset-hub-kusama",
|
||||
"bridges/primitives/chain-asset-hub-polkadot",
|
||||
"bridges/primitives/chain-bridge-hub-cumulus",
|
||||
"bridges/primitives/chain-bridge-hub-kusama",
|
||||
"bridges/primitives/chain-bridge-hub-polkadot",
|
||||
"bridges/primitives/chain-bridge-hub-rococo",
|
||||
"bridges/primitives/chain-bridge-hub-wococo",
|
||||
"bridges/primitives/chain-kusama",
|
||||
"bridges/primitives/chain-polkadot",
|
||||
"bridges/primitives/chain-rococo",
|
||||
"bridges/primitives/chain-wococo",
|
||||
"bridges/primitives/header-chain",
|
||||
"bridges/primitives/messages",
|
||||
"bridges/primitives/parachains",
|
||||
"bridges/primitives/polkadot-core",
|
||||
"bridges/primitives/relayers",
|
||||
"bridges/primitives/runtime",
|
||||
"bridges/primitives/test-utils",
|
||||
"bridges/primitives/xcm-bridge-hub-router",
|
||||
"cumulus/client/cli",
|
||||
"cumulus/client/collator",
|
||||
"cumulus/client/consensus/aura",
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+13
-13
@@ -29,24 +29,24 @@ pallet-bridge-relayers = { path = "../../modules/relayers", default-features = f
|
||||
|
||||
# Substrate dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
pallet-transaction-payment = { path = "../../../../substrate/frame/transaction-payment", default-features = false }
|
||||
pallet-utility = { path = "../../../../substrate/frame/utility", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false }
|
||||
sp-io = { path = "../../../../substrate/primitives/io", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../../substrate/primitives/trie", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
pallet-transaction-payment = { path = "../../../substrate/frame/transaction-payment", default-features = false }
|
||||
pallet-utility = { path = "../../../substrate/frame/utility", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false }
|
||||
sp-io = { path = "../../../substrate/primitives/io", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../substrate/primitives/trie", default-features = false }
|
||||
|
||||
# Polkadot dependencies
|
||||
xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../polkadot/xcm/xcm-builder", default-features = false }
|
||||
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { path = "../../primitives/test-utils" }
|
||||
pallet-balances = { path = "../../../../substrate/frame/balances" }
|
||||
pallet-balances = { path = "../../../substrate/frame/balances" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
-13
@@ -27,7 +27,6 @@ use codec::Encode;
|
||||
use frame_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
|
||||
use frame_system::limits;
|
||||
use pallet_bridge_messages::WeightInfoExt as _;
|
||||
use sp_runtime::traits::SignedExtension;
|
||||
|
||||
/// Macro that ensures that the runtime configuration and chain primitives crate are sharing
|
||||
/// the same types (nonce, block number, hash, hasher, account id and header).
|
||||
@@ -347,15 +346,3 @@ pub fn check_message_lane_weights<
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Check that the `AdditionalSigned` type of a wrapped runtime is the same as the one of the
|
||||
/// corresponding actual runtime.
|
||||
///
|
||||
/// This method doesn't perform any `assert`. If the condition is not true it will generate a
|
||||
/// compile-time error.
|
||||
pub fn check_additional_signed<SignedExt, IndirectSignedExt: SignedExtension>()
|
||||
where
|
||||
SignedExt: SignedExtension,
|
||||
IndirectSignedExt: SignedExtension<AdditionalSigned = SignedExt::AdditionalSigned>,
|
||||
{
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,20 +20,20 @@ bp-header-chain = { path = "../../primitives/header-chain", default-features = f
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
sp-consensus-grandpa = { path = "../../../../substrate/primitives/consensus/grandpa", default-features = false, features = ["serde"] }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false, features = ["serde"] }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../../substrate/primitives/trie", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
sp-consensus-grandpa = { path = "../../../substrate/primitives/consensus/grandpa", default-features = false, features = ["serde"] }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false, features = ["serde"] }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../substrate/primitives/trie", default-features = false }
|
||||
|
||||
# Optional Benchmarking Dependencies
|
||||
bp-test-utils = { path = "../../primitives/test-utils", default-features = false, optional = true }
|
||||
frame-benchmarking = { path = "../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { path = "../../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../../substrate/primitives/io" }
|
||||
sp-core = { path = "../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../substrate/primitives/io" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,17 +19,17 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-benchmarking = { path = "../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { path = "../../primitives/test-utils" }
|
||||
pallet-balances = { path = "../../../../substrate/frame/balances" }
|
||||
sp-io = { path = "../../../../substrate/primitives/io" }
|
||||
pallet-balances = { path = "../../../substrate/frame/balances" }
|
||||
sp-io = { path = "../../../substrate/primitives/io" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+8
-8
@@ -20,18 +20,18 @@ pallet-bridge-grandpa = { path = "../grandpa", default-features = false }
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-benchmarking = { path = "../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../../substrate/primitives/trie", default-features = false }
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
sp-trie = { path = "../../../substrate/primitives/trie", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-header-chain = { path = "../../primitives/header-chain" }
|
||||
bp-test-utils = { path = "../../primitives/test-utils" }
|
||||
sp-core = { path = "../../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../../substrate/primitives/io" }
|
||||
sp-core = { path = "../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../substrate/primitives/io" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,19 +20,19 @@ pallet-bridge-messages = { path = "../messages", default-features = false }
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-benchmarking = { path = "../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
sp-arithmetic = { path = "../../../../substrate/primitives/arithmetic", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
sp-arithmetic = { path = "../../../substrate/primitives/arithmetic", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-runtime = { path = "../../primitives/runtime" }
|
||||
pallet-balances = { path = "../../../../substrate/frame/balances" }
|
||||
sp-core = { path = "../../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../../substrate/primitives/io" }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime" }
|
||||
pallet-balances = { path = "../../../substrate/frame/balances" }
|
||||
sp-core = { path = "../../../substrate/primitives/core" }
|
||||
sp-io = { path = "../../../substrate/primitives/io" }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+11
-11
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false }
|
||||
log = { version = "0.4.19", default-features = false }
|
||||
log = { version = "0.4.20", default-features = false }
|
||||
scale-info = { version = "2.8.0", default-features = false, features = ["bit-vec", "derive", "serde"] }
|
||||
|
||||
# Bridge dependencies
|
||||
@@ -17,21 +17,21 @@ bp-xcm-bridge-hub-router = { path = "../../primitives/xcm-bridge-hub-router", de
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-benchmarking = { path = "../../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-benchmarking = { path = "../../../substrate/frame/benchmarking", default-features = false, optional = true }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
# Polkadot Dependencies
|
||||
|
||||
xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../../polkadot/xcm/xcm-builder", default-features = false }
|
||||
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-io = { path = "../../../../substrate/primitives/io" }
|
||||
sp-std = { path = "../../../../substrate/primitives/std" }
|
||||
sp-io = { path = "../../../substrate/primitives/io" }
|
||||
sp-std = { path = "../../../substrate/primitives/std" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -144,5 +144,5 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
|
||||
/// Run pallet test.
|
||||
pub fn run_test<T>(test: impl FnOnce() -> T) -> T {
|
||||
new_test_ext().execute_with(|| test())
|
||||
new_test_ext().execute_with(test)
|
||||
}
|
||||
File renamed without changes.
+1
-1
@@ -11,7 +11,7 @@ codec = { package = "parity-scale-codec", version = "3.1.5", default-features =
|
||||
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
|
||||
|
||||
# Substrate Dependencies
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false }
|
||||
File renamed without changes.
+2
-2
@@ -11,8 +11,8 @@ codec = { package = "parity-scale-codec", version = "3.1.5", default-features =
|
||||
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
|
||||
|
||||
# Substrate Dependencies
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false }
|
||||
File renamed without changes.
+5
-5
@@ -15,13 +15,13 @@ bp-runtime = { path = "../runtime", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
# Polkadot Dependencies
|
||||
polkadot-primitives = { path = "../../../../polkadot/primitives", default-features = false }
|
||||
polkadot-primitives = { path = "../../../polkadot/primitives", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
+5
-86
@@ -23,10 +23,9 @@ pub use bp_polkadot_core::{
|
||||
};
|
||||
|
||||
use bp_messages::*;
|
||||
use bp_polkadot_core::SuffixedCommonSignedExtension;
|
||||
use bp_runtime::extensions::{
|
||||
BridgeRejectObsoleteHeadersAndMessages, ChargeTransactionPayment, CheckEra, CheckGenesis,
|
||||
CheckNonZeroSender, CheckNonce, CheckSpecVersion, CheckTxVersion, CheckWeight,
|
||||
GenericSignedExtension, RefundBridgedParachainMessagesSchema,
|
||||
BridgeRejectObsoleteHeadersAndMessages, RefundBridgedParachainMessagesSchema,
|
||||
};
|
||||
use frame_support::{
|
||||
dispatch::DispatchClass,
|
||||
@@ -133,88 +132,8 @@ pub const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 1024;
|
||||
/// analysis (like the one above).
|
||||
pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 4096;
|
||||
|
||||
/// Extra signed extension data that is used by all bridge hubs.
|
||||
pub type SignedExtra = (
|
||||
CheckNonZeroSender,
|
||||
CheckSpecVersion,
|
||||
CheckTxVersion,
|
||||
CheckGenesis<Hash>,
|
||||
CheckEra<Hash>,
|
||||
CheckNonce<Nonce>,
|
||||
CheckWeight,
|
||||
ChargeTransactionPayment<Balance>,
|
||||
/// Signed extension that is used by all bridge hubs.
|
||||
pub type SignedExtension = SuffixedCommonSignedExtension<(
|
||||
BridgeRejectObsoleteHeadersAndMessages,
|
||||
RefundBridgedParachainMessagesSchema,
|
||||
);
|
||||
|
||||
/// Signed extension that is used by all bridge hubs.
|
||||
pub type SignedExtension = GenericSignedExtension<SignedExtra>;
|
||||
|
||||
/// Helper trait to define some extra methods on bridge hubs signed extension (and
|
||||
/// overcome Rust limitations).
|
||||
pub trait BridgeHubSignedExtension {
|
||||
/// Create signed extension from its components.
|
||||
fn from_params(
|
||||
spec_version: u32,
|
||||
transaction_version: u32,
|
||||
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
|
||||
genesis_hash: Hash,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
) -> Self;
|
||||
|
||||
/// Return transaction nonce.
|
||||
fn nonce(&self) -> Nonce;
|
||||
|
||||
/// Return transaction tip.
|
||||
fn tip(&self) -> Balance;
|
||||
}
|
||||
|
||||
impl BridgeHubSignedExtension for SignedExtension {
|
||||
/// Create signed extension from its components.
|
||||
fn from_params(
|
||||
spec_version: u32,
|
||||
transaction_version: u32,
|
||||
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
|
||||
genesis_hash: Hash,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
) -> Self {
|
||||
GenericSignedExtension::new(
|
||||
(
|
||||
(), // non-zero sender
|
||||
(), // spec version
|
||||
(), // tx version
|
||||
(), // genesis
|
||||
era.frame_era(), // era
|
||||
nonce.into(), // nonce (compact encoding)
|
||||
(), // Check weight
|
||||
tip.into(), // transaction payment / tip (compact encoding)
|
||||
(), // bridge reject obsolete headers and msgs
|
||||
(), // bridge reward to relayer for message passing
|
||||
),
|
||||
Some((
|
||||
(),
|
||||
spec_version,
|
||||
transaction_version,
|
||||
genesis_hash,
|
||||
era.signed_payload(genesis_hash),
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
||||
/// Return transaction nonce.
|
||||
fn nonce(&self) -> Nonce {
|
||||
self.payload.5 .0
|
||||
}
|
||||
|
||||
/// Return transaction tip.
|
||||
fn tip(&self) -> Balance {
|
||||
self.payload.7 .0
|
||||
}
|
||||
}
|
||||
)>;
|
||||
+4
-4
@@ -15,10 +15,10 @@ bp-messages = { path = "../messages", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
+4
-4
@@ -16,10 +16,10 @@ bp-messages = { path = "../messages", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
+4
-4
@@ -15,10 +15,10 @@ bp-messages = { path = "../messages", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
+4
-4
@@ -16,10 +16,10 @@ bp-messages = { path = "../messages", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
File renamed without changes.
+3
-3
@@ -16,9 +16,9 @@ bp-runtime = { path = "../runtime", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
+3
@@ -57,6 +57,9 @@ impl ChainWithGrandpa for Kusama {
|
||||
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
|
||||
}
|
||||
|
||||
// The SignedExtension used by Kusama.
|
||||
pub use bp_polkadot_core::CommonSignedExtension as SignedExtension;
|
||||
|
||||
/// Name of the parachains pallet in the Kusama runtime.
|
||||
pub const PARAS_PALLET_NAME: &str = "Paras";
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ bp-runtime = { path = "../runtime", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
+4
-1
@@ -21,7 +21,7 @@
|
||||
pub use bp_polkadot_core::*;
|
||||
|
||||
use bp_header_chain::ChainWithGrandpa;
|
||||
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain};
|
||||
use bp_runtime::{decl_bridge_finality_runtime_apis, extensions::PrevalidateAttests, Chain};
|
||||
use frame_support::weights::Weight;
|
||||
use sp_std::prelude::Vec;
|
||||
|
||||
@@ -57,6 +57,9 @@ impl ChainWithGrandpa for Polkadot {
|
||||
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
|
||||
}
|
||||
|
||||
/// The SignedExtension used by Polkadot.
|
||||
pub type SignedExtension = SuffixedCommonSignedExtension<PrevalidateAttests>;
|
||||
|
||||
/// Name of the parachains pallet in the Polkadot runtime.
|
||||
pub const PARAS_PALLET_NAME: &str = "Paras";
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ bp-runtime = { path = "../runtime", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
+3
@@ -61,6 +61,9 @@ parameter_types! {
|
||||
pub const SS58Prefix: u8 = 42;
|
||||
}
|
||||
|
||||
// The SignedExtension used by Rococo.
|
||||
pub use bp_polkadot_core::CommonSignedExtension as SignedExtension;
|
||||
|
||||
/// Name of the parachains pallet in the Rococo runtime.
|
||||
pub const PARAS_PALLET_NAME: &str = "Paras";
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ bp-rococo = { path = "../chain-rococo", default-features = false }
|
||||
|
||||
# Substrate Based Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
+3
@@ -60,6 +60,9 @@ impl ChainWithGrandpa for Wococo {
|
||||
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
|
||||
}
|
||||
|
||||
// The SignedExtension used by Wococo.
|
||||
pub use bp_rococo::CommonSignedExtension as SignedExtension;
|
||||
|
||||
/// Name of the With-Wococo GRANDPA pallet instance that is deployed at bridged chains.
|
||||
pub const WITH_WOCOCO_GRANDPA_PALLET_NAME: &str = "BridgeWococoGrandpa";
|
||||
|
||||
+5
-5
@@ -18,11 +18,11 @@ bp-runtime = { path = "../runtime", default-features = false }
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false, features = ["serde"] }
|
||||
sp-consensus-grandpa = { path = "../../../../substrate/primitives/consensus/grandpa", default-features = false, features = ["serde"] }
|
||||
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false, features = ["serde"] }
|
||||
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
|
||||
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false, features = ["serde"] }
|
||||
sp-consensus-grandpa = { path = "../../../substrate/primitives/consensus/grandpa", default-features = false, features = ["serde"] }
|
||||
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false, features = ["serde"] }
|
||||
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bp-test-utils = { path = "../test-utils" }
|
||||
+5
-1
@@ -97,7 +97,11 @@ impl<H: HeaderT> GrandpaJustification<H> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: HeaderT> crate::FinalityProof<H::Number> for GrandpaJustification<H> {
|
||||
impl<H: HeaderT> crate::FinalityProof<H::Hash, H::Number> for GrandpaJustification<H> {
|
||||
fn target_header_hash(&self) -> H::Hash {
|
||||
self.commit.target_hash
|
||||
}
|
||||
|
||||
fn target_header_number(&self) -> H::Number {
|
||||
self.commit.target_number
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
-2
@@ -127,7 +127,10 @@ pub struct InitializationData<H: HeaderT> {
|
||||
}
|
||||
|
||||
/// Abstract finality proof that is justifying block finality.
|
||||
pub trait FinalityProof<Number>: Clone + Send + Sync + Debug {
|
||||
pub trait FinalityProof<Hash, Number>: Clone + Send + Sync + Debug {
|
||||
/// Return hash of header that this proof is generated for.
|
||||
fn target_header_hash(&self) -> Hash;
|
||||
|
||||
/// Return number of header that this proof is generated for.
|
||||
fn target_header_number(&self) -> Number;
|
||||
}
|
||||
@@ -209,7 +212,7 @@ impl<Header: HeaderT> TryFrom<StoredHeaderGrandpaInfo<Header>> for HeaderGrandpa
|
||||
/// Helper trait for finding equivocations in finality proofs.
|
||||
pub trait FindEquivocations<FinalityProof, FinalityVerificationContext, EquivocationProof> {
|
||||
/// The type returned when encountering an error while looking for equivocations.
|
||||
type Error;
|
||||
type Error: Debug;
|
||||
|
||||
/// Find equivocations.
|
||||
fn find_equivocations(
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 134 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user