Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Rearrange repo #717

Closed
17 of 18 tasks
gavofyork opened this issue Sep 11, 2018 · 0 comments
Closed
17 of 18 tasks

Rearrange repo #717

gavofyork opened this issue Sep 11, 2018 · 0 comments
Assignees
Labels
I7-refactor Code needs refactoring.
Milestone

Comments

@gavofyork
Copy link
Member

gavofyork commented Sep 11, 2018

Repo is currently a bit of a mess from the Polkadot days. With version 1.0 coming up, it's time to get things in shape.

Phase 1

New top-level structure should reflect the different "levels" of Substrate:

  • /core: The core Substrate components. This is code that is common across all Substrate chains. Phase 1 of repo reorg #719
  • /srml: The Substrate Runtime Module Library (SRML, pronounced "surmul"). This is our primary framework for writing runtimes in Substrate. Substrate chains can exist perfectly well without reference to this code, but many will use it.
  • /node: The Substrate Node application. This is code specific to the generalised Substrate node. It will likely sync most substrate chains, but its block-authoring capacity will be limited to chains whose runtime supports this block-authoring version, pretty much a subset of those built with SRML. Phase 1 of repo reorg #719
  • Miscellanea (safe-mix, subkey, environmental, parity-codec (was codec), pwasm-libc, pwasm-alloc). Smaller, independent projects that will eventually move to their own repo should be moved to the top-level. Phase 1 of repo reorg #719

There are some things that muddy the water a little and will need to be refactored.

  • substrate-runtime-primitives is mostly code that belongs under core. However there are small parts, in generic and tests, which use the substrate-runtime-support crate (for Dispatchable trait), which is not core. This requirement should be purged and the module should be moved to become sr-primitives (see next). Phase 1 of repo reorg #719
  • Several other modules have phantom dependencies on substrate-runtime-support; this dependency should be removed:
    • bft
    • client/db
    • runtime-version
    • consensus
    • executor
  • client module depends on JsonMetadata, as defined in substrate-runtime-support (a design oversight, to be addressed in Refactor "JsonMetadata" into simple "Metadata" #721). Shared code/tests should be removed to a shared crate until Refactor "JsonMetadata" into simple "Metadata" #721 is addressed.
  • substrate-runtime-io, substrate-runtime-std, substrate-runtime-sandbox, substrate-runtime-primitives and substrate-runtime-version are independent of the SRML and should be renamed to sr-io, sr-std, sr-sandbox, sr-primitives and sr-version. All other modules matching substrate-runtime-* should be renamed to srml-*.
  • ed25519: Merge into substrate-primitives (it is dependent on it anyway) Phase 1 of repo reorg #719

Phase 2

Certain crates should be removed from core, either by merging or splitting out into separate repos:

  • environmental: Split out into own repo.
  • parity-codec: Split into own repo.
  • safe-mix: Split into own repo.
  • pwasm-alloc, pwasm-libc: Merge into sr-std.
@gavofyork gavofyork self-assigned this Sep 11, 2018
@gavofyork gavofyork added the I7-refactor Code needs refactoring. label Sep 11, 2018
@gavofyork gavofyork added this to the 1.0 beta milestone Sep 11, 2018
helin6 pushed a commit to boolnetwork/substrate that referenced this issue Jul 25, 2023
* bump versions 0.25

* update changelog

* adjust RELEASE.md

* fix weird formatting

* rephrase bad english

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring.
Projects
None yet
Development

No branches or pull requests

1 participant