upgrade to ethermint v0.21.0 #99

Closed
0xmuralik wants to merge 384 commits from murali/update-fork into main
19 changed files with 4371 additions and 119 deletions
Showing only changes of commit 8f932ddc6a - Show all commits

View File

@ -38,6 +38,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
## Unreleased
### State Machine Breaking
* (evm) [tharsis#1124](https://github.com/tharsis/ethermint/pull/1124) Reject non-replay-protected tx in ante handler to prevent replay attack
### Bug Fixes
* (evm) [tharsis#1118](https://github.com/tharsis/ethermint/pull/1118) Fix `Type()` `Account` method `EmptyCodeHash` comparison

View File

@ -50,7 +50,12 @@ func (esvd EthSigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, s
return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil))
}
sender, err := signer.Sender(msgEthTx.AsTransaction())
ethTx := msgEthTx.AsTransaction()
if params.RejectUnprotectedTx && !ethTx.Protected() {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "eth tx is not replay-protected")
}
sender, err := signer.Sender(ethTx)
if err != nil {
return ctx, sdkerrors.Wrapf(
sdkerrors.ErrorInvalidSigner,

View File

@ -15,7 +15,6 @@ import (
)
func (suite AnteTestSuite) TestEthSigVerificationDecorator() {
dec := ante.NewEthSigVerificationDecorator(suite.app.EvmKeeper)
addr, privKey := tests.NewAddrKey()
signedTx := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 1, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil)
@ -23,25 +22,39 @@ func (suite AnteTestSuite) TestEthSigVerificationDecorator() {
err := signedTx.Sign(suite.ethSigner, tests.NewSigner(privKey))
suite.Require().NoError(err)
unprotectedTx := evmtypes.NewTxContract(nil, 1, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil)
unprotectedTx.From = addr.Hex()
err = unprotectedTx.Sign(ethtypes.HomesteadSigner{}, tests.NewSigner(privKey))
suite.Require().NoError(err)
testCases := []struct {
name string
tx sdk.Tx
reCheckTx bool
expPass bool
name string
tx sdk.Tx
rejectUnprotectedTx bool
reCheckTx bool
expPass bool
}{
{"ReCheckTx", &invalidTx{}, true, false},
{"invalid transaction type", &invalidTx{}, false, false},
{"ReCheckTx", &invalidTx{}, true, true, false},
{"invalid transaction type", &invalidTx{}, true, false, false},
{
"invalid sender",
evmtypes.NewTx(suite.app.EvmKeeper.ChainID(), 1, &addr, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil),
true,
false,
false,
},
{"successful signature verification", signedTx, false, true},
{"successful signature verification", signedTx, true, false, true},
{"invalid, not replay-protected", unprotectedTx, true, false, false},
{"successful, don't reject unprotected", unprotectedTx, false, false, true},
}
for _, tc := range testCases {
suite.Run(tc.name, func() {
suite.evmParamsOption = func(params *evmtypes.Params) {
params.RejectUnprotectedTx = tc.rejectUnprotectedTx
}
suite.SetupTest()
dec := ante.NewEthSigVerificationDecorator(suite.app.EvmKeeper)
_, err := dec.AnteHandle(suite.ctx.WithIsReCheckTx(tc.reCheckTx), tc.tx, false, NextFn)
if tc.expPass {
@ -51,6 +64,7 @@ func (suite AnteTestSuite) TestEthSigVerificationDecorator() {
}
})
}
suite.evmParamsOption = nil
}
func (suite AnteTestSuite) TestNewEthAccountVerificationDecorator() {

View File

@ -76,6 +76,7 @@ func (suite *AnteTestSuite) SetupTest() {
genesis[feemarkettypes.ModuleName] = app.AppCodec().MustMarshalJSON(feemarketGenesis)
}
evmGenesis := evmtypes.DefaultGenesisState()
evmGenesis.Params.RejectUnprotectedTx = true
if !suite.enableLondonHF {
maxInt := sdk.NewInt(math.MaxInt64)
evmGenesis.Params.ChainConfig.LondonBlock = &maxInt

View File

@ -227,6 +227,7 @@ Params defines the EVM module parameters
| `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 |
| `reject_unprotected_tx` | [bool](#bool) | | reject replay-unprotected transactions |
@ -443,6 +444,7 @@ DynamicFeeTx is the data of EIP-1559 dinamic fee transactions.
### LegacyTx
LegacyTx is the transaction data of regular Ethereum transactions.
NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the RejectUnprotectedTx parameter is enabled.
| Field | Type | Label | Description |

View File

@ -24,6 +24,8 @@ message Params {
(gogoproto.moretags) = "yaml:\"chain_config\"",
(gogoproto.nullable) = false
];
// reject replay-unprotected transactions
bool reject_unprotected_tx = 6;
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values

View File

@ -36,6 +36,7 @@ message MsgEthereumTx {
}
// LegacyTx is the transaction data of regular Ethereum transactions.
// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the RejectUnprotectedTx parameter is enabled.
message LegacyTx {
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxData";

View File

@ -1,5 +1,10 @@
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
v2 "github.com/tharsis/ethermint/x/evm/migrations/v2"
)
// Migrator is a struct for handling in-place store migrations.
type Migrator struct {
keeper Keeper
@ -11,3 +16,8 @@ func NewMigrator(keeper Keeper) Migrator {
keeper: keeper,
}
}
// Migrate1to2 migrates the store from consensus version v1 to v2
func (m Migrator) Migrate1to2(ctx sdk.Context) error {
return v2.MigrateStore(ctx, &m.keeper.paramSpace)
}

View File

@ -0,0 +1,19 @@
package v2
import (
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// MigrateStore add the default RejectUnprotected parameter.
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
if !paramstore.HasKeyTable() {
ps := paramstore.WithKeyTable(types.ParamKeyTable())
paramstore = &ps
}
// add RejectUnprotected
paramstore.Set(ctx, types.ParamStoreKeyRejectUnprotectedTx, types.DefaultParams().RejectUnprotectedTx)
return nil
}

View File

@ -0,0 +1,47 @@
package v2_test
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tharsis/ethermint/encoding"
"github.com/tharsis/ethermint/app"
v2 "github.com/tharsis/ethermint/x/evm/migrations/v2"
v2types "github.com/tharsis/ethermint/x/evm/migrations/v2/types"
"github.com/tharsis/ethermint/x/evm/types"
)
func TestMigrateStore(t *testing.T) {
encCfg := encoding.MakeConfig(app.ModuleBasics)
feemarketKey := sdk.NewKVStoreKey(types.StoreKey)
tFeeMarketKey := sdk.NewTransientStoreKey(fmt.Sprintf("%s_test", types.StoreKey))
ctx := testutil.DefaultContext(feemarketKey, tFeeMarketKey)
paramstore := paramtypes.NewSubspace(
encCfg.Marshaler, encCfg.Amino, feemarketKey, tFeeMarketKey, "evm",
).WithKeyTable(v2types.ParamKeyTable())
params := v2types.DefaultParams()
paramstore.SetParamSet(ctx, &params)
require.Panics(t, func() {
var result bool
paramstore.Get(ctx, types.ParamStoreKeyRejectUnprotectedTx, &result)
})
paramstore = paramtypes.NewSubspace(
encCfg.Marshaler, encCfg.Amino, feemarketKey, tFeeMarketKey, "evm",
).WithKeyTable(types.ParamKeyTable())
err := v2.MigrateStore(ctx, &paramstore)
require.NoError(t, err)
var result bool
paramstore.Get(ctx, types.ParamStoreKeyRejectUnprotectedTx, &result)
require.Equal(t, types.DefaultRejectUnprotectedTx, result)
}

View File

@ -0,0 +1,165 @@
package types
import (
"math/big"
"strings"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params"
"github.com/tharsis/ethermint/x/evm/types"
)
// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions.
// All the negative or nil values are converted to nil
func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
return &params.ChainConfig{
ChainID: chainID,
HomesteadBlock: getBlockValue(cc.HomesteadBlock),
DAOForkBlock: getBlockValue(cc.DAOForkBlock),
DAOForkSupport: cc.DAOForkSupport,
EIP150Block: getBlockValue(cc.EIP150Block),
EIP150Hash: common.HexToHash(cc.EIP150Hash),
EIP155Block: getBlockValue(cc.EIP155Block),
EIP158Block: getBlockValue(cc.EIP158Block),
ByzantiumBlock: getBlockValue(cc.ByzantiumBlock),
ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock),
PetersburgBlock: getBlockValue(cc.PetersburgBlock),
IstanbulBlock: getBlockValue(cc.IstanbulBlock),
MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock),
BerlinBlock: getBlockValue(cc.BerlinBlock),
LondonBlock: getBlockValue(cc.LondonBlock),
ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock),
MergeForkBlock: getBlockValue(cc.MergeForkBlock),
TerminalTotalDifficulty: nil,
Ethash: nil,
Clique: nil,
}
}
// DefaultChainConfig returns default evm parameters.
func DefaultChainConfig() ChainConfig {
homesteadBlock := sdk.ZeroInt()
daoForkBlock := sdk.ZeroInt()
eip150Block := sdk.ZeroInt()
eip155Block := sdk.ZeroInt()
eip158Block := sdk.ZeroInt()
byzantiumBlock := sdk.ZeroInt()
constantinopleBlock := sdk.ZeroInt()
petersburgBlock := sdk.ZeroInt()
istanbulBlock := sdk.ZeroInt()
muirGlacierBlock := sdk.ZeroInt()
berlinBlock := sdk.ZeroInt()
londonBlock := sdk.ZeroInt()
arrowGlacierBlock := sdk.ZeroInt()
mergeForkBlock := sdk.ZeroInt()
return ChainConfig{
HomesteadBlock: &homesteadBlock,
DAOForkBlock: &daoForkBlock,
DAOForkSupport: true,
EIP150Block: &eip150Block,
EIP150Hash: common.Hash{}.String(),
EIP155Block: &eip155Block,
EIP158Block: &eip158Block,
ByzantiumBlock: &byzantiumBlock,
ConstantinopleBlock: &constantinopleBlock,
PetersburgBlock: &petersburgBlock,
IstanbulBlock: &istanbulBlock,
MuirGlacierBlock: &muirGlacierBlock,
BerlinBlock: &berlinBlock,
LondonBlock: &londonBlock,
ArrowGlacierBlock: &arrowGlacierBlock,
MergeForkBlock: &mergeForkBlock,
}
}
func getBlockValue(block *sdk.Int) *big.Int {
if block == nil || block.IsNegative() {
return nil
}
return block.BigInt()
}
// Validate performs a basic validation of the ChainConfig params. The function will return an error
// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
func (cc ChainConfig) Validate() error {
if err := validateBlock(cc.HomesteadBlock); err != nil {
return sdkerrors.Wrap(err, "homesteadBlock")
}
if err := validateBlock(cc.DAOForkBlock); err != nil {
return sdkerrors.Wrap(err, "daoForkBlock")
}
if err := validateBlock(cc.EIP150Block); err != nil {
return sdkerrors.Wrap(err, "eip150Block")
}
if err := validateHash(cc.EIP150Hash); err != nil {
return err
}
if err := validateBlock(cc.EIP155Block); err != nil {
return sdkerrors.Wrap(err, "eip155Block")
}
if err := validateBlock(cc.EIP158Block); err != nil {
return sdkerrors.Wrap(err, "eip158Block")
}
if err := validateBlock(cc.ByzantiumBlock); err != nil {
return sdkerrors.Wrap(err, "byzantiumBlock")
}
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
return sdkerrors.Wrap(err, "constantinopleBlock")
}
if err := validateBlock(cc.PetersburgBlock); err != nil {
return sdkerrors.Wrap(err, "petersburgBlock")
}
if err := validateBlock(cc.IstanbulBlock); err != nil {
return sdkerrors.Wrap(err, "istanbulBlock")
}
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
return sdkerrors.Wrap(err, "muirGlacierBlock")
}
if err := validateBlock(cc.BerlinBlock); err != nil {
return sdkerrors.Wrap(err, "berlinBlock")
}
if err := validateBlock(cc.LondonBlock); err != nil {
return sdkerrors.Wrap(err, "londonBlock")
}
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
return sdkerrors.Wrap(err, "arrowGlacierBlock")
}
if err := validateBlock(cc.MergeForkBlock); err != nil {
return sdkerrors.Wrap(err, "mergeForkBlock")
}
// NOTE: chain ID is not needed to check config order
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
return sdkerrors.Wrap(err, "invalid config fork order")
}
return nil
}
func validateHash(hex string) error {
if hex != "" && strings.TrimSpace(hex) == "" {
return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
}
return nil
}
func validateBlock(block *sdk.Int) error {
// nil value means that the fork has not yet been applied
if block == nil {
return nil
}
if block.IsNegative() {
return sdkerrors.Wrapf(
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
)
}
return nil
}

3781
x/evm/migrations/v2/types/evm.pb.go generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,145 @@
package types
import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/params"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/tharsis/ethermint/types"
)
var _ paramtypes.ParamSet = &Params{}
const (
DefaultEVMDenom = types.AttoPhoton
)
// DefaultMinGasMultiplier is 0.5 or 50%
var DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2)
// Parameter keys
var (
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
// 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/master/core/vm/interpreter.go#L97
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
)
// ParamKeyTable returns the parameter key table.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
}
// NewParams creates a new Params instance
func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, extraEIPs ...int64) Params {
return Params{
EvmDenom: evmDenom,
EnableCreate: enableCreate,
EnableCall: enableCall,
ExtraEIPs: extraEIPs,
ChainConfig: config,
}
}
// DefaultParams returns default evm parameters
// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
func DefaultParams() Params {
return Params{
EvmDenom: DefaultEVMDenom,
EnableCreate: true,
EnableCall: true,
ChainConfig: DefaultChainConfig(),
ExtraEIPs: nil,
}
}
// ParamSetPairs returns the parameter set pairs.
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
}
}
// Validate performs basic validation on evm parameters.
func (p Params) Validate() error {
if err := sdk.ValidateDenom(p.EvmDenom); err != nil {
return err
}
if err := validateEIPs(p.ExtraEIPs); err != nil {
return err
}
return p.ChainConfig.Validate()
}
// EIPs returns the ExtraEips as a int slice
func (p Params) EIPs() []int {
eips := make([]int, len(p.ExtraEIPs))
for i, eip := range p.ExtraEIPs {
eips[i] = int(eip)
}
return eips
}
func validateEVMDenom(i interface{}) error {
denom, ok := i.(string)
if !ok {
return fmt.Errorf("invalid parameter EVM denom type: %T", i)
}
return sdk.ValidateDenom(denom)
}
func validateBool(i interface{}) error {
_, ok := i.(bool)
if !ok {
return fmt.Errorf("invalid parameter type: %T", i)
}
return nil
}
func validateEIPs(i interface{}) error {
eips, ok := i.([]int64)
if !ok {
return fmt.Errorf("invalid EIP slice type: %T", i)
}
for _, eip := range eips {
if !vm.ValidEip(int(eip)) {
return fmt.Errorf("EIP %d is not activateable, valid EIPS are: %s", eip, vm.ActivateableEips())
}
}
return nil
}
func validateChainConfig(i interface{}) error {
cfg, ok := i.(ChainConfig)
if !ok {
return fmt.Errorf("invalid chain config type: %T", i)
}
return cfg.Validate()
}
// IsLondon returns if london hardfork is enabled.
func IsLondon(ethConfig *params.ChainConfig, height int64) bool {
return ethConfig.IsLondon(big.NewInt(height))
}

View File

@ -44,7 +44,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {
// ConsensusVersion returns the consensus state-breaking version for the module.
func (AppModuleBasic) ConsensusVersion() uint64 {
return 1
return 2
}
// DefaultGenesis returns default genesis state as raw bytes for the evm
@ -123,7 +123,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), am.keeper)
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
_ = keeper.NewMigrator(*am.keeper)
m := keeper.NewMigrator(*am.keeper)
err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2)
if err != nil {
panic(err)
}
}
// Route returns the message routing key for the evm module.

231
x/evm/types/evm.pb.go generated
View File

@ -37,6 +37,8 @@ type Params struct {
ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"`
// chain config defines the EVM chain configuration parameters
ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"`
// reject replay-unprotected transactions
RejectUnprotectedTx bool `protobuf:"varint,6,opt,name=reject_unprotected_tx,json=rejectUnprotectedTx,proto3" json:"reject_unprotected_tx,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
@ -107,6 +109,13 @@ func (m *Params) GetChainConfig() ChainConfig {
return ChainConfig{}
}
func (m *Params) GetRejectUnprotectedTx() bool {
if m != nil {
return m.RejectUnprotectedTx
}
return false
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
// instead of *big.Int.
type ChainConfig struct {
@ -657,100 +666,101 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
var fileDescriptor_d21ecc92c8c8583e = []byte{
// 1475 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdf, 0x6e, 0xdb, 0xb6,
0x1a, 0x4f, 0x62, 0x27, 0x91, 0x69, 0xc7, 0x56, 0x98, 0x34, 0xc7, 0x4d, 0x71, 0xa2, 0x1c, 0x5d,
0x1c, 0xe4, 0x00, 0x6d, 0xdc, 0xa4, 0x08, 0x4e, 0xd1, 0x62, 0x17, 0x51, 0x92, 0xb6, 0xc9, 0xba,
0x2d, 0x60, 0x32, 0x0c, 0x18, 0x30, 0x08, 0xb4, 0xc4, 0xca, 0x5a, 0x24, 0xd1, 0x20, 0x29, 0xd7,
0x1e, 0xf6, 0x00, 0x03, 0x76, 0xb3, 0x47, 0xd8, 0x2b, 0xec, 0x2d, 0x8a, 0x5d, 0xf5, 0x66, 0xc0,
0xb0, 0x0b, 0xa1, 0x48, 0xef, 0x72, 0xe9, 0x27, 0x18, 0x44, 0xd2, 0x7f, 0x13, 0x6c, 0x4b, 0xae,
0xcc, 0xdf, 0xf7, 0xe7, 0xf7, 0x23, 0x3f, 0x7e, 0x14, 0x69, 0xb0, 0x4e, 0x44, 0x8b, 0xb0, 0x38,
0x4c, 0x44, 0x83, 0x74, 0xe2, 0x46, 0x67, 0x27, 0xff, 0xd9, 0x6e, 0x33, 0x2a, 0x28, 0x34, 0x87,
0xbe, 0xed, 0xdc, 0xd8, 0xd9, 0x59, 0x5f, 0x0d, 0x68, 0x40, 0xa5, 0xb3, 0x91, 0x8f, 0x54, 0x9c,
0xfd, 0xd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 0x63, 0xf8, 0x3f, 0x50, 0x8c, 0x68, 0xc0, 0xeb, 0x73, 0x9b, 0x85, 0xad, 0xf2, 0xee, 0xbd,
0xeb, 0x57, 0xfc, 0x6b, 0x1a, 0x20, 0x19, 0x62, 0xff, 0x3a, 0x07, 0x0a, 0xaf, 0x69, 0x00, 0xeb,
0x60, 0x11, 0xfb, 0x3e, 0x23, 0x9c, 0x6b, 0xa6, 0x01, 0x84, 0x6b, 0x60, 0x41, 0xd0, 0x76, 0xe8,
0x29, 0xba, 0x12, 0xd2, 0x28, 0x17, 0xf6, 0xb1, 0xc0, 0xf2, 0xaa, 0xab, 0x20, 0x39, 0x86, 0xbb,
0xa0, 0x22, 0x57, 0xe6, 0x26, 0x69, 0xdc, 0x24, 0x4c, 0xde, 0x58, 0x45, 0xa7, 0x76, 0x95, 0x59,
0x65, 0x69, 0xff, 0x5c, 0x9a, 0xd1, 0x38, 0x80, 0x0f, 0xc1, 0xa2, 0xe8, 0x8e, 0x5f, 0x36, 0x2b,
0x57, 0x99, 0x55, 0x13, 0xa3, 0x65, 0xe6, 0x77, 0x09, 0x5a, 0x10, 0x5d, 0x79, 0xa7, 0x34, 0x80,
0x21, 0xba, 0x6e, 0x98, 0xf8, 0xa4, 0x2b, 0xef, 0x93, 0xa2, 0xb3, 0x7a, 0x95, 0x59, 0xe6, 0x58,
0xf8, 0x71, 0xee, 0x43, 0x8b, 0xa2, 0x2b, 0x07, 0xf0, 0x21, 0x00, 0x6a, 0x4a, 0x52, 0x41, 0xdd,
0x06, 0x4b, 0x57, 0x99, 0x55, 0x92, 0x56, 0xc9, 0x3d, 0x1a, 0x42, 0x1b, 0xcc, 0x2b, 0x6e, 0x43,
0x72, 0x57, 0xae, 0x32, 0xcb, 0x88, 0x68, 0xa0, 0x38, 0x95, 0x2b, 0x2f, 0x15, 0x23, 0x31, 0xed,
0x10, 0x5f, 0x7e, 0x70, 0x0d, 0x34, 0x80, 0xf6, 0x8f, 0x73, 0xc0, 0x38, 0xef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xce,
0x45, 0x0b, 0x33, 0x1e, 0xf2, 0xc6, 0xe8, 0x0f, 0x62, 0x57, 0xfe, 0x45, 0x94, 0x1f, 0xf5, 0xe6,
0x82, 0xfc, 0xeb, 0xf7, 0xe4, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0xef, 0x82, 0x39, 0x40,
0x0e, 0x00, 0x00,
// 1504 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6e, 0x1b, 0x37,
0x1a, 0xb7, 0x2d, 0xd9, 0x1e, 0x51, 0xb2, 0x34, 0xa6, 0x1d, 0xaf, 0xe2, 0x60, 0x3d, 0xde, 0x39,
0x2c, 0xbc, 0x40, 0x62, 0xc5, 0x0e, 0x8c, 0x0d, 0x12, 0xec, 0xc1, 0x63, 0x3b, 0x89, 0xbd, 0xd9,
0xad, 0x41, 0x3b, 0x28, 0x50, 0xa0, 0x18, 0x50, 0x33, 0xcc, 0x68, 0xe2, 0x99, 0xa1, 0x40, 0x72,
0x14, 0xa9, 0xe8, 0x03, 0xb4, 0xe8, 0xa5, 0x8f, 0xd0, 0x57, 0xe8, 0x5b, 0x04, 0x3d, 0xe5, 0x58,
0xf4, 0x30, 0x08, 0x9c, 0x9b, 0x8f, 0x7a, 0x82, 0x62, 0x48, 0xea, 0xaf, 0x8d, 0xb6, 0xf6, 0x49,
0xfc, 0x7d, 0x7f, 0x7e, 0x3f, 0xf2, 0xe3, 0x37, 0x24, 0x05, 0xd6, 0x89, 0x68, 0x11, 0x16, 0x87,
0x89, 0x68, 0x90, 0x4e, 0xdc, 0xe8, 0xec, 0xe4, 0x3f, 0xdb, 0x6d, 0x46, 0x05, 0x85, 0xe6, 0xd0,
0xb7, 0x9d, 0x1b, 0x3b, 0x3b, 0xeb, 0xab, 0x01, 0x0d, 0xa8, 0x74, 0x36, 0xf2, 0x91, 0x8a, 0xb3,
0xbf,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0x4a, 0xd5, 0xa3, 0xa4, 0x84, 0x14, 0xb0, 0x4f, 0x41, 0xed, 0x9c, 0xe1, 0x84,
0x63, 0x4f, 0x84, 0x34, 0x79, 0x4d, 0x03, 0x0e, 0x21, 0x28, 0xca, 0x83, 0x5a, 0xe5, 0xca, 0x31,
0xfc, 0x17, 0x28, 0x46, 0x34, 0xe0, 0xf5, 0xb9, 0xcd, 0xc2, 0x56, 0x79, 0xf7, 0xde, 0xf5, 0x67,
0xc1, 0x6b, 0x1a, 0x20, 0x19, 0x62, 0xff, 0x32, 0x07, 0x0a, 0xaf, 0x69, 0x00, 0xeb, 0x60, 0x11,
0xfb, 0x3e, 0x23, 0x9c, 0x6b, 0xa6, 0x01, 0x84, 0x6b, 0x60, 0x41, 0xd0, 0x76, 0xe8, 0x29, 0xba,
0x12, 0xd2, 0x28, 0x17, 0xf6, 0xb1, 0xc0, 0xf2, 0xaa, 0xab, 0x20, 0x39, 0x86, 0xbb, 0xa0, 0x22,
0x57, 0xe6, 0x26, 0x69, 0xdc, 0x24, 0x4c, 0xde, 0x58, 0x45, 0xa7, 0x76, 0x95, 0x59, 0x65, 0x69,
0xff, 0xbf, 0x34, 0xa3, 0x71, 0x00, 0x1f, 0x82, 0x45, 0xd1, 0x1d, 0xbf, 0x6c, 0x56, 0xae, 0x32,
0xab, 0x26, 0x46, 0xcb, 0xcc, 0xef, 0x12, 0xb4, 0x20, 0xba, 0xf2, 0x4e, 0x69, 0x00, 0x43, 0x74,
0xdd, 0x30, 0xf1, 0x89, 0x7a, 0x8d, 0x14, 0x9d, 0xd5, 0xab, 0xcc, 0x32, 0xc7, 0xc2, 0x8f, 0x73,
0x1f, 0x5a, 0x14, 0x5d, 0x39, 0x80, 0x0f, 0x01, 0x50, 0x53, 0x92, 0x0a, 0xea, 0x36, 0x58, 0xba,
0xca, 0xac, 0x92, 0xb4, 0x4a, 0xee, 0xd1, 0x10, 0xda, 0x60, 0x5e, 0x71, 0x1b, 0x92, 0xbb, 0x72,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, 0xcc, 0x7e, 0xbc, 0xdc, 0x98, 0xfd, 0x74, 0xb9, 0x31, 0xfb, 0xe3, 0xe7, 0x8d, 0x99,
0x8f, 0x9f, 0x37, 0x66, 0x7e, 0xfd, 0xbc, 0x31, 0xf3, 0xd5, 0xd6, 0xd8, 0x71, 0x2e, 0x5a, 0x98,
0xf1, 0x90, 0x37, 0x46, 0x7f, 0x2a, 0xbb, 0xf2, 0x6f, 0xa5, 0x3c, 0xd4, 0x9b, 0x0b, 0xf2, 0xef,
0xe2, 0x93, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x80, 0xdd, 0x60, 0x74, 0x0e, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@ -773,6 +783,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.RejectUnprotectedTx {
i--
if m.RejectUnprotectedTx {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x30
}
{
size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
@ -1465,6 +1485,9 @@ func (m *Params) Size() (n int) {
}
l = m.ChainConfig.Size()
n += 1 + l + sovEvm(uint64(l))
if m.RejectUnprotectedTx {
n += 2
}
return n
}
@ -1925,6 +1948,26 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RejectUnprotectedTx", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.RejectUnprotectedTx = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])

View File

@ -18,16 +18,21 @@ const (
DefaultEVMDenom = types.AttoPhoton
)
// DefaultMinGasMultiplier is 0.5 or 50%
var DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2)
var (
// DefaultMinGasMultiplier is 0.5 or 50%
DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2)
DefaultRejectUnprotectedTx = false
)
// Parameter keys
var (
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
ParamStoreKeyRejectUnprotectedTx = []byte("RejectUnprotectedTx")
// 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
@ -57,11 +62,12 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi
// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
func DefaultParams() Params {
return Params{
EvmDenom: DefaultEVMDenom,
EnableCreate: true,
EnableCall: true,
ChainConfig: DefaultChainConfig(),
ExtraEIPs: nil,
EvmDenom: DefaultEVMDenom,
EnableCreate: true,
EnableCall: true,
ChainConfig: DefaultChainConfig(),
ExtraEIPs: nil,
RejectUnprotectedTx: DefaultRejectUnprotectedTx,
}
}
@ -73,6 +79,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
paramtypes.NewParamSetPair(ParamStoreKeyRejectUnprotectedTx, &p.RejectUnprotectedTx, validateBool),
}
}

1
x/evm/types/tx.pb.go generated
View File

@ -81,6 +81,7 @@ func (m *MsgEthereumTx) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo
// LegacyTx is the transaction data of regular Ethereum transactions.
// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the RejectUnprotectedTx parameter is enabled.
type LegacyTx struct {
// nonce corresponds to the account nonce (transaction sequence).
Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`

View File

@ -46,6 +46,7 @@ type TxData interface {
EffectiveCost(baseFee *big.Int) *big.Int
}
// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the RejectUnprotectedTx parameter is enabled.
func NewTxDataFromTx(tx *ethtypes.Transaction) (TxData, error) {
var txData TxData
var err error

View File

@ -112,8 +112,8 @@ func (AppModule) Name() string {
// as the fee market module doesn't expose invariants.
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {}
// RegisterQueryService registers a GRPC query service to respond to the
// module-specific GRPC queries.
// RegisterServices registers the GRPC query service and migrator service to respond to the
// module-specific GRPC queries and handle the upgrade store migration for the module.
func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)