CodeChain-io / CodeChain-io/foundry

Project organization plan

Offen
#512 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
36
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Current Foundry's project structure is somewhat tangled.
I suggest following new structure.

1. We have a separate repo for types/traits/utilities widely used in the host and modules. (Let's say `foundry-suite`) Some types might have their `async-graphql` implementations. The module author will import both `module-rt` and `foundry-suite`.
Also, the coordinator - module interfaces are included here as well.

2. App descriptor is separated into two independent parts: Foundry configuration (genesis config, transaction services) and general linking instructions (export, import, init config). Let's say the latter as a 'link descriptor'.

3. We keep the module system (Mold) pure, not involved in any blockchain context. It will be only about sandbox, links, communication and bootstrapping. Here are the components included
- RTO
- `module-rt`
- sandbox implementations
- link-desc (see section 2)
- weaver
- `codechain-module` (linkable, linker, Port, ...)

4. Coordinator will be just one use case of Mold, with some predefined services to import and export (coordinator - module interfaces).

5. We publish Mold as a general framework, which can be used widely out of blockchain context.

Doing this, we can have three clearly separated groups.

1. The consensus engine: Anything below the engine interface. DB, Tendermint, P2P, GraphQL server and so on. Current `foundry` repo will be about them.

2. The general module system: As described above.

3. The bridge between 1. and 2. : Coordinator, types, predefined services, utilities, ...

Any comments are welcome.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Die Payload nennt keine Dateien oder Tests; beginne damit, die aktuelle Struktur des Foundry-Repositorys sowie die im Vorschlag genannten Komponenten module, coordinator, app-descriptor und Mold zu prüfen. Ordne diese Komponenten den drei vorgeschlagenen Gruppen zu und definiere den Umfang der Migration; als abgeschlossen gilt dies, wenn ein von einem Maintainer genehmigter Organisationsplan vorliegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, blockchain
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.