Skip to content

Conversation

mattheworris
Copy link
Collaborator

Goal

The goal of this PR is to remove the frequency-bridging feature flag and refactor the code so that it is easier to read and maintain.

Closes #2515

Discussion

  • Must ensure the frequency-no-relay continues to work correctly. XCM features require some cumulus features.
  • Code readability should improve.

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?

@mattheworris mattheworris added this to the Bridge milestone Aug 21, 2025
@mattheworris mattheworris self-assigned this Aug 21, 2025
@mattheworris mattheworris added the chore No feature changes label Aug 21, 2025
@mattheworris mattheworris requested a review from wilwade as a code owner August 21, 2025 14:33
@mattheworris mattheworris linked an issue Aug 21, 2025 that may be closed by this pull request
1 task
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 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 changed the title refactor: remove frequency-bridging feature and related configurations [DRAFT] refactor: remove frequency-bridging feature and related configurations Aug 25, 2025
build-bridging-testnet:
cargo build --features frequency-testnet,frequency-bridging
# build-bridging-testnet:
# cargo build --features frequency-testnet,frequency-bridgin
Copy link
Collaborator

Choose a reason for hiding this comment

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

non-blocking, but it is odd that the commented-out features are all misspelled

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 27, 2025
@github-actions github-actions bot removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 27, 2025
@mattheworris mattheworris marked this pull request as draft August 27, 2025 22:03
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 28, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented and removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 29, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 29, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Sep 2, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Sep 3, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Sep 3, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Sep 3, 2025
@mattheworris mattheworris requested review from a team, shannonwells, enddynayn, aramikm, claireclark1, saraswatpuneet and JoeCap08055 and removed request for a team September 5, 2025 16:21
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason we're keeping all of the commented-out stuff in the Makefile?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just haven't cleaned it up yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So, are we just getting rid of all Westend-related code, the idea being that we're focusing on bridging on Paseo (and then Mainnet)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Westend-local was kind of a hack for testing with Snowbridge Zombienet, so removing it to clean that up. The westend release still remains.

Comment on lines +466 to +469
#[cfg(feature = "frequency-no-relay")]
use crate::no_relay::prelude as runtime_mode;
#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))]
use crate::relay::prelude as runtime_mode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmm... initially I was confused by:

#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))]

that's used in so many places; it seems like adding feature = "frequency-lint-check" to the any(...) ONLY enables the use case: --features frequency-no-relay,frequency-lint-check. I was going to let it slide, but here I think I see a problem. If we run --features frequency-no-relay,frequency-lint-check, here we'll end up with:

use crate::no_relay::prelude as runtime_mode; // enabled by "frequency-no-relay"
use crate::relay::prelude as runtime_mode; // enabled by "frequency-lint-check"

I think this would like be problematic...so, by that logic, it seems like we should NEVER allow both frequency-no-relay AND frequency-lint-check at the same time. And, therefore, we can reduce all of the instances of:

#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))]

to simply

#[cfg(not(feature = "frequency-no-relay"))]

Copy link
Collaborator Author

@mattheworris mattheworris Sep 5, 2025

Choose a reason for hiding this comment

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

frequency-lint-check is meant to include both the relay and no-relay configurations so that everything will be checked by the linter. This flag is only meant to be used for tests and lints, it's not meant to be a proper build.

We have an existing issue (#2367) to remove the frequency-lint-check feature and duplicate any tests that use the flag, which would make the code maintenance easier. I think the effort to remove the lint flag needs to wait until we merge/remove the bridging feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore No feature changes metadata-changed Metadata has changed since the latest full release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove feature = "frequency-bridging"
3 participants