Skip to main content

Cherry Event Indexer

A flexible blockchain event indexing and data processing pipeline.

Overview

Cherry Event Indexer is a modular system for:

  • Ingesting blockchain events and logs
  • Processing and transforming blockchain data
  • Writing data to various storage backends

Features

  • Modular Pipeline Architecture

    • Configurable data providers
    • Customizable processing steps
    • Pluggable storage backends
  • Built-in Steps

    • EVM block validation
    • Event decoding
    • Custom processing steps
  • Storage Options

    • Local Parquet files
    • AWS S3
    • More coming soon...

Project Structure:

cherry/
├── src/
│ ├── config/ # Configuration parsing
│ ├── utils/ # Pipeline and utilities
│ └── writers/ # Storage backends
├── examples/ # Example implementations
├── tests/ # Test suite
└── config.yaml # Pipeline configuration

Prerequisites:

  • Python 3.10 or higher
  • Docker and Docker Compose
  • MinIO (for local S3-compatible storage)

Installation Steps

Clone the repository and go to the project root:

git clone https://github.com/steelcake/cherry.git
cd cherry

Create and activate a virtual environment:

# Create virtual environment (all platforms)
python -m venv .venv

# Activate virtual environment

# For Windows with git bash:
source .venv/Scripts/activate

# For macOS/Linux:
source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Set up environment variables:

Create a .env file in the project root Add your Hypersync API token:

Quick Start

  1. Create a config file (config.yaml):

  2. Run the script:

python main.py

Custom Processing Steps

To add a custom processing step, you need to:

  1. Define the step function
  2. Add the step to the context
  3. Add the step to the config

example: get_block_number_stats.py

def get_block_number_stats(data: Dict[str, pa.RecordBatch], step_config: Dict[str, Any]) -> Dict[str, pa.RecordBatch]:
    """Custom processing step for transfer events"""
    pass

config.yaml

steps:
  - name: my_get_block_number_stats
    kind: get_block_number_stats
    config:
      input_table: logs
      output_table: block_number_stats

Running the Project

Start MinIO server (for local S3 storage):

# Navigate to docker-compose directory
cd docker-compose

# Start MinIO using docker-compose
docker-compose up -d

# Return to project root
cd ..

Default credentials:

Access Key: minioadmin
Secret Key: minioadmin
Console URL: http://localhost:9001

Note: The MinIO service will be automatically configured with the correct ports and volumes as defined in the docker-compose.yml file.

Configure pipelines:

  • Open config.yaml
  • Adjust query, event filters, and batch sizes as needed for your pipeline
  • Configure writer settings (S3/local parquet etc.)

Run the indexer:

python main.py

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Metadata

Release files for cherry-indexer 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cherry-indexer 0.1.7
File Size Uploaded
cherry_indexer-0.1.7.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cherry-indexer 0.1.7
File Interpreter ABI Platform
cherry_indexer-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 36.2 kB

Release files / cherry_indexer-0.1.7.tar.gz

Download URL cherry_indexer-0.1.7.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3fd3fad6a153730742b9a700d464ae72f83b2e1da130fb8cf8f15ce89415057b
BLAKE2b-256 checksum
How to use checksums
34357d6461835edcfcde4af17a95fad24f18a8d6d0e8841e394ec8d625702dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / cherry_indexer-0.1.7-py3-none-any.whl

Download URL cherry_indexer-0.1.7-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c594df674d240425ce1bab7ce7bd84924441e5a21df65a16770175daef9e2ce
BLAKE2b-256 checksum
How to use checksums
74b4fb48ba7e0e40e4b1faca4434b7edd69049b7d501798ca61cdc3b9639644d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page