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

Refactor XCM code #7095

Open
xlc opened this issue Jan 8, 2025 · 0 comments
Open

Refactor XCM code #7095

xlc opened this issue Jan 8, 2025 · 0 comments
Labels
T6-XCM This PR/Issue is related to XCM.

Comments

@xlc
Copy link
Contributor

xlc commented Jan 8, 2025

Currently XCM code are not implement in an extendable way. To make a new version, we have to duplicate many files and then modify on the duplicated files. This comes with many issues:

  • A lot of work to add a new version
  • Impossible to tell difference between two versions by only looking at the code
  • Duplicated code is bad in general

We should refactor it in such way to avoid duplications.

For example, instead of a bigenum Instruction, we have a struct for each instruction and use some macro to generation the big enum. In that way, to add new instruction, we only need to add new instruction and update the instruction list.

@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

No branches or pull requests

2 participants