After exporting and reinitialising the chain the consensus_params.block.time_iota_ms value is 0. This fails when restarting the chain with the new genesis.json.
v0.34.4-0.20200511222341-80be50319ca5
gaiad export --for-zero-height > newgenesis.jsongaiad unsafe-reset-allcp newgenesis.json ~/.gaiad/config/genesis.jsongaiad startFails with:
block.TimeIotaMs must be greater than 0. Got 0.
Yes, this is because we're not saving/exporting Block.TimeIotaMs -- I intentionally didn't include this because this value really isn't meant to change. I guess we have no choice but to include it.
@jgimeno do you think you have the bandwidth to take this on? It should be pretty straight forward.
Ok, I think we have two options here.
@aaronc , @alexanderbez , @alessio opinions?
@jgimeno it's a one-line fix:
diff --git a/server/export.go b/server/export.go
index 672432ad0..ff3f9be5f 100644
--- a/server/export.go
+++ b/server/export.go
@@ -75,8 +75,9 @@ func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *
doc.Validators = validators
doc.ConsensusParams = &tmtypes.ConsensusParams{
Block: tmtypes.BlockParams{
- MaxBytes: cp.Block.MaxBytes,
- MaxGas: cp.Block.MaxGas,
+ MaxBytes: cp.Block.MaxBytes,
+ MaxGas: cp.Block.MaxGas,
+ TimeIotaMs: doc.ConsensusParams.Block.TimeIotaMs,
},
Evidence: tmtypes.EvidenceParams{
MaxAgeNumBlocks: cp.Evidence.MaxAgeNumBlocks,
Oh yes, the doc was there :D
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Marked as done and merged. I'm closing.