added tests for geth traces exporter, refactored a bit

This commit is contained in:
Evgeniy Filatov
2018-10-30 10:05:11 +02:00
parent ae246fec43
commit f4666947f2
21 changed files with 250 additions and 36 deletions

View File

@@ -20,7 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
class EthGethTrace(object):
def __init__(self):
self.block_number = None
self.traces = None
self.transaction_traces = None

View File

@@ -26,7 +26,7 @@ from ethereumetl.executors.batch_work_executor import BatchWorkExecutor
from ethereumetl.json_rpc_requests import generate_trace_block_by_number_json_rpc
from ethereumetl.jobs.base_job import BaseJob
from ethereumetl.mappers.geth_trace_mapper import EthGethTraceMapper
from ethereumetl.utils import validate_range, rpc_response_batch_to_results
from ethereumetl.utils import validate_range, rpc_response_to_result
# Exports geth traces
@@ -61,17 +61,18 @@ class ExportGethTracesJob(BaseJob):
)
def _export_batch(self, block_number_batch):
blocks_rpc = list(generate_trace_block_by_number_json_rpc(block_number_batch))
response = self.batch_web3_provider.make_request(json.dumps(blocks_rpc))
results = rpc_response_batch_to_results(response)
trace_block_rpc = list(generate_trace_block_by_number_json_rpc(block_number_batch))
response = self.batch_web3_provider.make_request(json.dumps(trace_block_rpc))
# adding block_numbers here, as RPC response doesn't have them
geth_traces = [self.geth_trace_mapper.json_dict_to_geth_trace({
'block_number': block_number,
'traces': traces,
}) for block_number, traces in zip(block_number_batch, results)]
for response_item in response:
block_number = response_item.get('id', None)
result = rpc_response_to_result(response_item)
geth_trace = self.geth_trace_mapper.json_dict_to_geth_trace({
'block_number': block_number,
'transaction_traces': [tx_trace.get('result', None) for tx_trace in result],
})
for geth_trace in geth_traces:
self.item_exporter.export_item(self.geth_trace_mapper.geth_trace_to_dict(geth_trace))
def _end(self):

View File

@@ -25,7 +25,7 @@ from ethereumetl.jobs.exporters.composite_item_exporter import CompositeItemExpo
FIELDS_TO_EXPORT = [
'block_number',
'traces',
'transaction_traces',
]

View File

@@ -53,7 +53,7 @@ class ExtractGethTracesJob(BaseJob):
traces = self.trace_mapper.geth_trace_to_traces(geth_trace)
for trace in traces:
self.item_exporter.export_item(self.trace_mapper.trace_to_dict(trace))
def _end(self):
self.batch_work_executor.shutdown()
self.item_exporter.close()

View File

@@ -31,11 +31,12 @@ def generate_get_block_by_number_json_rpc(block_numbers, include_transactions):
def generate_trace_block_by_number_json_rpc(block_numbers):
for idx, block_number in enumerate(block_numbers):
for block_number in block_numbers:
yield generate_json_rpc(
method='debug_traceBlockByNumber',
params=[hex(block_number), {'tracer': 'callTracer'}],
request_id=idx
# save block_number in request ID, so later we can identify block number in response
request_id=block_number,
)

View File

@@ -29,7 +29,7 @@ class EthGethTraceMapper(object):
geth_trace = EthGethTrace()
geth_trace.block_number = json_dict.get('block_number', None)
geth_trace.traces = json_dict.get('traces', None)
geth_trace.transaction_traces = json_dict.get('transaction_traces', None)
return geth_trace
@@ -37,5 +37,5 @@ class EthGethTraceMapper(object):
return {
'type': 'geth_trace',
'block_number': geth_trace.block_number,
'traces': geth_trace.traces,
'transaction_traces': geth_trace.transaction_traces,
}

View File

