• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Python
  • Created about 1 year ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

helps you preserve the ethereum dataset fresh, fast and small

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}

More Repositories

1

brownie-safe

gnosis safe tx builder
Python
268
star
2

multicall.py

aggregate results of multiple smart contract calls into one
Python
245
star
3

evil-jar

evil jar attack technical post-mortem
Python
137
star
4

storage-layout

readable evm state diffs, enumerate full contract storage
Python
134
star
5

seed-liquidity

Pool funds to bootstrap a Uniswap pair
Python
77
star
6

vyper-reentrancy

Vyper
63
star
7

erigon-kv

python bindings for erigon kv gprc api
Python
54
star
8

disperse-research

research behind disperse protocol
TeX
52
star
9

fast

fast.com cli speedtest
Python
49
star
10

yfi-buyer

buys yfi at current price
Python
42
star
11

ape-llamapay

ape sdk for llamapay
Python
42
star
12

lobsterdao

Lazy airdrop based on private temporary ids
Python
41
star
13

raycast-eips

look up ethereum proposals and read them in raycast
TypeScript
38
star
14

gasprice

estimate ethereum gas price
Python
34
star
15

yearn-fees

a quest for accurate fee accounting
Vyper
30
star
16

etherscan-cache

Python
30
star
17

lido-vault

Yearn Vault wrapper for Lido St. Ether
Python
27
star
18

httpie-image

HTTPie plugin to display images in iTerm2
Python
24
star
19

cornichon

Python
23
star
20

your-eminence

distribution scripts for eminence compensation
Python
22
star
21

liqui

liqui.io api wrapper
Python
21
star
22

permit-deposit

Python
19
star
23

telegram

a very minimal telegram api wrapper
Python
18
star
24

dpack

python implementation of dpack evm packaging format
Python
18
star
25

imagehashmasks

hashmask reverse lookup
Python
17
star
26

exploit-ycredit

Python
17
star
27

strategy-uni-lp-pickle

Python
17
star
28

vmtrace

evm-trace vmtrace demo and playground
Python
17
star
29

baseline-looper

loop into YES or unwind a baseline credit account
Python
16
star
30

uniswap

uniswap analytics
Python
14
star
31

gas-costs

a quick way to calculate gas costs for a bunch of accounts
Python
13
star
32

feil-proposal

governance proposal to make fei redeemable for eth
Python
13
star
33

bitcointalk

parses bitcointalk ann topics and sends them to telegram channel
Python
12
star
34

lido-keep3r

Python
12
star
35

yearn-vault-keeper

keep yearn vaults tightly invested while maintaining the withdrawal buffer
Python
12
star
36

ape-events

ape log caching plugin
Python
12
star
37

defi-apy

Python
11
star
38

brownie-ds-proxy

Python
11
star
39

yfi-pact

our pact with the devil
Python
11
star
40

blue-pill

The Blue Pill: A spiritual guide for the past, present and future of Yearn
Python
10
star
41

vyper-cwia

vyper contract that can access immutable arguments passed as calldata
Python
10
star
42

woofy-snapshot

Solidity
10
star
43

baseline-snapshot

YES token snapshot
Jupyter Notebook
10
star
44

coinlisting

cryptocurrency exchanges new coins listing
Python
9
star
45

yearn-principles

8
star
46

parasitic-vault

Python
8
star
47

staking-deposit

simple gΓΆrli mass deposit contract
Python
8
star
48

docsend

convert docsend to pdf or png sequence
Python
7
star
49

universal-router

Python
7
star
50

snek3

msgspec definitions of ethereum execution client api
Python
6
star
51

vyper-eip6909

eip-6909: minimal multi-token interface in vyper
Vyper
6
star
52

veyfi-model

Jupyter Notebook
6
star
53

itf

Python
5
star
54

uniswap-distribution

5
star
55

maker-chief

tally makerdao governance votes
Python
5
star
56

tellor

python tools for tellor
Python
5
star
57

yearn-permit

TypeScript
5
star
58

pip-blame

finds packages that prevent upgrading a transitive dependency
Python
4
star
59

spank-uni-distribution

Python
4
star
60

curvefi

Python
4
star
61

blockfolio

blockfolio cli
Python
4
star
62

docker-as-venv

an example of how to use docker for python web development
Python
3
star
63

pink-duck

Quack quack
Python
3
star
64

sign-test

test of how github displays author/committer spoofing
3
star
65

vyper-eip1967

Vyper
2
star
66

poloniex

minimal poloniex api wrapper
Python
2
star
67

vyper-traceback-bug

looking into compat issue in ape-vyper
Vyper
1
star
68

pickle-snapshot

1
star
69

stamps

Python
1
star
70

lto-bridge

three-way lto bridge monitoring
Python
1
star
71

pytho

Akropolis IOU token
Python
1
star
72

hug_raven

Sentry integration for hug
Python
1
star
73

unswerve

liquid wrapper for vote-locked swrv
Python
1
star