disable london fork for kava 10 evm and dev chain (#1240)

This commit is contained in:
Nick DeLuca 2022-05-05 16:58:04 -07:00 committed by GitHub
parent 119b69f6d6
commit ae81b4947b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 7 deletions

View File

@ -76,6 +76,14 @@ sed -in-place='' 's/aphoton/akava/g' $DATA/config/genesis.json
# Zero out the total supply so it gets recalculated during InitGenesis # Zero out the total supply so it gets recalculated during InitGenesis
jq '.app_state.bank.supply = []' $DATA/config/genesis.json|sponge $DATA/config/genesis.json jq '.app_state.bank.supply = []' $DATA/config/genesis.json|sponge $DATA/config/genesis.json
# Disable fee market
jq '.app_state.feemarket.params.no_base_fee = true' $DATA/config/genesis.json|sponge $DATA/config/genesis.json
# Disable london fork
jq '.app_state.evm.params.chain_config.london_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json
jq '.app_state.evm.params.chain_config.arrow_glacier_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json
jq '.app_state.evm.params.chain_config.merge_fork_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json
# Enable bridge # Enable bridge
jq '.app_state.bridge.params.bridge_enabled = true' $DATA/config/genesis.json | sponge $DATA/config/genesis.json jq '.app_state.bridge.params.bridge_enabled = true' $DATA/config/genesis.json | sponge $DATA/config/genesis.json

View File

@ -36,13 +36,18 @@ func migrateAppState(appState genutiltypes.AppMap, clientCtx client.Context) {
appState[evmutiltypes.ModuleName] = codec.MustMarshalJSON(evmUtilGenState) appState[evmutiltypes.ModuleName] = codec.MustMarshalJSON(evmUtilGenState)
// x/evm // x/evm
evmChainConfig := evmtypes.DefaultChainConfig()
evmChainConfig.LondonBlock = nil
evmChainConfig.ArrowGlacierBlock = nil
evmChainConfig.MergeForkBlock = nil
evmGenState := &evmtypes.GenesisState{ evmGenState := &evmtypes.GenesisState{
Accounts: []evmtypes.GenesisAccount{}, Accounts: []evmtypes.GenesisAccount{},
Params: evmtypes.Params{ Params: evmtypes.Params{
EvmDenom: "akava", EvmDenom: "akava",
EnableCreate: true, EnableCreate: true,
EnableCall: true, EnableCall: true,
ChainConfig: evmtypes.DefaultChainConfig(), ChainConfig: evmChainConfig,
ExtraEIPs: nil, ExtraEIPs: nil,
}, },
} }

View File

@ -51,15 +51,21 @@ func TestMigrateEvm(t *testing.T) {
appMap, ctx := migrateToV17AndGetAppMap(t) appMap, ctx := migrateToV17AndGetAppMap(t)
var genstate evmtypes.GenesisState var genstate evmtypes.GenesisState
err := ctx.Codec.UnmarshalJSON(appMap[evmtypes.ModuleName], &genstate) err := ctx.Codec.UnmarshalJSON(appMap[evmtypes.ModuleName], &genstate)
expectedChainConfig := evmtypes.DefaultChainConfig()
expectedChainConfig.LondonBlock = nil
expectedChainConfig.ArrowGlacierBlock = nil
expectedChainConfig.MergeForkBlock = nil
assert.NoError(t, err) assert.NoError(t, err)
assert.Len(t, genstate.Accounts, 0) assert.Len(t, genstate.Accounts, 0)
assert.Equal(t, genstate.Params, evmtypes.Params{ assert.Equal(t, evmtypes.Params{
EvmDenom: "akava", EvmDenom: "akava",
EnableCreate: true, EnableCreate: true,
EnableCall: true, EnableCall: true,
ChainConfig: evmtypes.DefaultChainConfig(), ChainConfig: expectedChainConfig,
ExtraEIPs: []int64{}, ExtraEIPs: []int64{},
}) }, genstate.Params)
} }
func TestMigrateAuction(t *testing.T) { func TestMigrateAuction(t *testing.T) {

View File

@ -1557,9 +1557,9 @@
"istanbul_block": "0", "istanbul_block": "0",
"muir_glacier_block": "0", "muir_glacier_block": "0",
"berlin_block": "0", "berlin_block": "0",
"london_block": "0", "london_block": null,
"arrow_glacier_block": "0", "arrow_glacier_block": null,
"merge_fork_block": "0" "merge_fork_block": null
} }
} }
}, },