From 65e1a4aa1bd218246af218199516f49b76a6bcaa Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 24 May 2022 12:03:43 -0400 Subject: [PATCH 01/11] eip712 with multiple msgs --- app/ante/ante_test.go | 13 ++++++++++ app/ante/eip712.go | 50 ++++++++++++++++++++++++++++++++++++--- app/ante/utils_test.go | 22 +++++++++++------ ethereum/eip712/eip712.go | 38 ++++++++++++++++++----------- 4 files changed, 99 insertions(+), 24 deletions(-) diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 9762e3db5a..773ae1a19a 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -4,6 +4,8 @@ import ( "math/big" "strings" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -324,6 +326,17 @@ func (suite AnteTestSuite) TestAnteHandler() { return txBuilder.GetTx() }, false, false, true, }, + { + "success - DeliverTx EIP712 signed Cosmos Tx with multiple messages", + func() sdk.Tx { + from := acc.GetAddress() + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + amount := sdk.NewCoins(coinAmount) + gas := uint64(200000) + txBuilder := suite.CreateTestEIP712TxBuilderMultipleMsgs(from, privKey, "ethermint_9000-1", gas, amount) + return txBuilder.GetTx() + }, false, false, true, + }, { "fails - DeliverTx EIP712 signed Cosmos Tx with wrong Chain ID", func() sdk.Tx { diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 9de0d191b4..08029bc7ad 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -1,9 +1,11 @@ package ante import ( + "encoding/json" "fmt" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -162,7 +164,7 @@ func VerifySignature( return sdkerrors.Wrap(sdkerrors.ErrNoSignatures, "tx doesn't contain any msgs to verify signature") } - txBytes := legacytx.StdSignBytes( + txBytes := EIP712SignBytes( signerData.ChainID, signerData.AccountNumber, signerData.Sequence, @@ -173,7 +175,6 @@ func VerifySignature( }, msgs, tx.GetMemo(), ) - signerChainID, err := ethermint.ParseChainID(signerData.ChainID) if err != nil { return sdkerrors.Wrapf(err, "failed to parse chainID: %s", signerData.ChainID) @@ -215,7 +216,7 @@ func VerifySignature( FeePayer: feePayer, } - typedData, err := eip712.WrapTxToTypedData(ethermintCodec, extOpt.TypedDataChainID, msgs[0], txBytes, feeDelegation) + typedData, err := eip712.WrapTxToTypedData(ethermintCodec, extOpt.TypedDataChainID, msgs, txBytes, feeDelegation) if err != nil { return sdkerrors.Wrap(err, "failed to pack tx data in EIP712 object") } @@ -270,3 +271,46 @@ func VerifySignature( return sdkerrors.Wrapf(sdkerrors.ErrTooManySignatures, "unexpected SignatureData %T", sigData) } } + +type EIP712SignDoc struct { + AccountNumber uint64 `json:"account_number" yaml:"account_number"` + Sequence uint64 `json:"sequence" yaml:"sequence"` + TimeoutHeight uint64 `json:"timeout_height,omitempty" yaml:"timeout_height"` + ChainID string `json:"chain_id" yaml:"chain_id"` + Memo string `json:"memo" yaml:"memo"` + Fee json.RawMessage `json:"fee" yaml:"fee"` +} + +// StdSignBytes returns the bytes to sign for a transaction. +func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { + msgsBytes := make([]json.RawMessage, 0, len(msgs)) + for _, msg := range msgs { + legacyMsg, ok := msg.(legacytx.LegacyMsg) + if !ok { + panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) + } + + msgsBytes = append(msgsBytes, json.RawMessage(legacyMsg.GetSignBytes())) + } + + signDoc := EIP712SignDoc{ + AccountNumber: accnum, + ChainID: chainID, + Fee: json.RawMessage(fee.Bytes()), + Memo: memo, + Sequence: sequence, + TimeoutHeight: timeout, + } + var inInterface map[string]interface{} + inrec, _ := legacy.Cdc.MarshalJSON(signDoc) + json.Unmarshal(inrec, &inInterface) + for i := 0; i < len(msgsBytes); i++ { + inInterface[fmt.Sprintf("message%d", i+1)] = msgsBytes[i] + } + bz, err := json.Marshal(inInterface) + if err != nil { + panic(err) + } + + return sdk.MustSortJSON(bz) +} diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index 8e2b6ef07b..e6b7d7968b 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -216,7 +216,7 @@ func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMsgSend(from sdk.AccAddress // Build MsgSend recipient := sdk.AccAddress(common.Address{}.Bytes()) msgSend := types2.NewMsgSend(from, recipient, sdk.NewCoins(sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(1)))) - return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, msgSend) + return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, []sdk.Msg{msgSend}) } func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMsgDelegate(from sdk.AccAddress, priv cryptotypes.PrivKey, chainId string, gas uint64, gasAmount sdk.Coins) client.TxBuilder { @@ -224,11 +224,20 @@ func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMsgDelegate(from sdk.AccAdd valEthAddr := tests.GenerateAddress() valAddr := sdk.ValAddress(valEthAddr.Bytes()) msgSend := types3.NewMsgDelegate(from, valAddr, sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20))) - return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, msgSend) + return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, []sdk.Msg{msgSend}) +} + +func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMultipleMsgs(from sdk.AccAddress, priv cryptotypes.PrivKey, chainId string, gas uint64, gasAmount sdk.Coins) client.TxBuilder { + valEthAddr := tests.GenerateAddress() + valAddr := sdk.ValAddress(valEthAddr.Bytes()) + recipient := sdk.AccAddress(common.Address{}.Bytes()) + msgSend := types2.NewMsgSend(from, recipient, sdk.NewCoins(sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(1)))) + msgDelegate := types3.NewMsgDelegate(from, valAddr, sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20))) + return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, []sdk.Msg{msgSend, msgDelegate}) } func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( - from sdk.AccAddress, priv cryptotypes.PrivKey, chainId string, gas uint64, gasAmount sdk.Coins, msg sdk.Msg, + from sdk.AccAddress, priv cryptotypes.PrivKey, chainId string, gas uint64, gasAmount sdk.Coins, msgs []sdk.Msg, ) client.TxBuilder { var err error @@ -244,12 +253,11 @@ func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( fee := legacytx.NewStdFee(gas, gasAmount) accNumber := suite.app.AccountKeeper.GetAccount(suite.ctx, from).GetAccountNumber() - data := legacytx.StdSignBytes(chainId, accNumber, nonce, 0, fee, []sdk.Msg{msg}, "") - typedData, err := eip712.WrapTxToTypedData(ethermintCodec, ethChainId, msg, data, &eip712.FeeDelegationOptions{ + data := ante.EIP712SignBytes(chainId, accNumber, nonce, 0, fee, msgs, "") + typedData, err := eip712.WrapTxToTypedData(ethermintCodec, ethChainId, msgs, data, &eip712.FeeDelegationOptions{ FeePayer: from, }) suite.Require().NoError(err) - sigHash, err := eip712.ComputeTypedDataHash(typedData) suite.Require().NoError(err) @@ -288,7 +296,7 @@ func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( err = builder.SetSignatures(sigsV2) suite.Require().NoError(err) - err = builder.SetMsgs(msg) + err = builder.SetMsgs(msgs...) suite.Require().NoError(err) return builder diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 35a05dc244..98fda221ce 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -41,7 +41,7 @@ func ComputeTypedDataHash(typedData apitypes.TypedData) ([]byte, error) { func WrapTxToTypedData( cdc codectypes.AnyUnpacker, chainID uint64, - msg sdk.Msg, + msgs []sdk.Msg, data []byte, feeDelegation *FeeDelegationOptions, ) (apitypes.TypedData, error) { @@ -52,14 +52,14 @@ func WrapTxToTypedData( } domain := apitypes.TypedDataDomain{ - Name: "Cosmos Web3", + Name: "Kava Cosmos", Version: "1.0.0", ChainId: math.NewHexOrDecimal256(int64(chainID)), - VerifyingContract: "cosmos", + VerifyingContract: "kavaCosmos", Salt: "0", } - msgTypes, err := extractMsgTypes(cdc, "MsgValue", msg) + msgTypes, err := extractMsgTypes(cdc, msgs) if err != nil { return apitypes.TypedData{}, err } @@ -94,7 +94,7 @@ type FeeDelegationOptions struct { FeePayer sdk.AccAddress } -func extractMsgTypes(cdc codectypes.AnyUnpacker, msgTypeName string, msg sdk.Msg) (apitypes.Types, error) { +func extractMsgTypes(cdc codectypes.AnyUnpacker, msgs []sdk.Msg) (apitypes.Types, error) { rootTypes := apitypes.Types{ "EIP712Domain": { { @@ -123,7 +123,6 @@ func extractMsgTypes(cdc codectypes.AnyUnpacker, msgTypeName string, msg sdk.Msg {Name: "chain_id", Type: "string"}, {Name: "fee", Type: "Fee"}, {Name: "memo", Type: "string"}, - {Name: "msgs", Type: "Msg[]"}, {Name: "sequence", Type: "string"}, // Note timeout_height was removed because it was not getting filled with the legacyTx // {Name: "timeout_height", Type: "string"}, @@ -136,17 +135,28 @@ func extractMsgTypes(cdc codectypes.AnyUnpacker, msgTypeName string, msg sdk.Msg {Name: "denom", Type: "string"}, {Name: "amount", Type: "string"}, }, - "Msg": { - {Name: "type", Type: "string"}, - {Name: "value", Type: msgTypeName}, - }, - msgTypeName: {}, } - if err := walkFields(cdc, rootTypes, msgTypeName, msg); err != nil { - return nil, err - } + // Add definitions for all messages + for i := 0; i < len(msgs); i++ { + msgTypeName := fmt.Sprintf("Msg%d", i+1) + msgAttrName := fmt.Sprintf("message%d", i+1) + msgValName := fmt.Sprintf("MsgValue%d", i+1) + + // Add message to Tx type + rootTypes["Tx"] = append(rootTypes["Tx"], apitypes.Type{Name: msgAttrName, Type: msgTypeName}) + // Add message type + rootTypes[msgTypeName] = []apitypes.Type{ + {Name: "type", Type: "string"}, + {Name: "value", Type: msgValName}, + } + + // Add message value type + if err := walkFields(cdc, rootTypes, msgValName, msgs[i]); err != nil { + return nil, err + } + } return rootTypes, nil } From 739c1911b50d1fe19ca8c45acb6e29c7b59fa04d Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 24 May 2022 14:41:12 -0400 Subject: [PATCH 02/11] logs --- app/ante/eip712.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 08029bc7ad..29c007e9df 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -251,7 +251,7 @@ func VerifySignature( } if !pubKey.Equals(pk) { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "feePayer pubkey %s is different from transaction pubkey %s", pubKey, pk) + return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "feePayer pubkey %s is different from transaction pubkey %s", pubKey.Address(), pk.Address()) } recoveredFeePayerAcc := sdk.AccAddress(pk.Address().Bytes()) From 77391f9f3b38792b7c13e4be55843b760bb9aa23 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Thu, 2 Jun 2022 12:13:22 -0400 Subject: [PATCH 03/11] clean up eip712 changes --- app/ante/eip712.go | 52 ++++------------------------ app/ante/utils_test.go | 4 +-- ethereum/eip712/eip712.go | 71 ++++++++++++++++++++++++++++++++------- 3 files changed, 67 insertions(+), 60 deletions(-) diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 29c007e9df..ee7e1a8434 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -1,11 +1,9 @@ package ante import ( - "encoding/json" "fmt" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -164,7 +162,7 @@ func VerifySignature( return sdkerrors.Wrap(sdkerrors.ErrNoSignatures, "tx doesn't contain any msgs to verify signature") } - txBytes := EIP712SignBytes( + txBytes := eip712.EIP712SignBytes( signerData.ChainID, signerData.AccountNumber, signerData.Sequence, @@ -241,6 +239,11 @@ func VerifySignature( return sdkerrors.Wrap(err, "failed to recover delegated fee payer from sig") } + // fmt.Printf("feePayerSig: %s\n", hex.EncodeToString(feePayerSig)) + // fmt.Printf("sigHash: %s\n", hex.EncodeToString(sigHash)) + // by, _ := json.Marshal(typedData) + // fmt.Printf("typedData: %s\n", by) + ecPubKey, err := ethcrypto.UnmarshalPubkey(feePayerPubkey) if err != nil { return sdkerrors.Wrap(err, "failed to unmarshal recovered fee payer pubkey") @@ -271,46 +274,3 @@ func VerifySignature( return sdkerrors.Wrapf(sdkerrors.ErrTooManySignatures, "unexpected SignatureData %T", sigData) } } - -type EIP712SignDoc struct { - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - TimeoutHeight uint64 `json:"timeout_height,omitempty" yaml:"timeout_height"` - ChainID string `json:"chain_id" yaml:"chain_id"` - Memo string `json:"memo" yaml:"memo"` - Fee json.RawMessage `json:"fee" yaml:"fee"` -} - -// StdSignBytes returns the bytes to sign for a transaction. -func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { - msgsBytes := make([]json.RawMessage, 0, len(msgs)) - for _, msg := range msgs { - legacyMsg, ok := msg.(legacytx.LegacyMsg) - if !ok { - panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) - } - - msgsBytes = append(msgsBytes, json.RawMessage(legacyMsg.GetSignBytes())) - } - - signDoc := EIP712SignDoc{ - AccountNumber: accnum, - ChainID: chainID, - Fee: json.RawMessage(fee.Bytes()), - Memo: memo, - Sequence: sequence, - TimeoutHeight: timeout, - } - var inInterface map[string]interface{} - inrec, _ := legacy.Cdc.MarshalJSON(signDoc) - json.Unmarshal(inrec, &inInterface) - for i := 0; i < len(msgsBytes); i++ { - inInterface[fmt.Sprintf("message%d", i+1)] = msgsBytes[i] - } - bz, err := json.Marshal(inInterface) - if err != nil { - panic(err) - } - - return sdk.MustSortJSON(bz) -} diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index e6b7d7968b..2e85640f71 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -233,7 +233,7 @@ func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMultipleMsgs(from sdk.AccAd recipient := sdk.AccAddress(common.Address{}.Bytes()) msgSend := types2.NewMsgSend(from, recipient, sdk.NewCoins(sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(1)))) msgDelegate := types3.NewMsgDelegate(from, valAddr, sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20))) - return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, []sdk.Msg{msgSend, msgDelegate}) + return suite.CreateTestEIP712CosmosTxBuilder(from, priv, chainId, gas, gasAmount, []sdk.Msg{msgSend, msgDelegate, msgDelegate, msgSend}) } func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( @@ -253,7 +253,7 @@ func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( fee := legacytx.NewStdFee(gas, gasAmount) accNumber := suite.app.AccountKeeper.GetAccount(suite.ctx, from).GetAccountNumber() - data := ante.EIP712SignBytes(chainId, accNumber, nonce, 0, fee, msgs, "") + data := eip712.EIP712SignBytes(chainId, accNumber, nonce, 0, fee, msgs, "") typedData, err := eip712.WrapTxToTypedData(ethermintCodec, ethChainId, msgs, data, &eip712.FeeDelegationOptions{ FeePayer: from, }) diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 98fda221ce..5d0767842d 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -11,6 +11,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" @@ -18,6 +19,35 @@ import ( "github.com/ethereum/go-ethereum/signer/core/apitypes" ) +// EIP712SignBytes returns the bytes to sign for a transaction. +func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { + signBytes := legacytx.StdSignBytes(chainID, accnum, sequence, timeout, fee, msgs, memo) + var inInterface map[string]interface{} + json.Unmarshal(signBytes, &inInterface) + delete(inInterface, "msgs") + + // Add messages as separate fields + msgsBytes := make([]json.RawMessage, 0, len(msgs)) + for _, msg := range msgs { + legacyMsg, ok := msg.(legacytx.LegacyMsg) + if !ok { + panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) + } + + msgsBytes = append(msgsBytes, json.RawMessage(legacyMsg.GetSignBytes())) + } + + for i := 0; i < len(msgsBytes); i++ { + inInterface[fmt.Sprintf("msg%d", i+1)] = msgsBytes[i] + } + bz, err := json.Marshal(inInterface) + if err != nil { + panic(err) + } + + return sdk.MustSortJSON(bz) +} + // ComputeTypedDataHash computes keccak hash of typed data for signing. func ComputeTypedDataHash(typedData apitypes.TypedData) ([]byte, error) { domainSeparator, err := typedData.HashStruct("EIP712Domain", typedData.Domain.Map()) @@ -138,24 +168,41 @@ func extractMsgTypes(cdc codectypes.AnyUnpacker, msgs []sdk.Msg) (apitypes.Types } // Add definitions for all messages + cachedTypes := make(map[string]string) + msgTypeIndex := 1 for i := 0; i < len(msgs); i++ { - msgTypeName := fmt.Sprintf("Msg%d", i+1) - msgAttrName := fmt.Sprintf("message%d", i+1) - msgValName := fmt.Sprintf("MsgValue%d", i+1) + msg := msgs[i] + msgAttrName := fmt.Sprintf("msg%d", i+1) + msgTypeName := fmt.Sprintf("Msg%d", msgTypeIndex) + msgValName := fmt.Sprintf("MsgValue%d", msgTypeIndex) - // Add message to Tx type - rootTypes["Tx"] = append(rootTypes["Tx"], apitypes.Type{Name: msgAttrName, Type: msgTypeName}) + msgType := apitypes.Type{Name: msgAttrName, Type: msgTypeName} - // Add message type - rootTypes[msgTypeName] = []apitypes.Type{ - {Name: "type", Type: "string"}, - {Name: "value", Type: msgValName}, + // Add new types if not already created + legacyMsg, ok := msg.(legacytx.LegacyMsg) + if !ok { + panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) } + legacyMsgType := legacyMsg.Type() + if len(cachedTypes[legacyMsgType]) == 0 { + // Add message type + rootTypes[msgTypeName] = []apitypes.Type{ + {Name: "type", Type: "string"}, + {Name: "value", Type: msgValName}, + } + + // Add message value type + if err := walkFields(cdc, rootTypes, msgValName, msg); err != nil { + return nil, err + } - // Add message value type - if err := walkFields(cdc, rootTypes, msgValName, msgs[i]); err != nil { - return nil, err + cachedTypes[legacyMsgType] = msgTypeName + msgTypeIndex += 1 + } else { + msgType.Type = cachedTypes[legacyMsgType] } + + rootTypes["Tx"] = append(rootTypes["Tx"], msgType) } return rootTypes, nil } From 44584ad5dadf01311b36b911b96c3df298c818f8 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Thu, 2 Jun 2022 12:18:06 -0400 Subject: [PATCH 04/11] revert log changes --- app/ante/eip712.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/ante/eip712.go b/app/ante/eip712.go index ee7e1a8434..bc918ea021 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -239,11 +239,6 @@ func VerifySignature( return sdkerrors.Wrap(err, "failed to recover delegated fee payer from sig") } - // fmt.Printf("feePayerSig: %s\n", hex.EncodeToString(feePayerSig)) - // fmt.Printf("sigHash: %s\n", hex.EncodeToString(sigHash)) - // by, _ := json.Marshal(typedData) - // fmt.Printf("typedData: %s\n", by) - ecPubKey, err := ethcrypto.UnmarshalPubkey(feePayerPubkey) if err != nil { return sdkerrors.Wrap(err, "failed to unmarshal recovered fee payer pubkey") @@ -254,7 +249,7 @@ func VerifySignature( } if !pubKey.Equals(pk) { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "feePayer pubkey %s is different from transaction pubkey %s", pubKey.Address(), pk.Address()) + return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "feePayer pubkey %s is different from transaction pubkey %s", pubKey, pk) } recoveredFeePayerAcc := sdk.AccAddress(pk.Address().Bytes()) From 84f392ea2d1c3be0a7e8eb964872b916afb15a83 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Thu, 2 Jun 2022 12:19:57 -0400 Subject: [PATCH 05/11] handler errors --- ethereum/eip712/eip712.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 5d0767842d..87a3b47a95 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -23,7 +23,10 @@ import ( func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { signBytes := legacytx.StdSignBytes(chainID, accnum, sequence, timeout, fee, msgs, memo) var inInterface map[string]interface{} - json.Unmarshal(signBytes, &inInterface) + err := json.Unmarshal(signBytes, &inInterface) + if err != nil { + panic(err) + } delete(inInterface, "msgs") // Add messages as separate fields From e7d4850a05db3b22eeb674d623c27431c36a3254 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 19 Jul 2022 14:50:56 -0400 Subject: [PATCH 06/11] EIP712 with whitelist --- app/ante/ante_test.go | 24 +- app/ante/eip712.go | 10 +- app/ante/handler_options.go | 2 +- app/ante/utils_test.go | 8 +- docs/api/proto-docs.md | 53 ++ ethereum/eip712/eip712.go | 445 ++----------- ethereum/eip712/msg_test.go | 156 +++++ ethereum/eip712/types.go | 60 ++ proto/ethermint/evm/v1/evm.proto | 32 + x/evm/types/evm.pb.go | 1027 +++++++++++++++++++++++++++--- x/evm/types/params.go | 68 +- x/evm/types/params_test.go | 21 +- 12 files changed, 1396 insertions(+), 510 deletions(-) create mode 100644 ethereum/eip712/msg_test.go create mode 100644 ethereum/eip712/types.go diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 773ae1a19a..1273441eec 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -4,8 +4,6 @@ import ( "math/big" "strings" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -28,6 +26,28 @@ func (suite AnteTestSuite) TestAnteHandler() { suite.app.EvmKeeper.SetBalance(suite.ctx, addr, big.NewInt(10000000000)) + // allow send & delegate msg via eip712 + params := suite.app.EvmKeeper.GetParams(suite.ctx) + params.EIP712AllowedMsgs = []evmtypes.EIP712AllowedMsg{ + { + LegacyMsgType: "send", + ValueTypes: []evmtypes.EIP712MsgAttrType{ + {Name: "from_address", Type: "string"}, + {Name: "to_address", Type: "string"}, + {Name: "amount", Type: "Coin[]"}, + }, + }, + { + LegacyMsgType: "delegate", + ValueTypes: []evmtypes.EIP712MsgAttrType{ + {Name: "delegator_address", Type: "string"}, + {Name: "validator_address", Type: "string"}, + {Name: "amount", Type: "Coin"}, + }, + }, + } + suite.app.EvmKeeper.SetParams(suite.ctx, params) + suite.app.FeeMarketKeeper.SetBaseFee(suite.ctx, big.NewInt(100)) testCases := []struct { diff --git a/app/ante/eip712.go b/app/ante/eip712.go index bc918ea021..929067b197 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -37,13 +37,15 @@ func init() { type Eip712SigVerificationDecorator struct { ak evmtypes.AccountKeeper signModeHandler authsigning.SignModeHandler + evmKeeper EVMKeeper } // NewEip712SigVerificationDecorator creates a new Eip712SigVerificationDecorator -func NewEip712SigVerificationDecorator(ak evmtypes.AccountKeeper, signModeHandler authsigning.SignModeHandler) Eip712SigVerificationDecorator { +func NewEip712SigVerificationDecorator(ak evmtypes.AccountKeeper, signModeHandler authsigning.SignModeHandler, ek EVMKeeper) Eip712SigVerificationDecorator { return Eip712SigVerificationDecorator{ ak: ak, signModeHandler: signModeHandler, + evmKeeper: ek, } } @@ -126,7 +128,8 @@ func (svd Eip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, return next(ctx, tx, simulate) } - if err := VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, authSignTx); err != nil { + evmParams := svd.evmKeeper.GetParams(ctx) + if err := VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, authSignTx, evmParams); err != nil { errMsg := fmt.Errorf("signature verification failed; please verify account number (%d) and chain-id (%s): %w", accNum, chainID, err) return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg.Error()) } @@ -142,6 +145,7 @@ func VerifySignature( sigData signing.SignatureData, _ authsigning.SignModeHandler, tx authsigning.Tx, + params evmtypes.Params, ) error { switch data := sigData.(type) { case *signing.SingleSignatureData: @@ -214,7 +218,7 @@ func VerifySignature( FeePayer: feePayer, } - typedData, err := eip712.WrapTxToTypedData(ethermintCodec, extOpt.TypedDataChainID, msgs, txBytes, feeDelegation) + typedData, err := eip712.WrapTxToTypedData(extOpt.TypedDataChainID, msgs, txBytes, feeDelegation, params) if err != nil { return sdkerrors.Wrap(err, "failed to pack tx data in EIP712 object") } diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index 1eb9baf9ef..67364ea49c 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -98,7 +98,7 @@ func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), // Note: signature verification uses EIP instead of the cosmos signature validator - NewEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + NewEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.EvmKeeper), ante.NewIncrementSequenceDecorator(options.AccountKeeper), ibcante.NewAnteDecorator(options.IBCKeeper), ) diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index 2e85640f71..fa20ac3924 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -5,7 +5,6 @@ import ( "testing" "time" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" types2 "github.com/cosmos/cosmos-sdk/x/bank/types" types3 "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -249,15 +248,16 @@ func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( ethChainId := pc.Uint64() // GenerateTypedData TypedData - var ethermintCodec codec.ProtoCodecMarshaler fee := legacytx.NewStdFee(gas, gasAmount) accNumber := suite.app.AccountKeeper.GetAccount(suite.ctx, from).GetAccountNumber() data := eip712.EIP712SignBytes(chainId, accNumber, nonce, 0, fee, msgs, "") - typedData, err := eip712.WrapTxToTypedData(ethermintCodec, ethChainId, msgs, data, &eip712.FeeDelegationOptions{ + evmParams := suite.app.EvmKeeper.GetParams(suite.ctx) + typedData, err := eip712.WrapTxToTypedData(ethChainId, msgs, data, &eip712.FeeDelegationOptions{ FeePayer: from, - }) + }, evmParams) suite.Require().NoError(err) + sigHash, err := eip712.ComputeTypedDataHash(typedData) suite.Require().NoError(err) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 1954f88ea9..9aed4c8b4f 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -11,6 +11,9 @@ - [ethermint/evm/v1/evm.proto](#ethermint/evm/v1/evm.proto) - [AccessTuple](#ethermint.evm.v1.AccessTuple) - [ChainConfig](#ethermint.evm.v1.ChainConfig) + - [EIP712AllowedMsg](#ethermint.evm.v1.EIP712AllowedMsg) + - [EIP712MsgAttrType](#ethermint.evm.v1.EIP712MsgAttrType) + - [EIP712NestedMsgType](#ethermint.evm.v1.EIP712NestedMsgType) - [Log](#ethermint.evm.v1.Log) - [Params](#ethermint.evm.v1.Params) - [State](#ethermint.evm.v1.State) @@ -187,6 +190,55 @@ instead of *big.Int. + + +### EIP712AllowedMsg +EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `legacy_msg_type` | [string](#string) | | legacy msg type string | +| `value_types` | [EIP712MsgAttrType](#ethermint.evm.v1.EIP712MsgAttrType) | repeated | types of the msg value | +| `nested_types` | [EIP712NestedMsgType](#ethermint.evm.v1.EIP712NestedMsgType) | repeated | nested types of the msg value | + + + + + + + + +### EIP712MsgAttrType +EIP712MsgAttrType is the eip712 type of a single message attribute. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | | +| `type` | [string](#string) | | | + + + + + + + + +### EIP712NestedMsgType +EIP712MsgType is the eip712 type of a single message. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | name of the nested type. ie "Fee", "Coin" | +| `attrs` | [EIP712MsgAttrType](#ethermint.evm.v1.EIP712MsgAttrType) | repeated | attrs of the nested type | + + + + + + ### Log @@ -225,6 +277,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 | +| `eip712_allowed_msgs` | [EIP712AllowedMsg](#ethermint.evm.v1.EIP712AllowedMsg) | repeated | list of allowed eip712 msgs and their types | diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 87a3b47a95..f7351c0b43 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -1,22 +1,18 @@ package eip712 import ( - "bytes" "encoding/json" "fmt" - "math/big" - "reflect" "strings" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" + + evmtypes "github.com/tharsis/ethermint/x/evm/types" ) // EIP712SignBytes returns the bytes to sign for a transaction. @@ -27,27 +23,25 @@ func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legac if err != nil { panic(err) } + + // remove msgs from the sign doc since we will be adding them as separate fields delete(inInterface, "msgs") // Add messages as separate fields - msgsBytes := make([]json.RawMessage, 0, len(msgs)) - for _, msg := range msgs { + for i := 0; i < len(msgs); i++ { + msg := msgs[i] legacyMsg, ok := msg.(legacytx.LegacyMsg) if !ok { panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) } - - msgsBytes = append(msgsBytes, json.RawMessage(legacyMsg.GetSignBytes())) + msgsBytes := json.RawMessage(legacyMsg.GetSignBytes()) + inInterface[fmt.Sprintf("msg%d", i+1)] = msgsBytes } - for i := 0; i < len(msgsBytes); i++ { - inInterface[fmt.Sprintf("msg%d", i+1)] = msgsBytes[i] - } bz, err := json.Marshal(inInterface) if err != nil { panic(err) } - return sdk.MustSortJSON(bz) } @@ -72,11 +66,11 @@ func ComputeTypedDataHash(typedData apitypes.TypedData) ([]byte, error) { // WrapTxToTypedData is an ultimate method that wraps Amino-encoded Cosmos Tx JSON data // into an EIP712-compatible TypedData request. func WrapTxToTypedData( - cdc codectypes.AnyUnpacker, chainID uint64, msgs []sdk.Msg, data []byte, feeDelegation *FeeDelegationOptions, + params evmtypes.Params, ) (apitypes.TypedData, error) { txData := make(map[string]interface{}) @@ -84,15 +78,9 @@ func WrapTxToTypedData( return apitypes.TypedData{}, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, "failed to JSON unmarshal data") } - domain := apitypes.TypedDataDomain{ - Name: "Kava Cosmos", - Version: "1.0.0", - ChainId: math.NewHexOrDecimal256(int64(chainID)), - VerifyingContract: "kavaCosmos", - Salt: "0", - } + domain := getTypedDataDomain(chainID) - msgTypes, err := extractMsgTypes(cdc, msgs) + msgTypes, err := extractMsgTypes(msgs, params) if err != nil { return apitypes.TypedData{}, err } @@ -127,383 +115,74 @@ type FeeDelegationOptions struct { FeePayer sdk.AccAddress } -func extractMsgTypes(cdc codectypes.AnyUnpacker, msgs []sdk.Msg) (apitypes.Types, error) { - rootTypes := apitypes.Types{ - "EIP712Domain": { - { - Name: "name", - Type: "string", - }, - { - Name: "version", - Type: "string", - }, - { - Name: "chainId", - Type: "uint256", - }, - { - Name: "verifyingContract", - Type: "string", - }, - { - Name: "salt", - Type: "string", - }, - }, - "Tx": { - {Name: "account_number", Type: "string"}, - {Name: "chain_id", Type: "string"}, - {Name: "fee", Type: "Fee"}, - {Name: "memo", Type: "string"}, - {Name: "sequence", Type: "string"}, - // Note timeout_height was removed because it was not getting filled with the legacyTx - // {Name: "timeout_height", Type: "string"}, - }, - "Fee": { - {Name: "amount", Type: "Coin[]"}, - {Name: "gas", Type: "string"}, - }, - "Coin": { - {Name: "denom", Type: "string"}, - {Name: "amount", Type: "string"}, - }, - } +func extractMsgTypes(msgs []sdk.Msg, params evmtypes.Params) (apitypes.Types, error) { + rootTypes := getRootTypes() - // Add definitions for all messages - cachedTypes := make(map[string]string) - msgTypeIndex := 1 + // Add types each message for i := 0; i < len(msgs); i++ { msg := msgs[i] msgAttrName := fmt.Sprintf("msg%d", i+1) - msgTypeName := fmt.Sprintf("Msg%d", msgTypeIndex) - msgValName := fmt.Sprintf("MsgValue%d", msgTypeIndex) + msgTypeName := fmt.Sprintf("Msg%d", i+1) - msgType := apitypes.Type{Name: msgAttrName, Type: msgTypeName} - - // Add new types if not already created + // ensure eip712 messages implement legacytx.LegacyMsg legacyMsg, ok := msg.(legacytx.LegacyMsg) if !ok { - panic(fmt.Errorf("expected %T when using amino JSON", (*legacytx.LegacyMsg)(nil))) - } - legacyMsgType := legacyMsg.Type() - if len(cachedTypes[legacyMsgType]) == 0 { - // Add message type - rootTypes[msgTypeName] = []apitypes.Type{ - {Name: "type", Type: "string"}, - {Name: "value", Type: msgValName}, - } - - // Add message value type - if err := walkFields(cdc, rootTypes, msgValName, msg); err != nil { - return nil, err - } - - cachedTypes[legacyMsgType] = msgTypeName - msgTypeIndex += 1 - } else { - msgType.Type = cachedTypes[legacyMsgType] - } - - rootTypes["Tx"] = append(rootTypes["Tx"], msgType) - } - return rootTypes, nil -} - -const typeDefPrefix = "_" - -func walkFields(cdc codectypes.AnyUnpacker, typeMap apitypes.Types, rootType string, in interface{}) (err error) { - defer doRecover(&err) - - t := reflect.TypeOf(in) - v := reflect.ValueOf(in) - - for { - if t.Kind() == reflect.Ptr || - t.Kind() == reflect.Interface { - t = t.Elem() - v = v.Elem() - - continue - } - - break - } - - return traverseFields(cdc, typeMap, rootType, typeDefPrefix, t, v) -} - -type cosmosAnyWrapper struct { - Type string `json:"type"` - Value interface{} `json:"value"` -} - -func traverseFields( - cdc codectypes.AnyUnpacker, - typeMap apitypes.Types, - rootType string, - prefix string, - t reflect.Type, - v reflect.Value, -) error { - n := t.NumField() - - if prefix == typeDefPrefix { - if len(typeMap[rootType]) == n { - return nil - } - } else { - typeDef := sanitizeTypedef(prefix) - if len(typeMap[typeDef]) == n { - return nil - } - } - - for i := 0; i < n; i++ { - var field reflect.Value - if v.IsValid() { - field = v.Field(i) - } - - fieldType := t.Field(i).Type - fieldName := jsonNameFromTag(t.Field(i).Tag) - - if fieldType == cosmosAnyType { - any, ok := field.Interface().(*codectypes.Any) - if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrPackAny, "%T", field.Interface()) - } - - anyWrapper := &cosmosAnyWrapper{ - Type: any.TypeUrl, - } - - if err := cdc.UnpackAny(any, &anyWrapper.Value); err != nil { - return sdkerrors.Wrap(err, "failed to unpack Any in msg struct") - } - - fieldType = reflect.TypeOf(anyWrapper) - field = reflect.ValueOf(anyWrapper) - - // then continue as normal - } - - for { - if fieldType.Kind() == reflect.Ptr { - fieldType = fieldType.Elem() - - if field.IsValid() { - field = field.Elem() - } - - continue - } - - if fieldType.Kind() == reflect.Interface { - fieldType = reflect.TypeOf(field.Interface()) - continue - } - - if field.Kind() == reflect.Ptr { - field = field.Elem() - continue - } - - break + err := sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "msg %T must implement legacytx.LegacyMsg", (*legacytx.LegacyMsg)(nil)) + return apitypes.Types{}, err } - var isCollection bool - if fieldType.Kind() == reflect.Array || fieldType.Kind() == reflect.Slice { - if field.Len() == 0 { - // skip empty collections from type mapping - continue - } - - fieldType = fieldType.Elem() - field = field.Index(0) - isCollection = true - } - - for { - if fieldType.Kind() == reflect.Ptr { - fieldType = fieldType.Elem() - - if field.IsValid() { - field = field.Elem() + // get corresponding allowed msg from params + legacyMsgType := legacyMsg.Type() + allowedMsg := params.EIP712AllowedMsgFromMsgType(legacyMsgType) + if allowedMsg == nil { + return apitypes.Types{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "eip712 message %s is not allowed", legacyMsgType) + } + + // Add msg property to tx + txMsgType := apitypes.Type{Name: msgAttrName, Type: msgTypeName} + rootTypes["Tx"] = append(rootTypes["Tx"], txMsgType) + + // Add msg type to root types + msgValueTypeName := msgTypeNameFromLegacyMsgType(legacyMsgType) + rootTypes[msgTypeName] = []apitypes.Type{ + {Name: "type", Type: "string"}, + {Name: "value", Type: msgValueTypeName}, + } + + // Add msg value type and nested types + if rootTypes[msgValueTypeName] == nil { + allowedMsg := params.EIP712AllowedMsgFromMsgType(legacyMsgType) + if allowedMsg != nil { + // add msg value type + rootTypes[msgValueTypeName] = msgAttrsToEIP712Types(allowedMsg.ValueTypes) + + // add nested types + for _, nestedType := range allowedMsg.NestedTypes { + nestedTypeName := nestedType.Name + if rootTypes[nestedTypeName] == nil { + rootTypes[nestedTypeName] = msgAttrsToEIP712Types(nestedType.Attrs) + } } - - continue - } - - if fieldType.Kind() == reflect.Interface { - fieldType = reflect.TypeOf(field.Interface()) - continue - } - - if field.Kind() == reflect.Ptr { - field = field.Elem() - continue - } - - break - } - - fieldPrefix := fmt.Sprintf("%s.%s", prefix, fieldName) - - ethTyp := typToEth(fieldType) - if len(ethTyp) > 0 { - if prefix == typeDefPrefix { - typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ - Name: fieldName, - Type: ethTyp, - }) - } else { - typeDef := sanitizeTypedef(prefix) - typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ - Name: fieldName, - Type: ethTyp, - }) - } - - continue - } - - if fieldType.Kind() == reflect.Struct { - - var fieldTypedef string - - if isCollection { - fieldTypedef = sanitizeTypedef(fieldPrefix) + "[]" - } else { - fieldTypedef = sanitizeTypedef(fieldPrefix) - } - - if prefix == typeDefPrefix { - typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ - Name: fieldName, - Type: fieldTypedef, - }) - } else { - typeDef := sanitizeTypedef(prefix) - typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ - Name: fieldName, - Type: fieldTypedef, - }) } - - if err := traverseFields(cdc, typeMap, rootType, fieldPrefix, fieldType, field); err != nil { - return err - } - - continue - } - } - - return nil -} - -func jsonNameFromTag(tag reflect.StructTag) string { - jsonTags := tag.Get("json") - parts := strings.Split(jsonTags, ",") - return parts[0] -} - -// _.foo_bar.baz -> TypeFooBarBaz -// -// this is needed for Geth's own signing code which doesn't -// tolerate complex type names -func sanitizeTypedef(str string) string { - buf := new(bytes.Buffer) - parts := strings.Split(str, ".") - - for _, part := range parts { - if part == "_" { - buf.WriteString("Type") - continue - } - - subparts := strings.Split(part, "_") - for _, subpart := range subparts { - buf.WriteString(strings.Title(subpart)) } } - - return buf.String() + return rootTypes, nil } -var ( - hashType = reflect.TypeOf(common.Hash{}) - addressType = reflect.TypeOf(common.Address{}) - bigIntType = reflect.TypeOf(big.Int{}) - cosmIntType = reflect.TypeOf(sdk.Int{}) - cosmosAnyType = reflect.TypeOf(&codectypes.Any{}) -) - -// typToEth supports only basic types and arrays of basic types. -// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md -func typToEth(typ reflect.Type) string { - const str = "string" - - switch typ.Kind() { - case reflect.String: - return str - case reflect.Bool: - return "bool" - case reflect.Int: - return "int64" - case reflect.Int8: - return "int8" - case reflect.Int16: - return "int16" - case reflect.Int32: - return "int32" - case reflect.Int64: - return "int64" - case reflect.Uint: - return "uint64" - case reflect.Uint8: - return "uint8" - case reflect.Uint16: - return "uint16" - case reflect.Uint32: - return "uint32" - case reflect.Uint64: - return "uint64" - case reflect.Slice: - ethName := typToEth(typ.Elem()) - if len(ethName) > 0 { - return ethName + "[]" - } - case reflect.Array: - ethName := typToEth(typ.Elem()) - if len(ethName) > 0 { - return ethName + "[]" - } - case reflect.Ptr: - if typ.Elem().ConvertibleTo(bigIntType) || - typ.Elem().ConvertibleTo(cosmIntType) { - return str - } - case reflect.Struct: - if typ.ConvertibleTo(hashType) || - typ.ConvertibleTo(addressType) || - typ.ConvertibleTo(bigIntType) || - typ.ConvertibleTo(cosmIntType) { - return str +// msgAttrsToEIP712Types converts a slice of EIP712MsgAttrType to a slice of apitypes.Type. +func msgAttrsToEIP712Types(attrTypes []evmtypes.EIP712MsgAttrType) []apitypes.Type { + msgTypes := make([]apitypes.Type, len(attrTypes)) + for i, attrType := range attrTypes { + apitypes := apitypes.Type{ + Name: attrType.Name, + Type: attrType.Type, } + msgTypes[i] = apitypes } - - return "" + return msgTypes } -func doRecover(err *error) { - if r := recover(); r != nil { - if e, ok := r.(error); ok { - e = sdkerrors.Wrap(e, "panicked with error") - *err = e - return - } - - *err = fmt.Errorf("%v", r) - } +// msgTypeNameFromLegacyMsgType returns the name of the EIP712 type for a legacy message type. +func msgTypeNameFromLegacyMsgType(legacyMsgType string) string { + return fmt.Sprintf("MsgValue%s", strings.Title(legacyMsgType)) } diff --git a/ethereum/eip712/msg_test.go b/ethereum/eip712/msg_test.go new file mode 100644 index 0000000000..fb4b6204e7 --- /dev/null +++ b/ethereum/eip712/msg_test.go @@ -0,0 +1,156 @@ +package eip712 + +import ( + "encoding/json" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingTypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/ethereum/go-ethereum/signer/core/apitypes" + "github.com/stretchr/testify/require" + + "github.com/tharsis/ethermint/tests" + evmtypes "github.com/tharsis/ethermint/x/evm/types" +) + +func TestExtractMsgTypes(t *testing.T) { + params := evmtypes.DefaultParams() + params.EIP712AllowedMsgs = []evmtypes.EIP712AllowedMsg{ + { + LegacyMsgType: "send", + ValueTypes: []evmtypes.EIP712MsgAttrType{ + {Name: "from_address", Type: "string"}, + {Name: "to_address", Type: "string"}, + {Name: "amount", Type: "Coin[]"}, + }, + }, + { + LegacyMsgType: "delegate", + ValueTypes: []evmtypes.EIP712MsgAttrType{ + {Name: "delegator_address", Type: "string"}, + {Name: "validator_address", Type: "string"}, + {Name: "amount", Type: "Coin"}, + }, + NestedTypes: []evmtypes.EIP712NestedMsgType{ + { + Name: "Coin", + Attrs: []evmtypes.EIP712MsgAttrType{ + {Name: "denom", Type: "string"}, + {Name: "amount", Type: "string"}, + }, + }, + { + Name: "Vote", + Attrs: []evmtypes.EIP712MsgAttrType{ + {Name: "voter", Type: "string"}, + }, + }, + }, + }, + } + + fromAddr := sdk.AccAddress(tests.GenerateAddress().Bytes()) + toAddr := sdk.AccAddress(tests.GenerateAddress().Bytes()) + valAddr := sdk.ValAddress(tests.GenerateAddress().Bytes()) + + tests := []struct { + name string + msgs []sdk.Msg + exp string + success bool + errMsg string + }{ + { + name: "success", + success: true, + msgs: []sdk.Msg{ + bankTypes.NewMsgSend(fromAddr, toAddr, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(1)))), + stakingTypes.NewMsgDelegate(fromAddr, valAddr, sdk.NewCoin("atom", sdk.NewInt(1))), + bankTypes.NewMsgSend(fromAddr, toAddr, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(2)))), + }, + exp: `{ + "Coin": [ + { "name": "denom", "type": "string" }, + { "name": "amount", "type": "string" } + ], + "EIP712Domain": [ + { "name": "name", "type": "string" }, + { "name": "version", "type": "string" }, + { "name": "chainId", "type": "uint256" }, + { "name": "verifyingContract", "type": "string" }, + { "name": "salt", "type": "string" } + ], + "Fee": [ + { "name": "amount", "type": "Coin[]" }, + { "name": "gas", "type": "string" } + ], + "Msg1": [ + { "name": "type", "type": "string" }, + { "name": "value", "type": "MsgValueSend" } + ], + "Msg2": [ + { "name": "type", "type": "string" }, + { "name": "value", "type": "MsgValueDelegate" } + ], + "Msg3": [ + { "name": "type", "type": "string" }, + { "name": "value", "type": "MsgValueSend" } + ], + "MsgValueDelegate": [ + { "name": "delegator_address", "type": "string" }, + { "name": "validator_address", "type": "string" }, + { "name": "amount", "type": "Coin" } + ], + "MsgValueSend": [ + { "name": "from_address", "type": "string" }, + { "name": "to_address", "type": "string" }, + { "name": "amount", "type": "Coin[]" } + ], + "Tx": [ + { "name": "account_number", "type": "string" }, + { "name": "chain_id", "type": "string" }, + { "name": "fee", "type": "Fee" }, + { "name": "memo", "type": "string" }, + { "name": "sequence", "type": "string" }, + { "name": "msg1", "type": "Msg1" }, + { "name": "msg2", "type": "Msg2" }, + { "name": "msg3", "type": "Msg3" } + ], + "Vote": [{ "name": "voter", "type": "string" }] + }`, + }, + { + name: "fails if msg is not allowed", + msgs: []sdk.Msg{ + bankTypes.NewMsgSend(fromAddr, toAddr, sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(1)))), + bankTypes.NewMsgMultiSend( + []bankTypes.Input{ + {Address: fromAddr.String(), Coins: sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(1)))}, + }, + []bankTypes.Output{ + {Address: toAddr.String(), Coins: sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(1)))}, + }, + ), + }, + success: false, + errMsg: "eip712 message multisend is not allowed: invalid request", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + msgTypes, err := extractMsgTypes(tt.msgs, params) + if tt.success { + require.NoError(t, err) + var expTypes apitypes.Types + err := json.Unmarshal([]byte(tt.exp), &expTypes) + require.NoError(t, err) + require.Equal(t, expTypes, msgTypes) + } else { + require.Error(t, err) + require.Equal(t, tt.errMsg, err.Error()) + } + }) + } +} diff --git a/ethereum/eip712/types.go b/ethereum/eip712/types.go new file mode 100644 index 0000000000..2cef4539a1 --- /dev/null +++ b/ethereum/eip712/types.go @@ -0,0 +1,60 @@ +package eip712 + +import ( + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +func getTypedDataDomain(chainID uint64) apitypes.TypedDataDomain { + return apitypes.TypedDataDomain{ + Name: "Kava Cosmos", + Version: "1.0.0", + ChainId: math.NewHexOrDecimal256(int64(chainID)), + VerifyingContract: "kavaCosmos", + Salt: "0", + } +} + +func getRootTypes() apitypes.Types { + return apitypes.Types{ + "EIP712Domain": { + { + Name: "name", + Type: "string", + }, + { + Name: "version", + Type: "string", + }, + { + Name: "chainId", + Type: "uint256", + }, + { + Name: "verifyingContract", + Type: "string", + }, + { + Name: "salt", + Type: "string", + }, + }, + "Tx": { + {Name: "account_number", Type: "string"}, + {Name: "chain_id", Type: "string"}, + {Name: "fee", Type: "Fee"}, + {Name: "memo", Type: "string"}, + {Name: "sequence", Type: "string"}, + // Note timeout_height was removed because it was not getting filled with the legacyTx + // {Name: "timeout_height", Type: "string"}, + }, + "Fee": { + {Name: "amount", Type: "Coin[]"}, + {Name: "gas", Type: "string"}, + }, + "Coin": { + {Name: "denom", Type: "string"}, + {Name: "amount", Type: "string"}, + }, + } +} diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index 406276a290..f33d4ba727 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -24,6 +24,11 @@ message Params { (gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false ]; + // list of allowed eip712 msgs and their types + repeated EIP712AllowedMsg eip712_allowed_msgs = 6 [ + (gogoproto.customname) = "EIP712AllowedMsgs", + (gogoproto.nullable) = false + ]; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -230,3 +235,30 @@ message TraceConfig { // enable return data capture bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ]; } + +// EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. +message EIP712AllowedMsg { + // legacy msg type string + string legacy_msg_type = 1; + + // types of the msg value + repeated EIP712MsgAttrType value_types = 3 [(gogoproto.nullable) = false]; + + // nested types of the msg value + repeated EIP712NestedMsgType nested_types = 4 [(gogoproto.nullable) = false]; +} + +// EIP712MsgType is the eip712 type of a single message. +message EIP712NestedMsgType { + // name of the nested type. ie "Fee", "Coin" + string name = 1; + + // attrs of the nested type + repeated EIP712MsgAttrType attrs = 2 [(gogoproto.nullable) = false]; +} + +// EIP712MsgAttrType is the eip712 type of a single message attribute. +message EIP712MsgAttrType { + string name = 1; + string type = 2; +} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 78977f2b5f..7303770255 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -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"` + // list of allowed eip712 msgs and their types + EIP712AllowedMsgs []EIP712AllowedMsg `protobuf:"bytes,6,rep,name=eip712_allowed_msgs,json=eip712AllowedMsgs,proto3" json:"eip712_allowed_msgs"` } func (m *Params) Reset() { *m = Params{} } @@ -107,6 +109,13 @@ func (m *Params) GetChainConfig() ChainConfig { return ChainConfig{} } +func (m *Params) GetEIP712AllowedMsgs() []EIP712AllowedMsg { + if m != nil { + return m.EIP712AllowedMsgs + } + return nil +} + // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { @@ -643,6 +652,178 @@ func (m *TraceConfig) GetEnableReturnData() bool { return false } +// EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. +type EIP712AllowedMsg struct { + // legacy msg type string + LegacyMsgType string `protobuf:"bytes,1,opt,name=legacy_msg_type,json=legacyMsgType,proto3" json:"legacy_msg_type,omitempty"` + // types of the msg value + ValueTypes []EIP712MsgAttrType `protobuf:"bytes,3,rep,name=value_types,json=valueTypes,proto3" json:"value_types"` + // nested types of the msg value + NestedTypes []EIP712NestedMsgType `protobuf:"bytes,4,rep,name=nested_types,json=nestedTypes,proto3" json:"nested_types"` +} + +func (m *EIP712AllowedMsg) Reset() { *m = EIP712AllowedMsg{} } +func (m *EIP712AllowedMsg) String() string { return proto.CompactTextString(m) } +func (*EIP712AllowedMsg) ProtoMessage() {} +func (*EIP712AllowedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{8} +} +func (m *EIP712AllowedMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EIP712AllowedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EIP712AllowedMsg.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 *EIP712AllowedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_EIP712AllowedMsg.Merge(m, src) +} +func (m *EIP712AllowedMsg) XXX_Size() int { + return m.Size() +} +func (m *EIP712AllowedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_EIP712AllowedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_EIP712AllowedMsg proto.InternalMessageInfo + +func (m *EIP712AllowedMsg) GetLegacyMsgType() string { + if m != nil { + return m.LegacyMsgType + } + return "" +} + +func (m *EIP712AllowedMsg) GetValueTypes() []EIP712MsgAttrType { + if m != nil { + return m.ValueTypes + } + return nil +} + +func (m *EIP712AllowedMsg) GetNestedTypes() []EIP712NestedMsgType { + if m != nil { + return m.NestedTypes + } + return nil +} + +// EIP712MsgType is the eip712 type of a single message. +type EIP712NestedMsgType struct { + // name of the nested type. ie "Fee", "Coin" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // attrs of the nested type + Attrs []EIP712MsgAttrType `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs"` +} + +func (m *EIP712NestedMsgType) Reset() { *m = EIP712NestedMsgType{} } +func (m *EIP712NestedMsgType) String() string { return proto.CompactTextString(m) } +func (*EIP712NestedMsgType) ProtoMessage() {} +func (*EIP712NestedMsgType) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{9} +} +func (m *EIP712NestedMsgType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EIP712NestedMsgType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EIP712NestedMsgType.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 *EIP712NestedMsgType) XXX_Merge(src proto.Message) { + xxx_messageInfo_EIP712NestedMsgType.Merge(m, src) +} +func (m *EIP712NestedMsgType) XXX_Size() int { + return m.Size() +} +func (m *EIP712NestedMsgType) XXX_DiscardUnknown() { + xxx_messageInfo_EIP712NestedMsgType.DiscardUnknown(m) +} + +var xxx_messageInfo_EIP712NestedMsgType proto.InternalMessageInfo + +func (m *EIP712NestedMsgType) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EIP712NestedMsgType) GetAttrs() []EIP712MsgAttrType { + if m != nil { + return m.Attrs + } + return nil +} + +// EIP712MsgAttrType is the eip712 type of a single message attribute. +type EIP712MsgAttrType struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *EIP712MsgAttrType) Reset() { *m = EIP712MsgAttrType{} } +func (m *EIP712MsgAttrType) String() string { return proto.CompactTextString(m) } +func (*EIP712MsgAttrType) ProtoMessage() {} +func (*EIP712MsgAttrType) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{10} +} +func (m *EIP712MsgAttrType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EIP712MsgAttrType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EIP712MsgAttrType.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 *EIP712MsgAttrType) XXX_Merge(src proto.Message) { + xxx_messageInfo_EIP712MsgAttrType.Merge(m, src) +} +func (m *EIP712MsgAttrType) XXX_Size() int { + return m.Size() +} +func (m *EIP712MsgAttrType) XXX_DiscardUnknown() { + xxx_messageInfo_EIP712MsgAttrType.DiscardUnknown(m) +} + +var xxx_messageInfo_EIP712MsgAttrType proto.InternalMessageInfo + +func (m *EIP712MsgAttrType) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EIP712MsgAttrType) GetType() string { + if m != nil { + return m.Type + } + return "" +} + func init() { proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") @@ -652,105 +833,119 @@ func init() { proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult") proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple") proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") + proto.RegisterType((*EIP712AllowedMsg)(nil), "ethermint.evm.v1.EIP712AllowedMsg") + proto.RegisterType((*EIP712NestedMsgType)(nil), "ethermint.evm.v1.EIP712NestedMsgType") + proto.RegisterType((*EIP712MsgAttrType)(nil), "ethermint.evm.v1.EIP712MsgAttrType") } 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, 0xb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d, 0x60, 0x82, 0xc2, 0x05, 0xe9, 0xa9, 0x0b, 0x12, 0xe5, 0x43, - 0xb8, 0x0a, 0xe6, 0x3b, 0x38, 0x4a, 0xd5, 0x03, 0xa3, 0x84, 0x14, 0xb0, 0x4f, 0x41, 0xed, 0x9c, - 0xe1, 0x84, 0x63, 0x4f, 0x84, 0x34, 0x79, 0x4d, 0x03, 0x0e, 0x21, 0x28, 0xca, 0x0f, 0xb5, 0xca, - 0x95, 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, 0x22, 0xc2, 0xd3, - 0x48, 0xc0, 0x17, 0xc0, 0xf4, 0x68, 0x22, 0x18, 0xf6, 0x84, 0x3b, 0x51, 0x5a, 0xe7, 0xc1, 0xa8, - 0xc3, 0xa6, 0x23, 0x6c, 0x54, 0x1b, 0x98, 0xf6, 0x75, 0xfd, 0x57, 0xc1, 0x7c, 0x33, 0xa2, 0x34, - 0x96, 0x9d, 0x50, 0x41, 0x0a, 0x40, 0x24, 0xab, 0x26, 0x77, 0xb9, 0x20, 0x1f, 0x72, 0xff, 0xb9, - 0xbe, 0xcb, 0x53, 0xad, 0xe2, 0xac, 0xe9, 0xc7, 0x5c, 0x55, 0x69, 0xeb, 0x7c, 0x3b, 0xaf, 0xad, - 0x6c, 0x25, 0x13, 0x14, 0x18, 0x11, 0x72, 0xd3, 0x2a, 0x28, 0x1f, 0xc2, 0x75, 0x60, 0x30, 0xd2, - 0x21, 0x4c, 0x10, 0x5f, 0x6e, 0x8e, 0x81, 0x86, 0x18, 0xde, 0x07, 0x46, 0x80, 0xb9, 0x9b, 0x72, - 0xe2, 0xab, 0x9d, 0x40, 0x8b, 0x01, 0xe6, 0x5f, 0x72, 0xe2, 0x3f, 0x2b, 0xfe, 0xf0, 0xb3, 0x35, - 0x63, 0x63, 0x50, 0xde, 0xf7, 0x3c, 0xc2, 0xf9, 0x79, 0xda, 0x8e, 0xc8, 0x5f, 0x74, 0xd8, 0x2e, - 0xa8, 0x70, 0x41, 0x19, 0x0e, 0x88, 0x7b, 0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x45, - 0x73, 0xfe, 0xa4, 0x68, 0x2c, 0x9a, 0xc6, 0x70, 0xfd, 0x7a, 0x16, 0x68, 0x65, 0x80, 0xc7, 0xe8, - 0x1d, 0xe7, 0xdd, 0xe5, 0xc6, 0xec, 0xfb, 0xcb, 0x8d, 0xd9, 0x0f, 0x97, 0x1b, 0xb3, 0x3f, 0x7d, - 0xdc, 0x98, 0x79, 0xff, 0x71, 0x63, 0xe6, 0xf7, 0x8f, 0x1b, 0x33, 0x5f, 0x6f, 0x8d, 0x7d, 0xce, - 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, + // 1664 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x51, 0x4f, 0x23, 0xc9, + 0x11, 0x06, 0x6c, 0x60, 0xdc, 0x36, 0xf6, 0xd0, 0x70, 0x1b, 0xef, 0xae, 0xc2, 0x90, 0x89, 0x72, + 0x22, 0xd2, 0x1d, 0x1c, 0x9c, 0xd0, 0xae, 0x6e, 0x15, 0x45, 0x0c, 0xcb, 0xdd, 0x41, 0x76, 0x37, + 0xa8, 0x97, 0x28, 0x52, 0xa4, 0x68, 0xd4, 0x9e, 0xe9, 0x1b, 0xe6, 0x98, 0x99, 0xb6, 0xba, 0xdb, + 0x5e, 0x3b, 0xca, 0x0f, 0x88, 0x94, 0x97, 0xfc, 0x84, 0xfc, 0x85, 0xfc, 0x87, 0x3c, 0x9c, 0xf2, + 0x74, 0x4f, 0x51, 0x94, 0x87, 0xd1, 0x89, 0x7d, 0xe3, 0x91, 0x5f, 0x10, 0x75, 0x75, 0xdb, 0x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, 0xa1, 0x06, 0x44, 0x16, 0x16, + 0xbd, 0xbc, 0xc3, 0x04, 0x74, 0xac, 0x6a, 0xd0, 0xba, 0x2a, 0xbd, 0x3a, 0xe8, 0xdf, 0x80, 0x9a, + 0x4c, 0x0a, 0xf8, 0x13, 0xb4, 0xac, 0x06, 0x93, 0xcd, 0x66, 0xed, 0xaa, 0xf4, 0x5a, 0xea, 0x26, + 0x4c, 0xdd, 0x4b, 0xc8, 0x92, 0x1a, 0x40, 0x4f, 0xd9, 0x41, 0x8e, 0x1a, 0x84, 0x69, 0x11, 0xb3, + 0x01, 0xf4, 0x93, 0x6a, 0xb0, 0x7e, 0x55, 0x7a, 0xee, 0x84, 0xf9, 0xb1, 0x9e, 0x23, 0xcb, 0x6a, + 0x00, 0x03, 0xfc, 0x09, 0x42, 0x66, 0x49, 0xc0, 0x60, 0xba, 0xc1, 0xca, 0x55, 0xe9, 0xd5, 0x40, + 0x0b, 0xd8, 0x37, 0x43, 0xec, 0xa3, 0x45, 0x83, 0xed, 0x00, 0x76, 0xe3, 0xaa, 0xf4, 0x9c, 0x8c, + 0x27, 0x06, 0xd3, 0x4c, 0xe9, 0x54, 0x09, 0x96, 0xf3, 0x3e, 0x8b, 0xe1, 0xc2, 0x75, 0xc8, 0x48, + 0xf4, 0xff, 0xbc, 0x80, 0x9c, 0xb3, 0x01, 0x61, 0xb2, 0x97, 0x29, 0xfc, 0x25, 0x72, 0x23, 0x5e, + 0x28, 0x41, 0x23, 0x15, 0x4e, 0xa5, 0x36, 0x78, 0x7a, 0x53, 0x61, 0xb3, 0x16, 0x3e, 0x69, 0x8d, + 0x54, 0x07, 0x36, 0xff, 0xeb, 0x68, 0xb1, 0x93, 0x71, 0x9e, 0x43, 0x25, 0x34, 0x88, 0x11, 0x30, + 0x81, 0xac, 0xc1, 0x2e, 0x57, 0xe0, 0xbb, 0xf1, 0x27, 0xb7, 0x77, 0x79, 0xa6, 0x54, 0x82, 0x47, + 0xf6, 0xdb, 0xb1, 0x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 0xcf, 0x21, 0x46, 0xd0, 0xda, + 0x2c, 0xcd, 0x53, 0x05, 0xc5, 0xb6, 0x48, 0x8c, 0x80, 0x5f, 0xa0, 0x1a, 0xef, 0x33, 0x21, 0xd2, + 0x98, 0x49, 0xe8, 0xbe, 0xff, 0xeb, 0xe5, 0x40, 0x6e, 0xec, 0x75, 0x70, 0xf6, 0x61, 0x93, 0xb3, + 0x9c, 0x8b, 0x21, 0xb4, 0x53, 0x1b, 0x9c, 0x99, 0x78, 0x0d, 0x7a, 0x32, 0x25, 0xe1, 0x00, 0x61, + 0xeb, 0x26, 0x98, 0xea, 0x89, 0x22, 0x84, 0xf3, 0xdf, 0x00, 0x5f, 0x38, 0x85, 0x66, 0x96, 0xc0, + 0xe4, 0x4b, 0xaa, 0x28, 0xb9, 0xa5, 0x39, 0xa9, 0x3a, 0x55, 0x77, 0xf1, 0xa4, 0xea, 0x2c, 0xbb, + 0xce, 0x38, 0x7e, 0xbb, 0x0a, 0xb2, 0x36, 0x92, 0x27, 0xe0, 0xfd, 0x7f, 0xce, 0x23, 0x77, 0xf6, + 0x01, 0x82, 0x3f, 0x46, 0xad, 0x8c, 0x25, 0x34, 0x1a, 0xea, 0x37, 0x4d, 0xa8, 0x6f, 0x6e, 0xbb, + 0xe1, 0x2b, 0x46, 0xfd, 0x5a, 0x26, 0x67, 0xc3, 0x2e, 0xc3, 0x27, 0xa8, 0x0e, 0x17, 0x27, 0x98, + 0xe8, 0x93, 0xa2, 0xef, 0xc3, 0x9f, 0x7e, 0xe8, 0xed, 0xf3, 0x5a, 0x26, 0x07, 0x4a, 0x09, 0xed, + 0x19, 0x54, 0xf5, 0x59, 0x21, 0x08, 0xbc, 0xb5, 0x42, 0xe2, 0x37, 0xa8, 0x51, 0xe8, 0x17, 0x47, + 0x6c, 0xc1, 0xaa, 0x00, 0xf6, 0xb3, 0x0f, 0x81, 0xbd, 0x01, 0x5b, 0xbb, 0x10, 0x0b, 0x57, 0x37, + 0x00, 0x80, 0xe7, 0x7f, 0x8b, 0xd6, 0xee, 0xb0, 0xd4, 0xd7, 0x6a, 0x41, 0xf3, 0x51, 0x3c, 0x30, + 0xc6, 0xbf, 0x44, 0x8b, 0x54, 0x29, 0x31, 0xba, 0xd0, 0xef, 0x11, 0x80, 0xf1, 0xf3, 0x5f, 0xa0, + 0xd5, 0x5b, 0x16, 0x77, 0x32, 0x61, 0x54, 0x85, 0x6c, 0x9a, 0x53, 0x02, 0xe3, 0x20, 0xf8, 0xee, + 0x72, 0x63, 0xfe, 0xfb, 0xcb, 0x8d, 0xf9, 0x1f, 0x2e, 0x37, 0xe6, 0xff, 0xf2, 0x7e, 0x63, 0xee, + 0xfb, 0xf7, 0x1b, 0x73, 0xff, 0x7a, 0xbf, 0x31, 0xf7, 0xbb, 0xad, 0x89, 0x86, 0xaa, 0xce, 0xa9, + 0x90, 0xa9, 0xdc, 0xb9, 0xf9, 0x47, 0x60, 0x00, 0xff, 0x09, 0x40, 0xb2, 0x3a, 0x4b, 0xf0, 0xd6, + 0xff, 0xfc, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xa4, 0xe8, 0xc6, 0x31, 0x10, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -773,6 +968,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EIP712AllowedMsgs) > 0 { + for iNdEx := len(m.EIP712AllowedMsgs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.EIP712AllowedMsgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } { size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1429,6 +1638,145 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EIP712AllowedMsg) 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 *EIP712AllowedMsg) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EIP712AllowedMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NestedTypes) > 0 { + for iNdEx := len(m.NestedTypes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NestedTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ValueTypes) > 0 { + for iNdEx := len(m.ValueTypes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValueTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.LegacyMsgType) > 0 { + i -= len(m.LegacyMsgType) + copy(dAtA[i:], m.LegacyMsgType) + i = encodeVarintEvm(dAtA, i, uint64(len(m.LegacyMsgType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EIP712NestedMsgType) 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 *EIP712NestedMsgType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EIP712NestedMsgType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attrs) > 0 { + for iNdEx := len(m.Attrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EIP712MsgAttrType) 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 *EIP712MsgAttrType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EIP712MsgAttrType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1465,6 +1813,12 @@ func (m *Params) Size() (n int) { } l = m.ChainConfig.Size() n += 1 + l + sovEvm(uint64(l)) + if len(m.EIP712AllowedMsgs) > 0 { + for _, e := range m.EIP712AllowedMsgs { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } return n } @@ -1709,13 +2063,74 @@ func (m *TraceConfig) Size() (n int) { return n } -func sovEvm(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *EIP712AllowedMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LegacyMsgType) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.ValueTypes) > 0 { + for _, e := range m.ValueTypes { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } + if len(m.NestedTypes) > 0 { + for _, e := range m.NestedTypes { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } + return n } -func sozEvm(x uint64) (n int) { - return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *EIP712NestedMsgType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } + return n } -func (m *Params) Unmarshal(dAtA []byte) error { + +func (m *EIP712MsgAttrType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func sovEvm(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvm(x uint64) (n int) { + return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1925,6 +2340,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP712AllowedMsgs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EIP712AllowedMsgs = append(m.EIP712AllowedMsgs, EIP712AllowedMsg{}) + if err := m.EIP712AllowedMsgs[len(m.EIP712AllowedMsgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) @@ -3695,6 +4144,386 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { } return nil } +func (m *EIP712AllowedMsg) 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 ErrIntOverflowEvm + } + 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: EIP712AllowedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EIP712AllowedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LegacyMsgType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LegacyMsgType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueTypes = append(m.ValueTypes, EIP712MsgAttrType{}) + if err := m.ValueTypes[len(m.ValueTypes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedTypes = append(m.NestedTypes, EIP712NestedMsgType{}) + if err := m.NestedTypes[len(m.NestedTypes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EIP712NestedMsgType) 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 ErrIntOverflowEvm + } + 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: EIP712NestedMsgType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EIP712NestedMsgType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, EIP712MsgAttrType{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EIP712MsgAttrType) 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 ErrIntOverflowEvm + } + 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: EIP712MsgAttrType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EIP712MsgAttrType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/params.go b/x/evm/types/params.go index dc4caa20df..b51dec2504 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -20,11 +20,12 @@ const ( // 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") + ParamStoreKeyEIP712AllowedMsgs = []byte("EIP712AllowedMsgs") // 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 @@ -42,11 +43,12 @@ func ParamKeyTable() paramtypes.KeyTable { // 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, + EvmDenom: evmDenom, + EnableCreate: enableCreate, + EnableCall: enableCall, + ExtraEIPs: extraEIPs, + ChainConfig: config, + EIP712AllowedMsgs: []EIP712AllowedMsg{}, } } @@ -54,11 +56,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, + EIP712AllowedMsgs: []EIP712AllowedMsg{}, } } @@ -70,6 +73,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(ParamStoreKeyEIP712AllowedMsgs, &p.EIP712AllowedMsgs, validateEIP712AllowedMsgs), } } @@ -83,7 +87,21 @@ func (p Params) Validate() error { return err } - return p.ChainConfig.Validate() + if err := p.ChainConfig.Validate(); err != nil { + return err + } + + return validateEIP712AllowedMsgs(p.EIP712AllowedMsgs) +} + +// EIP712AllowedMsgFromMsgType returns the EIP712AllowedMsg for a given legacy message type. +func (p Params) EIP712AllowedMsgFromMsgType(legacyMsgType string) *EIP712AllowedMsg { + for _, allowedMsg := range p.EIP712AllowedMsgs { + if allowedMsg.LegacyMsgType == legacyMsgType { + return &allowedMsg + } + } + return nil } // EIPs returns the ExtraEips as a int slice @@ -136,6 +154,24 @@ func validateChainConfig(i interface{}) error { return cfg.Validate() } +func validateEIP712AllowedMsgs(i interface{}) error { + allowedMsgs, ok := i.([]EIP712AllowedMsg) + if !ok { + return fmt.Errorf("invalid EIP712AllowedMsg slice type: %T", i) + } + + // ensure no duplicate legacy msg types + msgTypes := make(map[string]bool) + for _, allowedMsg := range allowedMsgs { + if _, ok := msgTypes[allowedMsg.LegacyMsgType]; ok { + return fmt.Errorf("duplicate eip712 allowed legacy msg type: %s", allowedMsg.LegacyMsgType) + } + msgTypes[allowedMsg.LegacyMsgType] = true + } + + return nil +} + // IsLondon returns if london hardfork is enabled. func IsLondon(ethConfig *params.ChainConfig, height int64) bool { return ethConfig.IsLondon(big.NewInt(height)) diff --git a/x/evm/types/params_test.go b/x/evm/types/params_test.go index aa09fd5aef..f8ba785e87 100644 --- a/x/evm/types/params_test.go +++ b/x/evm/types/params_test.go @@ -47,8 +47,25 @@ func TestParamsValidate(t *testing.T) { }, { "invalid chain config", - NewParams("ara", true, true, ChainConfig{}, 2929, 1884, 1344), - false, + NewParams("ara", true, true, ChainConfig{ + HomesteadBlock: newIntPtr(-1), + }, 2929, 1884, 1344), + true, + }, + { + "invalid eip712 allowed msgs", + Params{ + EvmDenom: "ara", + EnableCreate: true, + EnableCall: true, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: []int64{2929, 1884, 1344}, + EIP712AllowedMsgs: []EIP712AllowedMsg{ + {LegacyMsgType: "send"}, + {LegacyMsgType: "send"}, + }, + }, + true, }, } From 6908048f608039197f063bc0bd1a8445d80bb718 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Thu, 21 Jul 2022 09:49:59 -0400 Subject: [PATCH 07/11] better errors --- ethereum/eip712/eip712.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index f7351c0b43..226e37694a 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -135,7 +135,12 @@ func extractMsgTypes(msgs []sdk.Msg, params evmtypes.Params) (apitypes.Types, er legacyMsgType := legacyMsg.Type() allowedMsg := params.EIP712AllowedMsgFromMsgType(legacyMsgType) if allowedMsg == nil { - return apitypes.Types{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "eip712 message %s is not allowed", legacyMsgType) + err := sdkerrors.Wrapf( + sdkerrors.ErrInvalidType, + "eip712 message type \"%s\" is not permitted", + legacyMsgType, + ) + return apitypes.Types{}, err } // Add msg property to tx From 88f9c6d5ef17d08a07ede696e9c9372495f19301 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 26 Jul 2022 11:14:28 -0400 Subject: [PATCH 08/11] update params & use type url --- app/ante/ante_test.go | 6 +- docs/api/proto-docs.md | 3 +- ethereum/eip712/eip712.go | 31 ++-- ethereum/eip712/msg_test.go | 10 +- proto/ethermint/evm/v1/evm.proto | 7 +- x/evm/types/evm.pb.go | 286 ++++++++++++++++++------------- x/evm/types/params.go | 14 +- 7 files changed, 208 insertions(+), 149 deletions(-) diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 1273441eec..7f41065f6c 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -30,7 +30,8 @@ func (suite AnteTestSuite) TestAnteHandler() { params := suite.app.EvmKeeper.GetParams(suite.ctx) params.EIP712AllowedMsgs = []evmtypes.EIP712AllowedMsg{ { - LegacyMsgType: "send", + MsgTypeUrl: "/cosmos.bank.v1beta1.MsgSend", + MsgValueTypeName: "MsgValueSend", ValueTypes: []evmtypes.EIP712MsgAttrType{ {Name: "from_address", Type: "string"}, {Name: "to_address", Type: "string"}, @@ -38,7 +39,8 @@ func (suite AnteTestSuite) TestAnteHandler() { }, }, { - LegacyMsgType: "delegate", + MsgTypeUrl: "/cosmos.staking.v1beta1.MsgDelegate", + MsgValueTypeName: "MsgValueDelegate", ValueTypes: []evmtypes.EIP712MsgAttrType{ {Name: "delegator_address", Type: "string"}, {Name: "validator_address", Type: "string"}, diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 9aed4c8b4f..e002e6e0e6 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -198,7 +198,8 @@ EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `legacy_msg_type` | [string](#string) | | legacy msg type string | +| `msg_type_url` | [string](#string) | | msg's proto type name. ie "/cosmos.bank.v1beta1.MsgSend" | +| `msg_value_type_name` | [string](#string) | | name of the eip712 value type. ie "MsgValueSend" | | `value_types` | [EIP712MsgAttrType](#ethermint.evm.v1.EIP712MsgAttrType) | repeated | types of the msg value | | `nested_types` | [EIP712NestedMsgType](#ethermint.evm.v1.EIP712NestedMsgType) | repeated | nested types of the msg value | diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 226e37694a..74e9b8beb5 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -125,20 +125,20 @@ func extractMsgTypes(msgs []sdk.Msg, params evmtypes.Params) (apitypes.Types, er msgTypeName := fmt.Sprintf("Msg%d", i+1) // ensure eip712 messages implement legacytx.LegacyMsg - legacyMsg, ok := msg.(legacytx.LegacyMsg) + _, ok := msg.(legacytx.LegacyMsg) if !ok { err := sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "msg %T must implement legacytx.LegacyMsg", (*legacytx.LegacyMsg)(nil)) return apitypes.Types{}, err } // get corresponding allowed msg from params - legacyMsgType := legacyMsg.Type() - allowedMsg := params.EIP712AllowedMsgFromMsgType(legacyMsgType) + msgType := sdk.MsgTypeURL(msg) + allowedMsg := params.EIP712AllowedMsgFromMsgType(msgType) if allowedMsg == nil { err := sdkerrors.Wrapf( sdkerrors.ErrInvalidType, "eip712 message type \"%s\" is not permitted", - legacyMsgType, + msgType, ) return apitypes.Types{}, err } @@ -148,25 +148,22 @@ func extractMsgTypes(msgs []sdk.Msg, params evmtypes.Params) (apitypes.Types, er rootTypes["Tx"] = append(rootTypes["Tx"], txMsgType) // Add msg type to root types - msgValueTypeName := msgTypeNameFromLegacyMsgType(legacyMsgType) + msgValueTypeName := allowedMsg.MsgValueTypeName rootTypes[msgTypeName] = []apitypes.Type{ {Name: "type", Type: "string"}, {Name: "value", Type: msgValueTypeName}, } // Add msg value type and nested types - if rootTypes[msgValueTypeName] == nil { - allowedMsg := params.EIP712AllowedMsgFromMsgType(legacyMsgType) - if allowedMsg != nil { - // add msg value type - rootTypes[msgValueTypeName] = msgAttrsToEIP712Types(allowedMsg.ValueTypes) - - // add nested types - for _, nestedType := range allowedMsg.NestedTypes { - nestedTypeName := nestedType.Name - if rootTypes[nestedTypeName] == nil { - rootTypes[nestedTypeName] = msgAttrsToEIP712Types(nestedType.Attrs) - } + if rootTypes[msgValueTypeName] == nil && allowedMsg != nil { + // add msg value type + rootTypes[msgValueTypeName] = msgAttrsToEIP712Types(allowedMsg.ValueTypes) + + // add nested types + for _, nestedType := range allowedMsg.NestedTypes { + nestedTypeName := nestedType.Name + if rootTypes[nestedTypeName] == nil { + rootTypes[nestedTypeName] = msgAttrsToEIP712Types(nestedType.Attrs) } } } diff --git a/ethereum/eip712/msg_test.go b/ethereum/eip712/msg_test.go index fb4b6204e7..4be734ff59 100644 --- a/ethereum/eip712/msg_test.go +++ b/ethereum/eip712/msg_test.go @@ -9,8 +9,8 @@ import ( stakingTypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/signer/core/apitypes" "github.com/stretchr/testify/require" - "github.com/tharsis/ethermint/tests" + evmtypes "github.com/tharsis/ethermint/x/evm/types" ) @@ -18,7 +18,8 @@ func TestExtractMsgTypes(t *testing.T) { params := evmtypes.DefaultParams() params.EIP712AllowedMsgs = []evmtypes.EIP712AllowedMsg{ { - LegacyMsgType: "send", + MsgTypeUrl: "/cosmos.bank.v1beta1.MsgSend", + MsgValueTypeName: "MsgValueSend", ValueTypes: []evmtypes.EIP712MsgAttrType{ {Name: "from_address", Type: "string"}, {Name: "to_address", Type: "string"}, @@ -26,7 +27,8 @@ func TestExtractMsgTypes(t *testing.T) { }, }, { - LegacyMsgType: "delegate", + MsgTypeUrl: "/cosmos.staking.v1beta1.MsgDelegate", + MsgValueTypeName: "MsgValueDelegate", ValueTypes: []evmtypes.EIP712MsgAttrType{ {Name: "delegator_address", Type: "string"}, {Name: "validator_address", Type: "string"}, @@ -134,7 +136,7 @@ func TestExtractMsgTypes(t *testing.T) { ), }, success: false, - errMsg: "eip712 message multisend is not allowed: invalid request", + errMsg: "eip712 message type \"/cosmos.bank.v1beta1.MsgMultiSend\" is not permitted: invalid type", }, } diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index f33d4ba727..359006b970 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -238,8 +238,11 @@ message TraceConfig { // EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. message EIP712AllowedMsg { - // legacy msg type string - string legacy_msg_type = 1; + // msg's proto type name. ie "/cosmos.bank.v1beta1.MsgSend" + string msg_type_url = 1; + + // name of the eip712 value type. ie "MsgValueSend" + string msg_value_type_name = 2; // types of the msg value repeated EIP712MsgAttrType value_types = 3 [(gogoproto.nullable) = false]; diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 7303770255..f214beafa8 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -654,8 +654,10 @@ func (m *TraceConfig) GetEnableReturnData() bool { // EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. type EIP712AllowedMsg struct { - // legacy msg type string - LegacyMsgType string `protobuf:"bytes,1,opt,name=legacy_msg_type,json=legacyMsgType,proto3" json:"legacy_msg_type,omitempty"` + // msg's proto type name. ie "/cosmos.bank.v1beta1.MsgSend" + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + // name of the eip712 value type. ie "MsgValueSend" + MsgValueTypeName string `protobuf:"bytes,2,opt,name=msg_value_type_name,json=msgValueTypeName,proto3" json:"msg_value_type_name,omitempty"` // types of the msg value ValueTypes []EIP712MsgAttrType `protobuf:"bytes,3,rep,name=value_types,json=valueTypes,proto3" json:"value_types"` // nested types of the msg value @@ -695,9 +697,16 @@ func (m *EIP712AllowedMsg) XXX_DiscardUnknown() { var xxx_messageInfo_EIP712AllowedMsg proto.InternalMessageInfo -func (m *EIP712AllowedMsg) GetLegacyMsgType() string { +func (m *EIP712AllowedMsg) GetMsgTypeUrl() string { if m != nil { - return m.LegacyMsgType + return m.MsgTypeUrl + } + return "" +} + +func (m *EIP712AllowedMsg) GetMsgValueTypeName() string { + if m != nil { + return m.MsgValueTypeName } return "" } @@ -841,111 +850,113 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } var fileDescriptor_d21ecc92c8c8583e = []byte{ - // 1664 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x51, 0x4f, 0x23, 0xc9, - 0x11, 0x06, 0x6c, 0x60, 0xdc, 0x36, 0xf6, 0xd0, 0x70, 0x1b, 0xef, 0xae, 0xc2, 0x90, 0x89, 0x72, - 0x22, 0xd2, 0x1d, 0x1c, 0x9c, 0xd0, 0xae, 0x6e, 0x15, 0x45, 0x0c, 0xcb, 0xdd, 0x41, 0x76, 0x37, - 0xa8, 0x97, 0x28, 0x52, 0xa4, 0x68, 0xd4, 0x9e, 0xe9, 0x1b, 0xe6, 0x98, 0x99, 0xb6, 0xba, 0xdb, - 0x5e, 0x3b, 0xca, 0x0f, 0x88, 0x94, 0x97, 0xfc, 0x84, 0xfc, 0x85, 0xfc, 0x87, 0x3c, 0x9c, 0xf2, - 0x74, 0x4f, 0x51, 0x94, 0x87, 0xd1, 0x89, 0x7d, 0xe3, 0x91, 0x5f, 0x10, 0x75, 0x75, 0xdb, 0xd8, - 0x86, 0x4d, 0x02, 0x4f, 0xee, 0xaa, 0xae, 0xfa, 0xbe, 0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 0xac, 0x6a, 0xd0, 0xba, 0x2a, 0xbd, 0x3a, 0xe8, 0xdf, 0x80, 0x9a, - 0x4c, 0x0a, 0xf8, 0x13, 0xb4, 0xac, 0x06, 0x93, 0xcd, 0x66, 0xed, 0xaa, 0xf4, 0x5a, 0xea, 0x26, - 0x4c, 0xdd, 0x4b, 0xc8, 0x92, 0x1a, 0x40, 0x4f, 0xd9, 0x41, 0x8e, 0x1a, 0x84, 0x69, 0x11, 0xb3, - 0x01, 0xf4, 0x93, 0x6a, 0xb0, 0x7e, 0x55, 0x7a, 0xee, 0x84, 0xf9, 0xb1, 0x9e, 0x23, 0xcb, 0x6a, - 0x00, 0x03, 0xfc, 0x09, 0x42, 0x66, 0x49, 0xc0, 0x60, 0xba, 0xc1, 0xca, 0x55, 0xe9, 0xd5, 0x40, - 0x0b, 0xd8, 0x37, 0x43, 0xec, 0xa3, 0x45, 0x83, 0xed, 0x00, 0x76, 0xe3, 0xaa, 0xf4, 0x9c, 0x8c, - 0x27, 0x06, 0xd3, 0x4c, 0xe9, 0x54, 0x09, 0x96, 0xf3, 0x3e, 0x8b, 0xe1, 0xc2, 0x75, 0xc8, 0x48, - 0xf4, 0xff, 0xbc, 0x80, 0x9c, 0xb3, 0x01, 0x61, 0xb2, 0x97, 0x29, 0xfc, 0x25, 0x72, 0x23, 0x5e, - 0x28, 0x41, 0x23, 0x15, 0x4e, 0xa5, 0x36, 0x78, 0x7a, 0x53, 0x61, 0xb3, 0x16, 0x3e, 0x69, 0x8d, - 0x54, 0x07, 0x36, 0xff, 0xeb, 0x68, 0xb1, 0x93, 0x71, 0x9e, 0x43, 0x25, 0x34, 0x88, 0x11, 0x30, - 0x81, 0xac, 0xc1, 0x2e, 0x57, 0xe0, 0xbb, 0xf1, 0x27, 0xb7, 0x77, 0x79, 0xa6, 0x54, 0x82, 0x47, - 0xf6, 0xdb, 0xb1, 0x69, 0xb8, 0xad, 0xbf, 0xaf, 0x73, 0x0b, 0xa5, 0xe4, 0xa2, 0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f3, 0x51, 0x3c, 0x30, - 0xc6, 0xbf, 0x44, 0x8b, 0x54, 0x29, 0x31, 0xba, 0xd0, 0xef, 0x11, 0x80, 0xf1, 0xf3, 0x5f, 0xa0, - 0xd5, 0x5b, 0x16, 0x77, 0x32, 0x61, 0x54, 0x85, 0x6c, 0x9a, 0x53, 0x02, 0xe3, 0x20, 0xf8, 0xee, - 0x72, 0x63, 0xfe, 0xfb, 0xcb, 0x8d, 0xf9, 0x1f, 0x2e, 0x37, 0xe6, 0xff, 0xf2, 0x7e, 0x63, 0xee, - 0xfb, 0xf7, 0x1b, 0x73, 0xff, 0x7a, 0xbf, 0x31, 0xf7, 0xbb, 0xad, 0x89, 0x86, 0xaa, 0xce, 0xa9, - 0x90, 0xa9, 0xdc, 0xb9, 0xf9, 0x47, 0x60, 0x00, 0xff, 0x09, 0x40, 0xb2, 0x3a, 0x4b, 0xf0, 0xd6, - 0xff, 0xfc, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xa4, 0xe8, 0xc6, 0x31, 0x10, 0x00, 0x00, + // 1683 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x4e, 0xe4, 0xc8, + 0x15, 0x06, 0xda, 0x80, 0xbb, 0xda, 0x74, 0x9b, 0x6a, 0x76, 0xd2, 0x33, 0xa3, 0x60, 0xe2, 0x28, + 0x11, 0x91, 0x76, 0x60, 0x61, 0x85, 0x66, 0xb4, 0xa3, 0x28, 0xc2, 0x0c, 0xbb, 0x0b, 0x99, 0x99, + 0xa0, 0x82, 0x4d, 0xa4, 0x48, 0x91, 0x55, 0x6d, 0xd7, 0x1a, 0x2f, 0xb6, 0xab, 0x55, 0x55, 0xdd, + 0xd3, 0x1d, 0xe5, 0x01, 0x22, 0xe5, 0x26, 0x8f, 0x90, 0x57, 0xc8, 0x3b, 0xe4, 0x62, 0x95, 0xab, + 0xbd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+ 0xea, 0x83, 0x49, 0x5f, 0xdc, 0x47, 0xfa, 0x62, 0x9a, 0x54, 0xfb, 0xc8, 0x66, 0x9f, 0xa9, 0x44, + 0xcb, 0x7e, 0x78, 0xb3, 0xdf, 0x29, 0x6a, 0x7d, 0xa4, 0xd1, 0x74, 0x7f, 0x02, 0x1b, 0x11, 0x2d, + 0xb8, 0x90, 0xba, 0x82, 0x76, 0x32, 0x62, 0x38, 0xab, 0x8a, 0xf3, 0x64, 0x2e, 0xce, 0xa7, 0xe6, + 0x22, 0xb9, 0x07, 0xcf, 0x47, 0xcd, 0x69, 0xb5, 0x66, 0xef, 0x00, 0xb7, 0x43, 0x04, 0x61, 0xbc, + 0xdd, 0x65, 0x89, 0x61, 0x06, 0x8a, 0xf9, 0x78, 0x2e, 0x66, 0xf3, 0x1c, 0xcc, 0x62, 0xf9, 0xa8, + 0x31, 0x56, 0x69, 0xc6, 0x6f, 0x40, 0x3d, 0x95, 0xdb, 0x68, 0x77, 0x33, 0xc3, 0x57, 0x53, 0x7c, + 0x47, 0x73, 0xf1, 0x99, 0x87, 0x79, 0x1a, 0xc9, 0x47, 0x6b, 0x43, 0x85, 0xe6, 0xea, 0x02, 0x98, + 0x77, 0x53, 0x16, 0x26, 0x19, 0x8e, 0x52, 0xc2, 0x0c, 0x9f, 0xa3, 0xf8, 0xbe, 0x98, 0x8b, 0xef, + 0xb1, 0xe6, 0xbb, 0x8b, 0xe6, 0x23, 0x57, 0x2a, 0xbf, 0xd0, 0x3a, 0x4d, 0x1b, 0x03, 0xa7, 0x4d, + 0x58, 0x96, 0x16, 0x86, 0x70, 0x4d, 0x11, 0x1e, 0xce, 0x45, 0x68, 0xfa, 0x74, 0x12, 0xc7, 0x47, + 0x35, 0x2d, 0x8e, 0x58, 0x32, 0x5a, 0xc4, 0x74, 0xc8, 0xb2, 0xfe, 0x70, 0x96, 0x49, 0x1c, 0x1f, + 0xd5, 0xb4, 0xa8, 0x59, 0xfa, 0xa0, 0x89, 0x19, 0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0x0f, 0x15, 0x02, 0xbd, 0x21, 0x1c, 0x87, 0x6f, 0x81, 0x53, 0xc8, 0x4f, + 0x93, 0xd8, 0x80, 0x59, 0x0a, 0xec, 0x67, 0x1f, 0x02, 0x7b, 0xab, 0x7c, 0xdf, 0xe8, 0xad, 0x1b, + 0xb8, 0x9a, 0x06, 0x50, 0x78, 0xfe, 0x37, 0xa0, 0x79, 0x8f, 0xa7, 0xbc, 0x7f, 0x55, 0x4a, 0xe6, + 0xe2, 0x97, 0x6b, 0xf8, 0x2b, 0xb0, 0x8c, 0x85, 0x60, 0xc3, 0x9b, 0x7f, 0x8e, 0x04, 0x74, 0x9c, + 0xff, 0x12, 0xac, 0xdf, 0xf1, 0xb8, 0x97, 0x09, 0x02, 0x4b, 0x66, 0x67, 0x0a, 0xaa, 0xd6, 0x41, + 0xf0, 0xed, 0xf5, 0xe6, 0xe2, 0x77, 0xd7, 0x9b, 0x8b, 0xdf, 0x5f, 0x6f, 0x2e, 0xfe, 0xf5, 0xfd, + 0xe6, 0xc2, 0x77, 0xef, 0x37, 0x17, 0xfe, 0xf5, 0x7e, 0x73, 0xe1, 0xf7, 0xdb, 0x13, 0x93, 0x57, + 0x5c, 0x62, 0xc6, 0x53, 0xbe, 0x3b, 0xfe, 0xeb, 0xa0, 0xaf, 0xfe, 0x3c, 0x50, 0xc5, 0x6a, 0xaf, + 0xa8, 0x3f, 0x05, 0x3e, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xff, 0x38, 0xa9, 0x5a, + 0x10, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1686,10 +1697,17 @@ func (m *EIP712AllowedMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if len(m.LegacyMsgType) > 0 { - i -= len(m.LegacyMsgType) - copy(dAtA[i:], m.LegacyMsgType) - i = encodeVarintEvm(dAtA, i, uint64(len(m.LegacyMsgType))) + if len(m.MsgValueTypeName) > 0 { + i -= len(m.MsgValueTypeName) + copy(dAtA[i:], m.MsgValueTypeName) + i = encodeVarintEvm(dAtA, i, uint64(len(m.MsgValueTypeName))) + i-- + dAtA[i] = 0x12 + } + if len(m.MsgTypeUrl) > 0 { + i -= len(m.MsgTypeUrl) + copy(dAtA[i:], m.MsgTypeUrl) + i = encodeVarintEvm(dAtA, i, uint64(len(m.MsgTypeUrl))) i-- dAtA[i] = 0xa } @@ -2069,7 +2087,11 @@ func (m *EIP712AllowedMsg) Size() (n int) { } var l int _ = l - l = len(m.LegacyMsgType) + l = len(m.MsgTypeUrl) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.MsgValueTypeName) if l > 0 { n += 1 + l + sovEvm(uint64(l)) } @@ -4175,7 +4197,39 @@ func (m *EIP712AllowedMsg) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LegacyMsgType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgValueTypeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4203,7 +4257,7 @@ func (m *EIP712AllowedMsg) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LegacyMsgType = string(dAtA[iNdEx:postIndex]) + m.MsgValueTypeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/evm/types/params.go b/x/evm/types/params.go index b51dec2504..03bc8a1745 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -94,10 +94,10 @@ func (p Params) Validate() error { return validateEIP712AllowedMsgs(p.EIP712AllowedMsgs) } -// EIP712AllowedMsgFromMsgType returns the EIP712AllowedMsg for a given legacy message type. -func (p Params) EIP712AllowedMsgFromMsgType(legacyMsgType string) *EIP712AllowedMsg { +// EIP712AllowedMsgFromMsgType returns the EIP712AllowedMsg for a given message type url. +func (p Params) EIP712AllowedMsgFromMsgType(msgTypeUrl string) *EIP712AllowedMsg { for _, allowedMsg := range p.EIP712AllowedMsgs { - if allowedMsg.LegacyMsgType == legacyMsgType { + if allowedMsg.MsgTypeUrl == msgTypeUrl { return &allowedMsg } } @@ -160,13 +160,13 @@ func validateEIP712AllowedMsgs(i interface{}) error { return fmt.Errorf("invalid EIP712AllowedMsg slice type: %T", i) } - // ensure no duplicate legacy msg types + // ensure no duplicate msg type urls msgTypes := make(map[string]bool) for _, allowedMsg := range allowedMsgs { - if _, ok := msgTypes[allowedMsg.LegacyMsgType]; ok { - return fmt.Errorf("duplicate eip712 allowed legacy msg type: %s", allowedMsg.LegacyMsgType) + if _, ok := msgTypes[allowedMsg.MsgTypeUrl]; ok { + return fmt.Errorf("duplicate eip712 allowed legacy msg type: %s", allowedMsg.MsgTypeUrl) } - msgTypes[allowedMsg.LegacyMsgType] = true + msgTypes[allowedMsg.MsgTypeUrl] = true } return nil From b45eac878eb2afa258c892f0680385e25b492940 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 26 Jul 2022 11:15:01 -0400 Subject: [PATCH 09/11] remove msgTypeNameFromLegacyMsgType --- ethereum/eip712/eip712.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index 74e9b8beb5..de6ccd342c 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -3,7 +3,6 @@ package eip712 import ( "encoding/json" "fmt" - "strings" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -183,8 +182,3 @@ func msgAttrsToEIP712Types(attrTypes []evmtypes.EIP712MsgAttrType) []apitypes.Ty } return msgTypes } - -// msgTypeNameFromLegacyMsgType returns the name of the EIP712 type for a legacy message type. -func msgTypeNameFromLegacyMsgType(legacyMsgType string) string { - return fmt.Sprintf("MsgValue%s", strings.Title(legacyMsgType)) -} From 6e21fbaff6592a67066b6bf71ccffdc873a28701 Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 26 Jul 2022 12:00:11 -0400 Subject: [PATCH 10/11] rename EIP712SignBytes --- app/ante/eip712.go | 2 +- app/ante/utils_test.go | 2 +- ethereum/eip712/eip712.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 929067b197..eb36ff956e 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -166,7 +166,7 @@ func VerifySignature( return sdkerrors.Wrap(sdkerrors.ErrNoSignatures, "tx doesn't contain any msgs to verify signature") } - txBytes := eip712.EIP712SignBytes( + txBytes := eip712.ConstructUntypedEIP712Data( signerData.ChainID, signerData.AccountNumber, signerData.Sequence, diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index fa20ac3924..a90c57ea64 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -251,7 +251,7 @@ func (suite *AnteTestSuite) CreateTestEIP712CosmosTxBuilder( fee := legacytx.NewStdFee(gas, gasAmount) accNumber := suite.app.AccountKeeper.GetAccount(suite.ctx, from).GetAccountNumber() - data := eip712.EIP712SignBytes(chainId, accNumber, nonce, 0, fee, msgs, "") + data := eip712.ConstructUntypedEIP712Data(chainId, accNumber, nonce, 0, fee, msgs, "") evmParams := suite.app.EvmKeeper.GetParams(suite.ctx) typedData, err := eip712.WrapTxToTypedData(ethChainId, msgs, data, &eip712.FeeDelegationOptions{ FeePayer: from, diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index de6ccd342c..2a8ff94410 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -14,8 +14,8 @@ import ( evmtypes "github.com/tharsis/ethermint/x/evm/types" ) -// EIP712SignBytes returns the bytes to sign for a transaction. -func EIP712SignBytes(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { +// ConstructUntypedEIP712Data returns the bytes to sign for a transaction. +func ConstructUntypedEIP712Data(chainID string, accnum, sequence, timeout uint64, fee legacytx.StdFee, msgs []sdk.Msg, memo string) []byte { signBytes := legacytx.StdSignBytes(chainID, accnum, sequence, timeout, fee, msgs, memo) var inInterface map[string]interface{} err := json.Unmarshal(signBytes, &inInterface) From 19ff3709e70a4dcfb08c86786229eac91d4ebe6c Mon Sep 17 00:00:00 2001 From: DracoLi Date: Tue, 26 Jul 2022 14:36:09 -0400 Subject: [PATCH 11/11] use kava cosmos sdk --- cmd/ethermintd/main.go | 2 +- go.mod | 12 +--------- go.sum | 51 ++---------------------------------------- 3 files changed, 4 insertions(+), 61 deletions(-) diff --git a/cmd/ethermintd/main.go b/cmd/ethermintd/main.go index f67973af1b..50bebef100 100644 --- a/cmd/ethermintd/main.go +++ b/cmd/ethermintd/main.go @@ -17,7 +17,7 @@ func main() { rootCmd, _ := NewRootCmd() - if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { + if err := svrcmd.Execute(rootCmd, EnvPrefix, app.DefaultNodeHome); err != nil { switch e := err.(type) { case server.ErrorCode: os.Exit(e.Code) diff --git a/go.mod b/go.mod index c6b61dd93b..a3d0e307b5 100644 --- a/go.mod +++ b/go.mod @@ -42,13 +42,9 @@ require ( github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.5 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect - github.com/aokoli/goutils v1.1.1 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect @@ -71,7 +67,6 @@ require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect @@ -98,9 +93,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/huandu/xstrings v1.3.2 // indirect github.com/huin/goupnp v1.0.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -114,10 +107,8 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.4 // indirect @@ -129,8 +120,6 @@ require ( github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/prometheus/tsdb v0.7.1 // indirect - github.com/pseudomuto/protoc-gen-doc v1.5.1 // indirect - github.com/pseudomuto/protokit v0.2.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/rs/zerolog v1.23.0 // indirect @@ -165,6 +154,7 @@ require ( replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 + github.com/cosmos/cosmos-sdk => github.com/kava-labs/cosmos-sdk v0.45.4-kava.3 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 50949fcb06..97eb02805e 100644 --- a/go.sum +++ b/go.sum @@ -93,14 +93,6 @@ github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= @@ -138,9 +130,6 @@ github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKS github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/aokoli/goutils v1.1.1 h1:/hA+Ywo3AxoDZY5ZMnkiEkUvkK4BPp927ax110KCqqg= -github.com/aokoli/goutils v1.1.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -180,7 +169,6 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= @@ -262,9 +250,6 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.45.1/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= -github.com/cosmos/cosmos-sdk v0.45.3 h1:PiVSU3IkNEDPhoxOZHk2lPnhwBBJgEYAtAR0jGXRN4g= -github.com/cosmos/cosmos-sdk v0.45.3/go.mod h1:qYm5JEr0ZlbnmoP/Q3b+dYMOliHf4ddHirpILiwZzqg= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -342,10 +327,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.16 h1:3oPrumn0bCW/idjcxMn5YYVCdK7VzJYIvwGZUGLEaoc= @@ -464,7 +446,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -646,9 +627,6 @@ github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -659,9 +637,6 @@ github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3 github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= @@ -716,6 +691,8 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kava-labs/cosmos-sdk v0.45.4-kava.3 h1:U4esIl4rzu9sApLFYGwbccPQTQdRg6C9exUVrokqSHY= +github.com/kava-labs/cosmos-sdk v0.45.4-kava.3/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -759,7 +736,6 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -813,8 +789,6 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -829,8 +803,6 @@ github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGg github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -847,9 +819,6 @@ github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ib github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos= -github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -934,7 +903,6 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= @@ -1009,11 +977,6 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.5.1 h1:Ah259kcrio7Ix1Rhb6u8FCaOkzf9qRBqXnvAufg061w= -github.com/pseudomuto/protoc-gen-doc v1.5.1/go.mod h1:XpMKYg6zkcpgfpCfQ8GcWBDRtRxOmMR5w7pz4Xo+dYM= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/pseudomuto/protokit v0.2.1 h1:kCYpE3thoR6Esm0CUvd5xbrDTOZPvQPTDeyXpZfrJdk= -github.com/pseudomuto/protokit v0.2.1/go.mod h1:gt7N5Rz2flBzYafvaxyIxMZC0TTF5jDZfRnw25hAAyo= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1078,14 +1041,12 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= @@ -1100,7 +1061,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= @@ -1120,7 +1080,6 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1394,7 +1353,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1655,7 +1613,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -1664,7 +1621,6 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= @@ -1680,7 +1636,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180427144745-86e600f69ee4/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1764,7 +1719,6 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 h1:myaecH64R0bIEDjNORIel4iXubqzaHU1K2z8ajBwWcM= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -1800,7 +1754,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=