Grant Application - zaino - Stability, Performance & Testing

10 Likes

I love this format of explaining your grant hahn :heart_eyes: :student: :+1:

3 Likes

Thanks

If someone wants to try it out, I made a docker image.

Synchronizing a full mainnet blockchain (assuming you have Zebra synced up), should take you ~20 minutes (instead of ~24h).


Docker Usage

Image: hhanh00/zaino:latest

Binaries in the image: zainod, zaino-admin, zaino-check,
zaino-compare, zaino-concurrent-test, zaino-grpc-test.

Volumes

Mount point Purpose
/app/config Config directory
/app/data LMDB data directory

Config file

Minimal zainod.toml (place in the directory you mount to /app/config):

backend = 'fetch'
network = 'Mainnet'
block_store_max_concurrency = 8
start_height = 0

[grpc_settings]
listen_address = '127.0.0.1:9067'

[validator_settings]
validator_jsonrpc_listen_address = '127.0.0.1:8232'
validator_user = 'xxxxxx'
validator_password = 'xxxxxx'

[storage.database]
path = '/app/data'
size = 384

Setup

Create the data directory:

mkdir ./data

Bootstrap

Load blocks from a local Zebra RocksDB into the zaino LMDB store:

docker run --network host -v ./data:/app/data -v .:/app/config -v ~/.cache/zebra:/app/zebra --entrypoint zaino-admin hhanh00/zaino:latest bootstrap /app/zebra

Run the server

docker run -d --network host -v ./data:/app/data -v .:/app/config hhanh00/zaino:latest -c /app/config/zainod.toml start

The default entrypoint runs zainod and forwards all arguments, so -c /app/config/zainod.toml start is equivalent to zainod -c /app/config/zainod.toml start.

Running other tools

Override --entrypoint with the binary name:

Ex: to compare blocks 3300000 to tip between zaino and zec.rocks

docker run --network host -v ./data:/app/data -v .:/app/config --entrypoint zaino-compare hhanh00/zaino:latest --start 3300000 http://localhost:9067 https://zec.rocks

Note: container runs in β€œnetwork host” mode, where it has access to the ports of the host. It could be run in bridge mode, but the network configuration is more complex.

2 Likes

On testing, are you targeting reorg recovery and note commitment tree consistency, or steady state throughput under load? Those fail in different ways.

1 Like

@hanh at the most recent meeting, ZCG voted to approve this proposal. Congratulations!

To keep the community informed, ZCG requests that you provide monthly updates via the forum in this thread.

Please check your forum inbox for a direct message from FPF with important next steps, including a link to the Milestone Payment Request Form and your unique validation code for submitting payment requests.

1 Like

There are a series of tests that cover performance, and reliability.

I like β€œthe freezer”.

Hi @hanh does this mean that you’re going to open source your implementation?

I’m to the part of the video where you split the ChainIndex into three separate concerns:

  • Zebra Forwarder
  • Indexer
  • mempool

I LOVE it!

1 Like