Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 9ebe6f6

Browse files
Merge branch 'main' into fedekunze/split-deduct-fee
2 parents 1cb2921 + a5c927b commit 9ebe6f6

34 files changed

+55
-3566
lines changed

.github/workflows/test.yml

+1-81
Original file line numberDiff line numberDiff line change
@@ -127,84 +127,4 @@ jobs:
127127
name: ethermint
128128
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
129129
- name: 'instantiate integration test env'
130-
run: nix-store -r $(nix-instantiate tests/integration_tests/shell.nix)
131-
132-
test-sim-nondeterminism:
133-
runs-on: ubuntu-latest
134-
timeout-minutes: 25
135-
steps:
136-
- uses: actions/setup-go@v3
137-
with:
138-
go-version: 1.19
139-
check-latest: true
140-
- uses: actions/checkout@v3
141-
- uses: technote-space/[email protected]
142-
with:
143-
PATTERNS: |
144-
**/**.go
145-
go.mod
146-
go.sum
147-
- name: Test simulation nondeterminism
148-
run: |
149-
make test-sim-nondeterminism
150-
if: env.GIT_DIFF
151-
152-
test-sim-random-genesis-fast:
153-
runs-on: ubuntu-latest
154-
timeout-minutes: 25
155-
steps:
156-
- uses: actions/setup-go@v3
157-
with:
158-
go-version: 1.19
159-
check-latest: true
160-
- uses: actions/checkout@v3
161-
- uses: technote-space/[email protected]
162-
with:
163-
PATTERNS: |
164-
**/**.go
165-
go.mod
166-
go.sum
167-
- name: Test simulation with random genesis
168-
run: |
169-
make test-sim-random-genesis-fast
170-
if: env.GIT_DIFF
171-
172-
test-sim-import-export:
173-
runs-on: ubuntu-latest
174-
timeout-minutes: 25
175-
steps:
176-
- uses: actions/setup-go@v3
177-
with:
178-
go-version: 1.19
179-
check-latest: true
180-
- uses: actions/checkout@v3
181-
- uses: technote-space/[email protected]
182-
with:
183-
PATTERNS: |
184-
**/**.go
185-
go.mod
186-
go.sum
187-
- name: Simulation of import and export genesis
188-
run: |
189-
make test-sim-import-export
190-
if: env.GIT_DIFF
191-
192-
test-sim-after-import:
193-
runs-on: ubuntu-latest
194-
timeout-minutes: 25
195-
steps:
196-
- uses: actions/setup-go@v3
197-
with:
198-
go-version: 1.19
199-
check-latest: true
200-
- uses: actions/checkout@v3
201-
- uses: technote-space/[email protected]
202-
with:
203-
PATTERNS: |
204-
**/**.go
205-
go.mod
206-
go.sum
207-
- name: Test simulation after import
208-
run: |
209-
make test-sim-after-import
210-
if: env.GIT_DIFF
130+
run: nix-store -r "$(nix-instantiate tests/integration_tests/shell.nix)"

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,14 @@ Ref: https://keepachangelog.com/en/1.0.0/
5656
* (ante) [#1214](https://github.com/evmos/ethermint/pull/1214) Set mempool priority to EVM transactions.
5757
* (evm) [#1405](https://github.com/evmos/ethermint/pull/1405) Add parameter `chainID` to evm keeper's `EVMConfig` method, so caller can choose to not use the cached `eip155ChainID`.
5858

59+
### Features
60+
61+
- (app) [#1501](https://github.com/evmos/ethermint/pull/1501) Set default File store listener for application from [ADR38](https://docs.cosmos.network/v0.47/architecture/adr-038-state-listening)
62+
5963
### Improvements
6064

65+
* (tests) [#1507](https://github.com/evmos/ethermint/pull/1507) Remove legacy sim tests
66+
* (feemarket) [#1508](https://github.com/evmos/ethermint/pull/1508) Remove old x/params migration logic
6167
* (evm) [#1499](https://github.com/evmos/ethermint/pull/1499) Add Shanghai and Cancun block
6268
* (ante) [#1455](https://github.com/evmos/ethermint/pull/1455) Refactor `AnteHandler` logic
6369
* (evm) [#1444](https://github.com/evmos/ethermint/pull/1444) Improve performance of `eth_estimateGas`
@@ -81,6 +87,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
8187

8288
### Bug Fixes
8389

90+
* (app) [#1505](https://github.com/evmos/ethermint/pull/1505) Setup gRPC node service with the application.
8491
* (server) [#1497](https://github.com/evmos/ethermint/pull/1497) Fix telemetry server setup for observability
8592
* (rpc) [#1442](https://github.com/evmos/ethermint/pull/1442) Fix decoding of `finalized` block number.
8693
* (rpc) [#1179](https://github.com/evmos/ethermint/pull/1179) Fix gas used in traceTransaction response.

Makefile

-45
Original file line numberDiff line numberDiff line change
@@ -343,51 +343,6 @@ test-solidity:
343343

344344
.PHONY: run-tests test test-all test-import test-rpc test-contract test-solidity $(TEST_TARGETS)
345345

346-
test-sim-nondeterminism:
347-
@echo "Running non-determinism test..."
348-
@go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \
349-
-NumBlocks=100 -BlockSize=200 -Commit=true -Period=0 -v -timeout 24h
350-
351-
test-sim-random-genesis-fast:
352-
@echo "Running random genesis simulation..."
353-
@go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation \
354-
-Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h
355-
356-
test-sim-import-export: runsim
357-
@echo "Running application import/export simulation. This may take several minutes..."
358-
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport
359-
360-
test-sim-after-import: runsim
361-
@echo "Running application simulation-after-import. This may take several minutes..."
362-
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppSimulationAfterImport
363-
364-
test-sim-random-genesis-multi-seed: runsim
365-
@echo "Running multi-seed custom genesis simulation..."
366-
@$(BINDIR)/runsim -SimAppPkg=$(SIMAPP) -ExitOnFail 400 5 TestFullAppSimulation
367-
368-
test-sim-multi-seed-long: runsim
369-
@echo "Running long multi-seed application simulation. This may take awhile!"
370-
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 500 50 TestFullAppSimulation
371-
372-
test-sim-multi-seed-short: runsim
373-
@echo "Running short multi-seed application simulation. This may take awhile!"
374-
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 10 TestFullAppSimulation
375-
376-
test-sim-benchmark-invariants:
377-
@echo "Running simulation invariant benchmarks..."
378-
@go test -mod=readonly $(SIMAPP) -benchmem -bench=BenchmarkInvariants -run=^$ \
379-
-Enabled=true -NumBlocks=1000 -BlockSize=200 \
380-
-Period=1 -Commit=true -Seed=57 -v -timeout 24h
381-
382-
.PHONY: \
383-
test-sim-nondeterminism \
384-
test-sim-custom-genesis-fast \
385-
test-sim-import-export \
386-
test-sim-after-import \
387-
test-sim-custom-genesis-multi-seed \
388-
test-sim-multi-seed-short \
389-
test-sim-multi-seed-long \
390-
test-sim-benchmark-invariants
391346

392347
benchmark:
393348
@go test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION)

app/ante/signverify_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
evmtypes "github.com/evmos/ethermint/x/evm/types"
1111
)
1212

13-
1413
func (suite AnteTestSuite) TestEthSigVerificationDecorator() {
1514
addr, privKey := tests.NewAddrKey()
1615

app/app.go

+17-21
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package app
22

33
import (
44
"encoding/json"
5+
"fmt"
56
"io"
67
"net/http"
78
"os"
@@ -18,6 +19,7 @@ import (
1819

1920
"github.com/cosmos/cosmos-sdk/baseapp"
2021
"github.com/cosmos/cosmos-sdk/client"
22+
"github.com/cosmos/cosmos-sdk/client/grpc/node"
2123
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
2224
"github.com/cosmos/cosmos-sdk/codec"
2325
"github.com/cosmos/cosmos-sdk/codec/types"
@@ -26,6 +28,7 @@ import (
2628
servertypes "github.com/cosmos/cosmos-sdk/server/types"
2729
"github.com/cosmos/cosmos-sdk/simapp"
2830
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
31+
"github.com/cosmos/cosmos-sdk/store/streaming"
2932
storetypes "github.com/cosmos/cosmos-sdk/store/types"
3033
sdk "github.com/cosmos/cosmos-sdk/types"
3134
"github.com/cosmos/cosmos-sdk/types/module"
@@ -179,8 +182,6 @@ var (
179182
}
180183
)
181184

182-
var _ simapp.App = (*EthermintApp)(nil)
183-
184185
// var _ server.Application (*EthermintApp)(nil)
185186

186187
// EthermintApp implements an extended ABCI application. It is an application
@@ -230,9 +231,6 @@ type EthermintApp struct {
230231
// the module manager
231232
mm *module.Manager
232233

233-
// simulation manager
234-
sm *module.SimulationManager
235-
236234
// the configurator
237235
configurator module.Configurator
238236
}
@@ -283,6 +281,12 @@ func NewEthermintApp(
283281
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey)
284282
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
285283

284+
// load state streaming if enabled
285+
if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil {
286+
fmt.Printf("failed to load state streaming: %s", err)
287+
os.Exit(1)
288+
}
289+
286290
app := &EthermintApp{
287291
BaseApp: bApp,
288292
cdc: cdc,
@@ -591,17 +595,6 @@ func NewEthermintApp(
591595
// add test gRPC service for testing gRPC queries in isolation
592596
// testdata.RegisterTestServiceServer(app.GRPCQueryRouter(), testdata.TestServiceImpl{})
593597

594-
// create the simulation manager and define the order of the modules for deterministic simulations
595-
//
596-
// NOTE: this is not required apps that don't use the simulator for fuzz testing
597-
// transactions
598-
overrideModules := map[string]module.AppModuleSimulation{
599-
authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
600-
}
601-
app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules)
602-
603-
app.sm.RegisterStoreDecoders()
604-
605598
// initialize stores
606599
app.MountKVStores(keys)
607600
app.MountTransientStores(tkeys)
@@ -771,11 +764,6 @@ func (app *EthermintApp) GetSubspace(moduleName string) paramstypes.Subspace {
771764
return subspace
772765
}
773766

774-
// SimulationManager implements the SimulationApp interface
775-
func (app *EthermintApp) SimulationManager() *module.SimulationManager {
776-
return app.sm
777-
}
778-
779767
// RegisterAPIRoutes registers all application module routes with the provided
780768
// API server.
781769
func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
@@ -784,6 +772,8 @@ func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.
784772
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
785773
// Register new tendermint queries routes from grpc-gateway.
786774
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
775+
// Register node gRPC service for grpc-gateway.
776+
node.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
787777

788778
// Register grpc-gateway routes for all modules.
789779
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
@@ -809,6 +799,12 @@ func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context) {
809799
)
810800
}
811801

802+
// RegisterNodeService registers the node gRPC service on the provided
803+
// application gRPC query router.
804+
func (app *EthermintApp) RegisterNodeService(clientCtx client.Context) {
805+
node.RegisterNodeService(clientCtx, app.GRPCQueryRouter())
806+
}
807+
812808
// RegisterSwaggerAPI registers swagger route with API Server
813809
func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router) {
814810
statikFS, err := fs.New()

0 commit comments

Comments
 (0)