diff --git a/common/chain.go b/common/chain.go index 0952a64b49..92fa8d2723 100644 --- a/common/chain.go +++ b/common/chain.go @@ -112,6 +112,14 @@ func (chain Chain) IsKlaytnChain() bool { return chain.ChainId == 1001 } +func (chain Chain) IsProvable() bool { + return chain.ChainId == 1 || + chain.ChainId == 5 || + chain.ChainId == 1337 || + chain.ChainId == 97 || + chain.ChainId == 56 +} + func IsBitcoinChain(chainID int64) bool { return chainID == 18444 || // regtest chainID == 18332 || //testnet diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index 3cc1894372..07505b5486 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -25,6 +25,9 @@ message MsgAddToInTxTracker { int64 chain_id = 2; string tx_hash = 3; common.CoinType coin_type = 4; + common.Proof proof = 5; + string block_hash = 6; + int64 tx_index = 7; } ``` diff --git a/proto/crosschain/tx.proto b/proto/crosschain/tx.proto index 785b4dae06..10208bd853 100644 --- a/proto/crosschain/tx.proto +++ b/proto/crosschain/tx.proto @@ -26,6 +26,9 @@ message MsgAddToInTxTracker { int64 chain_id = 2; string tx_hash = 3; common.CoinType coin_type = 4; + common.Proof proof = 5; + string block_hash = 6; + int64 tx_index = 7; } message MsgAddToInTxTrackerResponse {} diff --git a/x/crosschain/keeper/keeper_in_tx_tracker.go b/x/crosschain/keeper/keeper_in_tx_tracker.go index 6e1f5995e3..e11d418b84 100644 --- a/x/crosschain/keeper/keeper_in_tx_tracker.go +++ b/x/crosschain/keeper/keeper_in_tx_tracker.go @@ -4,12 +4,16 @@ import ( "context" "fmt" + cosmoserrors "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" + eth "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/x/crosschain/types" - zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" + observerTypes "github.com/zeta-chain/zetacore/x/observer/types" ) func getInTrackerKey(chainID int64, txHash string) string { @@ -85,19 +89,27 @@ func (k msgServer) AddToInTxTracker(goCtx context.Context, msg *types.MsgAddToIn ctx := sdk.UnwrapSDKContext(goCtx) chain := k.zetaObserverKeeper.GetParams(ctx).GetChainFromChainID(msg.ChainId) if chain == nil { - return nil, zetaObserverTypes.ErrSupportedChains + return nil, observerTypes.ErrSupportedChains } - adminPolicyAccount := k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(zetaObserverTypes.Policy_Type_group1) + adminPolicyAccount := k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(observerTypes.Policy_Type_group1) isAdmin := msg.Creator == adminPolicyAccount isObserver, err := k.zetaObserverKeeper.IsAuthorized(ctx, msg.Creator, chain) if err != nil { ctx.Logger().Error("Error while checking if the account is an observer", err) } + isProven := false + if msg.Proof != nil { + isProven, err = k.VerifyInTxTrackerProof(ctx, msg.Proof, msg.BlockHash, msg.TxIndex, msg.ChainId, msg.CoinType) + if err != nil { + return nil, err + } + } + // Sender needs to be either the admin policy account or an observer - if !(isAdmin || isObserver) { - return nil, sdkerrors.Wrap(zetaObserverTypes.ErrNotAuthorized, fmt.Sprintf("Creator %s", msg.Creator)) + if !(isAdmin || isObserver || isProven) { + return nil, sdkerrors.Wrap(observerTypes.ErrNotAuthorized, fmt.Sprintf("Creator %s", msg.Creator)) } k.Keeper.SetInTxTracker(ctx, types.InTxTracker{ @@ -107,3 +119,68 @@ func (k msgServer) AddToInTxTracker(goCtx context.Context, msg *types.MsgAddToIn }) return &types.MsgAddToInTxTrackerResponse{}, nil } + +func (k Keeper) VerifyInTxTrackerProof(ctx sdk.Context, proof *common.Proof, hash string, txIndex int64, chainID int64, coinType common.CoinType) (bool, error) { + + senderChain := common.GetChainFromChainID(chainID) + if senderChain == nil { + return false, types.ErrUnsupportedChain + } + + if !senderChain.IsProvable() { + return false, types.ErrCannotVerifyProof.Wrapf("chain %d does not support block header verification", chainID) + } + + blockHash := eth.HexToHash(hash) + res, found := k.zetaObserverKeeper.GetBlockHeader(ctx, blockHash.Bytes()) + if !found { + return false, cosmoserrors.Wrap(observerTypes.ErrBlockHeaderNotFound, fmt.Sprintf("block header not found %s", blockHash)) + } + + // verify and process the proof + val, err := proof.Verify(res.Header, int(txIndex)) + if err != nil && !common.IsErrorInvalidProof(err) { + return false, err + } + var txx ethtypes.Transaction + err = txx.UnmarshalBinary(val) + if err != nil { + return false, err + } + + coreParams, found := k.zetaObserverKeeper.GetCoreParamsByChainID(ctx, senderChain.ChainId) + if !found { + return false, types.ErrUnsupportedChain.Wrapf("core params not found for chain %d", senderChain.ChainId) + } + tssRes, err := k.GetTssAddress(ctx, &types.QueryGetTssAddressRequest{}) + if err != nil { + return false, err + } + tssAddr := eth.HexToAddress(tssRes.Eth) + if tssAddr == (eth.Address{}) { + return false, fmt.Errorf("tss address not found") + } + if common.IsEVMChain(chainID) { + switch coinType { + case common.CoinType_Zeta: + if txx.To().Hex() != coreParams.ConnectorContractAddress { + return false, types.ErrCannotVerifyProof.Wrapf("receiver is not connector contract for coin type %s", coinType) + } + return true, nil + case common.CoinType_ERC20: + if txx.To().Hex() != coreParams.Erc20CustodyContractAddress { + return false, types.ErrCannotVerifyProof.Wrapf("receiver is not erc20Custory contract for coin type %s", coinType) + } + return true, nil + case common.CoinType_Gas: + if txx.To().Hex() != tssAddr.Hex() { + return false, types.ErrCannotVerifyProof.Wrapf("receiver is not tssAddress contract for coin type %s", coinType) + } + return true, nil + } + } + if common.IsBitcoinChain(chainID) { + return false, types.ErrCannotVerifyProof.Wrapf("cannot verify proof for bitcoin chain %d", chainID) + } + return false, fmt.Errorf("proof failed") +} diff --git a/x/crosschain/types/errors.go b/x/crosschain/types/errors.go index b8191ef9fa..904a0f1d9a 100644 --- a/x/crosschain/types/errors.go +++ b/x/crosschain/types/errors.go @@ -38,4 +38,6 @@ var ( ErrInvalidGasAmount = errorsmod.Register(ModuleName, 1137, "invalid gas amount") ErrNoLiquidityPool = errorsmod.Register(ModuleName, 1138, "no liquidity pool") ErrInvalidCoinType = errorsmod.Register(ModuleName, 1139, "invalid coin type") + + ErrCannotVerifyProof = errorsmod.Register(ModuleName, 1140, "invalid coin type") ) diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 0fb5cc6b25..d6e364eb93 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -32,10 +32,13 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgAddToInTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType common.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType common.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + Proof *common.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } @@ -99,6 +102,27 @@ func (m *MsgAddToInTxTracker) GetCoinType() common.CoinType { return common.CoinType_Zeta } +func (m *MsgAddToInTxTracker) GetProof() *common.Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *MsgAddToInTxTracker) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *MsgAddToInTxTracker) GetTxIndex() int64 { + if m != nil { + return m.TxIndex + } + return 0 +} + type MsgAddToInTxTrackerResponse struct { } @@ -1336,95 +1360,96 @@ func init() { func init() { proto.RegisterFile("crosschain/tx.proto", fileDescriptor_81d6d611190b7635) } var fileDescriptor_81d6d611190b7635 = []byte{ - // 1402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xaf, 0x69, 0x9b, 0x26, 0xa7, 0x4d, 0xd7, 0xba, 0xdd, 0xea, 0xb9, 0x5b, 0xda, 0xb9, 0x6c, - 0x54, 0x68, 0x4d, 0x46, 0x06, 0x62, 0x0c, 0x1e, 0x58, 0xab, 0xd1, 0x95, 0xd1, 0x76, 0x72, 0x33, - 0x90, 0xf6, 0x62, 0x39, 0xf6, 0xad, 0x63, 0x35, 0xf6, 0x8d, 0x7c, 0x6f, 0xaa, 0x64, 0xe2, 0x09, - 0x89, 0x07, 0xde, 0x10, 0x42, 0x02, 0xf1, 0x05, 0xf8, 0x2a, 0x7b, 0x42, 0x13, 0x4f, 0xc0, 0xc3, - 0x04, 0xeb, 0x37, 0xe0, 0x13, 0xa0, 0xfb, 0xc7, 0x6e, 0x9c, 0x36, 0xff, 0x3a, 0xf1, 0x94, 0x7b, - 0xce, 0xbd, 0xe7, 0x9c, 0xdf, 0xf9, 0x77, 0xef, 0x71, 0x60, 0xc1, 0x89, 0x30, 0x21, 0x4e, 0xcd, - 0xf6, 0xc3, 0x12, 0x6d, 0x15, 0x1b, 0x11, 0xa6, 0x58, 0xbd, 0xfe, 0x1c, 0x51, 0x9b, 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0x77, 0x05, 0xe6, 0x77, 0x89, 0xf7, 0x55, 0xcd, 0xa7, 0xa8, 0xee, - 0x13, 0xfa, 0xd0, 0xdc, 0x2a, 0xdf, 0xe9, 0x63, 0x6d, 0x0d, 0xf2, 0x28, 0x72, 0xca, 0x77, 0x2c, - 0x5b, 0x28, 0x92, 0x06, 0x67, 0x38, 0x33, 0x06, 0xdb, 0x19, 0xc5, 0xf1, 0x74, 0x14, 0x55, 0x98, - 0x08, 0xed, 0x40, 0xc4, 0x29, 0x67, 0xf2, 0xb5, 0x7a, 0x05, 0x32, 0xa4, 0x1d, 0x54, 0x71, 0x5d, - 0x9b, 0x14, 0x81, 0x15, 0x94, 0xaa, 0x43, 0xd6, 0x45, 0x8e, 0x1f, 0xd8, 0x75, 0xa2, 0x65, 0x56, - 0x95, 0xf5, 0xbc, 0x99, 0xd0, 0xea, 0x32, 0xe4, 0x3c, 0x9b, 0x58, 0x75, 0x3f, 0xf0, 0xa9, 0x36, - 0xc5, 0x6d, 0x64, 0x3d, 0x9b, 0x7c, 0xc1, 0x68, 0x63, 0x19, 0xae, 0x9e, 0xf1, 0x29, 0xf1, 0xf8, - 0x4f, 0x05, 0x16, 0xe3, 0x04, 0xec, 0x37, 0xe9, 0x1b, 0x56, 0xc5, 0x22, 0x4c, 0x86, 0x38, 0x74, - 0x10, 0xf7, 0x73, 0xc2, 0x14, 0x44, 0x67, 0xad, 0x4c, 0xa4, 0x6a, 0x65, 0x0d, 0x26, 0x1b, 0x11, - 0xc6, 0x87, 0xdc, 0xd3, 0xe9, 0x72, 0x3e, 0xae, 0x93, 0x27, 0x8c, 0x69, 0x8a, 0x3d, 0x96, 0xd1, - 0x6a, 0x1d, 0x3b, 0x47, 0x42, 0x41, 0x46, 0x64, 0x94, 0x73, 0xb8, 0x8e, 0xab, 0x90, 0xa5, 0x2d, - 0xcb, 0x0f, 0x5d, 0xd4, 0x92, 0x9e, 0x4f, 0xd1, 0xd6, 0x0e, 0x23, 0x8d, 0x02, 0x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, 0x00, 0x00, + // 1409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x6f, 0xdc, 0xc4, + 0x1b, 0x8f, 0xff, 0x79, 0x5b, 0x3f, 0xc9, 0xa6, 0xc9, 0x24, 0x6d, 0x5c, 0xa7, 0xd9, 0xa4, 0xce, + 0xbf, 0x25, 0x42, 0xcd, 0x6e, 0xd9, 0x82, 0x28, 0x85, 0x03, 0x4d, 0x54, 0xd2, 0x50, 0x92, 0x54, + 0xce, 0x16, 0xa4, 0x5e, 0x2c, 0xaf, 0x3d, 0xf1, 0x5a, 0x59, 0x7b, 0x56, 0x9e, 0xd9, 0x68, 0xb7, + 0xe2, 0x84, 0xc4, 0x81, 0x1b, 0x07, 0x24, 0x10, 0x5f, 0x80, 0xaf, 0xd2, 0x13, 0xaa, 0x38, 0x01, + 0x87, 0x0a, 0xda, 0x4f, 0x00, 0x9f, 0x00, 0x79, 0x66, 0xec, 0xac, 0x37, 0xd9, 0x97, 0xa4, 0xea, + 0x69, 0xe7, 0x79, 0x3c, 0xcf, 0xfb, 0xef, 0x99, 0x79, 0x66, 0x61, 0xde, 0x89, 0x08, 0xa5, 0x4e, + 0xcd, 0xf6, 0xc3, 0x12, 0x6b, 0x15, 0x1b, 0x11, 0x61, 0x04, 0x2d, 0x3f, 0xc3, 0xcc, 0xe6, 0xbc, + 0x22, 0x5f, 0x91, 0x08, 0x17, 0x4f, 0xf6, 0xe9, 0xf3, 0x0e, 0x09, 0x02, 0x12, 0x96, 0xc4, 0x8f, + 0x90, 0xd1, 0x17, 0x3c, 0xe2, 0x11, 0xbe, 0x2c, 0xc5, 0x2b, 0xc1, 0x35, 0xfe, 0x51, 0x60, 0x7e, + 0x97, 0x7a, 0xf7, 0x5d, 0xb7, 0x42, 0x76, 0xc2, 0x4a, 0xab, 0x12, 0xd9, 0xce, 0x11, 0x8e, 0x90, + 0x06, 0x93, 0x4e, 0x84, 0x6d, 0x46, 0x22, 0x4d, 0x59, 0x55, 0xd6, 0x55, 0x33, 0x21, 0xd1, 0x55, + 0xc8, 0x71, 0x2b, 0x96, 0xef, 0x6a, 0xff, 0x5b, 0x55, 0xd6, 0x47, 0xcd, 0x49, 0x4e, 0xef, 0xb8, + 0x68, 0x11, 0x26, 0x59, 0xcb, 0xaa, 0xd9, 0xb4, 0xa6, 0x8d, 0x72, 0xa1, 0x09, 0xd6, 0x7a, 0x68, + 0xd3, 0x1a, 0xda, 0x00, 0xd5, 0x21, 0x7e, 0x68, 0xb1, 0x76, 0x03, 0x6b, 0x63, 0xab, 0xca, 0xfa, + 0x4c, 0x79, 0xb6, 0x28, 0xbd, 0xdb, 0x22, 0x7e, 0x58, 0x69, 0x37, 0xb0, 0x99, 0x73, 0xe4, 0x0a, + 0xad, 0xc1, 0x78, 0x23, 0x22, 0xe4, 0x50, 0x1b, 0x5f, 0x55, 0xd6, 0xa7, 0xca, 0xf9, 0x64, 0xeb, + 0xe3, 0x98, 0x69, 0x8a, 0x6f, 0x68, 0x19, 0xa0, 0x5a, 0x27, 0xce, 0x91, 0xb0, 0x37, 0xc1, 0xed, + 0xa9, 0x9c, 0xc3, 0x4d, 0x5e, 0x85, 0x1c, 0x6b, 0x59, 0x7e, 0xe8, 0xe2, 0x96, 0x36, 0x29, 0xdc, + 0x64, 0xad, 0x9d, 0x98, 0x34, 0x96, 0x61, 0xe9, 0x8c, 0x90, 0x4d, 0x4c, 0x1b, 0x24, 0xa4, 0xd8, + 0xd8, 0xe3, 0x19, 0x79, 0xd2, 0x70, 0x6d, 0x86, 0x2b, 0x94, 0xde, 0x77, 0xdd, 0x08, 0x53, 0xda, + 0x27, 0x23, 0xcb, 0x00, 0x8c, 0x52, 0xab, 0xd1, 0xac, 0x1e, 0xe1, 0x36, 0xcf, 0x89, 0x6a, 0xaa, + 0x8c, 0xd2, 0xc7, 0x9c, 0x21, 0xcd, 0x75, 0xeb, 0x4b, 0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 0x9d, 0x5a, 0xfc, 0x59, 0x01, 0xad, + 0xe7, 0x18, 0x33, 0x04, 0xb4, 0x7a, 0xc9, 0xea, 0x9b, 0x17, 0x97, 0x4d, 0x9d, 0xfb, 0x51, 0x81, + 0xc5, 0x5e, 0x17, 0xcc, 0x47, 0xe7, 0xd5, 0x9f, 0x8a, 0xea, 0xf7, 0x2f, 0x2c, 0xda, 0x89, 0xd0, + 0xae, 0xa7, 0xe6, 0x10, 0x08, 0xcd, 0x4a, 0x0c, 0x83, 0xd0, 0xb3, 0x9f, 0x7e, 0xfc, 0xec, 0x38, + 0xf5, 0xb2, 0x1e, 0xe2, 0xec, 0xe8, 0x96, 0x19, 0xe6, 0xec, 0xe8, 0xf5, 0xe2, 0xde, 0x7c, 0xf4, + 0xfc, 0x55, 0x41, 0x79, 0xf1, 0xaa, 0xa0, 0xfc, 0xf5, 0xaa, 0xa0, 0x7c, 0xff, 0xba, 0x30, 0xf2, + 0xe2, 0x75, 0x61, 0xe4, 0xf7, 0xd7, 0x85, 0x91, 0xa7, 0xef, 0x75, 0x5c, 0xa3, 0xb1, 0xd6, 0x0d, + 0xf1, 0xbf, 0x4b, 0x62, 0xa0, 0xd4, 0x2a, 0x75, 0xfe, 0x1b, 0x13, 0xdf, 0xaa, 0xd5, 0x09, 0xfe, + 0x3f, 0xca, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x42, 0x6b, 0x9d, 0x5b, 0xa8, 0x11, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1851,6 +1876,30 @@ func (m *MsgAddToInTxTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TxIndex != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if m.CoinType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CoinType)) i-- @@ -2770,6 +2819,17 @@ func (m *MsgAddToInTxTracker) Size() (n int) { if m.CoinType != 0 { n += 1 + sovTx(uint64(m.CoinType)) } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovTx(uint64(m.TxIndex)) + } return n } @@ -3302,6 +3362,93 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &common.Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])