Epoch 208
Since the ledger data for about 495 slots (89856108 and 89856602) is missing, we do not have PoH data for these slots. This means that the PoH validation that was conducted on the other slots could not be completed.
Triton One worked with engineers from Anza Labs to solve this issue, which involves sourcing transaction and block data from Google BigTable and validating it through replay. Replaying such old blocks is difficult, but Anza Labs has created a special version of solana-ledger-tool
to support this replay.
Basic Theory
The basic theory of this validation is:
We have an account state snapshot, including a slot immediately before the gap, and another account state snapshot, which includes a slot immediately after the gap.
These account snapshots are based on two slots for which we have valid PoH information.
We have validated the PoH hashes for the two slots (before and after the gap) on which the account state snapshots are based.
We then replay the transactions sourced from Bigtable and validate that the bank hashes produced at each slot are valid.
After replay, we can produce an account state snapshot. This snapshot must match the one available after the Epoch 208 ledger gap.
Going through this process, we can produce a new valid ledger for these 495 slots to generate the bank hashes.
Availability of Bank Hashes
While the data to recompute POH is lost, we still have the bank hashes available, as these are included in the votes submitted by the validators. Bank hashes (see https://github.com/solana-labs/solana/blob/005c825b5c27bd57df9b0aadf0edb2e02215add0/runtime/src/bank.rs#L7047-L7052) contain:
Previous block hash
A hash of the delta of all accounts during the slot
The number of signatures in the block
The last blockhash of the block (i.e., the one referred to as the block’s ”blockhash”).
As part of the replay of epoch 208, the bank hashes are recomputed and can be compared with those inside the votes submitted by the validators. We can also compute the stake weight of the votes based on the data available in BigTable. Since votes are signed by the validators, they cannot be forged.
This means that during replay, you can reproduce the bank hashes.
Performing your own validation of Epoch 208
Currently, Triton One and Anza Labs have validated Epoch 208. We encourage other parties to run their own validation. The tooling is basic but should enable you to re-run the validation completely. You will need access to the required slots of a Google Bigtable archive (or other archive).
Pre-requisites
Hardware specs
To verify, you need at least the following hardware specs:
40 GiB available RAM (total system memory recommended at least 64 GiB)
2 TiB available disk space (ideally NVME)
OS: Ubuntu 22.04.2 LTS
Bigtable access (or other ledger store)
You need read-only credentials for a Google Bigtable copy of the Solana history or an equivalent source. If you want to reproduce it but do not have access to your own Bigtable, you can contact Anza Labs or Triton One to request access.
Ledger and account snapshots
You need to download the account snapshots that you can use to compare against. The pre-account snapshot is hosted by Anza and is available in a Google Cloud storage bucket called mainnet-beta-ledger-us-ny5. This was produced by warehouse nodes running at the time. This snapshot is from a ledger that has been validated in the normal Old Faithful process.
The RocksDB snapshot at https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89423444/rocksdb.tar.bz2 runs up to slot 89856107. Ledger tool reports:
The latest account state snapshot before the missing slots is at slot 8985546. https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89855469/snapshot-89855469-9i59TwLmzXvbomizFZNuXgPygtx8zJ3P4nWDQuNxrTxK.tar.zst).
After the gap, the ledger snapshot at https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89855469/rocksdb.tar.bz2 starts at 89856602. Ledger tool reports:
The account state snapshot after the gap that we have available is at 89865552 https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89855469/hourly/snapshot-89865552-CWFaiDterTZ1EFQrJkFghnnzERFJNNFT2USBnYTssxsF.tar.zst
This means that if you want to use the existing snapshots for validation, you need to replay between at least slot 89855469 and 89865552 (10083 slots).
Building solana-ledger-tool
A special version of the solana-ledger-tool
has been prepared, which has a patch to allow running the verification and skipping PoH verification (since PoH data is missing).
Running verification
Running the verification will take some time. We recommend using a tmux
session with an unlimited scrollback buffer to run the verification.
After running this process, the $WORKING_DIR_E208/ledger-after-gap/89865552/
should have a file with the same filename as snapshot-89865552-CWFaiDterTZ1EFQrJkFghnnzERFJNNFT2USBnYTssxsF.tar.zst
We can verify the filename hash to confirm that the snapshots are identical. We can also extract and validate that the two account states match identically (i.e., have the exact same accounts and account data).
The two archive files, however, are slightly different in size since the process isn’t precisely reproducible regarding the specific compressed file. If used on the two snapshot-*.tar.zst files, SHA256SUM will return two different hashes. However, if compared, the contents (account states) are the same.
Last updated