Skip to content

Problem: evm v5 is outdated#14

Merged
mmsqe merged 128 commits intomantra/v0.5.xfrom
sync_v5
Oct 17, 2025
Merged

Problem: evm v5 is outdated#14
mmsqe merged 128 commits intomantra/v0.5.xfrom
sync_v5

Conversation

@mmsqe
Copy link
Copy Markdown

@mmsqe mmsqe commented Oct 17, 2025

Description


aslo align go-ethereum as https://github.com/MANTRA-Chain/mantrachain/blob/main/go.mod#L25

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

mmsqe and others added 30 commits August 13, 2025 14:48
…ingTxStream in build time (cosmos#440)

* feat: enforce app creator returning application implementing AppWithPendingTxStream in build time

* update application interface and app creator wiring for EVM server integration
* use cosmosevmserver.Application interface instead of servertypes.Application with assertion
* add new Application interface and AppCreator type to support pending tx stream

* add doc
* fix

* move-to-lib

* godoc

* cl

* Auto-fix markdown lint issues

* bump for ci

* bump for ci

* fix

* fix

* fix

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* wip

* wip: iterator

* nil check

* wip: selectby

* add todo

* pointer

* pointer 2

* remove impl, type assertions

* add txpool locally

* change statedb types to interface

* fix tests

* scaffold app setup

* Add initial tests to ExtMempool

* real priority nonce mempool + fixes

* improve test for wrong denom ordering

* move initialization to mempool

* ok

* Nonce gap tx test

* revert

* bloom parsing dumb

* redundant

* ignore this dir for markdown linting

* Cleanup + Test SelectBy

* implement blockchain

* update systemtest test tag

* add subscription

* fix tests

* wiring and bug fixes and todos and etc

* wip

* fix

* WIP on vlad/mempool

* Auto stash before checking out "origin/vlad/mempool"

* rpc no error

* clean up logging

* verification

* Add broadcasting

* add retries to tx results

* feature: Add txpool namespace stubs ahead of app-side mempool implementation (cosmos#344)

* add txpool implementation stubs

* update interface

* fix lint

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>

* txpool endpoint

* wip refactor

* do not allow block 1 submission

* fix some tests

* fix more tests

* fix last remaining evmd test

* add second registry for testing

* wip: integration tests

* wip: functional tests

time to add more test cases

* fix tests and chain

* demo ready

todo: fix removals

* fix removals (out of gas errors should be skipped)

* add gas to config

* attempt to fix flakes

* strict equalities

* FIXED FLAKES

* reformat tests into original structure

* nonce gap tests

* add demo test and fix prev system case

* remove done todos and the other mempool

* add instructions to remove mempool

* remove mocks

* lint fixes

* review test cases

* add some more test cases

* fix scripts

* add more backoff for testing

* remove logs from simplesends

* fix systest CI

* skip test for now see if main one works

* Update .markdownlintignore

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>

* Update evmd/tests/integration/create_app.go

Co-authored-by: Eric Warehime <eric.warehime@gmail.com>

* Refactor: Rename 'nonce' to 'accountNonce' in IncrementNonce function

* refactor app.go imports

* extract atest to constant

* fix nonce name test

* use actual release

* evmd use release tag

* refactor ctx -> getCtxCallback

* rename errors2 and types2 to sdkerrors and sdktypes

* group vars in mempool init

* privatize newBlockchain

* enhance mempool init readability on nil checks

* move txPool checks to right after initialization

* use errors.Is for nonce gap errors in rpc

* group vars

* Update tests/systemtests/.gitignore

* refactor iterator to make it more readable

* refactor iterator to make it more readable

* rename blocked -> queued and runnable -> pending

* explain some questionable naming choices

* add some status constants

* add logging

* move custom endblocker to vm

* fix rpc error compare

* fix system tests

* lints

* fixed from main merge

* rename mempool to experimental

* Auto-fix markdown lint issues

* we tidy

* overflow comment

* add changelog entry

* Update evmd/app.go

Co-authored-by: Hyunwoo Lee <124245155+zsystm@users.noreply.github.com>

* remove comment

* initialize txpool unconditionally

* sort by effective gas tips instead of fees on cosmos

* lints

* small test cleanup

---------

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
Co-authored-by: Abdul Malek <me@almk.dev>
Co-authored-by: Eric Warehime <eric.warehime@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hyunwoo Lee <124245155+zsystm@users.noreply.github.com>
* remove deprecated apis (removed from geth)

* add changelog

* chore: fix link
… HexAddressFromBech32String (cosmos#454)

* fix: apply multi decode functions instead of string contains check in HexAddressFromBech32String

* align for account, validator, and consensus addresses like sdk
* https://github.com/cosmos/cosmos-sdk/blob/release/v0.53.x/client/debug/main.go#L262

* test
* fix: cleanup unused cancel function in filter

* doc

* test

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
* add guide

* callout

* Auto-fix markdown lint issues

* fix-nit

diff --git c/docs/migrations/v0.3.0_to_v0.4.0.md i/docs/migrations/v0.3.0_to_v0.4.0.md
index 222b9e2..a5308d1 100644
--- c/docs/migrations/v0.3.0_to_v0.4.0.md
+++ i/docs/migrations/v0.3.0_to_v0.4.0.md
@@ -33,7 +33,7 @@ Bump the `cosmos/evm` dependency in `go.mod` and tidy modules:

 ### 1.2 Transitive bumps (observed in `go.sum`)

-Check for minor dependency bumps such as minor bumps (e.g., `google.golang.org/protobuf`, `github.com/gofrs/flock`, `github.com/consensys/gnark-crypto`). Run the following commands:
+Check for minor dependency bumps (e.g., `google.golang.org/protobuf`, `github.com/gofrs/flock`, `github.com/consensys/gnark-crypto`). Run the following commands:

 ```bash
 go mod tidy

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…se (cosmos#442)

* fix: avoid nil pointer by checking error in gov precompile FromResponse

* doc

* add test

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
* initial doc

* add diagram and description

* add transaction flow diagram

* reorganizing

* Auto-fix markdown lint issues

* add links to tools and an example script link

* Warning callout

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* add foundry uniswap v3 deploy test cases

* add gitignore for foundry

* exclude sol files in compatibility dir

* add verbose flag to debug

* fix script and ci yml

* remove verbose tag

* fix ci

* add checking logic at testing script

* shfmt ci-foundry-uniswap

* bash lint

* add foundry  tc

* clean deps

* revert version

* add tc for cast

* lint

* lint

* add sdk viem tc

* fix viem workflow

* add web3 tc

* add hardhat tc

* lint

* refactor: script and action file names

* clean up

* chore: fix typo at filename

* fix typo and update chain-id

* udpate chain id in tc

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
Co-authored-by: Abdul Malek <me@almk.dev>
* feat: re-use tx validation rules from go-ethereum

* fix format

* fix lint

* add missing gas rules

* fix test

* fix build

* don't check tx gas

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
Co-authored-by: Vlad J <vladjdk@gmail.com>
* upgrade script

* some comments

* allow mnemonics file input

* fix script

* add in the dev0-dev3s info

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
…DenomUnit for ibc token (cosmos#397)

* Problem: query decimals get reverted when Display doesn't match with DenomUnit for ibc token

* add test

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
* test(rpc-compat): add test simulator

* refactor(tests): jsonrpc test

* test(jsonprc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): add network start/stop scripts of evmd and geth

* test(jsonrpc): fix api counting in report

* test(jsonrpc): refactor result format

* test(jsonrpc): refactor

* test(jsonrpc): add state generator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor

* test(jsonrpc): setup geth dev mode

* test(jsonrpc): clean unused code

* test(jsonrpc): setup initial state

* test(jsonrpc): add tx metadata for test

* WIP: test(jsonrpc): fix some failing tests of eth_ apis

* test(jsonrpc): fix eth test

* WIP: test(jsonrpc): fix debug api test cases

* test(jsonrpc): set pruning config as nothing for testing

* test(jsonrpc): enhance debug testing

* test(jsonrpc): fix net test case

* chore: update working history

* test(jsonrpc): skip personal apis

* test(jsonrpc): add websocket api test

* jsonrpc(test): fix personal apis

* test(jsonrpc): add missing debug apis

* test(jsonrpc): update working history

* test(jsonrpc): fix eth_sign / eth_signTransaction test

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): refactor simulator

* test(jsonrpc): update working history

* WIP: add type check between responses from evmd and geth

* WIP: add type check between responses from evmd and geth

* WIP: test(jsonrpc): add type check between responses from evmd and geth

* test(jsonrpc): modify test

* test(jsonrpc): add debug apis

* test(jsonrpc): fix failing tests

* test(jsonrpc): fix failing test

* test(jsonrpc): fix test

* test(jsonrpc): fix test

* test(jsonrpc): remove unnecessary files

* chore: add compatibility test github ci job

* chore: update github-ci job

* chore: fix jsonrpc-compatibility test githib-ci job

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): fix github-ci

* test(jsonrpc): refactor test suite

* fix github-ci

* fix github-ci

* fix github-ci

* fix: github-ci

* fix: github-ci

* test(jsonrpc): add eth tests

* WIP: chore: debugging github-ci failure

* fix: github-ci

* test(jsonrpc): add missing debug tests

* fix github-ci

* test(jsonrpc): add eth_pendingtransaction test

* fix: github-ci

* test(jsonrpc): add missing debug tests

* Revert "test(jsonrpc): add missing debug tests"

This reverts commit 790cce7.

* Revert "fix: github-ci"

This reverts commit b3a777a.

* fix: github-ci

* fix: github-ci

* WIP: fix: github-ci

* WIP: fix github0-ci

* test(jsonrpc): refactor test suite

* fix: github-ci

* chore: add debug code for github-ci

* chore: add debug code for github-ci

* fix: github-ci

* fix: github-ci

* test(jsonrpc): refactor test suite

* test(jsonrpc): fix github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix github-ci

* test(jsonrpc): fix eth_getProof api

* fix eth_getProof api

* fix: github-ci

* fix: github-ci

* fix: github-ci

* test(jsonrpc): fix api test

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* fix: github-ci

* test(jsonrpc): modify test script

* fix: github-ci

* test(jsonrpc): refactor test suite

* test(jsonrpc): refactor test suite

* test(jsonrpc): fix websocket api tests

* chore: update README.md for jsonrpc test

* chore: remove binary file

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
* feat(x/precisebank): add FracionalBalanceChange event

* feat(precmopile/common): Add FractionalBalanceChangeEvent to balanceHandler

* feat(precompilse): apply changed balance handler

* fix(precompiles/common): balance handler logic

* test(precompiles): apply changed balance handler to evmd & integration test suite

* test(precompiles/werc20): fix integration test

* test(x/precisebank): fix integration tests

* test(precompiles/werc20): fix integration tests

* chore(x/precisebank): modify method name

* chore: fix lint

---------

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
* fix annoying md lints

* add setclientctx instructions

w

* Auto-fix markdown lint issues

* improve the look of the comments

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: add pagination flags to token-pairs query

* doc

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
…mos#415)

* feat: remove allow-unprotected-txs(non eip-155) from x/vm params

* fix: build

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
cloudgray and others added 15 commits October 10, 2025 15:58
* fix: mempool e2e test

* chore: expand timeout for system test

* chore: update CHANGELOG.md

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
* awd

* cleaninggggggg uppppppppppppp yayayaya

* moar cleanup

* summed up

* tidy

* change evm chain id

* use constants

* set default evm node chain id

* fix gas prices

* mod fix

* Update tests/systemtests/clients/cosmosclient.go

Co-authored-by: Abdul Malek <me@almk.dev>

* Update tests/systemtests/eip712/test_suite.go

Co-authored-by: Abdul Malek <me@almk.dev>

* remove memo

---------

Co-authored-by: Abdul Malek <me@almk.dev>
* add debug_traceBlock api

* add test cases for debug_traceCall

* chore: update CHANGELOG.md

* add debug_traceBlock api

* feat(rpc): add debug_getRawBlock api and fix debug_traceBlock api

* test(rpc): fix test cases for debug apis

* test(rpc): modify test case for debug_traceCall

* chore: fix lint

* fix test code

* Merge branch 'main' into feat(rpc)-traceCall

* chore: modify comments

* fix(x/vm): apply default args to TraceCall method

* test(jsonrpc): add type comparison of debug_traceCall response from evmd vs geth

* chore: remove useless method call

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: non-deterministic system test result

* fix: return type of eth apis

* fix: non-deterministic system test result

* chore: non-deterministic calculation for query

* fix: non-deterministic system test result

* test: fix eth_feeHistory api test code

* test: fix eth_feeHistory api test code

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
* debug msg on failure

* increase current gas by 10x

* add debug logging to cosmos sends

* Remove Cosmos replacement

* remove evm and cosmos replacement

* re-add tests and remove the second transaction submission

* remove invalid test case

* remove non-functional tests
… app configuration to helper (cosmos#698)

* move tests to remove circular dependency

* remove ante2

* wip: move all config files out of evmd

* wip: add todos

* reset config to fix test

* fix evmd tests by adding resets to the evmappoptions

* remove testutil/config constants

consolidates these constants into one file in /config

* fix eips test

the test was using a duplicate eips multiplier value instead of the global one moved to config

* remove all configs except for genesis from testutil/config and consolidate into /config

* changelogchangelogchangelogchangelogchangelog

* lints

* wip: removing app options (tests failing)

app options is removed from new app creation.

however, we're getting a recovered panic on *restarting* the chain due to prepareproposal running before preblocker:

+0x120\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).PrepareProposal.func1()\n\tgithub.com/cosmos/cosmos-sdk@v0.53.4/baseapp/abci.go:433 +0x38\npanic({0x1061c8160?, 0x10912faa0?})\n\truntime/panic.go:783 +0x120\ngithub.com/cosmos/evm/x/vm/types.GetEVMCoinDecimals(...)\n\tgithub.com/cosmos/evm@v0.2.0/x/vm/types/denom_config.go:61\ngithub.com/cosmos/evm/x/vm/types.ConvertAmountTo18DecimalsLegacy(...)\n\tgithub.com/cosmos/evm@v0.2.0/x/vm/types/scaling.go:17\ngithub.com/cosmos/evm/x/vm/wrappers.FeeMarketWrapper.GetBaseFee({{_, _}}, {{0x10698a810, 0x109225540}, {0x1069b51c0, 0x14001f4c200}, {{0x0, 0x0}, {0x16dc0f689, 0x4}, ...}, ...})\n\tgithub.com/cosmos/evm@v0.2.0/x/vm/wrappers/feemarket.go:38 +0x68\ngithub.com/cosmos/evm/x/vm/keeper.Keeper.GetBaseFee({{0x1069b4890, 0x14001eddeb0}, {0x10695e0b0, 0x14003560450}, {0x10695e240, 0x14003560490}, 0x140035637a0, {0x1400189d3e0, 0x14, 0x20}, ...}, ...)\n\tgithub.com/cosmos/evm@v0.2.0/x/vm/keeper/keeper.go:355 +0xe4\ngithub.com/cosmos/evm/mempool.(*ExperimentalEVMMempool).getIterators(0x14003cbd180, {0x10698a848?, 0x14002c39c08?}, {0x109225540, 0x0, 0x0})\n\tgithub.com/cosmos/evm@v0.2.0/mempool/mempool.go:439 +0x20c\ngithub.com/cosmos/evm/mempool.(*ExperimentalEVMMempool).SelectBy(0x14003cbd180, {0x10698a848?, 0x14002c39c08?}, {0x109225540?, 0x14000085ce8?, 0x104cce034?}, 0x140044cd540)\n\tgithub.com/cosmos/evm@v0.2.0/mempool/mempool.go:370 +0xe0\ngithub.com/cosmos/cosmos-sdk/types/mempool.SelectBy({0x10698a848?, 0x14002c39c08?}, {0x10698b108?, 0x14003cbd180?}, {0x109225540?, 0x0?, 0x0?}, 0x140044cd540)\n\tgithub.com/cosmos/cosmos-sdk@v0.53.4/types/mempool/mempool.go:58 +0xa0\ngithub.com/cosmos/evm/evmd.NewExampleApp.(*DefaultProposalHandler).PrepareProposalHandler.func3({{0x10698a810, 0x109225540}, {0x1069b51c0, 0x14001f4c200}, {{0x0, 0x0}, {0x16dc0f689, 0x4}, 0xd, {0x3507e5b0, ...}, ...}, ...}, ...)\n\tgithub.com/cosmos/cosmos-sdk@v0.53.4/baseapp/abci_utils.go:294 +0x250\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).PrepareProposal(0x14002d32488, 0x140015f42c0)\n\tgithub.com/cosmos/cosmos-sdk@v0.53.4/baseapp/abci.go:439

* begin storing coin info in the vm keeper storage

the mempool needed the global variable, but that wasn't set, so we set it in the vm keeper storage and use it from there in the mempool

everything else still uses the global variable, but we now have a foundation to move it over to the state storage

* remove debugging artifact

* artifact removal 2

* fix unit tests

* wip: fix ibc testing

* delete all evmappoptions from tests

* fix ibc precompile integration test balance getters

we were getting the 6 decimal balance when we were operating in 18-balance territory. now that we have a separation in the ibc tests, we should check balances accordingly

* fix all evmd tests

* fix precisebank keeper test

* fix smore tests

* lol

* add upgrade handler

* lints

* changelog

* Fix imports, add upgrade for non-18-decimal chains, and add migration guide

* fix system test

* Update docs/migrations/v0.4.0_to_v0.5.0_UNRELEASED.md

Co-authored-by: Abdul Malek <me@almk.dev>

* fix monodecorator test

* Remove test* denoms and replace with default*

* extract var

* match vars

* remove chain config from configurator

* undo uint8 change

* comment fixes

* Auto stash before merge of "vlad/remove-app-options" and "origin/main"

* set chain config in vm integ tests

* lint

* fix error on test

* fix denoms for ibc chain

* add mempool config helper

* Revert "fix denoms for ibc chain"

This reverts commit cbbaa44.

* add mempool config helper

* use app options chain id instead of passing param

* lints

* revert make race

* add changelog

* expore legacy fields

* use default config

* add mempool config helper

* add changelog

* expore legacy fields

* use default config

* fix tests

* clean up config creator

* get rid of obvious comments

* fix lint

* add bindings

* unbounded txs

* add max txs flag binding

* set to int

* add mempool config to docs

* max-txs param in eip tests

---------

Co-authored-by: Vlad <vladjdk@gmail.com>
Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
* chore: fix changelog

* chore: fix changelog
* add configurable validator power

* add changelog

* update flag string

* update comments

* remove string parsing from validation function and update tests

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
* fix: don't panic if evm mempool not used

* Update CHANGELOG.md
* fix: avoid nil pointer for tx evm raw cmd

* cleanup

* cleanup
* fix: inconsistent block hash in json-rpc responses

Update CHANGELOG.md

unify

unify

* fix test

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
* fix: non-deterministic evm pre-blocker

Closes: cosmos#728

Solution:
- remove the state mutation out from the pre-blocker.
- production chains should put the state mutation part in their upgrade handler.

* Update CHANGELOG.md

---------

Co-authored-by: Vlad J <vladjdk@gmail.com>
* fix: avoid 0 TransactionIndex in receipt

* add test

---------

Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
Co-authored-by: Vlad J <vladjdk@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sync_v5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mmsqe mmsqe merged commit 6d38644 into mantra/v0.5.x Oct 17, 2025
7 of 11 checks passed
@yihuang yihuang deleted the sync_v5 branch October 17, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.