mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 23:35:19 +00:00
disable london fork for kava 10 evm and dev chain (#1240)
This commit is contained in:
parent
119b69f6d6
commit
ae81b4947b
@ -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
|
||||
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
|
||||
jq '.app_state.bridge.params.bridge_enabled = true' $DATA/config/genesis.json | sponge $DATA/config/genesis.json
|
||||
|
||||
|
@ -36,13 +36,18 @@ func migrateAppState(appState genutiltypes.AppMap, clientCtx client.Context) {
|
||||
appState[evmutiltypes.ModuleName] = codec.MustMarshalJSON(evmUtilGenState)
|
||||
|
||||
// x/evm
|
||||
evmChainConfig := evmtypes.DefaultChainConfig()
|
||||
evmChainConfig.LondonBlock = nil
|
||||
evmChainConfig.ArrowGlacierBlock = nil
|
||||
evmChainConfig.MergeForkBlock = nil
|
||||
|
||||
evmGenState := &evmtypes.GenesisState{
|
||||
Accounts: []evmtypes.GenesisAccount{},
|
||||
Params: evmtypes.Params{
|
||||
EvmDenom: "akava",
|
||||
EnableCreate: true,
|
||||
EnableCall: true,
|
||||
ChainConfig: evmtypes.DefaultChainConfig(),
|
||||
ChainConfig: evmChainConfig,
|
||||
ExtraEIPs: nil,
|
||||
},
|
||||
}
|
||||
|
@ -51,15 +51,21 @@ func TestMigrateEvm(t *testing.T) {
|
||||
appMap, ctx := migrateToV17AndGetAppMap(t)
|
||||
var genstate evmtypes.GenesisState
|
||||
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.Len(t, genstate.Accounts, 0)
|
||||
assert.Equal(t, genstate.Params, evmtypes.Params{
|
||||
assert.Equal(t, evmtypes.Params{
|
||||
EvmDenom: "akava",
|
||||
EnableCreate: true,
|
||||
EnableCall: true,
|
||||
ChainConfig: evmtypes.DefaultChainConfig(),
|
||||
ChainConfig: expectedChainConfig,
|
||||
ExtraEIPs: []int64{},
|
||||
})
|
||||
}, genstate.Params)
|
||||
}
|
||||
|
||||
func TestMigrateAuction(t *testing.T) {
|
||||
|
6
migrate/v0_17/testdata/genesis-v17.json
vendored
6
migrate/v0_17/testdata/genesis-v17.json
vendored
@ -1557,9 +1557,9 @@
|
||||
"istanbul_block": "0",
|
||||
"muir_glacier_block": "0",
|
||||
"berlin_block": "0",
|
||||
"london_block": "0",
|
||||
"arrow_glacier_block": "0",
|
||||
"merge_fork_block": "0"
|
||||
"london_block": null,
|
||||
"arrow_glacier_block": null,
|
||||
"merge_fork_block": null
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user