Skip to content

Commit

Permalink
Merge branch 'master' into executor-take-fee-from-transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
acatangiu authored Dec 9, 2024
2 parents 41df153 + 906fa9e commit 370ec7c
Show file tree
Hide file tree
Showing 97 changed files with 1,545 additions and 919 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
17 changes: 9 additions & 8 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ linked-hash-map = { version = "0.5.4" }
linked_hash_set = { version = "0.1.4" }
linregress = { version = "0.5.1" }
lite-json = { version = "0.2.0", default-features = false }
litep2p = { version = "0.8.2", features = ["websocket"] }
litep2p = { version = "0.8.3", features = ["websocket"] }
log = { version = "0.4.22", default-features = false }
macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
Expand Down 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,
86, 101, 80, 125, 84, 10, 227, 145, 230, 209, 152, 38, 206, 251, 206, 208, 244,
221, 22, 215, 1, 252, 79, 181, 99, 207, 166, 220, 98, 3, 81, 7,
],
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 @@ -44,7 +44,7 @@ fn test_set_asset_claimer_within_a_chain() {

type RuntimeCall = <AssetHubWestend as Chain>::RuntimeCall;
let asset_trap_xcm = Xcm::<RuntimeCall>::builder_unsafe()
.set_asset_claimer(bob_location.clone())
.set_hints(vec![AssetClaimer { location: bob_location.clone() }])
.withdraw_asset(assets.clone())
.clear_origin()
.build();
Expand Down Expand Up @@ -116,7 +116,7 @@ fn test_set_asset_claimer_between_the_chains() {
let assets: Assets = (Parent, trap_amount).into();
type RuntimeCall = <BridgeHubWestend as Chain>::RuntimeCall;
let trap_xcm = Xcm::<RuntimeCall>::builder_unsafe()
.set_asset_claimer(alice_bh_sibling.clone())
.set_hints(vec![AssetClaimer { location: alice_bh_sibling.clone() }])
.withdraw_asset(assets.clone())
.clear_origin()
.build();
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 delivery 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 delivery 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
Loading

0 comments on commit 370ec7c

Please sign in to comment.