Merge pull request #84 from ethereum/sample-mock-states

add sample quickstart states
This commit is contained in:
Danny Ryan 2019-09-07 09:55:07 -06:00 committed by GitHub
commit 3a7525aa71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 0 deletions

View File

@ -15,6 +15,8 @@ A network start consists of the following:
Quick-start is a simple method to create and run a common genesis `BeaconState` with from two parameters -- `genesis_time` and `validator_count`. These parameters can be specified either in a YAML file or as command-line params. This method is appealing in many testing scenarios because it is both simple and succinct. The main drawback of this method is that all validators are initialized with `MAX_EFFECTIVE_BALANCE` to start.
Sample genesis ssz states using this method can be found in [`test_quickstart_states/`](./test_quickstart_states/).
#### Generate deposits
A list of `validator_count` `deposits` is derived using the first `validator_count` pubkey/privkey pairs from a shared pubkey/privkey rainbow table of valid pubkey/privkeys generated in the [method below](#pubkeyprivkey-generation). `withdrawal_credentials` for each are set to `BLS_WITHDRAWAL_PREFIX + hash(deposit.data.pubkey)[1:]`. `amount` for each is set to `MAX_EFFECTIVE_BALANCE`.

View File

@ -0,0 +1,29 @@
# Test quickstart states
The following quickstart states were generated via `zcli` to be used as
references to test local quickstart implementations against.
## 16 Validors
Quickstart with 16 validators at 1567777777 genesis time.
`zcli` command:
```
zcli genesis mock --count 16 --genesis-time 1567777777 --keys interop/mocked_start/keygen_10000_validators.yaml
```
[SSZ output](./quickstart_genesis_16_1567777777.ssz)
## 32 Validors
Quickstart with 32 validators at 1567777777 genesis time.
`zcli` command:
```
zcli genesis mock --count 32 --genesis-time 1567777777 --keys interop/mocked_start/keygen_10000_validators.yaml
```
[SSZ output](./quickstart_genesis_32_1567777777.ssz)