Skip to main content

helps you preserve an ethereum dataset

Project description

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.

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}

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

cryogen-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

cryogen-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file cryogen-0.1.1.tar.gz.

File metadata

  • Download URL: cryogen-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for cryogen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca1b9f1039d11c60effc844ab9bfce9efa01a9f518e06fb6c5201ec81c736642
MD5 0ede02b447798c84d20de5243f6dd997
BLAKE2b-256 0cea829c69d850be79acdfa51c7915a37c3c861e94ea9f5cf320717e804b2fa2

See more details on using hashes here.

File details

Details for the file cryogen-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cryogen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for cryogen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d3096b669c7472638f3a816934c5d0622ac96e145598da236fc8d273a951927
MD5 687f7333e8214344daaa39af17102279
BLAKE2b-256 12120cc9a0efb84267f3eae311a743a43f4053fab176ec3d32557c991abff505

See more details on using hashes here.

Supported by

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