-
Notifications
You must be signed in to change notification settings - Fork 283
[suggestion] Simplify genesis config #4029
Copy link
Copy link
Closed
Labels
config-changesChanges in configuration and start up of the IrohaChanges in configuration and start up of the Irohairoha2-devThe re-implementation of a BFT hyperledger in RUSTThe re-implementation of a BFT hyperledger in RUSTquestionFurther information is requestedFurther information is requested
Metadata
Metadata
Assignees
Labels
config-changesChanges in configuration and start up of the IrohaChanges in configuration and start up of the Irohairoha2-devThe re-implementation of a BFT hyperledger in RUSTThe re-implementation of a BFT hyperledger in RUSTquestionFurther information is requestedFurther information is requested
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-genesisCLI flag to enable submitting for a particular fieldIROHA_GENESISenv var with path to genesis file (defaults togenesis.json)genesis.public_key(GENESIS_PUBLIC_KEY) parameter that must be set for ALL peersgenesis.private_key(GENESIS_PRIVATE_KEY) parameter that must be set when--submit-genesisis set.What is wrong:
IROHA_GENESIScan only be set via ENV--submit-genesisandgenesis.private_keyProposed change
genesis.public_key, required for allgenesis.private_keyandgenesis.filefor the peer that submits the genesisgenesis.filemight have a default value (genesis.json) which is applied if onlygenesis.private_keyis set. Although it might make behaviour somewhat unclear. I think enforcinggenesis.fileto be set explicitly will be more reliable.Benefits: