Skip to content

Commit

Permalink
feat(genesis): disable vote extension by default (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHansLee authored and leeren committed Oct 15, 2024
1 parent 570db76 commit c3363a7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion client/genutil/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion client/genutil/genutil_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/netconf/iliad/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"app": "0"
},
"abci": {
"vote_extensions_enable_height": "1"
"vote_extensions_enable_height": "0"
}
},
"app_hash": "",
Expand Down
2 changes: 1 addition & 1 deletion lib/netconf/local/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"app": "0"
},
"abci": {
"vote_extensions_enable_height": "1"
"vote_extensions_enable_height": "0"
}
},
"app_hash": "",
Expand Down
2 changes: 1 addition & 1 deletion lib/tutil/testdata/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]
},
"abci": {
"vote_extensions_enable_height": "1"
"vote_extensions_enable_height": "0"
},
"version": {}
},
Expand Down

0 comments on commit c3363a7

Please sign in to comment.