Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 3.64 KB

README.md

File metadata and controls

65 lines (43 loc) · 3.64 KB

Overview

The following folders contain pieces of data needed to run the Amaru demo. Steps to get those pieces of data are detailed below. In the long run, those steps shall become redundant as features gets integrated inside Amaru.

Fetching stake distribution snapshots

Using cncli

While in epoch e, we can get fetch the go snapshot corresponding to the stake distribution of epoch e - 1. So for example, if a node is in epoch 173, we can get the stake distribution of epoch 172 (on preprod) as follows:

cncli pool-stake --socket-path /path/to/node.socket --name go --output-file preprod_172_stake_snapshot.csv --network-magic 1

![NOTE] The last block of epoch 171 is 72662384.2f2bcab30dc53444cef311d6985eb126fd577a548b8e71cafecbb6e855bc8755

Fetching epoch nonces (CSV)

From Koios

#!/bin/bash

rm -f preprod_nonce.csv
touch preprod_nonce.csv

# loop from 4 to 174 inclusive
for i in {4..174}
do
    nonce=$(curl -X GET "https://preprod.koios.rest/api/v1/epoch_params?_epoch_no=$i" -H "accept: application/json" 2>/dev/null | jq -r '.[0].nonce')
    echo "$i,$nonce" >> preprod_nonce.csv
    echo "Epoch $i nonce: $nonce"
done

Cardano ledger snapshots

In addition, we provide CBOR-serialised snapshots obtained from a running Haskell Cardano node client. More specifically, the snapshots are obtained using the GetCBOR ledger-state query, and dumped as such to disk.

Note

It would be nice to have a clear specification for the snapshot format? Wouldn't? Well, that format isn't quite documented because it's based off the internal object representations (specifically, the EpochState type) from the Haskell codebase, and there's no commitment to maintaining compatibility to that format across updates. So at this point, the best reference is the Haskell source code.

If someone finds the motivation to document as CDDL the encoders from that pinned reference, a PR is more than welcome.

Snapshots are named after the point on chain they've been taken from. More specifically, the first characters represent an absolute slot number, followed by 64 characters representing the hex-encoded block header hash; both separated by a dash -. For example:

68774372-36f5b4a370c22fd4a5c870248f26ac72c0ac0ecc34a42e28ced1a4e15136efa4.cbor

designates the ledger state dump of the last block of the Conway era (including the processing of that block) on the PreProd network.

Available snapshots

PreProd

Epoch Download link Size
163 69206375.6f99b5f3deaeae8dc43fce3db2f3cd36ad8ed174ca3400b5b1bed76fdf248912 204.50 MB
164 69638382.5da6ba37a4a07df015c4ea92c880e3600d7f098b97e73816f8df04bbb5fad3b7 205.54 MB
165 70070379.d6fe6439aed8bddc10eec22c1575bf0648e4a76125387d9e985e9a3f8342870d 207.71 MB
166 70502395.fcb6c0dfb6f921eb6001bf3e0ba750287c2a4b816d2131e2bf45083667216242 209.96 MB