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

Service's Configuration has optional fields that shouldn't be optional #4776

@cecton

Description

@cecton

Following the discussion on: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372049016

There are 2 conflicting things we would like to have:

  • Running a node requires a Configuration and some of the fields are not optional but they are defined as Option
  • We should be able to define defaults to the Configuration before the command line get parsed. Therefore some of the fields need to be Option

The idea is to be able to make a Configuration before it being modified by the commandline arguments. For that I need defaults and chain_spec, like some other fields, are Option even though they are required for running a node.

It's not ideal. I think it would be best to have some kind of intermediate object, one that has the Options that can be converted to one that doesn't have and it would be fail-able at that point.

Metadata

Metadata

Assignees

Labels

I7-refactorCode needs refactoring.J0-enhancementAn additional feature request.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions