Skip to content

Commit

Permalink
Merge branch 'master' into BNP-pallet-nis
Browse files Browse the repository at this point in the history
  • Loading branch information
Doordashcon authored Dec 8, 2024
2 parents edc68f2 + 526a440 commit f73ae91
Show file tree
Hide file tree
Showing 71 changed files with 973 additions and 648 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:

- name: check semver
run: |
if [ -z "$PR" ]; then
echo "Skipping master/merge queue"
exit 0
fi
export CARGO_TARGET_DIR=target
export RUSTFLAGS='-A warnings -A missing_docs'
export SKIP_WASM_BUILD=1
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/command-backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
backport:
name: Backport pull request
runs-on: ubuntu-latest
environment: release

# The 'github.event.pull_request.merged' ensures that it got into master:
if: >
Expand All @@ -29,20 +30,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2.1.0
- name: Generate content write token for the release automation
id: generate_write_token
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.CMD_BOT_APP_ID }}
private_key: ${{ secrets.CMD_BOT_APP_KEY }}
app-id: ${{ vars.RELEASE_AUTOMATION_APP_ID }}
private-key: ${{ secrets.RELEASE_AUTOMATION_APP_PRIVATE_KEY }}
owner: paritytech

- name: Create backport pull requests
uses: korthout/backport-action@v3
id: backport
with:
target_branches: stable2407 stable2409 stable2412
merge_commits: skip
github_token: ${{ steps.generate_token.outputs.token }}
github_token: ${{ steps.generate_write_token.outputs.token }}
pull_description: |
Backport #${pull_number} into `${target_branch}` from ${pull_author}.
Expand Down Expand Up @@ -86,7 +88,7 @@ jobs:
const reviewer = '${{ github.event.pull_request.user.login }}';
for (const pullNumber of pullNumbers) {
await github.pulls.createReviewRequest({
await github.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: parseInt(pullNumber),
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/zombienet/parachain-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ zombienet-parachain-template-smoke:
- ls -ltr $(pwd)/artifacts
- cargo test -p template-zombienet-tests --features zombienet --tests minimal_template_block_production_test
- cargo test -p template-zombienet-tests --features zombienet --tests parachain_template_block_production_test
# - cargo test -p template-zombienet-tests --features zombienet --tests solochain_template_block_production_test
- cargo test -p template-zombienet-tests --features zombienet --tests solochain_template_block_production_test
12 changes: 6 additions & 6 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,8 @@ polkadot-test-client = { path = "polkadot/node/test/client" }
polkadot-test-runtime = { path = "polkadot/runtime/test-runtime" }
polkadot-test-service = { path = "polkadot/node/test/service" }
polkavm = { version = "0.9.3", default-features = false }
polkavm-derive = "0.9.1"
polkavm-linker = "0.9.2"
polkavm-derive = "0.17.0"
polkavm-linker = "0.17.1"
portpicker = { version = "0.1.1" }
pretty_assertions = { version = "1.3.0" }
primitive-types = { version = "0.13.1", default-features = false, features = [
Expand Down
4 changes: 2 additions & 2 deletions bridges/snowbridge/pallets/inbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ fn test_submit_happy_path() {
.into(),
nonce: 1,
message_id: [
11, 25, 133, 51, 23, 68, 111, 211, 132, 94, 254, 17, 194, 252, 198, 233, 10, 193,
156, 93, 72, 140, 65, 69, 79, 155, 154, 28, 141, 166, 171, 255,
97, 161, 116, 204, 182, 115, 192, 144, 130, 243, 240, 193, 122, 154, 108, 91, 247,
41, 226, 237, 202, 158, 238, 239, 210, 8, 147, 131, 84, 146, 171, 176,
],
fee_burned: 110000000000,
}
Expand Down
1 change: 1 addition & 0 deletions bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ where
// Call create_asset on foreign assets pallet.
Transact {
origin_kind: OriginKind::Xcm,
fallback_max_weight: None,
call: (
create_call_index,
asset_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn xcm_transact_paid_execution(
VersionedXcm::from(Xcm(vec![
WithdrawAsset(fees.clone().into()),
BuyExecution { fees, weight_limit },
Transact { origin_kind, call },
Transact { origin_kind, call, fallback_max_weight: None },
RefundSurplus,
DepositAsset {
assets: All.into(),
Expand All @@ -53,7 +53,7 @@ pub fn xcm_transact_unpaid_execution(

VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit, check_origin },
Transact { origin_kind, call },
Transact { origin_kind, call, fallback_max_weight: None },
]))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn transfer_and_transact_in_same_xcm(

// xcm to be executed at dest
let xcm_on_dest = Xcm(vec![
Transact { origin_kind: OriginKind::Xcm, call },
Transact { origin_kind: OriginKind::Xcm, call, fallback_max_weight: None },
ExpectTransactStatus(MaybeErrorCode::Success),
// since this is the last hop, we don't need to further use any assets previously
// reserved for fees (there are no further hops to cover transport fees for); we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ fn create_agent() {
let remote_xcm = VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
DescendOrigin(Parachain(origin_para).into()),
Transact { origin_kind: OriginKind::Xcm, call: create_agent_call.encode().into() },
Transact {
origin_kind: OriginKind::Xcm,
call: create_agent_call.encode().into(),
fallback_max_weight: None,
},
]));

// Rococo Global Consensus
Expand Down Expand Up @@ -138,7 +142,11 @@ fn create_channel() {
let create_agent_xcm = VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
DescendOrigin(Parachain(origin_para).into()),
Transact { origin_kind: OriginKind::Xcm, call: create_agent_call.encode().into() },
Transact {
origin_kind: OriginKind::Xcm,
call: create_agent_call.encode().into(),
fallback_max_weight: None,
},
]));

let create_channel_call =
Expand All @@ -147,7 +155,11 @@ fn create_channel() {
let create_channel_xcm = VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
DescendOrigin(Parachain(origin_para).into()),
Transact { origin_kind: OriginKind::Xcm, call: create_channel_call.encode().into() },
Transact {
origin_kind: OriginKind::Xcm,
call: create_channel_call.encode().into(),
fallback_max_weight: None,
},
]));

// Rococo Global Consensus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn transfer_and_transact_in_same_xcm(

// xcm to be executed at dest
let xcm_on_dest = Xcm(vec![
Transact { origin_kind: OriginKind::Xcm, call },
Transact { origin_kind: OriginKind::Xcm, call, fallback_max_weight: None },
ExpectTransactStatus(MaybeErrorCode::Success),
// since this is the last hop, we don't need to further use any assets previously
// reserved for fees (there are no further hops to cover transport fees for); we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn fellows_whitelist_call() {
)
.encode()
.into(),
fallback_max_weight: None
}
]))),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ fn relay_commands_add_registrar() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: add_registrar_call.encode().into() }
Transact {
origin_kind,
call: add_registrar_call.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -107,7 +111,11 @@ fn relay_commands_add_registrar_wrong_origin() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: add_registrar_call.encode().into() }
Transact {
origin_kind,
call: add_registrar_call.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -194,7 +202,11 @@ fn relay_commands_kill_identity() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: kill_identity_call.encode().into() }
Transact {
origin_kind,
call: kill_identity_call.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -252,7 +264,11 @@ fn relay_commands_kill_identity_wrong_origin() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: kill_identity_call.encode().into() }
Transact {
origin_kind,
call: kill_identity_call.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -298,7 +314,11 @@ fn relay_commands_add_remove_username_authority() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: add_username_authority.encode().into() }
Transact {
origin_kind,
call: add_username_authority.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -383,7 +403,11 @@ fn relay_commands_add_remove_username_authority() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: remove_username_authority.encode().into() }
Transact {
origin_kind,
call: remove_username_authority.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -443,7 +467,11 @@ fn relay_commands_add_remove_username_authority_wrong_origin() {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
message: bx!(VersionedXcm::from(Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact { origin_kind, call: add_username_authority.encode().into() }
Transact {
origin_kind,
call: add_username_authority.encode().into(),
fallback_max_weight: None
}
]))),
});

