From aa5040f4613723439a0160f86da700a8cf81fa6c Mon Sep 17 00:00:00 2001 From: Narangde Date: Mon, 7 Oct 2024 12:59:26 +0900 Subject: [PATCH] feat(genesis): disable vote extension by default (#173) --- client/genutil/defaults.go | 1 - client/genutil/genutil_internal_test.go | 2 +- lib/netconf/iliad/genesis.json | 2 +- lib/netconf/local/genesis.json | 2 +- lib/tutil/testdata/genesis.json | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/genutil/defaults.go b/client/genutil/defaults.go index 75f2c39f..93b55e0c 100644 --- a/client/genutil/defaults.go +++ b/client/genutil/defaults.go @@ -5,7 +5,6 @@ import "github.com/cometbft/cometbft/types" // DefaultConsensusParams returns the default cometBFT consensus params for story protocol. func DefaultConsensusParams() *types.ConsensusParams { resp := types.DefaultConsensusParams() - resp.ABCI.VoteExtensionsEnableHeight = 1 // Enable vote extensions from the start. resp.Validator.PubKeyTypes = []string{types.ABCIPubKeyTypeSecp256k1} // Only k1 keys. resp.Block.MaxBytes = -1 // Disable max block bytes, since we MUST include the whole EVM block, which is limited by max gas per block. diff --git a/client/genutil/genutil_internal_test.go b/client/genutil/genutil_internal_test.go index 508a843f..931c3a02 100644 --- a/client/genutil/genutil_internal_test.go +++ b/client/genutil/genutil_internal_test.go @@ -15,7 +15,7 @@ import ( func TestDefaultConsensusParams(t *testing.T) { t.Parallel() cons := defaultConsensusGenesis() - require.EqualValues(t, 1, cons.Params.ABCI.VoteExtensionsEnableHeight) + require.EqualValues(t, 0, cons.Params.ABCI.VoteExtensionsEnableHeight) require.EqualValues(t, types.ABCIPubKeyTypeSecp256k1, cons.Params.Validator.PubKeyTypes[0]) require.EqualValues(t, -1, cons.Params.Block.MaxBytes) require.EqualValues(t, -1, cons.Params.Block.MaxGas) diff --git a/lib/netconf/iliad/genesis.json b/lib/netconf/iliad/genesis.json index 1851eb7c..20660b49 100644 --- a/lib/netconf/iliad/genesis.json +++ b/lib/netconf/iliad/genesis.json @@ -19,7 +19,7 @@ "app": "0" }, "abci": { - "vote_extensions_enable_height": "1" + "vote_extensions_enable_height": "0" } }, "app_hash": "", diff --git a/lib/netconf/local/genesis.json b/lib/netconf/local/genesis.json index 22c1e0a0..bd2bbf5e 100644 --- a/lib/netconf/local/genesis.json +++ b/lib/netconf/local/genesis.json @@ -19,7 +19,7 @@ "app": "0" }, "abci": { - "vote_extensions_enable_height": "1" + "vote_extensions_enable_height": "0" } }, "app_hash": "", diff --git a/lib/tutil/testdata/genesis.json b/lib/tutil/testdata/genesis.json index 95180ec2..72fc8a12 100644 --- a/lib/tutil/testdata/genesis.json +++ b/lib/tutil/testdata/genesis.json @@ -19,7 +19,7 @@ ] }, "abci": { - "vote_extensions_enable_height": "1" + "vote_extensions_enable_height": "0" }, "version": {} },