Skip to main content

Fast EVM log decoding library

Project description

evm-log-father

Fast EVM log decoding library with Python bindings.

Performance

Benchmark Results

400-500k logs/second with parallel decoding on large parquet files.

Features

  • Decode Ethereum event logs using alloy's dynamic ABI
  • Read logs from parquet files (multiple schema formats supported)
  • Parallel decoding with rayon
  • Python bindings via PyO3
  • CLI for quick testing

Installation

Python (from PyPI)

pip install evm-log-father

Python (from source)

pip install maturin
maturin develop --features python

Rust

[dependencies]
evm-log-father = "0.1"

Usage

Python

from evm_log_father import EventSchema, decode_parquet

# Create schema from event signature
schema = EventSchema("Transfer(address indexed from, address indexed to, uint256 value)")

# Decode logs from parquet file
logs = decode_parquet("transfers.parquet", schema, parallel=True)

for log in logs:
    print(f"Block {log['block_number']}: {log['params']['from']} -> {log['params']['to']}")

Rust

use evm_log_father::{EventSchema, decode_parquet_parallel};

let schema = EventSchema::new("Transfer(address indexed from, address indexed to, uint256 value)")?;
let logs = decode_parquet_parallel("transfers.parquet", &schema)?;

for log in logs {
    println!("Block {}: {:?}", log.block_number, log.params);
}

CLI

# Decode logs and output JSON
evm-log-father decode \
  --parquet transfers.parquet \
  --event "Transfer(address indexed from, address indexed to, uint256 value)" \
  --output decoded.json \
  --parallel \
  --timing

# Show event info
evm-log-father info --event "Transfer(address indexed from, address indexed to, uint256 value)"

Parquet Schema Support

Flexible schema support for various parquet formats:

Column Names

Both snake_case and camelCase supported:

  • block_number / blockNumber
  • transaction_hash / transactionHash / tx_hash
  • log_index / logIndex
  • contract / address

Topics Format

  • Individual columns: topic0, topic1, topic2, topic3
  • List column: topics (Spark format)

Data Types

  • block_number: u64 or i64
  • log_index: u32, u64, or i64
  • data: binary or hex string

Benchmarking

python examples/benchmark.py transfers.parquet

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evm_log_father-0.1.0.tar.gz (87.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

evm_log_father-0.1.0-cp312-cp312-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.12Windows x86-64

evm_log_father-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

evm_log_father-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

evm_log_father-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file evm_log_father-0.1.0.tar.gz.

File metadata

  • Download URL: evm_log_father-0.1.0.tar.gz
  • Upload date:
  • Size: 87.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for evm_log_father-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a316bde9a51ad538a2bcc8f7ad592322662f66b5a0062be40a483b8a765b46c1
MD5 94e8c2feea8dfc6110ff8f6014544812
BLAKE2b-256 5ecc1cc3837f1f9e63a71551f437a7bc0b09fa0ad73dcd14754a41e8d85f9d1e

See more details on using hashes here.

File details

Details for the file evm_log_father-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for evm_log_father-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 acc1435928bfaab27be1d97a500c8f655e2af69f49ff1ca6b34311f925fa2eb4
MD5 db96b950286852dacfc48e21a91adc96
BLAKE2b-256 4c9be4c2e6c31552cd6571772b15b8186afac96ea2d34d0acbf769002a6b4b31

See more details on using hashes here.

File details

Details for the file evm_log_father-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for evm_log_father-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4adf2aa48b3be05a0dfe82a23d8f9c7b2fa5d64b06b65dc75a85d22a01a30037
MD5 151eaac19210bf44cbb97eb9fc5c404e
BLAKE2b-256 70b51f53f4aa14c35a6b39fe6eeff7c9871410277c8437dee2a2598c9cd5d644

See more details on using hashes here.

File details

Details for the file evm_log_father-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for evm_log_father-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 445440afd0ba3c92ef72454215d2b1b2b9c823823ffe70aee54b6502b4f7cee3
MD5 3b2d9ff034bea20c746512ca8b1eef2c
BLAKE2b-256 dff793766fdca294480d8d15fb2173294dae5297da9a45cc47a01620d64593ee

See more details on using hashes here.

File details

Details for the file evm_log_father-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for evm_log_father-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dc13bee459f42af41b1373240a8edb83c4bfebedcc5925508b92b629aa56e674
MD5 249816330da3456074a0bf24cf1cc296
BLAKE2b-256 5bb514b247da7234908d59591c5789f19c9dfdad870814c4d5af2358f54f993d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page