Skip to content

Improve generate genesis script#1391

Merged
NicolasMahe merged 5 commits intodevfrom
feature/generate-genesis-script
Oct 3, 2019
Merged

Improve generate genesis script#1391
NicolasMahe merged 5 commits intodevfrom
feature/generate-genesis-script

Conversation

@NicolasMahe
Copy link
Copy Markdown
Member

  • This PR merge the previous 3 gen scripts to one that do the same and more
  • The new script writes to the disk in engine/.genesis folder all necessary info (includes private keys) for not only 1 validator, but other validator as well as simple client to be started easily with right config
  • The script has a new flag --gen-genesis that generate a new genesis before starting the engine. It should be passed only once if you want to connect multiple engine to each other. Set the env MESG_VALIDATOR_NUMBER to 2 or more if you want to create a network with multiple validator.
  • Use the flag --genesis_account to copy the all accounts private info to the engine. Only useful to execute transaction with a validator account. (will be deleted when it's possible to import an account from private key or mnemonic).
  • Of course, the flag --validator is still present and copy one validator private info to the engine. You will also need to provide the right validator name using the env MESG_NAME (the name are outputted when using flag --gen-genesis. Make sure also to set another port with MESG_TENDERMINT_VALIDATOR_PORT if you want to start multiple validator on the same computer.

Example of 2 validators and 2 clients:

MESG_VALIDATOR_NUMBER=2 ./dev --validator --gen-genesis
MESG_SERVER_PORT=50053 MESG_PATH=~/.mesg2 MESG_NAME=alice MESG_TENDERMINT_VALIDATOR_PORT=26666 ./dev --validator 
MESG_SERVER_PORT=50054 MESG_NAME=charles MESG_PATH=~/.mesg3 ./dev
MESG_SERVER_PORT=50055 MESG_NAME=david MESG_PATH=~/.mesg4 ./dev

closes #1385

@NicolasMahe NicolasMahe merged commit 7e3a35a into dev Oct 3, 2019
@NicolasMahe NicolasMahe deleted the feature/generate-genesis-script branch October 3, 2019 03:09
@NicolasMahe NicolasMahe added the release:change Pull requests that change something existant label Oct 25, 2019
@NicolasMahe NicolasMahe mentioned this pull request Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:change Pull requests that change something existant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate 10 validators and 10 cosmos account in genesis

2 participants