From d638f561e75819238c2272c38f27f0382263dd58 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 13 Aug 2025 13:38:15 +0200 Subject: [PATCH 01/11] fix: imports + root command wiring --- Makefile | 4 +- app/ante.go | 10 +- app/app.go | 26 ++-- app/precompiles.go | 2 - app/upgrades.go | 28 ---- app/upgrades/v4/constants.go | 6 - app/upgrades/v4/upgrades.go | 161 ---------------------- cmd/exrpd/cmd/root.go | 4 + go.mod | 6 +- go.sum | 10 -- testutil/integration/exrp/common/setup.go | 21 ++- 11 files changed, 46 insertions(+), 232 deletions(-) delete mode 100644 app/upgrades/v4/constants.go delete mode 100644 app/upgrades/v4/upgrades.go diff --git a/Makefile b/Makefile index 5af857e..c0d074c 100644 --- a/Makefile +++ b/Makefile @@ -144,11 +144,11 @@ test: test-poa test-integration test-upgrade test-sim-benchmark-simulation test- test-upgrade: @echo "--> Running upgrade testsuite" - @go test -mod=readonly -v ./tests/upgrade + @go test -mod=readonly -tags=test -v ./tests/upgrade 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" diff --git a/app/ante.go b/app/ante.go index 0c53a50..128e6cc 100644 --- a/app/ante.go +++ b/app/ante.go @@ -9,10 +9,10 @@ import ( type HandlerOptions struct { evmante.HandlerOptions - StakingKeeper StakingKeeper - DistributionKeeper DistributionKeeper - ExtraDecorator sdk.AnteDecorator - AuthzDisabledMsgTypes []string + StakingKeeper StakingKeeper + DistributionKeeper DistributionKeeper + ExtraDecorator sdk.AnteDecorator + AuthzDisabledMsgTypes []string } // Validate checks if the keepers are defined @@ -28,4 +28,4 @@ func (options *HandlerOptions) Validate() error { func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { return evmante.NewAnteHandler(options.HandlerOptions) -} \ No newline at end of file +} diff --git a/app/app.go b/app/app.go index 293ab6d..85b163d 100644 --- a/app/app.go +++ b/app/app.go @@ -110,7 +110,6 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - evmostypes "github.com/cosmos/evm/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/keeper" @@ -340,7 +339,7 @@ func New( appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), // TODO: Update when replacing with forked cosmos/evm version is installed - evmostypes.ProtoAccount, + etherminttypes.ProtoAccount, maccPerms, authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.Bech32PrefixAccAddr, @@ -571,7 +570,6 @@ func New( app.DistrKeeper, app.BankKeeper, app.Erc20Keeper, - app.AuthzKeeper, app.TransferKeeper, *app.IBCKeeper.ChannelKeeper, app.EvmKeeper, @@ -851,16 +849,16 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { EvmKeeper: app.EvmKeeper, FeegrantKeeper: app.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), }, - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -947,7 +945,7 @@ func (app *App) BlockedModuleAccountAddrs() map[string]bool { } blockedPrecompilesHex := evmtypes.AvailableStaticPrecompiles - for _, addr := range vm.PrecompiledAddressesPrague{ + for _, addr := range vm.PrecompiledAddressesPrague { blockedPrecompilesHex = append(blockedPrecompilesHex, addr.Hex()) } @@ -975,7 +973,7 @@ func (app *App) AppCodec() codec.Codec { } // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. -func (app *App) DefaultGenesis() evmostypes.GenesisState { +func (app *App) DefaultGenesis() etherminttypes.GenesisState { return app.BasicModuleManager.DefaultGenesis(app.appCodec) } diff --git a/app/precompiles.go b/app/precompiles.go index 8d2a7b0..551ec24 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -6,7 +6,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -35,7 +34,6 @@ func NewAvailableStaticPrecompiles( distributionKeeper distributionkeeper.Keeper, bankKeeper bankkeeper.Keeper, erc20Keeper erc20Keeper.Keeper, - authzKeeper authzkeeper.Keeper, transferKeeper transferkeeper.Keeper, channelKeeper channelkeeper.Keeper, evmKeeper *evmkeeper.Keeper, diff --git a/app/upgrades.go b/app/upgrades.go index 3bd8365..364e58f 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -5,11 +5,6 @@ import ( storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" - icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" - v4 "github.com/xrplevm/node/v8/app/upgrades/v4" v5 "github.com/xrplevm/node/v8/app/upgrades/v5" v6 "github.com/xrplevm/node/v8/app/upgrades/v6" v7 "github.com/xrplevm/node/v8/app/upgrades/v7" @@ -17,21 +12,6 @@ import ( ) func (app *App) setupUpgradeHandlers() { - authAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - app.UpgradeKeeper.SetUpgradeHandler( - v4.UpgradeName, - v4.CreateUpgradeHandler( - app.mm, - app.configurator, - app.appCodec, - app.GetKey("upgrade"), - app.ConsensusParamsKeeper, - authAddr, - app.EvmKeeper, - app.Erc20Keeper, - app.GovKeeper, - ), - ) app.UpgradeKeeper.SetUpgradeHandler( v5.UpgradeName, v5.CreateUpgradeHandler( @@ -76,14 +56,6 @@ func (app *App) setupUpgradeHandlers() { var storeUpgrades *storetypes.StoreUpgrades switch upgradeInfo.Name { - case v4.UpgradeName: - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{ - icahosttypes.StoreKey, - ratelimittypes.ModuleName, - }, - Deleted: []string{}, - } case v5.UpgradeName, v6.UpgradeName: // No store upgrades for v5 storeUpgrades = &storetypes.StoreUpgrades{} diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go deleted file mode 100644 index e3606de..0000000 --- a/app/upgrades/v4/constants.go +++ /dev/null @@ -1,6 +0,0 @@ -package v4 - -const ( - // UpgradeName is the shared upgrade plan name for mainnet - UpgradeName = "v4.0.0" -) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go deleted file mode 100644 index d838d73..0000000 --- a/app/upgrades/v4/upgrades.go +++ /dev/null @@ -1,161 +0,0 @@ -package v4 - -import ( - "context" - "errors" - - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - upgradetypes "cosmossdk.io/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - consensusparamskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - erc20keeper "github.com/cosmos/evm/x/erc20/keeper" - erc20types "github.com/cosmos/evm/x/erc20/types" - evmkeeper "github.com/cosmos/evm/x/vm/keeper" - "github.com/cosmos/evm/x/vm/types" -) - -const ( - XrpAddress = "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517" - XrpOwnerAddress = "ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2" -) - -// CreateUpgradeHandler creates an SDK upgrade handler for v13 -func CreateUpgradeHandler( - mm *module.Manager, - configurator module.Configurator, - cdc codec.Codec, - upgradeKey *storetypes.KVStoreKey, - consensusParamsKeeper consensusparamskeeper.Keeper, - authAddr string, - ek *evmkeeper.Keeper, - erc20k erc20keeper.Keeper, - gk govkeeper.Keeper, -) upgradetypes.UpgradeHandler { - return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - ctx := sdk.UnwrapSDKContext(c) - logger := ctx.Logger().With("upgrade", UpgradeName) - - // Fix previous consensusparams upgrade - logger.Info("Fixing previous consensusparams upgrade...") - storesvc := runtime.NewKVStoreService(upgradeKey) - consensuskeeper := consensusparamskeeper.NewKeeper( - cdc, - storesvc, - authAddr, - runtime.EventService{}, - ) - consensusParams, err := consensuskeeper.ParamsStore.Get(ctx) - if err != nil { - return nil, err - } - err = consensusParamsKeeper.ParamsStore.Set(ctx, consensusParams) - if err != nil { - return nil, err - } - - logger.Debug("Enabling gov precompile...") - if err := EnableGovPrecompile(ctx, ek); err != nil { - logger.Error("error while enabling gov precompile", "error", err.Error()) - } - - // run the sdk v0.50 migrations - logger.Debug("Running module migrations...") - vm, err = mm.RunMigrations(ctx, configurator, vm) - if err != nil { - return vm, err - } - - logger.Debug("Updating expedited prop params...") - if err := UpdateExpeditedPropsParams(ctx, gk); err != nil { - logger.Error("error while updating gov params", "error", err.Error()) - } - - logger.Debug("Assigning XRP owner address...") - err = AssignXrpOwnerAddress(ctx, erc20k, sdk.MustAccAddressFromBech32(XrpOwnerAddress)) - if err != nil { - logger.Error("error while assigning XRP owner address", "error", err.Error()) - return vm, err - } - - err = AddCodeToERC20Extensions(ctx, logger, erc20k) - if err != nil { - logger.Error("error while adding code hashes", "error", err.Error()) - return vm, err - } - return vm, nil - } -} - -func EnableGovPrecompile(ctx sdk.Context, ek *evmkeeper.Keeper) error { - // Enable gov precompile - params := ek.GetParams(ctx) - params.ActiveStaticPrecompiles = append(params.ActiveStaticPrecompiles, types.GovPrecompileAddress) - if err := params.Validate(); err != nil { - return err - } - return ek.SetParams(ctx, params) -} - -func UpdateExpeditedPropsParams(ctx sdk.Context, gk govkeeper.Keeper) error { - params, err := gk.Params.Get(ctx) - if err != nil { - return err - } - - // use the same denom as the min deposit denom - // also amount must be greater than MinDeposit amount - denom := params.MinDeposit[0].Denom - expDepAmt := params.ExpeditedMinDeposit[0].Amount - if expDepAmt.LTE(params.MinDeposit[0].Amount) { - expDepAmt = params.MinDeposit[0].Amount.MulRaw(govv1.DefaultMinExpeditedDepositTokensRatio) - } - params.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewCoin(denom, expDepAmt)) - - // if expedited voting period > voting period - // set expedited voting period to be half the voting period - if params.ExpeditedVotingPeriod != nil && params.VotingPeriod != nil && *params.ExpeditedVotingPeriod > *params.VotingPeriod { - expPeriod := *params.VotingPeriod / 2 - params.ExpeditedVotingPeriod = &expPeriod - } - - if err := params.ValidateBasic(); err != nil { - return err - } - return gk.Params.Set(ctx, params) -} - -func AssignXrpOwnerAddress(ctx sdk.Context, ek erc20keeper.Keeper, address sdk.AccAddress) error { - tokenPairID := ek.GetTokenPairID(ctx, XrpAddress) - tokenPair, found := ek.GetTokenPair(ctx, tokenPairID) - if !found { - return errors.New("token pair not found") - } - // TODO: Should autofix when replacing with forked cosmos/evm version is installed - ek.SetTokenPairOwnerAddress(ctx, tokenPair, address.String()) - return nil -} - -// AddCodeToERC20Extensions adds code and code hash to the ERC20 precompiles with the EVM. -func AddCodeToERC20Extensions( - ctx sdk.Context, - logger log.Logger, - erc20Keeper erc20keeper.Keeper, -) (err error) { - logger.Info("Adding code to erc20 extensions...") - - erc20Keeper.IterateTokenPairs(ctx, func(tokenPair erc20types.TokenPair) bool { - logger.Info("Adding code to erc20 extensions", "tokenPair", tokenPair) - err = erc20Keeper.RegisterERC20CodeHash(ctx, tokenPair.GetERC20Contract()) - return err != nil - }) - - logger.Info("Done with erc20 extensions") - return err -} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 8aa44a5..11e2356 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -168,6 +168,10 @@ func initRootCmd( a := appCreator{encodingConfig} rootCmd.AddCommand( + genutilcli.InitCmd( + tempApp.BasicModuleManager, + app.DefaultNodeHome, + ), genutilcli.CollectGenTxsCmd( banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, diff --git a/go.mod b/go.mod index 989b832..023b9d2 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,6 @@ require ( github.com/cosmos/evm v0.3.0 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 - github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v10 v10.3.0 github.com/ethereum/go-ethereum v1.15.11 @@ -96,7 +95,6 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect - github.com/cosmos/ibc-go/v8 v8.7.0 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect @@ -280,10 +278,12 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality - github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 + github.com/cosmos/cosmos-sdk => ../cosmos-sdk // map cosmos/evm to evmos // fix cosmos-sdk store path mismatch github.com/cosmos/cosmos-sdk/store => cosmossdk.io/store v1.1.2 + // TODO: remove this once we have a proper fork of cosmos/evm + github.com/cosmos/evm => ../evm // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.15.11-cosmos-0 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq diff --git a/go.sum b/go.sum index f620952..e6c1db1 100644 --- a/go.sum +++ b/go.sum @@ -636,8 +636,6 @@ cosmossdk.io/store v1.1.2 h1:3HOZG8+CuThREKv6cn3WSohAc6yccxO3hLzwK6rBC7o= cosmossdk.io/store v1.1.2/go.mod h1:60rAGzTHevGm592kFhiUVkNC9w7gooSEn5iUBPzHQ6A= cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= -cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= -cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.2.0 h1:o72zbmgCM7U0v7z7b0XnMB+NqX0tFamqb1HHkQbhrZ0= cosmossdk.io/x/evidence v0.2.0/go.mod h1:zx/Xqy+hnGVzkqVuVuvmP9KsO6YCl4SfbAetYi+k+sE= cosmossdk.io/x/feegrant v0.2.0 h1:oq3WVpoJdxko/XgWmpib63V1mYy9ZQN/1qxDajwGzJ8= @@ -859,8 +857,6 @@ github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNC github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/evm v0.3.0 h1:eXELtkofmbfuDvbUqpZdRYuXRdpn7tZd6EyXQfBTkzU= -github.com/cosmos/evm v0.3.0/go.mod h1:5CXFoQfFcu5XfouVLcAm6uJnGg01hmmU20OLJ0gJgLY= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= @@ -874,14 +870,10 @@ github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 h1:Wpa3gDW2tNxxdcUzVL6u34ltPF4tI3SnFP1IIOnlROw= github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0/go.mod h1:0NWhkh5Ok8t/qHWOn8LUZsG5rTxhwQWyrsI3xu1/PO0= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= github.com/cosmos/ibc-go/v10 v10.3.0 h1:w5DkHih8qn15deAeFoTk778WJU+xC1krJ5kDnicfUBc= github.com/cosmos/ibc-go/v10 v10.3.0/go.mod h1:CthaR7n4d23PJJ7wZHegmNgbVcLXCQql7EwHrAXnMtw= -github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY= -github.com/cosmos/ibc-go/v8 v8.7.0/go.mod h1:G2z+Q6ZQSMcyHI2+BVcJdvfOupb09M2h/tgpXOEdY6k= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= @@ -1706,8 +1698,6 @@ github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 h1:D94e6BQmJlnS51qQqrMcpbJ32PdVkipH1hK7m2bMQAo= -github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index 2afe7fc..c2ca2c0 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -110,7 +110,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp appOptions := simutils.NewAppOptionsWithFlagHome(homePath) baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic - return app.New( + exrpApp := app.New( logger, db, nil, @@ -122,4 +122,23 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp appOptions, baseAppOptions..., ) + + // Initialize EVM chain configuration for integration tests + evmConfigurator := evmtypes.NewEVMConfigurator() + // Reset configuration for test environments to allow multiple app instances + evmConfigurator.ResetTestConfig() + + // Configure EVM coin info with the proper denom + coinInfo := evmtypes.EvmCoinInfo{ + Denom: app.BaseDenom, + ExtendedDenom: app.BaseDenom, + DisplayDenom: app.DisplayDenom, + Decimals: evmtypes.EighteenDecimals, + } + err := evmConfigurator.WithEVMCoinInfo(coinInfo).Configure() + if err != nil { + panic(fmt.Sprintf("failed to configure EVM: %v", err)) + } + + return exrpApp } From cd56e8ac49adbad3a4bf9e18410296aadce391f7 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 14 Aug 2025 17:55:27 +0200 Subject: [PATCH 02/11] feat(app): setup ante handler with cosmos + evm extensions --- app/ante.go | 30 --------- app/ante/ante.go | 51 ++++++++++++++ app/ante/ante_cosmos.go | 35 ++++++++++ app/ante/ante_evm.go | 18 +++++ app/ante/handler_options.go | 65 ++++++++++++++++++ .../interfaces.go} | 2 +- app/app.go | 62 ++++++++++------- app/config.go | 66 +++++++++++++++++++ app/precompiles.go | 1 - 9 files changed, 275 insertions(+), 55 deletions(-) create mode 100644 app/ante/ante.go create mode 100644 app/ante/ante_cosmos.go create mode 100644 app/ante/ante_evm.go create mode 100644 app/ante/handler_options.go rename app/{ante_interfaces.go => ante/interfaces.go} (98%) create mode 100644 app/config.go diff --git a/app/ante.go b/app/ante.go index 128e6cc..4879f7a 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,31 +1 @@ package app - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - evmante "github.com/cosmos/evm/evmd/ante" -) - -type HandlerOptions struct { - evmante.HandlerOptions - StakingKeeper StakingKeeper - DistributionKeeper DistributionKeeper - ExtraDecorator sdk.AnteDecorator - AuthzDisabledMsgTypes []string -} - -// Validate checks if the keepers are defined -func (options *HandlerOptions) Validate() error { - if options.StakingKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") - } - if options.DistributionKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") - } - return options.HandlerOptions.Validate() -} - -func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { - return evmante.NewAnteHandler(options.HandlerOptions) -} diff --git a/app/ante/ante.go b/app/ante/ante.go new file mode 100644 index 0000000..a2c3916 --- /dev/null +++ b/app/ante/ante.go @@ -0,0 +1,51 @@ +package ante + +import ( + errorsmod "cosmossdk.io/errors" + 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 routes Ethereum or SDK transactions to the appropriate handler +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if err := options.Validate(); err != nil { + return nil, err + } + + 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) + }, nil +} diff --git a/app/ante/ante_cosmos.go b/app/ante/ante_cosmos.go new file mode 100644 index 0000000..9baf6fe --- /dev/null +++ b/app/ante/ante_cosmos.go @@ -0,0 +1,35 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" + + cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante" + evmante "github.com/cosmos/evm/ante/evm" +) + +// newCosmosAnteHandler creates the default SDK ante handler for Cosmos transactions +func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { + return sdk.ChainAnteDecorators( + ante.NewSetUpContextDecorator(), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + cosmosante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + cosmosante.NewDeductFeeDecorator( + options.AccountKeeper, + options.BankKeeper, + options.FeegrantKeeper, + options.TxFeeChecker, + ), + 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), + ) +} diff --git a/app/ante/ante_evm.go b/app/ante/ante_evm.go new file mode 100644 index 0000000..9fd759a --- /dev/null +++ b/app/ante/ante_evm.go @@ -0,0 +1,18 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + evmante "github.com/cosmos/evm/ante/evm" +) + +// newMonoEVMAnteHandler creates the sdk.AnteHandler for EVM transactions +func newMonoEVMAnteHandler(options HandlerOptions) sdk.AnteHandler { + return sdk.ChainAnteDecorators( + evmante.NewEVMMonoDecorator( + options.AccountKeeper, + options.FeeMarketKeeper, + options.EvmKeeper, + options.MaxTxGasWanted, + ), + ) +} diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go new file mode 100644 index 0000000..92c7558 --- /dev/null +++ b/app/ante/handler_options.go @@ -0,0 +1,65 @@ +package ante + +import ( + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" + + txsigning "cosmossdk.io/x/tx/signing" + + anteinterfaces "github.com/cosmos/evm/ante/interfaces" +) + +type HandlerOptions struct { + Cdc codec.BinaryCodec + AccountKeeper anteinterfaces.AccountKeeper + BankKeeper anteinterfaces.BankKeeper + IBCKeeper *ibckeeper.Keeper + FeeMarketKeeper anteinterfaces.FeeMarketKeeper + EvmKeeper anteinterfaces.EVMKeeper + FeegrantKeeper ante.FeegrantKeeper + ExtensionOptionChecker ante.ExtensionOptionChecker + SignModeHandler *txsigning.HandlerMap + SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error + MaxTxGasWanted uint64 + TxFeeChecker ante.TxFeeChecker + StakingKeeper StakingKeeper + DistributionKeeper DistributionKeeper + ExtraDecorator sdk.AnteDecorator + AuthzDisabledMsgTypes []string +} + +// Validate checks if the keepers are defined +func (options *HandlerOptions) Validate() error { + if options.Cdc == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "codec is required for ante builder") + } + if options.AccountKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "account keeper is required for ante builder") + } + if options.BankKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "bank keeper is required for ante builder") + } + if options.SignModeHandler == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "sign mode handler is required for ante builder") + } + if options.EvmKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "evm keeper is required for ante builder") + } + if options.FeeMarketKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "feemarket keeper is required for ante builder") + } + if options.StakingKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") + } + if options.DistributionKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") + } + return nil +} diff --git a/app/ante_interfaces.go b/app/ante/interfaces.go similarity index 98% rename from app/ante_interfaces.go rename to app/ante/interfaces.go index 3b91604..07aed38 100644 --- a/app/ante_interfaces.go +++ b/app/ante/interfaces.go @@ -1,4 +1,4 @@ -package app +package ante import ( "context" diff --git a/app/app.go b/app/app.go index 85b163d..03cddba 100644 --- a/app/app.go +++ b/app/app.go @@ -21,10 +21,11 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/evm/ante" ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/encoding" - evmante "github.com/cosmos/evm/evmd/ante" + "github.com/xrplevm/node/v8/app/ante" + + evmante "github.com/cosmos/evm/ante" etherminttypes "github.com/cosmos/evm/types" cosmosevmutils "github.com/cosmos/evm/utils" erc20v2 "github.com/cosmos/evm/x/erc20/v2" @@ -274,6 +275,7 @@ func New( evmChainID uint64, invCheckPeriod uint, appOpts servertypes.AppOptions, + evmAppOptions EVMOptionsFn, baseAppOptions ...func(*baseapp.BaseApp), ) *App { encodingConfig := encoding.MakeConfig(evmChainID) @@ -713,6 +715,7 @@ func New( app.mm.SetOrderBeginBlockers( // upgrades should be run first capabilitytypes.ModuleName, + erc20types.ModuleName, feemarkettypes.ModuleName, evmtypes.ModuleName, distrtypes.ModuleName, @@ -732,6 +735,7 @@ func New( poatypes.ModuleName, evmtypes.ModuleName, feemarkettypes.ModuleName, + erc20types.ModuleName, feegrant.ModuleName, ) @@ -749,6 +753,7 @@ func New( // NOTE: feemarket need to be initialized before genutil module: // gentx transactions use MinGasPriceDecorator.AnteHandle feemarkettypes.ModuleName, + erc20types.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName, @@ -840,25 +845,22 @@ func New( // use Ethermint's custom AnteHandler func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { - handlerOpts := &HandlerOptions{ - HandlerOptions: evmante.HandlerOptions{ - Cdc: app.appCodec, - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, - EvmKeeper: app.EvmKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - // TODO: Update when migrating to v10 - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), - }, - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + handlerOpts := &ante.HandlerOptions{ + Cdc: app.appCodec, + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: app.EvmKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: evmante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -871,7 +873,12 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { panic(err) } - app.SetAnteHandler(NewAnteHandler(*handlerOpts)) + handler, err := ante.NewAnteHandler(*handlerOpts) + if err != nil { + panic(err) + } + + app.SetAnteHandler(handler) } func (app *App) setPostHandler() { @@ -974,7 +981,16 @@ func (app *App) AppCodec() codec.Codec { // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. func (app *App) DefaultGenesis() etherminttypes.GenesisState { - return app.BasicModuleManager.DefaultGenesis(app.appCodec) + genesis := app.BasicModuleManager.DefaultGenesis(app.appCodec) + + evmGenState := evmtypes.DefaultGenesisState() + evmGenState.Params.ActiveStaticPrecompiles = evmtypes.AvailableStaticPrecompiles + genesis[evmtypes.ModuleName] = app.AppCodec().MustMarshalJSON(evmGenState) + + erc20GenState := erc20types.DefaultGenesisState() + genesis[erc20types.ModuleName] = app.AppCodec().MustMarshalJSON(erc20GenState) + + return genesis } // InterfaceRegistry returns an InterfaceRegistry diff --git a/app/config.go b/app/config.go new file mode 100644 index 0000000..8dd99ac --- /dev/null +++ b/app/config.go @@ -0,0 +1,66 @@ +package app + +import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" +) + +type EVMOptionsFn func(string) error + +func NoOpEVMOptions(_ string) error { + return nil +} + +var sealed = false + +// ChainsCoinInfo maps EVM chain IDs to coin configuration +// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings +var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ + 1440002: { // Your numeric EVM chain ID (e.g., 9000) + Denom: BaseDenom, + DisplayDenom: DisplayDenom, + Decimals: evmtypes.EighteenDecimals, + }, +} + +// EVMAppOptions sets up global configuration +func EVMAppOptions(chainID uint64) error { + if sealed { + return nil + } + + // IMPORTANT: Lookup uses numeric EVMChainID, not Cosmos chainID string + coinInfo, found := ChainsCoinInfo[chainID] + if !found { + return fmt.Errorf("unknown EVM chain id: %d", chainID) + } + + // Set denom info for the chain + if err := setBaseDenom(coinInfo); err != nil { + return err + } + + ethCfg := evmtypes.DefaultChainConfig(chainID) + + err := evmtypes.NewEVMConfigurator(). + WithChainConfig(ethCfg). + WithEVMCoinInfo(coinInfo). + Configure() + if err != nil { + return err + } + + sealed = true + return nil +} + +// setBaseDenom registers display and base denoms +func setBaseDenom(ci evmtypes.EvmCoinInfo) error { + if err := sdk.RegisterDenom(ci.DisplayDenom, math.LegacyOneDec()); err != nil { + return err + } + return sdk.RegisterDenom(ci.Denom, math.LegacyNewDecWithPrec(1, int64(ci.Decimals))) +} diff --git a/app/precompiles.go b/app/precompiles.go index 551ec24..f7e7979 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -68,7 +68,6 @@ func NewAvailableStaticPrecompiles( ibcTransferPrecompile, err := ics20precompile.NewPrecompile( stakingKeeper, transferKeeper, - // TODO: Update when migrating to v10 &channelKeeper, evmKeeper, ) From e087526c59768ae0d9eed7239e9e39c162005392 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 14 Aug 2025 18:29:55 +0200 Subject: [PATCH 03/11] feat(cmd): update newApp creator --- app/app.go | 4 ++++ app/config.go | 4 ++-- cmd/exrpd/cmd/root.go | 41 ++++++++++++++++++++++++++++++----------- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/app/app.go b/app/app.go index 03cddba..8436087 100644 --- a/app/app.go +++ b/app/app.go @@ -294,6 +294,10 @@ func New( bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + if err := evmAppOptions(evmChainID); err != nil { + panic(err) + } + keys := storetypes.NewKVStoreKeys( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, diff --git a/app/config.go b/app/config.go index 8dd99ac..edf352a 100644 --- a/app/config.go +++ b/app/config.go @@ -8,9 +8,9 @@ import ( evmtypes "github.com/cosmos/evm/x/vm/types" ) -type EVMOptionsFn func(string) error +type EVMOptionsFn func(uint64) error -func NoOpEVMOptions(_ string) error { +func NoOpEVMOptions(_ uint64) error { return nil } diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 11e2356..d0c55a7 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" @@ -68,6 +69,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { 0, 0, emptyAppOptions{}, + app.NoOpEVMOptions, ) encodingConfig := sdktestutil.TestEncodingConfig{ InterfaceRegistry: tempApp.InterfaceRegistry(), @@ -346,17 +348,7 @@ func (a appCreator) newApp( cast.ToUint32(appOpts.Get(sdkserver.FlagStateSyncSnapshotKeepRecent)), ) - return app.New( - logger, - db, - traceStore, - true, - skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - // TODO: Review this - cast.ToUint64(appOpts.Get(flags.FlagChainID)), - cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), - appOpts, + baseappOptions := []func(*baseapp.BaseApp){ baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(sdkserver.FlagMinGasPrices))), baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(sdkserver.FlagHaltHeight))), @@ -369,6 +361,32 @@ func (a appCreator) newApp( baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(sdkserver.FlagIAVLCacheSize))), baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(sdkserver.FlagDisableIAVLFastNode))), baseapp.SetChainID(chainID), + } + + baseappOptions = append(baseappOptions, func(app *baseapp.BaseApp) { + mempool := sdkmempool.NoOpMempool{} + app.SetMempool(mempool) + + handler := baseapp.NewDefaultProposalHandler(mempool, app) + app.SetPrepareProposal(handler.PrepareProposalHandler()) + app.SetProcessProposal(handler.ProcessProposalHandler()) + }) + + evmChainId := cast.ToUint64(appOpts.Get(flags.FlagChainID)) + + return app.New( + logger, + db, + traceStore, + true, + skipUpgradeHeights, + cast.ToString(appOpts.Get(flags.FlagHome)), + // TODO: Review this + evmChainId, + cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), + appOpts, + app.EVMAppOptions, + baseappOptions..., ) } @@ -398,6 +416,7 @@ func (a appCreator) appExport( 0, uint(1), appOpts, + app.EVMAppOptions, ) if height != -1 { From 954778a8d3b3d37526b93c919bc4d2dbb7497786 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 15 Aug 2025 10:31:36 +0200 Subject: [PATCH 04/11] feat: working local-node.sh --- app/config.go | 15 ++++++++------- cmd/exrpd/cmd/root.go | 7 +++++-- local-node.sh | 9 +++++++-- testutil/integration/exrp/common/setup.go | 5 +++-- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/app/config.go b/app/config.go index edf352a..bfe687f 100644 --- a/app/config.go +++ b/app/config.go @@ -20,9 +20,10 @@ var sealed = false // IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ 1440002: { // Your numeric EVM chain ID (e.g., 9000) - Denom: BaseDenom, - DisplayDenom: DisplayDenom, - Decimals: evmtypes.EighteenDecimals, + Denom: BaseDenom, + DisplayDenom: DisplayDenom, + ExtendedDenom: BaseDenom, + Decimals: evmtypes.EighteenDecimals, }, } @@ -38,10 +39,10 @@ func EVMAppOptions(chainID uint64) error { return fmt.Errorf("unknown EVM chain id: %d", chainID) } - // Set denom info for the chain - if err := setBaseDenom(coinInfo); err != nil { - return err - } + //// Set denom info for the chain + //if err := setBaseDenom(coinInfo); err != nil { + // return err + //} ethCfg := evmtypes.DefaultChainConfig(chainID) diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index d0c55a7..0953f59 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -2,6 +2,7 @@ package cmd import ( "errors" + "fmt" "io" "os" "path/filepath" @@ -372,7 +373,9 @@ func (a appCreator) newApp( app.SetProcessProposal(handler.ProcessProposalHandler()) }) - evmChainId := cast.ToUint64(appOpts.Get(flags.FlagChainID)) + fmt.Println(appOpts.Get(flags.FlagChainID)) + + _ = cast.ToUint64(appOpts.Get(flags.FlagChainID)) return app.New( logger, @@ -382,7 +385,7 @@ func (a appCreator) newApp( skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), // TODO: Review this - evmChainId, + 1440002, cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), appOpts, app.EVMAppOptions, diff --git a/local-node.sh b/local-node.sh index 3144a7b..8af8208 100755 --- a/local-node.sh +++ b/local-node.sh @@ -47,8 +47,13 @@ jq '.app_state["gov"]["params"]["expedited_voting_period"]="5s"' "$GENESIS" >"$T jq '.app_state["staking"]["params"]["bond_denom"]="apoa"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["staking"]["params"]["unbonding_time"]="60s"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["feemarket"]["params"]["base_fee"]="'${BASEFEE}'"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" -jq '.app_state["erc20"]["token_pairs"][0]["denom"]="token"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" -jq '.app_state["erc20"]["token_pairs"][0]["owner_address"]="ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" + +#jq '.app_state["erc20"]["token_pairs"][0]["denom"]="token"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +#jq '.app_state["erc20"]["token_pairs"][0]["owner_address"]="ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +jq '.app_state.erc20.native_precompiles=["0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +jq '.app_state.erc20.token_pairs=[{contract_owner:1,erc20_address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",denom:"token",enabled:true, "owner_address":"ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"}]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" + + jq '.app_state["slashing"]["params"]["slash_fraction_double_sign"]="0"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["slashing"]["params"]["slash_fraction_downtime"]="0"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index c2ca2c0..3393c03 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -105,7 +105,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp loadLatest := true skipUpgradeHeights := map[int64]bool{} homePath := testNodeHome - evmChainID := uint64(1) + evmChainID := uint64(1440002) invCheckPeriod := uint(5) appOptions := simutils.NewAppOptionsWithFlagHome(homePath) baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic @@ -120,6 +120,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp evmChainID, invCheckPeriod, appOptions, + app.EVMAppOptions, baseAppOptions..., ) @@ -127,7 +128,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp evmConfigurator := evmtypes.NewEVMConfigurator() // Reset configuration for test environments to allow multiple app instances evmConfigurator.ResetTestConfig() - + // Configure EVM coin info with the proper denom coinInfo := evmtypes.EvmCoinInfo{ Denom: app.BaseDenom, From 1ea85c552f110583c83cfad8375190a75c43ded3 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 11:02:42 +0200 Subject: [PATCH 05/11] fix(app): adapt app chain id config + remove unused ante file --- app/ante.go | 1 - app/app.go | 3 +-- app/config.go | 20 +++++++++++++------- cmd/exrpd/cmd/root.go | 8 +++++--- 4 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 app/ante.go diff --git a/app/ante.go b/app/ante.go deleted file mode 100644 index 4879f7a..0000000 --- a/app/ante.go +++ /dev/null @@ -1 +0,0 @@ -package app diff --git a/app/app.go b/app/app.go index 8436087..874703e 100644 --- a/app/app.go +++ b/app/app.go @@ -79,7 +79,6 @@ import ( testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" @@ -369,7 +368,7 @@ func New( ) // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) - enabledSignModes := append(authtx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) //nolint:gocritic + enabledSignModes := append(authtx.DefaultSignModes) //nolint:gocritic txConfigOpts := authtx.ConfigOptions{ EnabledSignModes: enabledSignModes, TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), diff --git a/app/config.go b/app/config.go index bfe687f..6c00c24 100644 --- a/app/config.go +++ b/app/config.go @@ -14,17 +14,23 @@ func NoOpEVMOptions(_ uint64) error { return nil } -var sealed = false - -// ChainsCoinInfo maps EVM chain IDs to coin configuration -// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings -var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ - 1440002: { // Your numeric EVM chain ID (e.g., 9000) +var ( + sealed = false + DefaultEvmCoinInfo = evmtypes.EvmCoinInfo{ Denom: BaseDenom, DisplayDenom: DisplayDenom, ExtendedDenom: BaseDenom, Decimals: evmtypes.EighteenDecimals, - }, + } + DefaultLocalnetChainID uint64 = 1440002 + DefaultSimulationChainID uint64 = 777 +) + +// ChainsCoinInfo maps EVM chain IDs to coin configuration +// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings +var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ + DefaultLocalnetChainID: DefaultEvmCoinInfo, + DefaultSimulationChainID: DefaultEvmCoinInfo, } // EVMAppOptions sets up global configuration diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 0953f59..7496b46 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -10,6 +10,8 @@ import ( "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" + evmkeyring "github.com/cosmos/evm/crypto/keyring" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" @@ -42,7 +44,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/evm/crypto/hd" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -85,9 +86,10 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastSync). + WithBroadcastMode(flags.FlagBroadcastMode). WithHomeDir(app.DefaultNodeHome). - WithKeyringOptions(hd.EthSecp256k1Option()). + WithKeyringOptions(evmkeyring.Option()). + WithLedgerHasProtobuf(true). WithViper("exrp") rootCmd := &cobra.Command{ From b1646ebe8746304dd8a4043abef71060823f70ce Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 11:03:11 +0200 Subject: [PATCH 06/11] fix(app): simulation_test.go breaking changes --- app/simulation_test.go | 49 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/app/simulation_test.go b/app/simulation_test.go index fc034e8..4d341d1 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/evm/crypto/ethsecp256k1" etherminttypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v8/app" + xrplevmante "github.com/xrplevm/node/v8/app/ante" poaante "github.com/xrplevm/node/v8/x/poa/ante" dbm "github.com/cosmos/cosmos-db" @@ -26,7 +27,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - evmante "github.com/cosmos/evm/evmd/ante" + "github.com/stretchr/testify/require" ) @@ -35,7 +36,7 @@ func init() { } const ( - SimAppChainID = "simulation_777-1" + SimAppChainID = "simulation_777-1" SimAppEVMChainID = 777 ) @@ -55,28 +56,26 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap SimAppEVMChainID, simcli.FlagPeriodValue, appOptions, - + app.EVMAppOptions, baseapp.SetChainID(config.ChainID), ) - handlerOpts := &app.HandlerOptions{ - HandlerOptions: evmante.HandlerOptions{ - Cdc: bApp.AppCodec(), - AccountKeeper: bApp.AccountKeeper, - BankKeeper: bApp.BankKeeper, - ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, - EvmKeeper: bApp.EvmKeeper, - FeegrantKeeper: bApp.FeeGrantKeeper, - // TODO: Update when migrating to v10 - IBCKeeper: bApp.IBCKeeper, - FeeMarketKeeper: bApp.FeeMarketKeeper, - SignModeHandler: bApp.GetTxConfig().SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: 0, - TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), - }, - StakingKeeper: bApp.StakingKeeper, - DistributionKeeper: bApp.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + handlerOpts := &xrplevmante.HandlerOptions{ + Cdc: bApp.AppCodec(), + AccountKeeper: bApp.AccountKeeper, + BankKeeper: bApp.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: bApp.EvmKeeper, + FeegrantKeeper: bApp.FeeGrantKeeper, + // TODO: Update when migrating to v10 + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), + StakingKeeper: bApp.StakingKeeper, + DistributionKeeper: bApp.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -87,7 +86,11 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap if err := handlerOpts.Validate(); err != nil { panic(err) } - bApp.SetAnteHandler(app.NewAnteHandler(*handlerOpts)) + handler, err := xrplevmante.NewAnteHandler(*handlerOpts) + if err != nil { + panic(err) + } + bApp.SetAnteHandler(handler) if err := bApp.LoadLatestVersion(); err != nil { return nil, err From 3a0a48da3509315766b261d2518995a624656067 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 16:23:09 +0200 Subject: [PATCH 07/11] chore: upgrade linter version and rules --- .golangci.yml | 181 +++++++++++++++++++++++++++++++++++--------------- Makefile | 6 +- 2 files changed, 129 insertions(+), 58 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 210f452..e1b0b76 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,59 +1,130 @@ +version: "2" run: - tests: true - timeout: 5m - concurrency: 4 - + tests: true 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 - -linters-settings: + default: none + enable: + - copyloopvar + - dogsled + - errcheck + - goconst + - gocritic + - gosec + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - revive + - staticcheck + - thelper + - unconvert + - unparam + - unused + settings: dogsled: - max-blank-identifiers: 3 - golint: - min-confidence: 0 - maligned: - suggest-new: true - misspell: - locale: US + max-blank-identifiers: 3 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) + require-explanation: false + require-specific: false + allow-unused: false + revive: + severity: warning + rules: + - name: unused-parameter + disabled: true + - name: blank-imports + - name: context-as-argument + - name: context-keys-type + - name: dot-imports + - name: error-return + - name: error-strings + - name: error-naming + - name: exported + - name: if-return + - name: increment-decrement + - name: var-naming + - name: var-declaration + - name: range + - name: receiver-naming + - name: time-naming + - name: unexported-return + - name: indent-error-flow + - name: errorf + - name: empty-block + - name: superfluous-else + - name: unreachable-code + - name: redefines-builtin-id + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - revive + text: avoid meaningless package names + - linters: + - gosec + text: Use of weak random number generator + - linters: + - golint + text: comment on exported var + - linters: + - golint + text: don't use an underscore in package name + - linters: + - staticcheck + text: 'ST1003:' + - linters: + - staticcheck + text: 'ST1016:' + - linters: + - staticcheck + path: migrations + text: 'SA1019:' + - linters: + - staticcheck + path: ^tests/integration/ + - linters: + - stylecheck + text: 'ST1001:' + paths: + - x/vm/core + - mempool/txpool + - mempool/miner + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 10000 + max-same-issues: 10000 +formatters: + enable: + - gci + - gofumpt + settings: + gci: + sections: + - standard + - default + - blank + - dot + - prefix(github.com/cometbft/cometbft) + - prefix(github.com/cosmos) + - prefix(cosmossdk.io) + - prefix(github.com/cosmos/cosmos-sdk) + - prefix(github.com/CosmWasm/wasmd) + - prefix(github.com/cosmos/gaia) + custom-order: true + exclusions: + generated: lax + paths: + - x/vm/core + - mempool/txpool + - mempool/miner + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index c0d074c..2011698 100644 --- a/Makefile +++ b/Makefile @@ -116,12 +116,12 @@ build-rocksdb: ### Linting ### ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v1.62.0 +golangci_version=v2.2.2 lint: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=10m + @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --timeout=15m lint-fix: @echo "--> Running linter" From 0d10955d8425ea0fd75a741d3c80ae06df7a572d Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 16:23:41 +0200 Subject: [PATCH 08/11] chore: bump cosmos/evm to v0.4.0 --- app/app.go | 65 +++++++++ app/precompiles.go | 48 ++++++- cmd/exrpd/cmd/root.go | 20 ++- go.mod | 45 +++--- go.sum | 132 +++++++++++------- .../integration/exrp/integration/network.go | 2 +- testutil/integration/exrp/utils/gov.go | 4 +- 7 files changed, 235 insertions(+), 81 deletions(-) diff --git a/app/app.go b/app/app.go index 874703e..fbbcc0c 100644 --- a/app/app.go +++ b/app/app.go @@ -10,6 +10,8 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/common" ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" @@ -52,6 +54,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + evmmempool "github.com/cosmos/evm/mempool" "github.com/xrplevm/node/v8/x/poa" "cosmossdk.io/log" @@ -218,6 +221,7 @@ type App struct { appCodec codec.Codec interfaceRegistry types.InterfaceRegistry txConfig client.TxConfig + clientCtx client.Context invCheckPeriod uint @@ -249,6 +253,7 @@ type App struct { EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper Erc20Keeper erc20keeper.Keeper + EVMMempool *evmmempool.ExperimentalEVMMempool // exrp keepers PoaKeeper poakeeper.Keeper @@ -261,6 +266,9 @@ type App struct { sm *module.SimulationManager configurator module.Configurator + + // Add pending transaction listeners + pendingTxListeners []evmante.PendingTxListener } // New returns a reference to an initialized blockchain app @@ -820,6 +828,46 @@ func New( app.SetBeginBlocker(app.BeginBlocker) app.setAnteHandler(app.txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) + + if evmtypes.GetChainConfig() != nil { + mempoolConfig := &evmmempool.EVMMempoolConfig{ + AnteHandler: app.GetAnteHandler(), + BlockGasLimit: 100_000_000, + } + + evmMempool := evmmempool.NewExperimentalEVMMempool( + app.CreateQueryContext, + logger, + app.EvmKeeper, + app.FeeMarketKeeper, + app.txConfig, + app.clientCtx, + mempoolConfig, + ) + app.EVMMempool = evmMempool + + // Set the global mempool for RPC access + if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { + panic(err) + } + + // Replace BaseApp mempool + app.SetMempool(evmMempool) + + // Set custom CheckTx handler for nonce gap support + checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) + app.SetCheckTxHandler(checkTxHandler) + + // Set custom PrepareProposal handler + abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) + abciProposalHandler.SetSignerExtractionAdapter( + evmmempool.NewEthSignerExtractionAdapter( + sdkmempool.NewDefaultSignerExtractionAdapter(), + ), + ) + app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) + } + app.setPostHandler() app.SetEndBlocker(app.EndBlocker) app.setupUpgradeHandlers() @@ -1085,6 +1133,14 @@ func (app *App) GetStakingKeeperSDK() *stakingkeeper.Keeper { return app.StakingKeeper } +func (app *App) GetMempool() sdkmempool.ExtMempool { + return app.EVMMempool +} + +func (app *App) GetAnteHandler() sdk.AnteHandler { + return app.BaseApp.AnteHandler() +} + // GetIBCKeeper implements the TestingApp interface. func (app *App) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper @@ -1100,6 +1156,10 @@ func (app *App) TxConfig() client.TxConfig { return app.txConfig } +func (app *App) SetClientCtx(clientCtx client.Context) { + app.clientCtx = clientCtx +} + // AutoCliOpts returns the autocli options for the app. func (app *App) AutoCliOpts() autocli.AppOptions { modules := make(map[string]appmodule.AppModule, 0) @@ -1131,6 +1191,11 @@ func (app *App) ModuleManager() *module.Manager { return app.mm } +// RegisterPendingTxListener registers a pending tx listener +func (app *App) RegisterPendingTxListener(listener func(common.Hash)) { + app.pendingTxListeners = append(app.pendingTxListeners, listener) +} + // initParamsKeeper init params keeper and its subspaces func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) diff --git a/app/precompiles.go b/app/precompiles.go index f7e7979..219cc46 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -3,9 +3,12 @@ package app import ( "fmt" + "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -25,6 +28,40 @@ import ( "golang.org/x/exp/maps" ) +type Optionals struct { + AddressCodec address.Codec // for gov/staking + ValidatorAddrCodec address.Codec // for slashing + ConsensusAddrCodec address.Codec // for slashing +} + +func defaultOptionals() Optionals { + return Optionals{ + AddressCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddrCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddrCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + } +} + +type Option func(opts *Optionals) + +func WithAddressCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.AddressCodec = codec + } +} + +func WithValidatorAddrCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.ValidatorAddrCodec = codec + } +} + +func WithConsensusAddrCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.ConsensusAddrCodec = codec + } +} + const bech32PrecompileBaseGas = 6_000 // AvailableStaticPrecompiles returns the list of all available static precompiled contracts. @@ -39,7 +76,12 @@ func NewAvailableStaticPrecompiles( evmKeeper *evmkeeper.Keeper, govKeeper govkeeper.Keeper, codec codec.Codec, + opts ...Option, ) map[common.Address]vm.PrecompiledContract { + options := defaultOptionals() + for _, opt := range opts { + opt(&options) + } // Clone the mapping from the latest EVM fork. precompiles := maps.Clone(vm.PrecompiledContractsBerlin) @@ -51,7 +93,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bech32 precompile: %w", err)) } - stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper) + stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper, options.AddressCodec) if err != nil { panic(fmt.Errorf("failed to instantiate staking precompile: %w", err)) } @@ -60,12 +102,14 @@ func NewAvailableStaticPrecompiles( distributionKeeper, stakingKeeper, evmKeeper, + options.AddressCodec, ) if err != nil { panic(fmt.Errorf("failed to instantiate distribution precompile: %w", err)) } ibcTransferPrecompile, err := ics20precompile.NewPrecompile( + bankKeeper, stakingKeeper, transferKeeper, &channelKeeper, @@ -80,7 +124,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bank precompile: %w", err)) } - govPrecompile, err := govprecompile.NewPrecompile(govKeeper, codec) + govPrecompile, err := govprecompile.NewPrecompile(govKeeper, codec, options.AddressCodec) if err != nil { panic(fmt.Errorf("failed to instantiate gov precompile: %w", err)) } diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 7496b46..8854b15 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -11,6 +11,7 @@ import ( storetypes "cosmossdk.io/store/types" evmkeyring "github.com/cosmos/evm/crypto/keyring" + evmserver "github.com/cosmos/evm/server" "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" @@ -48,7 +49,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - evmserver "github.com/cosmos/evm/client" + evmclient "github.com/cosmos/evm/client" ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" "github.com/xrplevm/node/v8/app" @@ -172,6 +173,15 @@ func initRootCmd( ) { a := appCreator{encodingConfig} + sdkAppCreatorWrapper := func( + l log.Logger, + d dbm.DB, + w io.Writer, + ao servertypes.AppOptions, + ) servertypes.Application { + return a.newApp(l, d, w, ao) + } + rootCmd.AddCommand( genutilcli.InitCmd( tempApp.BasicModuleManager, @@ -193,9 +203,9 @@ func initRootCmd( AddGenesisAccountCmd(app.DefaultNodeHome), cmtcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), - pruning.Cmd(a.newApp, app.DefaultNodeHome), + pruning.Cmd(sdkAppCreatorWrapper, app.DefaultNodeHome), confixcmd.ConfigCommand(), - snapshot.Cmd(a.newApp), + snapshot.Cmd(sdkAppCreatorWrapper), ) // add server commands @@ -211,7 +221,7 @@ func initRootCmd( sdkserver.StatusCommand(), queryCommand(), txCommand(), - evmserver.KeyCommands(app.DefaultNodeHome, true), + evmclient.KeyCommands(app.DefaultNodeHome, true), ) _, err := srvflags.AddTxFlags(rootCmd) @@ -307,7 +317,7 @@ func (a appCreator) newApp( db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions, -) servertypes.Application { +) evmserver.Application { var cache storetypes.MultiStorePersistentCache if cast.ToBool(appOpts.Get(sdkserver.FlagInterBlockCache)) { diff --git a/go.mod b/go.mod index 023b9d2..a120fb0 100644 --- a/go.mod +++ b/go.mod @@ -2,25 +2,25 @@ module github.com/xrplevm/node/v8 go 1.23.8 -toolchain go1.24.5 - require ( cosmossdk.io/api v0.9.2 cosmossdk.io/client/v2 v2.0.0-beta.7 cosmossdk.io/core v0.12.0 cosmossdk.io/errors v1.0.2 - cosmossdk.io/log v1.6.0 + cosmossdk.io/log v1.6.1 cosmossdk.io/math v1.5.3 cosmossdk.io/store v1.1.2 cosmossdk.io/tools/confix v0.1.2 cosmossdk.io/x/evidence v0.2.0 cosmossdk.io/x/feegrant v0.2.0 + cosmossdk.io/x/tx v0.14.0 cosmossdk.io/x/upgrade v0.2.0 - github.com/cometbft/cometbft v0.38.17 - github.com/cosmos/cosmos-db v1.1.1 + github.com/cometbft/cometbft v0.38.18 + github.com/cosmos/cosmos-db v1.1.3 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.53.4 - github.com/cosmos/evm v0.3.0 + github.com/cosmos/evm v0.4.0 + github.com/cosmos/evm/evmd v0.0.0-20250817201932-204ff4ea8df2 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 @@ -38,7 +38,7 @@ require ( golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + google.golang.org/protobuf v1.36.7 ) require ( @@ -53,7 +53,6 @@ require ( cosmossdk.io/collections v1.2.1 // indirect cosmossdk.io/depinject v1.2.1 // indirect cosmossdk.io/schema v1.1.0 // indirect - cosmossdk.io/x/tx v0.14.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -74,8 +73,8 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/btcutil v1.1.6 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect - github.com/bytedance/sonic v1.13.2 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect + github.com/bytedance/sonic v1.14.0 // indirect + github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect @@ -89,8 +88,7 @@ require ( github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect - github.com/consensys/bavard v0.1.27 // indirect - github.com/consensys/gnark-crypto v0.16.0 // indirect + github.com/consensys/gnark-crypto v0.18.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -119,6 +117,7 @@ require ( github.com/ethereum/go-verkle v0.2.2 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/ferranbt/fastssz v0.1.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/getsentry/sentry-go v0.32.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -132,7 +131,7 @@ require ( github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.5 // indirect @@ -142,7 +141,7 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect @@ -185,9 +184,10 @@ require ( github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mdp/qrterminal/v3 v3.2.1 // indirect github.com/minio/highwayhash v1.0.3 // indirect + github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect @@ -250,14 +250,14 @@ require ( go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.15.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/net v0.42.0 // indirect + golang.org/x/arch v0.17.0 // indirect + golang.org/x/crypto v0.41.0 // indirect + golang.org/x/net v0.43.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/term v0.33.0 // indirect - golang.org/x/text v0.27.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/term v0.34.0 // indirect + golang.org/x/text v0.28.0 // indirect golang.org/x/time v0.10.0 // indirect google.golang.org/api v0.222.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect @@ -268,7 +268,6 @@ require ( nhooyr.io/websocket v1.8.11 // indirect pgregory.net/rapid v1.2.0 // indirect rsc.io/qr v0.2.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) @@ -285,7 +284,7 @@ replace ( // TODO: remove this once we have a proper fork of cosmos/evm github.com/cosmos/evm => ../evm // use Evmos geth fork - github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.15.11-cosmos-0 + github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/go.sum b/go.sum index e6c1db1..b8d6e0c 100644 --- a/go.sum +++ b/go.sum @@ -626,8 +626,8 @@ cosmossdk.io/depinject v1.2.1 h1:eD6FxkIjlVaNZT+dXTQuwQTKZrFZ4UrfCq1RKgzyhMw= cosmossdk.io/depinject v1.2.1/go.mod h1:lqQEycz0H2JXqvOgVwTsjEdMI0plswI7p6KX+MVqFOM= cosmossdk.io/errors v1.0.2 h1:wcYiJz08HThbWxd/L4jObeLaLySopyyuUFB5w4AGpCo= cosmossdk.io/errors v1.0.2/go.mod h1:0rjgiHkftRYPj//3DrD6y8hcm40HcPv/dR4R/4efr0k= -cosmossdk.io/log v1.6.0 h1:SJIOmJ059wi1piyRgNRXKXhlDXGqnB5eQwhcZKv2tOk= -cosmossdk.io/log v1.6.0/go.mod h1:5cXXBvfBkR2/BcXmosdCSLXllvgSjphrrDVdfVRmBGM= +cosmossdk.io/log v1.6.1 h1:YXNwAgbDwMEKwDlCdH8vPcoggma48MgZrTQXCfmMBeI= +cosmossdk.io/log v1.6.1/go.mod h1:gMwsWyyDBjpdG9u2avCFdysXqxq28WJapJvu+vF1y+E= cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U= cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ= cosmossdk.io/schema v1.1.0 h1:mmpuz3dzouCoyjjcMcA/xHBEmMChN+EHh8EHxHRHhzE= @@ -761,11 +761,11 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/ github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= -github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= +github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= +github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= +github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -837,14 +837,12 @@ github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHrQGOk= -github.com/cometbft/cometbft v0.38.17/go.mod h1:5l0SkgeLRXi6bBfQuevXjKqML1jjfJJlvI1Ulp02/o4= +github.com/cometbft/cometbft v0.38.18 h1:1ZHYMdu0S75YxFM13LlPXnOwiIpUW5z9TKMQtTIALpw= +github.com/cometbft/cometbft v0.38.18/go.mod h1:PlOQgf3jQorep+g6oVnJgtP65TJvBJoLiXjGaMdNxBE= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= -github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= -github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= -github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= -github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= +github.com/consensys/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0= +github.com/consensys/gnark-crypto v0.18.0/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -853,14 +851,16 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= -github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= +github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOPY= +github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/evm/evmd v0.0.0-20250817201932-204ff4ea8df2 h1:WY9KEng/qUD5G8IFjyYKUJdr3sF3grU7zaYmw1nFAHg= +github.com/cosmos/evm/evmd v0.0.0-20250817201932-204ff4ea8df2/go.mod h1:afe8FBtwa3BqBa7nfnxl43XN8NTFx8e0mQ1wcbD5vec= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= -github.com/cosmos/go-ethereum v1.15.11-cosmos-0/go.mod h1:mf8YiHIb0GR4x4TipcvBUPxJLw1mFdmxzoDi11sDRoI= +github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 h1:kgu2NkKzSeJJlVsKeS+KbdzfUeaFqrqmmhwixd/PNH4= +github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91/go.mod h1:X5CIOyo8SuK1Q5GnaEizQVLHT/DfsiGWuNeVdQcEMNA= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= @@ -881,13 +881,12 @@ github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStK github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE= github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= -github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= -github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creachadair/atomicfile v0.3.7 h1:wdg8+Isz07NDMi2yZQAoI1EKB9SxuDhvo5MUii/ZqlM= github.com/creachadair/atomicfile v0.3.7/go.mod h1:lUrZrE/XjMA7rJY/n8dF7/sSpy6KjtPaxPbrDambthA= github.com/creachadair/mds v0.22.1 h1:Wink9jeYR7brBbOkOTVZVrd6vyb5W4ZBRhlZd96TSgU= @@ -912,6 +911,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= @@ -982,6 +983,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= +github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -995,6 +998,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -1058,8 +1063,8 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -1070,6 +1075,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -1173,12 +1180,11 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1219,6 +1225,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -1236,6 +1244,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -1282,6 +1292,8 @@ github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8 github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= @@ -1305,7 +1317,13 @@ github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPt github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -1349,6 +1367,7 @@ github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHU github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= @@ -1414,6 +1433,8 @@ github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcs github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1425,9 +1446,10 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -1467,14 +1489,14 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= -github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= -github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1486,6 +1508,8 @@ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= @@ -1501,6 +1525,8 @@ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNc github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -1571,6 +1597,8 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= +github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1593,6 +1621,7 @@ github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= @@ -1696,8 +1725,13 @@ github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1755,6 +1789,8 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1775,8 +1811,8 @@ go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.15.0 h1:QtOrQd0bTUnhNVNndMpLHNWrDmYzZ2KDqSrEymqInZw= -golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= +golang.org/x/arch v0.17.0 h1:4O3dfLzd+lQewptAHqjewQZQDyEdejz3VwgeYwkZneU= +golang.org/x/arch v0.17.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1799,8 +1835,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1940,8 +1976,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2111,8 +2147,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2128,8 +2164,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= -golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2151,8 +2187,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2235,8 +2271,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2532,8 +2568,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2546,6 +2582,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2621,8 +2659,6 @@ rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 6996d28..a505c7e 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -14,7 +14,7 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" - "github.com/cosmos/evm/testutil/integration/common/network" + "github.com/cosmos/evm/testutil/integration/base/network" "github.com/cosmos/evm/types" abcitypes "github.com/cometbft/cometbft/abci/types" diff --git a/testutil/integration/exrp/utils/gov.go b/testutil/integration/exrp/utils/gov.go index 92fb680..c3692cd 100644 --- a/testutil/integration/exrp/utils/gov.go +++ b/testutil/integration/exrp/utils/gov.go @@ -16,8 +16,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/evm/testutil/integration/common/factory" - "github.com/cosmos/evm/testutil/integration/os/keyring" + "github.com/cosmos/evm/testutil/integration/base/factory" + "github.com/cosmos/evm/testutil/keyring" exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" ) From 248398c5599fee150a5bfcbc88f5cada55d8f294 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:22:11 +0200 Subject: [PATCH 09/11] refactor(testutil/integration): add ChainsCoins to integration network --- tests/integration/suite.go | 8 +- testutil/constants/constants.go | 30 ++++++++ testutil/integration/exrp/common/coins.go | 77 +++++++++++++++++++ testutil/integration/exrp/common/config.go | 2 + .../integration/exrp/integration/network.go | 20 ++++- 5 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 testutil/constants/constants.go create mode 100644 testutil/integration/exrp/common/coins.go diff --git a/tests/integration/suite.go b/tests/integration/suite.go index bb8fe7c..4366acc 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -3,9 +3,9 @@ package integration import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/evm/testutil/integration/common/factory" - "github.com/cosmos/evm/testutil/integration/os/grpc" - "github.com/cosmos/evm/testutil/integration/os/keyring" + "github.com/cosmos/evm/testutil/integration/evm/factory" + "github.com/cosmos/evm/testutil/integration/evm/grpc" + "github.com/cosmos/evm/testutil/keyring" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/stretchr/testify/suite" "github.com/xrplevm/node/v8/app" @@ -17,7 +17,7 @@ type TestSuite struct { network *Network keyring keyring.Keyring - factory factory.CoreTxFactory + factory factory.TxFactory grpcHandler grpc.Handler } diff --git a/testutil/constants/constants.go b/testutil/constants/constants.go new file mode 100644 index 0000000..a05bd2c --- /dev/null +++ b/testutil/constants/constants.go @@ -0,0 +1,30 @@ +package constants + +import ( + testconstants "github.com/cosmos/evm/testutil/constants" + evmtypes "github.com/cosmos/evm/x/vm/types" +) + +const ( + DisplayDenom = "xrp" + // BaseDenom defines to the default denomination used in EVM + BaseDenom = "axrp" + // BaseDenomUnit defines the unit of the base denomination + BaseDenomUnit = 18 +) + +var ( + LocalnetChainID = testconstants.ChainID{ + ChainID: "exrp_1440002-1", + EVMChainID: 1440002, + } + + ExampleChainCoinInfo = map[testconstants.ChainID]evmtypes.EvmCoinInfo{ + LocalnetChainID: { + Denom: BaseDenom, + ExtendedDenom: BaseDenom, + DisplayDenom: DisplayDenom, + Decimals: BaseDenomUnit, + }, + } +) diff --git a/testutil/integration/exrp/common/coins.go b/testutil/integration/exrp/common/coins.go new file mode 100644 index 0000000..e4f15fa --- /dev/null +++ b/testutil/integration/exrp/common/coins.go @@ -0,0 +1,77 @@ +package exrpcommon + +import ( + "github.com/cosmos/evm/testutil/integration/evm/network" + evmtypes "github.com/cosmos/evm/x/vm/types" + testconstants "github.com/xrplevm/node/v8/testutil/constants" +) + +var defaultChain = testconstants.LocalnetChainID + +type ChainCoins struct { + + // decimals of the base denom? Maybe not.. + baseCoin *network.CoinInfo + evmCoin *network.CoinInfo +} + +func DefaultChainCoins() ChainCoins { + baseCoinInfo := testconstants.ExampleChainCoinInfo[defaultChain] + + baseCoin := getCoinInfo(baseCoinInfo) + evmCoin := getCoinInfo(baseCoinInfo) + + return ChainCoins{ + baseCoin: &baseCoin, + evmCoin: &evmCoin, + } +} + +func getCoinInfo(coinInfo evmtypes.EvmCoinInfo) network.CoinInfo { + return network.CoinInfo{ + Denom: coinInfo.Denom, + Decimals: coinInfo.Decimals, + } +} + +func (cc ChainCoins) BaseCoin() network.CoinInfo { + return *cc.baseCoin +} + +func (cc ChainCoins) EVMCoin() network.CoinInfo { + return *cc.evmCoin +} + +func (cc ChainCoins) BaseDenom() string { + return cc.baseCoin.Denom +} + +func (cc ChainCoins) EVMDenom() string { + return cc.evmCoin.Denom +} + +func (cc ChainCoins) BaseDecimals() evmtypes.Decimals { + return cc.baseCoin.Decimals +} + +func (cc ChainCoins) EVMDecimals() evmtypes.Decimals { + return cc.evmCoin.Decimals +} + +func (cc ChainCoins) IsBaseEqualToEVM() bool { + return cc.BaseDenom() == cc.EVMDenom() +} + +// DenomDecimalsMap returns a map of unique Denom -> Decimals for the chain +// coins. +func (cc ChainCoins) DenomDecimalsMap() map[string]evmtypes.Decimals { + chainDenomDecimals := map[string]evmtypes.Decimals{ + cc.BaseDenom(): cc.BaseDecimals(), + } + + // Insert the evm denom if base and evm denom are different. + if !cc.IsBaseEqualToEVM() { + chainDenomDecimals[cc.EVMDenom()] = cc.EVMDecimals() + } + return chainDenomDecimals +} diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index f3d45a7..276b110 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -34,6 +34,7 @@ type Config struct { CustomBaseAppOpts []func(*baseapp.BaseApp) MinDepositAmt sdkmath.Int Quorum string + ChainCoins ChainCoins } type CustomGenesisState map[string]interface{} @@ -45,6 +46,7 @@ func DefaultConfig() Config { EIP155ChainID: big.NewInt(1440002), Balances: nil, Denom: app.BaseDenom, + ChainCoins: DefaultChainCoins(), } } diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index a505c7e..376f4fa 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -10,6 +10,7 @@ import ( "time" sdkmath "cosmossdk.io/math" + evmtypes "github.com/cosmos/evm/x/vm/types" gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" @@ -29,6 +30,7 @@ import ( consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) @@ -52,10 +54,11 @@ var _ Network = (*IntegrationNetwork)(nil) // IntegrationNetwork is the implementation of the Network interface for integration tests. type IntegrationNetwork struct { - cfg exrpcommon.Config - ctx sdktypes.Context - validators []stakingtypes.Validator - app *app.App + cfg exrpcommon.Config + ctx sdktypes.Context + validators []stakingtypes.Validator + app *app.App + baseDecimal evmtypes.Decimals // This is only needed for IBC chain testing setup valSet *cmttypes.ValidatorSet @@ -99,6 +102,11 @@ var ( // configureAndInitChain initializes the network with the given configuration. // It creates the genesis state and starts the network. func (n *IntegrationNetwork) configureAndInitChain() error { + + // The bonded amount should be updated to reflect the actual base denom + baseDecimals := n.cfg.ChainCoins.BaseDecimals() + n.baseDecimal = baseDecimals + // Create validator set with the amount of validators specified in the config // with the default power of 1. valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) @@ -291,6 +299,10 @@ func (n *IntegrationNetwork) GetBaseDenom() string { return n.cfg.Denom } +func (n *IntegrationNetwork) GetBaseDecimal() evmtypes.Decimals { + return n.baseDecimal +} + // GetBondDenom returns the network's bond denom func (n *IntegrationNetwork) GetBondDenom() string { return n.cfg.BondDenom From 08ba502dde7b2af67c79de7026c1c8c74ced1973 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:40:49 +0200 Subject: [PATCH 10/11] chore: restore linter --- .golangci.yml | 153 ++++++++++++++------------------------------------ Makefile | 6 +- 2 files changed, 44 insertions(+), 115 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index e1b0b76..f83aaa0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,130 +1,59 @@ -version: "2" run: tests: true + timeout: 5m + concurrency: 4 + linters: - default: none enable: - - copyloopvar - dogsled + - dupl - errcheck - goconst - gocritic + - gofumpt + - revive - gosec + - gosimple - govet - ineffassign - misspell - nakedret - - nolintlint - - revive + - prealloc + - exportloopref - staticcheck - - thelper + - stylecheck + - typecheck - unconvert - unparam - unused - settings: - dogsled: - max-blank-identifiers: 3 - nolintlint: - require-explanation: false - require-specific: false - allow-unused: false - revive: - severity: warning - rules: - - name: unused-parameter - disabled: true - - name: blank-imports - - name: context-as-argument - - name: context-keys-type - - name: dot-imports - - name: error-return - - name: error-strings - - name: error-naming - - name: exported - - name: if-return - - name: increment-decrement - - name: var-naming - - name: var-declaration - - name: range - - name: receiver-naming - - name: time-naming - - name: unexported-return - - name: indent-error-flow - - name: errorf - - name: empty-block - - name: superfluous-else - - name: unreachable-code - - name: redefines-builtin-id - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - rules: - - linters: - - revive - text: avoid meaningless package names - - linters: - - gosec - text: Use of weak random number generator - - linters: - - golint - text: comment on exported var - - linters: - - golint - text: don't use an underscore in package name - - linters: - - staticcheck - text: 'ST1003:' - - linters: - - staticcheck - text: 'ST1016:' - - linters: - - staticcheck - path: migrations - text: 'SA1019:' - - linters: - - staticcheck - path: ^tests/integration/ - - linters: - - stylecheck - text: 'ST1001:' - paths: - - x/vm/core - - mempool/txpool - - mempool/miner - - third_party$ - - builtin$ - - examples$ -issues: - max-issues-per-linter: 10000 - max-same-issues: 10000 -formatters: - enable: - - gci + - nolintlint + - asciicheck + - exportloopref - gofumpt - settings: - gci: - sections: - - standard - - default - - blank - - dot - - prefix(github.com/cometbft/cometbft) - - prefix(github.com/cosmos) - - prefix(cosmossdk.io) - - prefix(github.com/cosmos/cosmos-sdk) - - prefix(github.com/CosmWasm/wasmd) - - prefix(github.com/cosmos/gaia) - custom-order: true - exclusions: - generated: lax - paths: - - x/vm/core - - mempool/txpool - - mempool/miner - - third_party$ - - builtin$ - - examples$ + - 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) diff --git a/Makefile b/Makefile index 2011698..c0d074c 100644 --- a/Makefile +++ b/Makefile @@ -116,12 +116,12 @@ build-rocksdb: ### Linting ### ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v2.2.2 +golangci_version=v1.62.0 lint: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=15m + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --timeout=10m lint-fix: @echo "--> Running linter" From 719071ff1141d8463c2711523067d7bf901476fb Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:41:22 +0200 Subject: [PATCH 11/11] fix: linting --- app/app.go | 3 +-- app/config.go | 12 +----------- app/simulation_test.go | 2 +- cmd/exrpd/cmd/root.go | 5 ++--- testutil/integration/exrp/common/coins.go | 1 - .../integration/exrp/integration/clients.go | 2 +- testutil/integration/exrp/integration/ibc.go | 18 +++++++++--------- .../integration/exrp/integration/network.go | 4 +--- testutil/integration/exrp/integration/setup.go | 2 +- testutil/integration/exrp/upgrade/ibc.go | 18 +++++++++--------- 10 files changed, 26 insertions(+), 41 deletions(-) diff --git a/app/app.go b/app/app.go index fbbcc0c..14a69e9 100644 --- a/app/app.go +++ b/app/app.go @@ -376,9 +376,8 @@ func New( ) // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) - enabledSignModes := append(authtx.DefaultSignModes) //nolint:gocritic txConfigOpts := authtx.ConfigOptions{ - EnabledSignModes: enabledSignModes, + EnabledSignModes: authtx.DefaultSignModes, TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), } txConfig, err := authtx.NewTxConfigWithOptions( diff --git a/app/config.go b/app/config.go index 6c00c24..259442a 100644 --- a/app/config.go +++ b/app/config.go @@ -3,8 +3,6 @@ package app import ( "fmt" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" evmtypes "github.com/cosmos/evm/x/vm/types" ) @@ -46,7 +44,7 @@ func EVMAppOptions(chainID uint64) error { } //// Set denom info for the chain - //if err := setBaseDenom(coinInfo); err != nil { + // if err := setBaseDenom(coinInfo); err != nil { // return err //} @@ -63,11 +61,3 @@ func EVMAppOptions(chainID uint64) error { sealed = true return nil } - -// setBaseDenom registers display and base denoms -func setBaseDenom(ci evmtypes.EvmCoinInfo) error { - if err := sdk.RegisterDenom(ci.DisplayDenom, math.LegacyOneDec()); err != nil { - return err - } - return sdk.RegisterDenom(ci.Denom, math.LegacyNewDecWithPrec(1, int64(ci.Decimals))) -} diff --git a/app/simulation_test.go b/app/simulation_test.go index 4d341d1..8e0a337 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -44,7 +44,7 @@ const ( func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*app.App, error) { appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue //nolint:staticcheck bApp := app.New( logger, diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 8854b15..193a194 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -50,7 +50,6 @@ import ( "github.com/spf13/pflag" evmclient "github.com/cosmos/evm/client" - ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" "github.com/xrplevm/node/v8/app" ) @@ -209,9 +208,9 @@ func initRootCmd( ) // add server commands - ethermintserver.AddCommands( + evmserver.AddCommands( rootCmd, - ethermintserver.NewDefaultStartOptions(a.newApp, app.DefaultNodeHome), + evmserver.NewDefaultStartOptions(a.newApp, app.DefaultNodeHome), a.appExport, addModuleInitFlags, ) diff --git a/testutil/integration/exrp/common/coins.go b/testutil/integration/exrp/common/coins.go index e4f15fa..81236da 100644 --- a/testutil/integration/exrp/common/coins.go +++ b/testutil/integration/exrp/common/coins.go @@ -9,7 +9,6 @@ import ( var defaultChain = testconstants.LocalnetChainID type ChainCoins struct { - // decimals of the base denom? Maybe not.. baseCoin *network.CoinInfo evmCoin *network.CoinInfo diff --git a/testutil/integration/exrp/integration/clients.go b/testutil/integration/exrp/integration/clients.go index c4584da..34bccf4 100644 --- a/testutil/integration/exrp/integration/clients.go +++ b/testutil/integration/exrp/integration/clients.go @@ -85,4 +85,4 @@ func (n *IntegrationNetwork) GetDistrClient() distrtypes.QueryClient { // NOTE: Not needed func (n *IntegrationNetwork) GetMintClient() minttypes.QueryClient { return nil -} \ No newline at end of file +} diff --git a/testutil/integration/exrp/integration/ibc.go b/testutil/integration/exrp/integration/ibc.go index e540b3e..3914261 100644 --- a/testutil/integration/exrp/integration/ibc.go +++ b/testutil/integration/exrp/integration/ibc.go @@ -13,14 +13,14 @@ import ( // The keyring should be used instead. func (n *IntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain { return &ibctesting.TestChain{ - TB: t, - Coordinator: coord, - ChainID: n.GetChainID(), - App: n.app, - TxConfig: n.app.GetTxConfig(), - Codec: n.app.AppCodec(), - Vals: n.valSet, - NextVals: n.valSet, - Signers: n.valSigners, + TB: t, + Coordinator: coord, + ChainID: n.GetChainID(), + App: n.app, + TxConfig: n.app.GetTxConfig(), + Codec: n.app.AppCodec(), + Vals: n.valSet, + NextVals: n.valSet, + Signers: n.valSigners, } } diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 376f4fa..7451526 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -102,7 +102,6 @@ var ( // configureAndInitChain initializes the network with the given configuration. // It creates the genesis state and starts the network. func (n *IntegrationNetwork) configureAndInitChain() error { - // The bonded amount should be updated to reflect the actual base denom baseDecimals := n.cfg.ChainCoins.BaseDecimals() n.baseDecimal = baseDecimals @@ -110,7 +109,6 @@ func (n *IntegrationNetwork) configureAndInitChain() error { // Create validator set with the amount of validators specified in the config // with the default power of 1. valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) - totalBonded := DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators))) valFlags := make([]cmtproto.BlockIDFlag, len(valSet.Validators)) for i := range valSet.Validators { @@ -128,7 +126,7 @@ func (n *IntegrationNetwork) configureAndInitChain() error { fundedAccountBalances = addBondedModuleAccountToFundedBalances( fundedAccountBalances, - sdktypes.NewCoin(n.cfg.BondDenom, totalBonded), + sdktypes.NewCoin(n.cfg.BondDenom, DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators)))), ) delegations := createDelegations(validators) diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index a41a197..d8141d5 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -110,7 +110,7 @@ func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAc emptyCodeHash := crypto.Keccak256Hash(nil).String() for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) - // TODO: Update when replacing with forked cosmos/evm version is installed + // TODO: Update when replacing with forked cosmos/evm version is installed ethAcc := &evmostypes.EthAccount{ BaseAccount: baseAcc, CodeHash: emptyCodeHash, diff --git a/testutil/integration/exrp/upgrade/ibc.go b/testutil/integration/exrp/upgrade/ibc.go index f42c086..38b174c 100644 --- a/testutil/integration/exrp/upgrade/ibc.go +++ b/testutil/integration/exrp/upgrade/ibc.go @@ -13,14 +13,14 @@ import ( // The keyring should be used instead. func (n *UpgradeIntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain { return &ibctesting.TestChain{ - TB: t, - Coordinator: coord, - ChainID: n.GetChainID(), - App: n.app, - TxConfig: n.app.GetTxConfig(), - Codec: n.app.AppCodec(), - Vals: n.valSet, - NextVals: n.valSet, - Signers: n.valSigners, + TB: t, + Coordinator: coord, + ChainID: n.GetChainID(), + App: n.app, + TxConfig: n.app.GetTxConfig(), + Codec: n.app.AppCodec(), + Vals: n.valSet, + NextVals: n.valSet, + Signers: n.valSigners, } }