Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

The network setup user experience #516

Closed
ChihChengLiang opened this issue Apr 19, 2019 · 0 comments · Fixed by #517
Closed

The network setup user experience #516

ChihChengLiang opened this issue Apr 19, 2019 · 0 comments · Fixed by #517
Labels

Comments

@ChihChengLiang
Copy link
Contributor

What is wrong?

This task addresses how we setup up a testnet. Inspired by the Nimbus testnet, the proposed general experience looks like this:

$ mkdir /tmp/testnet
$ cd /tmp/testnet
$ trinity-beacon testnet

Generating 400 validator key pairs
Generating genesis state, setting genesis time 1 min later.
Moving 200 validators' private keys under Alice's control
Moving 200 validators' private keys under Bob's control

You can now run Alice and Bob with

    trinity-beacon --trinity-root-dir=/tmp/testnet/alice
    trinity-beacon --trinity-root-dir=/tmp/testnet/bob

$ trinity-beacon --trinity-root-dir=/tmp/testnet/alice
... Starting Alice

$ # In another terminal
$ trinity-beacon --trinity-root-dir=/tmp/testnet/bob
... Starting Bob

How can it be fixed

trinity-beacon testnet is a BaseMainProcessPlugin that does the following jobs

  • If the directory is non-empty, exits. Otherwise,

  • mkdir keys, generate many, say 400, key pairs

  • write genesis_state.yaml

  • mkdir alice and bob, these are the trinity_root_dir for them

  • distribute keys to Alice and Bob

  • arguments

    • --num: number of validators
    • --genesis-delay: number seconds before the genesis
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant