Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bbc5590
Use bstm branch
Eric-Warehime Sep 2, 2025
a2a8514
Selective trace logging
Eric-Warehime Sep 3, 2025
c63ad69
mod tidy
Eric-Warehime Sep 3, 2025
f1f5c60
Remove logging
Eric-Warehime Sep 3, 2025
1fc1a02
Increase evmd mempool size
Eric-Warehime Sep 3, 2025
451e75a
remove mempool evmd
Eric-Warehime Sep 4, 2025
0fa26b1
Merge branch 'eric/remove-blockers' into eric/bstm-no-mempool
Eric-Warehime Sep 4, 2025
a514e75
Enable optimistic execution
Eric-Warehime Sep 4, 2025
f83dd72
Parallelize blocks
Eric-Warehime Sep 5, 2025
50c79cc
Revert "remove mempool evmd"
Eric-Warehime Sep 5, 2025
2981d43
Update
Eric-Warehime Sep 8, 2025
211ed61
Update fee collection
Eric-Warehime Sep 9, 2025
4a87b8d
Make it parallel
Eric-Warehime Sep 10, 2025
c23351d
Fix errormod wrap
Eric-Warehime Sep 12, 2025
050a826
Run make format
Eric-Warehime Sep 15, 2025
304754b
Merge remote-tracking branch 'origin' into feat/bstm
Eric-Warehime Sep 16, 2025
ae41696
Update sdk dep, ibc dep
Eric-Warehime Sep 16, 2025
ab6a007
Merge remote-tracking branch 'origin' into feat/bstm
Eric-Warehime Sep 17, 2025
581b10b
Bump go version in CI
Eric-Warehime Sep 17, 2025
b4417ed
perf: backport cached abis onto blockstm branch (#632)
vladjdk Sep 17, 2025
f5226f9
Merge branch 'main' into feat/bstm
Eric-Warehime Sep 17, 2025
ee55a58
feat: separate geth metrics server (#633)
Eric-Warehime Sep 18, 2025
939564d
refactor: move default precompiles out of evmd config (#635)
vladjdk Sep 18, 2025
6afef97
refactor: make erc20keeper optional in x/vm (#609)
gjermundgaraba Sep 18, 2025
3b5df7c
test(systemtests): add appside mempool e2e test (#580)
Eric-Warehime Sep 18, 2025
08c687c
Bump blockstm version
Eric-Warehime Sep 19, 2025
938782e
Merge remote-tracking branch 'origin' into feat/bstm
Eric-Warehime Sep 19, 2025
f90a5c7
Fix lints
Eric-Warehime Sep 19, 2025
9415e6a
Update mempool config
Eric-Warehime Sep 22, 2025
e43f93e
Use connsync local client
Eric-Warehime Sep 22, 2025
eb1038e
Fix import
Eric-Warehime Sep 22, 2025
5f8aebb
Finish wiring mempool config
Eric-Warehime Sep 22, 2025
9b443d2
Revert "Use connsync local client"
Eric-Warehime Sep 23, 2025
ac396ff
No-op prepare proposal verify tx
Eric-Warehime Sep 23, 2025
7f25187
Add metrics to proposals
Eric-Warehime Sep 23, 2025
0ae6838
Also get metrics on process proposal
Eric-Warehime Sep 23, 2025
bb3c344
Put all txs into the block
Eric-Warehime Sep 23, 2025
72aa372
Add race detection to build
Eric-Warehime Sep 24, 2025
46119b9
Fix race condition in mempool blockchain impl
Eric-Warehime Sep 24, 2025
845972f
Disable block gas meter
Eric-Warehime Sep 24, 2025
c3df450
add test to trigger race condition between RemoveTx and runReorg
mattac21 Sep 24, 2025
207a0fa
fix race condition between RemoveTx and runReorg
mattac21 Sep 24, 2025
ea38af8
changelog
mattac21 Sep 24, 2025
0e18a87
Merge branch 'main' into ma/remove-mempool-remove-tx-race
mattac21 Sep 24, 2025
dfb9d59
fix typo in comment
mattac21 Sep 24, 2025
7958632
Merge branch 'main' into ma/remove-mempool-remove-tx-race
mattac21 Sep 24, 2025
a6e6d8b
Merge branch 'main' into ma/remove-mempool-remove-tx-race
aljo242 Sep 24, 2025
9ec65a8
Merge remote-tracking branch 'origin' into feat/bstm
Eric-Warehime Sep 24, 2025
8b5bfe6
Merge remote-tracking branch 'origin/ma/remove-mempool-remove-tx-race…
Eric-Warehime Sep 24, 2025
931750a
Replace btree w/ fork
Eric-Warehime Sep 24, 2025
70fe65e
Update btree fork
Eric-Warehime Sep 24, 2025
77cdedb
Use updated btree, revert prepare proposal hack
Eric-Warehime Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.23.6'
go-version: '1.25'
check-latest: true
- name: "Checkout Repository"
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jsonrpc-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.25"
check-latest: true

- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.24"
go-version: "1.25
check-latest: true

- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/solidity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.25"
check-latest: true
- name: Install Foundry (forge/cast/anvil)
uses: foundry-rs/foundry-toolchain@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.25"
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.25"
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'

- name: Install system dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-compatibility-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'

- name: Install system dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-compatibility-hardhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'

- name: Install system dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-compatibility-viem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'

- name: Install system dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-compatibility-web3js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.25'

- name: Install system dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- [\#645](https://github.com/cosmos/evm/pull/645) Align precise bank keeper for correct decimal conversion in evmd.
- [\#656](https://github.com/cosmos/evm/pull/656) Fix race condition in concurrent usage of mempool StateAt and NotifyNewBlock methods.

* [\#658](https://github.com/cosmos/evm/pull/658) Fix race condition between legacypool's RemoveTx and runReorg.

### IMPROVEMENTS

- [\#538](https://github.com/cosmos/evm/pull/538) Optimize `eth_estimateGas` gRPC path: short-circuit plain transfers, add optimistic gas bound based on `MaxUsedGas`.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ endif
build: go.sum $(BUILDDIR)/
@echo "🏗️ Building evmd to $(BUILDDIR)/$(EXAMPLE_BINARY) ..."
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY) $(EVMD_MAIN_PKG)
go build -race $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY) $(EVMD_MAIN_PKG)

# Cross-compile for Linux AMD64
build-linux:
Expand Down
2 changes: 0 additions & 2 deletions ante/cosmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package ante

import (
cosmosante "github.com/cosmos/evm/ante/cosmos"
evmante "github.com/cosmos/evm/ante/evm"
evmtypes "github.com/cosmos/evm/x/vm/types"
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"

Expand Down Expand Up @@ -34,6 +33,5 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
)
}
22 changes: 3 additions & 19 deletions ante/evm/01_setup_ctx.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package evm

import (
anteinterfaces "github.com/cosmos/evm/ante/interfaces"
evmante "github.com/cosmos/evm/x/vm/ante"

errorsmod "cosmossdk.io/errors"
Expand All @@ -16,18 +15,10 @@ var _ sdktypes.AnteDecorator = &EthSetupContextDecorator{}

// EthSetupContextDecorator is adapted from SetUpContextDecorator from cosmos-sdk, it ignores gas consumption
// by setting the gas meter to infinite
type EthSetupContextDecorator struct {
evmKeeper anteinterfaces.EVMKeeper
}

func NewEthSetUpContextDecorator(evmKeeper anteinterfaces.EVMKeeper) EthSetupContextDecorator {
return EthSetupContextDecorator{
evmKeeper: evmKeeper,
}
}
type EthSetupContextDecorator struct{}

func (esc EthSetupContextDecorator) AnteHandle(ctx sdktypes.Context, tx sdktypes.Tx, simulate bool, next sdktypes.AnteHandler) (newCtx sdktypes.Context, err error) {
newCtx, err = SetupContextAndResetTransientGas(ctx, tx, esc.evmKeeper)
newCtx, err = SetupContextAndResetTransientGas(ctx, tx)
if err != nil {
return ctx, err
}
Expand All @@ -37,7 +28,7 @@ func (esc EthSetupContextDecorator) AnteHandle(ctx sdktypes.Context, tx sdktypes
// SetupContextAndResetTransientGas modifies the context to be used in the
// execution of the ante handler associated with an EVM transaction. Previous
// gas consumed is reset in the transient store.
func SetupContextAndResetTransientGas(ctx sdktypes.Context, tx sdktypes.Tx, evmKeeper anteinterfaces.EVMKeeper) (sdktypes.Context, error) {
func SetupContextAndResetTransientGas(ctx sdktypes.Context, tx sdktypes.Tx) (sdktypes.Context, error) {
// all transactions must implement GasTx
_, ok := tx.(authante.GasTx)
if !ok {
Expand All @@ -50,12 +41,5 @@ func SetupContextAndResetTransientGas(ctx sdktypes.Context, tx sdktypes.Tx, evmK
newCtx := evmante.BuildEvmExecutionCtx(ctx).
WithGasMeter(storetypes.NewInfiniteGasMeter())

// Reset transient gas used to prepare the execution of current cosmos tx.
// Transient gas-used is necessary to sum the gas-used of cosmos tx, when it contains multiple eth msgs.
//
// TODO: add more context here to explain why gas used is reset. Not clear
// from docstring.
evmKeeper.ResetTransientGasUsed(ctx)

return newCtx, nil
}
82 changes: 0 additions & 82 deletions ante/evm/10_gas_wanted.go

This file was deleted.

64 changes: 0 additions & 64 deletions ante/evm/11_emit_event.go

This file was deleted.

4 changes: 0 additions & 4 deletions ante/evm/fee_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ func (m MockFeemarketKeeper) GetBaseFeeEnabled(_ sdk.Context) bool {
return true
}

func (m MockFeemarketKeeper) AddTransientGasWanted(_ sdk.Context, _ uint64) (uint64, error) {
return 0, nil
}

func (m MockFeemarketKeeper) GetParams(_ sdk.Context) (params feemarkettypes.Params) {
return feemarkettypes.DefaultParams()
}
Expand Down
11 changes: 1 addition & 10 deletions ante/evm/mono_decorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
evmDenom := evmtypes.GetEVMCoinDenom()

// 1. setup ctx
ctx, err = SetupContextAndResetTransientGas(ctx, tx, md.evmKeeper)
ctx, err = SetupContextAndResetTransientGas(ctx, tx)
if err != nil {
return ctx, err
}
Expand Down Expand Up @@ -255,15 +255,6 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
return ctx, err
}

// 10. gas wanted
if err := CheckGasWanted(ctx, md.feeMarketKeeper, tx, decUtils.Rules.IsLondon); err != nil {
return ctx, err
}

// 11. emit events
txIdx := uint64(msgIndex) //nolint:gosec // G115
EmitTxHashEvent(ctx, ethMsg, decUtils.BlockTxIndex, txIdx)

if err := CheckTxFee(txFeeInfo, decUtils.TxFee, decUtils.TxGasLimit); err != nil {
return ctx, err
}
Expand Down
Loading
Loading