chore(evm): upgrade pushchain/evm to v0.5.1 on audit-fixes (port of #265)#266
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports PR #265 (cosmos/
pushchain/evmv0.4 → v0.5.1) ontoaudit-fixes. Cherry-picked #265's net diff, then closed the additional v0.2.1 → v0.5.1 API gap that the cherry-pick didn't cover (audit-fixeswas two minor evm versions behindmain).Design
upctoDefaultGenesis; v0.5's EVMInitGenesisauto-derives coin-info from it viaLoadEvmCoinInfo(no migration needed on a fresh chain).EVMChainID = 9000(matches thelocalchain_9000-1default chain id), denomupc/ displaypushchain.Audit fixes preserved (where
maindiverged/dropped them)isContractDeployed— kept; reimplemented via the renamedAccount.HasCodeHash()(identical!IsEmptyCodeHashsemantics).mainhad reverted this to the unsafe length-only check.0xEC..01); did not importmain's deadNewPrecompileV2/0xCAbackward-compat path.expected_keepers.goGetBallot/GetAdminandDerivedEVMCall— preserved.v0.5 API adaptations
EVMKeeper.NewKeepernew signature (+keys map,ConsensusParamsKeeper,EVMChainID,authKeeperEVMWrapper)MakeConfig(EVMChainID)CallEVMgainedgasCap *big.Int— updated interface, mock, and all call sites (passnil)PostTxProcessing(..., core.Message{}, ...)(was nilable)statedb.Account.Balance→*uint256.IntNativePrecompilesmoved to top-level genesismainnever had it)GetMempool/SetClientCtx/RegisterPendingTxListenerserver-interface methodsutils/precompile; Makefile test targets run with-tags=testTesting
go build ./...✓go vet -tags=test✓ (all code + test files compile)CallEVMgasCap, andPostTxProcessingend-to-end🤖 Generated with Claude Code