Skip to content

[suggestion] Simplify genesis config #4029

@0x009922

Description

@0x009922

Description

I propose to simplify genesis configuration a little bit by moving it to config file & env and dropping the related CLI flag.

How it works now

There are the following configurations:

  • --submit-genesis CLI flag to enable submitting for a particular field
  • IROHA_GENESIS env var with path to genesis file (defaults to genesis.json)
  • genesis.public_key (GENESIS_PUBLIC_KEY) parameter that must be set for ALL peers
  • genesis.private_key (GENESIS_PRIVATE_KEY) parameter that must be set when --submit-genesis is set.

What is wrong:

  • IROHA_GENESIS can only be set via ENV
  • Intention to submit genesis is duplicated by setting --submit-genesis and genesis.private_key

Proposed change

  • genesis.public_key, required for all
  • genesis.private_key and genesis.file for the peer that submits the genesis
  • genesis.file might have a default value (genesis.json) which is applied if only genesis.private_key is set. Although it might make behaviour somewhat unclear. I think enforcing genesis.file to be set explicitly will be more reliable.

Benefits:

  • Flexible: genesis might be configured via only config file, or via only ENV, or mixed
  • Simple: no extra CLI flag

Metadata

Metadata

Assignees

Labels

config-changesChanges in configuration and start up of the Irohairoha2-devThe re-implementation of a BFT hyperledger in RUSTquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions