Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4010d24
feat(app): apply `App Wiring Changes` from v0.53.x
GuillemGarciaDev Aug 4, 2025
20a005d
chore: update cosmos-sdk dependencies
GuillemGarciaDev Aug 4, 2025
28506cb
fix: add latest cosmos-sdk version to go.mod
GuillemGarciaDev Aug 11, 2025
9745b46
Merge branch 'chore/update-cosmos-sdk' into chore/update-evm
GuillemGarciaDev Aug 11, 2025
b6e0c8d
refactor(app): replace evmos with cosmos/evm
GuillemGarciaDev Aug 11, 2025
7c7180e
refactor(cmd): replace evmos with cosmos/evm
GuillemGarciaDev Aug 11, 2025
8aacd9a
chore: bump deps
GuillemGarciaDev Aug 11, 2025
7a39bab
refactor(tests, testutil): replace evmos with cosmos/evm dependencies
GuillemGarciaDev Aug 11, 2025
d3cd3b5
refactor(app): ante handler options
GuillemGarciaDev Aug 12, 2025
4b4d42c
feat(cmd): create `InitAppConfig` for root command
GuillemGarciaDev Aug 12, 2025
7182f38
refactor(cmd): init config app on root command, `DefaultGasAdjustment…
GuillemGarciaDev Aug 12, 2025
9eeec51
refactor(testutil): remove evmos testsuite files + adapt evm testsuite
GuillemGarciaDev Aug 12, 2025
24fc5c6
refactor(app): apply v8-v10 migration changes
GuillemGarciaDev Aug 12, 2025
02e77e4
refactor(testutil): update integration testutils with ibc-go v10
GuillemGarciaDev Aug 12, 2025
1cbec1d
chore: tidy dependencies
GuillemGarciaDev Aug 12, 2025
d638f56
fix: imports + root command wiring
GuillemGarciaDev Aug 13, 2025
cd56e8a
feat(app): setup ante handler with cosmos + evm extensions
GuillemGarciaDev Aug 14, 2025
e087526
feat(cmd): update newApp creator
GuillemGarciaDev Aug 14, 2025
954778a
feat: working local-node.sh
GuillemGarciaDev Aug 15, 2025
1ea85c5
fix(app): adapt app chain id config + remove unused ante file
GuillemGarciaDev Aug 18, 2025
b1646eb
fix(app): simulation_test.go breaking changes
GuillemGarciaDev Aug 18, 2025
3a0a48d
chore: upgrade linter version and rules
GuillemGarciaDev Aug 18, 2025
0d10955
chore: bump cosmos/evm to v0.4.0
GuillemGarciaDev Aug 18, 2025
248398c
refactor(testutil/integration): add ChainsCoins to integration network
GuillemGarciaDev Aug 19, 2025
08ba502
chore: restore linter
GuillemGarciaDev Aug 19, 2025
719071f
fix: linting
GuillemGarciaDev Aug 19, 2025
f6fcfa9
chore: upgrade package version to v9
GuillemGarciaDev Aug 20, 2025
f9ebbf1
Merge branch 'v9.x.x' into chore/update-cosmos-sdk
GuillemGarciaDev Aug 20, 2025
e2ad445
Merge branch 'chore/update-cosmos-sdk' into chore/update-evm
GuillemGarciaDev Aug 20, 2025
8afb99b
Merge branch 'chore/update-evm' into update/ibc-go
GuillemGarciaDev Aug 20, 2025
19e5cda
Merge branch 'update/ibc-go' into fix/software-upgrade
GuillemGarciaDev Aug 20, 2025
28e4670
chore: upgrade package version to v9
GuillemGarciaDev Aug 20, 2025
55e9df1
Merge branch 'chore/update-evm' into update/ibc-go
GuillemGarciaDev Aug 20, 2025
72e3e60
Merge branch 'update/ibc-go' into fix/software-upgrade
GuillemGarciaDev Aug 20, 2025
954dd15
Merge pull request #81 from xrplevm/chore/update-cosmos-sdk
GuillemGarciaDev Aug 20, 2025
fa8b779
Merge pull request #86 from xrplevm/chore/update-evm
GuillemGarciaDev Aug 20, 2025
e473231
Merge pull request #82 from xrplevm/update/ibc-go
GuillemGarciaDev Aug 20, 2025
f47882a
Merge pull request #83 from xrplevm/fix/software-upgrade
GuillemGarciaDev Aug 20, 2025
bd19f9a
fix(testutil): node version import
GuillemGarciaDev Aug 20, 2025
3ad6ae3
feat(app): add v9 upgrade handler
GuillemGarciaDev Aug 20, 2025
21d77df
tmp(legacy): bring evmos legacy types to register implementations to …
GuillemGarciaDev Aug 21, 2025
7a78c93
refactor(app): add evmos proto account types compatibility + signatur…
GuillemGarciaDev Aug 21, 2025
3ca7b30
tmp: migrate evm params
GuillemGarciaDev Aug 22, 2025
20f15cf
tmp: remove non-used files
GuillemGarciaDev Aug 22, 2025
a327ed3
fix: v9 upgrade handler logger
GuillemGarciaDev Aug 25, 2025
846fa0f
fix: ProtoBaseAccount + EthAccount migration
GuillemGarciaDev Aug 25, 2025
93cb403
fix: register implementations
GuillemGarciaDev Aug 26, 2025
4097678
feat: custom keyring options
GuillemGarciaDev Aug 26, 2025
dcc2a3f
fix: localnet denoms on config
GuillemGarciaDev Aug 26, 2025
e4671f8
tmp: avoid default 0 chainid
GuillemGarciaDev Aug 26, 2025
5e82ac4
tmp: disable mempool
GuillemGarciaDev Aug 27, 2025
c64173a
tmp: remove zeroed evm chain id
GuillemGarciaDev Aug 27, 2025
adf3235
feat: add mainnet, testnet and devnet chain configs
GuillemGarciaDev Aug 27, 2025
bcb7c9e
fix: mempool module configuration
GuillemGarciaDev Aug 27, 2025
175e260
fix: add ratelimit module to SetOrderEndBlockers
GuillemGarciaDev Aug 29, 2025
c29bff7
refactor: move config constants to config
GuillemGarciaDev Aug 29, 2025
8889ce4
fix(tests/upgrade): remove deprecated update testsuite
GuillemGarciaDev Sep 4, 2025
8e1ebe0
fix: clean unused legacy types
GuillemGarciaDev Sep 4, 2025
04e6e73
fix(tests): remove deprecated upgrade testsuite and fix integration t…
GuillemGarciaDev Sep 4, 2025
091bd2a
fix(app): app wiring
GuillemGarciaDev Sep 11, 2025
ed31173
fix(testutil): linting
GuillemGarciaDev Sep 11, 2025
4ffc6f3
fix(app): remove unused legacy types
GuillemGarciaDev Sep 16, 2025
2f2ef6a
fix(app): remove unused active precompiles options
GuillemGarciaDev Sep 16, 2025
963b6fa
feat(app): custom `ante` module
GuillemGarciaDev Sep 16, 2025
3ccc589
fix(app): remove non-existing cosmos/evm `EthAccount` type from sdk.A…
GuillemGarciaDev Sep 17, 2025
f88f968
chore: replace cosmos/evm and cosmos-sdk versions
GuillemGarciaDev Sep 17, 2025
092bd21
fix(testutil): update testutil with changes
GuillemGarciaDev Sep 17, 2025
ab83428
fix(cmd): evm chain id parsing
GuillemGarciaDev Sep 17, 2025
0871d0b
fix(testutil): integration testsuite genesis account types fix
GuillemGarciaDev Sep 17, 2025
4268b43
chore: bump Dockerfile go version to 1.23.8
GuillemGarciaDev Sep 17, 2025
b5cdb1c
refactor: replace localnet chain-id with `exrp_1449999-1`
GuillemGarciaDev Sep 18, 2025
3e7bbf3
fix(app): drop ibc transfer v2 support
GuillemGarciaDev Sep 18, 2025
132aeb3
refactor: register legacy implementations
GuillemGarciaDev Sep 19, 2025
2c58ffd
fix(app): remove exported interface implementations registration
GuillemGarciaDev Sep 19, 2025
945ea1e
feat(types): add legacy evmos types
GuillemGarciaDev Sep 19, 2025
8d389d5
fi(app): remove evm mempool support
GuillemGarciaDev Sep 19, 2025
09849ac
fix: remove state-sync script
GuillemGarciaDev Sep 22, 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
112 changes: 58 additions & 54 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,63 @@
run:
tests: true
timeout: 5m
concurrency: 4
tests: true
timeout: 5m
concurrency: 4

linters:
enable:
- dogsled
- dupl
- errcheck
- goconst
- gocritic
- gofumpt
- revive
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- prealloc
- exportloopref
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- nolintlint
- asciicheck
- exportloopref
- gofumpt
- gomodguard
enable:
- dogsled
- dupl
- errcheck
- goconst
- gocritic
- gofumpt
- revive
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- prealloc
- exportloopref
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- nolintlint
- asciicheck
- exportloopref
- gofumpt
- gomodguard

linters-settings:
dogsled:
max-blank-identifiers: 3
golint:
min-confidence: 0
maligned:
suggest-new: true
misspell:
locale: US
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
gofumpt:
lang-version: "1.22"
gomodguard:
blocked:
versions: # List of blocked module version constraints
- https://github.com/etcd-io/etcd: # Blocked module with version constraint
version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional)
- https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint
version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional)
dogsled:
max-blank-identifiers: 3
golint:
min-confidence: 0
maligned:
suggest-new: true
misspell:
locale: US
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
staticcheck:
checks:
- all
- '-SA1019'
gofumpt:
lang-version: "1.22"
gomodguard:
blocked:
versions: # List of blocked module version constraints
- https://github.com/etcd-io/etcd: # Blocked module with version constraint
version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional)
- https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint
version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional)
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.11 AS base
FROM golang:1.23.8 AS base
USER root
RUN apt update && \
apt-get install -y \
Expand All @@ -20,14 +20,13 @@ RUN make lint
RUN make test-poa
# Integration tests
RUN make test-integration
RUN make test-upgrade
# Simulation tests
RUN make test-sim-benchmark-simulation
RUN make test-sim-full-app-fast

RUN touch /test.lock

FROM golang:1.22.11 AS release
FROM golang:1.23.8 AS release
WORKDIR /
COPY --from=integration /test.lock /test.lock
COPY --from=build /app/bin/exrpd /usr/bin/exrpd
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,11 @@ mocks:
@echo "--> Generating mocks"
@./scripts/mockgen.sh

test: test-poa test-integration test-upgrade test-sim-benchmark-simulation test-sim-full-app-fast

test-upgrade:
@echo "--> Running upgrade testsuite"
@go test -mod=readonly -v ./tests/upgrade
test: test-poa test-integration test-sim-benchmark-simulation test-sim-full-app-fast

test-integration:
@echo "--> Running integration testsuite"
@go test -mod=readonly -v ./tests/integration
@go test -mod=readonly -tags=test -v ./tests/integration

test-poa:
@echo "--> Running POA tests"
Expand Down
58 changes: 0 additions & 58 deletions app/ante.go

This file was deleted.

54 changes: 54 additions & 0 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package ante

import (
errorsmod "cosmossdk.io/errors"
"github.com/cosmos/evm/ante"

sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
)

// NewAnteHandler returns an ante handler responsible for attempting to route an
// Ethereum or SDK transaction to an internal ante handler for performing
// transaction-level processing (e.g. fee payment, signature verification) before
// being passed onto it's respective handler.
func NewAnteHandler(options ante.HandlerOptions) sdk.AnteHandler {
return func(
ctx sdk.Context, tx sdk.Tx, sim bool,
) (newCtx sdk.Context, err error) {
var anteHandler sdk.AnteHandler

txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx)
if ok {
opts := txWithExtensions.GetExtensionOptions()
if len(opts) > 0 {
switch typeURL := opts[0].GetTypeUrl(); typeURL {
case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx":
// handle as *evmtypes.MsgEthereumTx
anteHandler = newMonoEVMAnteHandler(options)
case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx":
// cosmos-sdk tx with dynamic fee extension
anteHandler = newCosmosAnteHandler(options)
default:
return ctx, errorsmod.Wrapf(
errortypes.ErrUnknownExtensionOptions,
"rejecting tx with unsupported extension option: %s", typeURL,
)
}

return anteHandler(ctx, tx, sim)
}
}

// handle as totally normal Cosmos SDK tx
switch tx.(type) {
case sdk.Tx:
anteHandler = newCosmosAnteHandler(options)
default:
return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx)
}

return anteHandler(ctx, tx, sim)
}
}
47 changes: 47 additions & 0 deletions app/ante/cosmos_handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ante

import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
baseevmante "github.com/cosmos/evm/ante"
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"
poaante "github.com/xrplevm/node/v9/x/poa/ante"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
)

// newCosmosAnteHandler creates the default ante handler for Cosmos transactions
func newCosmosAnteHandler(options baseevmante.HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
cosmosante.NewRejectMessagesDecorator(), // reject MsgEthereumTxs
cosmosante.NewAuthzLimiterDecorator( // disable the Msg types that cannot be included on an authz.MsgExec msgs field
sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}),
sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}),
sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}),
sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}),
sdk.MsgTypeURL(&sdkvesting.MsgCreateVestingAccount{}),
sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}),
),
ante.NewSetUpContextDecorator(),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
cosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
poaante.NewPoaDecorator(),
)
}
23 changes: 23 additions & 0 deletions app/ante/evm_handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ante

import (
"github.com/cosmos/evm/ante"
evmante "github.com/cosmos/evm/ante/evm"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// newMonoEVMAnteHandler creates the sdk.AnteHandler implementation for the EVM transactions.
func newMonoEVMAnteHandler(options ante.HandlerOptions) sdk.AnteHandler {
decorators := []sdk.AnteDecorator{
evmante.NewEVMMonoDecorator(
options.AccountKeeper,
options.FeeMarketKeeper,
options.EvmKeeper,
options.MaxTxGasWanted,
),
ante.NewTxListenerDecorator(options.PendingTxListener),
}

return sdk.ChainAnteDecorators(decorators...)
}
Loading
Loading