Skip to main content

cryogen

helps you preserve the ethereum dataset fresh, fast and small

install

pip install cryogen

features

intelligently consolidates cryo-extracted datasets, cutting the number of chunks by 400-1000x.

offers fast in-place conversion that reduces disk footprint by 2x and increases query performance.

keeps the dataset fresh so you can always come back to up-to-date data.

usage

cryogen collect <dataset>

collect or update a cryo dataset.

cryogen uses 1000 block batches with zstd -3 compression. the gaps are filled automatically. the dataset can be up to 1000 blocks behind head beacuse the align option is used.

# you can also specify data_dir using CRYO_DATA_DIR env var
cryogen collect contracts --data-dir ~/cryo_data

# collect a block range, same format as cryo
cryogen collect traces --blocks 17000000:

cryogen consolidate <dataset>

consolidate a dataset in-place.

this command will merge parquets into larger files covering 1e4, 1e5, 1e6 blocks. smaller files are not touched until a larger contiguous block can be formed. the worst case for this algorithm is 17 + 9 + 9 + 9 = 44 files at block 17,999,000.

starting from v0.2.0 cryogen also reduces the number of row groups. it creates a row group when an uncompressed size of a batch reaches 32 mb. this row group size provides optimal performance without imposing higher memory requirements that could lead to heavy swapping.

cryogen consolidate contracts

# test the feature without overwriting the dataset
cryogen consolidate contraces --no-inplace

note that after consolidating with cryogen, you should use cryogen to update the dataset. cryo won't recognize larger chunks and would attempt to collect the already merged and deleted smaller chunks, outputting duplicate data in the dataset.

cryogen watch <dataset>

combines collect and consolidate command.

keep it running and it will update the dataset periodically.

# refresh every 4 hours
cryogen watch contracts --interval 14400

cryogen info <dataset>

collects info about a parquet dataset.

cryogen info contracts
# {'num_rows': 62466632, 'files': 38, 'row_groups': 17984, 'total_compressed_size': 7850356027, 'total_uncompressed_size': 29236070746, 'elapsed': 0.747}

Metadata

Release files for cryogen 0.2.5

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

Source distribution (sdist)

Source distribution for cryogen 0.2.5
File Size Uploaded
cryogen-0.2.5.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cryogen 0.2.5
File Interpreter ABI Platform
cryogen-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / cryogen-0.2.5.tar.gz

Download URL cryogen-0.2.5.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0b4518634edf82735e7fe7b55e51bff3db9575400a8223010923e32a783d97b6
BLAKE2b-256 checksum
How to use checksums
ecbacd45c4b47f0145c77ab8beb39bc770e08b77eca0092234aa99d7fbb80fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / cryogen-0.2.5-py3-none-any.whl

Download URL cryogen-0.2.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
831ab99172c0df6d441bb958975c3c26b6c19a9409203d214e34798819f01341
BLAKE2b-256 checksum
How to use checksums
d40c167f89298c1e3ca0e25350bf042b06bd907616628a87fa63ba2e1e627f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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