From af68fae49e734f698e888dae4deec5fff338e950 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Mon, 4 Oct 2021 13:40:58 +0200 Subject: [PATCH 1/3] evm: geth 1.10.9 fee market changes --- app/ante/ante.go | 5 +- app/ante/eth.go | 50 +- app/ante/eth_test.go | 4 +- app/ante/utils_test.go | 6 +- app/app.go | 11 +- docs/api/proto-docs.md | 1124 +++++++++++++++++ docs/protodoc-markdown.tmpl | 105 ++ go.mod | 4 +- go.sum | 7 +- proto/ethermint/evm/v1/evm.proto | 2 - proto/ethermint/evm/v1/genesis.proto | 7 +- proto/ethermint/evm/v1/query.proto | 3 - x/evm/keeper/grpc_query.go | 27 +- x/evm/keeper/keeper.go | 24 +- x/evm/keeper/state_transition.go | 23 +- .../keeper/state_transition_benchmark_test.go | 2 +- x/evm/keeper/utils.go | 21 +- x/evm/keeper/utils_test.go | 1 + x/evm/types/evm.pb.go | 186 +-- x/evm/types/genesis.pb.go | 46 +- x/evm/types/interfaces.go | 11 + x/evm/types/params.go | 11 +- x/evm/types/query.pb.go | 326 ++--- x/evm/types/tx_args.go | 172 +++ 24 files changed, 1744 insertions(+), 434 deletions(-) create mode 100644 docs/api/proto-docs.md create mode 100644 docs/protodoc-markdown.tmpl create mode 100644 x/evm/types/tx_args.go diff --git a/app/ante/ante.go b/app/ante/ante.go index ff887892de..f71e193949 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -36,6 +36,7 @@ func NewAnteHandler( evmKeeper EVMKeeper, feeGrantKeeper authante.FeegrantKeeper, channelKeeper channelkeeper.Keeper, + feeMarketKeeper FeeMarketKeeper, signModeHandler authsigning.SignModeHandler, ) sdk.AnteHandler { return func( @@ -62,8 +63,8 @@ func NewAnteHandler( NewEthSigVerificationDecorator(evmKeeper), NewEthAccountVerificationDecorator(ak, bankKeeper, evmKeeper), NewEthNonceVerificationDecorator(ak), - NewEthGasConsumeDecorator(evmKeeper), - NewCanTransferDecorator(evmKeeper), + NewEthGasConsumeDecorator(evmKeeper, feeMarketKeeper), + NewCanTransferDecorator(evmKeeper, feeMarketKeeper), NewEthIncrementSenderSequenceDecorator(ak), // innermost AnteDecorator. ) diff --git a/app/ante/eth.go b/app/ante/eth.go index 1513c409e2..af455d055c 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -4,14 +4,16 @@ import ( "errors" "math/big" + "github.com/palantir/stacktrace" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/palantir/stacktrace" ethermint "github.com/tharsis/ethermint/types" evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" evmtypes "github.com/tharsis/ethermint/x/evm/types" + feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -28,13 +30,18 @@ type EVMKeeper interface { GetParams(ctx sdk.Context) evmtypes.Params WithContext(ctx sdk.Context) ResetRefundTransient(ctx sdk.Context) - NewEVM(msg core.Message, config *params.ChainConfig, params evmtypes.Params, coinbase common.Address, tracer vm.Tracer) *vm.EVM + NewEVM(msg core.Message, config *params.ChainConfig, params evmtypes.Params, coinbase common.Address, baseFee *big.Int, tracer vm.Tracer) *vm.EVM GetCodeHash(addr common.Address) common.Hash DeductTxCostsFromUserBalance( - ctx sdk.Context, msgEthTx evmtypes.MsgEthereumTx, txData evmtypes.TxData, denom string, homestead, istanbul bool, + ctx sdk.Context, msgEthTx evmtypes.MsgEthereumTx, txData evmtypes.TxData, denom string, homestead, istanbul, london bool, ) (sdk.Coins, error) } +type FeeMarketKeeper interface { + GetParams(ctx sdk.Context) feemarkettypes.Params + GetBaseFee(ctx sdk.Context) *big.Int +} + // EthSigVerificationDecorator validates an ethereum signatures type EthSigVerificationDecorator struct { evmKeeper EVMKeeper @@ -234,7 +241,9 @@ type EthGasConsumeDecorator struct { } // NewEthGasConsumeDecorator creates a new EthGasConsumeDecorator -func NewEthGasConsumeDecorator(evmKeeper EVMKeeper) EthGasConsumeDecorator { +func NewEthGasConsumeDecorator( + evmKeeper EVMKeeper, fmk FeeMarketKeeper, +) EthGasConsumeDecorator { return EthGasConsumeDecorator{ evmKeeper: evmKeeper, } @@ -265,6 +274,8 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula blockHeight := big.NewInt(ctx.BlockHeight()) homestead := ethCfg.IsHomestead(blockHeight) istanbul := ethCfg.IsIstanbul(blockHeight) + // london := ethCfg.IsLondon(blockHeight) + london := false evmDenom := params.EvmDenom var events sdk.Events @@ -290,6 +301,7 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula evmDenom, homestead, istanbul, + london, ) if err != nil { return ctx, stacktrace.Propagate(err, "failed to deduct transaction costs from user balance") @@ -321,13 +333,15 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula // CanTransferDecorator checks if the sender is allowed to transfer funds according to the EVM block // context rules. type CanTransferDecorator struct { - evmKeeper EVMKeeper + evmKeeper EVMKeeper + feemarketKeeper FeeMarketKeeper } // NewCanTransferDecorator creates a new CanTransferDecorator instance. -func NewCanTransferDecorator(evmKeeper EVMKeeper) CanTransferDecorator { +func NewCanTransferDecorator(evmKeeper EVMKeeper, fmk FeeMarketKeeper) CanTransferDecorator { return CanTransferDecorator{ - evmKeeper: evmKeeper, + evmKeeper: evmKeeper, + feemarketKeeper: fmk, } } @@ -337,6 +351,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate ctd.evmKeeper.WithContext(ctx) params := ctd.evmKeeper.GetParams(ctx) + feeMktParams := ctd.feemarketKeeper.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig(ctd.evmKeeper.ChainID()) signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) @@ -350,6 +365,11 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate ) } + var baseFee *big.Int + if !feeMktParams.NoBaseFee { + baseFee = ctd.feemarketKeeper.GetBaseFee(ctx) + } + coreMsg, err := msgEthTx.AsMessage(signer) if err != nil { return ctx, stacktrace.Propagate( @@ -359,7 +379,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate } // NOTE: pass in an empty coinbase address and nil tracer as we don't need them for the check below - evm := ctd.evmKeeper.NewEVM(coreMsg, ethCfg, params, common.Address{}, evmtypes.NewNoOpTracer()) + evm := ctd.evmKeeper.NewEVM(coreMsg, ethCfg, params, common.Address{}, baseFee, evmtypes.NewNoOpTracer()) // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter @@ -369,6 +389,20 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate "failed to transfer %s using the EVM block context transfer function", coreMsg.Value(), ) } + + // if !feeMktParams.NoBaseFee && baseFee == nil { + // return ctx, stacktrace.Propagate( + // sdkerrors.Wrap(evmtypes.ErrInvalidBaseFee, "base fee is supported but evm block context value is nil"), + // "address %s", coreMsg.From(), + // ) + // } + + // if !feeMktParams.NoBaseFee && baseFee != nil && coreMsg.GasFeeCap().Cmp(baseFee) < 0 { + // return ctx, stacktrace.Propagate( + // sdkerrors.Wrapf(evmtypes.ErrInvalidBaseFee, "max fee per gas less than block base fee (%s < %s)", coreMsg.GasFeeCap(), baseFee), + // "address %s", coreMsg.From(), + // ) + // } } ctd.evmKeeper.WithContext(ctx) diff --git a/app/ante/eth_test.go b/app/ante/eth_test.go index a7c2c4cde9..f72d4ac0c9 100644 --- a/app/ante/eth_test.go +++ b/app/ante/eth_test.go @@ -195,7 +195,7 @@ func (suite AnteTestSuite) TestEthNonceVerificationDecorator() { } func (suite AnteTestSuite) TestEthGasConsumeDecorator() { - dec := ante.NewEthGasConsumeDecorator(suite.app.EvmKeeper) + dec := ante.NewEthGasConsumeDecorator(suite.app.EvmKeeper, suite.app.FeeMarketKeeper) addr := tests.GenerateAddress() @@ -298,7 +298,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() { } func (suite AnteTestSuite) TestCanTransferDecorator() { - dec := ante.NewCanTransferDecorator(suite.app.EvmKeeper) + dec := ante.NewCanTransferDecorator(suite.app.EvmKeeper, suite.app.FeeMarketKeeper) addr, privKey := tests.NewAddrKey() diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index 8ce8d604cd..7757b72f47 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -56,7 +56,11 @@ func (suite *AnteTestSuite) SetupTest() { suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) - suite.anteHandler = ante.NewAnteHandler(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.EvmKeeper, suite.app.FeeGrantKeeper, suite.app.IBCKeeper.ChannelKeeper, encodingConfig.TxConfig.SignModeHandler()) + suite.anteHandler = ante.NewAnteHandler( + suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.EvmKeeper, suite.app.FeeGrantKeeper, + suite.app.IBCKeeper.ChannelKeeper, suite.app.FeeMarketKeeper, + encodingConfig.TxConfig.SignModeHandler(), + ) suite.ethSigner = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()) } diff --git a/app/app.go b/app/app.go index 47ada7ee67..49e7b4270e 100644 --- a/app/app.go +++ b/app/app.go @@ -338,16 +338,16 @@ func NewEthermintApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) // Create Ethermint keepers + app.FeeMarketKeeper = feemarketkeeper.NewKeeper( + appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName), + ) + app.EvmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.AccountKeeper, app.BankKeeper, app.StakingKeeper, + app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, tracer, bApp.Trace(), // debug EVM based on Baseapp options ) - app.FeeMarketKeeper = feemarketkeeper.NewKeeper( - appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName), - ) - // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, @@ -512,6 +512,7 @@ func NewEthermintApp( app.SetAnteHandler( ante.NewAnteHandler( app.AccountKeeper, app.BankKeeper, app.EvmKeeper, app.FeeGrantKeeper, app.IBCKeeper.ChannelKeeper, + app.FeeMarketKeeper, encodingConfig.TxConfig.SignModeHandler(), ), ) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md new file mode 100644 index 0000000000..f4638b2c3d --- /dev/null +++ b/docs/api/proto-docs.md @@ -0,0 +1,1124 @@ + +# Protobuf Documentation + + +## Table of Contents + +- [ethermint/crypto/v1/ethsecp256k1/keys.proto](#ethermint/crypto/v1/ethsecp256k1/keys.proto) + - [PrivKey](#ethermint.crypto.v1.ethsecp256k1.PrivKey) + - [PubKey](#ethermint.crypto.v1.ethsecp256k1.PubKey) + +- [ethermint/evm/v1/evm.proto](#ethermint/evm/v1/evm.proto) + - [AccessTuple](#ethermint.evm.v1.AccessTuple) + - [ChainConfig](#ethermint.evm.v1.ChainConfig) + - [Log](#ethermint.evm.v1.Log) + - [Params](#ethermint.evm.v1.Params) + - [State](#ethermint.evm.v1.State) + - [TraceConfig](#ethermint.evm.v1.TraceConfig) + - [TransactionLogs](#ethermint.evm.v1.TransactionLogs) + - [TxResult](#ethermint.evm.v1.TxResult) + +- [ethermint/evm/v1/genesis.proto](#ethermint/evm/v1/genesis.proto) + - [GenesisAccount](#ethermint.evm.v1.GenesisAccount) + - [GenesisState](#ethermint.evm.v1.GenesisState) + +- [ethermint/evm/v1/tx.proto](#ethermint/evm/v1/tx.proto) + - [AccessListTx](#ethermint.evm.v1.AccessListTx) + - [DynamicFeeTx](#ethermint.evm.v1.DynamicFeeTx) + - [ExtensionOptionsEthereumTx](#ethermint.evm.v1.ExtensionOptionsEthereumTx) + - [LegacyTx](#ethermint.evm.v1.LegacyTx) + - [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) + - [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) + + - [Msg](#ethermint.evm.v1.Msg) + +- [ethermint/evm/v1/query.proto](#ethermint/evm/v1/query.proto) + - [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) + - [EthCallRequest](#ethermint.evm.v1.EthCallRequest) + - [QueryAccountRequest](#ethermint.evm.v1.QueryAccountRequest) + - [QueryAccountResponse](#ethermint.evm.v1.QueryAccountResponse) + - [QueryBalanceRequest](#ethermint.evm.v1.QueryBalanceRequest) + - [QueryBalanceResponse](#ethermint.evm.v1.QueryBalanceResponse) + - [QueryCodeRequest](#ethermint.evm.v1.QueryCodeRequest) + - [QueryCodeResponse](#ethermint.evm.v1.QueryCodeResponse) + - [QueryCosmosAccountRequest](#ethermint.evm.v1.QueryCosmosAccountRequest) + - [QueryCosmosAccountResponse](#ethermint.evm.v1.QueryCosmosAccountResponse) + - [QueryParamsRequest](#ethermint.evm.v1.QueryParamsRequest) + - [QueryParamsResponse](#ethermint.evm.v1.QueryParamsResponse) + - [QueryStorageRequest](#ethermint.evm.v1.QueryStorageRequest) + - [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) + - [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) + - [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) + - [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest) + - [QueryTxLogsResponse](#ethermint.evm.v1.QueryTxLogsResponse) + - [QueryValidatorAccountRequest](#ethermint.evm.v1.QueryValidatorAccountRequest) + - [QueryValidatorAccountResponse](#ethermint.evm.v1.QueryValidatorAccountResponse) + + - [Query](#ethermint.evm.v1.Query) + +- [ethermint/feemarket/v1/feemarket.proto](#ethermint/feemarket/v1/feemarket.proto) + - [Params](#ethermint.feemarket.v1.Params) + +- [ethermint/feemarket/v1/genesis.proto](#ethermint/feemarket/v1/genesis.proto) + - [GenesisState](#ethermint.feemarket.v1.GenesisState) + +- [ethermint/feemarket/v1/query.proto](#ethermint/feemarket/v1/query.proto) + - [QueryBaseFeeRequest](#ethermint.feemarket.v1.QueryBaseFeeRequest) + - [QueryBaseFeeResponse](#ethermint.feemarket.v1.QueryBaseFeeResponse) + - [QueryBlockGasRequest](#ethermint.feemarket.v1.QueryBlockGasRequest) + - [QueryBlockGasResponse](#ethermint.feemarket.v1.QueryBlockGasResponse) + - [QueryParamsRequest](#ethermint.feemarket.v1.QueryParamsRequest) + - [QueryParamsResponse](#ethermint.feemarket.v1.QueryParamsResponse) + + - [Query](#ethermint.feemarket.v1.Query) + +- [ethermint/types/v1/account.proto](#ethermint/types/v1/account.proto) + - [EthAccount](#ethermint.types.v1.EthAccount) + +- [ethermint/types/v1/web3.proto](#ethermint/types/v1/web3.proto) + - [ExtensionOptionsWeb3Tx](#ethermint.types.v1.ExtensionOptionsWeb3Tx) + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## ethermint/crypto/v1/ethsecp256k1/keys.proto + + + + + +### PrivKey +PrivKey defines a type alias for an ecdsa.PrivateKey that implements +Tendermint's PrivateKey interface. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | | + + + + + + + + +### PubKey +PubKey defines a type alias for an ecdsa.PublicKey that implements +Tendermint's PubKey interface. It represents the 33-byte compressed public +key format. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/evm/v1/evm.proto + + + + + +### AccessTuple +AccessTuple is the element type of an access list. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | hex formatted ethereum address | +| `storage_keys` | [string](#string) | repeated | hex formatted hashes of the storage keys | + + + + + + + + +### ChainConfig +ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +instead of *big.Int. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `homestead_block` | [string](#string) | | Homestead switch block (nil no fork, 0 = already homestead) | +| `dao_fork_block` | [string](#string) | | TheDAO hard-fork switch block (nil no fork) | +| `dao_fork_support` | [bool](#bool) | | Whether the nodes supports or opposes the DAO hard-fork | +| `eip150_block` | [string](#string) | | EIP150 implements the Gas price changes (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) | +| `eip150_hash` | [string](#string) | | EIP150 HF hash (needed for header only clients as only gas pricing changed) | +| `eip155_block` | [string](#string) | | EIP155Block HF block | +| `eip158_block` | [string](#string) | | EIP158 HF block | +| `byzantium_block` | [string](#string) | | Byzantium switch block (nil no fork, 0 = already on byzantium) | +| `constantinople_block` | [string](#string) | | Constantinople switch block (nil no fork, 0 = already activated) | +| `petersburg_block` | [string](#string) | | Petersburg switch block (nil same as Constantinople) | +| `istanbul_block` | [string](#string) | | Istanbul switch block (nil no fork, 0 = already on istanbul) | +| `muir_glacier_block` | [string](#string) | | Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) | +| `berlin_block` | [string](#string) | | Berlin switch block (nil = no fork, 0 = already on berlin) | +| `catalyst_block` | [string](#string) | | Catalyst switch block (nil = no fork, 0 = already on catalyst) | +| `london_block` | [string](#string) | | London switch block (nil = no fork, 0 = already on london) | + + + + + + + + +### Log +Log represents an protobuf compatible Ethereum Log that defines a contract +log event. These events are generated by the LOG opcode and stored/indexed by +the node. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address of the contract that generated the event | +| `topics` | [string](#string) | repeated | list of topics provided by the contract. | +| `data` | [bytes](#bytes) | | supplied by the contract, usually ABI-encoded | +| `block_number` | [uint64](#uint64) | | block in which the transaction was included | +| `tx_hash` | [string](#string) | | hash of the transaction | +| `tx_index` | [uint64](#uint64) | | index of the transaction in the block | +| `block_hash` | [string](#string) | | hash of the block in which the transaction was included | +| `index` | [uint64](#uint64) | | index of the log in the block | +| `removed` | [bool](#bool) | | The Removed field is true if this log was reverted due to a chain reorganisation. You must pay attention to this field if you receive logs through a filter query. | + + + + + + + + +### Params +Params defines the EVM module parameters + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `evm_denom` | [string](#string) | | evm denom represents the token denomination used to run the EVM state transitions. | +| `enable_create` | [bool](#bool) | | enable create toggles state transitions that use the vm.Create function | +| `enable_call` | [bool](#bool) | | enable call toggles state transitions that use the vm.Call function | +| `extra_eips` | [int64](#int64) | repeated | extra eips defines the additional EIPs for the vm.Config | +| `chain_config` | [ChainConfig](#ethermint.evm.v1.ChainConfig) | | chain config defines the EVM chain configuration parameters | + + + + + + + + +### State +State represents a single Storage key value pair item. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [string](#string) | | | +| `value` | [string](#string) | | | + + + + + + + + +### TraceConfig +TraceConfig holds extra parameters to trace functions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `tracer` | [string](#string) | | custom javascript tracer | +| `timeout` | [string](#string) | | overrides the default timeout of 5 seconds for JavaScript-based tracing calls | +| `reexec` | [uint64](#uint64) | | number of blocks the tracer is willing to go back | +| `disable_memory` | [bool](#bool) | | disable memory capture | +| `disable_stack` | [bool](#bool) | | disable stack capture | +| `disable_storage` | [bool](#bool) | | disable storage capture | +| `disable_return_data` | [bool](#bool) | | disable return data capture | +| `debug` | [bool](#bool) | | print output during capture end | +| `limit` | [int32](#int32) | | maximum length of output, but zero means unlimited | +| `overrides` | [ChainConfig](#ethermint.evm.v1.ChainConfig) | | Chain overrides, can be used to execute a trace using future fork rules | + + + + + + + + +### TransactionLogs +TransactionLogs define the logs generated from a transaction execution +with a given hash. It it used for import/export data as transactions are not +persisted on blockchain state after an upgrade. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [string](#string) | | | +| `logs` | [Log](#ethermint.evm.v1.Log) | repeated | | + + + + + + + + +### TxResult +TxResult stores results of Tx execution. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `contract_address` | [string](#string) | | contract_address contains the ethereum address of the created contract (if any). If the state transition is an evm.Call, the contract address will be empty. | +| `bloom` | [bytes](#bytes) | | bloom represents the bloom filter bytes | +| `tx_logs` | [TransactionLogs](#ethermint.evm.v1.TransactionLogs) | | tx_logs contains the transaction hash and the proto-compatible ethereum logs. | +| `ret` | [bytes](#bytes) | | ret defines the bytes from the execution. | +| `reverted` | [bool](#bool) | | reverted flag is set to true when the call has been reverted | +| `gas_used` | [uint64](#uint64) | | gas_used notes the amount of gas consumed while execution | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/evm/v1/genesis.proto + + + + + +### GenesisAccount +GenesisAccount defines an account to be initialized in the genesis state. +Its main difference between with Geth's GenesisAccount is that it uses a +custom storage type and that it doesn't contain the private key field. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address defines an ethereum hex formated address of an account | +| `code` | [string](#string) | | code defines the hex bytes of the account code. | +| `storage` | [State](#ethermint.evm.v1.State) | repeated | storage defines the set of state key values for the account. | + + + + + + + + +### GenesisState +GenesisState defines the evm module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `accounts` | [GenesisAccount](#ethermint.evm.v1.GenesisAccount) | repeated | accounts is an array containing the ethereum genesis accounts. | +| `params` | [Params](#ethermint.evm.v1.Params) | | params defines all the paramaters of the module. | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/evm/v1/tx.proto + + + + + +### AccessListTx +AccessListTx is the data of EIP-2930 access list transactions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [string](#string) | | destination EVM chain ID | +| `nonce` | [uint64](#uint64) | | nonce corresponds to the account nonce (transaction sequence). | +| `gas_price` | [string](#string) | | gas price defines the value for each gas unit | +| `gas` | [uint64](#uint64) | | gas defines the gas limit defined for the transaction. | +| `to` | [string](#string) | | hex formatted address of the recipient | +| `value` | [string](#string) | | value defines the unsigned integer value of the transaction amount. | +| `data` | [bytes](#bytes) | | input defines the data payload bytes of the transaction. | +| `accesses` | [AccessTuple](#ethermint.evm.v1.AccessTuple) | repeated | | +| `v` | [bytes](#bytes) | | v defines the signature value | +| `r` | [bytes](#bytes) | | r defines the signature value | +| `s` | [bytes](#bytes) | | s define the signature value | + + + + + + + + +### DynamicFeeTx +DynamicFeeTx is the data of EIP-1559 dinamic fee transactions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [string](#string) | | destination EVM chain ID | +| `nonce` | [uint64](#uint64) | | nonce corresponds to the account nonce (transaction sequence). | +| `gas_tip_cap` | [string](#string) | | gas tip cap defines the max value for the gas tip | +| `gas_fee_cap` | [string](#string) | | gas fee cap defines the max value for the gas fee | +| `gas` | [uint64](#uint64) | | gas defines the gas limit defined for the transaction. | +| `to` | [string](#string) | | hex formatted address of the recipient | +| `value` | [string](#string) | | value defines the the transaction amount. | +| `data` | [bytes](#bytes) | | input defines the data payload bytes of the transaction. | +| `accesses` | [AccessTuple](#ethermint.evm.v1.AccessTuple) | repeated | | +| `v` | [bytes](#bytes) | | v defines the signature value | +| `r` | [bytes](#bytes) | | r defines the signature value | +| `s` | [bytes](#bytes) | | s define the signature value | + + + + + + + + +### ExtensionOptionsEthereumTx + + + + + + + + + +### LegacyTx +LegacyTx is the transaction data of regular Ethereum transactions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `nonce` | [uint64](#uint64) | | nonce corresponds to the account nonce (transaction sequence). | +| `gas_price` | [string](#string) | | gas price defines the value for each gas unit | +| `gas` | [uint64](#uint64) | | gas defines the gas limit defined for the transaction. | +| `to` | [string](#string) | | hex formatted address of the recipient | +| `value` | [string](#string) | | value defines the unsigned integer value of the transaction amount. | +| `data` | [bytes](#bytes) | | input defines the data payload bytes of the transaction. | +| `v` | [bytes](#bytes) | | v defines the signature value | +| `r` | [bytes](#bytes) | | r defines the signature value | +| `s` | [bytes](#bytes) | | s define the signature value | + + + + + + + + +### MsgEthereumTx +MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [google.protobuf.Any](#google.protobuf.Any) | | inner transaction data + +caches | +| `size` | [double](#double) | | encoded storage size of the transaction | +| `hash` | [string](#string) | | transaction hash in hex format | +| `from` | [string](#string) | | ethereum signer address in hex format. This address value is checked against the address derived from the signature (V, R, S) using the secp256k1 elliptic curve | + + + + + + + + +### MsgEthereumTxResponse +MsgEthereumTxResponse defines the Msg/EthereumTx response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [string](#string) | | ethereum transaction hash in hex format. This hash differs from the Tendermint sha256 hash of the transaction bytes. See https://github.com/tendermint/tendermint/issues/6539 for reference | +| `logs` | [Log](#ethermint.evm.v1.Log) | repeated | logs contains the transaction hash and the proto-compatible ethereum logs. | +| `ret` | [bytes](#bytes) | | returned data from evm function (result or data supplied with revert opcode) | +| `vm_error` | [string](#string) | | vm error is the error returned by vm execution | +| `gas_used` | [uint64](#uint64) | | gas consumed by the transaction | + + + + + + + + + + + + + + +### Msg +Msg defines the evm Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `EthereumTx` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthereumTx defines a method submitting Ethereum transactions. | | + + + + + + +

Top

+ +## ethermint/evm/v1/query.proto + + + + + +### EstimateGasResponse +EstimateGasResponse defines EstimateGas response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `gas` | [uint64](#uint64) | | the estimated gas | + + + + + + + + +### EthCallRequest +EthCallRequest defines EthCall request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `args` | [bytes](#bytes) | | same json format as the json rpc api. | +| `gas_cap` | [uint64](#uint64) | | the default gas cap to be used | + + + + + + + + +### QueryAccountRequest +QueryAccountRequest is the request type for the Query/Account RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the ethereum hex address to query the account for. | + + + + + + + + +### QueryAccountResponse +QueryAccountResponse is the response type for the Query/Account RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `balance` | [string](#string) | | balance is the balance of the EVM denomination. | +| `code_hash` | [string](#string) | | code hash is the hex-formatted code bytes from the EOA. | +| `nonce` | [uint64](#uint64) | | nonce is the account's sequence number. | + + + + + + + + +### QueryBalanceRequest +QueryBalanceRequest is the request type for the Query/Balance RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the ethereum hex address to query the balance for. | + + + + + + + + +### QueryBalanceResponse +QueryBalanceResponse is the response type for the Query/Balance RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `balance` | [string](#string) | | balance is the balance of the EVM denomination. | + + + + + + + + +### QueryCodeRequest +QueryCodeRequest is the request type for the Query/Code RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the ethereum hex address to query the code for. | + + + + + + + + +### QueryCodeResponse +QueryCodeResponse is the response type for the Query/Code RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code` | [bytes](#bytes) | | code represents the code bytes from an ethereum address. | + + + + + + + + +### QueryCosmosAccountRequest +QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the ethereum hex address to query the account for. | + + + + + + + + +### QueryCosmosAccountResponse +QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cosmos_address` | [string](#string) | | cosmos_address is the cosmos address of the account. | +| `sequence` | [uint64](#uint64) | | sequence is the account's sequence number. | +| `account_number` | [uint64](#uint64) | | account_number is the account numbert | + + + + + + + + +### QueryParamsRequest +QueryParamsRequest defines the request type for querying x/evm parameters. + + + + + + + + +### QueryParamsResponse +QueryParamsResponse defines the response type for querying x/evm parameters. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#ethermint.evm.v1.Params) | | params define the evm module parameters. | + + + + + + + + +### QueryStorageRequest +QueryStorageRequest is the request type for the Query/Storage RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the ethereum hex address to query the storage state for. | +| `key` | [string](#string) | | key defines the key of the storage state | + + + + + + + + +### QueryStorageResponse +QueryStorageResponse is the response type for the Query/Storage RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `value` | [string](#string) | | key defines the storage state value hash associated with the given key. | + + + + + + + + +### QueryTraceTxRequest +QueryTraceTxRequest defines TraceTx request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | | msgEthereumTx for the requested transaction | +| `tx_index` | [uint64](#uint64) | | transaction index | +| `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | + + + + + + + + +### QueryTraceTxResponse +QueryTraceTxResponse defines TraceTx response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | response serialized in bytes | + + + + + + + + +### QueryTxLogsRequest +QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [string](#string) | | hash is the ethereum transaction hex hash to query the logs for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryTxLogsResponse +QueryTxLogs is the response type for the Query/TxLogs RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `logs` | [Log](#ethermint.evm.v1.Log) | repeated | logs represents the ethereum logs generated from the given transaction. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryValidatorAccountRequest +QueryValidatorAccountRequest is the request type for the +Query/ValidatorAccount RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cons_address` | [string](#string) | | cons_address is the validator cons address to query the account for. | + + + + + + + + +### QueryValidatorAccountResponse +QueryValidatorAccountResponse is the response type for the +Query/ValidatorAccount RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `account_address` | [string](#string) | | account_address is the cosmos address of the account in bech32 format. | +| `sequence` | [uint64](#uint64) | | sequence is the account's sequence number. | +| `account_number` | [uint64](#uint64) | | account_number is the account number | + + + + + + + + + + + + + + +### Query +Query defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Account` | [QueryAccountRequest](#ethermint.evm.v1.QueryAccountRequest) | [QueryAccountResponse](#ethermint.evm.v1.QueryAccountResponse) | Account queries an Ethereum account. | GET|/ethermint/evm/v1/account/{address}| +| `CosmosAccount` | [QueryCosmosAccountRequest](#ethermint.evm.v1.QueryCosmosAccountRequest) | [QueryCosmosAccountResponse](#ethermint.evm.v1.QueryCosmosAccountResponse) | CosmosAccount queries an Ethereum account's Cosmos Address. | GET|/ethermint/evm/v1/cosmos_account/{address}| +| `ValidatorAccount` | [QueryValidatorAccountRequest](#ethermint.evm.v1.QueryValidatorAccountRequest) | [QueryValidatorAccountResponse](#ethermint.evm.v1.QueryValidatorAccountResponse) | ValidatorAccount queries an Ethereum account's from a validator consensus Address. | GET|/ethermint/evm/v1/validator_account/{cons_address}| +| `Balance` | [QueryBalanceRequest](#ethermint.evm.v1.QueryBalanceRequest) | [QueryBalanceResponse](#ethermint.evm.v1.QueryBalanceResponse) | Balance queries the balance of a the EVM denomination for a single EthAccount. | GET|/ethermint/evm/v1/balances/{address}| +| `Storage` | [QueryStorageRequest](#ethermint.evm.v1.QueryStorageRequest) | [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) | Storage queries the balance of all coins for a single account. | GET|/ethermint/evm/v1/storage/{address}/{key}| +| `Code` | [QueryCodeRequest](#ethermint.evm.v1.QueryCodeRequest) | [QueryCodeResponse](#ethermint.evm.v1.QueryCodeResponse) | Code queries the balance of all coins for a single account. | GET|/ethermint/evm/v1/codes/{address}| +| `Params` | [QueryParamsRequest](#ethermint.evm.v1.QueryParamsRequest) | [QueryParamsResponse](#ethermint.evm.v1.QueryParamsResponse) | Params queries the parameters of x/evm module. | GET|/ethermint/evm/v1/params| +| `EthCall` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthCall implements the `eth_call` rpc api | GET|/ethermint/evm/v1/eth_call| +| `EstimateGas` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) | EstimateGas implements the `eth_estimateGas` rpc api | GET|/ethermint/evm/v1/estimate_gas| +| `TraceTx` | [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) | [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_tx| + + + + + + +

Top

+ +## ethermint/feemarket/v1/feemarket.proto + + + + + +### Params +Params defines the EVM module parameters + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `no_base_fee` | [bool](#bool) | | no base fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) | +| `base_fee_change_denominator` | [uint32](#uint32) | | base fee change denominator bounds the amount the base fee can change between blocks. | +| `elasticity_multiplier` | [uint32](#uint32) | | elasticity multiplier bounds the maximum gas limit an EIP-1559 block may have. | +| `initial_base_fee` | [int64](#int64) | | initial base fee for EIP-1559 blocks. | +| `enable_height` | [int64](#int64) | | height at which the base fee calculation is enabled. | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/feemarket/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the feemarket module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#ethermint.feemarket.v1.Params) | | params defines all the paramaters of the module. | +| `base_fee` | [string](#string) | | base fee is the exported value from previous software version. Zero by default. | +| `block_gas` | [uint64](#uint64) | | block gas is the amount of gas used on the last block before the upgrade. Zero by default. | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/feemarket/v1/query.proto + + + + + +### QueryBaseFeeRequest +QueryBaseFeeRequest defines the request type for querying the EIP1559 base +fee. + + + + + + + + +### QueryBaseFeeResponse +BaseFeeResponse returns the EIP1559 base fee. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `base_fee` | [string](#string) | | | + + + + + + + + +### QueryBlockGasRequest +QueryBlockGasRequest defines the request type for querying the EIP1559 base +fee. + + + + + + + + +### QueryBlockGasResponse +QueryBlockGasResponse returns block gas used for a given height. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `gas` | [int64](#int64) | | | + + + + + + + + +### QueryParamsRequest +QueryParamsRequest defines the request type for querying x/evm parameters. + + + + + + + + +### QueryParamsResponse +QueryParamsResponse defines the response type for querying x/evm parameters. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#ethermint.feemarket.v1.Params) | | params define the evm module parameters. | + + + + + + + + + + + + + + +### Query +Query defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#ethermint.feemarket.v1.QueryParamsRequest) | [QueryParamsResponse](#ethermint.feemarket.v1.QueryParamsResponse) | Params queries the parameters of x/feemarket module. | GET|/feemarket/evm/v1/params| +| `BaseFee` | [QueryBaseFeeRequest](#ethermint.feemarket.v1.QueryBaseFeeRequest) | [QueryBaseFeeResponse](#ethermint.feemarket.v1.QueryBaseFeeResponse) | BaseFee queries the base fee of the parent block of the current block. | GET|/feemarket/evm/v1/base_fee| +| `BlockGas` | [QueryBlockGasRequest](#ethermint.feemarket.v1.QueryBlockGasRequest) | [QueryBlockGasResponse](#ethermint.feemarket.v1.QueryBlockGasResponse) | BlockGas queries the gas used at a given block height | GET|/feemarket/evm/v1/block_gas| + + + + + + +

Top

+ +## ethermint/types/v1/account.proto + + + + + +### EthAccount +EthAccount implements the authtypes.AccountI interface and embeds an +authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `base_account` | [cosmos.auth.v1beta1.BaseAccount](#cosmos.auth.v1beta1.BaseAccount) | | | +| `code_hash` | [string](#string) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ethermint/types/v1/web3.proto + + + + + +### ExtensionOptionsWeb3Tx + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `typed_data_chain_id` | [uint64](#uint64) | | typed data chain id used only in EIP712 Domain and should match Ethereum network ID in a Web3 provider (e.g. Metamask). | +| `fee_payer` | [string](#string) | | fee payer is an account address for the fee payer. It will be validated during EIP712 signature checking. | +| `fee_payer_sig` | [bytes](#bytes) | | fee payer sig is a signature data from the fee paying account, allows to perform fee delegation when using EIP712 Domain. | + + + + + + + + + + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/docs/protodoc-markdown.tmpl b/docs/protodoc-markdown.tmpl new file mode 100644 index 0000000000..28201837e5 --- /dev/null +++ b/docs/protodoc-markdown.tmpl @@ -0,0 +1,105 @@ + +# Protobuf Documentation + + +## Table of Contents +{{range .Files}} +{{$file_name := .Name}}- [{{.Name}}](#{{.Name}}) + {{- if .Messages }} + {{range .Messages}} - [{{.LongName}}](#{{.FullName}}) + {{end}} + {{- end -}} + {{- if .Enums }} + {{range .Enums}} - [{{.LongName}}](#{{.FullName}}) + {{end}} + {{- end -}} + {{- if .Extensions }} + {{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions) + {{end}} + {{- end -}} + {{- if .Services }} + {{range .Services}} - [{{.Name}}](#{{.FullName}}) + {{end}} + {{- end -}} +{{end}} +- [Scalar Value Types](#scalar-value-types) + +{{range .Files}} +{{$file_name := .Name}} + +

Top

+ +## {{.Name}} +{{.Description}} + +{{range .Messages}} + + +### {{.LongName}} +{{.Description}} + +{{if .HasFields}} +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +{{range .Fields -}} + | `{{.Name}}` | [{{.LongType}}](#{{.FullType}}) | {{.Label}} | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +{{end}} +{{end}} + +{{if .HasExtensions}} +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{range .Extensions -}} + | `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +{{end}} +{{end}} + +{{end}} + +{{range .Enums}} + + +### {{.LongName}} +{{.Description}} + +| Name | Number | Description | +| ---- | ------ | ----------- | +{{range .Values -}} + | {{.Name}} | {{.Number}} | {{nobr .Description}} | +{{end}} + +{{end}} + +{{if .HasExtensions}} + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{range .Extensions -}} + | `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | +{{end}} +{{end}} + +{{range .Services}} + + +### {{.Name}} +{{.Description}} + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +{{range .Methods -}} + | `{{.Name}}` | [{{.RequestLongType}}](#{{.RequestFullType}}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseFullType}}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | {{with (index .Options "google.api.http")}}{{range .Rules}}{{.Method}}|{{.Pattern}}{{end}}{{end}}| +{{end}} +{{end}} + +{{end}} + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +{{range .Scalars -}} + | {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} | +{{end}} diff --git a/go.mod b/go.mod index e9f9f376f7..a0a516b42a 100644 --- a/go.mod +++ b/go.mod @@ -31,10 +31,10 @@ require ( github.com/tendermint/tm-db v0.6.4 github.com/tyler-smith/go-bip39 v1.1.0 go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect - google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af + google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9 google.golang.org/grpc v1.41.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 8c30451925..309baa2f46 100644 --- a/go.sum +++ b/go.sum @@ -1329,8 +1329,9 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= @@ -1795,8 +1796,8 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af h1:aLMMXFYqw01RA6XJim5uaN+afqNNjc9P8HPAbnpnc5s= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9 h1:eF1wcrhdz56Vugf8qNX5dD93ItkrhothojQyHXqloe0= +google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index da184eb850..fbd533d043 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -7,8 +7,6 @@ option go_package = "github.com/tharsis/ethermint/x/evm/types"; // Params defines the EVM module parameters message Params { - option (gogoproto.goproto_stringer) = false; - // evm denom represents the token denomination used to run the EVM state // transitions. string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ]; diff --git a/proto/ethermint/evm/v1/genesis.proto b/proto/ethermint/evm/v1/genesis.proto index 2e0343f176..adeacf943c 100644 --- a/proto/ethermint/evm/v1/genesis.proto +++ b/proto/ethermint/evm/v1/genesis.proto @@ -9,9 +9,9 @@ option go_package = "github.com/tharsis/ethermint/x/evm/types"; // GenesisState defines the evm module's genesis state. message GenesisState { // accounts is an array containing the ethereum genesis accounts. - repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false]; + repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ]; // params defines all the paramaters of the module. - Params params = 3 [(gogoproto.nullable) = false]; + Params params = 2 [(gogoproto.nullable) = false]; } // GenesisAccount defines an account to be initialized in the genesis state. @@ -23,5 +23,6 @@ message GenesisAccount { // code defines the hex bytes of the account code. string code = 2; // storage defines the set of state key values for the account. - repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"]; + repeated State storage = 3 + [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage" ]; } diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 57d547aa6a..8c75677cc2 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -208,9 +208,6 @@ message QueryParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } -// QueryStaticCallRequest defines static call response -message QueryStaticCallResponse { bytes data = 1; } - // EthCallRequest defines EthCall request message EthCallRequest { // same json format as the json rpc api. diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 8e76e13c00..7f8e118b07 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -231,8 +231,10 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms return nil, status.Error(codes.Internal, err.Error()) } + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) tracer := types.NewTracer(k.tracer, msg, ethCfg, k.Ctx().BlockHeight(), k.debug) - evm := k.NewEVM(msg, ethCfg, params, coinbase, tracer) + + evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) // pass true means execute in query mode, which don't do actual gas refund. res, err := k.ApplyMessage(evm, msg, ethCfg, true) @@ -299,8 +301,10 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type return nil, status.Error(codes.Internal, err.Error()) } + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + // Create a helper to check if a gas allowance results in an executable transaction - executable := func(gas uint64) (bool, *types.MsgEthereumTxResponse, error) { + executable := func(gas uint64) (vmerror bool, rsp *types.MsgEthereumTxResponse, err error) { args.Gas = (*hexutil.Uint64)(&gas) // Reset to the initial context @@ -309,9 +313,11 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type msg := args.ToMessage(req.GasCap) tracer := types.NewTracer(k.tracer, msg, ethCfg, k.Ctx().BlockHeight(), k.debug) - evm := k.NewEVM(msg, ethCfg, params, coinbase, tracer) + + evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) + // pass true means execute in query mode, which don't do actual gas refund. - rsp, err := k.ApplyMessage(evm, msg, ethCfg, true) + rsp, err = k.ApplyMessage(evm, msg, ethCfg, true) k.ctxStack.RevertAll() @@ -370,8 +376,9 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) tx := req.Msg.AsTransaction() + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) - result, err := k.traceTx(ctx, coinbase, signer, req.TxIndex, params, ethCfg, tx, req.TraceConfig) + result, err := k.traceTx(ctx, coinbase, signer, req.TxIndex, params, ethCfg, tx, baseFee, req.TraceConfig) if err != nil { return nil, err } @@ -394,6 +401,7 @@ func (k *Keeper) traceTx( params types.Params, ethCfg *ethparams.ChainConfig, tx *ethtypes.Transaction, + baseFee *big.Int, traceConfig *types.TraceConfig, ) (*interface{}, error) { // Assemble the structured logger or the JavaScript tracer @@ -407,6 +415,8 @@ func (k *Keeper) traceTx( return nil, status.Error(codes.Internal, err.Error()) } + txHash := tx.Hash() + switch { case traceConfig != nil && traceConfig.Tracer != "": timeout := defaultTraceTimeout @@ -422,8 +432,7 @@ func (k *Keeper) traceTx( txContext := core.NewEVMTxContext(msg) // Construct the JavaScript tracer to execute with - tracer, err = tracers.New(traceConfig.Tracer, txContext) - if err != nil { + if tracer, err = tracers.New(traceConfig.Tracer, txContext); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -450,9 +459,9 @@ func (k *Keeper) traceTx( tracer = types.NewTracer(types.TracerStruct, msg, ethCfg, ctx.BlockHeight(), true) } - evm := k.NewEVM(msg, ethCfg, params, coinbase, tracer) + evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) - k.SetTxHashTransient(tx.Hash()) + k.SetTxHashTransient(txHash) k.SetTxIndexTransient(txIndex) res, err := k.ApplyMessage(evm, msg, ethCfg, true) diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index cbe5d94bd3..1ef5fddb73 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -39,6 +39,8 @@ type Keeper struct { bankKeeper types.BankKeeper // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper + // fetch EIP1559 base fee and parameters + feeMarketKeeper types.FeeMarketKeeper // Manage the initial context and cache context stack for accessing the store, // emit events and log info. @@ -67,6 +69,7 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, + fmk types.FeeMarketKeeper, tracer string, debug bool, ) *Keeper { // ensure evm module account is set @@ -81,16 +84,17 @@ func NewKeeper( // NOTE: we pass in the parameter space to the CommitStateDB in order to use custom denominations for the EVM operations return &Keeper{ - cdc: cdc, - paramSpace: paramSpace, - accountKeeper: ak, - bankKeeper: bankKeeper, - stakingKeeper: sk, - storeKey: storeKey, - transientKey: transientKey, - tracer: tracer, - debug: debug, - stateErr: nil, + cdc: cdc, + paramSpace: paramSpace, + accountKeeper: ak, + bankKeeper: bankKeeper, + stakingKeeper: sk, + feeMarketKeeper: fmk, + storeKey: storeKey, + transientKey: transientKey, + tracer: tracer, + debug: debug, + stateErr: nil, } } diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index bece935210..cec6284310 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -30,6 +30,7 @@ func (k *Keeper) NewEVM( config *params.ChainConfig, params types.Params, coinbase common.Address, + baseFee *big.Int, tracer vm.Tracer, ) *vm.EVM { blockCtx := vm.BlockContext{ @@ -41,6 +42,7 @@ func (k *Keeper) NewEVM( BlockNumber: big.NewInt(k.Ctx().BlockHeight()), Time: big.NewInt(k.Ctx().BlockHeader().Time.Unix()), Difficulty: big.NewInt(0), // unused. Only required in PoW context + // BaseFee: baseFee, } txCtx := core.NewEVMTxContext(msg) @@ -52,11 +54,14 @@ func (k *Keeper) NewEVM( // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. func (k Keeper) VMConfig(msg core.Message, params types.Params, tracer vm.Tracer) vm.Config { + // fmParams := k.feeMarketKeeper.GetParams(k.Ctx()) + return vm.Config{ Debug: k.debug, Tracer: tracer, NoRecursion: false, // TODO: consider disabling recursion though params - ExtraEips: params.EIPs(), + // NoBaseFee: fmParams.NoBaseFee, + ExtraEips: params.EIPs(), } } @@ -154,6 +159,8 @@ func (k *Keeper) ApplyTransaction(tx *ethtypes.Transaction) (*types.MsgEthereumT // get the latest signer according to the chain rules from the config signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + msg, err := tx.AsMessage(signer) if err != nil { return nil, stacktrace.Propagate(err, "failed to return ethereum transaction as core message") @@ -167,7 +174,7 @@ func (k *Keeper) ApplyTransaction(tx *ethtypes.Transaction) (*types.MsgEthereumT // create an ethereum EVM instance and run the message tracer := types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight(), k.debug) - evm := k.NewEVM(msg, ethCfg, params, coinbase, tracer) + evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) txHash := tx.Hash() @@ -263,6 +270,7 @@ func (k *Keeper) ApplyMessage(evm *vm.EVM, msg core.Message, cfg *params.ChainCo sender := vm.AccountRef(msg.From()) contractCreation := msg.To() == nil + // isLondon := cfg.IsLondon(evm.Context.BlockNumber) intrinsicGas, err := k.GetEthIntrinsicGas(msg, cfg, contractCreation) if err != nil { @@ -290,6 +298,13 @@ func (k *Keeper) ApplyMessage(evm *vm.EVM, msg core.Message, cfg *params.ChainCo refundQuotient := uint64(2) + // refundQuotient := params.RefundQuotient + + // // After EIP-3529: refunds are capped to gasUsed / 5 + // if isLondon { + // refundQuotient = params.RefundQuotientEIP3529 + // } + if query { // gRPC query handlers don't go through the AnteHandler to deduct the gas fee from the sender or have access historical state. // We don't refund gas to the sender. @@ -340,7 +355,9 @@ func (k *Keeper) ApplyNativeMessage(msg core.Message) (*types.MsgEthereumTxRespo return nil, stacktrace.Propagate(err, "failed to obtain coinbase address") } - evm := k.NewEVM(msg, ethCfg, params, coinbase, nil) + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + + evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, nil) ret, err := k.ApplyMessage(evm, msg, ethCfg, true) if err != nil { diff --git a/x/evm/keeper/state_transition_benchmark_test.go b/x/evm/keeper/state_transition_benchmark_test.go index 54ac09c89d..d464e64263 100644 --- a/x/evm/keeper/state_transition_benchmark_test.go +++ b/x/evm/keeper/state_transition_benchmark_test.go @@ -91,7 +91,7 @@ func newNativeMessage( return nil, err } - m, err := msg.AsMessage(msgSigner) + m, err := msg.AsMessage(msgSigner) // TODO: add DynamicFeeTx if err != nil { return nil, err } diff --git a/x/evm/keeper/utils.go b/x/evm/keeper/utils.go index 2c9ef9bd20..ff4f0865a0 100644 --- a/x/evm/keeper/utils.go +++ b/x/evm/keeper/utils.go @@ -1,6 +1,8 @@ package keeper import ( + "math/big" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -8,6 +10,7 @@ import ( evmtypes "github.com/tharsis/ethermint/x/evm/types" + cmath "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" ) @@ -18,8 +21,7 @@ func (k Keeper) DeductTxCostsFromUserBalance( msgEthTx evmtypes.MsgEthereumTx, txData evmtypes.TxData, denom string, - homestead bool, - istanbul bool, + homestead, istanbul, london bool, ) (sdk.Coins, error) { isContractCreation := txData.GetTo() == nil @@ -53,8 +55,19 @@ func (k Keeper) DeductTxCostsFromUserBalance( ) } - // calculate the fees paid to validators based on gas limit and price - feeAmt := txData.Fee() // fee = gas limit * gas price + // calculate the fees paid to validators based on the effective tip and price + effectiveTip := txData.GetGasPrice() + + feeMktParams := k.feeMarketKeeper.GetParams(ctx) + + if london && !feeMktParams.NoBaseFee { + // TODO: add to if statement above txData.TxType() == ethtypes.DynamicFeeTxType + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + effectiveTip = cmath.BigMin(txData.GetGasTipCap(), new(big.Int).Sub(txData.GetGasFeeCap(), baseFee)) + } + + gasUsed := new(big.Int).SetUint64(txData.GetGas()) + feeAmt := new(big.Int).Mul(gasUsed, effectiveTip) fees := sdk.Coins{sdk.NewCoin(denom, sdk.NewIntFromBigInt(feeAmt))} diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index d8cc4b5d43..c2e2252680 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -242,6 +242,7 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() { evmtypes.DefaultEVMDenom, false, false, + false, // london ) if tc.expectPass { diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 37135e60a0..242e8b96e2 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -39,8 +39,9 @@ type Params struct { ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{0} } @@ -653,97 +654,96 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } var fileDescriptor_d21ecc92c8c8583e = []byte{ - // 1427 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcb, 0x6e, 0x1b, 0xb7, - 0x1a, 0xb6, 0x2d, 0xd9, 0x1e, 0x51, 0x57, 0xd3, 0x8e, 0x8f, 0x92, 0xe0, 0x78, 0x7c, 0x66, 0x71, - 0xe0, 0x02, 0x89, 0x15, 0x3b, 0x30, 0x6a, 0x24, 0xe8, 0xc2, 0x63, 0x3b, 0xa9, 0xd3, 0xb4, 0x35, - 0x68, 0x17, 0x05, 0x0a, 0x14, 0x03, 0x6a, 0x86, 0x19, 0x4d, 0x3d, 0x33, 0x14, 0x48, 0x8e, 0x2a, - 0x15, 0x7d, 0x80, 0x02, 0xdd, 0x74, 0xd9, 0x45, 0x17, 0x7d, 0x89, 0xbe, 0x43, 0xd0, 0x55, 0x96, - 0x45, 0x0b, 0x0c, 0x0a, 0x65, 0xa7, 0xa5, 0x9e, 0xa0, 0x18, 0x92, 0xba, 0x3a, 0x68, 0x6b, 0xaf, - 0xc4, 0xef, 0xbf, 0x7c, 0x1f, 0xf9, 0xf3, 0x1f, 0x92, 0x02, 0xf7, 0x88, 0x68, 0x11, 0x16, 0x05, - 0xb1, 0x68, 0x90, 0x4e, 0xd4, 0xe8, 0xec, 0x65, 0x3f, 0xbb, 0x6d, 0x46, 0x05, 0x85, 0xb5, 0xb1, - 0x6f, 0x37, 0x33, 0x76,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 0xfb, 0x77, 0xae, - 0xdf, 0xa9, 0x2f, 0xa9, 0x8f, 0x64, 0x88, 0xf5, 0xeb, 0x12, 0xc8, 0xbd, 0xa4, 0x3e, 0xac, 0x83, - 0x55, 0xec, 0x79, 0x8c, 0x70, 0xae, 0x99, 0x46, 0x10, 0x6e, 0x82, 0x15, 0x41, 0xdb, 0x81, 0xab, - 0xe8, 0x0a, 0x48, 0xa3, 0x4c, 0xd8, 0xc3, 0x02, 0xcb, 0x5b, 0xa5, 0x84, 0xe4, 0x18, 0xee, 0x83, - 0x92, 0x5c, 0x99, 0x13, 0x27, 0x51, 0x93, 0x30, 0x79, 0x39, 0xe4, 0xed, 0xea, 0x20, 0x35, 0x8b, - 0xd2, 0xfe, 0x89, 0x34, 0xa3, 0x69, 0x00, 0x1f, 0x80, 0x55, 0xd1, 0x9d, 0x3e, 0xd7, 0xd7, 0x07, - 0xa9, 0x59, 0x15, 0x93, 0x65, 0x66, 0xc7, 0x36, 0x5a, 0x11, 0x5d, 0x79, 0x7c, 0x37, 0x80, 0x21, - 0xba, 0x4e, 0x10, 0x7b, 0xa4, 0x2b, 0x8f, 0xee, 0xbc, 0xbd, 0x31, 0x48, 0xcd, 0xda, 0x54, 0xf8, - 0x59, 0xe6, 0x43, 0xab, 0xa2, 0x2b, 0x07, 0xf0, 0x01, 0x00, 0x6a, 0x4a, 0x52, 0x41, 0x1d, 0xbc, - 0xe5, 0x41, 0x6a, 0x16, 0xa4, 0x55, 0x72, 0x4f, 0x86, 0xd0, 0x02, 0xcb, 0x8a, 0xdb, 0x90, 0xdc, - 0xa5, 0x41, 0x6a, 0x1a, 0x21, 0xf5, 0x15, 0xa7, 0x72, 0x65, 0xa5, 0x62, 0x24, 0xa2, 0x1d, 0xe2, - 0xc9, 0xb3, 0xcd, 0x40, 0x23, 0x68, 0x7d, 0xbf, 0x04, 0x8c, 0xcb, 0x2e, 0x22, 0x3c, 0x09, 0x05, - 0x7c, 0x06, 0x6a, 0x2e, 0x8d, 0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x1f, 0xa8, 0xc7, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xd8, 0x40, 0x2b, 0x86, - 0x0d, 0x00, 0x00, + // 1421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0xdb, 0xb6, + 0x1b, 0x4f, 0x62, 0x27, 0x91, 0xe9, 0xd7, 0x30, 0x69, 0xfe, 0x6e, 0x8b, 0x7f, 0x94, 0xe9, 0x30, + 0x64, 0x40, 0x1b, 0x37, 0x29, 0x82, 0x05, 0x2d, 0x76, 0x88, 0x92, 0xb4, 0x4b, 0xd7, 0x6d, 0x01, + 0x93, 0x61, 0xc0, 0x80, 0x41, 0xa0, 0x25, 0x56, 0xd6, 0x22, 0x89, 0x06, 0x49, 0x79, 0xf6, 0xb0, + 0x0f, 0x30, 0x60, 0x97, 0x7d, 0x80, 0x1d, 0xf6, 0x25, 0xf6, 0x1d, 0x8a, 0x9d, 0x7a, 0x19, 0x30, + 0xec, 0x20, 0x0c, 0xee, 0xcd, 0x47, 0x7f, 0x82, 0x41, 0x24, 0xfd, 0x9a, 0x62, 0x5b, 0x72, 0x32, + 0x7f, 0xcf, 0xcb, 0xef, 0x47, 0x3e, 0x7c, 0x48, 0xca, 0xe0, 0x1e, 0x11, 0x2d, 0xc2, 0xa2, 0x20, + 0x16, 0x0d, 0xd2, 0x89, 0x1a, 0x9d, 0xbd, 0xec, 0x67, 0xb7, 0xcd, 0xa8, 0xa0, 0xb0, 0x36, 0xf6, + 0xed, 0x66, 0xc6, 0xce, 0xde, 0xbd, 0x0d, 0x9f, 0xfa, 0x54, 0x3a, 0x1b, 0xd9, 0x48, 0xc5, 0x59, + 0xbf, 0x2f, 0x81, 0x95, 0x73, 0xcc, 0x70, 0xc4, 0xe1, 0x1e, 0x28, 0x90, 0x4e, 0xe4, 0x78, 0x24, + 0xa6, 0x51, 0x7d,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, 0xd2, 0x28, 0x13, 0xf6, 0xb0, + 0xc0, 0xf2, 0x55, 0x29, 0x21, 0x39, 0x86, 0xfb, 0xa0, 0x24, 0x57, 0xe6, 0xc4, 0x49, 0xd4, 0x24, + 0x4c, 0x3e, 0x0e, 0x79, 0xbb, 0x3a, 0x48, 0xcd, 0xa2, 0xb4, 0x7f, 0x26, 0xcd, 0x68, 0x1a, 0xc0, + 0x07, 0x60, 0x55, 0x74, 0xa7, 0xef, 0xf5, 0xf5, 0x41, 0x6a, 0x56, 0xc5, 0x64, 0x99, 0xd9, 0xb5, + 0x8d, 0x56, 0x44, 0x57, 0x5e, 0xdf, 0x0d, 0x60, 0x88, 0xae, 0x13, 0xc4, 0x1e, 0xe9, 0xca, 0xab, + 0x3b, 0x6f, 0x6f, 0x0c, 0x52, 0xb3, 0x36, 0x15, 0x7e, 0x96, 0xf9, 0xd0, 0xaa, 0xe8, 0xca, 0x01, + 0x7c, 0x00, 0x80, 0x9a, 0x92, 0x54, 0x50, 0x17, 0x6f, 0x79, 0x90, 0x9a, 0x05, 0x69, 0x95, 0xdc, + 0x93, 0x21, 0xb4, 0xc0, 0xb2, 0xe2, 0x36, 0x24, 0x77, 0x69, 0x90, 0x9a, 0x46, 0x48, 0x7d, 0xc5, + 0xa9, 0x5c, 0x59, 0xa9, 0x18, 0x89, 0x68, 0x87, 0x78, 0xf2, 0x6e, 0x33, 0xd0, 0x08, 0x5a, 0x3f, + 0x2e, 0x01, 0xe3, 0xb2, 0x8b, 0x08, 0x4f, 0x42, 0x01, 0x9f, 0x81, 0x9a, 0x4b, 0x63, 0xc1, 0xb0, + 0x2b, 0x9c, 0x99, 0xd2, 0xda, 0xf7, 0x27, 0xf7, 0xcc, 0x7c, 0x84, 0x85, 0xaa, 0x23, 0xd3, 0x91, + 0xae, 0xff, 0x06, 0x58, 0x6e, 0x86, 0x94, 0x46, 0xb2, 0x13, 0x4a, 0x48, 0x01, 0x88, 0x64, 0xd5, + 0xe4, 0x2e, 0xe7, 0xe4, 0x37, 0xd3, 0x7b, 0xd7, 0x77, 0x79, 0xae, 0x55, 0xec, 0x4d, 0xfd, 0xdd, + 0x54, 0x51, 0xda, 0x3a, 0xdf, 0xca, 0x6a, 0x2b, 0x5b, 0xa9, 0x06, 0x72, 0x8c, 0x08, 0xb9, 0x69, + 0x25, 0x94, 0x0d, 0xe1, 0x3d, 0x60, 0x30, 0xd2, 0x21, 0x4c, 0x10, 0x4f, 0x6e, 0x8e, 0x81, 0xc6, + 0x18, 0xde, 0x05, 0x86, 0x8f, 0xb9, 0x93, 0x70, 0xe2, 0xa9, 0x9d, 0x40, 0xab, 0x3e, 0xe6, 0x5f, + 0x70, 0xe2, 0x3d, 0xc9, 0xff, 0xf0, 0x8b, 0xb9, 0x60, 0x61, 0x50, 0x3c, 0x72, 0x5d, 0xc2, 0xf9, + 0x65, 0xd2, 0x0e, 0xc9, 0x3f, 0x74, 0xd8, 0x3e, 0x28, 0x71, 0x41, 0x19, 0xf6, 0x89, 0x73, 0x45, + 0x7a, 0xba, 0xcf, 0x54, 0xd7, 0x68, 0xfb, 0x27, 0xa4, 0xc7, 0xd1, 0x34, 0xd0, 0x12, 0xbf, 0xe6, + 0x40, 0xf1, 0x92, 0x61, 0x97, 0xe8, 0xef, 0xbb, 0xac, 0x57, 0x33, 0xc8, 0xb4, 0x84, 0x46, 0x99, + 0xb6, 0x08, 0x22, 0x42, 0x13, 0xa1, 0xcf, 0xd3, 0x08, 0x66, 0x19, 0x8c, 0x90, 0x2e, 0x71, 0x65, + 0x19, 0xf3, 0x48, 0x23, 0x78, 0x08, 0x2a, 0x5e, 0xc0, 0xe5, 0x87, 0x6f, 0x44, 0x22, 0xca, 0x7a, + 0xb2, 0x2c, 0x86, 0xbd, 0x36, 0x48, 0xcd, 0xb2, 0xf6, 0x7c, 0x2a, 0x1d, 0x68, 0x16, 0xc2, 0x03, + 0x30, 0x32, 0x38, 0x5c, 0x60, 0xf7, 0x4a, 0x15, 0xce, 0xae, 0x0d, 0x52, 0xb3, 0xa4, 0x1d, 0x17, + 0x99, 0x1d, 0xcd, 0x20, 0xf8, 0x14, 0x54, 0x27, 0x69, 0x72, 0x9d, 0xb2, 0xaa, 0x86, 0x0d, 0x07, + 0xa9, 0x59, 0x19, 0x87, 0x4a, 0x0f, 0x9a, 0xc3, 0xf0, 0x14, 0xac, 0x8f, 0x92, 0x19, 0x11, 0x09, + 0x8b, 0x1d, 0x79, 0x34, 0x57, 0x25, 0xc1, 0x9d, 0x41, 0x6a, 0xae, 0x69, 0x37, 0x92, 0xde, 0x13, + 0x2c, 0x30, 0xba, 0x6e, 0xca, 0x5a, 0xcd, 0x23, 0xcd, 0xc4, 0x97, 0xdd, 0x6f, 0x20, 0x05, 0x32, + 0x6b, 0x18, 0x44, 0x81, 0x90, 0xdd, 0xbe, 0x8c, 0x14, 0x80, 0x4f, 0x41, 0x81, 0x76, 0x08, 0x63, + 0x81, 0x47, 0xb8, 0x7c, 0x69, 0xff, 0xed, 0xb3, 0x1d, 0x4d, 0xe2, 0x6d, 0xfb, 0x75, 0x7f, 0x6b, + 0xf1, 0x4d, 0x7f, 0x6b, 0xf1, 0xaf, 0xfe, 0xd6, 0xe2, 0x4f, 0x6f, 0xb7, 0x16, 0xde, 0xbc, 0xdd, + 0x5a, 0xf8, 0xe3, 0xed, 0xd6, 0xc2, 0x57, 0x3b, 0x53, 0xd7, 0xb0, 0x68, 0x61, 0xc6, 0x03, 0xde, + 0x98, 0xfc, 0xc1, 0xea, 0xca, 0xbf, 0x58, 0xf2, 0x32, 0x6e, 0xae, 0xc8, 0xbf, 0x4e, 0x8f, 0xff, + 0x0e, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x84, 0x30, 0xb7, 0x80, 0x0d, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/evm/types/genesis.pb.go b/x/evm/types/genesis.pb.go index f4515a5835..c3b664160c 100644 --- a/x/evm/types/genesis.pb.go +++ b/x/evm/types/genesis.pb.go @@ -28,7 +28,7 @@ type GenesisState struct { // accounts is an array containing the ethereum genesis accounts. Accounts []GenesisAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` // params defines all the paramaters of the module. - Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -152,26 +152,26 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescriptor_9bcdec50cc9d156d) } var fileDescriptor_9bcdec50cc9d156d = []byte{ - // 299 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x50, 0xbd, 0x4e, 0xeb, 0x30, - 0x14, 0x8e, 0x6f, 0xab, 0xf6, 0xe2, 0x22, 0x40, 0x16, 0x12, 0x56, 0x07, 0xb7, 0xea, 0x94, 0xc9, - 0x56, 0x8b, 0xc4, 0x8e, 0x17, 0x56, 0x94, 0x6e, 0x6c, 0x6e, 0x62, 0x25, 0x19, 0x12, 0x47, 0xb6, - 0x1b, 0xc1, 0xca, 0xc8, 0xc4, 0x73, 0xf0, 0x24, 0x1d, 0x3b, 0x32, 0x01, 0x4a, 0x5e, 0x04, 0xc5, - 0x49, 0x8b, 0x20, 0xdb, 0xb1, 0xbf, 0xbf, 0x73, 0x3e, 0x48, 0xa4, 0x4d, 0xa4, 0xce, 0xd2, 0xdc, - 0x32, 0x59, 0x66, 0xac, 0x5c, 0xb2, 0x58, 0xe6, 0xd2, 0xa4, 0x86, 0x16, 0x5a, 0x59, 0x85, 0x2e, - 0x8e, 0x38, 0x95, 0x65, 0x46, 0xcb, 0xe5, 0xf4, 0x32, 0x56, 0xb1, 0x72, 0x20, 0x6b, 0xa6, 0x96, - 0x37, 0x9d, 0xf6, 0x7c, 0x1a, 0xba, 0xc3, 0x16, 0x2f, 0x00, 0x9e, 0xde, 0xb5, 0xae, 0x6b, 0x2b, - 0xac, 0x44, 0x1c, 0xfe, 0x17, 0x61, 0xa8, 0xb6, 0xb9, 0x35, 0x18, 0xcc, 0x07, 0xfe, 0x64, 0x35, - 0xa7, 0x7f, 0x73, 0x68, 0xa7, 0xb8, 0x6d, 0x89, 0x7c, 0xb8, 0xfb, 0x98, 0x79, 0xc1, 0x51, 0x87, - 0x6e, 0xe0, 0xa8, 0x10, 0x5a, 0x64, 0x06, 0x0f, 0xe6, 0xc0, 0x9f, 0xac, 0x70, 0xdf, 0xe1, 0xde, - 0xe1, 0x9d, 0xb2, 0x63, 0x2f, 0x9e, 0x01, 0x3c, 0xfb, 0x6d, 0x8d, 0x30, 0x1c, 0x8b, 0x28, 0xd2, - 0xd2, 0x34, 0xdb, 0x00, 0xff, 0x24, 0x38, 0x3c, 0x11, 0x82, 0xc3, 0x50, 0x45, 0x12, 0xff, 0x73, - 0xdf, 0x6e, 0x46, 0x1c, 0x8e, 0x8d, 0x55, 0x5a, 0xc4, 0x12, 0x0f, 0xdc, 0xee, 0x57, 0xfd, 0x64, - 0x77, 0x26, 0x3f, 0x6f, 0x82, 0xdf, 0x3e, 0x67, 0xe3, 0x75, 0xcb, 0x0f, 0x0e, 0x42, 0xce, 0x77, - 0x15, 0x01, 0xfb, 0x8a, 0x80, 0xaf, 0x8a, 0x80, 0xd7, 0x9a, 0x78, 0xfb, 0x9a, 0x78, 0xef, 0x35, - 0xf1, 0x1e, 0xfc, 0x38, 0xb5, 0xc9, 0x76, 0x43, 0x43, 0x95, 0x31, 0x9b, 0x08, 0x6d, 0x52, 0xc3, - 0x7e, 0xaa, 0x7d, 0x74, 0xe5, 0xda, 0xa7, 0x42, 0x9a, 0xcd, 0xc8, 0x95, 0x7b, 0xfd, 0x1d, 0x00, - 0x00, 0xff, 0xff, 0x87, 0x96, 0x85, 0x5d, 0xc2, 0x01, 0x00, 0x00, + // 300 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0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xc7, 0x3c, 0x8a, + 0x94, 0xd0, 0xcd, 0x36, 0xc0, 0x9f, 0x04, 0x87, 0x27, 0x42, 0x70, 0x18, 0xca, 0x48, 0xd8, 0x8a, + 0x49, 0x60, 0x67, 0xc4, 0xe0, 0x58, 0x1b, 0xa9, 0x78, 0x2c, 0xdc, 0x81, 0xdd, 0xfd, 0xba, 0xdf, + 0x6c, 0xbf, 0xc9, 0x2e, 0x9a, 0xe2, 0xf7, 0xaf, 0xf9, 0x78, 0xdd, 0xf2, 0xc1, 0xc1, 0xc8, 0xd8, + 0xae, 0xc2, 0x60, 0x5f, 0x61, 0xf0, 0x5d, 0x61, 0xf0, 0x56, 0x63, 0x67, 0x5f, 0x63, 0xe7, 0xa3, + 0xc6, 0xce, 0xa3, 0x1f, 0xa7, 0x26, 0xd9, 0x6e, 0x48, 0x28, 0x33, 0x6a, 0x12, 0xae, 0x74, 0xaa, + 0xe9, 0xef, 0x69, 0x9f, 0xec, 0x71, 0xcd, 0x73, 0x21, 0xf4, 0x66, 0x64, 0x8f, 0x7b, 0xf3, 0x13, + 0x00, 0x00, 0xff, 0xff, 0x34, 0xd7, 0x33, 0xa0, 0xc2, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -203,7 +203,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 if len(m.Accounts) > 0 { for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { { @@ -392,7 +392,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 4efd21426f..5588577e49 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -1,9 +1,14 @@ package types import ( + "math/big" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" + "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" ) @@ -37,6 +42,12 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } +// FeeMarketKeeper +type FeeMarketKeeper interface { + GetBaseFee(ctx sdk.Context) *big.Int + GetParams(ctx sdk.Context) feemarkettypes.Params +} + // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 5c4e2dfb76..9e4d87d749 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -3,8 +3,6 @@ package types import ( "fmt" - yaml "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/ethereum/go-ethereum/core/vm" @@ -24,12 +22,11 @@ var ( ParamStoreKeyEnableCall = []byte("EnableCall") ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs") ParamStoreKeyChainConfig = []byte("ChainConfig") - ParamStoreKeyNoBaseFee = []byte("NoBaseFee") // AvailableExtraEIPs define the list of all EIPs that can be enabled by the EVM interpreter. These EIPs are applied in // order and can override the instruction sets from the latest hard fork enabled by the ChainConfig. For more info // check: https://github.com/ethereum/go-ethereum/blob/v1.10.4/core/vm/interpreter.go#L122 - AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929} + AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529} ) // ParamKeyTable returns the parameter key table. @@ -60,12 +57,6 @@ func DefaultParams() Params { } } -// String implements the fmt.Stringer interface -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - // ParamSetPairs returns the parameter set pairs. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 2063ed1737..13f128abd4 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -781,51 +781,6 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QueryStaticCallRequest defines static call response -type QueryStaticCallResponse struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *QueryStaticCallResponse) Reset() { *m = QueryStaticCallResponse{} } -func (m *QueryStaticCallResponse) String() string { return proto.CompactTextString(m) } -func (*QueryStaticCallResponse) ProtoMessage() {} -func (*QueryStaticCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{16} -} -func (m *QueryStaticCallResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryStaticCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryStaticCallResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryStaticCallResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStaticCallResponse.Merge(m, src) -} -func (m *QueryStaticCallResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryStaticCallResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStaticCallResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryStaticCallResponse proto.InternalMessageInfo - -func (m *QueryStaticCallResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - // EthCallRequest defines EthCall request type EthCallRequest struct { // same json format as the json rpc api. @@ -838,7 +793,7 @@ func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } func (m *EthCallRequest) String() string { return proto.CompactTextString(m) } func (*EthCallRequest) ProtoMessage() {} func (*EthCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{17} + return fileDescriptor_e15a877459347994, []int{16} } func (m *EthCallRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -891,7 +846,7 @@ func (m *EstimateGasResponse) Reset() { *m = EstimateGasResponse{} } func (m *EstimateGasResponse) String() string { return proto.CompactTextString(m) } func (*EstimateGasResponse) ProtoMessage() {} func (*EstimateGasResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{18} + return fileDescriptor_e15a877459347994, []int{17} } func (m *EstimateGasResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -941,7 +896,7 @@ func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } func (m *QueryTraceTxRequest) String() string { return proto.CompactTextString(m) } func (*QueryTraceTxRequest) ProtoMessage() {} func (*QueryTraceTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{19} + return fileDescriptor_e15a877459347994, []int{18} } func (m *QueryTraceTxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1001,7 +956,7 @@ func (m *QueryTraceTxResponse) Reset() { *m = QueryTraceTxResponse{} } func (m *QueryTraceTxResponse) String() string { return proto.CompactTextString(m) } func (*QueryTraceTxResponse) ProtoMessage() {} func (*QueryTraceTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{20} + return fileDescriptor_e15a877459347994, []int{19} } func (m *QueryTraceTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1054,7 +1009,6 @@ func init() { proto.RegisterType((*QueryTxLogsResponse)(nil), "ethermint.evm.v1.QueryTxLogsResponse") proto.RegisterType((*QueryParamsRequest)(nil), "ethermint.evm.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ethermint.evm.v1.QueryParamsResponse") - proto.RegisterType((*QueryStaticCallResponse)(nil), "ethermint.evm.v1.QueryStaticCallResponse") proto.RegisterType((*EthCallRequest)(nil), "ethermint.evm.v1.EthCallRequest") proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse") proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") @@ -1064,79 +1018,78 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1138 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x55, - 0x17, 0xf6, 0x24, 0x4e, 0x9c, 0x1e, 0x27, 0x7d, 0xf3, 0xde, 0x06, 0x35, 0x19, 0x52, 0x27, 0x9d, - 0x34, 0xdf, 0x61, 0x06, 0x1b, 0x54, 0x89, 0x4a, 0x08, 0x92, 0x28, 0x14, 0xd4, 0x16, 0x15, 0x13, - 0xb1, 0x60, 0x63, 0x5d, 0x8f, 0x2f, 0xe3, 0x51, 0xed, 0xb9, 0xee, 0xdc, 0x6b, 0xe3, 0xb4, 0x84, - 0x05, 0x12, 0x15, 0xa8, 0x1b, 0x24, 0xf6, 0xa8, 0x1b, 0xd6, 0xfc, 0x8d, 0x2e, 0x2b, 0xb1, 0x61, - 0x85, 0x50, 0x82, 0x10, 0x3f, 0x03, 0xdd, 0x8f, 0xb1, 0x3d, 0x1e, 0x4f, 0x9d, 0x22, 0x76, 0xf7, - 0xe3, 0x9c, 0xf3, 0x3c, 0xe7, 0x9e, 0x33, 0xcf, 0xd1, 0xc0, 0x32, 0xe1, 0x75, 0x12, 0x36, 0xfd, - 0x80, 0x3b, 0xa4, 0xd3, 0x74, 0x3a, 0x45, 0xe7, 0x61, 0x9b, 0x84, 0x27, 0x76, 0x2b, 0xa4, 0x9c, - 0xa2, 0xf9, 0xde, 0xad, 0x4d, 0x3a, 0x4d, 0xbb, 0x53, 0x34, 0x17, 0x3c, 0xea, 0x51, 0x79, 0xe9, - 0x88, 0x95, 0xb2, 0x33, 0x77, 0x5c, 0xca, 0x9a, 0x94, 0x39, 0x55, 0xcc, 0x88, 0x0a, 0xe0, 0x74, - 0x8a, 0x55, 0xc2, 0x71, 0xd1, 0x69, 0x61, 0xcf, 0x0f, 0x30, 0xf7, 0x69, 0xa0, 0x6d, 0x97, 0x3d, - 0x4a, 0xbd, 0x06, 0x71, 0x70, 0xcb, 0x77, 0x70, 0x10, 0x50, 0x2e, 0x2f, 0x99, 0xbe, 0x35, 0x13, - 0x7c, 0x04, 0xb0, 0xba, 0x5b, 0x4a, 0xdc, 0xf1, 0xae, 0xba, 0xb2, 0xde, 0x81, 0x2b, 0x9f, 0x08, - 0xd8, 0x7d, 0xd7, 0xa5, 0xed, 0x80, 0x97, 0xc9, 0xc3, 0x36, 0x61, 0x1c, 0x2d, 0x42, 0x0e, 0xd7, - 0x6a, 0x21, 0x61, 0x6c, 0xd1, 0x58, 0x35, 0xb6, 0x2e, 0x95, 0xa3, 0xed, 0xad, 0x99, 0xef, 0x9e, - 0xad, 0x64, 0xfe, 0x7e, 0xb6, 0x92, 0xb1, 0x5c, 0x58, 0x88, 0xbb, 0xb2, 0x16, 0x0d, 0x18, 0x11, - 0xbe, 0x55, 0xdc, 0xc0, 0x81, 0x4b, 0x22, 0x5f, 0xbd, 0x45, 0xaf, 0xc3, 0x25, 0x97, 0xd6, 0x48, - 0xa5, 0x8e, 0x59, 0x7d, 0x71, 0x42, 0xde, 0xcd, 0x88, 0x83, 0x0f, 0x31, 0xab, 0xa3, 0x05, 0x98, - 0x0a, 0xa8, 0x70, 0x9a, 0x5c, 0x35, 0xb6, 0xb2, 0x65, 0xb5, 0xb1, 0xde, 0x83, 0x25, 0x09, 0x72, - 0x28, 0xdf, 0xe9, 0x5f, 0xb0, 0x7c, 0x62, 0x80, 0x39, 0x2a, 0x82, 0x26, 0xbb, 0x0e, 0x97, 0x55, - 0x09, 0x2a, 0xf1, 0x48, 0x73, 0xea, 0x74, 0x5f, 0x1d, 0x22, 0x13, 0x66, 0x98, 0x00, 0x15, 0xfc, - 0x26, 0x24, 0xbf, 0xde, 0x5e, 0x84, 0xc0, 0x2a, 0x6a, 0x25, 0x68, 0x37, 0xab, 0x24, 0xd4, 0x19, - 0xcc, 0xe9, 0xd3, 0x8f, 0xe5, 0xa1, 0x75, 0x07, 0x96, 0x25, 0x8f, 0xcf, 0x70, 0xc3, 0xaf, 0x61, - 0x4e, 0xc3, 0xa1, 0x64, 0xae, 0xc3, 0xac, 0x4b, 0x83, 0x61, 0x1e, 0x79, 0x71, 0xb6, 0x9f, 0xc8, - 0xea, 0xa9, 0x01, 0xd7, 0x52, 0xa2, 0xe9, 0xc4, 0x36, 0xe1, 0x7f, 0x11, 0xab, 0x78, 0xc4, 0x88, - 0xec, 0x7f, 0x98, 0x5a, 0xd4, 0x44, 0x07, 0xaa, 0xce, 0xaf, 0x52, 0x9e, 0x37, 0x75, 0x13, 0xf5, - 0x5c, 0xc7, 0x35, 0x91, 0x75, 0x47, 0x83, 0x7d, 0xca, 0x69, 0x88, 0xbd, 0xf1, 0x60, 0x68, 0x1e, - 0x26, 0x1f, 0x90, 0x13, 0xdd, 0x6f, 0x62, 0x39, 0x00, 0xbf, 0xa7, 0xe1, 0x7b, 0xc1, 0x34, 0xfc, - 0x02, 0x4c, 0x75, 0x70, 0xa3, 0x1d, 0x81, 0xab, 0x8d, 0x75, 0x13, 0xe6, 0x75, 0x2b, 0xd5, 0x5e, - 0x29, 0xc9, 0x4d, 0xf8, 0xff, 0x80, 0x9f, 0x86, 0x40, 0x90, 0x15, 0xbd, 0x2f, 0xbd, 0x66, 0xcb, - 0x72, 0x6d, 0x3d, 0x02, 0x24, 0x0d, 0x8f, 0xbb, 0x77, 0xa9, 0xc7, 0x22, 0x08, 0x04, 0x59, 0xf9, - 0xc5, 0xa8, 0xf8, 0x72, 0x8d, 0x3e, 0x00, 0xe8, 0x0b, 0x84, 0xcc, 0x2d, 0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a, 0xef, 0xc5, - 0x85, 0x3d, 0xb5, 0xf7, 0x86, 0x84, 0xf5, 0x65, 0xd9, 0x2b, 0x29, 0xe7, 0xdd, 0x83, 0x83, 0xe7, - 0x67, 0x05, 0xe3, 0xc5, 0x59, 0xc1, 0xf8, 0xe3, 0xac, 0x60, 0xfc, 0x70, 0x5e, 0xc8, 0xbc, 0x38, - 0x2f, 0x64, 0x7e, 0x3b, 0x2f, 0x64, 0x3e, 0xdf, 0xf2, 0x7c, 0x5e, 0x6f, 0x57, 0x6d, 0x97, 0x36, - 0x1d, 0x5e, 0xc7, 0x21, 0xf3, 0xd9, 0x40, 0x9c, 0xae, 0x8c, 0xc4, 0x4f, 0x5a, 0x84, 0x55, 0xa7, - 0xe5, 0x9f, 0xc1, 0x5b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x5c, 0x4c, 0x85, 0xe2, 0x0c, - 0x00, 0x00, + // 1123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xc7, 0xbd, 0x89, 0x13, 0xa7, 0x8f, 0x93, 0x12, 0xa6, 0x41, 0x24, 0x4b, 0xea, 0xa4, 0x9b, + 0xe6, 0x3d, 0xda, 0xc5, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x24, 0x0a, 0x05, 0xb5, 0x45, 0xc5, 0x44, + 0x1c, 0xb8, 0x58, 0xe3, 0xf5, 0xb0, 0xb6, 0x6a, 0xef, 0xb8, 0x3b, 0x63, 0xe3, 0xb4, 0x84, 0x03, + 0x12, 0x15, 0xa8, 0x17, 0x24, 0xee, 0xa8, 0x17, 0xce, 0x7c, 0x8d, 0x1e, 0x2b, 0x71, 0xe1, 0x84, + 0x50, 0x82, 0x10, 0x1f, 0x03, 0xcd, 0xcb, 0xda, 0xbb, 0x5e, 0x6f, 0x9d, 0xa2, 0xde,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f0, 0x7a, 0xc5, 0x15, 0x72, 0xdf, + 0x42, 0x3e, 0xe2, 0xb3, 0x17, 0x50, 0x1f, 0xb1, 0xe7, 0x11, 0x46, 0x6d, 0x6d, 0x48, 0xed, 0x55, + 0x54, 0x18, 0xa1, 0xad, 0xc3, 0x2b, 0x1e, 0x66, 0xe8, 0x1b, 0xc8, 0x69, 0x47, 0x4c, 0xad, 0xbd, + 0xb8, 0xb1, 0xa7, 0xd6, 0xde, 0x90, 0xb1, 0xbe, 0x68, 0xf7, 0xca, 0xca, 0x79, 0xef, 0xe0, 0xe0, + 0xd9, 0x59, 0xc1, 0x78, 0x7e, 0x56, 0x30, 0xfe, 0x3a, 0x2b, 0x18, 0x3f, 0x9d, 0x17, 0x32, 0xcf, + 0xcf, 0x0b, 0x99, 0x3f, 0xce, 0x0b, 0x99, 0x2f, 0xb7, 0xbc, 0x06, 0xaf, 0x77, 0xaa, 0xb6, 0x4b, + 0x5b, 0x0e, 0xaf, 0xe3, 0x80, 0x35, 0x58, 0x24, 0x4f, 0x4f, 0x66, 0xe2, 0x27, 0x6d, 0xc2, 0xaa, + 0xd3, 0xf2, 0x57, 0xff, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x55, 0x07, 0x68, 0x0c, 0xb3, + 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2113,36 +2066,6 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryStaticCallResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryStaticCallResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStaticCallResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *EthCallRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2534,19 +2457,6 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *QueryStaticCallResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *EthCallRequest) Size() (n int) { if m == nil { return 0 @@ -4130,90 +4040,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStaticCallResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryStaticCallResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStaticCallResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *EthCallRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/tx_args.go b/x/evm/types/tx_args.go new file mode 100644 index 0000000000..15bd33431a --- /dev/null +++ b/x/evm/types/tx_args.go @@ -0,0 +1,172 @@ +package types + +import ( + "errors" + "fmt" + math "math" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + ethtypes "github.com/ethereum/go-ethereum/core/types" +) + +// TransactionArgs represents the arguments to construct a new transaction +// or a message call using JSON-RPC. +// Duplicate struct definition since geth struct is in internal package +// Ref: https://github.com/ethereum/go-ethereum/blob/release/1.10.4/internal/ethapi/transaction_args.go#L36 +type TransactionArgs struct { + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Gas *hexutil.Uint64 `json:"gas"` + GasPrice *hexutil.Big `json:"gasPrice"` + MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` + MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` + Value *hexutil.Big `json:"value"` + Nonce *hexutil.Uint64 `json:"nonce"` + + // We accept "data" and "input" for backwards-compatibility reasons. + // "input" is the newer name and should be preferred by clients. + // Issue detail: https://github.com/ethereum/go-ethereum/issues/15628 + Data *hexutil.Bytes `json:"data"` + Input *hexutil.Bytes `json:"input"` + + // Introduced by AccessListTxType transaction. + AccessList *ethtypes.AccessList `json:"accessList,omitempty"` + ChainID *hexutil.Big `json:"chainId,omitempty"` +} + +// String return the struct in a string format +func (args *TransactionArgs) String() string { + // Todo: There is currently a bug with hexutil.Big when the value its nil, printing would trigger an exception + return fmt.Sprintf("TransactionArgs{From:%v, To:%v, Gas:%v,"+ + " Nonce:%v, Data:%v, Input:%v, AccessList:%v}", + args.From, + args.To, + args.Gas, + args.Nonce, + args.Data, + args.Input, + args.AccessList) +} + +// ToTransaction converts the arguments to an ethereum transaction. +// This assumes that setTxDefaults has been called. +func (args *TransactionArgs) ToTransaction() *MsgEthereumTx { + var ( + input []byte + chainID, value, gasPrice *big.Int + // maxFeePerGas, maxPriorityFeePerGas *big.Int + addr common.Address + gas, nonce uint64 + ) + + // Set sender address or use zero address if none specified. + if args.From != nil { + addr = *args.From + } + + if args.Input != nil { + input = *args.Input + } else if args.Data != nil { + input = *args.Data + } + + if args.ChainID != nil { + chainID = args.ChainID.ToInt() + } + + if args.Nonce != nil { + nonce = uint64(*args.Nonce) + } + + if args.Gas != nil { + gas = uint64(*args.Gas) + } + + if args.GasPrice != nil { + gasPrice = args.GasPrice.ToInt() + } + + // if args.MaxFeePerGas != nil { + // maxFeePerGas = args.MaxFeePerGas.ToInt() + // } + + // if args.MaxPriorityFeePerGas != nil { + // maxPriorityFeePerGas = args.MaxPriorityFeePerGas.ToInt() + // } + + if args.GasPrice != nil { + gasPrice = args.GasPrice.ToInt() + } + + if args.Value != nil { + value = args.Value.ToInt() + } + + tx := NewTx(chainID, nonce, args.To, value, gas, gasPrice, input, args.AccessList) + tx.From = addr.Hex() + + return tx +} + +// ToMessage converts the arguments to the Message type used by the core evm. +// This assumes that setTxDefaults has been called. +func (args *TransactionArgs) ToMessage(globalGasCap uint64) (ethtypes.Message, error) { + var ( + input []byte + value, gasPrice *big.Int + // gasFeeCap, gasTipCap *big.Int + addr common.Address + gas, nonce uint64 + ) + + // Reject invalid combinations of pre- and post-1559 fee styles + if args.GasPrice != nil && (args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil) { + return ethtypes.Message{}, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") + } + + // Set sender address or use zero address if none specified. + if args.From != nil { + addr = *args.From + } + + // Set default gas & gas price if none were set + gas = globalGasCap + if gas == 0 { + gas = uint64(math.MaxUint64 / 2) + } + if args.Gas != nil { + gas = uint64(*args.Gas) + } + if globalGasCap != 0 && globalGasCap < gas { + gas = globalGasCap + } + + if args.GasPrice != nil { + gasPrice = args.GasPrice.ToInt() + } + + if args.Value != nil { + value = args.Value.ToInt() + } + + // if args.MaxFeePerGas != nil { + // gasFeeCap = args.MaxFeePerGas.ToInt() + // } + + // if args.MaxPriorityFeePerGas != nil { + // gasTipCap = args.MaxPriorityFeePerGas.ToInt() + // } + + if args.Data != nil { + input = *args.Data + } + var accessList ethtypes.AccessList + if args.AccessList != nil { + accessList = *args.AccessList + } + + msg := ethtypes.NewMessage(addr, args.To, nonce, value, gas, gasPrice, input, accessList, false) + return msg, nil +} From 17b41cf206169039754091eee38d46a0d0c1fe64 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Mon, 4 Oct 2021 15:18:08 +0200 Subject: [PATCH 2/3] update --- app/ante/ante.go | 4 ++-- app/ante/eth.go | 12 +++--------- app/ante/eth_test.go | 2 +- x/evm/keeper/grpc_query.go | 11 +++++++++-- x/evm/types/params.go | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/ante/ante.go b/app/ante/ante.go index f71e193949..945b48fba9 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -36,7 +36,7 @@ func NewAnteHandler( evmKeeper EVMKeeper, feeGrantKeeper authante.FeegrantKeeper, channelKeeper channelkeeper.Keeper, - feeMarketKeeper FeeMarketKeeper, + feeMarketKeeper evmtypes.FeeMarketKeeper, signModeHandler authsigning.SignModeHandler, ) sdk.AnteHandler { return func( @@ -63,7 +63,7 @@ func NewAnteHandler( NewEthSigVerificationDecorator(evmKeeper), NewEthAccountVerificationDecorator(ak, bankKeeper, evmKeeper), NewEthNonceVerificationDecorator(ak), - NewEthGasConsumeDecorator(evmKeeper, feeMarketKeeper), + NewEthGasConsumeDecorator(evmKeeper), NewCanTransferDecorator(evmKeeper, feeMarketKeeper), NewEthIncrementSenderSequenceDecorator(ak), // innermost AnteDecorator. ) diff --git a/app/ante/eth.go b/app/ante/eth.go index af455d055c..64c8ea238e 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -13,7 +13,6 @@ import ( ethermint "github.com/tharsis/ethermint/types" evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" evmtypes "github.com/tharsis/ethermint/x/evm/types" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -37,11 +36,6 @@ type EVMKeeper interface { ) (sdk.Coins, error) } -type FeeMarketKeeper interface { - GetParams(ctx sdk.Context) feemarkettypes.Params - GetBaseFee(ctx sdk.Context) *big.Int -} - // EthSigVerificationDecorator validates an ethereum signatures type EthSigVerificationDecorator struct { evmKeeper EVMKeeper @@ -242,7 +236,7 @@ type EthGasConsumeDecorator struct { // NewEthGasConsumeDecorator creates a new EthGasConsumeDecorator func NewEthGasConsumeDecorator( - evmKeeper EVMKeeper, fmk FeeMarketKeeper, + evmKeeper EVMKeeper, ) EthGasConsumeDecorator { return EthGasConsumeDecorator{ evmKeeper: evmKeeper, @@ -334,11 +328,11 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula // context rules. type CanTransferDecorator struct { evmKeeper EVMKeeper - feemarketKeeper FeeMarketKeeper + feemarketKeeper evmtypes.FeeMarketKeeper } // NewCanTransferDecorator creates a new CanTransferDecorator instance. -func NewCanTransferDecorator(evmKeeper EVMKeeper, fmk FeeMarketKeeper) CanTransferDecorator { +func NewCanTransferDecorator(evmKeeper EVMKeeper, fmk evmtypes.FeeMarketKeeper) CanTransferDecorator { return CanTransferDecorator{ evmKeeper: evmKeeper, feemarketKeeper: fmk, diff --git a/app/ante/eth_test.go b/app/ante/eth_test.go index f72d4ac0c9..12b91602b2 100644 --- a/app/ante/eth_test.go +++ b/app/ante/eth_test.go @@ -195,7 +195,7 @@ func (suite AnteTestSuite) TestEthNonceVerificationDecorator() { } func (suite AnteTestSuite) TestEthGasConsumeDecorator() { - dec := ante.NewEthGasConsumeDecorator(suite.app.EvmKeeper, suite.app.FeeMarketKeeper) + dec := ante.NewEthGasConsumeDecorator(suite.app.EvmKeeper) addr := tests.GenerateAddress() diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 7f8e118b07..0f08d52d20 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -224,6 +224,7 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms msg := args.ToMessage(req.GasCap) params := k.GetParams(ctx) + feemktParams := k.feeMarketKeeper.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) coinbase, err := k.GetCoinbaseAddress(ctx) @@ -231,8 +232,14 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms return nil, status.Error(codes.Internal, err.Error()) } - baseFee := k.feeMarketKeeper.GetBaseFee(ctx) - tracer := types.NewTracer(k.tracer, msg, ethCfg, k.Ctx().BlockHeight(), k.debug) + var baseFee *big.Int + + // ignore base fee if not enabled by fee market params + if !feemktParams.NoBaseFee { + baseFee = k.feeMarketKeeper.GetBaseFee(ctx) + } + + tracer := types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight(), k.debug) evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 9e4d87d749..65fa650ea3 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -26,7 +26,7 @@ var ( // AvailableExtraEIPs define the list of all EIPs that can be enabled by the EVM interpreter. These EIPs are applied in // order and can override the instruction sets from the latest hard fork enabled by the ChainConfig. For more info // check: https://github.com/ethereum/go-ethereum/blob/v1.10.4/core/vm/interpreter.go#L122 - AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529} + AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929} ) // ParamKeyTable returns the parameter key table. From 22a0a7c24fafb071faf06cfc3e0a1347a8e9ed48 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Mon, 4 Oct 2021 16:47:42 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a8ada531..e3b380847e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### State Machine Breaking + +* (evm, ante) [tharsis#620](https://github.com/tharsis/ethermint/pull/620) Add fee market field to EVM `Keeper` and `AnteHandler`. + ### API Breaking * (rpc) [tharsis#400](https://github.com/tharsis/ethermint/issues/400) Restructure JSON-RPC directory and rename server config