@@ -79,7 +79,7 @@ class EthTraceMapper(object):
def geth_trace_to_traces(self, geth_trace):
block_number = geth_trace.block_number
transaction_traces = geth_trace.traces
transaction_traces = geth_trace.transaction_traces
traces = []
@@ -87,7 +87,7 @@ class EthTraceMapper(object):
traces.extend(self._iterate_transaction_trace(
block_number,
tx_index,
tx_trace.get('result')
tx_trace,
))
return traces
@@ -96,32 +96,38 @@ class EthTraceMapper(object):
trace = EthTrace()
trace.block_number = block_number
trace.transaction_hash = tx_index
trace.transaction_hash = tx_index # TODO: save index in separate field
trace.from_address = to_normalized_address(tx_trace.get('from', None))
trace.to_address = to_normalized_address(tx_trace.get('to', None))
trace.value = hex_to_dec(tx_trace.get('value', None))
trace.input = tx_trace.get('input', None)
trace.output = tx_trace.get('output', None)
trace.value = hex_to_dec(tx_trace.get('value', None))
trace.gas = hex_to_dec(tx_trace.get('gas', None))
trace.gas_used = hex_to_dec(tx_trace.get('gasUsed', None))
trace.subtraces = len(tx_trace.get('calls', []))
trace.trace_type = tx_trace.get('type', None).lower() # TODO: map
# TODO: normal error handling
trace.error = tx_trace.get('error', None)
# lowercase for compatibility with parity traces
trace.trace_type = tx_trace.get('type', None).lower()
if trace.trace_type == 'selfdestruct':
# rename to suicide for compatibility with parity traces
trace.trace_type = 'suicide'
if trace.trace_type == 'create':
elif trace.trace_type == 'create':
# move created contract address from `to_address` to `contract_address`
trace.to_address = to_normalized_address(0)
trace.contract_address = tx_trace.get('to', None)
# TODO: fix in parity traces
trace.output = ''
trace.trace_address = trace_address
trace.contract_address = to_normalized_address(tx_trace.get('to', None))
result = [trace]
calls = tx_trace.get('calls', [])
trace.subtraces = len(calls)
trace.trace_address = trace_address
for call_index, call_trace in enumerate(calls):
result.extend(self._iterate_transaction_trace(
block_number,

View File

@@ -43,6 +43,9 @@ class MockBatchWeb3Provider(object):
elif req['method'] == 'eth_getTransactionReceipt':
transaction_hash = req['params'][0]
file_name = 'web3_response.receipt.' + str(transaction_hash) + '.json'
elif req['method'] == 'debug_traceBlockByNumber':
block_number = req['params'][0]
file_name = 'web3_response.block_trace.' + str(block_number) + '.json'
else:
raise ValueError('Request method {} is unexpected'.format(req['method']))
file_content = self.read_resource(file_name)

View File

@@ -0,0 +1,64 @@
# MIT License
#
# Copyright (c) 2018 Evgeniy Filatov, evgeniyfilatov@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import pytest
from web3 import Web3
import tests.resources
from ethereumetl.jobs.export_geth_traces_job import ExportGethTracesJob
from ethereumetl.jobs.exporters.geth_traces_item_exporter import geth_traces_item_exporter
from ethereumetl.thread_local_proxy import ThreadLocalProxy
from tests.ethereumetl.job.helpers import get_web3_provider
from tests.helpers import compare_lines_ignore_order, read_file
# use same resources for testing export/extract jobs
RESOURCE_GROUP = 'test_extract_geth_traces_job'
def read_resource(resource_group, file_name):
return tests.resources.read_resource([RESOURCE_GROUP, resource_group], file_name)
@pytest.mark.parametrize("start_block,end_block,resource_group,web3_provider_type", [
(1, 1, 'block_without_transactions', 'mock'),
(1000690, 1000690, 'block_with_create', 'mock'),
(1011973, 1011973, 'block_with_suicide', 'mock'),
(1000000, 1000000, 'block_with_subtraces', 'mock'),
(1000895, 1000895, 'block_with_error', 'mock'),
])
def test_export_geth_traces_job(tmpdir, start_block, end_block, resource_group, web3_provider_type):
traces_output_file = tmpdir.join('actual_geth_traces.json')
job = ExportGethTracesJob(
start_block=start_block, end_block=end_block, batch_size=1,
batch_web3_provider=ThreadLocalProxy(
lambda: get_web3_provider(web3_provider_type, lambda file: read_resource(resource_group, file), batch=True)
),
max_workers=5,
item_exporter=geth_traces_item_exporter(traces_output_file),
)
job.run()
compare_lines_ignore_order(
read_resource(resource_group, 'geth_traces.json'), read_file(traces_output_file)
)

View File

@@ -21,7 +21,6 @@
# SOFTWARE.
import json
import io
import pytest
@@ -32,9 +31,11 @@ from tests.helpers import compare_lines_ignore_order, read_file
RESOURCE_GROUP = 'test_extract_geth_traces_job'
def read_resource(resource_group, file_name):
return tests.resources.read_resource([RESOURCE_GROUP, resource_group], file_name)
@pytest.mark.parametrize('resource_group', [
'block_without_transactions',
'block_with_create',

View File

@@ -1,3 +1,3 @@
block_number,transaction_hash,from_address,to_address,value,contract_address,input,output,trace_type,gas,gas_used,subtraces,trace_address,error
1000690,0,0xaf21e07e5a929d16026a7b4d88f3906a8d2e4942,0x5b3c526b152b1f3d8eabe2ec27f49b904ad51cad,64655529900000002048,,0x,0x,call,0,0,0,,
1000690,1,0xacdee28d8ca76187883831a37f551a5904cdf191,0,0,0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1,0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191,,create,954720,160631,0,,
1000690,1,0xacdee28d8ca76187883831a37f551a5904cdf191,0,0,0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1,0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191,0x3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3,create,954720,160631,0,,
1 block_number transaction_hash from_address to_address value contract_address input output trace_type gas gas_used subtraces trace_address error
2 1000690 0 0xaf21e07e5a929d16026a7b4d88f3906a8d2e4942 0x5b3c526b152b1f3d8eabe2ec27f49b904ad51cad 64655529900000002048 0x 0x call 0 0 0
3 1000690 1 0xacdee28d8ca76187883831a37f551a5904cdf191 0 0 0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1 0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191 0x3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3 create 954720 160631 0

View File

@@ -1 +1 @@
{"block_number": 1000690, "traces": [{"result": {"type": "CALL", "from": "0xaf21e07e5a929d16026a7b4d88f3906a8d2e4942", "to": "0x5b3c526b152b1f3d8eabe2ec27f49b904ad51cad", "value": "0x3814695e26625c000", "gas": "0x0", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "5.168\u00b5s"}}, {"result": {"type": "CREATE", "from": "0xacdee28d8ca76187883831a37f551a5904cdf191", "to": "0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1", "value": "0x0", "gas": "0xe9160", "gasUsed": "0x27377", "input": "0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191", "output": "0x3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3", "time": "1.88608ms"}}]}
{"block_number": 1000690, "transaction_traces": [{"from": "0xaf21e07e5a929d16026a7b4d88f3906a8d2e4942", "gas": "0x0", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "5.168\u00b5s", "to": "0x5b3c526b152b1f3d8eabe2ec27f49b904ad51cad", "type": "CALL", "value": "0x3814695e26625c000"}, {"from": "0xacdee28d8ca76187883831a37f551a5904cdf191", "gas": "0xe9160", "gasUsed": "0x27377", "input": "0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191", "output": "0x3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3", "time": "1.88608ms", "to": "0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1", "type": "CREATE", "value": "0x0"}]}

View File

@@ -0,0 +1,32 @@
{
"jsonrpc": "2.0",
"result": [
{
"result": {
"from": "0xaf21e07e5a929d16026a7b4d88f3906a8d2e4942",
"gas": "0x0",
"gasUsed": "0x0",
"input": "0x",
"output": "0x",
"time": "5.168µs",
"to": "0x5b3c526b152b1f3d8eabe2ec27f49b904ad51cad",
"type": "CALL",
"value": "0x3814695e26625c000"
}
},
{
"result": {
"from": "0xacdee28d8ca76187883831a37f551a5904cdf191",
"gas": "0xe9160",
"gasUsed": "0x27377",
"input": "0x606060405260026101086000505560405161015638038061015683398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b61010755505050506031806101256000396000f3003660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000acdee28d8ca76187883831a37f551a5904cdf191",
"output": "0x3660008037602060003660003473273930d21e01ee25e4c219b63259d214872220a261235a5a03f21560015760206000f3",
"time": "1.88608ms",
"to": "0xa7e3cf952ea8d9438a26ee346c295f1ada328ae1",
"type": "CREATE",
"value": "0x0"
}
}
],
"id": 1000690
}

View File

@@ -1 +1 @@
{"block_number": 1000895, "traces": [{"result": {"type": "CALL", "from": "0xad9253df75b066c67aff5cdd9d6d2b9245444726", "to": "0x627da06356442122f08e2203c749978151e55800", "value": "0xde0b6b3a7640000", "gas": "0x0", "gasUsed": "0x0", "input": "0x", "error": "out of gas", "time": "46.051\u00b5s"}}, {"result": {"type": "CALL", "from": "0x9288fe5be3be048b5c7a68bfd4b9a0746b7e4a00", "to": "0xe05ff93a9978bbb48356accc74088f3841fc5d72", "value": "0xf43fc2c04ee0000", "gas": "0x186a0", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "4.057\u00b5s"}}]}
{"block_number": 1000895, "transaction_traces": [{"error": "out of gas", "from": "0xad9253df75b066c67aff5cdd9d6d2b9245444726", "gas": "0x0", "gasUsed": "0x0", "input": "0x", "time": "161.886\u00b5s", "to": "0x627da06356442122f08e2203c749978151e55800", "type": "CALL", "value": "0xde0b6b3a7640000"}, {"from": "0x9288fe5be3be048b5c7a68bfd4b9a0746b7e4a00", "gas": "0x186a0", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "14.036\u00b5s", "to": "0xe05ff93a9978bbb48356accc74088f3841fc5d72", "type": "CALL", "value": "0xf43fc2c04ee0000"}]}

View File

@@ -0,0 +1,32 @@
{
"jsonrpc": "2.0",
"result": [
{
"result": {
"error": "out of gas",
"from": "0xad9253df75b066c67aff5cdd9d6d2b9245444726",
"gas": "0x0",
"gasUsed": "0x0",
"input": "0x",
"time": "161.886µs",
"to": "0x627da06356442122f08e2203c749978151e55800",
"type": "CALL",
"value": "0xde0b6b3a7640000"
}
},
{
"result": {
"from": "0x9288fe5be3be048b5c7a68bfd4b9a0746b7e4a00",
"gas": "0x186a0",
"gasUsed": "0x0",
"input": "0x",
"output": "0x",
"time": "14.036µs",
"to": "0xe05ff93a9978bbb48356accc74088f3841fc5d72",
"type": "CALL",
"value": "0xf43fc2c04ee0000"
}
}
],
"id": 1000895
}

View File

@@ -1 +1 @@
{"block_number": 1000000, "traces": [{"result": {"type": "CALL", "from": "0x39fa8c5f2793459d6622857e7d9fbb4bd91766d3", "to": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47", "value": "0x56bc75e2d63100000", "gas": "0x1a6d4", "gasUsed": "0x2034", "input": "0x", "output": "0x0000000000000000000000000000000000000000000000000000000000000000", "time": "1.568749ms", "calls": [{"type": "CALLCODE", "from": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47", "to": "0x273930d21e01ee25e4c219b63259d214872220a2", "value": "0x56bc75e2d63100000", "gas": "0x18c56", "gasUsed": "0x5a4", "input": "0x", "output": "0x0000000000000000000000000000000000000000000000000000000000000000"}]}}, {"result": {"type": "CALL", "from": "0x32be343b94f860124dc4fee278fdcbd38c102d88", "to": "0xdf190dc7190dfba737d7777a163445b7fff16133", "value": "0x6113a84987be800", "gas": "0x7148", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "6.567\u00b5s"}}]}
{"block_number": 1000000, "transaction_traces": [{"calls": [{"from": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47", "gas": "0x18c56", "gasUsed": "0x5a4", "input": "0x", "output": "0x0000000000000000000000000000000000000000000000000000000000000000", "to": "0x273930d21e01ee25e4c219b63259d214872220a2", "type": "CALLCODE", "value": "0x56bc75e2d63100000"}], "from": "0x39fa8c5f2793459d6622857e7d9fbb4bd91766d3", "gas": "0x1a6d4", "gasUsed": "0x2034", "input": "0x", "output": "0x0000000000000000000000000000000000000000000000000000000000000000", "time": "143.598257ms", "to": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47", "type": "CALL", "value": "0x56bc75e2d63100000"}, {"from": "0x32be343b94f860124dc4fee278fdcbd38c102d88", "gas": "0x7148", "gasUsed": "0x0", "input": "0x", "output": "0x", "time": "41.846\u00b5s", "to": "0xdf190dc7190dfba737d7777a163445b7fff16133", "type": "CALL", "value": "0x6113a84987be800"}]}

View File

@@ -0,0 +1,44 @@
{
"jsonrpc": "2.0",
"result": [
{
"result": {
"calls": [
{
"from": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47",
"gas": "0x18c56",
"gasUsed": "0x5a4",
"input": "0x",
"output": "0x0000000000000000000000000000000000000000000000000000000000000000",
"to": "0x273930d21e01ee25e4c219b63259d214872220a2",
"type": "CALLCODE",
"value": "0x56bc75e2d63100000"
}
],
"from": "0x39fa8c5f2793459d6622857e7d9fbb4bd91766d3",
"gas": "0x1a6d4",
"gasUsed": "0x2034",
"input": "0x",
"output": "0x0000000000000000000000000000000000000000000000000000000000000000",
"time": "143.598257ms",
"to": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47",
"type": "CALL",
"value": "0x56bc75e2d63100000"
}
},
{
"result": {
"from": "0x32be343b94f860124dc4fee278fdcbd38c102d88",
"gas": "0x7148",
"gasUsed": "0x0",
"input": "0x",
"output": "0x",
"time": "41.846µs",
"to": "0xdf190dc7190dfba737d7777a163445b7fff16133",
"type": "CALL",
"value": "0x6113a84987be800"
}
}
],
"id": 1000000
}

View File

@@ -1 +1 @@
{"block_number": 1011973, "traces": [{"result": {"type": "CALL", "from": "0x83973747eec131bf9a08ac64fb1a518e891bdf4b", "to": "0x474faa5018639791952fae334e2911700ac7fe9b", "value": "0x0", "gas": "0x10c78", "gasUsed": "0xe8", "input": "0x41c0e1b5", "output": "0x", "time": "1.088838ms", "calls": [{"type": "SELFDESTRUCT"}]}}]}
{"block_number": 1011973, "transaction_traces": [{"calls": [{"type": "SELFDESTRUCT"}], "from": "0x83973747eec131bf9a08ac64fb1a518e891bdf4b", "gas": "0x10c78", "gasUsed": "0xe8", "input": "0x41c0e1b5", "output": "0x", "time": "578.495\u00b5s", "to": "0x474faa5018639791952fae334e2911700ac7fe9b", "type": "CALL", "value": "0x0"}]}

View File

@@ -0,0 +1,24 @@
{
"jsonrpc": "2.0",
"result": [
{
"result": {
"calls": [
{
"type": "SELFDESTRUCT"
}
],
"from": "0x83973747eec131bf9a08ac64fb1a518e891bdf4b",
"gas": "0x10c78",
"gasUsed": "0xe8",
"input": "0x41c0e1b5",
"output": "0x",
"time": "578.495µs",
"to": "0x474faa5018639791952fae334e2911700ac7fe9b",
"type": "CALL",
"value": "0x0"
}
}
],
"id": 1011973
}

View File

@@ -1 +1 @@
{"block_number": 1, "traces": []}
{"block_number": 1, "transaction_traces": []}

View File

@@ -0,0 +1,5 @@
{
"jsonrpc": "2.0",
"result": [],
"id": 1
}