-
Notifications
You must be signed in to change notification settings - Fork 21
feat: upgrade node to v9 #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
4010d24
feat(app): apply `App Wiring Changes` from v0.53.x
GuillemGarciaDev 20a005d
chore: update cosmos-sdk dependencies
GuillemGarciaDev 28506cb
fix: add latest cosmos-sdk version to go.mod
GuillemGarciaDev 9745b46
Merge branch 'chore/update-cosmos-sdk' into chore/update-evm
GuillemGarciaDev b6e0c8d
refactor(app): replace evmos with cosmos/evm
GuillemGarciaDev 7c7180e
refactor(cmd): replace evmos with cosmos/evm
GuillemGarciaDev 8aacd9a
chore: bump deps
GuillemGarciaDev 7a39bab
refactor(tests, testutil): replace evmos with cosmos/evm dependencies
GuillemGarciaDev d3cd3b5
refactor(app): ante handler options
GuillemGarciaDev 4b4d42c
feat(cmd): create `InitAppConfig` for root command
GuillemGarciaDev 7182f38
refactor(cmd): init config app on root command, `DefaultGasAdjustment…
GuillemGarciaDev 9eeec51
refactor(testutil): remove evmos testsuite files + adapt evm testsuite
GuillemGarciaDev 24fc5c6
refactor(app): apply v8-v10 migration changes
GuillemGarciaDev 02e77e4
refactor(testutil): update integration testutils with ibc-go v10
GuillemGarciaDev 1cbec1d
chore: tidy dependencies
GuillemGarciaDev d638f56
fix: imports + root command wiring
GuillemGarciaDev cd56e8a
feat(app): setup ante handler with cosmos + evm extensions
GuillemGarciaDev e087526
feat(cmd): update newApp creator
GuillemGarciaDev 954778a
feat: working local-node.sh
GuillemGarciaDev 1ea85c5
fix(app): adapt app chain id config + remove unused ante file
GuillemGarciaDev b1646eb
fix(app): simulation_test.go breaking changes
GuillemGarciaDev 3a0a48d
chore: upgrade linter version and rules
GuillemGarciaDev 0d10955
chore: bump cosmos/evm to v0.4.0
GuillemGarciaDev 248398c
refactor(testutil/integration): add ChainsCoins to integration network
GuillemGarciaDev 08ba502
chore: restore linter
GuillemGarciaDev 719071f
fix: linting
GuillemGarciaDev f6fcfa9
chore: upgrade package version to v9
GuillemGarciaDev f9ebbf1
Merge branch 'v9.x.x' into chore/update-cosmos-sdk
GuillemGarciaDev e2ad445
Merge branch 'chore/update-cosmos-sdk' into chore/update-evm
GuillemGarciaDev 8afb99b
Merge branch 'chore/update-evm' into update/ibc-go
GuillemGarciaDev 19e5cda
Merge branch 'update/ibc-go' into fix/software-upgrade
GuillemGarciaDev 28e4670
chore: upgrade package version to v9
GuillemGarciaDev 55e9df1
Merge branch 'chore/update-evm' into update/ibc-go
GuillemGarciaDev 72e3e60
Merge branch 'update/ibc-go' into fix/software-upgrade
GuillemGarciaDev 954dd15
Merge pull request #81 from xrplevm/chore/update-cosmos-sdk
GuillemGarciaDev fa8b779
Merge pull request #86 from xrplevm/chore/update-evm
GuillemGarciaDev e473231
Merge pull request #82 from xrplevm/update/ibc-go
GuillemGarciaDev f47882a
Merge pull request #83 from xrplevm/fix/software-upgrade
GuillemGarciaDev bd19f9a
fix(testutil): node version import
GuillemGarciaDev 3ad6ae3
feat(app): add v9 upgrade handler
GuillemGarciaDev 21d77df
tmp(legacy): bring evmos legacy types to register implementations to …
GuillemGarciaDev 7a78c93
refactor(app): add evmos proto account types compatibility + signatur…
GuillemGarciaDev 3ca7b30
tmp: migrate evm params
GuillemGarciaDev 20f15cf
tmp: remove non-used files
GuillemGarciaDev a327ed3
fix: v9 upgrade handler logger
GuillemGarciaDev 846fa0f
fix: ProtoBaseAccount + EthAccount migration
GuillemGarciaDev 93cb403
fix: register implementations
GuillemGarciaDev 4097678
feat: custom keyring options
GuillemGarciaDev dcc2a3f
fix: localnet denoms on config
GuillemGarciaDev e4671f8
tmp: avoid default 0 chainid
GuillemGarciaDev 5e82ac4
tmp: disable mempool
GuillemGarciaDev c64173a
tmp: remove zeroed evm chain id
GuillemGarciaDev adf3235
feat: add mainnet, testnet and devnet chain configs
GuillemGarciaDev bcb7c9e
fix: mempool module configuration
GuillemGarciaDev 175e260
fix: add ratelimit module to SetOrderEndBlockers
GuillemGarciaDev c29bff7
refactor: move config constants to config
GuillemGarciaDev 8889ce4
fix(tests/upgrade): remove deprecated update testsuite
GuillemGarciaDev 8e1ebe0
fix: clean unused legacy types
GuillemGarciaDev 04e6e73
fix(tests): remove deprecated upgrade testsuite and fix integration t…
GuillemGarciaDev 091bd2a
fix(app): app wiring
GuillemGarciaDev ed31173
fix(testutil): linting
GuillemGarciaDev 4ffc6f3
fix(app): remove unused legacy types
GuillemGarciaDev 2f2ef6a
fix(app): remove unused active precompiles options
GuillemGarciaDev 963b6fa
feat(app): custom `ante` module
GuillemGarciaDev 3ccc589
fix(app): remove non-existing cosmos/evm `EthAccount` type from sdk.A…
GuillemGarciaDev f88f968
chore: replace cosmos/evm and cosmos-sdk versions
GuillemGarciaDev 092bd21
fix(testutil): update testutil with changes
GuillemGarciaDev ab83428
fix(cmd): evm chain id parsing
GuillemGarciaDev 0871d0b
fix(testutil): integration testsuite genesis account types fix
GuillemGarciaDev 4268b43
chore: bump Dockerfile go version to 1.23.8
GuillemGarciaDev b5cdb1c
refactor: replace localnet chain-id with `exrp_1449999-1`
GuillemGarciaDev 3e7bbf3
fix(app): drop ibc transfer v2 support
GuillemGarciaDev 132aeb3
refactor: register legacy implementations
GuillemGarciaDev 2c58ffd
fix(app): remove exported interface implementations registration
GuillemGarciaDev 945ea1e
feat(types): add legacy evmos types
GuillemGarciaDev 8d389d5
fi(app): remove evm mempool support
GuillemGarciaDev 09849ac
fix: remove state-sync script
GuillemGarciaDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,63 @@ | ||
| run: | ||
| tests: true | ||
| timeout: 5m | ||
| concurrency: 4 | ||
| tests: true | ||
| timeout: 5m | ||
| concurrency: 4 | ||
|
|
||
| linters: | ||
| enable: | ||
| - dogsled | ||
| - dupl | ||
| - errcheck | ||
| - goconst | ||
| - gocritic | ||
| - gofumpt | ||
| - revive | ||
| - gosec | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
| - misspell | ||
| - nakedret | ||
| - prealloc | ||
| - exportloopref | ||
| - staticcheck | ||
| - stylecheck | ||
| - typecheck | ||
| - unconvert | ||
| - unparam | ||
| - unused | ||
| - nolintlint | ||
| - asciicheck | ||
| - exportloopref | ||
| - gofumpt | ||
| - gomodguard | ||
| enable: | ||
| - dogsled | ||
| - dupl | ||
| - errcheck | ||
| - goconst | ||
| - gocritic | ||
| - gofumpt | ||
| - revive | ||
| - gosec | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
| - misspell | ||
| - nakedret | ||
| - prealloc | ||
| - exportloopref | ||
| - staticcheck | ||
| - stylecheck | ||
| - typecheck | ||
| - unconvert | ||
| - unparam | ||
| - unused | ||
| - nolintlint | ||
| - asciicheck | ||
| - exportloopref | ||
| - gofumpt | ||
| - gomodguard | ||
|
|
||
| linters-settings: | ||
| dogsled: | ||
| max-blank-identifiers: 3 | ||
| golint: | ||
| min-confidence: 0 | ||
| maligned: | ||
| suggest-new: true | ||
| misspell: | ||
| locale: US | ||
| nolintlint: | ||
| allow-unused: false | ||
| allow-leading-space: true | ||
| require-explanation: false | ||
| require-specific: false | ||
| gofumpt: | ||
| lang-version: "1.22" | ||
| gomodguard: | ||
| blocked: | ||
| versions: # List of blocked module version constraints | ||
| - https://github.com/etcd-io/etcd: # Blocked module with version constraint | ||
| version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
| reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional) | ||
| - https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint | ||
| version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
| reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional) | ||
| dogsled: | ||
| max-blank-identifiers: 3 | ||
| golint: | ||
| min-confidence: 0 | ||
| maligned: | ||
| suggest-new: true | ||
| misspell: | ||
| locale: US | ||
| nolintlint: | ||
| allow-unused: false | ||
| allow-leading-space: true | ||
| require-explanation: false | ||
| require-specific: false | ||
| staticcheck: | ||
| checks: | ||
| - all | ||
| - '-SA1019' | ||
| gofumpt: | ||
| lang-version: "1.22" | ||
| gomodguard: | ||
| blocked: | ||
| versions: # List of blocked module version constraints | ||
| - https://github.com/etcd-io/etcd: # Blocked module with version constraint | ||
| version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
| reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional) | ||
| - https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint | ||
| version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
| reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| package ante | ||
|
|
||
| import ( | ||
| errorsmod "cosmossdk.io/errors" | ||
| "github.com/cosmos/evm/ante" | ||
|
|
||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| errortypes "github.com/cosmos/cosmos-sdk/types/errors" | ||
| authante "github.com/cosmos/cosmos-sdk/x/auth/ante" | ||
| ) | ||
|
|
||
| // NewAnteHandler returns an ante handler responsible for attempting to route an | ||
| // Ethereum or SDK transaction to an internal ante handler for performing | ||
| // transaction-level processing (e.g. fee payment, signature verification) before | ||
| // being passed onto it's respective handler. | ||
| func NewAnteHandler(options ante.HandlerOptions) sdk.AnteHandler { | ||
| return func( | ||
| ctx sdk.Context, tx sdk.Tx, sim bool, | ||
| ) (newCtx sdk.Context, err error) { | ||
| var anteHandler sdk.AnteHandler | ||
|
|
||
| txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) | ||
| if ok { | ||
| opts := txWithExtensions.GetExtensionOptions() | ||
| if len(opts) > 0 { | ||
| switch typeURL := opts[0].GetTypeUrl(); typeURL { | ||
| case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx": | ||
| // handle as *evmtypes.MsgEthereumTx | ||
| anteHandler = newMonoEVMAnteHandler(options) | ||
| case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx": | ||
| // cosmos-sdk tx with dynamic fee extension | ||
| anteHandler = newCosmosAnteHandler(options) | ||
| default: | ||
| return ctx, errorsmod.Wrapf( | ||
| errortypes.ErrUnknownExtensionOptions, | ||
| "rejecting tx with unsupported extension option: %s", typeURL, | ||
| ) | ||
| } | ||
|
|
||
| return anteHandler(ctx, tx, sim) | ||
| } | ||
| } | ||
|
|
||
| // handle as totally normal Cosmos SDK tx | ||
| switch tx.(type) { | ||
| case sdk.Tx: | ||
| anteHandler = newCosmosAnteHandler(options) | ||
| default: | ||
| return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx) | ||
| } | ||
|
|
||
| return anteHandler(ctx, tx, sim) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package ante | ||
|
|
||
| import ( | ||
| stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" | ||
| baseevmante "github.com/cosmos/evm/ante" | ||
| cosmosante "github.com/cosmos/evm/ante/cosmos" | ||
| evmante "github.com/cosmos/evm/ante/evm" | ||
| evmtypes "github.com/cosmos/evm/x/vm/types" | ||
| ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" | ||
| poaante "github.com/xrplevm/node/v9/x/poa/ante" | ||
|
|
||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| "github.com/cosmos/cosmos-sdk/x/auth/ante" | ||
| sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" | ||
| ) | ||
|
|
||
| // newCosmosAnteHandler creates the default ante handler for Cosmos transactions | ||
| func newCosmosAnteHandler(options baseevmante.HandlerOptions) sdk.AnteHandler { | ||
| return sdk.ChainAnteDecorators( | ||
| cosmosante.NewRejectMessagesDecorator(), // reject MsgEthereumTxs | ||
| cosmosante.NewAuthzLimiterDecorator( // disable the Msg types that cannot be included on an authz.MsgExec msgs field | ||
| sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), | ||
| sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), | ||
| sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), | ||
| sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), | ||
| sdk.MsgTypeURL(&sdkvesting.MsgCreateVestingAccount{}), | ||
| sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}), | ||
| ), | ||
| ante.NewSetUpContextDecorator(), | ||
| ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), | ||
| ante.NewValidateBasicDecorator(), | ||
| ante.NewTxTimeoutHeightDecorator(), | ||
| ante.NewValidateMemoDecorator(options.AccountKeeper), | ||
| cosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), | ||
| ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), | ||
| ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), | ||
| // SetPubKeyDecorator must be called before all signature verification decorators | ||
| ante.NewSetPubKeyDecorator(options.AccountKeeper), | ||
| ante.NewValidateSigCountDecorator(options.AccountKeeper), | ||
| ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), | ||
| ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), | ||
| ante.NewIncrementSequenceDecorator(options.AccountKeeper), | ||
| ibcante.NewRedundantRelayDecorator(options.IBCKeeper), | ||
| evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), | ||
| poaante.NewPoaDecorator(), | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package ante | ||
|
|
||
| import ( | ||
| "github.com/cosmos/evm/ante" | ||
| evmante "github.com/cosmos/evm/ante/evm" | ||
|
|
||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| ) | ||
|
|
||
| // newMonoEVMAnteHandler creates the sdk.AnteHandler implementation for the EVM transactions. | ||
| func newMonoEVMAnteHandler(options ante.HandlerOptions) sdk.AnteHandler { | ||
| decorators := []sdk.AnteDecorator{ | ||
| evmante.NewEVMMonoDecorator( | ||
| options.AccountKeeper, | ||
| options.FeeMarketKeeper, | ||
| options.EvmKeeper, | ||
| options.MaxTxGasWanted, | ||
| ), | ||
| ante.NewTxListenerDecorator(options.PendingTxListener), | ||
| } | ||
|
|
||
| return sdk.ChainAnteDecorators(decorators...) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.