improved

[2022/11/28] Updates on Ethereum data

Hey team, ZettaBlock is launching new changes to improve the decoding rate from 80% to 96% for Ethereum logs

TL;DR

Schema updates

  • By 2022/11/30, the raw and decoded Ethereum tables will be merged. The tables affected are:
    • ethereum_mainnet.logs
    • ethereum_mainnet.traces
    • ethereum_mainnet.transactions
  • By 2022/12/02, the decoded Ethereum tables will no longer be supported.
    • ethereum_mainnet.decoded_logs
    • ethereum_mainnet.decoded_traces
    • ethereum_mainnet.decoded_transactions

Improvement effects

  • The decoding rate of raw Ethereum logs will be improved from 80% to 96%
  • Support decoding logs, transactions, and traces without contract ABI

Details

Dear ZettaBlock users,

Based on the feedback we have received , we are launching a set of changes to our Ethereum data both in structure and data richness. We believe that these changes will keep our table structure comprehensive and straightforward, as well as make the process of querying our data easier. Please make adjustments to your queries, dashboards, and user APIs accordingly to avoid interruption.

In the effort to reduce data redundancy and usage friction, we are merging the tables for raw and decoded Ethereum data under database ethereum_mainnet. After the changes, data previously scattered in 6 tables will be hosted by the 3 tables as shown below.

Before the changeAfter the change
logs, decoded_logslogs
traces, decoded_tracestraces
transactions, decoded_transactionstransactions

By 2022/11/30, we will horizontally expand table logs, traces, and transactions to include columns from the respective decoded tables. For detailed schema changes, please check out the Appendix.

By 2022/12/02, we will sunset the old decoded tables.

  • ethereum_mainnet.decoded_logs
  • ethereum_mainnet.decoded_traces
  • ethereum_mainnet.decoded_transactions

With a new decoding system, we will bring a significant improvement to the decoding rate of Ethereum data. Based on the internal calculation, the decoding rate of raw logs will be improved to 96% compared to the previous 80%.

  • Previously, only data for smart contracts either verified on EtherScan or having complete ABI was decoded. After the schema changes, rows decoded by complete contract ABI will be indicated by having column decoded_from_abi as true.
  • With the new decoding system, we decode logs, transactions, and traces based on the Keccak hash (SHA3) of the function or event if the complete contract ABI is unavailable. For rows decoded by this approach, the value of column decoded_from_abi is false.

Appendix

ethereum_mainnet.logs

Before the changeAfter the change
transaction_hash: stringtransaction_hash: string
transaction_index: biginttransaction_index: bigint
block_number: bigintblock_number: bigint
block_hash: stringblock_hash: string
removed: booleanremoved: boolean
log_index: bigintlog_index: bigint
data: stringdata: string
topics: arraytopics: array
contract_address: stringcontract_address: string
anonymous: booleananonymous: boolean
event: string
event_signature: string
argument_names: array
argument_types: array
argument_values: array
block_time: timestampblock_time: timestamp
text_signature: string
decoded_from_abi: boolean
process_time: timestampprocess_time: timestamp
data_creation_date: datedata_creation_date: date

ethereum_mainnet.traces

Before the changeAfter the change
transaction_hash: stringtransaction_hash: string
transaction_index: biginttransaction_index: bigint
type: stringtype: string
block_number: bigintblock_number: bigint
block_hash: stringblock_hash: string
block_time: timestampblock_time: timestamp
from_address: stringfrom_address: string
to_address: stringto_address: string
value: decimal(27, 0)value: decimal(27, 0)
input: stringinput: string
output: stringoutput: string
trace_type: stringtrace_type: string
call_type: stringcall_type: string
reward_type: stringreward_type: string
gas: decimal(21, 0)gas: decimal(21, 0)
gas_used: bigintgas_used: bigint
subtraces: bigintsubtraces: bigint
trace_address: arraytrace_address: array
error: stringerror: string
status: bigintstatus: bigint
transaction_status: biginttransaction_status: bigint
func_name: string
func_signature: string
argument_names: array
argument_types: array
argument_values: array
output_parameters: string
output_names: array
output_types: array
output_values: array
trace_id: stringtrace_id: string
trace_index: biginttrace_index: bigint
text_signature: string
decoded_from_abi: boolean
process_time: timestampprocess_time: timestamp
data_creation_date: datedata_creation_date: date

ethereum_mainnet.transactions

Before the changeAfter the change
hash: stringhash: string
nonce: bigintnonce: bigint
block_hash: stringblock_hash: string
block_number: bigintblock_number: bigint
transaction_index: biginttransaction_index: bigint
from_address: stringfrom_address: string
to_address: stringto_address: string
value: decimal(27, 0)value: decimal(27, 0)
type: stringtype: string
gas_price: decimal(21, 0)gas_price: decimal(21, 0)
input: stringinput: string
v: stringv: string
s: strings: string
r: stringr: string
max_fee_per_gas: decimal(21, 0)max_fee_per_gas: decimal(21, 0)
max_priority_fee_per_gas: decimal(21, 0)max_priority_fee_per_gas: decimal(21, 0)
chain_id: stringchain_id: string
access_list: arrayaccess_list: array
gas_limit: bigintgas_limit: bigint
func_name: string
func_signature: string
argument_names: array
argument_types: array
argument_values: array
block_time: timestampblock_time: timestamp
status: bigintstatus: bigint
gas_used: bigintgas_used: bigint
cumulative_gas_used: bigintcumulative_gas_used: bigint
effective_gas_price: decimal(21, 0)effective_gas_price: decimal(21, 0)
text_signature: string
decoded_from_abi: boolean
process_time: timestampprocess_time: timestamp
data_creation_date: datedata_creation_date: date