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

[parachain-template] refactor for Enhanced Modularity to avoid "God file pattern" #3819

Closed
3 tasks done
asiniscalchi opened this issue Mar 25, 2024 · 3 comments
Closed
3 tasks done
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@asiniscalchi
Copy link
Contributor

asiniscalchi commented Mar 25, 2024

As a Parachain Developer,
I want to refactor the parachain-template runtime into a more modular structure,
So that new developers ( and me ) can easily understand and utilize the template, reinforcing the template's role in demonstrating best practices in blockchain development.

Acceptance Criteria

  1. Modular Architecture: The runtime must be divided into clear, logical modules that encapsulate specific functionalities.

  2. Best Practices Showcase: The refactoring must adhere to current best practices in software development, particularly those relevant to Rust and blockchain development.

  3. Ease of Use: The refactored codebase should make it easy for new developers to start using the template without the need for extensive guidance from existing contributors.


Given the existence of a "god file" with more than 700 lines within Substrate's parachain template node—resulting in runtimes that extend beyond 2000 lines across the ecosystem—there's a recognized need for structural improvement.
This refactoring initiative, while not directly impacting functionality, is intended to cater to the users of the parachain template node by improving its utility as both an exemplar and a foundation for new parachains.
Additionally, this effort will help to reveal SDK challenges that hinder the development of structured runtimes.

Tasks

  1. R0-silent
  2. R0-silent
  3. R0-silent
@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Mar 25, 2024
@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Mar 25, 2024

#3804 <--- just for historical purpose

@asiniscalchi asiniscalchi changed the title Refactor Parachain-Template Runtime for Enhanced Modularity and New Developer Friendliness [parachain-template] refactor for Enhanced Modularity and New Developer Friendliness Mar 25, 2024
@asiniscalchi asiniscalchi changed the title [parachain-template] refactor for Enhanced Modularity and New Developer Friendliness [parachain-template] refactor for Enhanced Modularity and avoid **God file** anti-pattern Mar 26, 2024
@asiniscalchi asiniscalchi changed the title [parachain-template] refactor for Enhanced Modularity and avoid **God file** anti-pattern [parachain-template] refactor for Enhanced Modularity and avoid "God file anti-pattern" Mar 26, 2024
@asiniscalchi asiniscalchi changed the title [parachain-template] refactor for Enhanced Modularity and avoid "God file anti-pattern" [parachain-template] refactor for Enhanced Modularity and avoid "God file pattern" Mar 26, 2024
@asiniscalchi asiniscalchi changed the title [parachain-template] refactor for Enhanced Modularity and avoid "God file pattern" [parachain-template] refactor for Enhanced Modularity to avoid "God file pattern" Mar 26, 2024
@kianenigma
Copy link
Contributor

I am not against such syntactic improvements in general and appreciate the effort.

What I dislike about this is that it is drifting our templates even further apart. If any change is applied to any template, it should be standardized in all templates under /template.

@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Apr 1, 2024

Let's create a couple of user stories to adapt the other templates to the new structure as soon as we are happy with the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

2 participants