diff --git a/contrib/launchtools/config.go b/contrib/launchtools/config.go index e2d8847..c8c7063 100644 --- a/contrib/launchtools/config.go +++ b/contrib/launchtools/config.go @@ -89,6 +89,10 @@ type L2Config struct { Denom string `json:"denom,omitempty"` Moniker string `json:"moniker,omitempty"` + // block parameters + BlockMaxBytes int64 `json:"block_max_bytes,omitempty"` + BlockMaxGas int64 `json:"block_max_gas,omitempty"` + // BridgeID will be generated after the launch. BridgeID uint64 `json:"bridge_id,omitempty"` } @@ -106,6 +110,14 @@ func (l2config *L2Config) Finalize() error { l2config.Moniker = "operator" } + if l2config.BlockMaxBytes == 0 { + l2config.BlockMaxBytes = 5242880 // 5MB + } + + if l2config.BlockMaxGas == 0 { + l2config.BlockMaxGas = 100_000_000 // 100M + } + return nil } diff --git a/contrib/launchtools/steps/genesis.go b/contrib/launchtools/steps/genesis.go index 2008538..ab54736 100644 --- a/contrib/launchtools/steps/genesis.go +++ b/contrib/launchtools/steps/genesis.go @@ -8,6 +8,8 @@ import ( "cosmossdk.io/log" conmetconfig "github.com/cometbft/cometbft/config" cometos "github.com/cometbft/cometbft/libs/os" + cmttypes "github.com/cometbft/cometbft/types" + "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -220,6 +222,12 @@ func initializeGenesis( appGenesis := &genutiltypes.AppGenesis{} appGenesis.Consensus = &genutiltypes.ConsensusGenesis{ Validators: nil, + Params: &cmttypes.ConsensusParams{ + Block: cmttypes.BlockParams{ + MaxBytes: config.L2Config.BlockMaxBytes, + MaxGas: config.L2Config.BlockMaxGas, + }, + }, } appGenesis.AppName = version.AppName appGenesis.AppVersion = version.Version