This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Rearrange repo #717
Copy link
Copy link
Closed
Description
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(wascodec),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-primitivesis mostly code that belongs undercore. However there are small parts, ingenericandtests, which use thesubstrate-runtime-supportcrate (forDispatchabletrait), which is notcore. This requirement should be purged and the module should be moved to becomesr-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
-
-
clientmodule depends onJsonMetadata, as defined insubstrate-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-primitivesandsubstrate-runtime-versionare independent of the SRML and should be renamed tosr-io,sr-std,sr-sandbox,sr-primitivesandsr-version. All other modules matchingsubstrate-runtime-*should be renamed tosrml-*. -
ed25519: Merge intosubstrate-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 intosr-std.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I7-refactorCode needs refactoring.Code needs refactoring.