diff --git a/core/vm/evm.go b/core/vm/evm.go index 339b8e299..0c6c0ec61 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -160,6 +160,10 @@ func (evm *EVM) Reset(txCtx TxContext, statedb StateDB) { evm.StateDB = statedb } +func (evm *EVM) Depth() int { + return evm.depth +} + // Cancel cancels any running EVM operation. This may be called concurrently and // it's safe to be called multiple times. func (evm *EVM) Cancel() { diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 9c1fdfbd5..77322d619 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -20,6 +20,7 @@ import ( "bufio" "bytes" "context" + "encoding/json" "errors" "fmt" "io/ioutil" @@ -172,6 +173,7 @@ type TraceConfig struct { Tracer *string Timeout *string Reexec *uint64 + Plain bool } // TraceCallConfig is the config for traceCall API. It holds one more @@ -900,12 +902,14 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex tracer vm.EVMLogger err error txContext = core.NewEVMTxContext(message) + plain = false ) switch { case config == nil: tracer = logger.NewStructLogger(nil) case config.Tracer != nil: // Define a meaningful timeout of a single transaction trace + plain = config.Plain timeout := defaultTraceTimeout if config.Timeout != nil { if timeout, err = time.ParseDuration(*config.Timeout); err != nil { @@ -962,15 +966,30 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex ReturnValue: returnVal, StructLogs: ethapi.FormatLogs(tracer.StructLogs()), }, nil - case Tracer: - return tracer.GetResult() + result, err := tracer.GetResult() + if !plain { + return result, err + } + return PlainTraceByTx{ + BlockNumber: vmctx.BlockNumber.Uint64(), + TransactionHash: txctx.TxHash.String(), + TransactionIndex: uint64(txctx.TxIndex), + PlainTraces: result, + }, err default: panic(fmt.Sprintf("bad tracer type %T", tracer)) } } +type PlainTraceByTx struct { + BlockNumber uint64 `json:"blockNumber"` + TransactionHash string `json:"transactionHash"` + TransactionIndex uint64 `json:"transactionIndex"` + PlainTraces json.RawMessage `json:"plainTraces"` +} + // APIs return the collection of RPC services the tracer package offers. func APIs(backend Backend) []rpc.API { // Append all the local APIs and return diff --git a/eth/tracers/native/types.go b/eth/tracers/native/types.go new file mode 100644 index 000000000..454084c3e --- /dev/null +++ b/eth/tracers/native/types.go @@ -0,0 +1,408 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package native + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/ethereum/go-ethereum/eth/tracers/protobuf" + "github.com/ethereum/go-ethereum/eth/tracers/types" + "github.com/ethereum/go-ethereum/signer/fourbyte" + "github.com/holiman/uint256" + "math/big" + "strings" + "sync/atomic" + "time" +) + +var labelDb *fourbyte.Database + +const ( + LabelTransfer = "Transfer" + LabelInternalTransfer = "Internal-Transfer" +) + +type OpsCallFrame struct { + Type string `json:"type"` + Label string `json:"label"` + From string `json:"from"` + To string `json:"to,omitempty"` + ContractCreated string `json:"contract_created,omitempty"` + Value string `json:"value,omitempty"` + GasIn string `json:"gasIn"` + GasCost string `json:"gasCost"` + Input string `json:"input,omitempty"` + Error string `json:"error,omitempty"` + Calls []*OpsCallFrame `json:"calls,omitempty"` + parent *OpsCallFrame `json:"-"` + code []byte `json:"-"` // for calculating CREATE2 contract address + salt *uint256.Int `json:"-"` // for calculating CREATE2 contract address +} + +func init() { + labelDb, _ = fourbyte.New() + register("OpsTracerNative", NewOpsTracer) + register("OpsPlainTracerNative", NewOpsPlainTracer) +} + +func NewOpsTracer() tracers.Tracer { + return &OpsTracer{} +} + +func NewOpsPlainTracer() tracers.Tracer { + return &OpsTracer{plain: true} +} + +type OpsTracer struct { + plain bool + + evm *vm.EVM + callstack OpsCallFrame + currentDepth int + currentFrame *OpsCallFrame + interrupt uint32 // Atomic flag to signal execution interruption + reason error // Textual reason for the interruption + initialized bool +} + +func (t *OpsTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + if t.initialized { + return + } + t.evm = env + t.callstack = OpsCallFrame{ + Type: "CALL", + From: addrToHex(from), + To: addrToHex(to), + GasIn: uintToHex(gas), + Value: bigToHex(value), + Input: bytesToHex(input), + } + if create { + t.callstack.Type = "CREATE" + } + t.currentDepth = env.Depth() + 1 // depth is the value before "CALL" or "CREATE" + t.currentFrame = &t.callstack + t.initialized = true + return +} + +// Note the result has no "0x" prefix +func getLogValueHex(stack *vm.Stack, memory *vm.Memory) string { + offset := stack.Back(0).Uint64() + length := stack.Back(1).Uint64() + if memory.Len() < int(offset+length) { + memory.Resize(offset + length) + } + return hex.EncodeToString(memory.Data()[offset : offset+length]) +} +func (t *OpsTracer) isPrecompiled(env *vm.EVM, addr common.Address) bool { + // `isPostMerge` is stolen from internal/ethapi/api.go + isPostMerge := env.Context.Difficulty.Cmp(common.Big0) == 0 + activePrecompiles := vm.ActivePrecompiles( + env.ChainConfig().Rules(env.Context.BlockNumber, isPostMerge)) + + for _, p := range activePrecompiles { + if p == addr { + return true + } + } + return false +} + +func (t *OpsTracer) getLabel(topic0 string) string { + //if op != vm.LOG0 { + topic0Bs, _ := hex.DecodeString(topic0) + label, _ := labelDb.Selector(topic0Bs) + //} + return label +} + +func (t *OpsTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + + if err != nil { + t.reason = err + if t.currentFrame != nil { + t.currentFrame.Error = err.Error() + } + return + } + // Fix txs like 0x3494b6a2f62a558c46660691f68e4e2a47694e0b02fad1969e1f0dc725fc9ee5, + // where a sub-CALL is failed but the whole tx is not reverted. + if t.currentDepth == depth+1 && (t.currentFrame.Type == vm.CALL.String() || + t.currentFrame.Type == vm.CALLCODE.String() || + t.currentFrame.Type == vm.DELEGATECALL.String() || + t.currentFrame.Type == vm.STATICCALL.String() || + t.currentFrame.Type == vm.CREATE.String() || + t.currentFrame.Type == vm.CREATE2.String()) { + t.currentFrame.Error = "Subcall reverted" + t.currentFrame = t.currentFrame.parent + t.currentDepth -= 1 + } + + if op == vm.LOG0 || op == vm.LOG1 || op == vm.LOG2 || op == vm.LOG3 || op == vm.LOG4 { + var topic0, topic1, topic2, topic3, logInput string + switch op { + case vm.LOG1: + topic0 = scope.Stack.Back(2).String()[2:] // remove "0x" prefix + logInput = topic0 + case vm.LOG2: + topic0 = scope.Stack.Back(2).String()[2:] // remove "0x" prefix + topic1 = scope.Stack.Back(3).String()[2:] // remove "0x" prefix + logInput = strings.Join([]string{topic0, topic1}, " ") + case vm.LOG3: + topic0 = scope.Stack.Back(2).String()[2:] // remove "0x" prefix + topic1 = scope.Stack.Back(3).String()[2:] // remove "0x" prefix + topic2 = scope.Stack.Back(4).String()[2:] // remove "0x" prefix + logInput = strings.Join([]string{topic0, topic1, topic2}, " ") + case vm.LOG4: + topic0 = scope.Stack.Back(2).String()[2:] // remove "0x" prefix + topic1 = scope.Stack.Back(3).String()[2:] // remove "0x" prefix + topic2 = scope.Stack.Back(4).String()[2:] // remove "0x" prefix + topic3 = scope.Stack.Back(5).String()[2:] // remove "0x" prefix + logInput = strings.Join([]string{topic0, topic1, topic2, topic3}, " ") + } + var label = t.getLabel(topic0) + frame := OpsCallFrame{ + Type: op.String(), + Label: label, + From: strings.ToLower(scope.Contract.Address().String()), + Input: logInput, + Value: getLogValueHex(scope.Stack, scope.Memory), + GasIn: uintToHex(gas), + GasCost: uintToHex(cost), + parent: t.currentFrame, + } + t.currentFrame.Calls = append(t.currentFrame.Calls, &frame) + return + } + + switch op { + case vm.CREATE, vm.CREATE2: + value := scope.Stack.Back(0) + from := scope.Contract.Address() + frame := OpsCallFrame{ + Type: op.String(), + From: strings.ToLower(from.String()), + GasIn: uintToHex(gas), + GasCost: uintToHex(cost), + Value: value.String(), + parent: t.currentFrame, + } + if op == vm.CREATE { + nonce := t.evm.StateDB.GetNonce(from) + frame.ContractCreated = crypto.CreateAddress(from, nonce).String() + } + if op == vm.CREATE2 { + frame.salt = scope.Stack.Back(3) + } + if !value.IsZero() { + frame.Label = LabelInternalTransfer + } + t.currentFrame.Calls = append(t.currentFrame.Calls, &frame) + t.currentFrame = &frame + t.currentDepth += 1 + case vm.SELFDESTRUCT: + value := t.evm.StateDB.GetBalance(scope.Contract.Address()) + var to common.Address = scope.Stack.Back(0).Bytes20() + frame := OpsCallFrame{ + Type: op.String(), + From: strings.ToLower(scope.Contract.Address().String()), + To: strings.ToLower(to.String()), + GasIn: uintToHex(gas), + GasCost: uintToHex(cost), + Value: value.String(), + parent: t.currentFrame, + } + if value.Uint64() != 0 { + frame.Label = LabelInternalTransfer + } + t.currentFrame.Calls = append(t.currentFrame.Calls, &frame) + case vm.CALL, vm.CALLCODE: + var to common.Address = scope.Stack.Back(1).Bytes20() + if t.isPrecompiled(t.evm, to) { + return + } + value := scope.Stack.Back(2) + frame := OpsCallFrame{ + Type: op.String(), + From: strings.ToLower(scope.Contract.Address().String()), + To: strings.ToLower(to.String()), + Value: value.String(), + GasIn: uintToHex(gas), + GasCost: uintToHex(cost), + parent: t.currentFrame, + } + if !value.IsZero() { + frame.Label = LabelInternalTransfer + } + t.currentFrame.Calls = append(t.currentFrame.Calls, &frame) + t.currentFrame = &frame + t.currentDepth += 1 + case vm.DELEGATECALL, vm.STATICCALL: + var to common.Address = scope.Stack.Back(1).Bytes20() + if t.isPrecompiled(t.evm, to) { + return + } + + frame := OpsCallFrame{ + Type: op.String(), + From: strings.ToLower(scope.Contract.Address().String()), + To: strings.ToLower(to.String()), + GasIn: uintToHex(gas), + GasCost: uintToHex(cost), + parent: t.currentFrame, + } + + t.currentFrame.Calls = append(t.currentFrame.Calls, &frame) + t.currentFrame = &frame + t.currentDepth += 1 + } + return + +} + +func (t *OpsTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + if typ == vm.CREATE2 { + create2Frame := t.currentFrame + codeHash := crypto.Keccak256Hash(input) + contractAddr := crypto.CreateAddress2( + common.HexToAddress(create2Frame.From), + common.Hash(create2Frame.salt.Bytes32()), + codeHash.Bytes()) + create2Frame.ContractCreated = contractAddr.String() + } + return +} + +func (t *OpsTracer) CaptureExit(output []byte, gasUsed uint64, err error) { + if t.evm.Depth() == t.currentDepth { + return + } + t.currentFrame.GasCost = uintToHex(gasUsed) + if err != nil { + t.currentFrame.Error = err.Error() + } + + t.currentFrame = t.currentFrame.parent + t.currentDepth -= 1 +} + +func (t *OpsTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +func (t *OpsTracer) CaptureEnd(output []byte, gasUsed uint64, du time.Duration, err error) { + if t.evm.Depth() == t.currentDepth { + return + } + t.currentFrame.GasCost = uintToHex(gasUsed) + if err != nil { + t.currentFrame.Error = err.Error() + } + + t.currentFrame = t.currentFrame.parent + t.currentDepth -= 1 +} + +func (t *OpsTracer) GetCallStack() *OpsCallFrame { + if len(t.callstack.Error) != 0 { + t.callstack.Calls = []*OpsCallFrame{} + } + if t.reason != nil { + t.callstack.Error = t.reason.Error() + t.callstack.Calls = []*OpsCallFrame{} + } + return &t.callstack +} + +func toPbCallTrace(in *OpsCallFrame) *protobuf.StackFrame { + if in == nil { + return &protobuf.StackFrame{} + } + + var calls []*protobuf.StackFrame + if in.Calls != nil { + calls = make([]*protobuf.StackFrame, len(in.Calls)) + for i, c := range in.Calls { + calls[i] = toPbCallTrace(c) + } + } + return &protobuf.StackFrame{ + Type: in.Type, + Label: in.Label, + From: in.From, + To: in.To, + ContractCreated: in.ContractCreated, + Value: in.Value, + Input: in.Input, + Error: in.Error, + Calls: calls, + } + +} + +func dfs(node *protobuf.StackFrame, prefix string, sks *[]types.PlainStackFrame) { + if node == nil { + return + } + *sks = append(*sks, types.PlainStackFrame{ + FrameId: prefix, + Type: node.Type, + Label: node.Label, + From: node.From, + To: node.To, + ContractCreated: node.ContractCreated, + Value: node.Value, + Input: node.Input, + Error: node.Error, + ChildrenCount: int32(len(node.GetCalls())), + }) + for i, call := range node.GetCalls() { + cPrefix := fmt.Sprintf("%s_%d", prefix, i) + dfs(call, cPrefix, sks) + } +} + +func (t *OpsTracer) GetResult() (json.RawMessage, error) { + result := t.GetCallStack() + if t.plain { + pbTrace := toPbCallTrace(result) + ptxs := make([]types.PlainStackFrame, 0) + dfs(pbTrace, "0", &ptxs) + res, err := json.Marshal(ptxs) + if err != nil { + return nil, err + } + return res, t.reason + } + + res, err := json.Marshal(result) + if err != nil { + return nil, err + } + return res, t.reason +} + +func (t *OpsTracer) Stop(err error) { + t.reason = err + atomic.StoreUint32(&t.interrupt, 1) +} diff --git a/eth/tracers/protobuf/Tracer.pb.go b/eth/tracers/protobuf/Tracer.pb.go new file mode 100644 index 000000000..32b22fa2b --- /dev/null +++ b/eth/tracers/protobuf/Tracer.pb.go @@ -0,0 +1,1125 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.4 +// source: Block.proto + +package protobuf + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StackFrame struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // OP code + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` // empty or "Transfer" or "Internal-Transfer" + From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` + ContractCreated string `protobuf:"bytes,5,opt,name=contractCreated,proto3" json:"contractCreated,omitempty"` + Value string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` + Input string `protobuf:"bytes,7,opt,name=input,proto3" json:"input,omitempty"` + Error string `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"` + Calls []*StackFrame `protobuf:"bytes,9,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (x *StackFrame) Reset() { + *x = StackFrame{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StackFrame) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StackFrame) ProtoMessage() {} + +func (x *StackFrame) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StackFrame.ProtoReflect.Descriptor instead. +func (*StackFrame) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{0} +} + +func (x *StackFrame) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *StackFrame) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *StackFrame) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *StackFrame) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *StackFrame) GetContractCreated() string { + if x != nil { + return x.ContractCreated + } + return "" +} + +func (x *StackFrame) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *StackFrame) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *StackFrame) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *StackFrame) GetCalls() []*StackFrame { + if x != nil { + return x.Calls + } + return nil +} + +type InternalTxn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionHash string `protobuf:"bytes,1,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *InternalTxn) Reset() { + *x = InternalTxn{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalTxn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalTxn) ProtoMessage() {} + +func (x *InternalTxn) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalTxn.ProtoReflect.Descriptor instead. +func (*InternalTxn) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{1} +} + +func (x *InternalTxn) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *InternalTxn) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *InternalTxn) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *InternalTxn) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type EventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Topic0 string `protobuf:"bytes,3,opt,name=topic0,proto3" json:"topic0,omitempty"` + Topic1 string `protobuf:"bytes,4,opt,name=topic1,proto3" json:"topic1,omitempty"` + Topic2 string `protobuf:"bytes,5,opt,name=topic2,proto3" json:"topic2,omitempty"` + Topic3 string `protobuf:"bytes,6,opt,name=topic3,proto3" json:"topic3,omitempty"` + Data string `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + BlockNumber int64 `protobuf:"varint,8,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` + BlockTimestamp int64 `protobuf:"varint,9,opt,name=blockTimestamp,proto3" json:"blockTimestamp,omitempty"` + TransactionHash string `protobuf:"bytes,10,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` + TransactionIndex int32 `protobuf:"varint,11,opt,name=transactionIndex,proto3" json:"transactionIndex,omitempty"` + BlockHash string `protobuf:"bytes,12,opt,name=blockHash,proto3" json:"blockHash,omitempty"` + LogIndex int32 `protobuf:"varint,13,opt,name=logIndex,proto3" json:"logIndex,omitempty"` + Removed bool `protobuf:"varint,14,opt,name=removed,proto3" json:"removed,omitempty"` + SenderInfo string `protobuf:"bytes,15,opt,name=senderInfo,proto3" json:"senderInfo,omitempty"` +} + +func (x *EventLog) Reset() { + *x = EventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventLog) ProtoMessage() {} + +func (x *EventLog) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventLog.ProtoReflect.Descriptor instead. +func (*EventLog) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{2} +} + +func (x *EventLog) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +func (x *EventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *EventLog) GetTopic0() string { + if x != nil { + return x.Topic0 + } + return "" +} + +func (x *EventLog) GetTopic1() string { + if x != nil { + return x.Topic1 + } + return "" +} + +func (x *EventLog) GetTopic2() string { + if x != nil { + return x.Topic2 + } + return "" +} + +func (x *EventLog) GetTopic3() string { + if x != nil { + return x.Topic3 + } + return "" +} + +func (x *EventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *EventLog) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *EventLog) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *EventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *EventLog) GetTransactionIndex() int32 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *EventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *EventLog) GetLogIndex() int32 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *EventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *EventLog) GetSenderInfo() string { + if x != nil { + return x.SenderInfo + } + return "" +} + +type Receipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + TransactionHash string `protobuf:"bytes,2,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` + TransactionIndex int32 `protobuf:"varint,3,opt,name=transactionIndex,proto3" json:"transactionIndex,omitempty"` + BlockHash string `protobuf:"bytes,4,opt,name=blockHash,proto3" json:"blockHash,omitempty"` + BlockNumber int64 `protobuf:"varint,5,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gasUsed,proto3" json:"gasUsed,omitempty"` + ContractAddress string `protobuf:"bytes,7,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"` + TransactionReceiptStatus bool `protobuf:"varint,8,opt,name=transactionReceiptStatus,proto3" json:"transactionReceiptStatus,omitempty"` + EventCount int32 `protobuf:"varint,9,opt,name=eventCount,proto3" json:"eventCount,omitempty"` + BlockTimestamp int64 `protobuf:"varint,10,opt,name=blockTimestamp,proto3" json:"blockTimestamp,omitempty"` + EventLogs []*EventLog `protobuf:"bytes,11,rep,name=eventLogs,proto3" json:"eventLogs,omitempty"` + SenderInfo string `protobuf:"bytes,12,opt,name=senderInfo,proto3" json:"senderInfo,omitempty"` +} + +func (x *Receipt) Reset() { + *x = Receipt{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Receipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt) ProtoMessage() {} + +func (x *Receipt) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt.ProtoReflect.Descriptor instead. +func (*Receipt) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{3} +} + +func (x *Receipt) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +func (x *Receipt) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *Receipt) GetTransactionIndex() int32 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *Receipt) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *Receipt) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Receipt) GetGasUsed() int64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *Receipt) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Receipt) GetTransactionReceiptStatus() bool { + if x != nil { + return x.TransactionReceiptStatus + } + return false +} + +func (x *Receipt) GetEventCount() int32 { + if x != nil { + return x.EventCount + } + return 0 +} + +func (x *Receipt) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *Receipt) GetEventLogs() []*EventLog { + if x != nil { + return x.EventLogs + } + return nil +} + +func (x *Receipt) GetSenderInfo() string { + if x != nil { + return x.SenderInfo + } + return "" +} + +type Transaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionHash string `protobuf:"bytes,1,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` + TransactionIndex int32 `protobuf:"varint,2,opt,name=transactionIndex,proto3" json:"transactionIndex,omitempty"` + BlockNumber int64 `protobuf:"varint,3,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` + FromAddress string `protobuf:"bytes,4,opt,name=fromAddress,proto3" json:"fromAddress,omitempty"` + ToAddress string `protobuf:"bytes,5,opt,name=toAddress,proto3" json:"toAddress,omitempty"` + Nonce int64 `protobuf:"varint,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionValue string `protobuf:"bytes,7,opt,name=transactionValue,proto3" json:"transactionValue,omitempty"` + BlockTimestamp int64 `protobuf:"varint,8,opt,name=blockTimestamp,proto3" json:"blockTimestamp,omitempty"` +} + +func (x *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{4} +} + +func (x *Transaction) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *Transaction) GetTransactionIndex() int32 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *Transaction) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Transaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *Transaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Transaction) GetNonce() int64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *Transaction) GetTransactionValue() string { + if x != nil { + return x.TransactionValue + } + return "" +} + +func (x *Transaction) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber int64 `protobuf:"varint,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` + BlockHash string `protobuf:"bytes,3,opt,name=blockHash,proto3" json:"blockHash,omitempty"` + ParentHash string `protobuf:"bytes,4,opt,name=parentHash,proto3" json:"parentHash,omitempty"` + Miner string `protobuf:"bytes,6,opt,name=miner,proto3" json:"miner,omitempty"` + BlockSize int32 `protobuf:"varint,7,opt,name=blockSize,proto3" json:"blockSize,omitempty"` + GasLimit int64 `protobuf:"varint,8,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` + GasUsed int64 `protobuf:"varint,9,opt,name=gasUsed,proto3" json:"gasUsed,omitempty"` + BlockTimestamp int64 `protobuf:"varint,10,opt,name=blockTimestamp,proto3" json:"blockTimestamp,omitempty"` +} + +func (x *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{5} +} + +func (x *Block) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Block) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *Block) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *Block) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *Block) GetBlockSize() int32 { + if x != nil { + return x.BlockSize + } + return 0 +} + +func (x *Block) GetGasLimit() int64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *Block) GetGasUsed() int64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *Block) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +type TraceTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber int64 `protobuf:"varint,1,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` + TransactionHash string `protobuf:"bytes,2,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` + TransactionIndex int32 `protobuf:"varint,3,opt,name=transactionIndex,proto3" json:"transactionIndex,omitempty"` + FromAddress string `protobuf:"bytes,4,opt,name=fromAddress,proto3" json:"fromAddress,omitempty"` + ToAddress string `protobuf:"bytes,5,opt,name=toAddress,proto3" json:"toAddress,omitempty"` + GasPrice int64 `protobuf:"varint,6,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"` + Input string `protobuf:"bytes,7,opt,name=input,proto3" json:"input,omitempty"` + Nonce int64 `protobuf:"varint,8,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionValue string `protobuf:"bytes,9,opt,name=transactionValue,proto3" json:"transactionValue,omitempty"` + Stack *StackFrame `protobuf:"bytes,10,opt,name=stack,proto3" json:"stack,omitempty"` + BlockTimestamp int64 `protobuf:"varint,11,opt,name=blockTimestamp,proto3" json:"blockTimestamp,omitempty"` +} + +func (x *TraceTransaction) Reset() { + *x = TraceTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_Block_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceTransaction) ProtoMessage() {} + +func (x *TraceTransaction) ProtoReflect() protoreflect.Message { + mi := &file_Block_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TraceTransaction.ProtoReflect.Descriptor instead. +func (*TraceTransaction) Descriptor() ([]byte, []int) { + return file_Block_proto_rawDescGZIP(), []int{6} +} + +func (x *TraceTransaction) GetBlockNumber() int64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *TraceTransaction) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *TraceTransaction) GetTransactionIndex() int32 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *TraceTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *TraceTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TraceTransaction) GetGasPrice() int64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *TraceTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *TraceTransaction) GetNonce() int64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *TraceTransaction) GetTransactionValue() string { + if x != nil { + return x.TransactionValue + } + return "" +} + +func (x *TraceTransaction) GetStack() *StackFrame { + if x != nil { + return x.Stack + } + return nil +} + +func (x *TraceTransaction) GetBlockTimestamp() int64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +var File_Block_proto protoreflect.FileDescriptor + +var file_Block_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, + 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x22, 0xf0, 0x01, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x74, 0x6f, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, + 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x65, 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x22, 0x71, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x78, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc2, 0x03, 0x0a, 0x08, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x30, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x32, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x33, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, + 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, + 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x6f, + 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xcd, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x61, 0x73, 0x55, + 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x18, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x2e, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xaf, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, + 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2a, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0xf9, 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, + 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x90, + 0x03, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x67, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x65, 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x37, 0x0a, 0x19, 0x69, 0x6f, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x70, 0x68, 0x69, + 0x2e, 0x65, 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x0c, + 0x45, 0x72, 0x69, 0x67, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x50, 0x01, 0x5a, 0x0a, + 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_Block_proto_rawDescOnce sync.Once + file_Block_proto_rawDescData = file_Block_proto_rawDesc +) + +func file_Block_proto_rawDescGZIP() []byte { + file_Block_proto_rawDescOnce.Do(func() { + file_Block_proto_rawDescData = protoimpl.X.CompressGZIP(file_Block_proto_rawDescData) + }) + return file_Block_proto_rawDescData +} + +var file_Block_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_Block_proto_goTypes = []interface{}{ + (*StackFrame)(nil), // 0: erigon.stackFrame + (*InternalTxn)(nil), // 1: erigon.InternalTxn + (*EventLog)(nil), // 2: erigon.EventLog + (*Receipt)(nil), // 3: erigon.Receipt + (*Transaction)(nil), // 4: erigon.Transaction + (*Block)(nil), // 5: erigon.Block + (*TraceTransaction)(nil), // 6: erigon.TraceTransaction +} +var file_Block_proto_depIdxs = []int32{ + 0, // 0: erigon.stackFrame.calls:type_name -> erigon.stackFrame + 2, // 1: erigon.Receipt.eventLogs:type_name -> erigon.EventLog + 0, // 2: erigon.TraceTransaction.stack:type_name -> erigon.stackFrame + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_Block_proto_init() } +func file_Block_proto_init() { + if File_Block_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_Block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StackFrame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InternalTxn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Receipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_Block_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Block_proto_goTypes, + DependencyIndexes: file_Block_proto_depIdxs, + MessageInfos: file_Block_proto_msgTypes, + }.Build() + File_Block_proto = out.File + file_Block_proto_rawDesc = nil + file_Block_proto_goTypes = nil + file_Block_proto_depIdxs = nil +} diff --git a/eth/tracers/types/types.go b/eth/tracers/types/types.go new file mode 100644 index 000000000..496df27dc --- /dev/null +++ b/eth/tracers/types/types.go @@ -0,0 +1,14 @@ +package types + +type PlainStackFrame struct { + FrameId string `parquet:"fieldid=0,logical=String" json:"frameId"` + Type string `parquet:"fieldid=1,logical=String" json:"type"` + Label string `parquet:"fieldid=2,logical=String" json:"label"` + From string `parquet:"fieldid=3,logical=String" json:"from"` + To string `parquet:"fieldid=4,logical=String" json:"to"` + ContractCreated string `parquet:"fieldid=5,logical=String" json:"contractCreated"` + Value string `parquet:"fieldid=6,logical=String" json:"value"` + Input string `parquet:"fieldid=7,logical=String" json:"input"` + Error string `parquet:"fieldid=8,logical=String" json:"error"` + ChildrenCount int32 `parquet:"fieldid=9" json:"childrenCount"` +} diff --git a/go.mod b/go.mod index b0e5845fb..8fdb1cf80 100644 --- a/go.mod +++ b/go.mod @@ -82,6 +82,8 @@ require ( golang.org/x/text v0.3.6 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba golang.org/x/tools v0.1.5 + google.golang.org/grpc v1.27.1 // indirect + google.golang.org/protobuf v1.23.0 gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 gopkg.in/urfave/cli.v1 v1.20.0 diff --git a/go.sum b/go.sum index fddd4d836..88b8794d4 100644 --- a/go.sum +++ b/go.sum @@ -668,6 +668,8 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=