testnet: add consensus_params to testnet config generation (#3781)

Also, document time_iota_ms.

Closes #3723

Commits:

* config: Add ConsensusParams when generating testnet config (#3723)

* docs: Add explanation of time_iota_ms (#3723)

* Update changelog_pending (#3723)
This commit is contained in:
Ashley Vega 2019-07-10 10:27:17 +01:00 committed by Anton Kaliaev
parent fc1eb46587
commit d70871f41b
3 changed files with 13 additions and 5 deletions

View File

@ -43,3 +43,4 @@ program](https://hackerone.com/tendermint).
- [p2p] \#3338 Prevent "sent next PEX request too soon" errors by not calling
ensurePeers outside of ensurePeersRoutine
- [behaviour] Return correct reason in MessageOutOfOrder (@jim380)
- [config] \#3723 Add consensus_params to testnet config generation; document time_iota_ms (@ashleyvega)

View File

@ -161,8 +161,9 @@ func testnetFiles(cmd *cobra.Command, args []string) error {
// Generate genesis doc from generated validators
genDoc := &types.GenesisDoc{
GenesisTime: tmtime.Now(),
ChainID: "chain-" + cmn.RandStr(6),
ConsensusParams: types.DefaultConsensusParams(),
GenesisTime: tmtime.Now(),
Validators: genVals,
}

View File

@ -43,6 +43,11 @@ definition](https://github.com/tendermint/tendermint/blob/master/types/genesis.g
- `chain_id`: ID of the blockchain. This must be unique for
every blockchain. If your testnet blockchains do not have unique
chain IDs, you will have a bad time. The ChainID must be less than 50 symbols.
- `consensus_params`
- `block`
- `time_iota_ms`: Minimum time increment between consecutive blocks (in
milliseconds). If the block header timestamp is ahead of the system clock,
decrease this value.
- `validators`: List of initial validators. Note this may be overridden entirely by the
application, and may be left empty to make explicit that the
application will initialize the validator set with ResponseInitChain.
@ -63,9 +68,10 @@ definition](https://github.com/tendermint/tendermint/blob/master/types/genesis.g
"genesis_time": "2018-11-13T18:11:50.277637Z",
"chain_id": "test-chain-s4ui7D",
"consensus_params": {
"block_size": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1"
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"