Expand Down Expand Up @@ -483,6 +511,7 @@ fn relay_commands_add_remove_username_authority_wrong_origin() {
Transact {
origin_kind: OriginKind::SovereignAccount,
call: remove_username_authority.encode().into(),
fallback_max_weight: None,
}
]))),
});
Expand Down
2 changes: 2 additions & 0 deletions cumulus/parachains/pallets/ping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub mod pallet {
})
.encode()
.into(),
fallback_max_weight: None,
}]),
) {
Ok((hash, cost)) => {
Expand Down Expand Up @@ -214,6 +215,7 @@ pub mod pallet {
})
.encode()
.into(),
fallback_max_weight: None,
}]),
) {
Ok((hash, cost)) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ impl<Call> XcmWeightInfo<Call> for AssetHubRococoXcmWeight<Call> {
fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
}
fn transact(_origin_type: &OriginKind, _call: &DoubleEncoded<Call>) -> Weight {
fn transact(
_origin_type: &OriginKind,
_fallback_max_weight: &Option<Weight>,
_call: &DoubleEncoded<Call>,
) -> Weight {
XcmGeneric::<Runtime>::transact()
}
fn hrmp_new_channel_open_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ impl<Call> XcmWeightInfo<Call> for AssetHubWestendXcmWeight<Call> {
fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
}
fn transact(_origin_type: &OriginKind, _call: &DoubleEncoded<Call>) -> Weight {
fn transact(
_origin_type: &OriginKind,
_fallback_max_weight: &Option<Weight>,
_call: &DoubleEncoded<Call>,
) -> Weight {
XcmGeneric::<Runtime>::transact()
}
fn hrmp_new_channel_open_request(
Expand Down
14 changes: 12 additions & 2 deletions cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,14 +1205,20 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_parachain_assets_wor
let xcm = Xcm(vec![
WithdrawAsset(buy_execution_fee.clone().into()),
BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
Transact { origin_kind: OriginKind::Xcm, call: foreign_asset_create.into() },
Transact {
origin_kind: OriginKind::Xcm,
call: foreign_asset_create.into(),
fallback_max_weight: None,
},
Transact {
origin_kind: OriginKind::SovereignAccount,
call: foreign_asset_set_metadata.into(),
fallback_max_weight: None,
},
Transact {
origin_kind: OriginKind::SovereignAccount,
call: foreign_asset_set_team.into(),
fallback_max_weight: None,
},
ExpectTransactStatus(MaybeErrorCode::Success),
]);
Expand Down Expand Up @@ -1318,7 +1324,11 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_parachain_assets_wor
let xcm = Xcm(vec![
WithdrawAsset(buy_execution_fee.clone().into()),
BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
Transact { origin_kind: OriginKind::Xcm, call: foreign_asset_create.into() },
Transact {
origin_kind: OriginKind::Xcm,
call: foreign_asset_create.into(),
fallback_max_weight: None,
},
ExpectTransactStatus(MaybeErrorCode::from(DispatchError::BadOrigin.encode())),
]);

Expand Down
Loading

0 comments on commit f73ae91

Please sign in to comment.