Skip to content

[DRAFT] Feature: Add Bridging #2364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

mattheworris
Copy link
Collaborator

Goal

The goal of this PR is

Closes

Discussion

Checklist

  • Updated Pallet Readme?
  • Updated js/api-augment for Custom RPC APIs?
  • Design doc(s) updated?
  • Unit Tests added?
  • e2e Tests added?
  • Benchmarks added?
  • Spec version incremented?

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
common/primitives/src/utils.rs 93.22% <100.00%> (+0.49%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mattheworris mattheworris added the change/major Major Changes in this PR label Apr 28, 2025
@mattheworris mattheworris added this to the Bridge milestone Apr 28, 2025
@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Apr 28, 2025
@enddynayn enddynayn force-pushed the feat/eth-bridging-development branch 2 times, most recently from 5369039 to cc1b535 Compare April 29, 2025 18:11
enddynayn and others added 3 commits April 29, 2025 12:46
Add basic XCM setup to begin configuring bridging
between Frequency and Ethereum.

issue-236
In order to **teleport Frequency tokens to AssetHub**, we need a way to
pay the execution fee on **AssetHub otherwise it will reject the
request** and treat the tokens as **trapped assets**.

Since **AssetHub does not accept Frequency** as payment for execution
fees, we must also include DOT in the message to cover those fees.

To support this, Frequency must be able to handle DOT as an asset — both
to receive DOT from AssetHub and to **send DOT back out**.

issue-2354
Add chain spec configuration to enable running Frequency
with a local Westend network. This setup supports testing
bridging functionality between Frequency and Snowbridge.

Closes #2372

---------

Co-authored-by: Matthew Orris <[email protected]>
@enddynayn enddynayn force-pushed the feat/eth-bridging-development branch from cc1b535 to 42f1881 Compare April 29, 2025 18:47
@github-actions github-actions bot removed the metadata-changed Metadata has changed since the latest full release label Apr 29, 2025
enddynayn and others added 7 commits April 29, 2025 13:03
Set the `AssetId` type to `MultiLocation` in the Assets pallet
to enable receiving DOT into the Frequency chain.

Closes #2369
…#2377)

# Goal
The goal of this PR is to update Frequency to allow receiving of DOT
using `pallet-assets` as `foreignAssets`.

Closes #2371

# Discussion

- Add the `ForeignAssetsAdapter` type, which is used by
`AssetTransactors` to determine how to withdraw and deposit an asset.

# Checklist
- [ ] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?
XCMP messages were not reaching the destination sibling
chain due to missing configuration of the `ParachainSystem`
message queues.
# Goal
The goal of this PR is to add support for Frequency Testnet on Westend.

Closes #2376

# Discussion

- Added feature `frequency-westend`
- Added test for Westend genesis hash
- Implemented `load_frequency_westend_spec` to build the westend chain
spec


# Checklist
- [ ] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?
# Goal
The goal of this PR is to correctly generate the Westend chain spec.

- Added `westend.rs` to capture the chain spec generation, which is only
needed once, but is a good reference for chain spec modifications.
- Updated `resources/frequency-westend.json`,
`resources/frequency-westend.raw.json`

Closes #2376
This pull request introduces significant updates to support XCM
(Cross-Consensus Messaging) bridging functionality and refactors several
runtime configurations, dependencies, and tests. The changes include
adding new runtime APIs, modifying existing configurations, and
introducing new features for bridging and fee handling. Below is a
summary of the most important changes grouped by theme.

### XCM Bridging Enhancements
* Added new runtime APIs for XCM bridging, including APIs for payment
queries, dry runs, location-to-account conversions, and trusted queries.
These changes enable advanced XCM functionality such as fee estimation,
asset handling, and trusted operations. (`runtime/frequency/src/lib.rs`)
* Introduced `polkadot_xcm_fee` module for calculating relay chain
transaction fees in DOT/KSM/WND and handling fee conversions for XCM
bridging. (`runtime/frequency/src/lib.rs`)

### Dependency Updates
* Added `xcm-runtime-apis` as a new dependency in `Cargo.toml` to
support XCM-related runtime APIs. (`Cargo.toml`,
`runtime/frequency/Cargo.toml`)
* Updated the `std` feature in `runtime/frequency/Cargo.toml` to include
`xcm-runtime-apis/std`. (`runtime/frequency/Cargo.toml`)

### Runtime Configuration Changes
* Adjusted `MaximumSchedulerWeight` parameter to align with the new
runtime integrity requirements added to the scheduler pallet in
`stable2503` [added by backport bot].

### Build and Testing Enhancements
* Added new Makefile targets (`check-bridging-local` and
`test-bridging`) to support building and testing the bridging
functionality. (`Makefile`)
* Reintroduced the `check_whitelist` test in a dedicated test module for
runtime validation.
(`runtime/frequency/src/xcm/tests/check_whitelist.rs`,
`runtime/frequency/src/xcm/tests/mod.rs`)
* Introduced new test modules (`fee_estimation` and `mock`) in the
`tests` directory. (`runtime/frequency/src/xcm/tests/mod.rs`

### Workflow Update
* Updated GitHub Actions workflow to include a new feature branch
pattern (`feat/eth-bridging-development`) for CI verification.
(`.github/workflows/verify-pr-commit.yml`)

### Security and Configuration Cleanup
* Updated `deny.toml` to remove outdated security advisories and add new
ones, reflecting changes in dependencies (`deny.toml`).

Closes #2400

---------

Co-authored-by: eNDdy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change/major Major Changes in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants