diff --git a/block/executor.go b/block/executor.go index 3a2153193..28e0fcec4 100644 --- a/block/executor.go +++ b/block/executor.go @@ -7,6 +7,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmcrypto "github.com/tendermint/tendermint/crypto/encoding" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/proxy" tmtypes "github.com/tendermint/tendermint/types" "go.uber.org/multierr" @@ -63,13 +64,30 @@ func (e *Executor) InitChain(genesis *tmtypes.GenesisDoc, valset []*tmtypes.Vali }) } + params := genesis.ConsensusParams + return e.proxyAppConsensusConn.InitChainSync(abci.RequestInitChain{ - Time: genesis.GenesisTime, - ChainId: genesis.ChainID, - ConsensusParams: &abci.ConsensusParams{}, - Validators: valUpdates, - AppStateBytes: genesis.AppState, - InitialHeight: genesis.InitialHeight, + Time: genesis.GenesisTime, + ChainId: genesis.ChainID, + ConsensusParams: &abci.ConsensusParams{ + Block: &abci.BlockParams{ + MaxBytes: params.Block.MaxBytes, + MaxGas: params.Block.MaxGas, + }, + Evidence: &tmproto.EvidenceParams{ + MaxAgeNumBlocks: params.Evidence.MaxAgeNumBlocks, + MaxAgeDuration: params.Evidence.MaxAgeDuration, + MaxBytes: params.Evidence.MaxBytes, + }, + Validator: &tmproto.ValidatorParams{ + PubKeyTypes: params.Validator.PubKeyTypes, + }, + Version: &tmproto.VersionParams{ + AppVersion: params.Version.AppVersion, + }, + }, Validators: valUpdates, + AppStateBytes: genesis.AppState, + InitialHeight: genesis.InitialHeight, }) }