Skip to content

✨ Allow XCM Transact #477

Merged
lrazovic merged 1 commit intomainfrom
04-25-allow_transact
May 2, 2025
Merged

✨ Allow XCM Transact #477
lrazovic merged 1 commit intomainfrom
04-25-allow_transact

Conversation

@lrazovic
Copy link
Copy Markdown
Member

@lrazovic lrazovic commented Apr 25, 2025

XCM and Runtime Enhancements:

  • Updated XCM weight benchmarks to reflect the latest Polkadot SDK version and adjusted execution times and storage proofs for several XCM operations, such as send, teleport_assets, and transfer_assets. These changes improve accuracy and reflect the current runtime performance. [1] [2] [3] [4]
  • Added support for teleportable assets and destinations, enabling PLMC teleportation between Polimec and Asset Hub. This includes changes to reachable_dest and teleportable_asset_and_dest methods.
  • Added support to Execute local XCM messages.
  • Added support to Transact on Polomec via XCM messages.

Genesis Configuration Updates:

  • Updated the safeXcmVersion field in the genesis configuration to use an Option type, allowing for better flexibility in initialization.
  • Added a new staker, charlie, to the list of initial stakers in the Polimec Paseo chain specification.

Weight and Benchmark Updates:

  • Introduced a new pallet_linear_release module for runtime weights and updated the WeightInfo implementation to use a centralized weights module for consistency. [1] [2]
  • Added a new pallet_xcm module for weights and updated benchmarks to include additional storage reads/writes and execution time adjustments. [1] [2]

Code Cleanup and Refactoring:

  • Removed the MockedChannelInfo struct and related logic, as it is no longer needed after upgrading pallet-xcm. This simplifies the runtime configuration.
  • Enhanced the build script to support multiple build scenarios, including production and test builds with different feature flags (e.g., fast-mode).

These changes collectively improve the runtime's performance, maintainability, and compatibility with the latest Substrate updates.

@lrazovic lrazovic force-pushed the 04-25-allow_transact branch 5 times, most recently from 9328d1e to 762e004 Compare April 29, 2025 09:24
@dastansam dastansam changed the base branch from 03-21-vesting_pallet_block_number_provider_migration to graphite-base/477 April 29, 2025 13:32
@lrazovic lrazovic force-pushed the 04-25-allow_transact branch from 762e004 to fa8c284 Compare April 29, 2025 15:24
@lrazovic lrazovic changed the base branch from graphite-base/477 to 03-21-vesting_pallet_block_number_provider_migration April 29, 2025 15:24
@lrazovic lrazovic changed the title allow transact Allow XCM Transact Apr 30, 2025
@lrazovic lrazovic marked this pull request as ready for review April 30, 2025 06:57
@lrazovic lrazovic changed the base branch from 03-21-vesting_pallet_block_number_provider_migration to graphite-base/477 April 30, 2025 06:58
@lrazovic lrazovic force-pushed the 04-25-allow_transact branch from fa8c284 to cd5c5d0 Compare April 30, 2025 06:58
@lrazovic lrazovic changed the base branch from graphite-base/477 to 04-29-migrate_pallet_staking_to_use_new_block_time April 30, 2025 06:58
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Apr 30, 2025

Graphite Automations

"Auto-assign PRs to author" took an action on this PR • (04/30/25)

1 assignee was added to this PR based on Juan Ignacio Rios's automation.

@dastansam dastansam force-pushed the 04-25-allow_transact branch from cd5c5d0 to f87b89e Compare April 30, 2025 15:25
@lrazovic lrazovic force-pushed the 04-29-migrate_pallet_staking_to_use_new_block_time branch from 3c99aa6 to c5e9fda Compare April 30, 2025 15:34
@lrazovic lrazovic force-pushed the 04-25-allow_transact branch 2 times, most recently from cd5c5d0 to 9c675e8 Compare May 1, 2025 13:21
@lrazovic lrazovic requested a review from dastansam May 1, 2025 13:23
}
/// Allows messages starting with DescendOrigin(AccountId32) from AssetHub
/// followed immediately by BuyExecution.
pub struct AllowPaidDescendFromAssetHub;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not critical, but we could add some unit tests for this. maybe ask gemini

// ^ Disable dispatchable execute on the XCM pallet.
// Needs to be `Everything` for local testing.
type WeightInfo = crate::weights::pallet_xcm::WeightInfo<Runtime>;
type XcmExecuteFilter = Everything;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed? this is for local xcm execution, right?

@lrazovic lrazovic force-pushed the 04-25-allow_transact branch from 9c675e8 to f61bdd5 Compare May 1, 2025 13:53
Copy link
Copy Markdown
Contributor

@dastansam dastansam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@lrazovic lrazovic requested a review from Copilot May 1, 2025 14:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables XCM Transact by updating various chain and node configurations, revising XCM parameters, and adjusting auto-generated weights. Key changes include:

  • Updating the chain specification and node configuration (e.g. changing chain names, port settings, and adding validator flags).
  • Modifying XCM barrier and origin configurations (e.g. changing SafeCallFilter to allow Transact instructions and updating origin conversions).
  • Refreshing auto-generated weight values and adjusting related chain spec settings.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/zombienet/polimec-polkadot-assethub-penpal.toml Updated relaychain chain name, port settings, node validator flags, and commented out hrmp_channels.
runtimes/polimec/src/xcm_config.rs Revised XCM configuration including origin conversion, barrier settings, and SafeCallFilter semantics.
runtimes/polimec/src/weights/pallet_xcm.rs Updated auto-generated weights based on new benchmarks.
runtimes/polimec/src/lib.rs Removed mocked channel info and updated asset transfer destination configuration.
nodes/parachain/src/chain_spec/* Adjusted chain spec parameters including stakers list and safeXcmVersion wrapping.
runtimes/polimec/build.rs Introduced multiple wasm builder configurations for production and test builds.

@lrazovic lrazovic changed the title Allow XCM Transact ✨ Allow XCM Transact May 1, 2025
@dastansam dastansam force-pushed the 04-25-allow_transact branch from f61bdd5 to 9d1634a Compare May 1, 2025 15:54
@dastansam dastansam force-pushed the 04-29-migrate_pallet_staking_to_use_new_block_time branch from c5e9fda to 3c99aa6 Compare May 1, 2025 15:54
@lrazovic lrazovic force-pushed the 04-25-allow_transact branch from 9d1634a to f61bdd5 Compare May 2, 2025 07:41
@lrazovic lrazovic force-pushed the 04-29-migrate_pallet_staking_to_use_new_block_time branch from 3c99aa6 to c5e9fda Compare May 2, 2025 07:41
Copy link
Copy Markdown
Member Author

lrazovic commented May 2, 2025

Merge activity

  • May 2, 7:23 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 2, 7:36 AM EDT: Graphite rebased this pull request as part of a merge.
  • May 2, 7:36 AM EDT: @lrazovic merged this pull request with Graphite.

@lrazovic lrazovic changed the base branch from 04-29-migrate_pallet_staking_to_use_new_block_time to graphite-base/477 May 2, 2025 11:33
@lrazovic lrazovic changed the base branch from graphite-base/477 to main May 2, 2025 11:34
@lrazovic lrazovic force-pushed the 04-25-allow_transact branch from f61bdd5 to 5a35905 Compare May 2, 2025 11:35
@lrazovic lrazovic merged commit 6bac49d into main May 2, 2025
1 check passed
@lrazovic lrazovic deleted the 04-25-allow_transact branch May 2, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants