Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit a0511f1

Browse files
EgorPopelyaevdependabot[bot]rphmeierbkonturbkchr
committed
[Backport] missing fellowship prs (#2891)
* Update substrate dependecies * Bump serde from 1.0.167 to 1.0.168 (#2848) Bumps [serde](https://github.com/serde-rs/serde) from 1.0.167 to 1.0.168. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.167...v1.0.168) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Asynchronous-backing compatible Aura, not plugged in (#2573) * rough draft of potential parent search * get things compiling * fmt * add new function to all RelayChainInterface implementations * fix compilation * set slot and timestamp based on relay parent, prepare for find-parent * skeleton of new aura logic * fmt * introduce a collator module in the Aura crate * extract different implementations into own modules * make interface more convenient * docs and todos for lookahead * refactor basic collator to use new collator utility * some more refactoring * finish most of the control flow for new aura * introduce backend as parameter * fix compilation * fix a couple more TODOs * add an `announce_block` function to collator service * announce with barrier * rename block announcement validator to be more specific * fmt * clean up unused import errors * update references to BlockAnnounceValidator * rename unstable_reimpl * add AuraUnincludedSegmentApi * finish rename * integrate AuraUnincludedSegmentApi * add a new block announcement validator for backwards compatibility * add some naive equivocation defenses * rustfmt * clean up remaining TODO [now]s * fmt * try to fix inprocess-interface * actually fix compilation * ignored -> rejected rephrase * fix test compilation * fmt * clippy * Bump substrate (because of failing asset-hub-westend benchmarks) (#2853) * Bump substrate (because of failing asset-hub-westend benchmarks) * Cargo.lock * Update to compatible substrate vs polkadot * Companion for removal of execution strategies (#2836) * Companion for removal of execution strategies paritytech/substrate#14387 * Update Cargo.lock * Remove patches * Delete file again * update lockfile for {"polkadot", "substrate"} * Fix * FMT --------- Co-authored-by: parity-processbot <> * `GenesisBuild<T,I>` deprecated. `BuildGenesisConfig` added (#2757) * GenesisBuild<T,I> deprecated. BuildGenesisConfig added * ".git/.scripts/commands/fmt/fmt.sh" * integration-tests/emulated: ..Default::default added to genesis configs * Cargo.lock updated * Cargo.lock updated * update lockfile for {"polkadot", "substrate"} * clippy fixes * clippy fixes * clippy fixes again --------- Co-authored-by: command-bot <> * Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#2790) * Fixes * Removes unused import * Uses Block and removes BlockNumber/Header from Chain * Fixes bridges * Fixes * Removes unused import * Fixes build * Uses correct RelayBlock * Minor fix * Fixes glutton-kusama * Uses correct RelayBlock * Minor fix * Fixes benchmark for pallet-bridge-parachains * Adds appropriate constraints * Minor fixes * Removes unused import * Fixes integrity tests * Minor fixes * Updates trait bounds * Uses custom bound for AsPrimitive * Fixes trait bounds * Revert "Fixes trait bounds" This reverts commit 0b0f42f. * Revert "Uses custom bound for AsPrimitive" This reverts commit 838e528. * No AsPrimitive trait bound for now * Removes bounds on Number * update lockfile for {"substrate", "polkadot"} * Formatting * ".git/.scripts/commands/fmt/fmt.sh" * Minor fix --------- Co-authored-by: parity-processbot <> * Replace Index for Nonce (#2740) * replace Index for Nonce * update lockfile for {"substrate", "polkadot"} --------- Co-authored-by: parity-processbot <> * Bump clap from 4.3.11 to 4.3.12 (#2873) Bumps [clap](https://github.com/clap-rs/clap) from 4.3.11 to 4.3.12. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@v4.3.11...v4.3.12) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump proc-macro2 from 1.0.63 to 1.0.64 (#2849) Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.63 to 1.0.64. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](dtolnay/proc-macro2@1.0.63...1.0.64) --- updated-dependencies: - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.23 to 2.0.25 (#2847) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.23 to 2.0.25. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](dtolnay/syn@2.0.23...2.0.25) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump serde from 1.0.168 to 1.0.171 (#2855) Bumps [serde](https://github.com/serde-rs/serde) from 1.0.168 to 1.0.171. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.168...v1.0.171) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump serde_json from 1.0.100 to 1.0.102 (#2859) Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.100 to 1.0.102. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](serde-rs/json@v1.0.100...v1.0.102) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix duplication issue * Update polkadot and substrate deps * Removed `--execution wasm` (#2857) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asynchronous rob <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Michal Kucharczyk <[email protected]> Co-authored-by: gupnik <[email protected]> Co-authored-by: Juan <[email protected]>
1 parent a188eb9 commit a0511f1

File tree

185 files changed

+3722
-2745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+3722
-2745
lines changed

Cargo.lock

Lines changed: 349 additions & 316 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ members = [
3030
"pallets/xcmp-queue",
3131
"parachain-template/node",
3232
"parachain-template/runtime",
33+
"primitives/aura",
3334
"primitives/core",
3435
"primitives/parachain-inherent",
3536
"primitives/timestamp",
@@ -74,3 +75,4 @@ opt-level = 3
7475
inherits = "release"
7576
lto = true
7677
codegen-units = 1
78+

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ cargo build --release --bin polkadot-parachain
153153
./target/release/polkadot-parachain export-genesis-wasm > genesis-wasm
154154

155155
# Collator1
156-
./target/release/polkadot-parachain --collator --alice --force-authoring --tmp --port 40335 --ws-port 9946 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30335
156+
./target/release/polkadot-parachain --collator --alice --force-authoring --tmp --port 40335 --rpc-port 9946 -- --chain ../polkadot/rococo-local-cfde.json --port 30335
157157

158158
# Collator2
159-
./target/release/polkadot-parachain --collator --bob --force-authoring --tmp --port 40336 --ws-port 9947 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30336
159+
./target/release/polkadot-parachain --collator --bob --force-authoring --tmp --port 40336 --rpc-port 9947 -- --chain ../polkadot/rococo-local-cfde.json --port 30336
160160

161161
# Parachain Full Node 1
162-
./target/release/polkadot-parachain --tmp --port 40337 --ws-port 9948 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30337
162+
./target/release/polkadot-parachain --tmp --port 40337 --rpc-port 9948 -- --chain ../polkadot/rococo-local-cfde.json --port 30337
163163
```
164164

165165
#### Register the parachain
@@ -267,5 +267,5 @@ docker build --tag $OWNER/$IMAGE_NAME --file ./docker/polkadot-parachain_builder
267267
You may then run your new container:
268268

269269
```bash
270-
docker run --rm -it $OWNER/$IMAGE_NAME --collator --tmp --execution wasm --chain /specs/westmint.json
270+
docker run --rm -it $OWNER/$IMAGE_NAME --collator --tmp --chain /specs/westmint.json
271271
```

bridges/bin/runtime-common/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ pallet-bridge-relayers = { path = "../../modules/relayers", default-features = f
2828

2929
# Substrate dependencies
3030

31-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
32-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
33-
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
34-
pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
35-
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
36-
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
37-
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
38-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
39-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
40-
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
31+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
32+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
33+
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
34+
pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
35+
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
36+
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
37+
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
38+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
39+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
40+
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
4141

4242
# Polkadot dependencies
43-
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v1.0.0" }
44-
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v1.0.0" }
43+
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v1.0.0-cumulus" }
44+
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v1.0.0-cumulus" }
4545

4646
[dev-dependencies]
4747
bp-test-utils = { path = "../../primitives/test-utils" }
48-
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
48+
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "release-v1.0.0-cumulus" }
4949

5050
[features]
5151
default = ["std"]

bridges/bin/runtime-common/src/integrity.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ use pallet_bridge_messages::WeightInfoExt as _;
3030
use sp_runtime::traits::SignedExtension;
3131

3232
/// Macro that ensures that the runtime configuration and chain primitives crate are sharing
33-
/// the same types (index, block number, hash, hasher, account id and header).
33+
/// the same types (nonce, block number, hash, hasher, account id and header).
3434
#[macro_export]
3535
macro_rules! assert_chain_types(
3636
( runtime: $r:path, this_chain: $this:path ) => {
3737
{
3838
// if one of asserts fail, then either bridge isn't configured properly (or alternatively - non-standard
3939
// configuration is used), or something has broke existing configuration (meaning that all bridged chains
4040
// and relays will stop functioning)
41-
use frame_system::Config as SystemConfig;
41+
use frame_system::{Config as SystemConfig, pallet_prelude::*};
4242
use static_assertions::assert_type_eq_all;
4343

44-
assert_type_eq_all!(<$r as SystemConfig>::Index, bp_runtime::IndexOf<$this>);
45-
assert_type_eq_all!(<$r as SystemConfig>::BlockNumber, bp_runtime::BlockNumberOf<$this>);
44+
assert_type_eq_all!(<$r as SystemConfig>::Nonce, bp_runtime::NonceOf<$this>);
45+
assert_type_eq_all!(BlockNumberFor<$r>, bp_runtime::BlockNumberOf<$this>);
4646
assert_type_eq_all!(<$r as SystemConfig>::Hash, bp_runtime::HashOf<$this>);
4747
assert_type_eq_all!(<$r as SystemConfig>::Hashing, bp_runtime::HasherOf<$this>);
4848
assert_type_eq_all!(<$r as SystemConfig>::AccountId, bp_runtime::AccountIdOf<$this>);
49-
assert_type_eq_all!(<$r as SystemConfig>::Header, bp_runtime::HeaderOf<$this>);
49+
assert_type_eq_all!(HeaderFor<$r>, bp_runtime::HeaderOf<$this>);
5050
}
5151
}
5252
);

bridges/bin/runtime-common/src/mock.rs

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,8 @@ pub type ThisChainHasher = BlakeTwo256;
6363
pub type ThisChainRuntimeCall = RuntimeCall;
6464
/// Runtime call origin at `ThisChain`.
6565
pub type ThisChainCallOrigin = RuntimeOrigin;
66-
/// Header of `ThisChain`.
67-
pub type ThisChainHeader = sp_runtime::generic::Header<ThisChainBlockNumber, ThisChainHasher>;
68-
/// Block of `ThisChain`.
69-
pub type ThisChainBlock = frame_system::mocking::MockBlock<TestRuntime>;
70-
/// Unchecked extrinsic of `ThisChain`.
71-
pub type ThisChainUncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
66+
// Block of `ThisChain`.
67+
pub type ThisChainBlock = frame_system::mocking::MockBlockU32<TestRuntime>;
7268

7369
/// Account identifier at the `BridgedChain`.
7470
pub type BridgedChainAccountId = u128;
@@ -83,6 +79,8 @@ pub type BridgedChainHasher = BlakeTwo256;
8379
/// Header of the `BridgedChain`.
8480
pub type BridgedChainHeader =
8581
sp_runtime::generic::Header<BridgedChainBlockNumber, BridgedChainHasher>;
82+
/// Block of the `BridgedChain`.
83+
pub type BridgedChainBlock = frame_system::mocking::MockBlockU32<TestRuntime>;
8684

8785
/// Rewards payment procedure.
8886
pub type TestPaymentProcedure = PayRewardFromAccount<Balances, ThisChainAccountId>;
@@ -108,12 +106,9 @@ pub const BRIDGED_CHAIN_MAX_EXTRINSIC_WEIGHT: usize = 2048;
108106
pub const BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE: u32 = 1024;
109107

110108
frame_support::construct_runtime! {
111-
pub enum TestRuntime where
112-
Block = ThisChainBlock,
113-
NodeBlock = ThisChainBlock,
114-
UncheckedExtrinsic = ThisChainUncheckedExtrinsic,
109+
pub enum TestRuntime
115110
{
116-
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
111+
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
117112
Utility: pallet_utility,
118113
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
119114
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
@@ -148,14 +143,13 @@ parameter_types! {
148143

149144
impl frame_system::Config for TestRuntime {
150145
type RuntimeOrigin = RuntimeOrigin;
151-
type Index = u64;
146+
type Nonce = u64;
152147
type RuntimeCall = RuntimeCall;
153-
type BlockNumber = ThisChainBlockNumber;
154148
type Hash = ThisChainHash;
155149
type Hashing = ThisChainHasher;
156150
type AccountId = ThisChainAccountId;
157151
type Lookup = IdentityLookup<Self::AccountId>;
158-
type Header = ThisChainHeader;
152+
type Block = ThisChainBlock;
159153
type RuntimeEvent = RuntimeEvent;
160154
type BlockHashCount = ConstU32<250>;
161155
type Version = ();
@@ -318,13 +312,12 @@ impl From<BridgedChainOrigin>
318312
pub struct ThisUnderlyingChain;
319313

320314
impl Chain for ThisUnderlyingChain {
321-
type BlockNumber = ThisChainBlockNumber;
315+
type Block = ThisChainBlock;
322316
type Hash = ThisChainHash;
323317
type Hasher = ThisChainHasher;
324-
type Header = ThisChainHeader;
325318
type AccountId = ThisChainAccountId;
326319
type Balance = ThisChainBalance;
327-
type Index = u32;
320+
type Nonce = u32;
328321
type Signature = sp_runtime::MultiSignature;
329322

330323
fn max_extrinsic_size() -> u32 {
@@ -358,13 +351,12 @@ pub struct BridgedUnderlyingParachain;
358351
pub struct BridgedChainCall;
359352

360353
impl Chain for BridgedUnderlyingChain {
361-
type BlockNumber = BridgedChainBlockNumber;
354+
type Block = BridgedChainBlock;
362355
type Hash = BridgedChainHash;
363356
type Hasher = BridgedChainHasher;
364-
type Header = BridgedChainHeader;
365357
type AccountId = BridgedChainAccountId;
366358
type Balance = BridgedChainBalance;
367-
type Index = u32;
359+
type Nonce = u32;
368360
type Signature = sp_runtime::MultiSignature;
369361

370362
fn max_extrinsic_size() -> u32 {
@@ -384,13 +376,12 @@ impl ChainWithGrandpa for BridgedUnderlyingChain {
384376
}
385377

386378
impl Chain for BridgedUnderlyingParachain {
387-
type BlockNumber = BridgedChainBlockNumber;
379+
type Block = BridgedChainBlock;
388380
type Hash = BridgedChainHash;
389381
type Hasher = BridgedChainHasher;
390-
type Header = BridgedChainHeader;
391382
type AccountId = BridgedChainAccountId;
392383
type Balance = BridgedChainBalance;
393-
type Index = u32;
384+
type Nonce = u32;
394385
type Signature = sp_runtime::MultiSignature;
395386

396387
fn max_extrinsic_size() -> u32 {

bridges/bin/runtime-common/src/parachains_benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where
4646
+ pallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>,
4747
PI: 'static,
4848
<R as pallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>>::BridgedChain:
49-
bp_runtime::Chain<BlockNumber = RelayBlockNumber, Hash = RelayBlockHash>,
49+
bp_runtime::Chain<Block = pallet_bridge_parachains::RelayBlock, Hash = RelayBlockHash>,
5050
{
5151
let parachain_head = ParaHead(vec![0u8; parachain_head_size as usize]);
5252

bridges/bin/runtime-common/src/refund_relayer_extension.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::messages_call_ext::{
2424
};
2525
use bp_messages::{LaneId, MessageNonce};
2626
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
27-
use bp_runtime::{Parachain, ParachainIdOf, RangeInclusiveExt, StaticStrProvider};
27+
use bp_runtime::{Chain, Parachain, ParachainIdOf, RangeInclusiveExt, StaticStrProvider};
2828
use codec::{Decode, Encode};
2929
use frame_support::{
3030
dispatch::{CallableCallFor, DispatchInfo, Dispatchable, PostDispatchInfo},
@@ -47,7 +47,10 @@ use pallet_transaction_payment::{Config as TransactionPaymentConfig, OnChargeTra
4747
use pallet_utility::{Call as UtilityCall, Config as UtilityConfig, Pallet as UtilityPallet};
4848
use scale_info::TypeInfo;
4949
use sp_runtime::{
50-
traits::{DispatchInfoOf, Get, PostDispatchInfoOf, SignedExtension, Zero},
50+
traits::{
51+
Block as BlockT, DispatchInfoOf, Get, Header as HeaderT, PostDispatchInfoOf,
52+
SignedExtension, Zero,
53+
},
5154
transaction_validity::{
5255
TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransactionBuilder,
5356
},
@@ -278,6 +281,7 @@ where
278281
+ GrandpaCallSubType<Runtime, Runtime::BridgesGrandpaPalletInstance>
279282
+ ParachainsCallSubType<Runtime, Para::Instance>
280283
+ MessagesCallSubType<Runtime, Msgs::Instance>,
284+
<<<Runtime as BoundedBridgeGrandpaConfig<Runtime::BridgesGrandpaPalletInstance>>::BridgedRelayChain as Chain>::Block as BlockT>::Header: HeaderT<Number = RelayBlockNumber>
281285
{
282286
fn expand_call<'a>(&self, call: &'a CallOf<Runtime>) -> Vec<&'a CallOf<Runtime>> {
283287
match call.is_sub_type() {
@@ -525,6 +529,7 @@ where
525529
+ GrandpaCallSubType<Runtime, Runtime::BridgesGrandpaPalletInstance>
526530
+ ParachainsCallSubType<Runtime, Para::Instance>
527531
+ MessagesCallSubType<Runtime, Msgs::Instance>,
532+
<<<Runtime as BoundedBridgeGrandpaConfig<Runtime::BridgesGrandpaPalletInstance>>::BridgedRelayChain as Chain>::Block as BlockT>::Header: HeaderT<Number = RelayBlockNumber>
528533
{
529534
const IDENTIFIER: &'static str = Id::STR;
530535
type AccountId = Runtime::AccountId;

bridges/modules/grandpa/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ bp-header-chain = { path = "../../primitives/header-chain", default-features = f
2020

2121
# Substrate Dependencies
2222

23-
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
24-
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
25-
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["serde"] , branch = "polkadot-v1.0.0" }
26-
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["serde"] , branch = "polkadot-v1.0.0" }
27-
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
28-
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v1.0.0" }
23+
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
24+
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
25+
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["serde"] , branch = "release-v1.0.0-cumulus" }
26+
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["serde"] , branch = "release-v1.0.0-cumulus" }
27+
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
28+
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "release-v1.0.0-cumulus" }
2929

3030
# Optional Benchmarking Dependencies
3131
bp-test-utils = { path = "../../primitives/test-utils", default-features = false, optional = true }
32-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v1.0.0" }
32+
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "release-v1.0.0-cumulus" }
3333

3434
[dev-dependencies]
35-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
36-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
35+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "release-v1.0.0-cumulus" }
36+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "release-v1.0.0-cumulus" }
3737

3838
[features]
3939
default = ["std"]

bridges/modules/grandpa/src/call_ext.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use bp_header_chain::{justification::GrandpaJustification, ChainWithGrandpa};
1919
use bp_runtime::BlockNumberOf;
2020
use codec::Encode;
2121
use frame_support::{dispatch::CallableCallFor, traits::IsSubType, weights::Weight, RuntimeDebug};
22+
use frame_system::pallet_prelude::HeaderFor;
2223
use sp_runtime::{
2324
traits::{Header, Zero},
2425
transaction_validity::{InvalidTransaction, TransactionValidity, ValidTransaction},
@@ -178,8 +179,9 @@ pub(crate) fn submit_finality_proof_info_from_args<T: Config<I>, I: 'static>(
178179

179180
/// Returns maximal expected size of `submit_finality_proof` call arguments.
180181
fn max_expected_call_size<T: Config<I>, I: 'static>(required_precommits: u32) -> u32 {
181-
let max_expected_justification_size =
182-
GrandpaJustification::max_reasonable_size::<T::BridgedChain>(required_precommits);
182+
let max_expected_justification_size = GrandpaJustification::<HeaderFor<T>>::max_reasonable_size::<
183+
T::BridgedChain,
184+
>(required_precommits);
183185

184186
// call arguments are header and justification
185187
T::BridgedChain::MAX_HEADER_SIZE.saturating_add(max_expected_justification_size)

0 commit comments

Comments
 (0)