Skip to content
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

Remove old routers and axelar relayer #1953

Merged
merged 4 commits into from
Aug 9, 2024
Merged

Remove old routers and axelar relayer #1953

merged 4 commits into from
Aug 9, 2024

Conversation

lemunozm
Copy link
Contributor

@lemunozm lemunozm commented Aug 9, 2024

Description

This PR remove the no longer used routers, cleaning the codebase for the incoming router refactor.

2 main concepts are removed from the codebase:

  • EthereumXCM and AxelarXCM routers.
  • The Axelar relayer

@lemunozm lemunozm added P7-asap Issue should be addressed in the next days. I11-cleaning No mandatory issue that leave the repo more readable/organized labels Aug 9, 2024
@lemunozm lemunozm self-assigned this Aug 9, 2024
@@ -29,21 +29,18 @@
use core::fmt::Debug;

use cfg_primitives::{LP_DEFENSIVE_WEIGHT, LP_DEFENSIVE_WEIGHT_REF_TIME};
use cfg_traits::{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cdamian sorry, I've needed to remove some lines from the gateway, but because they are removed lines, I think the git conflicts are easy to solve, by just applying always these changes in these files

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem, as long as there are no big changes to the actual gateway logic, we can manage. Thank you!


/// A generic router used for executing XCM calls.
#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)]
pub struct XCMRouter<T: pallet_xcm_transactor::Config> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we "might" use xcm in the future, would it make sense to keep this here and minimally maintain this when doing polkadot version updates etc.? I'm thinking that re-doing an xcm setup from scratch might be even more troublesome later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the incoming refactor, this routers module will disappear. We no longer can have "outbound" routers without an "inbound" router. In case we need this logic to build a bidirectional XCM router in the future, we can just look in this PR and recover that logic to build that new router.

Note that XCM is still used by the chain, just that not by the that router.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.68%. Comparing base (9485070) to head (408be79).

Files Patch % Lines
...pools-gateway/axelar-gateway-precompile/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1953      +/-   ##
==========================================
- Coverage   48.06%   47.68%   -0.38%     
==========================================
  Files         183      181       -2     
  Lines       12906    12766     -140     
==========================================
- Hits         6203     6088     -115     
+ Misses       6703     6678      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lemunozm lemunozm force-pushed the clean/old-routers branch from eba2f80 to 408be79 Compare August 9, 2024 11:16
@lemunozm
Copy link
Contributor Author

lemunozm commented Aug 9, 2024

Can we merge this, guys? @cdamian @wischli

Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

More than 2000 lines less simplifies a lot! I was a bit sceptical about removing the RelayerList storage but seeing it is empty on Centrifuge Chain, seems fine! Let's merge this PR before #1947 because the latter is low prio.

@lemunozm
Copy link
Contributor Author

lemunozm commented Aug 9, 2024

Wai yours then, or did you say the opposite? 😆

@wischli
Copy link
Contributor

wischli commented Aug 9, 2024

Wait yours then

No! Sorry, I phrased my message poorly. Please merge your PR first.

@lemunozm lemunozm merged commit 1cb9fe3 into main Aug 9, 2024
12 of 13 checks passed
@wischli wischli deleted the clean/old-routers branch August 9, 2024 13:47
@wischli wischli mentioned this pull request Aug 14, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I11-cleaning No mandatory issue that leave the repo more readable/organized P7-asap Issue should be addressed in the next days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants