Commits on Source (45)
......@@ -5,28 +5,41 @@ on:
- Review-Trigger
types:
- completed
workflow_dispatch:
inputs:
pr-number:
description: "Number of the PR to evaluate"
required: true
type: number
jobs:
review-approvals:
runs-on: ubuntu-latest
environment: master
steps:
- name: Generate token
id: app_token
uses: actions/[email protected]
with:
app-id: ${{ secrets.REVIEW_APP_ID }}
private-key: ${{ secrets.REVIEW_APP_KEY }}
- name: Extract content of artifact
if: ${{ !inputs.pr-number }}
id: number
uses: Bullrich/[email protected].0
uses: Bullrich/[email protected].1
with:
artifact-name: pr_number
- name: Generate token
id: app_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/[email protected]
with:
repo-token: ${{ steps.app_token.outputs.token }}
team-token: ${{ steps.app_token.outputs.token }}
checks-token: ${{ steps.app_token.outputs.token }}
pr-number: ${{ steps.number.outputs.content }}
# This is extracted from the triggering event
pr-number: ${{ inputs.pr-number || steps.number.outputs.content }}
request-reviewers: true
- name: Log payload
if: ${{ failure() || runner.debug }}
run: echo "::debug::$payload"
env:
payload: ${{ toJson(github.event) }}
......@@ -45,7 +45,7 @@ jobs:
# We request them to review again
echo $REVIEWERS | gh api --method POST repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers --input -
echo "::error::Project needs to be reviewed again"
exit 1
env:
......@@ -53,7 +53,7 @@ jobs:
- name: Comment requirements
# If the previous step failed and github-actions hasn't commented yet we comment instructions
if: failure() && !contains(fromJson(steps.comments.outputs.bodies), 'Review required! Latest push from author must always be reviewed')
run: |
run: |
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Review required! Latest push from author must always be reviewed"
env:
GH_TOKEN: ${{ github.token }}
......@@ -65,7 +65,7 @@ jobs:
echo "Saving PR number: $PR_NUMBER"
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Save PR number
with:
name: pr_number
......
......@@ -61,7 +61,7 @@ jobs:
- name: Install toml-cli
run: cargo install --git https://github.com/gnprice/toml-cli --rev ea69e9d2ca4f0f858110dc7a5ae28bcb918c07fb # v0.2.3
- name: Install Polkadot SDK Version Manager
run: cargo install --git https://github.com/paritytech/psvm --rev c41261ffb52ab0c115adbbdb17e2cb7900d2bdfd psvm # master
run: cargo install --git https://github.com/paritytech/psvm psvm
- name: Rust compilation prerequisites
run: |
sudo apt update
......
......@@ -74,6 +74,8 @@ publish-subsystem-benchmarks:
artifacts: true
- job: subsystem-benchmark-availability-distribution
artifacts: true
- job: subsystem-benchmark-approval-voting
artifacts: true
- job: publish-rustdoc
artifacts: false
script:
......@@ -115,6 +117,8 @@ trigger_workflow:
artifacts: true
- job: subsystem-benchmark-availability-distribution
artifacts: true
- job: subsystem-benchmark-approval-voting
artifacts: true
script:
- echo "Triggering workflow"
- >
......
......@@ -511,7 +511,7 @@ test-syscalls:
fi
allow_failure: false # this rarely triggers in practice
subsystem-benchmark-availability-recovery:
.subsystem-benchmark-template:
stage: test
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
......@@ -523,26 +523,26 @@ subsystem-benchmark-availability-recovery:
- .docker-env
- .common-refs
- .run-immediately
script:
- cargo bench -p polkadot-availability-recovery --bench availability-recovery-regression-bench --features subsystem-benchmarks
tags:
- benchmark
subsystem-benchmark-availability-recovery:
extends:
- .subsystem-benchmark-template
script:
- cargo bench -p polkadot-availability-recovery --bench availability-recovery-regression-bench --features subsystem-benchmarks
allow_failure: true
subsystem-benchmark-availability-distribution:
stage: test
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 hour
paths:
- charts/
extends:
- .docker-env
- .common-refs
- .run-immediately
- .subsystem-benchmark-template
script:
- cargo bench -p polkadot-availability-distribution --bench availability-distribution-regression-bench --features subsystem-benchmarks
tags:
- benchmark
allow_failure: true
subsystem-benchmark-approval-voting:
extends:
- .subsystem-benchmark-template
script:
- cargo bench -p polkadot-node-core-approval-voting --bench approval-voting-regression-bench --features subsystem-benchmarks
allow_failure: true
......@@ -55,9 +55,9 @@ zombienet-bridges-0001-asset-transfer-works:
- /home/nonroot/bridges-polkadot-sdk/bridges/testing/run-new-test.sh 0001-asset-transfer --docker
- echo "Done"
zombienet-bridges-0002-mandatory-headers-synced-while-idle:
zombienet-bridges-0002-free-headers-synced-while-idle:
extends:
- .zombienet-bridges-common
script:
- /home/nonroot/bridges-polkadot-sdk/bridges/testing/run-new-test.sh 0002-mandatory-headers-synced-while-idle --docker
- /home/nonroot/bridges-polkadot-sdk/bridges/testing/run-new-test.sh 0002-free-headers-synced-while-idle --docker
- echo "Done"
......@@ -2153,6 +2153,7 @@ dependencies = [
"static_assertions",
"substrate-wasm-builder",
"testnet-parachains-constants",
"tuplex",
]
[[package]]
......@@ -2222,7 +2223,6 @@ dependencies = [
"pallet-message-queue",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"rococo-westend-system-emulated-network",
"sp-runtime",
"staging-xcm",
......@@ -2312,6 +2312,7 @@ dependencies = [
"static_assertions",
"substrate-wasm-builder",
"testnet-parachains-constants",
"tuplex",
"westend-runtime-constants",
]
......@@ -2350,6 +2351,7 @@ dependencies = [
"staging-xcm",
"staging-xcm-builder",
"static_assertions",
"tuplex",
]
[[package]]
......@@ -11777,7 +11779,6 @@ dependencies = [
"polkadot-primitives",
"polkadot-runtime-common",
"scale-info",
"sp-core",
"sp-io",
"sp-runtime",
"sp-std 14.0.0",
......@@ -13018,6 +13019,7 @@ dependencies = [
"polkadot-overseer",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
"polkadot-subsystem-bench",
"rand 0.8.5",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
......@@ -14348,7 +14350,6 @@ dependencies = [
name = "polkadot-test-runtime"
version = "1.0.0"
dependencies = [
"bitvec",
"frame-election-provider-support",
"frame-executive",
"frame-support",
......@@ -14373,16 +14374,12 @@ dependencies = [
"pallet-vesting",
"pallet-xcm",
"parity-scale-codec",
"polkadot-parachain-primitives",
"polkadot-primitives",
"polkadot-runtime-common",
"polkadot-runtime-parachains",
"rustc-hex",
"scale-info",
"serde",
"serde_derive",
"serde_json",
"smallvec",
"sp-api",
"sp-authority-discovery",
"sp-block-builder",
......@@ -21273,11 +21270,8 @@ version = "1.0.0"
dependencies = [
"frame-support",
"polkadot-primitives",
"polkadot-runtime-common",
"smallvec",
"sp-core",
"sp-runtime",
"sp-weights",
]
[[package]]
......@@ -22055,6 +22049,12 @@ dependencies = [
"utf-8",
]
[[package]]
name = "tuplex"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "676ac81d5454c4dcf37955d34fa8626ede3490f744b86ca14a7b90168d2a08aa"
[[package]]
name = "twox-hash"
version = "1.6.3"
......
......@@ -16,6 +16,7 @@ hash-db = { version = "0.16.0", default-features = false }
log = { workspace = true }
scale-info = { version = "2.11.1", default-features = false, features = ["derive"] }
static_assertions = { version = "1.1", optional = true }
tuplex = { version = "0.1", default-features = false }
# Bridge dependencies
......@@ -82,6 +83,7 @@ std = [
"sp-runtime/std",
"sp-std/std",
"sp-trie/std",
"tuplex/std",
"xcm-builder/std",
"xcm/std",
]
......
......@@ -183,7 +183,8 @@ impl pallet_transaction_payment::Config for TestRuntime {
impl pallet_bridge_grandpa::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = BridgedUnderlyingChain;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type MaxFreeHeadersPerBlock = ConstU32<4>;
type FreeHeadersInterval = ConstU32<1_024>;
type HeadersToKeep = ConstU32<8>;
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<TestRuntime>;
}
......@@ -406,6 +407,7 @@ impl Chain for BridgedUnderlyingParachain {
impl Parachain for BridgedUnderlyingParachain {
const PARACHAIN_ID: u32 = 42;
const MAX_HEADER_SIZE: u32 = 1_024;
}
/// The other, bridged chain, used in tests.
......
......@@ -39,6 +39,9 @@ use frame_support::{
use frame_system::limits;
use sp_std::time::Duration;
/// Maximal bridge hub header size.
pub const MAX_BRIDGE_HUB_HEADER_SIZE: u32 = 4_096;
/// Average block interval in Cumulus-based parachains.
///
/// Corresponds to the `MILLISECS_PER_BLOCK` from `parachains_common` crate.
......
......@@ -62,6 +62,7 @@ impl Chain for BridgeHubKusama {
impl Parachain for BridgeHubKusama {
const PARACHAIN_ID: u32 = BRIDGE_HUB_KUSAMA_PARACHAIN_ID;
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
}
impl ChainWithMessages for BridgeHubKusama {
......
......@@ -59,6 +59,7 @@ impl Chain for BridgeHubPolkadot {
impl Parachain for BridgeHubPolkadot {
const PARACHAIN_ID: u32 = BRIDGE_HUB_POLKADOT_PARACHAIN_ID;
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
}
impl ChainWithMessages for BridgeHubPolkadot {
......
......@@ -59,6 +59,7 @@ impl Chain for BridgeHubRococo {
impl Parachain for BridgeHubRococo {
const PARACHAIN_ID: u32 = BRIDGE_HUB_ROCOCO_PARACHAIN_ID;
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
}
impl ChainWithMessages for BridgeHubRococo {
......@@ -103,9 +104,9 @@ frame_support::parameter_types! {
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single inbound message.
/// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`)
pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 5_651_581_649;
pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 314_037_860;
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single outbound message confirmation.
/// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`)
pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 5_380_901_781;
pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 57_414_813;
}
......@@ -58,6 +58,7 @@ impl Chain for BridgeHubWestend {
impl Parachain for BridgeHubWestend {
const PARACHAIN_ID: u32 = BRIDGE_HUB_WESTEND_PARACHAIN_ID;
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
}
impl ChainWithMessages for BridgeHubWestend {
......@@ -93,10 +94,10 @@ frame_support::parameter_types! {
pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 17_756_830_000;
/// Transaction fee that is paid at the Westend BridgeHub for delivering single inbound message.
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`)
pub const BridgeHubWestendBaseDeliveryFeeInWnds: u128 = 1_695_489_961_344;
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`)
pub const BridgeHubWestendBaseDeliveryFeeInWnds: u128 = 94_211_536_452;
/// Transaction fee that is paid at the Westend BridgeHub for delivering single outbound message confirmation.
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`)
pub const BridgeHubWestendBaseConfirmationFeeInWnds: u128 = 1_618_309_961_344;
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`)
pub const BridgeHubWestendBaseConfirmationFeeInWnds: u128 = 17_224_486_452;
}
......@@ -67,6 +67,8 @@ pub const PARAS_PALLET_NAME: &str = "Paras";
/// Name of the With-Kusama GRANDPA pallet instance that is deployed at bridged chains.
pub const WITH_KUSAMA_GRANDPA_PALLET_NAME: &str = "BridgeKusamaGrandpa";
/// Name of the With-Kusama parachains pallet instance that is deployed at bridged chains.
pub const WITH_KUSAMA_BRIDGE_PARACHAINS_PALLET_NAME: &str = "BridgeKusamaParachains";
/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Polkadot
/// parachains.
......
......@@ -69,6 +69,8 @@ pub const PARAS_PALLET_NAME: &str = "Paras";
/// Name of the With-Polkadot GRANDPA pallet instance that is deployed at bridged chains.
pub const WITH_POLKADOT_GRANDPA_PALLET_NAME: &str = "BridgePolkadotGrandpa";
/// Name of the With-Polkadot parachains pallet instance that is deployed at bridged chains.
pub const WITH_POLKADOT_BRIDGE_PARACHAINS_PALLET_NAME: &str = "BridgePolkadotParachains";
/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Polkadot
/// parachains.
......
......@@ -67,6 +67,8 @@ pub const PARAS_PALLET_NAME: &str = "Paras";
/// Name of the With-Rococo GRANDPA pallet instance that is deployed at bridged chains.
pub const WITH_ROCOCO_GRANDPA_PALLET_NAME: &str = "BridgeRococoGrandpa";
/// Name of the With-Rococo parachains pallet instance that is deployed at bridged chains.
pub const WITH_ROCOCO_BRIDGE_PARACHAINS_PALLET_NAME: &str = "BridgeRococoParachains";
/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Rococo
/// parachains.
......