all: bump go-ethereum to v1.10.9 (#231)

* all: bump go-ethereum to v1.10.4

* build

* state transition and rpc

* wip rpc changes

* fix refund

* fixes

* no base fee param

* ante handler

* undo change

* fix test

* bump deps

* calculate base fee

* gRPC base fee query

* update RPC

* fix

* update'

* go.mod

* fix build

* fix panic

* rm changes in third_party

* json rpc changes

* reserved fields

* fixes fixes fixes

* rm no stringer

* fixes 2

* tests wip

* bump geth version

* update

* grpc traceTx

* rm fee market from ante

* fix TransactionArgs

* lint

* update proto

* update tx args

* changelog
This commit is contained in:
Federico Kunze Küllmer
2021-10-05 15:38:20 +00:00
committed by GitHub
parent cda968bddd
commit a8722655bb
44 changed files with 1020 additions and 2584 deletions
-77
View File
@@ -1,77 +0,0 @@
package types
import (
"fmt"
"math"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
ethtypes "github.com/ethereum/go-ethereum/core/types"
)
// copied from: https://github.com/ethereum/go-ethereum/blob/v1.10.3/internal/ethapi/api.go#L754
// CallArgs represents the arguments for a call.
type CallArgs struct {
From *common.Address `json:"from"`
To *common.Address `json:"to"`
Gas *hexutil.Uint64 `json:"gas"`
GasPrice *hexutil.Big `json:"gasPrice"`
Value *hexutil.Big `json:"value"`
Data *hexutil.Bytes `json:"data"`
AccessList *ethtypes.AccessList `json:"accessList"`
}
// ToMessage converts CallArgs to the Message type used by the core evm
func (args *CallArgs) ToMessage(globalGasCap uint64) ethtypes.Message {
// Set sender address or use zero address if none specified.
var addr common.Address
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 {
// log.Warn("Caller gas above allowance, capping", "requested", gas, "cap", globalGasCap)
gas = globalGasCap
}
gasPrice := new(big.Int)
if args.GasPrice != nil {
gasPrice = args.GasPrice.ToInt()
}
value := new(big.Int)
if args.Value != nil {
value = args.Value.ToInt()
}
var data []byte
if args.Data != nil {
data = *args.Data
}
var accessList ethtypes.AccessList
if args.AccessList != nil {
accessList = *args.AccessList
}
msg := ethtypes.NewMessage(addr, args.To, 0, value, gas, gasPrice, data, accessList, false)
return msg
}
// String return the struct in a string format
func (args *CallArgs) String() string {
// Todo: There is currently a bug with hexutil.Big when the value its nil, printing would trigger an exception
return fmt.Sprintf("CallArgs{From:%v, To:%v, Gas:%v,"+
" Data:%v, AccessList:%v}",
args.From,
args.To,
args.Gas,
args.Data,
args.AccessList)
}
+2 -2
View File
@@ -29,8 +29,8 @@ func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
IstanbulBlock: getBlockValue(cc.IstanbulBlock),
MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock),
BerlinBlock: getBlockValue(cc.BerlinBlock),
// LondonBlock: getBlockValue(cc.LondonBlock), // TODO: uncomment
CatalystBlock: getBlockValue(cc.CatalystBlock),
LondonBlock: getBlockValue(cc.LondonBlock),
CatalystBlock: getBlockValue(cc.CatalystBlock),
}
}
+24 -30
View File
@@ -10,7 +10,6 @@ import (
"github.com/tharsis/ethermint/types"
)
// nolint: deadcode, unused
func newDynamicFeeTx(tx *ethtypes.Transaction) *DynamicFeeTx {
txData := &DynamicFeeTx{
Nonce: tx.Nonce(),
@@ -27,17 +26,16 @@ func newDynamicFeeTx(tx *ethtypes.Transaction) *DynamicFeeTx {
amountInt := sdk.NewIntFromBigInt(tx.Value())
txData.Amount = &amountInt
}
// TODO:
// if tx.GasFeeCap() != nil {
// gasFeeCapInt := sdk.NewIntFromBigInt(tx.GasFeeCap())
// txData.GasFeeCap = &gasFeeCapInt
// }
if tx.GasFeeCap() != nil {
gasFeeCapInt := sdk.NewIntFromBigInt(tx.GasFeeCap())
txData.GasFeeCap = &gasFeeCapInt
}
// if tx.GasTipCap() != nil {
// gasTipCapInt := sdk.NewIntFromBigInt(tx.GasTipCap())
// txData.GasTipCap = &gasTipCapInt
// }
if tx.GasTipCap() != nil {
gasTipCapInt := sdk.NewIntFromBigInt(tx.GasTipCap())
txData.GasTipCap = &gasTipCapInt
}
if tx.AccessList() != nil {
al := tx.AccessList()
@@ -50,9 +48,7 @@ func newDynamicFeeTx(tx *ethtypes.Transaction) *DynamicFeeTx {
// TxType returns the tx type
func (tx *DynamicFeeTx) TxType() uint8 {
// TODO
return 0
// return ethtypes.DynamicFeeTxType
return ethtypes.DynamicFeeTxType
}
// Copy returns an instance with the same field values
@@ -145,23 +141,21 @@ func (tx *DynamicFeeTx) GetTo() *common.Address {
// AsEthereumData returns an DynamicFeeTx transaction tx from the proto-formatted
// TxData defined on the Cosmos EVM.
func (tx *DynamicFeeTx) AsEthereumData() ethtypes.TxData {
return nil
// TODO:
// v, r, s := tx.GetRawSignatureValues()
// return &ethtypes.DynamicFeeTx{
// ChainID: tx.GetChainID(),
// Nonce: tx.GetNonce(),
// GasTipCap: tx.GetGasTipCap(),
// GasFeeCap: tx.GetGasFeeCap(),
// Gas: tx.GetGas(),
// To: tx.GetTo(),
// Value: tx.GetValue(),
// Data: tx.GetData(),
// AccessList: tx.GetAccessList(),
// V: v,
// R: r,
// S: s,
// }
v, r, s := tx.GetRawSignatureValues()
return &ethtypes.DynamicFeeTx{
ChainID: tx.GetChainID(),
Nonce: tx.GetNonce(),
GasTipCap: tx.GetGasTipCap(),
GasFeeCap: tx.GetGasFeeCap(),
Gas: tx.GetGas(),
To: tx.GetTo(),
Value: tx.GetValue(),
Data: tx.GetData(),
AccessList: tx.GetAccessList(),
V: v,
R: r,
S: s,
}
}
// GetRawSignatureValues returns the V, R, S signature values of the transaction.
+175 -174
View File
@@ -521,20 +521,20 @@ type TraceConfig struct {
Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
// number of blocks the tracer is willing to go back
Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"`
// disable memory capture
DisableMemory bool `protobuf:"varint,4,opt,name=disable_memory,json=disableMemory,proto3" json:"disableMemory"`
// disable stack capture
DisableStack bool `protobuf:"varint,5,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"`
// disable storage capture
DisableStorage bool `protobuf:"varint,6,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"`
// disable return data capture
DisableReturnData bool `protobuf:"varint,7,opt,name=disable_return_data,json=disableReturnData,proto3" json:"disableReturnData"`
// print output during capture end
Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"`
// maximum length of output, but zero means unlimited
Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"`
// Chain overrides, can be used to execute a trace using future fork rules
Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"`
// enable memory capture
EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"`
// enable return data capture
EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"`
}
func (m *TraceConfig) Reset() { *m = TraceConfig{} }
@@ -591,13 +591,6 @@ func (m *TraceConfig) GetReexec() uint64 {
return 0
}
func (m *TraceConfig) GetDisableMemory() bool {
if m != nil {
return m.DisableMemory
}
return false
}
func (m *TraceConfig) GetDisableStack() bool {
if m != nil {
return m.DisableStack
@@ -612,13 +605,6 @@ func (m *TraceConfig) GetDisableStorage() bool {
return false
}
func (m *TraceConfig) GetDisableReturnData() bool {
if m != nil {
return m.DisableReturnData
}
return false
}
func (m *TraceConfig) GetDebug() bool {
if m != nil {
return m.Debug
@@ -640,6 +626,20 @@ func (m *TraceConfig) GetOverrides() *ChainConfig {
return nil
}
func (m *TraceConfig) GetEnableMemory() bool {
if m != nil {
return m.EnableMemory
}
return false
}
func (m *TraceConfig) GetEnableReturnData() bool {
if m != nil {
return m.EnableReturnData
}
return false
}
func init() {
proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params")
proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig")
@@ -654,96 +654,97 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
var fileDescriptor_d21ecc92c8c8583e = []byte{
// 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,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x14, 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,
// 1436 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x6f, 0x1b, 0x37,
0x16, 0xb7, 0x2d, 0xd9, 0x1e, 0x51, 0x23, 0x69, 0x42, 0x3b, 0x5e, 0x25, 0xc1, 0x7a, 0x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xed, 0x68, 0x06, 0x41, 0x17, 0x40,
0x1d, 0xc6, 0x88, 0xc8, 0x58, 0xea, 0xc9, 0xf3, 0x6f, 0xca, 0x58, 0x79, 0x0a, 0xd5, 0x2c, 0x92,
0x93, 0x47, 0x58, 0x60, 0x74, 0xc3, 0x72, 0x5a, 0x36, 0xca, 0xd6, 0xf2, 0x69, 0xd9, 0x58, 0xb5,
0x8c, 0x71, 0xfe, 0x7a, 0x15, 0x68, 0x6d, 0x84, 0xa7, 0xe8, 0x5d, 0xf7, 0xdd, 0xd5, 0xe6, 0xe2,
0xfb, 0xab, 0xcd, 0xc5, 0x0f, 0x57, 0x9b, 0x8b, 0xdf, 0x7d, 0xdc, 0x5c, 0x78, 0xff, 0x71, 0x73,
0xe1, 0xe7, 0x8f, 0x9b, 0x0b, 0x9f, 0x6d, 0x4f, 0xdd, 0xd8, 0xa2, 0x83, 0x19, 0x8f, 0x78, 0x6b,
0xf2, 0x5f, 0xac, 0x2f, 0xff, 0x8d, 0xc9, 0x7b, 0xbb, 0xbd, 0x22, 0xff, 0x65, 0x3d, 0xfb, 0x35,
0x00, 0x00, 0xff, 0xff, 0x1a, 0x33, 0x43, 0x0b, 0xab, 0x0d, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@@ -1319,6 +1320,26 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.EnableReturnData {
i--
if m.EnableReturnData {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x60
}
if m.EnableMemory {
i--
if m.EnableMemory {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x58
}
if m.Overrides != nil {
{
size, err := m.Overrides.MarshalToSizedBuffer(dAtA[:i])
@@ -1346,16 +1367,6 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x40
}
if m.DisableReturnData {
i--
if m.DisableReturnData {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x38
}
if m.DisableStorage {
i--
if m.DisableStorage {
@@ -1376,16 +1387,6 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x28
}
if m.DisableMemory {
i--
if m.DisableMemory {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x20
}
if m.Reexec != 0 {
i = encodeVarintEvm(dAtA, i, uint64(m.Reexec))
i--
@@ -1659,18 +1660,12 @@ func (m *TraceConfig) Size() (n int) {
if m.Reexec != 0 {
n += 1 + sovEvm(uint64(m.Reexec))
}
if m.DisableMemory {
n += 2
}
if m.DisableStack {
n += 2
}
if m.DisableStorage {
n += 2
}
if m.DisableReturnData {
n += 2
}
if m.Debug {
n += 2
}
@@ -1681,6 +1676,12 @@ func (m *TraceConfig) Size() (n int) {
l = m.Overrides.Size()
n += 1 + l + sovEvm(uint64(l))
}
if m.EnableMemory {
n += 2
}
if m.EnableReturnData {
n += 2
}
return n
}
@@ -3458,26 +3459,6 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableMemory", 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.DisableMemory = bool(v != 0)
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableStack", wireType)
@@ -3518,26 +3499,6 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error {
}
}
m.DisableStorage = bool(v != 0)
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableReturnData", 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.DisableReturnData = bool(v != 0)
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType)
@@ -3613,6 +3574,46 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EnableMemory", 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.EnableMemory = bool(v != 0)
case 12:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EnableReturnData", 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.EnableReturnData = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])
+26 -9
View File
@@ -34,23 +34,23 @@ const (
// NewTx returns a reference to a new Ethereum transaction message.
func NewTx(
chainID *big.Int, nonce uint64, to *common.Address, amount *big.Int,
gasLimit uint64, gasPrice *big.Int, input []byte, accesses *ethtypes.AccessList,
gasLimit uint64, gasPrice, gasFeeCap, gasTipCap *big.Int, input []byte, accesses *ethtypes.AccessList,
) *MsgEthereumTx {
return newMsgEthereumTx(chainID, nonce, to, amount, gasLimit, gasPrice, input, accesses)
return newMsgEthereumTx(chainID, nonce, to, amount, gasLimit, gasPrice, gasFeeCap, gasTipCap, input, accesses)
}
// NewTxContract returns a reference to a new Ethereum transaction
// message designated for contract creation.
func NewTxContract(
chainID *big.Int, nonce uint64, amount *big.Int,
gasLimit uint64, gasPrice *big.Int, input []byte, accesses *ethtypes.AccessList,
gasLimit uint64, gasPrice, gasFeeCap, gasTipCap *big.Int, input []byte, accesses *ethtypes.AccessList,
) *MsgEthereumTx {
return newMsgEthereumTx(chainID, nonce, nil, amount, gasLimit, gasPrice, input, accesses)
return newMsgEthereumTx(chainID, nonce, nil, amount, gasLimit, gasPrice, gasFeeCap, gasTipCap, input, accesses)
}
func newMsgEthereumTx(
chainID *big.Int, nonce uint64, to *common.Address, amount *big.Int,
gasLimit uint64, gasPrice *big.Int, input []byte, accesses *ethtypes.AccessList,
gasLimit uint64, gasPrice, gasFeeCap, gasTipCap *big.Int, input []byte, accesses *ethtypes.AccessList,
) *MsgEthereumTx {
var (
cid, amt, gp *sdk.Int
@@ -77,7 +77,8 @@ func newMsgEthereumTx(
gp = &gasPriceInt
}
if accesses == nil {
switch {
case accesses == nil:
txData = &LegacyTx{
Nonce: nonce,
To: toAddr,
@@ -86,7 +87,22 @@ func newMsgEthereumTx(
GasPrice: gp,
Data: input,
}
} else {
case accesses != nil && gasFeeCap != nil && gasTipCap != nil:
gtc := sdk.NewIntFromBigInt(gasTipCap)
gfc := sdk.NewIntFromBigInt(gasTipCap)
txData = &DynamicFeeTx{
ChainID: cid,
Nonce: nonce,
To: toAddr,
Amount: amt,
GasLimit: gasLimit,
GasTipCap: &gtc,
GasFeeCap: &gfc,
Data: input,
Accesses: NewAccessList(accesses),
}
case accesses != nil:
txData = &AccessListTx{
ChainID: cid,
Nonce: nonce,
@@ -97,6 +113,7 @@ func newMsgEthereumTx(
Data: input,
Accesses: NewAccessList(accesses),
}
default:
}
dataAny, err := PackTxData(txData)
@@ -237,8 +254,8 @@ func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction {
}
// AsMessage creates an Ethereum core.Message from the msg fields
func (msg MsgEthereumTx) AsMessage(signer ethtypes.Signer) (core.Message, error) {
return msg.AsTransaction().AsMessage(signer)
func (msg MsgEthereumTx) AsMessage(signer ethtypes.Signer, baseFee *big.Int) (core.Message, error) {
return msg.AsTransaction().AsMessage(signer, baseFee)
}
// GetSender extracts the sender address from the signature values using the latest signer for the given chainID.
+9 -9
View File
@@ -39,7 +39,7 @@ func (suite *MsgsTestSuite) SetupTest() {
}
func (suite *MsgsTestSuite) TestMsgEthereumTx_Constructor() {
msg := NewTx(nil, 0, &suite.to, nil, 100000, nil, []byte("test"), nil)
msg := NewTx(nil, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), nil)
// suite.Require().Equal(msg.Data.To, suite.to.Hex())
suite.Require().Equal(msg.Route(), RouterKey)
@@ -49,7 +49,7 @@ func (suite *MsgsTestSuite) TestMsgEthereumTx_Constructor() {
suite.Require().Panics(func() { msg.GetSigners() })
suite.Require().Panics(func() { msg.GetSignBytes() })
msg = NewTxContract(nil, 0, nil, 100000, nil, []byte("test"), nil)
msg = NewTxContract(nil, 0, nil, 100000, nil, nil, nil, []byte("test"), nil)
suite.Require().NotNil(msg)
// suite.Require().Empty(msg.Data.To)
// suite.Require().Nil(msg.To())
@@ -103,7 +103,7 @@ func (suite *MsgsTestSuite) TestMsgEthereumTx_ValidateBasic() {
gasPrice = tc.gasPrice.BigInt()
}
tx := NewTx(chainID, 1, &to, amount, 1000, gasPrice, nil, tc.accessList)
tx := NewTx(chainID, 1, &to, amount, 1000, gasPrice, nil, nil, nil, tc.accessList)
tx.From = tc.from
err := tx.ValidateBasic()
@@ -126,42 +126,42 @@ func (suite *MsgsTestSuite) TestMsgEthereumTx_Sign() {
}{
{
"pass - EIP2930 signer",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), &types.AccessList{}),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), &types.AccessList{}),
types.NewEIP2930Signer(suite.chainID),
func(tx *MsgEthereumTx) { tx.From = suite.from.Hex() },
true,
},
{
"pass - EIP155 signer",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), nil),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), nil),
types.NewEIP155Signer(suite.chainID),
func(tx *MsgEthereumTx) { tx.From = suite.from.Hex() },
true,
},
{
"pass - Homestead signer",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), nil),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), nil),
types.HomesteadSigner{},
func(tx *MsgEthereumTx) { tx.From = suite.from.Hex() },
true,
},
{
"pass - Frontier signer",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), nil),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), nil),
types.FrontierSigner{},
func(tx *MsgEthereumTx) { tx.From = suite.from.Hex() },
true,
},
{
"no from address ",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), &types.AccessList{}),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), &types.AccessList{}),
types.NewEIP2930Signer(suite.chainID),
func(tx *MsgEthereumTx) { tx.From = "" },
false,
},
{
"from address ≠ signer address",
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, []byte("test"), &types.AccessList{}),
NewTx(suite.chainID, 0, &suite.to, nil, 100000, nil, nil, nil, []byte("test"), &types.AccessList{}),
types.NewEIP2930Signer(suite.chainID),
func(tx *MsgEthereumTx) { tx.From = suite.to.Hex() },
false,
+1 -1
View File
@@ -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}
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
)
// ParamKeyTable returns the parameter key table.
+10
View File
@@ -1,9 +1,19 @@
package types
import (
"math/big"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
)
func (cr EthCallRequest) GetBaseFee() *big.Int {
if cr.BaseFee == nil {
return nil
}
return cr.BaseFee.BigInt()
}
// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces
func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
return m.Msg.UnpackInterfaces(unpacker)
+129 -72
View File
@@ -6,6 +6,7 @@ package types
import (
context "context"
fmt "fmt"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
query "github.com/cosmos/cosmos-sdk/types/query"
_ "github.com/gogo/protobuf/gogoproto"
grpc1 "github.com/gogo/protobuf/grpc"
@@ -787,6 +788,8 @@ type EthCallRequest struct {
Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"`
// the default gas cap to be used
GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"`
// header base fee used to generate the transaction
BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"`
}
func (m *EthCallRequest) Reset() { *m = EthCallRequest{} }
@@ -1018,78 +1021,80 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) }
var fileDescriptor_e15a877459347994 = []byte{
// 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, 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, 0xc7, 0x44, 0x69, 0x82, 0x55, 0x49, 0x60, 0xa2, 0xc5, 0x24, 0x81,
0x32, 0x4b, 0xd4, 0x83, 0x9c, 0x36, 0x4b, 0xb4, 0x9a, 0xcc, 0x19, 0xf7, 0x51, 0x73, 0x73, 0x9c,
0x99, 0x85, 0xba, 0x96, 0xd4, 0x5d, 0x46, 0x66, 0x52, 0x97, 0xf0, 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,
// 1167 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, 0x1c, 0x27, 0x7d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 0x9e, 0x4b, 0x7d, 0xbe, 0x19, 0x19, 0x58, 0xbc,
0x8a, 0x03, 0x56, 0x63, 0x91, 0x38, 0x1d, 0x19, 0x49, 0x8e, 0xad, 0xf2, 0xa4, 0xfc, 0xcb, 0xf0,
0xee, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0x5e, 0xad, 0xda, 0xfb, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -2086,6 +2091,18 @@ func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.BaseFee != nil {
{
size := m.BaseFee.Size()
i -= size
if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.GasCap != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.GasCap))
i--
@@ -2470,6 +2487,10 @@ func (m *EthCallRequest) Size() (n int) {
if m.GasCap != 0 {
n += 1 + sovQuery(uint64(m.GasCap))
}
if m.BaseFee != nil {
l = m.BaseFee.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
@@ -4122,6 +4143,42 @@ func (m *EthCallRequest) Unmarshal(dAtA []byte) error {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var v github_com_cosmos_cosmos_sdk_types.Int
m.BaseFee = &v
if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
+7
View File
@@ -129,6 +129,13 @@ func NewNoOpTracer() *NoOpTracer {
func (dt NoOpTracer) CaptureStart(env *vm.EVM, from, to common.Address, create bool, input []byte, gas uint64, value *big.Int) {
}
// CaptureEnter implements vm.Tracer interface
func (dt NoOpTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
}
// CaptureExit implements vm.Tracer interface
func (dt NoOpTracer) CaptureExit(output []byte, gasUsed uint64, err error) {}
// CaptureState implements vm.Tracer interface
func (dt NoOpTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) {
}
+131 -60
View File
@@ -3,11 +3,12 @@ package types
import (
"errors"
"fmt"
math "math"
"math/big"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/math"
ethtypes "github.com/ethereum/go-ethereum/core/types"
)
@@ -54,26 +55,14 @@ func (args *TransactionArgs) String() string {
// 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
chainID, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas sdk.Int
gas, nonce uint64
from, to string
)
// 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()
chainID = sdk.NewIntFromBigInt(args.ChainID.ToInt())
}
if args.Nonce != nil {
@@ -85,54 +74,98 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx {
}
if args.GasPrice != nil {
gasPrice = args.GasPrice.ToInt()
gasPrice = sdk.NewIntFromBigInt(args.GasPrice.ToInt())
}
// if args.MaxFeePerGas != nil {
// maxFeePerGas = args.MaxFeePerGas.ToInt()
// }
if args.MaxFeePerGas != nil {
maxFeePerGas = sdk.NewIntFromBigInt(args.MaxFeePerGas.ToInt())
}
// if args.MaxPriorityFeePerGas != nil {
// maxPriorityFeePerGas = args.MaxPriorityFeePerGas.ToInt()
// }
if args.MaxPriorityFeePerGas != nil {
maxPriorityFeePerGas = sdk.NewIntFromBigInt(args.MaxPriorityFeePerGas.ToInt())
}
if args.GasPrice != nil {
gasPrice = args.GasPrice.ToInt()
gasPrice = sdk.NewIntFromBigInt(args.GasPrice.ToInt())
}
if args.Value != nil {
value = args.Value.ToInt()
value = sdk.NewIntFromBigInt(args.Value.ToInt())
}
tx := NewTx(chainID, nonce, args.To, value, gas, gasPrice, input, args.AccessList)
tx.From = addr.Hex()
if args.To != nil {
to = args.To.Hex()
}
return tx
var data TxData
switch {
case args.MaxFeePerGas != nil:
al := AccessList{}
if args.AccessList != nil {
al = NewAccessList(args.AccessList)
}
data = &DynamicFeeTx{
To: to,
ChainID: &chainID,
Nonce: nonce,
GasLimit: gas,
GasFeeCap: &maxFeePerGas,
GasTipCap: &maxPriorityFeePerGas,
Amount: &value,
Data: args.data(),
Accesses: al,
}
case args.AccessList != nil:
data = &AccessListTx{
To: to,
ChainID: &chainID,
Nonce: nonce,
GasLimit: gas,
GasPrice: &gasPrice,
Amount: &value,
Data: args.data(),
Accesses: NewAccessList(args.AccessList),
}
default:
data = &LegacyTx{
To: to,
Nonce: nonce,
GasLimit: gas,
GasPrice: &gasPrice,
Amount: &value,
Data: args.data(),
}
}
any, err := PackTxData(data)
if err != nil {
return nil
}
if args.From != nil {
from = args.From.Hex()
}
return &MsgEthereumTx{
Data: any,
From: from,
}
}
// 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
)
func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (ethtypes.Message, error) {
// 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
}
addr := args.from()
// Set default gas & gas price if none were set
gas = globalGasCap
gas := globalGasCap
if gas == 0 {
gas = uint64(math.MaxUint64 / 2)
}
@@ -142,31 +175,69 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64) (ethtypes.Message, e
if globalGasCap != 0 && globalGasCap < gas {
gas = globalGasCap
}
if args.GasPrice != nil {
gasPrice = args.GasPrice.ToInt()
var (
gasPrice *big.Int
gasFeeCap *big.Int
gasTipCap *big.Int
)
if baseFee == nil {
// If there's no basefee, then it must be a non-1559 execution
gasPrice = new(big.Int)
if args.GasPrice != nil {
gasPrice = args.GasPrice.ToInt()
}
gasFeeCap, gasTipCap = gasPrice, gasPrice
} else {
// A basefee is provided, necessitating 1559-type execution
if args.GasPrice != nil {
// User specified the legacy gas field, convert to 1559 gas typing
gasPrice = args.GasPrice.ToInt()
gasFeeCap, gasTipCap = gasPrice, gasPrice
} else {
// User specified 1559 gas feilds (or none), use those
gasFeeCap = new(big.Int)
if args.MaxFeePerGas != nil {
gasFeeCap = args.MaxFeePerGas.ToInt()
}
gasTipCap = new(big.Int)
if args.MaxPriorityFeePerGas != nil {
gasTipCap = args.MaxPriorityFeePerGas.ToInt()
}
// Backfill the legacy gasPrice for EVM execution, unless we're all zeroes
gasPrice = new(big.Int)
if gasFeeCap.BitLen() > 0 || gasTipCap.BitLen() > 0 {
gasPrice = math.BigMin(new(big.Int).Add(gasTipCap, baseFee), gasFeeCap)
}
}
}
value := new(big.Int)
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
}
data := 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)
msg := ethtypes.NewMessage(addr, args.To, 0, value, gas, gasPrice, gasFeeCap, gasTipCap, data, accessList, true)
return msg, nil
}
// from retrieves the transaction sender address.
func (args *TransactionArgs) from() common.Address {
if args.From == nil {
return common.Address{}
}
return *args.From
}
// data retrieves the transaction calldata. Input field is preferred.
func (args *TransactionArgs) data() []byte {
if args.Input != nil {
return *args.Input
}
if args.Data != nil {
return *args.Data
}
return nil
}
+2 -2
View File
@@ -43,8 +43,8 @@ type TxData interface {
func NewTxDataFromTx(tx *ethtypes.Transaction) TxData {
var txData TxData
switch tx.Type() {
// case ethtypes.DynamicFeeTxType:
// txData = newDynamicFeeTx(tx)
case ethtypes.DynamicFeeTxType:
txData = newDynamicFeeTx(tx)
case ethtypes.AccessListTxType:
txData = newAccessListTx(tx)
default:
+1 -1
View File
@@ -59,7 +59,7 @@ func TestUnwrapEthererumMsg(t *testing.T) {
_, err = evmtypes.UnwrapEthereumMsg(&tx)
require.NotNil(t, err)
msg := evmtypes.NewTx(big.NewInt(1), 0, &common.Address{}, big.NewInt(0), 0, big.NewInt(0), []byte{}, nil)
msg := evmtypes.NewTx(big.NewInt(1), 0, &common.Address{}, big.NewInt(0), 0, big.NewInt(0), nil, nil, []byte{}, nil)
err = builder.SetMsgs(msg)
tx = builder.GetTx().(sdk.Tx)