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

Moving Genesis Config to Runtime #2142

Closed
4 tasks done
enddynayn opened this issue Aug 29, 2024 · 0 comments
Closed
4 tasks done

Moving Genesis Config to Runtime #2142

enddynayn opened this issue Aug 29, 2024 · 0 comments
Assignees

Comments

@enddynayn
Copy link
Collaborator

enddynayn commented Aug 29, 2024

Description
Right now, even after removing references to the RuntimeGenesisConfig struct on the node side, the node/client is still not fully independent from the runtime. There are some runtime-related leftovers that the node needs to know about when building the chain-spec.

Shift the task of creating the JSON representation of the runtime genesis config from the node to the runtime itself. This way, the runtime handles its own configuration, making things cleaner and reducing dependencies.

paritytech/polkadot-sdk#2714

Acceptance Criteria

@enddynayn enddynayn self-assigned this Aug 29, 2024
enddynayn added a commit that referenced this issue Oct 1, 2024
Move Development Genesis Config to the Runtime to
support decoupling of client and runtime dependencies.

When running `chain-spec-builder`, the following command:

```
chain-spec-builder list-presets –-runtime-wasm-path ./target/debug/wbuild/frequency-runtime/frequency_runtime.wasm
```

**Outputs:**
With feature flags _"frequency-no-relay", "frequency-local"_ enabled:
```
{“presets”:[“development”, "frequency-local", "frequency"]}
```

Additionally, when running:
```
chain-spec-builder display-preset --runtime-wasm-path ./target/debug/wbuild/frequency-runtime/frequency_runtime.wasm --preset-name development
```

it outputs the development genesis config:
```
{"aura":{"authorities":[]},"auraExt":{},"balances":{ ...} ... }
```

With feature flags _"frequency"_ only, mainnet presets show up:
```
{“presets”:["frequency"]}
```
Additionally, when running:
```
chain-spec-builder display-preset --runtime-wasm-path ./target/debug/wbuild/frequency-runtime/frequency_runtime.wasm --preset-name frequency
```

it outputs the frequency genesis config:
```
{"aura":{"authorities":[]},"auraExt":{},"balances":{ ...} ... }
```


#2149
#2142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant