Browse Source

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)
pull/3784/head
Ashley Vega 6 years ago
committed by Anton Kaliaev
parent
commit
d70871f41b
3 changed files with 13 additions and 5 deletions
  1. +1
    -0
      CHANGELOG_PENDING.md
  2. +4
    -3
      cmd/tendermint/commands/testnet.go
  3. +8
    -2
      docs/tendermint-core/using-tendermint.md

+ 1
- 0
CHANGELOG_PENDING.md 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)

+ 4
- 3
cmd/tendermint/commands/testnet.go View File

@ -161,9 +161,10 @@ 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),
Validators: genVals,
ChainID: "chain-" + cmn.RandStr(6),
ConsensusParams: types.DefaultConsensusParams(),
GenesisTime: tmtime.Now(),
Validators: genVals,
}
// Write genesis file.


+ 8
- 2
docs/tendermint-core/using-tendermint.md 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"


Loading…
Cancel
Save