diff --git a/CHANGELOG.md b/CHANGELOG.md index 6892655c4a..96b1d704c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (statedb) [#333](https://github.com/crypto-org-chain/ethermint/pull/333) Support native action in statedb, prepare for precompiles. * (rpc) [#369](https://github.com/crypto-org-chain/ethermint/pull/369) Support state overrides in eth_call. * (precompile) [#371](https://github.com/crypto-org-chain/ethermint/pull/371) Add StateDB itself into native context for precompiles to emit evm logs directly. +* (rpc) [#392](https://github.com/crypto-org-chain/ethermint/pull/392) Support block overrides in debug_traceCall. ### State Machine Breaking diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 7bf9bb04d4..e8c1d48c18 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -2658,6 +2658,20 @@ paths: in: query required: false type: string + - name: trace_config.state_overrides + description: >- + temporary state modifications to Geth in order to simulate the + effects of eth_call. + in: query + required: false + type: string + format: byte + - name: trace_config.block_overrides + description: block overrides block context fields encoded as json. + in: query + required: false + type: string + format: byte - name: block_number description: block_number of the traced block. in: query @@ -2691,6 +2705,462 @@ paths: format: int64 tags: - Query + /ethermint/evm/v1/trace_call: + get: + summary: TraceCall implements the `debug_traceCall` rpc api + operationId: TraceCall + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: string + format: byte + title: data is the response serialized in bytes + title: QueryTraceCallResponse defines TraceCallResponse + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: args + description: args uses the same json format as the json rpc api. + in: query + required: false + type: string + format: byte + - name: gas_cap + description: gas_cap defines the default gas cap to be used. + in: query + required: false + type: string + format: uint64 + - name: proposer_address + description: proposer_address of the requested block in hex format. + in: query + required: false + type: string + format: byte + - name: trace_config.tracer + description: tracer is a custom javascript tracer. + in: query + required: false + type: string + - name: trace_config.timeout + description: >- + timeout overrides the default timeout of 5 seconds for + JavaScript-based tracing + + calls. + in: query + required: false + type: string + - name: trace_config.reexec + description: >- + reexec defines the number of blocks the tracer is willing to go + back. + in: query + required: false + type: string + format: uint64 + - name: trace_config.disable_stack + description: disable_stack switches stack capture. + in: query + required: false + type: boolean + - name: trace_config.disable_storage + description: disable_storage switches storage capture. + in: query + required: false + type: boolean + - name: trace_config.debug + description: debug can be used to print output during capture end. + in: query + required: false + type: boolean + - name: trace_config.limit + description: >- + limit defines the maximum length of output, but zero means + unlimited. + in: query + required: false + type: integer + format: int32 + - name: trace_config.overrides.homestead_block + description: homestead_block switch (nil no fork, 0 = already homestead). + in: query + required: false + type: string + - name: trace_config.overrides.dao_fork_block + description: >- + dao_fork_block corresponds to TheDAO hard-fork switch block (nil no + fork). + in: query + required: false + type: string + - name: trace_config.overrides.dao_fork_support + description: >- + dao_fork_support defines whether the nodes supports or opposes the + DAO hard-fork. + in: query + required: false + type: boolean + - name: trace_config.overrides.eip150_block + description: >- + eip150_block: EIP150 implements the Gas price changes + + (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil + no fork). + in: query + required: false + type: string + - name: trace_config.overrides.eip150_hash + description: >- + eip150_hash: EIP150 HF hash (needed for header only clients as only + gas pricing changed). + in: query + required: false + type: string + - name: trace_config.overrides.eip155_block + description: 'eip155_block: EIP155Block HF block.' + in: query + required: false + type: string + - name: trace_config.overrides.eip158_block + description: 'eip158_block: EIP158 HF block.' + in: query + required: false + type: string + - name: trace_config.overrides.byzantium_block + description: >- + byzantium_block: Byzantium switch block (nil no fork, 0 = already on + byzantium). + in: query + required: false + type: string + - name: trace_config.overrides.constantinople_block + description: >- + constantinople_block: Constantinople switch block (nil no fork, 0 = + already activated). + in: query + required: false + type: string + - name: trace_config.overrides.petersburg_block + description: >- + petersburg_block: Petersburg switch block (nil same as + Constantinople). + in: query + required: false + type: string + - name: trace_config.overrides.istanbul_block + description: >- + istanbul_block: Istanbul switch block (nil no fork, 0 = already on + istanbul). + in: query + required: false + type: string + - name: trace_config.overrides.muir_glacier_block + description: >- + muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, + 0 = already activated). + in: query + required: false + type: string + - name: trace_config.overrides.berlin_block + description: >- + berlin_block: Berlin switch block (nil = no fork, 0 = already on + berlin). + in: query + required: false + type: string + - name: trace_config.overrides.london_block + description: >- + london_block: London switch block (nil = no fork, 0 = already on + london). + in: query + required: false + type: string + - name: trace_config.overrides.arrow_glacier_block + description: >- + arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no + fork, 0 = already activated). + in: query + required: false + type: string + - name: trace_config.overrides.gray_glacier_block + description: >- + gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no + fork, 0 = already activated). + in: query + required: false + type: string + - name: trace_config.overrides.merge_netsplit_block + description: >- + merge_netsplit_block: Virtual fork after The Merge to use as a + network splitter. + in: query + required: false + type: string + - name: trace_config.overrides.shanghai_time + description: shanghai switch time (nil = no fork, 0 = already on shanghai). + in: query + required: false + type: string + - name: trace_config.overrides.cancun_time + description: cancun switch time (nil = no fork, 0 = already on cancun). + in: query + required: false + type: string + - name: trace_config.overrides.prague_time + description: prague switch time (nil = no fork, 0 = already on prague). + in: query + required: false + type: string + - name: trace_config.enable_memory + description: enable_memory switches memory capture. + in: query + required: false + type: boolean + - name: trace_config.enable_return_data + description: enable_return_data switches the capture of return data. + in: query + required: false + type: boolean + - name: trace_config.tracer_json_config + description: tracer_json_config configures the tracer using a JSON string. + in: query + required: false + type: string + - name: trace_config.state_overrides + description: >- + temporary state modifications to Geth in order to simulate the + effects of eth_call. + in: query + required: false + type: string + format: byte + - name: trace_config.block_overrides + description: block overrides block context fields encoded as json. + in: query + required: false + type: string + format: byte + - name: block_number + description: block_number of requested transaction. + in: query + required: false + type: string + format: int64 + - name: block_hash + description: block_hash of requested transaction. + in: query + required: false + type: string + - name: block_time + description: block_time of requested transaction. + in: query + required: false + type: string + format: date-time + - name: chain_id + description: >- + chain_id is the the eip155 chain id parsed from the requested block + header. + in: query + required: false + type: string + format: int64 + tags: + - Query /ethermint/evm/v1/trace_tx: get: summary: TraceTx implements the `debug_traceTransaction` rpc api @@ -3175,6 +3645,20 @@ paths: in: query required: false type: string + - name: trace_config.state_overrides + description: >- + temporary state modifications to Geth in order to simulate the + effects of eth_call. + in: query + required: false + type: string + format: byte + - name: trace_config.block_overrides + description: block overrides block context fields encoded as json. + in: query + required: false + type: string + format: byte - name: block_number description: block_number of requested transaction. in: query @@ -4232,6 +4716,14 @@ definitions: format: byte title: data is the response serialized in bytes title: QueryTraceBlockResponse defines TraceBlock response + ethermint.evm.v1.QueryTraceCallResponse: + type: object + properties: + data: + type: string + format: byte + title: data is the response serialized in bytes + title: QueryTraceCallResponse defines TraceCallResponse ethermint.evm.v1.QueryTraceTxResponse: type: object properties: @@ -4395,6 +4887,16 @@ definitions: tracer_json_config: type: string title: tracer_json_config configures the tracer using a JSON string + state_overrides: + type: string + format: byte + title: >- + temporary state modifications to Geth in order to simulate the effects + of eth_call + block_overrides: + type: string + format: byte + title: block overrides block context fields encoded as json description: TraceConfig holds extra parameters to trace functions. google.protobuf.Any: type: object diff --git a/proto/ethermint/evm/v1/trace_config.proto b/proto/ethermint/evm/v1/trace_config.proto index cddfa9d42f..946ed7ce53 100644 --- a/proto/ethermint/evm/v1/trace_config.proto +++ b/proto/ethermint/evm/v1/trace_config.proto @@ -36,4 +36,8 @@ message TraceConfig { bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"]; // tracer_json_config configures the tracer using a JSON string string tracer_json_config = 13 [(gogoproto.jsontag) = "tracerConfig"]; + // temporary state modifications to Geth in order to simulate the effects of eth_call + bytes state_overrides = 14 [(gogoproto.jsontag) = "stateOverrides"]; + // block overrides block context fields encoded as json + bytes block_overrides = 15 [(gogoproto.jsontag) = "blockOverrides"]; } \ No newline at end of file diff --git a/proto/ethermint/evm/v1/trace_config_v0.proto b/proto/ethermint/evm/v1/trace_config_v0.proto index 28c058199d..2f3657cad8 100644 --- a/proto/ethermint/evm/v1/trace_config_v0.proto +++ b/proto/ethermint/evm/v1/trace_config_v0.proto @@ -6,17 +6,6 @@ import "ethermint/evm/v1/chain_config_v0.proto"; option go_package = "github.com/evmos/ethermint/x/evm/types"; - -// OverrideAccount indicates the overriding fields of account during the execution of -// a message call. -message V0OverrideAccount { - uint64 nonce = 1; - string code = 2; - string balance = 3; - map state = 4; - map state_diff = 5 [(gogoproto.jsontag) = "stateDiff"]; -} - // V0TraceConfig holds extra parameters to trace functions. message V0TraceConfig { // DEPRECATED: DisableMemory and DisableReturnData have been renamed to @@ -47,6 +36,4 @@ message V0TraceConfig { bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"]; // tracer_json_config configures the tracer using a JSON string string tracer_json_config = 13 [(gogoproto.jsontag) = "tracerConfig"]; - // temporary state modifications to Geth in order to simulate the effects of eth_call - map state_overrides = 14 [(gogoproto.jsontag) = "stateOverrides"]; } diff --git a/rpc/backend/tracing.go b/rpc/backend/tracing.go index a6feaa03fc..2b80baba1d 100644 --- a/rpc/backend/tracing.go +++ b/rpc/backend/tracing.go @@ -135,6 +135,8 @@ func (b *Backend) convertConfig(config *rpctypes.TraceConfig) *evmtypes.TraceCon } cfg := config.TraceConfig cfg.TracerJsonConfig = string(config.TracerConfig) + cfg.StateOverrides = []byte(config.StateOverrides) + cfg.BlockOverrides = []byte(config.BlockOverrides) return &cfg } diff --git a/rpc/types/types.go b/rpc/types/types.go index 11043b52ae..5fdf4ce408 100644 --- a/rpc/types/types.go +++ b/rpc/types/types.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" ) @@ -109,6 +110,45 @@ func (diff *StateOverride) Apply(db *statedb.StateDB) error { return nil } +// BlockOverrides is a set of header fields to override. +type BlockOverrides struct { + Number *hexutil.Big + Difficulty *hexutil.Big + Time *hexutil.Uint64 + GasLimit *hexutil.Uint64 + Coinbase *common.Address + Random *common.Hash + BaseFee *hexutil.Big +} + +// Apply overrides the given header fields into the given block context. +func (diff *BlockOverrides) Apply(blockCtx *vm.BlockContext) { + if diff == nil { + return + } + if diff.Number != nil { + blockCtx.BlockNumber = diff.Number.ToInt() + } + if diff.Difficulty != nil { + blockCtx.Difficulty = diff.Difficulty.ToInt() + } + if diff.Time != nil { + blockCtx.Time = uint64(*diff.Time) + } + if diff.GasLimit != nil { + blockCtx.GasLimit = uint64(*diff.GasLimit) + } + if diff.Coinbase != nil { + blockCtx.Coinbase = *diff.Coinbase + } + if diff.Random != nil { + blockCtx.Random = diff.Random + } + if diff.BaseFee != nil { + blockCtx.BaseFee = diff.BaseFee.ToInt() + } +} + // OverrideAccount indicates the overriding fields of account during the execution of // a message call. // Note, state and stateDiff can't be specified at the same time. If state is @@ -144,5 +184,7 @@ type OneFeeHistory struct { type TraceConfig struct { evmtypes.TraceConfig - TracerConfig json.RawMessage `json:"tracerConfig"` + TracerConfig json.RawMessage `json:"tracerConfig"` + StateOverrides json.RawMessage `json:"stateOverrides"` + BlockOverrides json.RawMessage `json:"blockOverrides"` } diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index 60dfade346..a0bfd0eaa8 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -22,3 +22,4 @@ swagger-combine ./client/docs/config.json -o ./client/docs/swagger-ui/swagger.ya # clean swagger files rm -rf ./tmp-swagger-gen +rm -rf github.com diff --git a/tests/integration_tests/expected_constants.py b/tests/integration_tests/expected_constants.py index 6777108e79..5bef24aad3 100644 --- a/tests/integration_tests/expected_constants.py +++ b/tests/integration_tests/expected_constants.py @@ -160,6 +160,7 @@ "value": "0x0", } +EXPECTED_BLOCK_OVERRIDES_TRACERS = '{"failed": false, "gas": 53020, "returnValue": "", "structLogs": [{"depth": 1, "gas": 12517, "gasCost": 2, "op": "NUMBER", "pc": 0, "stack": []}, {"depth": 1, "gas": 12515, "gasCost": 0, "op": "STOP", "pc": 1, "stack": ["0x1337"]}]}' # noqa: E501 EXPECTED_DEFAULT_GASCAP = 25000000 EXPECTED_JS_TRACERS = ['{"ADD-ADD": 2, "ADD-AND": 1, "ADD-CALLDATACOPY": 1, "ADD-DUP2": 2, "ADD-DUP3": 1, "ADD-DUP5": 1, "ADD-GT": 1, "ADD-MLOAD": 1, "ADD-MSTORE": 2, "ADD-OR": 1, "ADD-PUSH1": 6, "ADD-PUSH2": 2, "ADD-SLT": 1, "ADD-SWAP1": 2, "ADD-SWAP2": 1, "ADD-SWAP3": 3, "AND-DUP1": 1, "AND-DUP2": 2, "AND-DUP4": 1, "AND-PUSH1": 1, "AND-SWAP2": 1, "AND-SWAP3": 1, "CALLDATACOPY-PUSH1": 1, "CALLDATALOAD-DUP2": 1, "CALLDATALOAD-PUSH1": 1, "CALLDATALOAD-PUSH8": 1, "CALLDATASIZE-LT": 1, "CALLDATASIZE-PUSH1": 1, "CALLER-DUP3": 1, "CALLVALUE-DUP1": 1, "DIV-DUP2": 1, "DUP1-ADD": 1, "DUP1-DUP3": 3, "DUP1-DUP5": 1, "DUP1-ISZERO": 1, "DUP1-MLOAD": 2, "DUP1-PUSH2": 1, "DUP1-PUSH4": 3, "DUP1-SLOAD": 1, "DUP1-SWAP2": 1, "DUP2-ADD": 4, "DUP2-AND": 1, "DUP2-CALLDATALOAD": 2, "DUP2-DUP2": 5, "DUP2-DUP4": 1, "DUP2-DUP5": 1, "DUP2-DUP6": 1, "DUP2-EQ": 1, "DUP2-GT": 2, "DUP2-LT": 2, "DUP2-MLOAD": 1, "DUP2-MSTORE": 2, "DUP2-PUSH1": 1, "DUP2-SHR": 1, "DUP2-SSTORE": 1, "DUP2-SWAP1": 1, "DUP3-ADD": 3, "DUP3-AND": 2, "DUP3-DUP1": 1, "DUP3-DUP2": 1, "DUP3-DUP5": 1, "DUP3-GT": 4, "DUP3-LT": 1, "DUP3-PUSH1": 3, "DUP3-PUSH2": 1, "DUP4-ADD": 4, "DUP4-AND": 1, "DUP4-DUP1": 1, "DUP4-DUP3": 1, "DUP4-DUP8": 1, "DUP4-LT": 1, "DUP5-ADD": 2, "DUP5-DUP8": 1, "DUP5-MSTORE": 1, "DUP5-PUSH1": 1, "DUP5-PUSH2": 1, "DUP5-SUB": 1, "DUP6-ADD": 1, "DUP6-SSTORE": 1, "DUP7-ADD": 1, "DUP7-DUP4": 1, "DUP8-ADD": 2, "DUP8-PUSH1": 1, "EQ-ISZERO": 1, "EQ-PUSH2": 3, "GT-DUP2": 1, "GT-ISZERO": 6, "ISZERO-PUSH2": 12, "JUMP-JUMPDEST": 17, "JUMPDEST-DUP1": 3, "JUMPDEST-DUP2": 7, "JUMPDEST-DUP3": 3, "JUMPDEST-JUMPDEST": 1, "JUMPDEST-POP": 7, "JUMPDEST-PUSH1": 7, "JUMPDEST-PUSH2": 2, "JUMPDEST-STOP": 1, "JUMPDEST-SWAP1": 1, "JUMPDEST-SWAP5": 1, "JUMPI-DUP1": 3, "JUMPI-JUMPDEST": 12, "JUMPI-PUSH1": 5, "KECCAK256-SWAP1": 1, "LOG1-POP": 1, "LT-DUP2": 1, "LT-ISZERO": 2, "LT-OR": 1, "LT-PUSH2": 2, "MLOAD-DUP1": 2, "MLOAD-DUP7": 1, "MLOAD-PUSH1": 2, "MLOAD-PUSH2": 2, "MSTORE-ADD": 1, "MSTORE-CALLVALUE": 1, "MSTORE-DUP3": 1, "MSTORE-DUP8": 1, "MSTORE-JUMPDEST": 1, "MSTORE-POP": 1, "MSTORE-PUSH1": 4, "NOT-AND": 2, "NOT-SWAP1": 1, "OR-DUP6": 1, "OR-ISZERO": 1, "POP-DUP5": 1, "POP-JUMP": 5, "POP-JUMPDEST": 1, "POP-POP": 8, "POP-PUSH1": 2, "POP-PUSH2": 2, "POP-PUSH32": 1, "POP-SWAP1": 2, "POP-SWAP2": 1, "POP-SWAP6": 1, "PUSH1-ADD": 6, "PUSH1-CALLDATALOAD": 1, "PUSH1-CALLDATASIZE": 1, "PUSH1-DUP2": 4, "PUSH1-DUP3": 5, "PUSH1-DUP4": 3, "PUSH1-DUP5": 2, "PUSH1-DUP7": 1, "PUSH1-JUMPDEST": 1, "PUSH1-KECCAK256": 1, "PUSH1-LT": 1, "PUSH1-MLOAD": 3, "PUSH1-MSTORE": 3, "PUSH1-NOT": 3, "PUSH1-PUSH1": 7, "PUSH1-PUSH2": 1, "PUSH1-SHL": 1, "PUSH1-SHR": 1, "PUSH1-SWAP1": 3, "PUSH1-SWAP3": 1, "PUSH2-CALLDATASIZE": 1, "PUSH2-JUMP": 10, "PUSH2-JUMPI": 20, "PUSH2-PUSH2": 1, "PUSH2-SWAP1": 3, "PUSH2-SWAP3": 2, "PUSH32-CALLER": 1, "PUSH4-EQ": 3, "PUSH8-DUP1": 1, "SHL-SUB": 1, "SHR-DUP1": 1, "SHR-SWAP1": 1, "SLOAD-PUSH2": 1, "SLT-ISZERO": 1, "SLT-PUSH2": 1, "SSTORE-PUSH1": 1, "SSTORE-PUSH2": 1, "SUB-DUP4": 1, "SUB-SLT": 1, "SUB-SWAP1": 1, "SWAP1-DIV": 1, "SWAP1-DUP2": 1, "SWAP1-DUP3": 1, "SWAP1-DUP4": 2, "SWAP1-JUMP": 2, "SWAP1-LOG1": 1, "SWAP1-MSTORE": 1, "SWAP1-POP": 1, "SWAP1-PUSH1": 4, "SWAP1-PUSH2": 4, "SWAP1-SWAP3": 2, "SWAP2-POP": 4, "SWAP2-SUB": 1, "SWAP2-SWAP1": 2, "SWAP3-ADD": 1, "SWAP3-DUP2": 1, "SWAP3-DUP3": 1, "SWAP3-MSTORE": 1, "SWAP3-SWAP1": 2, "SWAP3-SWAP2": 3, "SWAP4-POP": 1, "SWAP5-POP": 1, "SWAP5-SWAP4": 1, "SWAP6-SWAP5": 1}', '[{"depth": 1, "len": 2, "op": 96, "result": ["80"]}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 52, "result": ["0"]}, {"depth": 1, "op": 128, "result": ["0", "0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["10"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 16, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["4"]}, {"depth": 1, "op": 54, "result": ["64"]}, {"depth": 1, "op": 16, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["57"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 53, "result": ["a413686200000000000000000000000000000000000000000000000000000000"]}, {"depth": 1, "len": 2, "op": 96, "result": ["e0"]}, {"depth": 1, "op": 28, "result": []}, {"depth": 1, "op": 128, "result": ["a4136862", "a4136862"]}, {"depth": 1, "len": 5, "op": 99, "result": ["c4dae88"]}, {"depth": 1, "op": 20, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["5c"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 128, "result": ["a4136862", "a4136862"]}, {"depth": 1, "len": 5, "op": 99, "result": ["2e52d606"]}, {"depth": 1, "op": 20, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["73"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 128, "result": ["a4136862", "a4136862"]}, {"depth": 1, "len": 5, "op": 99, "result": ["a4136862"]}, {"depth": 1, "op": 20, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["7c"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 124, "result": []}, {"depth": 1, "len": 3, "op": 97, "result": ["8f"]}, {"depth": 1, "len": 3, "op": 97, "result": ["8a"]}, {"depth": 1, "op": 54, "result": ["64"]}, {"depth": 1, "len": 2, "op": 96, "result": ["4"]}, {"depth": 1, "len": 3, "op": 97, "result": ["2cd"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 717, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 130, "result": ["4", "20", "0", "4"]}, {"depth": 1, "op": 132, "result": ["64", "4", "20", "0", "4", "64"]}, {"depth": 1, "op": 3, "result": ["60"]}, {"depth": 1, "op": 18, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["2df"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 735, "result": []}, {"depth": 1, "op": 129, "result": ["4", "0", "4"]}, {"depth": 1, "op": 53, "result": ["20"]}, {"depth": 1, "len": 9, "op": 103, "result": ["ffffffffffffffff"]}, {"depth": 1, "op": 128, "result": ["ffffffffffffffff", "ffffffffffffffff"]}, {"depth": 1, "op": 130, "result": ["20", "ffffffffffffffff", "ffffffffffffffff", "20"]}, {"depth": 1, "op": 17, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["2f7"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 759, "result": []}, {"depth": 1, "op": 129, "result": ["20", "ffffffffffffffff", "20"]}, {"depth": 1, "op": 132, "result": ["4", "20", "ffffffffffffffff", "20", "0", "4"]}, {"depth": 1, "op": 1, "result": ["24"]}, {"depth": 1, "op": 145, "result": ["20", "ffffffffffffffff", "24"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 132, "result": ["64", "ffffffffffffffff", "24", "0", "4", "64"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 131, "result": ["24", "1f", "64", "ffffffffffffffff", "24"]}, {"depth": 1, "op": 1, "result": ["43"]}, {"depth": 1, "op": 18, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["30b"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 779, "result": []}, {"depth": 1, "op": 129, "result": ["24", "ffffffffffffffff", "24"]}, {"depth": 1, "op": 53, "result": ["5"]}, {"depth": 1, "op": 129, "result": ["ffffffffffffffff", "5", "ffffffffffffffff"]}, {"depth": 1, "op": 129, "result": ["5", "ffffffffffffffff", "5"]}, {"depth": 1, "op": 17, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["31d"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 797, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "op": 81, "result": ["80"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 130, "result": ["5", "1f", "80", "5"]}, {"depth": 1, "op": 1, "result": ["24"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 25, "result": ["ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0"]}, {"depth": 1, "op": 144, "result": ["24", "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0"]}, {"depth": 1, "op": 129, "result": ["ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0", "24", "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0"]}, {"depth": 1, "op": 22, "result": ["20"]}, {"depth": 1, "len": 2, "op": 96, "result": ["3f"]}, {"depth": 1, "op": 1, "result": ["5f"]}, {"depth": 1, "op": 22, "result": ["40"]}, {"depth": 1, "op": 129, "result": ["80", "40", "80"]}, {"depth": 1, "op": 1, "result": ["c0"]}, {"depth": 1, "op": 144, "result": ["80", "c0"]}, {"depth": 1, "op": 131, "result": ["ffffffffffffffff", "80", "c0", "5", "ffffffffffffffff"]}, {"depth": 1, "op": 130, "result": ["c0", "ffffffffffffffff", "80", "c0"]}, {"depth": 1, "op": 17, "result": ["0"]}, {"depth": 1, "op": 129, "result": ["80", "0", "80"]}, {"depth": 1, "op": 131, "result": ["c0", "80", "0", "80", "c0"]}, {"depth": 1, "op": 16, "result": ["0"]}, {"depth": 1, "op": 23, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["345"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 837, "result": []}, {"depth": 1, "op": 129, "result": ["c0", "80", "c0"]}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 130, "result": ["5", "80", "c0", "5"]}, {"depth": 1, "op": 129, "result": ["80", "5", "80"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 135, "result": ["64", "80", "c0", "5", "ffffffffffffffff", "24", "0", "4", "64"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 132, "result": ["5", "20", "64", "80", "c0", "5"]}, {"depth": 1, "op": 135, "result": ["24", "5", "20", "64", "80", "c0", "5", "ffffffffffffffff", "24"]}, {"depth": 1, "op": 1, "result": ["29"]}, {"depth": 1, "op": 1, "result": ["49"]}, {"depth": 1, "op": 17, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["35e"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 862, "result": []}, {"depth": 1, "op": 130, "result": ["5", "80", "c0", "5"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 134, "result": ["24", "20", "5", "80", "c0", "5", "ffffffffffffffff", "24"]}, {"depth": 1, "op": 1, "result": ["44"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 131, "result": ["80", "20", "44", "5", "80"]}, {"depth": 1, "op": 1, "result": ["a0"]}, {"depth": 1, "op": 55, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 146, "result": ["5", "80", "c0", "0"]}, {"depth": 1, "op": 129, "result": ["80", "5", "80"]}, {"depth": 1, "op": 1, "result": ["85"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 1, "result": ["a5"]}, {"depth": 1, "op": 146, "result": ["0", "80", "c0", "a5"]}, {"depth": 1, "op": 144, "result": ["80", "0"]}, {"depth": 1, "op": 146, "result": ["a5", "0", "c0", "80"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 149, "result": ["8a", "ffffffffffffffff", "24", "0", "4", "64", "80"]}, {"depth": 1, "op": 148, "result": ["64", "ffffffffffffffff", "24", "0", "4", "8a"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 138, "result": []}, {"depth": 1, "len": 3, "op": 97, "result": ["ae"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 174, "result": []}, {"depth": 1, "op": 128, "result": ["80", "80"]}, {"depth": 1, "op": 81, "result": ["5"]}, {"depth": 1, "len": 3, "op": 97, "result": ["c1"]}, {"depth": 1, "op": 144, "result": ["5", "c1"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1"]}, {"depth": 1, "op": 144, "result": ["5", "1"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 132, "result": ["80", "20", "5", "1", "c1", "80"]}, {"depth": 1, "op": 1, "result": ["a0"]}, {"depth": 1, "op": 144, "result": ["5", "a0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["21e"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 542, "result": []}, {"depth": 1, "op": 130, "result": ["1", "5", "a0", "1"]}, {"depth": 1, "op": 128, "result": ["1", "1"]}, {"depth": 1, "op": 84, "result": ["48656c6c6f00000000000000000000000000000000000000000000000000000a"]}, {"depth": 1, "len": 3, "op": 97, "result": ["22a"]}, {"depth": 1, "op": 144, "result": ["48656c6c6f00000000000000000000000000000000000000000000000000000a", "22a"]}, {"depth": 1, "len": 3, "op": 97, "result": ["411"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 1041, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["1"]}, {"depth": 1, "op": 129, "result": ["48656c6c6f00000000000000000000000000000000000000000000000000000a", "1", "48656c6c6f00000000000000000000000000000000000000000000000000000a"]}, {"depth": 1, "op": 129, "result": ["1", "48656c6c6f00000000000000000000000000000000000000000000000000000a", "1"]}, {"depth": 1, "op": 28, "result": []}, {"depth": 1, "op": 144, "result": ["1", "2432b63637800000000000000000000000000000000000000000000000000005"]}, {"depth": 1, "op": 130, "result": ["48656c6c6f00000000000000000000000000000000000000000000000000000a", "1", "2432b63637800000000000000000000000000000000000000000000000000005", "48656c6c6f00000000000000000000000000000000000000000000000000000a"]}, {"depth": 1, "op": 22, "result": ["0"]}, {"depth": 1, "op": 128, "result": ["0", "0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["425"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["7f"]}, {"depth": 1, "op": 130, "result": ["2432b63637800000000000000000000000000000000000000000000000000005", "7f", "0", "2432b63637800000000000000000000000000000000000000000000000000005"]}, {"depth": 1, "op": 22, "result": ["5"]}, {"depth": 1, "op": 145, "result": ["2432b63637800000000000000000000000000000000000000000000000000005", "0", "5"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 91, "pc": 1061, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 130, "result": ["5", "20", "0", "5"]}, {"depth": 1, "op": 16, "result": ["1"]}, {"depth": 1, "op": 129, "result": ["0", "1", "0"]}, {"depth": 1, "op": 20, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["446"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 1094, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 145, "result": ["22a", "48656c6c6f00000000000000000000000000000000000000000000000000000a", "5"]}, {"depth": 1, "op": 144, "result": ["48656c6c6f00000000000000000000000000000000000000000000000000000a", "22a"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 554, "result": []}, {"depth": 1, "op": 144, "result": ["1", "5"]}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 32, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"]}, {"depth": 1, "op": 144, "result": ["5", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 1, "result": ["24"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 144, "result": ["24", "20"]}, {"depth": 1, "op": 4, "result": ["1"]}, {"depth": 1, "op": 129, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "1", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"]}, {"depth": 1, "op": 1, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 146, "result": ["a0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 130, "result": ["5", "a0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5"]}, {"depth": 1, "len": 3, "op": 97, "result": ["24c"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 588, "result": []}, {"depth": 1, "op": 130, "result": ["5", "a0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 16, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["265"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 128, "result": ["a0", "a0"]}, {"depth": 1, "op": 81, "result": ["776f726c64000000000000000000000000000000000000000000000000000000"]}, {"depth": 1, "len": 2, "op": 96, "result": ["ff"]}, {"depth": 1, "op": 25, "result": ["ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00"]}, {"depth": 1, "op": 22, "result": ["776f726c64000000000000000000000000000000000000000000000000000000"]}, {"depth": 1, "op": 131, "result": ["5", "776f726c64000000000000000000000000000000000000000000000000000000", "a0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5"]}, {"depth": 1, "op": 128, "result": ["5", "5"]}, {"depth": 1, "op": 1, "result": ["a"]}, {"depth": 1, "op": 23, "result": ["776f726c6400000000000000000000000000000000000000000000000000000a"]}, {"depth": 1, "op": 133, "result": ["1", "776f726c6400000000000000000000000000000000000000000000000000000a", "a0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "1"]}, {"depth": 1, "op": 85, "result": []}, {"depth": 1, "len": 3, "op": 97, "result": ["292"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 658, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "len": 3, "op": 97, "result": ["29e"]}, {"depth": 1, "op": 146, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "5", "29e"]}, {"depth": 1, "op": 145, "result": ["5", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "len": 3, "op": 97, "result": ["2a2"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 674, "result": []}, {"depth": 1, "op": 91, "pc": 675, "result": []}, {"depth": 1, "op": 128, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"]}, {"depth": 1, "op": 130, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 17, "result": ["1"]}, {"depth": 1, "op": 21, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["29e"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 129, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "0", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"]}, {"depth": 1, "op": 85, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["1"]}, {"depth": 1, "op": 1, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "len": 3, "op": 97, "result": ["2a3"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 675, "result": []}, {"depth": 1, "op": 128, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 130, "result": ["b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 17, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["29e"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 670, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 144, "result": ["29e", "b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 670, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 144, "result": ["c1", "1"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 193, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "len": 33, "op": 127, "result": ["61ae4cbae83f72235cd9fa781d18fcb08ff5fa4a44fcc1630fde673bb0041151"]}, {"depth": 1, "op": 51, "result": ["b6a2f15a37aac3b6fdd39afa356b64f51ca8314a"]}, {"depth": 1, "op": 130, "result": ["80", "b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "61ae4cbae83f72235cd9fa781d18fcb08ff5fa4a44fcc1630fde673bb0041151", "80"]}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "op": 81, "result": ["c0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["f3"]}, {"depth": 1, "op": 146, "result": ["b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "c0", "80", "f3"]}, {"depth": 1, "op": 145, "result": ["80", "c0", "b6a2f15a37aac3b6fdd39afa356b64f51ca8314a"]}, {"depth": 1, "op": 144, "result": ["c0", "80"]}, {"depth": 1, "len": 3, "op": 97, "result": ["3e5"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 997, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["1"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1"]}, {"depth": 1, "len": 2, "op": 96, "result": ["a0"]}, {"depth": 1, "op": 27, "result": []}, {"depth": 1, "op": 3, "result": ["ffffffffffffffffffffffffffffffffffffffff"]}, {"depth": 1, "op": 131, "result": ["b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "ffffffffffffffffffffffffffffffffffffffff", "c0", "80", "b6a2f15a37aac3b6fdd39afa356b64f51ca8314a"]}, {"depth": 1, "op": 22, "result": ["b6a2f15a37aac3b6fdd39afa356b64f51ca8314a"]}, {"depth": 1, "op": 129, "result": ["c0", "b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "c0"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 130, "result": ["c0", "20", "40", "c0"]}, {"depth": 1, "op": 1, "result": ["e0"]}, {"depth": 1, "op": 129, "result": ["40", "e0", "40"]}, {"depth": 1, "op": 144, "result": ["e0", "40"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 144, "result": ["40", "0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["409"]}, {"depth": 1, "op": 144, "result": ["40", "409"]}, {"depth": 1, "op": 131, "result": ["c0", "40", "409", "0", "c0"]}, {"depth": 1, "op": 1, "result": ["100"]}, {"depth": 1, "op": 132, "result": ["80", "100", "409", "0", "c0", "80"]}, {"depth": 1, "len": 3, "op": 97, "result": ["37e"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 894, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 129, "result": ["80", "0", "80"]}, {"depth": 1, "op": 81, "result": ["5"]}, {"depth": 1, "op": 128, "result": ["5", "5"]}, {"depth": 1, "op": 132, "result": ["100", "5", "5", "0", "80", "100"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "op": 91, "pc": 904, "result": []}, {"depth": 1, "op": 129, "result": ["5", "0", "5"]}, {"depth": 1, "op": 129, "result": ["0", "5", "0"]}, {"depth": 1, "op": 16, "result": ["1"]}, {"depth": 1, "op": 21, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["3a4"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 129, "result": ["0", "20", "0"]}, {"depth": 1, "op": 133, "result": ["80", "0", "20", "0", "5", "0", "80"]}, {"depth": 1, "op": 1, "result": ["80"]}, {"depth": 1, "op": 129, "result": ["20", "80", "20"]}, {"depth": 1, "op": 1, "result": ["a0"]}, {"depth": 1, "op": 81, "result": ["776f726c64000000000000000000000000000000000000000000000000000000"]}, {"depth": 1, "op": 134, "result": ["100", "776f726c64000000000000000000000000000000000000000000000000000000", "20", "0", "5", "0", "80", "100"]}, {"depth": 1, "op": 131, "result": ["0", "100", "776f726c64000000000000000000000000000000000000000000000000000000", "20", "0"]}, {"depth": 1, "op": 1, "result": ["100"]}, {"depth": 1, "op": 130, "result": ["20", "100", "776f726c64000000000000000000000000000000000000000000000000000000", "20"]}, {"depth": 1, "op": 1, "result": ["120"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 1, "result": ["20"]}, {"depth": 1, "len": 3, "op": 97, "result": ["388"]}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 904, "result": []}, {"depth": 1, "op": 129, "result": ["5", "20", "5"]}, {"depth": 1, "op": 129, "result": ["20", "5", "20"]}, {"depth": 1, "op": 16, "result": ["0"]}, {"depth": 1, "op": 21, "result": ["1"]}, {"depth": 1, "len": 3, "op": 97, "result": ["3a4"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "op": 91, "pc": 932, "result": []}, {"depth": 1, "op": 129, "result": ["5", "20", "5"]}, {"depth": 1, "op": 129, "result": ["20", "5", "20"]}, {"depth": 1, "op": 17, "result": ["1"]}, {"depth": 1, "op": 21, "result": ["0"]}, {"depth": 1, "len": 3, "op": 97, "result": ["3b6"]}, {"depth": 1, "op": 87, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["0"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 131, "result": ["5", "20", "0", "20", "5"]}, {"depth": 1, "op": 135, "result": ["100", "5", "20", "0", "20", "5", "0", "80", "100"]}, {"depth": 1, "op": 1, "result": ["105"]}, {"depth": 1, "op": 1, "result": ["125"]}, {"depth": 1, "op": 82, "result": []}, {"depth": 1, "op": 91, "pc": 950, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 1, "result": ["24"]}, {"depth": 1, "len": 2, "op": 96, "result": ["1f"]}, {"depth": 1, "op": 25, "result": ["ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0"]}, {"depth": 1, "op": 22, "result": ["20"]}, {"depth": 1, "op": 146, "result": ["100", "0", "80", "20"]}, {"depth": 1, "op": 144, "result": ["0", "100"]}, {"depth": 1, "op": 146, "result": ["20", "100", "80", "0"]}, {"depth": 1, "op": 1, "result": ["120"]}, {"depth": 1, "len": 2, "op": 96, "result": ["20"]}, {"depth": 1, "op": 1, "result": ["140"]}, {"depth": 1, "op": 146, "result": ["409", "80", "0", "140"]}, {"depth": 1, "op": 145, "result": ["0", "80", "409"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 1033, "result": []}, {"depth": 1, "op": 148, "result": ["f3", "0", "c0", "80", "b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "140"]}, {"depth": 1, "op": 147, "result": ["b6a2f15a37aac3b6fdd39afa356b64f51ca8314a", "0", "c0", "80", "f3"]}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 243, "result": []}, {"depth": 1, "len": 2, "op": 96, "result": ["40"]}, {"depth": 1, "op": 81, "result": ["c0"]}, {"depth": 1, "op": 128, "result": ["c0", "c0"]}, {"depth": 1, "op": 145, "result": ["140", "c0", "c0"]}, {"depth": 1, "op": 3, "result": ["80"]}, {"depth": 1, "op": 144, "result": ["c0", "80"]}, {"depth": 1, "op": 161, "result": []}, {"depth": 1, "op": 80, "result": []}, {"depth": 1, "op": 86, "result": []}, {"depth": 1, "op": 91, "pc": 143, "result": []}, {"depth": 1, "op": 0, "result": []}]', '415', '{"--PUSH1": 1, "-PUSH1-MSTORE": 1, "ADD-ADD-GT": 1, "ADD-ADD-MSTORE": 1, "ADD-AND-DUP2": 1, "ADD-CALLDATACOPY-PUSH1": 1, "ADD-DUP2-ADD": 1, "ADD-DUP2-SWAP1": 1, "ADD-DUP3-ADD": 1, "ADD-DUP5-PUSH2": 1, "ADD-GT-ISZERO": 1, "ADD-MLOAD-DUP7": 1, "ADD-MSTORE-ADD": 1, "ADD-MSTORE-JUMPDEST": 1, "ADD-OR-DUP6": 1, "ADD-PUSH1-ADD": 2, "ADD-PUSH1-DUP4": 1, "ADD-PUSH1-NOT": 2, "ADD-PUSH1-SWAP1": 1, "ADD-PUSH2-JUMP": 2, "ADD-SLT-PUSH2": 1, "ADD-SWAP1-DUP4": 1, "ADD-SWAP1-PUSH2": 1, "ADD-SWAP2-POP": 1, "ADD-SWAP3-DUP3": 1, "ADD-SWAP3-SWAP1": 1, "ADD-SWAP3-SWAP2": 1, "AND-DUP1-PUSH2": 1, "AND-DUP2-ADD": 1, "AND-DUP2-MSTORE": 1, "AND-DUP4-DUP1": 1, "AND-PUSH1-ADD": 1, "AND-SWAP2-POP": 1, "AND-SWAP3-SWAP1": 1, "CALLDATACOPY-PUSH1-SWAP3": 1, "CALLDATALOAD-DUP2-DUP2": 1, "CALLDATALOAD-PUSH1-SHR": 1, "CALLDATALOAD-PUSH8-DUP1": 1, "CALLDATASIZE-LT-PUSH2": 1, "CALLDATASIZE-PUSH1-PUSH2": 1, "CALLER-DUP3-PUSH1": 1, "CALLVALUE-DUP1-ISZERO": 1, "DIV-DUP2-ADD": 1, "DUP1-ADD-OR": 1, "DUP1-DUP3-GT": 3, "DUP1-DUP5-MSTORE": 1, "DUP1-ISZERO-PUSH2": 1, "DUP1-MLOAD-PUSH1": 1, "DUP1-MLOAD-PUSH2": 1, "DUP1-PUSH2-JUMPI": 1, "DUP1-PUSH4-EQ": 3, "DUP1-SLOAD-PUSH2": 1, "DUP1-SWAP2-SUB": 1, "DUP2-ADD-MLOAD": 1, "DUP2-ADD-PUSH1": 1, "DUP2-ADD-SWAP1": 1, "DUP2-ADD-SWAP3": 1, "DUP2-AND-PUSH1": 1, "DUP2-CALLDATALOAD-DUP2": 1, "DUP2-CALLDATALOAD-PUSH8": 1, "DUP2-DUP2-GT": 2, "DUP2-DUP2-LT": 2, "DUP2-DUP2-SHR": 1, "DUP2-DUP4-LT": 1, "DUP2-DUP5-ADD": 1, "DUP2-DUP6-ADD": 1, "DUP2-EQ-ISZERO": 1, "DUP2-GT-ISZERO": 2, "DUP2-LT-ISZERO": 2, "DUP2-MLOAD-DUP1": 1, "DUP2-MSTORE-DUP8": 1, "DUP2-MSTORE-PUSH1": 1, "DUP2-PUSH1-MSTORE": 1, "DUP2-SHR-SWAP1": 1, "DUP2-SSTORE-PUSH1": 1, "DUP2-SWAP1-MSTORE": 1, "DUP3-ADD-DUP2": 1, "DUP3-ADD-MSTORE": 1, "DUP3-ADD-PUSH1": 1, "DUP3-AND-DUP1": 1, "DUP3-AND-SWAP2": 1, "DUP3-DUP1-SLOAD": 1, "DUP3-DUP2-MSTORE": 1, "DUP3-DUP5-SUB": 1, "DUP3-GT-DUP2": 1, "DUP3-GT-ISZERO": 3, "DUP3-LT-DUP2": 1, "DUP3-PUSH1-DUP7": 1, "DUP3-PUSH1-LT": 1, "DUP3-PUSH1-MLOAD": 1, "DUP3-PUSH2-JUMPI": 1, "DUP4-ADD-CALLDATACOPY": 1, "DUP4-ADD-DUP3": 1, "DUP4-ADD-DUP5": 1, "DUP4-ADD-SLT": 1, "DUP4-AND-DUP2": 1, "DUP4-DUP1-ADD": 1, "DUP4-DUP3-GT": 1, "DUP4-DUP8-ADD": 1, "DUP4-LT-OR": 1, "DUP5-ADD-SWAP1": 1, "DUP5-ADD-SWAP2": 1, "DUP5-DUP8-ADD": 1, "DUP5-MSTORE-PUSH1": 1, "DUP5-PUSH1-DUP4": 1, "DUP5-PUSH2-JUMP": 1, "DUP5-SUB-SLT": 1, "DUP6-ADD-DUP2": 1, "DUP6-SSTORE-PUSH2": 1, "DUP7-ADD-PUSH1": 1, "DUP7-DUP4-ADD": 1, "DUP8-ADD-ADD": 2, "DUP8-PUSH1-DUP5": 1, "EQ-ISZERO-PUSH2": 1, "EQ-PUSH2-JUMPI": 3, "GT-DUP2-DUP4": 1, "GT-ISZERO-PUSH2": 6, "ISZERO-PUSH2-JUMPI": 12, "JUMP-JUMPDEST-DUP1": 2, "JUMP-JUMPDEST-DUP2": 1, "JUMP-JUMPDEST-DUP3": 1, "JUMP-JUMPDEST-JUMPDEST": 1, "JUMP-JUMPDEST-POP": 3, "JUMP-JUMPDEST-PUSH1": 5, "JUMP-JUMPDEST-PUSH2": 1, "JUMP-JUMPDEST-STOP": 1, "JUMP-JUMPDEST-SWAP1": 1, "JUMP-JUMPDEST-SWAP5": 1, "JUMPDEST-DUP1-DUP3": 2, "JUMPDEST-DUP1-MLOAD": 1, "JUMPDEST-DUP2-CALLDATALOAD": 2, "JUMPDEST-DUP2-DUP2": 3, "JUMPDEST-DUP2-DUP5": 1, "JUMPDEST-DUP2-PUSH1": 1, "JUMPDEST-DUP3-DUP1": 1, "JUMPDEST-DUP3-PUSH1": 2, "JUMPDEST-JUMPDEST-DUP1": 1, "JUMPDEST-POP-PUSH1": 2, "JUMPDEST-POP-PUSH2": 1, "JUMPDEST-POP-PUSH32": 1, "JUMPDEST-POP-SWAP1": 2, "JUMPDEST-POP-SWAP2": 1, "JUMPDEST-PUSH1-DUP2": 2, "JUMPDEST-PUSH1-DUP3": 1, "JUMPDEST-PUSH1-MLOAD": 2, "JUMPDEST-PUSH1-PUSH1": 2, "JUMPDEST-PUSH2-JUMP": 1, "JUMPDEST-PUSH2-PUSH2": 1, "JUMPDEST-SWAP1-PUSH1": 1, "JUMPDEST-SWAP5-SWAP4": 1, "JUMPI-DUP1-MLOAD": 1, "JUMPI-DUP1-PUSH4": 2, "JUMPI-JUMPDEST-DUP2": 5, "JUMPI-JUMPDEST-DUP3": 2, "JUMPI-JUMPDEST-POP": 3, "JUMPI-JUMPDEST-PUSH1": 1, "JUMPI-JUMPDEST-PUSH2": 1, "JUMPI-PUSH1-CALLDATALOAD": 1, "JUMPI-PUSH1-DUP2": 2, "JUMPI-PUSH1-DUP3": 1, "JUMPI-PUSH1-PUSH1": 1, "KECCAK256-SWAP1-PUSH1": 1, "LOG1-POP-JUMP": 1, "LT-DUP2-EQ": 1, "LT-ISZERO-PUSH2": 2, "LT-OR-ISZERO": 1, "LT-PUSH2-JUMPI": 2, "MLOAD-DUP1-DUP5": 1, "MLOAD-DUP1-SWAP2": 1, "MLOAD-DUP7-DUP4": 1, "MLOAD-PUSH1-DUP3": 1, "MLOAD-PUSH1-NOT": 1, "MLOAD-PUSH2-SWAP1": 1, "MLOAD-PUSH2-SWAP3": 1, "MSTORE-ADD-PUSH2": 1, "MSTORE-CALLVALUE-DUP1": 1, "MSTORE-DUP3-DUP2": 1, "MSTORE-DUP8-PUSH1": 1, "MSTORE-JUMPDEST-POP": 1, "MSTORE-POP-SWAP6": 1, "MSTORE-PUSH1-JUMPDEST": 1, "MSTORE-PUSH1-PUSH1": 2, "MSTORE-PUSH1-SWAP1": 1, "NOT-AND-DUP4": 1, "NOT-AND-SWAP3": 1, "NOT-SWAP1-DUP2": 1, "OR-DUP6-SSTORE": 1, "OR-ISZERO-PUSH2": 1, "POP-DUP5-PUSH1": 1, "POP-JUMP-JUMPDEST": 5, "POP-JUMPDEST-PUSH1": 1, "POP-POP-JUMP": 3, "POP-POP-POP": 5, "POP-PUSH1-ADD": 1, "POP-PUSH1-CALLDATASIZE": 1, "POP-PUSH2-JUMP": 1, "POP-PUSH2-SWAP3": 1, "POP-PUSH32-CALLER": 1, "POP-SWAP1-JUMP": 2, "POP-SWAP2-SWAP1": 1, "POP-SWAP6-SWAP5": 1, "PUSH1-ADD-AND": 1, "PUSH1-ADD-PUSH1": 2, "PUSH1-ADD-PUSH2": 1, "PUSH1-ADD-SWAP3": 2, "PUSH1-CALLDATALOAD-PUSH1": 1, "PUSH1-CALLDATASIZE-LT": 1, "PUSH1-DUP2-DUP2": 1, "PUSH1-DUP2-DUP6": 1, "PUSH1-DUP2-MLOAD": 1, "PUSH1-DUP2-SSTORE": 1, "PUSH1-DUP3-ADD": 2, "PUSH1-DUP3-AND": 1, "PUSH1-DUP3-DUP5": 1, "PUSH1-DUP3-LT": 1, "PUSH1-DUP4-ADD": 2, "PUSH1-DUP4-DUP8": 1, "PUSH1-DUP5-ADD": 1, "PUSH1-DUP5-DUP8": 1, "PUSH1-DUP7-ADD": 1, "PUSH1-JUMPDEST-DUP2": 1, "PUSH1-KECCAK256-SWAP1": 1, "PUSH1-LT-PUSH2": 1, "PUSH1-MLOAD-DUP1": 1, "PUSH1-MLOAD-PUSH1": 1, "PUSH1-MLOAD-PUSH2": 1, "PUSH1-MSTORE-CALLVALUE": 1, "PUSH1-MSTORE-DUP3": 1, "PUSH1-MSTORE-PUSH1": 1, "PUSH1-NOT-AND": 2, "PUSH1-NOT-SWAP1": 1, "PUSH1-PUSH1-DUP3": 2, "PUSH1-PUSH1-DUP4": 1, "PUSH1-PUSH1-KECCAK256": 1, "PUSH1-PUSH1-PUSH1": 1, "PUSH1-PUSH1-SHL": 1, "PUSH1-PUSH2-JUMP": 1, "PUSH1-SHL-SUB": 1, "PUSH1-SHR-DUP1": 1, "PUSH1-SWAP1-DIV": 1, "PUSH1-SWAP1-PUSH1": 1, "PUSH1-SWAP1-PUSH2": 1, "PUSH1-SWAP3-DUP2": 1, "PUSH2-CALLDATASIZE-PUSH1": 1, "PUSH2-JUMP-JUMPDEST": 10, "PUSH2-JUMPI-DUP1": 3, "PUSH2-JUMPI-JUMPDEST": 12, "PUSH2-JUMPI-PUSH1": 5, "PUSH2-PUSH2-CALLDATASIZE": 1, "PUSH2-SWAP1-DUP4": 1, "PUSH2-SWAP1-PUSH1": 1, "PUSH2-SWAP1-PUSH2": 1, "PUSH2-SWAP3-SWAP2": 2, "PUSH32-CALLER-DUP3": 1, "PUSH4-EQ-PUSH2": 3, "PUSH8-DUP1-DUP3": 1, "SHL-SUB-DUP4": 1, "SHR-DUP1-PUSH4": 1, "SHR-SWAP1-DUP3": 1, "SLOAD-PUSH2-SWAP1": 1, "SLT-ISZERO-PUSH2": 1, "SLT-PUSH2-JUMPI": 1, "SSTORE-PUSH1-ADD": 1, "SSTORE-PUSH2-JUMP": 1, "SUB-DUP4-AND": 1, "SUB-SLT-ISZERO": 1, "SUB-SWAP1-LOG1": 1, "SWAP1-DIV-DUP2": 1, "SWAP1-DUP2-AND": 1, "SWAP1-DUP3-AND": 1, "SWAP1-DUP4-ADD": 1, "SWAP1-DUP4-DUP3": 1, "SWAP1-JUMP-JUMPDEST": 2, "SWAP1-LOG1-POP": 1, "SWAP1-MSTORE-PUSH1": 1, "SWAP1-POP-JUMP": 1, "SWAP1-PUSH1-ADD": 1, "SWAP1-PUSH1-DUP5": 1, "SWAP1-PUSH1-MSTORE": 1, "SWAP1-PUSH1-SWAP1": 1, "SWAP1-PUSH2-JUMP": 3, "SWAP1-PUSH2-SWAP1": 1, "SWAP1-SWAP3-ADD": 1, "SWAP1-SWAP3-MSTORE": 1, "SWAP2-POP-DUP5": 1, "SWAP2-POP-JUMPDEST": 1, "SWAP2-POP-POP": 1, "SWAP2-POP-PUSH2": 1, "SWAP2-SUB-SWAP1": 1, "SWAP2-SWAP1-POP": 1, "SWAP2-SWAP1-PUSH2": 1, "SWAP3-ADD-PUSH1": 1, "SWAP3-DUP2-ADD": 1, "SWAP3-DUP3-PUSH2": 1, "SWAP3-MSTORE-POP": 1, "SWAP3-SWAP1-SWAP3": 2, "SWAP3-SWAP2-POP": 2, "SWAP3-SWAP2-SWAP1": 1, "SWAP4-POP-POP": 1, "SWAP5-POP-POP": 1, "SWAP5-SWAP4-POP": 1, "SWAP6-SWAP5-POP": 1}', '{"ADD": 28, "AND": 7, "CALLDATACOPY": 1, "CALLDATALOAD": 3, "CALLDATASIZE": 2, "CALLER": 1, "CALLVALUE": 1, "DIV": 1, "DUP1": 14, "DUP2": 27, "DUP3": 17, "DUP4": 9, "DUP5": 7, "DUP6": 2, "DUP7": 2, "DUP8": 3, "EQ": 4, "GT": 7, "ISZERO": 12, "JUMP": 17, "JUMPDEST": 33, "JUMPI": 20, "KECCAK256": 1, "LOG1": 1, "LT": 6, "MLOAD": 7, "MSTORE": 10, "NOT": 3, "OR": 2, "POP": 24, "PUSH1": 49, "PUSH2": 37, "PUSH32": 1, "PUSH4": 3, "PUSH8": 1, "SHL": 1, "SHR": 2, "SLOAD": 1, "SLT": 2, "SSTORE": 2, "STOP": 1, "SUB": 3, "SWAP1": 20, "SWAP2": 7, "SWAP3": 9, "SWAP4": 1, "SWAP5": 2, "SWAP6": 1}', '["0", "32", "192", "100", "18446744073709551615", "36", "0", "4", "16372862481753577294267620541204082621793577260386896888229232294795359027205", "0", "32745724963507154588535241082408165243587154520773793776458464589590718054410", "160", "5", "80084422859880547211683076133703299733277748156566366325829078699459944778999", "80084422859880547211683076133703299733277748156566366325829078699459944778999", "1", "32", "0", "128", "1042670065772417531265339626254010608318119686474", "0", "192", "128", "128"]', '["0:PUSH1", "2:PUSH1", "4:MSTORE", "5:CALLVALUE", "6:DUP1", "7:ISZERO", "8:PUSH2", "11:JUMPI", "16:JUMPDEST", "17:POP", "18:PUSH1", "20:CALLDATASIZE", "21:LT", "22:PUSH2", "25:JUMPI", "26:PUSH1", "28:CALLDATALOAD", "29:PUSH1", "31:SHR", "32:DUP1", "33:PUSH4", "38:EQ", "39:PUSH2", "42:JUMPI", "43:DUP1", "44:PUSH4", "49:EQ", "50:PUSH2", "53:JUMPI", "54:DUP1", "55:PUSH4", "60:EQ", "61:PUSH2", "64:JUMPI", "124:JUMPDEST", "125:PUSH2", "128:PUSH2", "131:CALLDATASIZE", "132:PUSH1", "134:PUSH2", "137:JUMP", "717:JUMPDEST", "718:PUSH1", "720:PUSH1", "722:DUP3", "723:DUP5", "724:SUB", "725:SLT", "726:ISZERO", "727:PUSH2", "730:JUMPI", "735:JUMPDEST", "736:DUP2", "737:CALLDATALOAD", "738:PUSH8", "747:DUP1", "748:DUP3", "749:GT", "750:ISZERO", "751:PUSH2", "754:JUMPI", "759:JUMPDEST", "760:DUP2", "761:DUP5", "762:ADD", "763:SWAP2", "764:POP", "765:DUP5", "766:PUSH1", "768:DUP4", "769:ADD", "770:SLT", "771:PUSH2", "774:JUMPI", "779:JUMPDEST", "780:DUP2", "781:CALLDATALOAD", "782:DUP2", "783:DUP2", "784:GT", "785:ISZERO", "786:PUSH2", "789:JUMPI", "797:JUMPDEST", "798:PUSH1", "800:MLOAD", "801:PUSH1", "803:DUP3", "804:ADD", "805:PUSH1", "807:NOT", "808:SWAP1", "809:DUP2", "810:AND", "811:PUSH1", "813:ADD", "814:AND", "815:DUP2", "816:ADD", "817:SWAP1", "818:DUP4", "819:DUP3", "820:GT", "821:DUP2", "822:DUP4", "823:LT", "824:OR", "825:ISZERO", "826:PUSH2", "829:JUMPI", "837:JUMPDEST", "838:DUP2", "839:PUSH1", "841:MSTORE", "842:DUP3", "843:DUP2", "844:MSTORE", "845:DUP8", "846:PUSH1", "848:DUP5", "849:DUP8", "850:ADD", "851:ADD", "852:GT", "853:ISZERO", "854:PUSH2", "857:JUMPI", "862:JUMPDEST", "863:DUP3", "864:PUSH1", "866:DUP7", "867:ADD", "868:PUSH1", "870:DUP4", "871:ADD", "872:CALLDATACOPY", "873:PUSH1", "875:SWAP3", "876:DUP2", "877:ADD", "878:PUSH1", "880:ADD", "881:SWAP3", "882:SWAP1", "883:SWAP3", "884:MSTORE", "885:POP", "886:SWAP6", "887:SWAP5", "888:POP", "889:POP", "890:POP", "891:POP", "892:POP", "893:JUMP", "138:JUMPDEST", "139:PUSH2", "142:JUMP", "174:JUMPDEST", "175:DUP1", "176:MLOAD", "177:PUSH2", "180:SWAP1", "181:PUSH1", "183:SWAP1", "184:PUSH1", "186:DUP5", "187:ADD", "188:SWAP1", "189:PUSH2", "192:JUMP", "542:JUMPDEST", "543:DUP3", "544:DUP1", "545:SLOAD", "546:PUSH2", "549:SWAP1", "550:PUSH2", "553:JUMP", "1041:JUMPDEST", "1042:PUSH1", "1044:DUP2", "1045:DUP2", "1046:SHR", "1047:SWAP1", "1048:DUP3", "1049:AND", "1050:DUP1", "1051:PUSH2", "1054:JUMPI", "1055:PUSH1", "1057:DUP3", "1058:AND", "1059:SWAP2", "1060:POP", "1061:JUMPDEST", "1062:PUSH1", "1064:DUP3", "1065:LT", "1066:DUP2", "1067:EQ", "1068:ISZERO", "1069:PUSH2", "1072:JUMPI", "1094:JUMPDEST", "1095:POP", "1096:SWAP2", "1097:SWAP1", "1098:POP", "1099:JUMP", "554:JUMPDEST", "555:SWAP1", "556:PUSH1", "558:MSTORE", "559:PUSH1", "561:PUSH1", "563:KECCAK256", "564:SWAP1", "565:PUSH1", "567:ADD", "568:PUSH1", "570:SWAP1", "571:DIV", "572:DUP2", "573:ADD", "574:SWAP3", "575:DUP3", "576:PUSH2", "579:JUMPI", "588:JUMPDEST", "589:DUP3", "590:PUSH1", "592:LT", "593:PUSH2", "596:JUMPI", "597:DUP1", "598:MLOAD", "599:PUSH1", "601:NOT", "602:AND", "603:DUP4", "604:DUP1", "605:ADD", "606:OR", "607:DUP6", "608:SSTORE", "609:PUSH2", "612:JUMP", "658:JUMPDEST", "659:POP", "660:PUSH2", "663:SWAP3", "664:SWAP2", "665:POP", "666:PUSH2", "669:JUMP", "674:JUMPDEST", "675:JUMPDEST", "676:DUP1", "677:DUP3", "678:GT", "679:ISZERO", "680:PUSH2", "683:JUMPI", "684:PUSH1", "686:DUP2", "687:SSTORE", "688:PUSH1", "690:ADD", "691:PUSH2", "694:JUMP", "675:JUMPDEST", "676:DUP1", "677:DUP3", "678:GT", "679:ISZERO", "680:PUSH2", "683:JUMPI", "670:JUMPDEST", "671:POP", "672:SWAP1", "673:JUMP", "670:JUMPDEST", "671:POP", "672:SWAP1", "673:JUMP", "193:JUMPDEST", "194:POP", "195:PUSH32", "228:CALLER", "229:DUP3", "230:PUSH1", "232:MLOAD", "233:PUSH2", "236:SWAP3", "237:SWAP2", "238:SWAP1", "239:PUSH2", "242:JUMP", "997:JUMPDEST", "998:PUSH1", "1000:PUSH1", "1002:PUSH1", "1004:SHL", "1005:SUB", "1006:DUP4", "1007:AND", "1008:DUP2", "1009:MSTORE", "1010:PUSH1", "1012:PUSH1", "1014:DUP3", "1015:ADD", "1016:DUP2", "1017:SWAP1", "1018:MSTORE", "1019:PUSH1", "1021:SWAP1", "1022:PUSH2", "1025:SWAP1", "1026:DUP4", "1027:ADD", "1028:DUP5", "1029:PUSH2", "1032:JUMP", "894:JUMPDEST", "895:PUSH1", "897:DUP2", "898:MLOAD", "899:DUP1", "900:DUP5", "901:MSTORE", "902:PUSH1", "904:JUMPDEST", "905:DUP2", "906:DUP2", "907:LT", "908:ISZERO", "909:PUSH2", "912:JUMPI", "913:PUSH1", "915:DUP2", "916:DUP6", "917:ADD", "918:DUP2", "919:ADD", "920:MLOAD", "921:DUP7", "922:DUP4", "923:ADD", "924:DUP3", "925:ADD", "926:MSTORE", "927:ADD", "928:PUSH2", "931:JUMP", "904:JUMPDEST", "905:DUP2", "906:DUP2", "907:LT", "908:ISZERO", "909:PUSH2", "912:JUMPI", "932:JUMPDEST", "933:DUP2", "934:DUP2", "935:GT", "936:ISZERO", "937:PUSH2", "940:JUMPI", "941:PUSH1", "943:PUSH1", "945:DUP4", "946:DUP8", "947:ADD", "948:ADD", "949:MSTORE", "950:JUMPDEST", "951:POP", "952:PUSH1", "954:ADD", "955:PUSH1", "957:NOT", "958:AND", "959:SWAP3", "960:SWAP1", "961:SWAP3", "962:ADD", "963:PUSH1", "965:ADD", "966:SWAP3", "967:SWAP2", "968:POP", "969:POP", "970:JUMP", "1033:JUMPDEST", "1034:SWAP5", "1035:SWAP4", "1036:POP", "1037:POP", "1038:POP", "1039:POP", "1040:JUMP", "243:JUMPDEST", "244:PUSH1", "246:MLOAD", "247:DUP1", "248:SWAP2", "249:SUB", "250:SWAP1", "251:LOG1", "252:POP", "253:JUMP", "143:JUMPDEST", "144:STOP"]'] # noqa: E501 diff --git a/tests/integration_tests/hardhat/contracts/Calculator.sol b/tests/integration_tests/hardhat/contracts/Calculator.sol new file mode 100644 index 0000000000..efa03eda1c --- /dev/null +++ b/tests/integration_tests/hardhat/contracts/Calculator.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract Calculator { + uint public x = 20; + uint public y = 20; + + function getSum() public view returns (uint256) { + return x + y; + } +} diff --git a/tests/integration_tests/hardhat/contracts/Caller.sol b/tests/integration_tests/hardhat/contracts/Caller.sol new file mode 100644 index 0000000000..625568ab24 --- /dev/null +++ b/tests/integration_tests/hardhat/contracts/Caller.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "./Calculator.sol"; + +contract Caller { + Calculator calculator; + + constructor(address _calc) { + calculator = Calculator(_calc); + } + + // call the getSum function in the calculator contract + function callCalculator() public view returns (uint sum) { + sum = calculator.getSum(); + } +} diff --git a/tests/integration_tests/network.py b/tests/integration_tests/network.py index b500ae26f8..3fa25ba56d 100644 --- a/tests/integration_tests/network.py +++ b/tests/integration_tests/network.py @@ -73,9 +73,9 @@ def __init__(self, w3): def setup_ethermint(path, base_port, long_timeout_commit=False): cfg = Path(__file__).parent / ( - "configs/default.jsonnet" + "configs/long_timeout_commit.jsonnet" if long_timeout_commit - else "configs/long_timeout_commit.jsonnet" + else "configs/default.jsonnet" ) yield from setup_custom_ethermint(path, base_port, cfg) diff --git a/tests/integration_tests/test_tracers.py b/tests/integration_tests/test_tracers.py index 2285a4e35a..78f884de9f 100644 --- a/tests/integration_tests/test_tracers.py +++ b/tests/integration_tests/test_tracers.py @@ -5,6 +5,7 @@ from web3 import Web3 from .expected_constants import ( + EXPECTED_BLOCK_OVERRIDES_TRACERS, EXPECTED_CALLTRACERS, EXPECTED_CONTRACT_CREATE_TRACER, EXPECTED_DEFAULT_GASCAP, @@ -18,6 +19,7 @@ derive_new_account, derive_random_account, send_transaction, + sign_transaction, w3_wait_for_new_blocks, ) @@ -90,7 +92,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert res[0] == res[1], res + assert res[0] == res[-1], res def test_tracecall_insufficient_funds(ethermint, geth): @@ -140,7 +142,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[1] == [ + assert (res[0] == res[-1] == [ json.dumps(EXPECTED_STRUCT_TRACER), expected, expected, ]), res @@ -198,7 +200,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[1] == EXPECTED_JS_TRACERS), res + assert (res[0] == res[-1] == EXPECTED_JS_TRACERS), res def test_tracecall_struct_tracer(ethermint, geth): @@ -404,3 +406,88 @@ def process(w3): res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) assert (res[0] == res[-1] == expected), res + + +def test_debug_tracecall_block_overrides(ethermint, geth): + method = "debug_traceCall" + gas = hex(65535) + price = hex(88500000000) + # https://github.com/ethereum/go-ethereum/blob/v1.11.6/core/vm/opcodes.go#L95 + tx = {"from": ADDRS["validator"], "input": "0x43", "gas": gas, "gasPrice": price} + future_blk = "0x1337" + tracer = {"blockOverrides": { + "number": future_blk, + "coinbase": "0x1111111111111111111111111111111111111111", + "difficulty": hex(2), + "time": hex(3), + "baseLimit": hex(4), + "baseFee": hex(5), + }} + + def process(w3): + w3_wait_for_new_blocks(w3, 1) + tx_res = w3.provider.make_request(method, [tx, "latest", tracer]) + return json.dumps(tx_res["result"], sort_keys=True) + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert (res[0] == res[-1] == EXPECTED_BLOCK_OVERRIDES_TRACERS), res + + +def test_trace_staticcall(ethermint, geth): + method = "debug_traceTransaction" + tracer = {"tracer": "callTracer"} + acc = derive_new_account(6) + sender = acc.address + price = 58500000000 + func = "callCalculator()" + selector = f"0x{Web3.keccak(text=func).hex()[2:10]}" + x = "0x0000000000000000000000000000000000000000000000000000000000000000" + y = "0x0000000000000000000000000000000000000000000000000000000000000001" + + def process(w3): + fund_acc(w3, acc) + calculator, _ = deploy_contract(w3, CONTRACTS["Calculator"], key=acc.key) + caller, _ = deploy_contract( + w3, CONTRACTS["Caller"], (calculator.address,), key=acc.key, + ) + w3_wait_for_new_blocks(w3, 1, sleep=0.1) + txhashes = [] + total = 3 + nonce = w3.eth.get_transaction_count(sender) + for n in range(total): + tx = { + "to": caller.address, + "data": selector, + "nonce": nonce + n, + "gasPrice": price, + } + if n == 1: + tx["accessList"] = [{ + "address": calculator.address, + "storageKeys": (x, y), + }] + + signed = sign_transaction(w3, tx, acc.key) + txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + txhashes.append(txhash) + for txhash in txhashes: + w3.eth.wait_for_transaction_receipt(txhash, timeout=10) + res = [] + call = w3.provider.make_request + with ThreadPoolExecutor(len(txhashes)) as exec: + params = [[(tx_hash.hex())] + [tracer] for tx_hash in txhashes] + exec_map = exec.map(call, itertools.repeat(method), params) + for resp in exec_map: + res = [json.dumps(resp["result"], sort_keys=True)] + return res + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert res[0] == res[-1], res diff --git a/tests/integration_tests/utils.py b/tests/integration_tests/utils.py index 4b9a75ab21..2c648e1d71 100644 --- a/tests/integration_tests/utils.py +++ b/tests/integration_tests/utils.py @@ -38,6 +38,8 @@ "TestExploitContract": "TestExploitContract.sol", "TestRevert": "TestRevert.sol", "TestMessageCall": "TestMessageCall.sol", + "Calculator": "Calculator.sol", + "Caller": "Caller.sol", } @@ -195,6 +197,21 @@ def send_transaction(w3, tx, key=KEYS["validator"], i=0): return send_transaction(w3, tx, key, i + 1) +def send_txs(w3, cli, to, keys, params): + tx = {"to": to, "value": 10000} | params + # use different sender accounts to be able be send concurrently + raw_transactions = [] + for key_from in keys: + signed = sign_transaction(w3, tx, key_from) + raw_transactions.append(signed.rawTransaction) + # wait block update + block_num = wait_for_new_blocks(cli, 1, sleep=0.1) + print(f"block number start: {block_num}") + # send transactions + sended_hash_set = send_raw_transactions(w3, raw_transactions) + return block_num, sended_hash_set + + def send_successful_transaction(w3, i=0): if i > 3: raise TimeExhausted diff --git a/x/evm/keeper/config.go b/x/evm/keeper/config.go index 47bbb7b9da..068501fce5 100644 --- a/x/evm/keeper/config.go +++ b/x/evm/keeper/config.go @@ -32,14 +32,15 @@ import ( // EVMConfig encapsulates common parameters needed to create an EVM to execute a message // It's mainly to reduce the number of method parameters type EVMConfig struct { - Params types.Params - ChainConfig *params.ChainConfig - CoinBase common.Address - BaseFee *big.Int - TxConfig statedb.TxConfig - Tracer vm.EVMLogger - DebugTrace bool - Overrides *rpctypes.StateOverride + Params types.Params + ChainConfig *params.ChainConfig + CoinBase common.Address + BaseFee *big.Int + TxConfig statedb.TxConfig + Tracer vm.EVMLogger + DebugTrace bool + Overrides *rpctypes.StateOverride + BlockOverrides *rpctypes.BlockOverrides } // EVMConfig creates the EVMConfig based on current state @@ -82,18 +83,18 @@ func (k *Keeper) TxConfig(ctx sdk.Context, txHash common.Hash) statedb.TxConfig // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. -func (k Keeper) VMConfig(ctx sdk.Context, _ core.Message, cfg *EVMConfig, tracer vm.EVMLogger) vm.Config { +func (k Keeper) VMConfig(ctx sdk.Context, _ core.Message, cfg *EVMConfig) vm.Config { noBaseFee := true if types.IsLondon(cfg.ChainConfig, ctx.BlockHeight()) { noBaseFee = k.feeMarketKeeper.GetParams(ctx).NoBaseFee } - if _, ok := tracer.(types.NoOpTracer); ok { - tracer = nil + if _, ok := cfg.Tracer.(*types.NoOpTracer); ok { + cfg.Tracer = nil } return vm.Config{ - Tracer: tracer, + Tracer: cfg.Tracer, NoBaseFee: noBaseFee, ExtraEips: cfg.Params.EIPs(), } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index ebc6e30837..6d5c46e8da 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -399,20 +399,36 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type return &types.EstimateGasResponse{Gas: hi}, nil } -// TraceTx configures a new tracer according to the provided configuration, and -// executes the given message in the provided environment. The return value will -// be tracer dependent. -func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*types.QueryTraceTxResponse, error) { - if req == nil { +type traceRequest interface { + comparable + GetTraceConfig() *types.TraceConfig + GetBlockNumber() int64 + GetBlockTime() time.Time + GetBlockHash() string + GetChainId() int64 + GetProposerAddress() sdk.ConsAddress +} + +func execTrace[T traceRequest]( + c context.Context, + req T, + k Keeper, + msgCb func( + ctx sdk.Context, + cfg *EVMConfig, + ) (*core.Message, error), +) ([]byte, error) { + var zero T + if req == zero { return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.TraceConfig != nil && req.TraceConfig.Limit < 0 { - return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit) + if traceConfig := req.GetTraceConfig(); traceConfig != nil && traceConfig.Limit < 0 { + return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", traceConfig.Limit) } // get the context of block beginning - contextHeight := req.BlockNumber + contextHeight := req.GetBlockNumber() if contextHeight < 1 { // 0 is a special value in `ContextWithHeight` contextHeight = 1 @@ -420,43 +436,24 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ ctx := sdk.UnwrapSDKContext(c) ctx = ctx.WithBlockHeight(contextHeight) - ctx = ctx.WithBlockTime(req.BlockTime) - ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) - chainID, err := getChainID(ctx, req.ChainId) + ctx = ctx.WithBlockTime(req.GetBlockTime()) + ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.GetBlockHash())) + + chainID, err := getChainID(ctx, req.GetChainId()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID, common.Hash{}) + cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.GetProposerAddress()), chainID, common.Hash{}) if err != nil { return nil, status.Errorf(codes.Internal, "failed to load evm config: %s", err.Error()) } - signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) - cfg.Tracer = types.NewNoOpTracer() - cfg.DebugTrace = true - - for i, tx := range req.Predecessors { - ethTx := tx.AsTransaction() - msg, err := core.TransactionToMessage(ethTx, signer, cfg.BaseFee) - if err != nil { - continue - } - cfg.TxConfig.TxHash = ethTx.Hash() - cfg.TxConfig.TxIndex = uint(i) - rsp, err := k.ApplyMessageWithConfig(ctx, *msg, cfg, true) - if err != nil { - continue - } - cfg.TxConfig.LogIndex += uint(len(rsp.Logs)) - } - - tx := req.Msg.AsTransaction() - cfg.TxConfig.TxHash = tx.Hash() - if len(req.Predecessors) > 0 { - cfg.TxConfig.TxIndex++ + msg, err := msgCb(ctx, cfg) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) } - result, _, err := k.traceTx(ctx, cfg, signer, tx, req.TraceConfig, false) + result, _, err := k.prepareTrace(ctx, cfg, *msg, req.GetTraceConfig(), false) if err != nil { // error will be returned with detail status from traceTx return nil, err @@ -467,6 +464,48 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ return nil, status.Error(codes.Internal, err.Error()) } + return resultData, nil +} + +// TraceTx configures a new tracer according to the provided configuration, and +// executes the given message in the provided environment. The return value will +// be tracer dependent. +func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*types.QueryTraceTxResponse, error) { + resultData, err := execTrace( + c, + req, + k, + func(ctx sdk.Context, cfg *EVMConfig) (*core.Message, error) { + signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) + cfg.Tracer = types.NewNoOpTracer() + for i, tx := range req.Predecessors { + ethTx := tx.AsTransaction() + msg, err := core.TransactionToMessage(ethTx, signer, cfg.BaseFee) + if err != nil { + continue + } + cfg.TxConfig.TxHash = ethTx.Hash() + cfg.TxConfig.TxIndex = uint(i) + rsp, err := k.ApplyMessageWithConfig(ctx, *msg, cfg, true) + if err != nil { + continue + } + cfg.TxConfig.LogIndex += uint(len(rsp.Logs)) + } + + tx := req.Msg.AsTransaction() + cfg.TxConfig.TxHash = tx.Hash() + if len(req.Predecessors) > 0 { + cfg.TxConfig.TxIndex++ + } + + return core.TransactionToMessage(tx, signer, cfg.BaseFee) + }, + ) + if err != nil { + return nil, err + } + return &types.QueryTraceTxResponse{ Data: resultData, }, nil @@ -513,12 +552,17 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) ethTx := tx.AsTransaction() cfg.TxConfig.TxHash = ethTx.Hash() cfg.TxConfig.TxIndex = uint(i) - traceResult, logIndex, err := k.traceTx(ctx, cfg, signer, ethTx, req.TraceConfig, true) + msg, err := core.TransactionToMessage(ethTx, signer, cfg.BaseFee) if err != nil { - result.Error = err.Error() + result.Error = status.Error(codes.Internal, err.Error()).Error() } else { - cfg.TxConfig.LogIndex = logIndex - result.Result = traceResult + traceResult, logIndex, err := k.prepareTrace(ctx, cfg, *msg, req.TraceConfig, true) + if err != nil { + result.Error = err.Error() + } else { + cfg.TxConfig.LogIndex = logIndex + result.Result = traceResult + } } results = append(results, &result) } @@ -537,67 +581,39 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) // executes the given call in the provided environment. The return value will // be tracer dependent. func (k Keeper) TraceCall(c context.Context, req *types.QueryTraceCallRequest) (*types.QueryTraceCallResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - if req.TraceConfig != nil && req.TraceConfig.Limit < 0 { - return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit) - } - - // get the context of block beginning - contextHeight := req.BlockNumber - if contextHeight < 1 { - // 0 is a special value in `ContextWithHeight` - contextHeight = 1 - } - - ctx := sdk.UnwrapSDKContext(c) - ctx = ctx.WithBlockHeight(contextHeight) - ctx = ctx.WithBlockTime(req.BlockTime) - ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) - - var args types.TransactionArgs - err := json.Unmarshal(req.Args, &args) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - chainID, err := getChainID(ctx, req.ChainId) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID, common.Hash{}) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } + resultData, err := execTrace( + c, + req, + k, + func(ctx sdk.Context, cfg *EVMConfig) (*core.Message, error) { + var args types.TransactionArgs + err := json.Unmarshal(req.Args, &args) + if err != nil { + return nil, err + } - // ApplyMessageWithConfig expect correct nonce set in msg - nonce := k.GetNonce(ctx, args.GetFrom()) - args.Nonce = (*hexutil.Uint64)(&nonce) + // ApplyMessageWithConfig expect correct nonce set in msg + nonce := k.GetNonce(ctx, args.GetFrom()) + args.Nonce = (*hexutil.Uint64)(&nonce) - msg, err := args.ToMessage(req.GasCap, cfg.BaseFee) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - result, _, err := k.traceMsg(ctx, cfg, msg, req.TraceConfig, false) + msg, err := args.ToMessage(req.GasCap, cfg.BaseFee) + if err != nil { + return nil, err + } + return &msg, nil + }, + ) if err != nil { - // error will be returned with detail status from traceTx return nil, err } - resultData, err := json.Marshal(result) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - return &types.QueryTraceCallResponse{ Data: resultData, }, nil } -// traceMsg do trace on one Ethereum message, it returns a tuple: (traceResult, nextLogIndex, error). -func (k *Keeper) traceMsg( +// prepareTrace prepare trace on one Ethereum message, it returns a tuple: (traceResult, nextLogIndex, error). +func (k *Keeper) prepareTrace( ctx sdk.Context, cfg *EVMConfig, msg core.Message, @@ -671,134 +687,27 @@ func (k *Keeper) traceMsg( } }() - var stateOverrides rpctypes.StateOverride if traceConfig.StateOverrides != nil { - config, err := json.Marshal(traceConfig.StateOverrides) - if err != nil { - return nil, 0, status.Error(codes.InvalidArgument, err.Error()) - } - - if err := json.Unmarshal(config, &stateOverrides); err != nil { + var stateOverrides rpctypes.StateOverride + if err := json.Unmarshal(traceConfig.StateOverrides, &stateOverrides); err != nil { return nil, 0, status.Error(codes.InvalidArgument, err.Error()) } cfg.Overrides = &stateOverrides } - cfg.Tracer = tracer - cfg.DebugTrace = true - res, err := k.ApplyMessageWithConfig(ctx, msg, cfg, commitMessage) - if err != nil { - return nil, 0, status.Error(codes.Internal, err.Error()) - } - - if res.VmError != "" { - if res.VmError != vm.ErrExecutionReverted.Error() { - return nil, 0, status.Error(codes.Internal, res.VmError) - } - } - - var result interface{} - result, err = tracer.GetResult() - if err != nil { - return nil, 0, status.Error(codes.Internal, err.Error()) - } - - return &result, txConfig.LogIndex + uint(len(res.Logs)), nil -} - -// traceMsg do trace on one Ethereum message, it returns a tuple: (traceResult, nextLogIndex, error). -func (k *Keeper) traceTx( - ctx sdk.Context, - cfg *EVMConfig, - signer ethtypes.Signer, - tx *ethtypes.Transaction, - traceConfig *types.TraceConfig, - commitMessage bool, -) (*interface{}, uint, error) { - txConfig := cfg.TxConfig - // Assemble the structured logger or the JavaScript tracer - var ( - tracer tracers.Tracer - overrides *ethparams.ChainConfig - err error - timeout = defaultTraceTimeout - ) - msg, err := core.TransactionToMessage(tx, signer, cfg.BaseFee) - if err != nil { - return nil, 0, status.Error(codes.Internal, err.Error()) - } - - if traceConfig == nil { - traceConfig = &types.TraceConfig{} - } - - if traceConfig.Overrides != nil { - overrides = traceConfig.Overrides.EthereumConfig(cfg.ChainConfig.ChainID) - } - - logConfig := logger.Config{ - EnableMemory: traceConfig.EnableMemory, - DisableStorage: traceConfig.DisableStorage, - DisableStack: traceConfig.DisableStack, - EnableReturnData: traceConfig.EnableReturnData, - Debug: traceConfig.Debug, - Limit: int(traceConfig.Limit), - Overrides: overrides, - } - - tracer = logger.NewStructLogger(&logConfig) - - tCtx := &tracers.Context{ - BlockHash: txConfig.BlockHash, - TxIndex: int(txConfig.TxIndex), - TxHash: txConfig.TxHash, - } - if traceConfig.Tracer != "" { - var cfg json.RawMessage - if traceConfig.TracerJsonConfig != "" { - cfg = json.RawMessage(traceConfig.TracerJsonConfig) - } - if tracer, err = tracers.DefaultDirectory.New(traceConfig.Tracer, tCtx, cfg); err != nil { - return nil, 0, status.Error(codes.Internal, err.Error()) - } - } - - // Define a meaningful timeout of a single transaction trace - if traceConfig.Timeout != "" { - if timeout, err = time.ParseDuration(traceConfig.Timeout); err != nil { - return nil, 0, status.Errorf(codes.InvalidArgument, "timeout value: %s", err.Error()) - } - } - - // Handle timeouts and RPC cancellations - deadlineCtx, cancel := context.WithTimeout(ctx.Context(), timeout) - defer cancel() - - go func() { - <-deadlineCtx.Done() - if errors.Is(deadlineCtx.Err(), context.DeadlineExceeded) { - tracer.Stop(errors.New("execution timeout")) - } - }() - - var stateOverrides rpctypes.StateOverride - if traceConfig.StateOverrides != nil { - config, err := json.Marshal(traceConfig.StateOverrides) - if err != nil { - return nil, 0, status.Error(codes.InvalidArgument, err.Error()) - } - - if err := json.Unmarshal(config, &stateOverrides); err != nil { + if traceConfig.BlockOverrides != nil { + var blockOverrides rpctypes.BlockOverrides + if err := json.Unmarshal(traceConfig.BlockOverrides, &blockOverrides); err != nil { return nil, 0, status.Error(codes.InvalidArgument, err.Error()) } - cfg.Overrides = &stateOverrides + cfg.BlockOverrides = &blockOverrides } cfg.Tracer = tracer cfg.DebugTrace = true - res, err := k.ApplyMessageWithConfig(ctx, *msg, cfg, commitMessage) + res, err := k.ApplyMessageWithConfig(ctx, msg, cfg, commitMessage) if err != nil { return nil, 0, status.Error(codes.Internal, err.Error()) } diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 198ae64ea7..ff12f0accd 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -46,12 +46,10 @@ import ( // NOTE: the RANDOM opcode is currently not supported since it requires // RANDAO implementation. See https://github.com/evmos/ethermint/pull/1520#pullrequestreview-1200504697 // for more information. - func (k *Keeper) NewEVM( ctx sdk.Context, msg core.Message, cfg *EVMConfig, - tracer vm.EVMLogger, stateDB vm.StateDB, ) *vm.EVM { blockCtx := vm.BlockContext{ @@ -66,11 +64,14 @@ func (k *Keeper) NewEVM( BaseFee: cfg.BaseFee, Random: nil, // not supported } + if cfg.BlockOverrides != nil { + cfg.BlockOverrides.Apply(&blockCtx) + } txCtx := core.NewEVMTxContext(&msg) - if tracer == nil { - tracer = k.Tracer(ctx, msg, cfg.ChainConfig) + if cfg.Tracer == nil { + cfg.Tracer = k.Tracer(ctx, msg, cfg.ChainConfig) } - vmConfig := k.VMConfig(ctx, msg, cfg, tracer) + vmConfig := k.VMConfig(ctx, msg, cfg) rules := cfg.ChainConfig.Rules(big.NewInt(ctx.BlockHeight()), cfg.ChainConfig.MergeNetsplitBlock != nil, blockCtx.Time) contracts := make(map[common.Address]vm.PrecompiledContract) active := make([]common.Address, 0) @@ -355,13 +356,13 @@ func (k *Keeper) ApplyMessageWithConfig( } stateDB := statedb.NewWithParams(ctx, k, cfg.TxConfig, cfg.Params) + var evm *vm.EVM if cfg.Overrides != nil { if err := cfg.Overrides.Apply(stateDB); err != nil { return nil, errorsmod.Wrap(err, "failed to apply state override") } } - - evm := k.NewEVM(ctx, msg, cfg, cfg.Tracer, stateDB) + evm = k.NewEVM(ctx, msg, cfg, stateDB) leftoverGas := msg.GasLimit sender := vm.AccountRef(msg.From) // Allow the tracer captures the tx level events, mainly the gas consumption. diff --git a/x/evm/migrations/v0/types/trace_config_v0.pb.go b/x/evm/migrations/v0/types/trace_config_v0.pb.go index 7c5291ae44..20846f7761 100644 --- a/x/evm/migrations/v0/types/trace_config_v0.pb.go +++ b/x/evm/migrations/v0/types/trace_config_v0.pb.go @@ -23,84 +23,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// OverrideAccount indicates the overriding fields of account during the execution of -// a message call. -type V0OverrideAccount struct { - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` - State map[string]string `protobuf:"bytes,4,rep,name=state,proto3" json:"state,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StateDiff map[string]string `protobuf:"bytes,5,rep,name=state_diff,json=stateDiff,proto3" json:"stateDiff" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *V0OverrideAccount) Reset() { *m = V0OverrideAccount{} } -func (m *V0OverrideAccount) String() string { return proto.CompactTextString(m) } -func (*V0OverrideAccount) ProtoMessage() {} -func (*V0OverrideAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_9e606038a9deeb16, []int{0} -} -func (m *V0OverrideAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *V0OverrideAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_V0OverrideAccount.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 *V0OverrideAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_V0OverrideAccount.Merge(m, src) -} -func (m *V0OverrideAccount) XXX_Size() int { - return m.Size() -} -func (m *V0OverrideAccount) XXX_DiscardUnknown() { - xxx_messageInfo_V0OverrideAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_V0OverrideAccount proto.InternalMessageInfo - -func (m *V0OverrideAccount) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -func (m *V0OverrideAccount) GetCode() string { - if m != nil { - return m.Code - } - return "" -} - -func (m *V0OverrideAccount) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func (m *V0OverrideAccount) GetState() map[string]string { - if m != nil { - return m.State - } - return nil -} - -func (m *V0OverrideAccount) GetStateDiff() map[string]string { - if m != nil { - return m.StateDiff - } - return nil -} - // V0TraceConfig holds extra parameters to trace functions. type V0TraceConfig struct { // tracer is a custom javascript tracer @@ -126,15 +48,13 @@ type V0TraceConfig struct { EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"` // tracer_json_config configures the tracer using a JSON string TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` - // temporary state modifications to Geth in order to simulate the effects of eth_call - StateOverrides map[string]*V0OverrideAccount `protobuf:"bytes,14,rep,name=state_overrides,json=stateOverrides,proto3" json:"stateOverrides" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *V0TraceConfig) Reset() { *m = V0TraceConfig{} } func (m *V0TraceConfig) String() string { return proto.CompactTextString(m) } func (*V0TraceConfig) ProtoMessage() {} func (*V0TraceConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_9e606038a9deeb16, []int{1} + return fileDescriptor_9e606038a9deeb16, []int{0} } func (m *V0TraceConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -240,19 +160,8 @@ func (m *V0TraceConfig) GetTracerJsonConfig() string { return "" } -func (m *V0TraceConfig) GetStateOverrides() map[string]*V0OverrideAccount { - if m != nil { - return m.StateOverrides - } - return nil -} - func init() { - proto.RegisterType((*V0OverrideAccount)(nil), "ethermint.evm.v1.V0OverrideAccount") - proto.RegisterMapType((map[string]string)(nil), "ethermint.evm.v1.V0OverrideAccount.StateDiffEntry") - proto.RegisterMapType((map[string]string)(nil), "ethermint.evm.v1.V0OverrideAccount.StateEntry") proto.RegisterType((*V0TraceConfig)(nil), "ethermint.evm.v1.V0TraceConfig") - proto.RegisterMapType((map[string]*V0OverrideAccount)(nil), "ethermint.evm.v1.V0TraceConfig.StateOverridesEntry") } func init() { @@ -260,128 +169,35 @@ func init() { } var fileDescriptor_9e606038a9deeb16 = []byte{ - // 645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x4f, 0xdb, 0x4e, - 0x10, 0xc5, 0x60, 0x43, 0xb2, 0x21, 0xe0, 0xdf, 0x82, 0x7e, 0x5a, 0xe5, 0x90, 0x44, 0x54, 0x42, - 0x39, 0x39, 0x10, 0x54, 0x89, 0xfe, 0x55, 0x1b, 0xe8, 0x05, 0xa9, 0xaa, 0xb4, 0x54, 0x1c, 0x7a, - 0x49, 0x37, 0xf6, 0xda, 0xb8, 0xc4, 0x5e, 0xb4, 0x5e, 0x5b, 0xe4, 0x5b, 0xf4, 0x63, 0xf5, 0xc8, - 0xb1, 0xa7, 0xa8, 0x82, 0x5b, 0xbe, 0x40, 0x6f, 0x55, 0xb5, 0xbb, 0x36, 0x4e, 0x42, 0x0e, 0xf4, - 0x36, 0x6f, 0x66, 0xdf, 0xac, 0x67, 0xde, 0xf3, 0x82, 0x7d, 0x2a, 0x2e, 0x29, 0x8f, 0xc2, 0x58, - 0x74, 0x69, 0x16, 0x75, 0xb3, 0xc3, 0xae, 0xe0, 0xc4, 0xa5, 0x03, 0x97, 0xc5, 0x7e, 0x18, 0x0c, - 0xb2, 0x03, 0xe7, 0x9a, 0x33, 0xc1, 0xa0, 0xfd, 0x70, 0xce, 0xa1, 0x59, 0xe4, 0x64, 0x87, 0x8d, - 0xdd, 0x80, 0x05, 0x4c, 0x15, 0xbb, 0x32, 0xd2, 0xe7, 0x1a, 0x8f, 0xfb, 0xb9, 0x97, 0x24, 0x8c, - 0x17, 0xfb, 0xed, 0xfd, 0x5e, 0x05, 0xff, 0x5d, 0x1c, 0x7c, 0xca, 0x28, 0xe7, 0xa1, 0x47, 0xdf, - 0xbb, 0x2e, 0x4b, 0x63, 0x01, 0x77, 0x81, 0x15, 0xb3, 0xd8, 0xa5, 0xc8, 0x68, 0x1b, 0x1d, 0x13, - 0x6b, 0x00, 0x21, 0x30, 0x5d, 0xe6, 0x51, 0xb4, 0xda, 0x36, 0x3a, 0x55, 0xac, 0x62, 0x88, 0xc0, - 0xc6, 0x90, 0x8c, 0x88, 0x3c, 0xbb, 0xa6, 0xd2, 0x05, 0x84, 0xa7, 0xc0, 0x4a, 0x04, 0x11, 0x14, - 0x99, 0xed, 0xb5, 0x4e, 0xad, 0xe7, 0x38, 0x8b, 0x5f, 0xee, 0x3c, 0xba, 0xd7, 0x39, 0x97, 0x84, - 0x0f, 0xb1, 0xe0, 0x63, 0xac, 0xc9, 0xf0, 0x2b, 0x00, 0x2a, 0x18, 0x78, 0xa1, 0xef, 0x23, 0x4b, - 0xb5, 0xea, 0x3d, 0xb9, 0xd5, 0x69, 0xe8, 0xfb, 0xaa, 0x5d, 0xbf, 0x3e, 0x9d, 0xb4, 0xaa, 0x49, - 0x91, 0xc3, 0x65, 0xd8, 0x38, 0x06, 0xa0, 0xbc, 0x16, 0xda, 0x60, 0xed, 0x8a, 0x8e, 0xd5, 0xdc, - 0x55, 0x2c, 0x43, 0xb9, 0x8b, 0x8c, 0x8c, 0xd2, 0x62, 0x6c, 0x0d, 0x5e, 0xae, 0x1e, 0x1b, 0x8d, - 0xd7, 0x60, 0x6b, 0xfe, 0x96, 0x7f, 0x61, 0xef, 0xfd, 0xb1, 0x40, 0xfd, 0xe2, 0xe0, 0xb3, 0x54, - 0xf9, 0x44, 0x89, 0x02, 0xff, 0x07, 0xeb, 0x4a, 0x74, 0x9e, 0x37, 0xc8, 0x91, 0xdc, 0xb1, 0x08, - 0x23, 0xca, 0x52, 0x91, 0x77, 0x29, 0xa0, 0x64, 0x70, 0x4a, 0x6f, 0xa8, 0xab, 0x96, 0x6f, 0xe2, - 0x1c, 0xc1, 0xe7, 0xa0, 0xee, 0x85, 0x09, 0x19, 0x8e, 0xe8, 0x20, 0x11, 0xc4, 0xbd, 0x42, 0x56, - 0xdb, 0xe8, 0x54, 0xfa, 0xf6, 0x74, 0xd2, 0xda, 0xcc, 0x0b, 0xe7, 0x32, 0x8f, 0xe7, 0x10, 0x7c, - 0x05, 0xb6, 0x4b, 0x1a, 0xe3, 0x24, 0xa0, 0x68, 0x5d, 0x11, 0xe1, 0x74, 0xd2, 0xda, 0x7a, 0x38, - 0xaa, 0x2a, 0x78, 0x01, 0xcb, 0x49, 0x3d, 0x3a, 0x4c, 0x03, 0x54, 0x91, 0x14, 0xac, 0x81, 0xcc, - 0x8e, 0xc2, 0x28, 0x14, 0xa8, 0xda, 0x36, 0x3a, 0x16, 0xd6, 0x00, 0xbe, 0x01, 0x55, 0x96, 0xeb, - 0x95, 0x20, 0xd0, 0x36, 0x3a, 0xb5, 0x5e, 0x6b, 0x99, 0xa8, 0x27, 0xd2, 0xb3, 0x7a, 0x3b, 0xb8, - 0x64, 0xc8, 0xf1, 0x68, 0xac, 0x3e, 0x33, 0xa2, 0x11, 0xe3, 0x63, 0x54, 0x2b, 0xc7, 0xd3, 0x85, - 0x8f, 0x2a, 0x8f, 0xe7, 0x10, 0xec, 0x03, 0x98, 0xd3, 0x38, 0x15, 0x29, 0x8f, 0x07, 0x1e, 0x11, - 0x04, 0x6d, 0x2a, 0xee, 0xee, 0x74, 0xd2, 0xb2, 0x75, 0x15, 0xab, 0xe2, 0x29, 0x11, 0x04, 0x3f, - 0xca, 0xc0, 0xb7, 0x00, 0x6a, 0x55, 0x06, 0xdf, 0x12, 0x56, 0xfc, 0x4e, 0xa8, 0x2e, 0x65, 0xd1, - 0xf7, 0xeb, 0x6a, 0xfe, 0xcd, 0xb6, 0x46, 0x67, 0x09, 0xcb, 0xa7, 0x80, 0xd7, 0x60, 0x5b, 0xfb, - 0xb9, 0x9c, 0x7f, 0x4b, 0x99, 0xfa, 0x68, 0xd9, 0xfc, 0x33, 0xee, 0xd0, 0x86, 0x2e, 0x5c, 0x9e, - 0x68, 0x57, 0x2b, 0x5d, 0x92, 0xb9, 0x02, 0x5e, 0xc0, 0x0d, 0x1f, 0xec, 0x2c, 0xa1, 0x2e, 0xb1, - 0xea, 0x8b, 0x59, 0xab, 0xd6, 0x7a, 0xcf, 0x9e, 0xf0, 0x97, 0xcd, 0xf8, 0xf9, 0xcc, 0xac, 0x98, - 0xb6, 0x75, 0x66, 0x56, 0x36, 0xec, 0xca, 0x83, 0x37, 0x72, 0x7d, 0xf0, 0x4e, 0x81, 0x67, 0x16, - 0xdf, 0x7f, 0xf7, 0xe3, 0xae, 0x69, 0xdc, 0xde, 0x35, 0x8d, 0x5f, 0x77, 0x4d, 0xe3, 0xfb, 0x7d, - 0x73, 0xe5, 0xf6, 0xbe, 0xb9, 0xf2, 0xf3, 0xbe, 0xb9, 0xf2, 0x65, 0x3f, 0x08, 0xc5, 0x65, 0x3a, - 0x74, 0x5c, 0x16, 0xc9, 0xd7, 0x8b, 0x25, 0xdd, 0xf2, 0x35, 0xbb, 0x51, 0xef, 0x99, 0x18, 0x5f, - 0xd3, 0x64, 0xb8, 0xae, 0xde, 0xb0, 0xa3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xa5, 0xa6, - 0xe7, 0x3d, 0x05, 0x00, 0x00, -} - -func (m *V0OverrideAccount) 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 *V0OverrideAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *V0OverrideAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StateDiff) > 0 { - for k := range m.StateDiff { - v := m.StateDiff[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfigV0(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.State) > 0 { - for k := range m.State { - v := m.State[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfigV0(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0x1a - } - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(m.Code))) - i-- - dAtA[i] = 0x12 - } - if m.Nonce != 0 { - i = encodeVarintTraceConfigV0(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + // 446 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x6b, 0x68, 0xbb, 0xd4, 0x5b, 0x21, 0x32, 0x15, 0xb2, 0x76, 0x48, 0x23, 0x0e, 0x53, + 0x4e, 0x49, 0x07, 0xe2, 0x84, 0x40, 0xa8, 0xe3, 0x54, 0x89, 0x8b, 0x41, 0x3b, 0x70, 0x89, 0xdc, + 0xf4, 0x25, 0x35, 0x2c, 0xf1, 0xe4, 0xb8, 0xd1, 0xf6, 0x2d, 0xf8, 0x10, 0x7c, 0x18, 0x8e, 0x3b, + 0x72, 0xaa, 0x50, 0x7b, 0xeb, 0xa7, 0x40, 0xb6, 0xd3, 0x76, 0xeb, 0x6e, 0xf9, 0xbd, 0x8f, 0x9f, + 0xbc, 0x7f, 0xf1, 0x19, 0xe8, 0x39, 0xa8, 0x42, 0x94, 0x3a, 0x81, 0xba, 0x48, 0xea, 0xf3, 0x44, + 0x2b, 0x9e, 0x41, 0x9a, 0xc9, 0xf2, 0xbb, 0xc8, 0xd3, 0x7a, 0x14, 0x5f, 0x2b, 0xa9, 0x25, 0xf1, + 0x77, 0xef, 0x62, 0xa8, 0x8b, 0xb8, 0x3e, 0x3f, 0x1d, 0xe4, 0x32, 0x97, 0x56, 0x4c, 0xcc, 0x97, + 0x7b, 0x77, 0xfa, 0xf8, 0x7f, 0xd9, 0x9c, 0x8b, 0xf2, 0xf0, 0x7f, 0xaf, 0x7e, 0xb7, 0x71, 0xff, + 0x72, 0xf4, 0xd5, 0xe4, 0xba, 0xb0, 0x12, 0x79, 0x89, 0xbb, 0x36, 0xb5, 0xa2, 0x28, 0x44, 0x51, + 0x8f, 0x35, 0x44, 0x28, 0x3e, 0xd2, 0xa2, 0x00, 0xb9, 0xd0, 0xf4, 0x89, 0x15, 0xb6, 0x68, 0x1c, + 0x0a, 0xe0, 0x06, 0x32, 0xfa, 0x34, 0x44, 0x51, 0x9b, 0x35, 0x44, 0xde, 0xe2, 0xfe, 0x4c, 0x54, + 0x7c, 0x7a, 0x05, 0x69, 0xa5, 0x79, 0xf6, 0x93, 0x76, 0x42, 0x14, 0x79, 0x63, 0x7f, 0xb3, 0x1c, + 0x9e, 0x34, 0xc2, 0x17, 0x13, 0x67, 0x0f, 0x88, 0xbc, 0xc3, 0xcf, 0xf7, 0x36, 0xa9, 0x78, 0x0e, + 0xb4, 0x6b, 0x8d, 0x64, 0xb3, 0x1c, 0x3e, 0xdb, 0x3d, 0xb5, 0x0a, 0x3b, 0x60, 0x32, 0xc0, 0x9d, + 0x19, 0x4c, 0x17, 0x39, 0xf5, 0x8c, 0x85, 0x39, 0x30, 0xd1, 0x2b, 0x51, 0x08, 0x4d, 0x7b, 0x21, + 0x8a, 0x3a, 0xcc, 0x01, 0x79, 0x8f, 0x7b, 0xb2, 0x06, 0xa5, 0xc4, 0x0c, 0x2a, 0x8a, 0x43, 0x14, + 0x1d, 0xbf, 0x1e, 0xc6, 0x87, 0xf3, 0x8d, 0x2f, 0x47, 0x17, 0x66, 0x72, 0x6e, 0x3a, 0x6c, 0xef, + 0x30, 0xed, 0x41, 0x69, 0xcb, 0x2c, 0xa0, 0x90, 0xea, 0x96, 0x1e, 0xef, 0xdb, 0x73, 0xc2, 0x67, + 0x1b, 0x67, 0x0f, 0x88, 0x8c, 0x31, 0x69, 0x6c, 0x0a, 0xf4, 0x42, 0x95, 0xe9, 0x8c, 0x6b, 0x4e, + 0x4f, 0xac, 0x77, 0xb0, 0x59, 0x0e, 0x7d, 0xa7, 0x32, 0x2b, 0x7e, 0xe2, 0x9a, 0xb3, 0x47, 0x11, + 0xf2, 0x01, 0x13, 0xb7, 0x95, 0xf4, 0x47, 0x25, 0xb7, 0x4b, 0xa5, 0x7d, 0xb3, 0x16, 0x97, 0xdf, + 0xa9, 0x4d, 0xcd, 0xbe, 0xa3, 0x49, 0x25, 0x9b, 0x2e, 0x26, 0x6d, 0xaf, 0xed, 0x77, 0x26, 0x6d, + 0xef, 0xc8, 0xf7, 0x76, 0x13, 0x6c, 0xba, 0x60, 0x2f, 0xb6, 0x7c, 0xaf, 0xbc, 0xf1, 0xc7, 0x3f, + 0xab, 0x00, 0xdd, 0xad, 0x02, 0xf4, 0x6f, 0x15, 0xa0, 0x5f, 0xeb, 0xa0, 0x75, 0xb7, 0x0e, 0x5a, + 0x7f, 0xd7, 0x41, 0xeb, 0xdb, 0x59, 0x2e, 0xf4, 0x7c, 0x31, 0x8d, 0x33, 0x59, 0x98, 0x4b, 0x93, + 0x55, 0xb2, 0xbf, 0xbc, 0x1b, 0x7b, 0x7b, 0xfa, 0xf6, 0x1a, 0xaa, 0x69, 0xd7, 0xde, 0xdb, 0x9b, + 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x46, 0xa8, 0xc4, 0xe9, 0x02, 0x00, 0x00, } func (m *V0TraceConfig) Marshal() (dAtA []byte, err error) { @@ -404,32 +220,6 @@ func (m *V0TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.StateOverrides) > 0 { - for k := range m.StateOverrides { - v := m.StateOverrides[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceConfigV0(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfigV0(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfigV0(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x72 - } - } if len(m.TracerJsonConfig) > 0 { i -= len(m.TracerJsonConfig) copy(dAtA[i:], m.TracerJsonConfig) @@ -537,42 +327,6 @@ func encodeVarintTraceConfigV0(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *V0OverrideAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nonce != 0 { - n += 1 + sovTraceConfigV0(uint64(m.Nonce)) - } - l = len(m.Code) - if l > 0 { - n += 1 + l + sovTraceConfigV0(uint64(l)) - } - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovTraceConfigV0(uint64(l)) - } - if len(m.State) > 0 { - for k, v := range m.State { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTraceConfigV0(uint64(len(k))) + 1 + len(v) + sovTraceConfigV0(uint64(len(v))) - n += mapEntrySize + 1 + sovTraceConfigV0(uint64(mapEntrySize)) - } - } - if len(m.StateDiff) > 0 { - for k, v := range m.StateDiff { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTraceConfigV0(uint64(len(k))) + 1 + len(v) + sovTraceConfigV0(uint64(len(v))) - n += mapEntrySize + 1 + sovTraceConfigV0(uint64(mapEntrySize)) - } - } - return n -} - func (m *V0TraceConfig) Size() (n int) { if m == nil { return 0 @@ -616,19 +370,6 @@ func (m *V0TraceConfig) Size() (n int) { if l > 0 { n += 1 + l + sovTraceConfigV0(uint64(l)) } - if len(m.StateOverrides) > 0 { - for k, v := range m.StateOverrides { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTraceConfigV0(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTraceConfigV0(uint64(len(k))) + l - n += mapEntrySize + 1 + sovTraceConfigV0(uint64(mapEntrySize)) - } - } return n } @@ -638,393 +379,6 @@ func sovTraceConfigV0(x uint64) (n int) { func sozTraceConfigV0(x uint64) (n int) { return sovTraceConfigV0(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *V0OverrideAccount) 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 ErrIntOverflowTraceConfigV0 - } - 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: V0OverrideAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: V0OverrideAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - 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 ErrInvalidLengthTraceConfigV0 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - 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 ErrInvalidLengthTraceConfigV0 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfigV0(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.State[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateDiff == nil { - m.StateDiff = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfigV0(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StateDiff[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceConfigV0(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *V0TraceConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1324,135 +678,6 @@ func (m *V0TraceConfig) Unmarshal(dAtA []byte) error { } m.TracerJsonConfig = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateOverrides", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateOverrides == nil { - m.StateOverrides = make(map[string]*V0OverrideAccount) - } - var mapkey string - var mapvalue *V0OverrideAccount - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfigV0 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTraceConfigV0 - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &V0OverrideAccount{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfigV0(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfigV0 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StateOverrides[mapkey] = mapvalue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTraceConfigV0(dAtA[iNdEx:]) diff --git a/x/evm/types/trace_config.pb.go b/x/evm/types/trace_config.pb.go index b463dfb823..1f354505f2 100644 --- a/x/evm/types/trace_config.pb.go +++ b/x/evm/types/trace_config.pb.go @@ -23,84 +23,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// OverrideAccount indicates the overriding fields of account during the execution of -// a message call. -type OverrideAccount struct { - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` - State map[string]string `protobuf:"bytes,4,rep,name=state,proto3" json:"state,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StateDiff map[string]string `protobuf:"bytes,5,rep,name=state_diff,json=stateDiff,proto3" json:"stateDiff" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *OverrideAccount) Reset() { *m = OverrideAccount{} } -func (m *OverrideAccount) String() string { return proto.CompactTextString(m) } -func (*OverrideAccount) ProtoMessage() {} -func (*OverrideAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_8f7fb70914ae5a53, []int{0} -} -func (m *OverrideAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OverrideAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OverrideAccount.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 *OverrideAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_OverrideAccount.Merge(m, src) -} -func (m *OverrideAccount) XXX_Size() int { - return m.Size() -} -func (m *OverrideAccount) XXX_DiscardUnknown() { - xxx_messageInfo_OverrideAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_OverrideAccount proto.InternalMessageInfo - -func (m *OverrideAccount) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -func (m *OverrideAccount) GetCode() string { - if m != nil { - return m.Code - } - return "" -} - -func (m *OverrideAccount) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func (m *OverrideAccount) GetState() map[string]string { - if m != nil { - return m.State - } - return nil -} - -func (m *OverrideAccount) GetStateDiff() map[string]string { - if m != nil { - return m.StateDiff - } - return nil -} - // TraceConfig holds extra parameters to trace functions. type TraceConfig struct { // tracer is a custom javascript tracer @@ -127,14 +49,16 @@ type TraceConfig struct { // tracer_json_config configures the tracer using a JSON string TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` // temporary state modifications to Geth in order to simulate the effects of eth_call - StateOverrides map[string]*OverrideAccount `protobuf:"bytes,14,rep,name=state_overrides,json=stateOverrides,proto3" json:"stateOverrides" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StateOverrides []byte `protobuf:"bytes,14,opt,name=state_overrides,json=stateOverrides,proto3" json:"stateOverrides"` + // block overrides block context fields encoded as json + BlockOverrides []byte `protobuf:"bytes,15,opt,name=block_overrides,json=blockOverrides,proto3" json:"blockOverrides"` } func (m *TraceConfig) Reset() { *m = TraceConfig{} } func (m *TraceConfig) String() string { return proto.CompactTextString(m) } func (*TraceConfig) ProtoMessage() {} func (*TraceConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_8f7fb70914ae5a53, []int{1} + return fileDescriptor_8f7fb70914ae5a53, []int{0} } func (m *TraceConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -240,19 +164,22 @@ func (m *TraceConfig) GetTracerJsonConfig() string { return "" } -func (m *TraceConfig) GetStateOverrides() map[string]*OverrideAccount { +func (m *TraceConfig) GetStateOverrides() []byte { if m != nil { return m.StateOverrides } return nil } +func (m *TraceConfig) GetBlockOverrides() []byte { + if m != nil { + return m.BlockOverrides + } + return nil +} + func init() { - proto.RegisterType((*OverrideAccount)(nil), "ethermint.evm.v1.OverrideAccount") - proto.RegisterMapType((map[string]string)(nil), "ethermint.evm.v1.OverrideAccount.StateDiffEntry") - proto.RegisterMapType((map[string]string)(nil), "ethermint.evm.v1.OverrideAccount.StateEntry") proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") - proto.RegisterMapType((map[string]*OverrideAccount)(nil), "ethermint.evm.v1.TraceConfig.StateOverridesEntry") } func init() { @@ -260,127 +187,37 @@ func init() { } var fileDescriptor_8f7fb70914ae5a53 = []byte{ - // 638 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0x5e, 0xb6, 0x64, 0x6b, 0xdd, 0xfd, 0x88, 0xbc, 0x09, 0x59, 0x95, 0x68, 0xc3, 0x90, 0x50, - 0x0e, 0x28, 0x65, 0x43, 0x88, 0x89, 0x21, 0x04, 0xdd, 0xb8, 0x4c, 0x42, 0x48, 0x1e, 0x27, 0x0e, - 0x54, 0x6e, 0xe2, 0x66, 0x61, 0x4d, 0x3c, 0x39, 0x4e, 0xb4, 0xfe, 0x17, 0xfc, 0x59, 0x1c, 0x77, - 0xe4, 0x54, 0xa1, 0xed, 0xd6, 0x1b, 0x17, 0xce, 0xc8, 0x76, 0xd2, 0xf4, 0xc7, 0x24, 0xe0, 0xf6, - 0xbe, 0xf7, 0xde, 0xf7, 0xec, 0xf7, 0xde, 0x67, 0x83, 0xc7, 0x54, 0x5c, 0x50, 0x1e, 0x47, 0x89, - 0xe8, 0xd0, 0x3c, 0xee, 0xe4, 0x07, 0x1d, 0xc1, 0x89, 0x4f, 0x7b, 0x3e, 0x4b, 0x06, 0x51, 0xe8, - 0x5d, 0x71, 0x26, 0x18, 0xb4, 0xa7, 0x49, 0x1e, 0xcd, 0x63, 0x2f, 0x3f, 0x68, 0xee, 0x85, 0x2c, - 0x64, 0x2a, 0xd8, 0x91, 0x96, 0xce, 0x6b, 0x2e, 0x17, 0xf3, 0x2f, 0x48, 0x94, 0xcc, 0x15, 0xdb, - 0xff, 0xb5, 0x0a, 0x76, 0x3e, 0xe6, 0x94, 0xf3, 0x28, 0xa0, 0xef, 0x7c, 0x9f, 0x65, 0x89, 0x80, - 0x7b, 0xc0, 0x4a, 0x58, 0xe2, 0x53, 0x64, 0x38, 0x86, 0x6b, 0x62, 0x0d, 0x20, 0x04, 0xa6, 0xcf, - 0x02, 0x8a, 0x56, 0x1d, 0xc3, 0xad, 0x63, 0x65, 0x43, 0x04, 0x36, 0xfa, 0x64, 0x48, 0x64, 0xee, - 0x9a, 0x72, 0x97, 0x10, 0x76, 0x81, 0x95, 0x0a, 0x22, 0x28, 0x32, 0x9d, 0x35, 0xb7, 0x71, 0xf8, - 0xd4, 0x5b, 0xbc, 0xb4, 0xb7, 0x70, 0xaa, 0x77, 0x2e, 0xd3, 0xdf, 0x27, 0x82, 0x8f, 0xb0, 0xa6, - 0xc2, 0x2f, 0x00, 0x28, 0xa3, 0x17, 0x44, 0x83, 0x01, 0xb2, 0x54, 0xa1, 0x67, 0xff, 0x58, 0xe8, - 0x34, 0x1a, 0x0c, 0x54, 0xb1, 0xee, 0xd6, 0x64, 0xdc, 0xae, 0xa7, 0xa5, 0x0f, 0x57, 0x66, 0xf3, - 0x08, 0x80, 0xea, 0x50, 0x68, 0x83, 0xb5, 0x4b, 0x3a, 0x52, 0x3d, 0xd7, 0xb1, 0x34, 0xe5, 0x1c, - 0x72, 0x32, 0xcc, 0xca, 0x96, 0x35, 0x78, 0xb5, 0x7a, 0x64, 0x34, 0x5f, 0x83, 0xed, 0xf9, 0x53, - 0xfe, 0x87, 0xbd, 0xff, 0xdb, 0x02, 0x8d, 0x4f, 0x72, 0xaf, 0x27, 0x6a, 0x13, 0xf0, 0x01, 0x58, - 0x57, 0x6b, 0xe6, 0x05, 0xbd, 0x40, 0x72, 0xba, 0x22, 0x8a, 0x29, 0xcb, 0x44, 0x51, 0xa3, 0x84, - 0x92, 0xc1, 0x29, 0xbd, 0xa6, 0xbe, 0x1a, 0xbb, 0x89, 0x0b, 0x04, 0x5f, 0x80, 0xad, 0x20, 0x4a, - 0x49, 0x7f, 0x48, 0x7b, 0xa9, 0x20, 0xfe, 0x25, 0xb2, 0x1c, 0xc3, 0xad, 0x75, 0xed, 0xc9, 0xb8, - 0xbd, 0x59, 0x04, 0xce, 0xa5, 0x1f, 0xcf, 0x21, 0x78, 0x0c, 0x76, 0x2a, 0x1a, 0xe3, 0x24, 0xa4, - 0x68, 0x5d, 0x11, 0xe1, 0x64, 0xdc, 0xde, 0x9e, 0xa6, 0xaa, 0x08, 0x5e, 0xc0, 0xb2, 0xcf, 0x80, - 0xf6, 0xb3, 0x10, 0xd5, 0x24, 0x05, 0x6b, 0x20, 0xbd, 0xc3, 0x28, 0x8e, 0x04, 0xaa, 0x3b, 0x86, - 0x6b, 0x61, 0x0d, 0xe0, 0x31, 0xa8, 0xb3, 0x62, 0x5b, 0x29, 0x02, 0x8e, 0xe1, 0x36, 0x0e, 0x1f, - 0x2e, 0x2f, 0xf4, 0x44, 0xca, 0x54, 0xcf, 0x06, 0x57, 0xf9, 0xb2, 0x39, 0x9a, 0xa8, 0x4b, 0xc6, - 0x34, 0x66, 0x7c, 0x84, 0x1a, 0x55, 0x73, 0x3a, 0xf0, 0x41, 0xf9, 0xf1, 0x1c, 0x82, 0x5d, 0x00, - 0x0b, 0x1a, 0xa7, 0x22, 0xe3, 0x49, 0x2f, 0x20, 0x82, 0xa0, 0x4d, 0xc5, 0xdd, 0x9b, 0x8c, 0xdb, - 0xb6, 0x8e, 0x62, 0x15, 0x3c, 0x25, 0x82, 0xe0, 0x25, 0x0f, 0x7c, 0x03, 0xa0, 0xde, 0x49, 0xef, - 0x6b, 0xca, 0xca, 0x17, 0x84, 0xb6, 0xe4, 0x52, 0xf4, 0xf9, 0x3a, 0x5a, 0xdc, 0xd9, 0xd6, 0xe8, - 0x2c, 0x65, 0x45, 0x17, 0x30, 0x01, 0x3b, 0x5a, 0xc9, 0x55, 0xf7, 0xdb, 0x4a, 0xce, 0x07, 0xcb, - 0xdd, 0xcf, 0x28, 0x43, 0x4b, 0xb9, 0xd4, 0x77, 0xaa, 0xf5, 0xac, 0x76, 0x92, 0xce, 0x05, 0xf0, - 0x02, 0x6e, 0x06, 0x60, 0xf7, 0x1e, 0xea, 0x3d, 0x22, 0x7d, 0x39, 0x2b, 0xd2, 0xc6, 0xe1, 0xa3, - 0xbf, 0xbe, 0xae, 0x19, 0x1d, 0x9f, 0x99, 0x35, 0xd3, 0xb6, 0xce, 0xcc, 0xda, 0x86, 0x5d, 0x9b, - 0xaa, 0xa2, 0xd8, 0x0d, 0xde, 0x2d, 0xf1, 0xcc, 0xd0, 0xbb, 0x6f, 0xbf, 0xdf, 0xb6, 0x8c, 0x9b, - 0xdb, 0x96, 0xf1, 0xf3, 0xb6, 0x65, 0x7c, 0xbb, 0x6b, 0xad, 0xdc, 0xdc, 0xb5, 0x56, 0x7e, 0xdc, - 0xb5, 0x56, 0x3e, 0x3f, 0x09, 0x23, 0x71, 0x91, 0xf5, 0x3d, 0x9f, 0xc5, 0xf2, 0xb3, 0x62, 0x69, - 0xa7, 0xfa, 0xbc, 0xae, 0xd5, 0xf7, 0x25, 0x46, 0x57, 0x34, 0xed, 0xaf, 0xab, 0x5f, 0xeb, 0xf9, - 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0xae, 0x65, 0x40, 0x29, 0x05, 0x00, 0x00, -} - -func (m *OverrideAccount) 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 *OverrideAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OverrideAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StateDiff) > 0 { - for k := range m.StateDiff { - v := m.StateDiff[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfig(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.State) > 0 { - for k := range m.State { - v := m.State[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfig(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0x1a - } - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(m.Code))) - i-- - dAtA[i] = 0x12 - } - if m.Nonce != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + // 477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x41, 0x6b, 0xdb, 0x30, + 0x14, 0xc7, 0xa3, 0x2d, 0x49, 0x13, 0x25, 0x6d, 0x8d, 0x16, 0x86, 0x28, 0xcc, 0x31, 0x1b, 0x0c, + 0x9f, 0x1c, 0xba, 0xb1, 0x53, 0x61, 0x8c, 0x74, 0xa7, 0xc0, 0x18, 0x68, 0x3b, 0xed, 0x62, 0x64, + 0xe7, 0xcd, 0xf1, 0x1a, 0x5b, 0x45, 0x56, 0x4c, 0xfb, 0x2d, 0x76, 0xde, 0x27, 0xda, 0xb1, 0xc7, + 0x9d, 0xc2, 0x48, 0x6e, 0xf9, 0x14, 0x45, 0x92, 0x13, 0x27, 0xe9, 0xcd, 0xbf, 0xf7, 0xd7, 0xdf, + 0xd2, 0xfb, 0xbf, 0x87, 0xdf, 0x80, 0x9a, 0x81, 0xcc, 0xd2, 0x5c, 0x8d, 0xa0, 0xcc, 0x46, 0xe5, + 0xe5, 0x48, 0x49, 0x1e, 0x43, 0x18, 0x8b, 0xfc, 0x67, 0x9a, 0x04, 0xb7, 0x52, 0x28, 0x41, 0x9c, + 0xdd, 0xa1, 0x00, 0xca, 0x2c, 0x28, 0x2f, 0x2f, 0x06, 0x89, 0x48, 0x84, 0x11, 0x47, 0xfa, 0xcb, + 0x9e, 0xbb, 0x78, 0xfa, 0xb3, 0x78, 0xc6, 0xd3, 0xfc, 0xe0, 0x67, 0xaf, 0xff, 0xb4, 0x70, 0xef, + 0xbb, 0xbe, 0xe3, 0xda, 0x54, 0xc9, 0x4b, 0xdc, 0x36, 0x57, 0x4a, 0x8a, 0x3c, 0xe4, 0x77, 0x59, + 0x45, 0x84, 0xe2, 0x13, 0x95, 0x66, 0x20, 0x16, 0x8a, 0x3e, 0x33, 0xc2, 0x16, 0xb5, 0x43, 0x02, + 0xdc, 0x41, 0x4c, 0x9f, 0x7b, 0xc8, 0x6f, 0xb2, 0x8a, 0xc8, 0x07, 0x7c, 0x3a, 0x4d, 0x0b, 0x1e, + 0xcd, 0x21, 0x2c, 0x14, 0x8f, 0x6f, 0x68, 0xcb, 0x43, 0x7e, 0x67, 0xec, 0x6c, 0x96, 0xc3, 0x7e, + 0x25, 0x7c, 0xd3, 0x75, 0x76, 0x40, 0xe4, 0x0a, 0x9f, 0xd7, 0x36, 0x21, 0x79, 0x02, 0xb4, 0x6d, + 0x8c, 0x64, 0xb3, 0x1c, 0x9e, 0xed, 0x8e, 0x1a, 0x85, 0x1d, 0x31, 0x19, 0xe0, 0xd6, 0x14, 0xa2, + 0x45, 0x42, 0x3b, 0xda, 0xc2, 0x2c, 0xe8, 0xea, 0x3c, 0xcd, 0x52, 0x45, 0xbb, 0x1e, 0xf2, 0x5b, + 0xcc, 0x02, 0xb9, 0xc2, 0x5d, 0x51, 0x82, 0x94, 0xe9, 0x14, 0x0a, 0x8a, 0x3d, 0xe4, 0xf7, 0xde, + 0xbd, 0x0a, 0x8e, 0xa3, 0x0d, 0xae, 0x75, 0x64, 0x36, 0x1b, 0x56, 0x9f, 0xd7, 0xcd, 0x41, 0x6e, + 0x1e, 0x99, 0x41, 0x26, 0xe4, 0x3d, 0xed, 0xd5, 0xcd, 0x59, 0xe1, 0x8b, 0xa9, 0xb3, 0x03, 0x22, + 0x63, 0x4c, 0x2a, 0x9b, 0x04, 0xb5, 0x90, 0x79, 0x38, 0xe5, 0x8a, 0xd3, 0xbe, 0xf1, 0x0e, 0x36, + 0xcb, 0xa1, 0x63, 0x55, 0x66, 0xc4, 0xcf, 0x5c, 0x71, 0xf6, 0xa4, 0x42, 0x3e, 0x62, 0x62, 0x67, + 0x12, 0xfe, 0x2a, 0xc4, 0x76, 0x9a, 0xf4, 0x54, 0x0f, 0xc5, 0xde, 0x6f, 0xd5, 0xea, 0xcd, 0x8e, + 0xa5, 0x49, 0x21, 0xaa, 0x2e, 0x74, 0xc0, 0x85, 0xe2, 0x0a, 0xc2, 0xba, 0xfb, 0x33, 0x0f, 0xf9, + 0x7d, 0x1b, 0xb0, 0x91, 0xbe, 0x6e, 0x15, 0x76, 0xc4, 0xda, 0x1c, 0xcd, 0x45, 0x7c, 0xb3, 0x67, + 0x3e, 0xaf, 0xcd, 0x46, 0xda, 0x33, 0x1f, 0xf2, 0xa4, 0xd9, 0x69, 0x3a, 0xad, 0x49, 0xb3, 0x73, + 0xe2, 0x74, 0x76, 0x93, 0xab, 0xf2, 0x63, 0x2f, 0xb6, 0xbc, 0x17, 0xcc, 0xf8, 0xd3, 0xdf, 0x95, + 0x8b, 0x1e, 0x56, 0x2e, 0xfa, 0xbf, 0x72, 0xd1, 0xef, 0xb5, 0xdb, 0x78, 0x58, 0xbb, 0x8d, 0x7f, + 0x6b, 0xb7, 0xf1, 0xe3, 0x6d, 0x92, 0xaa, 0xd9, 0x22, 0x0a, 0x62, 0x91, 0xe9, 0xe5, 0x16, 0xc5, + 0xa8, 0x5e, 0xf6, 0x3b, 0xb3, 0xee, 0xea, 0xfe, 0x16, 0x8a, 0xa8, 0x6d, 0xb6, 0xfc, 0xfd, 0x63, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xb8, 0x15, 0x05, 0x59, 0x03, 0x00, 0x00, } func (m *TraceConfig) Marshal() (dAtA []byte, err error) { @@ -403,31 +240,19 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.BlockOverrides) > 0 { + i -= len(m.BlockOverrides) + copy(dAtA[i:], m.BlockOverrides) + i = encodeVarintTraceConfig(dAtA, i, uint64(len(m.BlockOverrides))) + i-- + dAtA[i] = 0x7a + } if len(m.StateOverrides) > 0 { - for k := range m.StateOverrides { - v := m.StateOverrides[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTraceConfig(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTraceConfig(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x72 - } + i -= len(m.StateOverrides) + copy(dAtA[i:], m.StateOverrides) + i = encodeVarintTraceConfig(dAtA, i, uint64(len(m.StateOverrides))) + i-- + dAtA[i] = 0x72 } if len(m.TracerJsonConfig) > 0 { i -= len(m.TracerJsonConfig) @@ -536,42 +361,6 @@ func encodeVarintTraceConfig(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *OverrideAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nonce != 0 { - n += 1 + sovTraceConfig(uint64(m.Nonce)) - } - l = len(m.Code) - if l > 0 { - n += 1 + l + sovTraceConfig(uint64(l)) - } - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovTraceConfig(uint64(l)) - } - if len(m.State) > 0 { - for k, v := range m.State { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTraceConfig(uint64(len(k))) + 1 + len(v) + sovTraceConfig(uint64(len(v))) - n += mapEntrySize + 1 + sovTraceConfig(uint64(mapEntrySize)) - } - } - if len(m.StateDiff) > 0 { - for k, v := range m.StateDiff { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTraceConfig(uint64(len(k))) + 1 + len(v) + sovTraceConfig(uint64(len(v))) - n += mapEntrySize + 1 + sovTraceConfig(uint64(mapEntrySize)) - } - } - return n -} - func (m *TraceConfig) Size() (n int) { if m == nil { return 0 @@ -615,18 +404,13 @@ func (m *TraceConfig) Size() (n int) { if l > 0 { n += 1 + l + sovTraceConfig(uint64(l)) } - if len(m.StateOverrides) > 0 { - for k, v := range m.StateOverrides { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTraceConfig(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTraceConfig(uint64(len(k))) + l - n += mapEntrySize + 1 + sovTraceConfig(uint64(mapEntrySize)) - } + l = len(m.StateOverrides) + if l > 0 { + n += 1 + l + sovTraceConfig(uint64(l)) + } + l = len(m.BlockOverrides) + if l > 0 { + n += 1 + l + sovTraceConfig(uint64(l)) } return n } @@ -637,393 +421,6 @@ func sovTraceConfig(x uint64) (n int) { func sozTraceConfig(x uint64) (n int) { return sovTraceConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *OverrideAccount) 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 ErrIntOverflowTraceConfig - } - 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: OverrideAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OverrideAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - 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 ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - 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 ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTraceConfig - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTraceConfig - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.State[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateDiff == nil { - m.StateDiff = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTraceConfig - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTraceConfig - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StateDiff[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *TraceConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1327,7 +724,7 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StateOverrides", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTraceConfig @@ -1337,120 +734,59 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTraceConfig } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTraceConfig } if postIndex > l { return io.ErrUnexpectedEOF } + m.StateOverrides = append(m.StateOverrides[:0], dAtA[iNdEx:postIndex]...) if m.StateOverrides == nil { - m.StateOverrides = make(map[string]*OverrideAccount) + m.StateOverrides = []byte{} } - var mapkey string - var mapvalue *OverrideAccount - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockOverrides", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTraceConfig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTraceConfig - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTraceConfig - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &OverrideAccount{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.StateOverrides[mapkey] = mapvalue + if byteLen < 0 { + return ErrInvalidLengthTraceConfig + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTraceConfig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockOverrides = append(m.BlockOverrides[:0], dAtA[iNdEx:postIndex]...) + if m.BlockOverrides == nil { + m.BlockOverrides = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex