Skip to content

Commit f1c82d8

Browse files
committed
refactor: merge upgrade handlers
1 parent c3cffde commit f1c82d8

3 files changed

Lines changed: 16 additions & 64 deletions

File tree

app/upgrades.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
purgeexpiredoutbounds "github.com/pushchain/push-chain-node/app/upgrades/purge-expired-outbounds"
1212
removeutxverifier "github.com/pushchain/push-chain-node/app/upgrades/remove-utxverifier"
1313
tssfundmigrationfixes "github.com/pushchain/push-chain-node/app/upgrades/tss-fund-migration-fixes"
14-
evmupgrade032 "github.com/pushchain/push-chain-node/app/upgrades/evm-upgrade032"
1514
tssmigration "github.com/pushchain/push-chain-node/app/upgrades/tss-migration"
1615
ueamigration "github.com/pushchain/push-chain-node/app/upgrades/uea-migration"
1716
ceagasandpayload "github.com/pushchain/push-chain-node/app/upgrades/cea-gas-and-payload"
@@ -67,7 +66,6 @@ var Upgrades = []upgrades.Upgrade{
6766
purgeexpiredoutbounds.NewUpgrade(),
6867
removeutxverifier.NewUpgrade(),
6968
tssfundmigrationfixes.NewUpgrade(),
70-
evmupgrade032.NewUpgrade(),
7169
contractauditchanges.NewUpgrade(),
7270
}
7371

app/upgrades/contract-audit-changes/upgrade.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,23 @@ import (
1313
"github.com/pushchain/push-chain-node/app/upgrades"
1414
)
1515

16+
// Upgrade for chain contract audit changes + evm version bump to 0.3.2
1617
// UpgradeName matches the chain-side change set that adapts the chain's
1718
// UniversalCore ABI + gas-fee read path to the post-audit smart-contract
1819
// No module ConsensusVersion is bumped for this upgrade — none of the chain
1920
// changes touch module storage schemas, so RunMigrations is a no-op for the
2021
// version map; this handler exists primarily as a coordination point so all
2122
// validators flip to the new ABI / gas-fee read at the same height.
23+
24+
// Key changes in this library bump:
25+
// - AccountKeeper now requires unordered-tx methods (satisfied via authKeeperEVMWrapper stub)
26+
// - EVMKeeper constructor takes additional params: store keys map, ConsensusParamsKeeper
27+
// - go-ethereum bumped to v1.15.11-cosmos-0; statedb.Account.Balance is now uint256.Int (not big.Int)
28+
// - erc20 module: NativePrecompiles moved from Params to a top-level genesis field
29+
// - Precompile constructors now require bankKeeper; gov precompile also requires appCodec
30+
// - vm.NewAppModule signature updated to accept AddressCodec
31+
//
32+
// RunMigrations handles the erc20 state migration automatically (consensus version bump).
2233
const UpgradeName = "contract-audit-changes"
2334

2435
func NewUpgrade() upgrades.Upgrade {
@@ -41,10 +52,12 @@ func CreateUpgradeHandler(
4152
sdkCtx := sdk.UnwrapSDKContext(ctx)
4253
logger := sdkCtx.Logger().With("upgrade", UpgradeName)
4354
logger.Info("Starting upgrade handler")
55+
logger.Info("cosmos/evm v0.2.x → v0.3.2: erc20 NativePrecompiles field migration, go-ethereum v1.15.11-cosmos-0")
56+
logger.Info("UniversalCore audit: ABI gasLimitUsed output, setGasPrice removal, gas_fee.go reads results[5]")
4457

45-
// RunMigrations is a no-op for this upgrade (no module ConsensusVersion
46-
// bumped) but we still call it so the version map is materialised
47-
// correctly for any modules whose code may have changed underneath.
58+
// erc20 module's ConsensusVersion bump (from EVM 0.3.2) drives the
59+
// only on-chain state migration this upgrade requires; RunMigrations
60+
// handles it. The chain's own modules don't bump versions here.
4861
versionMap, err := mm.RunMigrations(ctx, configurator, fromVM)
4962
if err != nil {
5063
return nil, fmt.Errorf("RunMigrations: %w", err)

app/upgrades/evm-upgrade032/upgrade.go

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)