### GetVersion RPC Example (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example shows how to call the GetVersion unary RPC method. It requires the proto file and optionally accepts an x-token header. ```bash grpcurl \ -proto old-faithful.proto \ -d '' \ -H 'x-token: ' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetVersion ``` -------------------------------- ### GetBlockTime RPC Example (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example demonstrates calling the GetBlockTime unary RPC method. It requires the proto file, an x-token header, and a slot number in the request payload. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"slot": 307152000}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetBlockTime ``` -------------------------------- ### StreamBlocks RPC Example without Filters (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example demonstrates streaming block data without any filters. It requires the proto file, an x-token header, and start and end slot parameters. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamBlocks ``` -------------------------------- ### GetTransaction RPC Example (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example shows how to fetch transaction details using the GetTransaction unary RPC method. It requires the proto file, an x-token header, and a transaction signature. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg=="}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetTransaction ``` -------------------------------- ### GetBlock RPC Example (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example illustrates how to retrieve block data using the GetBlock unary RPC method. It requires the proto file, an x-token header, and a slot number. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"slot": 307152000}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetBlock ``` -------------------------------- ### StreamTransactions RPC Example without Filters (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example demonstrates streaming transaction data without any filters. It requires the proto file, an x-token header, and start/end slot parameters. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamTransactions ``` -------------------------------- ### StreamBlocks RPC Example with Account Include Filter (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example shows how to stream block data filtered by account addresses. It requires the proto file, an x-token header, start/end slots, and an account_include filter. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"account_include": ["Vote111111111111111111111111111111111111111"]}}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamBlocks ``` -------------------------------- ### StreamTransactions RPC Example with Filters (bash) Source: https://docs.old-faithful.net/references/grpc-methods/examples This example shows how to stream transaction data with filters for vote status and failed transactions. It requires the proto file, an x-token header, start/end slots, and filter parameters. ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"vote": false, "failed": true}}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamTransactions ``` -------------------------------- ### Clone and Build Old Faithful with Go Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/building-old-faithful This snippet shows the basic installation process for Old Faithful using Git and Make. It requires Golang version 1.20 or higher. No external dependencies beyond Git and Go are specified for this basic build. ```sh git clone https://github.com/rpcpool/yellowstone-faithful.git make ``` -------------------------------- ### Local Filesystem Example Configuration (YAML) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files/local-file-system Provides an example YAML configuration file for Old Faithful targeting local files for epoch 100. It specifies the URIs for the CAR file and various index types, essential for data retrieval. ```yaml version: 1 epoch: 100 data: car: uri: /of1/100/epoch-100.car indexes: cid_to_offset_and_size: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-cid-to-offset-and-size.index slot_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-slot-to-cid.index sig_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-to-cid.index sig_exists: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-exists.index ``` -------------------------------- ### Validate Proof of History Log Example (Go) Source: https://docs.old-faithful.net/usage/validation This snippet displays an example log output from Old Faithful's Proof of History validation process. It shows the details of roots, block hashes, and the overall success of the CAR file check. This log is generated by the `main.go` program during validation. ```go I1109 13:00:28.125613 217304 main.go:130] Roots: 1 I1109 13:00:28.125641 217304 main.go:133] - bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i (Epoch CID) PrevBlockHash: 47PrqQ4MJrT4G2GB7uHk5CdZadTKspB5HgDszzxHPJc2 EOF I1109 13:15:10.275042 217304 main.go:345] Waiting for all nodes to be parsed... I1109 13:15:10.275046 217304 main.go:347] All nodes parsed. I1109 13:15:10.275049 217304 main.go:349] Waiting to receive all results... I1109 13:15:10.292252 217304 main.go:352] All results received I1109 13:15:10.292261 217304 main.go:354] Waiting for all assertions to finish... I1109 13:15:10.292840 217304 main.go:356] All assertions finished I1109 13:15:10.292847 217304 main.go:359] Last block hash for slot 43631999: FUPcPKdnNUWRrwyDqpyAdMqX7XH6rvGM7eEHYYN2KX6M I1109 13:15:10.292855 217304 main.go:360] Number of checked entries: 110,592,602 I1109 13:15:10.292858 217304 main.go:361] Number of hashes: 345,600,000,000 I1109 13:15:10.292861 217304 main.go:363] Successfully checked PoH on CAR file I1109 13:15:10.292862 217304 main.go:143] Finished in 14m42.167217686s I1109 13:15:10.292864 217304 main.go:144] Read 196980689 nodes from CAR file I1109 13:15:10.292870 217304 main.go:59] CAR file checked successfully I1109 13:15:10.292872 217304 main.go:53] Took 14m42.170098595s ``` -------------------------------- ### Start RPC Server with GSFA-Only Signatures Source: https://docs.old-faithful.net/usage/rpc-server This command starts the RPC server and configures it to only return signatures for getSignaturesForAddress requests, rather than full transaction data. This is useful when using a remote GSFA index or when transaction data is not required for this specific call. ```bash faithful-cli rpc -gsfa-only-signatures=true 455.yml ``` -------------------------------- ### GetVersion Source: https://docs.old-faithful.net/references/grpc-methods/examples Retrieves the current version of the Old Faithful service. This is a unary method that returns a single response. ```APIDOC ## GET /OldFaithful.OldFaithful/GetVersion ### Description Retrieves the current version of the Old Faithful service. ### Method GET ### Endpoint `/OldFaithful.OldFaithful/GetVersion` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash grpcurl \ -proto old-faithful.proto \ -d '' \ -H 'x-token: ' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetVersion ``` ### Response #### Success Response (200) - **version** (string) - The current version of the Old Faithful service. #### Response Example ```json { "version": "1.0.0" } ``` ``` -------------------------------- ### Build solana-ledger-tool for PoH Verification Skip Source: https://docs.old-faithful.net/usage/validation/epoch-208 This snippet provides instructions to clone a repository, checkout a specific branch, install dependencies including Rust, and build a modified `solana-ledger-tool` binary. This tool is essential for verifying ledger data when PoH data is missing. ```shell git clone git@github.com:solana-labs/solana-ledger-gap.git cd solana-ledger-gap git checkout origin/steviez_v1.7.9 # install dependencies sudo apt-get install \ build-essential \ pkg-config \ libudev-dev llvm libclang-dev \ protobuf-compiler \ libssl-dev \ apt-file # install rust (if not already installed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env . "$HOME/.cargo/env" cd ledger-tool nano Cargo.toml # add the following lines to [dependencies] openssl-sys = "0.9.58" openssl = "0.10.30" # install rust nightly 1.57.0 rustup install nightly-2021-12-06 rustup toolchain install nightly-2021-12-06 # build solana-ledger-tool cargo +nightly-2021-12-06 build --release # the final binary is located at ./target/release/solana-ledger-tool ./solana-ledger-gap/target/release/solana-ledger-tool # copy the binary to a location that is in the PATH (e.g. /usr/local/bin) cp ./target/release/solana-ledger-tool /usr/local/bin/solana-ledger-tool ``` -------------------------------- ### StreamBlocks Source: https://docs.old-faithful.net/references/grpc-methods/examples Streams blocks within a specified slot range. This is a streaming method. ```APIDOC ## POST /OldFaithful.OldFaithful/StreamBlocks ### Description Streams blocks within a specified slot range. Supports filtering by account. ### Method POST ### Endpoint `/OldFaithful.OldFaithful/StreamBlocks` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **start_slot** (integer) - Required - The starting slot number for the stream. - **end_slot** (integer) - Required - The ending slot number for the stream. - **filter** (object) - Optional - Filters to apply to the stream. - **account_include** (array of strings) - Optional - An array of base58 strings representing accounts to include. ### Request Example (No Filters) ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamBlocks ``` ### Request Example (Filtered) ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"account_include": ["Vote111111111111111111111111111111111111111"]}}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamBlocks ``` ### Response #### Success Response (200) - **block** (object) - A stream of block data. #### Response Example ```json { "block": { "slot": 307152000, "parent_slot": 307151999, "timestamp": 1678886400, "transactions": [] } } ``` ``` -------------------------------- ### GetBlock Source: https://docs.old-faithful.net/references/grpc-methods/examples Retrieves a block for a given slot. This is a unary method that returns a single response. ```APIDOC ## GET /OldFaithful.OldFaithful/GetBlock ### Description Retrieves a specific block based on its slot number. ### Method GET ### Endpoint `/OldFaithful.OldFaithful/GetBlock` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **slot** (integer) - Required - The slot number of the block to retrieve. ### Request Example ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"slot": 307152000}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetBlock ``` ### Response #### Success Response (200) - **block** (object) - The block data. #### Response Example ```json { "block": { "slot": 307152000, "parent_slot": 307151999, "timestamp": 1678886400, "transactions": [] } } ``` ``` -------------------------------- ### GetBlockTime Source: https://docs.old-faithful.net/references/grpc-methods/examples Retrieves the block time for a given slot. This is a unary method that returns a single response. ```APIDOC ## GET /OldFaithful.OldFaithful/GetBlockTime ### Description Retrieves the block time for a specific slot. ### Method GET ### Endpoint `/OldFaithful.OldFaithful/GetBlockTime` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **slot** (integer) - Required - The slot number for which to retrieve the block time. ### Request Example ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"slot": 307152000}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetBlockTime ``` ### Response #### Success Response (200) - **block_time** (integer) - The Unix timestamp of the block. #### Response Example ```json { "block_time": 1678886400 } ``` ``` -------------------------------- ### GetTransaction Source: https://docs.old-faithful.net/references/grpc-methods/examples Retrieves a transaction by its signature. This is a unary method that returns a single response. ```APIDOC ## GET /OldFaithful.OldFaithful/GetTransaction ### Description Retrieves a transaction using its unique signature. ### Method GET ### Endpoint `/OldFaithful.OldFaithful/GetTransaction` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **signature** (string) - Required - The signature of the transaction to retrieve. ### Request Example ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg=="}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/GetTransaction ``` ### Response #### Success Response (200) - **transaction** (object) - The transaction data. #### Response Example ```json { "transaction": { "signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg==", "message": {}, "meta": {} } } ``` ``` -------------------------------- ### StreamTransactions Source: https://docs.old-faithful.net/references/grpc-methods/examples Streams transactions within a specified slot range. This is a streaming method and supports various filters. ```APIDOC ## POST /OldFaithful.OldFaithful/StreamTransactions ### Description Streams transactions within a specified slot range. Supports filtering by vote status, failure status, and accounts. ### Method POST ### Endpoint `/OldFaithful.OldFaithful/StreamTransactions` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **start_slot** (integer) - Required - The starting slot number for the stream. - **end_slot** (integer) - Required - The ending slot number for the stream. - **filter** (object) - Optional - Filters to apply to the stream. - **vote** (boolean) - Optional - Filter for vote transactions. - **failed** (boolean) - Optional - Filter for failed transactions. - **account_include** (array of strings) - Optional - An array of base58 strings representing accounts to include. - **account_exclude** (array of strings) - Optional - An array of base58 strings representing accounts to exclude. - **account_required** (array of strings) - Optional - An array of base58 strings representing accounts that must be involved. ### Request Example (No Filters) ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamTransactions ``` ### Request Example (Filtered) ```bash grpcurl \ -proto old-faithful.proto \ -H 'x-token: ' \ -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"vote": false, "failed": true}}' \ customer-endpoint-2608.mainnet.rpcpool.com:443 \ OldFaithful.OldFaithful/StreamTransactions ``` ### Response #### Success Response (200) - **transaction** (object) - A stream of transaction data. #### Response Example ```json { "transaction": { "signature": "example_signature", "message": {}, "meta": {} } } ``` ``` -------------------------------- ### faithful-cli: Index Command Help Source: https://docs.old-faithful.net/running-old-faithful/sourcing-data/generating-from-rocksdb/creating-indexes This command displays the help information for the 'index' command in the faithful CLI, listing available sub-commands and their descriptions. This is useful for understanding all available index generation options. ```bash faithful CLI index --help ``` -------------------------------- ### Filecoin v1 Retrieval Configuration (YAML) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files/filecoin-v1-retrievals This snippet shows a sample YAML configuration file for an epoch using Filecoin v1 retrievals. It specifies the URIs for deal and metadata files, as well as various index files required for the retrieval process. Indexes can utilize local file system or HTTP URLs. ```yaml version: 1 epoch: 100 data: car: from_pieces: deals: uri: '/of1/100/deals.csv' metadata: uri: '/of1/100/metadata.yaml' indexes: cid_to_offset_and_size: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-cid-to-offset-and-size.index slot_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-slot-to-cid.index sig_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-to-cid.index sig_exists: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-exists.index gsfa: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-gsfa.indexdir ``` -------------------------------- ### YAML Configuration for Old Faithful RPC Server (Epoch 0) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files This is a sample YAML configuration file for epoch 0 of the Old Faithful RPC server. It specifies data retrieval methods (CAR file or Filecoin), genesis file location, and URIs for various index files required for data access. This configuration is essential for setting up the server to support a specific epoch. ```yaml epoch: 0 # epoch number (required) version: 1 # version number (required) data: # data section (required) car: # Source the data from a CAR file (car-mode). # The URI can be a local filepath or an HTTP url. # This makes the indexes.cid_to_offset_and_size required. # If you are running in filecoin-mode, you can omit the car section entirely. uri: /media/runner/solana/cars/epoch-0.car filecoin: # filecoin-mode section: source the data directly from filecoin. # If you are running in car-mode, you can omit this section. # if enable=true, then the data will be sourced from filecoin. # if enable=false, then the data will be sourced from a CAR file (see 'car' section above). enable: false genesis: # genesis section (required for epoch 0 only) # Local filepath to the genesis tarball. # You can download the genesis tarball from # wget https://api.mainnet-beta.solana.com/genesis.tar.bz2 uri: /media/runner/solana/genesis.tar.bz2 indexes: # indexes section (required) cid_to_offset_and_size: # Required when using a CAR file; you can provide either a local filepath or a HTTP url. # Not used when running in filecoin-mode. uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-cid-to-offset-and-size.index' slot_to_cid: # required (always); you can provide either a local filepath or a HTTP url: uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-slot-to-cid.index' sig_to_cid: # required (always); you can provide either a local filepath or a HTTP url: uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-sig-to-cid.index' sig_exists: # required (always); you can provide either a local filepath or a HTTP url: uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-sig-exists.index' gsfa: # getSignaturesForAddress index # optional; must be a local directory path. uri: '/media/runner/solana/indexes/epoch-0/gsfa/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-gsfa.indexdir' ``` -------------------------------- ### Split HTTP Retrieval Configuration (YAML) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files/http This YAML configuration demonstrates how to set up split retrievals over HTTP. It references a metadata file and a mapping from piece CIDs to their respective CAR file URIs. This approach is useful when monolithic files are too large to manage directly. ```yaml version: 1 epoch: 100 data: car: from_pieces: metadata: uri: https://files.old-faithful.net/100/metadata.yaml piece_to_uri: baga6ea4seaqiogvxkc4cjgbimal52zgaqwo5ugcvy2bc72nrerro3wtzy47jepi: uri: https://files.old-faithful.net/100/baga6ea4seaqiogvxkc4cjgbimal52zgaqwo5ugcvy2bc72nrerro3wtzy47jepi.car baga6ea4seaqowdba7qkhqxw3umullabn7mx377we7vu3klguccuderfqclzpsiy: uri: https://files.old-faithful.net/100/baga6ea4seaqowdba7qkhqxw3umullabn7mx377we7vu3klguccuderfqclzpsiy.car baga6ea4seaqhky3ydiwp5toduhxpzt7oxm5cctuvrjbmkq5gzf3s6arayindoii: uri: https://files.old-faithful.net/100/baga6ea4seaqhky3ydiwp5toduhxpzt7oxm5cctuvrjbmkq5gzf3s6arayindoii.car indexes: cid_to_offset_and_size: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-cid-to-offset-and-size.index slot_to_cid: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-slot-to-cid.index sig_to_cid: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-to-cid.index sig_exists: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-exists.index ``` -------------------------------- ### Download Snapshots and Prepare for Verification Source: https://docs.old-faithful.net/usage/validation/epoch-208 This shell script downloads necessary pre-gap ledger and account snapshots using `aria2c` and retrieves the genesis file. It also extracts the `rocksdb.tar.bz2` archive, which contains the ledger data up to a certain slot. This prepares the environment for the verification process. ```shell # create a working directory export WORKING_DIR_E208=/solana/e208 mkdir $WORKING_DIR_E208 mkdir $WORKING_DIR_E208/ledger cd $WORKING_DIR_E208 # download the pre-gap snapshots apt install -y aria2c pv bzip2 lbzip2 zstd aria2c -x 16 -s 16 -d $WORKING_DIR_E208/ledger https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89423444/rocksdb.tar.bz2 aria2c -x 16 -s 16 -d $WORKING_DIR_E208/ledger https://storage.googleapis.com/mainnet-beta-ledger-us-ny5/89855469/snapshot-89855469-9i59TwLmzXvbomizFZNuXgPygtx8zJ3P4nWDQuNxrTxK.tar.zst # get genesis file cd $WORKING_DIR_E208/ledger wget https://api.mainnet-beta.solana.com/genesis.tar.bz2 tar -xvf genesis.tar.bz2 -C $WORKING_DIR_E208/ledger/ # extract rocksdb (will take ~10 minutes; 2 hours if using networked storage) cd $WORKING_DIR_E208/ledger pv rocksdb.tar.bz2 | tar -x -I lbzip2 -C ./ ``` -------------------------------- ### Check System Resources for Validation Source: https://docs.old-faithful.net/usage/validation/epoch-208 This snippet provides shell commands to verify system resources required for running the Epoch 208 validation. It checks available RAM, disk space, Ubuntu version, and GLIBC version, ensuring the environment meets the specified prerequisites. ```sh # print used memory, should have at lest 40 GiB available free -h # print available disk space,m should have at least 2TiB available df -h # print ubuntu version; must be 22.04 LTS lsb_release -a # print current version; must be at least GLIBC_2.32; GLIBC 2.35 is good ldd --version ``` -------------------------------- ### Configure Filecoin v2 Retrievals (YAML) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files/filecoin-v2-retrievals This YAML configuration enables Filecoin v2 retrievals by specifying the version, epoch, subset CIDs, optional storage providers, and index URIs. It's a crucial step for setting up data retrieval from Filecoin archives. ```yaml version: 1 epoch: 100 data: filecoin: enable: true subset_cids: - bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i - bafyreibqt212roysxlxctgb52xxn27ectsll2xsfk24qar7ga6vusdjn32 storage_providers: - f02366527 indexes: slot_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-slot-to-cid.index sig_to_cid: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-to-cid.index sig_exists: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-exists.index gsfa: uri: /of1/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-gsfa.indexdir ``` -------------------------------- ### getVersion Source: https://docs.old-faithful.net/references/rpc-methods Retrieves the current version of the Solana RPC API. ```APIDOC ## GET /getVersion ### Description Retrieves the current version of the Solana RPC API running on the node. This is useful for checking compatibility and understanding the features available. ### Method GET ### Endpoint /getVersion ### Response #### Success Response (200) - **result** (object) - An object containing the version information. - **solanaCore** (string) - The version of the Solana core software. - **featureId** (string) - The feature identifier. - **error** (object) - An error object if the request fails. #### Response Example ```json { "jsonrpc": "2.0", "result": { "solanaCore": "1.18.0", "featureId": "string" }, "id": "string" } ``` ``` -------------------------------- ### Create Snapshot and Reconstruct Missing Blocks Source: https://docs.old-faithful.net/usage/validation/epoch-208 This sequence of commands uses the patched `solana-ledger-tool` to create a snapshot before the data gap and then reconstructs the missing replayable blocks from Bigtable. It also verifies the ledger bounds and creates a new snapshot after the gap, skipping PoH verification. ```shell # Step 0: Create a snapshot immediately before the gap # This will take ~10 minutes alias solana-ledger-tool="$WORKING_DIR_E208/solana-ledger-tool" sudo sysctl -w vm.max_map_count=1400000 sudo sysctl --system cd $WORKING_DIR_E208/ledger solana-ledger-tool create-snapshot --ledger ./ 89856107 ./ # Step I: Recreate shreds for the missing blocks (you will need bigtable credentials) # You need a service account key for bigtable in JSON format (to the Solana Foundation's bigtable) # It will be used to fetch the missing blocks. export GOOGLE_APPLICATION_CREDENTIALS=/solana/e208/bigtable.json solana-ledger-tool bigtable reconstruct-replayable-blocks --ledger ./ --store-transaction-status --starting-slot 89856107 --ending-slot 89856602 --snapshot-archive-path=$WORKING_DIR_E208/ledger/snapshot-89856107-2Uvbz6becuTbDVLdoUXfYN81wcwR5AxVGLJFbkG5Vy2w.tar.zst # verify bounds # should be: slots 89423444 to 89856602 solana-ledger-tool bounds --ledger $WORKING_DIR_E208/ledger # create a snapshot after the gap RUST_LOG=solana=info,solana_ledger::blockstore_processor=trace solana-ledger-tool create-snapshot --skip-poh-verify --ledger $WORKING_DIR_E208/ledger 89856602 $WORKING_DIR_E208/ledger/89856602/ ``` -------------------------------- ### Monolithic HTTP Retrieval Configuration (YAML) Source: https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files/http This YAML configuration specifies the URIs for a monolithic epoch CAR file and its associated index files for HTTP retrieval. It requires the CAR file and index files to be hosted at the specified HTTP endpoints. ```yaml version: 1 epoch: 100 data: car: uri: https://files.old-faithful.net/100/epoch-100.car indexes: cid_to_offset_and_size: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-cid-to-offset-and-size.index slot_to_cid: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-slot-to-cid.index sig_to_cid: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-to-cid.index sig_exists: uri: https://files.old-faithful.net/100/epoch-100-bafyreibqt2nvroysxlxctgb52xxn27ectsllv2xyka4qar7ga6vupmbs3i-mainnet-sig-exists.index ``` -------------------------------- ### Create Solana Snapshot with solana-ledger-tool Source: https://docs.old-faithful.net/usage/validation/epoch-208 Creates a new snapshot from existing ledger data and a previous snapshot archive. This command reconstructs a ledger state at a specific slot, useful for synchronizing or creating new nodes. It can skip Proof-of-History verification for faster processing. ```bash solana-ledger-tool create-snapshot \ --skip-poh-verify \ --ledger $WORKING_DIR_E208/ledger-after-gap \ --snapshot-archive-path $WORKING_DIR_E208/ledger/89856602/ \ 89865552 $WORKING_DIR_E208/ledger-after-gap/89865552/ ``` -------------------------------- ### Configure RPC Server Proxy Settings Source: https://docs.old-faithful.net/usage/rpc-server This JSON configuration file defines the behavior of the RPC server's proxy mode. It specifies the target URL for proxying, custom headers to be included in proxy requests, and whether to proxy requests that initially failed to be served from archives. ```json { "target": "https://api.mainnet-beta.solana.com", "headers": { "My-Header": "My-Value" }, "proxyFailedRequests": true } ``` -------------------------------- ### faithful-cli: Generate All Indexes Source: https://docs.old-faithful.net/running-old-faithful/sourcing-data/generating-from-rocksdb/creating-indexes This command generates all required indexes for a CAR file. It requires the path to the CAR file and an output directory for the generated indexes. Ensure the CAR file is available locally. Optional flags can be used to specify a temporary directory and to verify the generated indexes. ```bash faithful-cli index all ```