Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lexnv/fix-sync-panic2
Browse files Browse the repository at this point in the history
  • Loading branch information
lexnv committed Nov 25, 2024
2 parents 658154b + c422d8b commit 99a8d1b
Show file tree
Hide file tree
Showing 63 changed files with 1,104 additions and 294 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
forklift cargo check -p rococo-runtime
forklift cargo check -p polkadot-test-runtime
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
cd ./substrate/bin/utils/subkey
forklift cargo build --locked --release
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-frame-omni-bencher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
forklift cargo build --locked --quiet --release -p asset-hub-westend-runtime --features runtime-benchmarks
forklift cargo run --locked --release -p frame-omni-bencher --quiet -- v1 benchmark pallet --runtime target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.compressed.wasm --all --steps 2 --repeat 1 --quiet
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
echo "Running command: $cmd"
eval "$cmd"
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: required
run: cargo +nightly fmt --all -- --check
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cargo clippy --all-targets --locked --workspace --quiet
cargo clippy --all-targets --all-features --locked --workspace --quiet
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand All @@ -62,7 +62,7 @@ jobs:
# experimental code may rely on try-runtime and vice-versa
forklift cargo check --locked --all --features try-runtime,experimental --quiet
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
./check-features-variants.sh
cd -
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
env:
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
retention-days: 1
if-no-files-found: error
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: required
run: WASM_BUILD_NO_COLOR=1 forklift cargo test -p staging-node-cli --release --locked -- --ignored
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand All @@ -63,7 +63,7 @@ jobs:
id: required
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
if: ${{ matrix.partition == '1/3' }}
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api --cargo-quiet
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
--filter-expr " !test(/all_security_features_work/) - test(/nonexistent_cache_dir/)" \
--partition count:${{ matrix.partition }} \
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' }}
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ jobs:

- name: Download artifact (master run)
uses: actions/[email protected]
continue-on-error: true
with:
name: cargo-check-benches-master-${{ github.sha }}
path: ./artifacts/master

- name: Download artifact (current run)
uses: actions/[email protected]
continue-on-error: true
with:
name: cargo-check-benches-current-${{ github.sha }}
path: ./artifacts/current
Expand All @@ -183,6 +185,12 @@ jobs:
exit 0
fi
# fail if no artifacts
if [ ! -d ./artifacts/master ] || [ ! -d ./artifacts/current ]; then
echo "No artifacts found"
exit 1
fi
docker run --rm \
-v $PWD/artifacts/master:/artifacts/master \
-v $PWD/artifacts/current:/artifacts/current \
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cumulus/client/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ workspace = true

[dependencies]
futures = { workspace = true }
futures-timer = { workspace = true }

# Substrate
sc-client-api = { workspace = true, default-features = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down Expand Up @@ -652,6 +653,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -918,6 +920,7 @@ impl pallet_nfts::Config for Runtime {
type WeightInfo = weights::pallet_nfts::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// XCM router instance to BridgeHub with bridging capabilities for `Westend` global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down Expand Up @@ -651,6 +652,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -912,6 +914,7 @@ impl pallet_nfts::Config for Runtime {
type WeightInfo = weights::pallet_nfts::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// XCM router instance to BridgeHub with bridging capabilities for `Rococo` global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down Expand Up @@ -382,6 +383,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// The type used to represent the kinds of proxying allowed.
Expand Down Expand Up @@ -577,6 +578,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// The type used to represent the kinds of proxying allowed.
Expand Down Expand Up @@ -578,6 +579,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
2 changes: 2 additions & 0 deletions cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// The type used to represent the kinds of proxying allowed.
Expand Down Expand Up @@ -520,6 +521,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
2 changes: 2 additions & 0 deletions cumulus/parachains/runtimes/people/people-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = ConstU32<100>;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

/// The type used to represent the kinds of proxying allowed.
Expand Down Expand Up @@ -519,6 +520,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl pallet_utility::Config for Runtime {
Expand Down
9 changes: 7 additions & 2 deletions polkadot/runtime/common/src/paras_sudo_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub use pallet::*;
use polkadot_primitives::Id as ParaId;
use polkadot_runtime_parachains::{
configuration, dmp, hrmp,
paras::{self, AssignCoretime, ParaGenesisArgs},
paras::{self, AssignCoretime, ParaGenesisArgs, ParaKind},
ParaLifecycle,
};

Expand Down Expand Up @@ -80,10 +80,15 @@ pub mod pallet {
genesis: ParaGenesisArgs,
) -> DispatchResult {
ensure_root(origin)?;

let assign_coretime = genesis.para_kind == ParaKind::Parachain;

polkadot_runtime_parachains::schedule_para_initialize::<T>(id, genesis)
.map_err(|_| Error::<T>::ParaAlreadyExists)?;

T::AssignCoretime::assign_coretime(id)?;
if assign_coretime {
T::AssignCoretime::assign_coretime(id)?;
}

Ok(())
}
Expand Down
2 changes: 2 additions & 0 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -971,6 +972,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl parachains_origin::Config for Runtime {}
Expand Down
2 changes: 2 additions & 0 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ impl pallet_multisig::Config for Runtime {
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -1204,6 +1205,7 @@ impl pallet_proxy::Config for Runtime {
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
type AnnouncementDepositFactor = AnnouncementDepositFactor;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

impl parachains_origin::Config for Runtime {}
Expand Down
Loading

0 comments on commit 99a8d1b

Please sign in to comment.