Yellowstone Old Faithful 项目旨在使 Solana 的所有历史内容都可访问、可标记且通过各种方式提供。
Yellowstone Old Faithful 项目旨在使 Solana 的所有历史内容都可访问、可标记且通过各种方式提供。
:hotsprings: Project Yellowstone: Old Faithful is the project to make all of Solana's history accessible, content addressable and available via a variety of means. The goal of this project is to completely replace the Bigtable dependency for Solana history access with a self-hostable, decentralized history archive that is usable for infrastructure providers, individual Solana users, explorers, indexers, and anyone else in need of historical access.
This is currently in RFC stage, which means that it is not intended for production use and that there may be breaking changes to the format, the CLI utilities or any other details related to the project.
For more documentation, please visit https://docs.old-faithful.net.
❗ Request for comment: We are currently looking for feedback and comments on the new archival format and the RPC server setup. We invite all interested parties to test the archival access and open issues on this repo with questions/comments/requests for improvements.
This repo provides the faithful-cli command line interface. This tool allows you to interact with the Old Faithful archive as stored on disk (if you have made a local copy), from old-faithful.net or directly from Filecoin. The CLI provides an RPC server that supports:
The RPC server is available via the faithful-cli rpc command.
The command accepts a list of epoch config files and dirs as arguments. Each config file is specific for an epoch and provides the location of the block/transaction data and the indexes for that epoch. The indexes are used to map Solana block numbers, transaction signatures and addresses to their respective CIDs. The indexes are generated from the CAR file and can be generated via the faithful-cli index command (see Index generation).
It supports the following flags:
--listen: The address to listen on for JSON-RPC requests, e.g. --listen=:8888--grpc-listen: The address to listen on for gRPC requests, e.g. --grpc-listen=:8889--include: You can specify one or more (reuse the same flag multiple times) glob patterns to include files or dirs that match them, e.g. --include=/path/epoch-*.yml.--exclude: You can specify one or more (reuse the same flag multiple times) glob patterns to exclude files or dirs that match them, e.g. --exclude=/something-*/epoch-*.yml.--debug: Enable debug logging.--proxy: Proxy requests to a downstream RPC server if the data can't be found in the archive, e.g. --proxy=/path/to/my-proxy-config.yml. See RPC server proxying for more details.--gsfa-only-signatures: When enabled, the RPC server will only return signatures for getSignaturesForAddress requests instead of the full transaction data.--watch: When specified, all the provided epoch files and dirs will be watched for changes and the RPC server will automatically reload the data when changes are detected. Usage: --watch (boolean flag). This is useful when you want to provide just a folder and then add new epochs to it without having to restart the server.--epoch-load-concurrency=2: How many epochs to load in parallel when starting the RPC server. Defaults to number of CPUs. This is useful when you have a lot of epochs and want to speed up the initial load time.--epoch-search-concurrency=3: How many epochs to search in parallel when looking for data. Defaults to 3. This is useful for performance tuning when serving requests across multiple epochs.--max-cache=: How much memory to use for caching. Defaults to 0 (no limit). This is useful when you want to limit the memory usage of the RPC server.--filecoin-api-address: Filecoin API endpoint address for direct Filecoin retrievals, e.g. --filecoin-api-address=https://api.node.glif.io--config-retry-max=: Maximum number of retries when loading a newly created config file (e.g. when --watch detects a new file). Defaults to 5. Useful when config files may be written non-atomically and could be read before they are fully flushed.--config-retry-delay=: Delay between retries when loading a newly created config file, e.g. --config-retry-delay=300ms. Defaults to 300ms.NOTES:
jsonParsed format. You need to build the RPC server with the make jsonParsed-linux flag to enable this.To run a Faithful RPC server you need to specify configuration files for the epoch(s) you want to host. An epoch config file looks like this:
…NOTES:
uri parameter supports both HTTP URIs as well as file based ones (where not specified otherwise).The RPC server supports proxying requests to a downstream RPC server when data can't be found in the archive. This is configured via the --proxy flag which takes a path to a proxy configuration file.
target: "https://api.mainnet-beta.solana.com"
headers:
"User-Agent": "Old-Faithful-RPC-Server"
"Custom-Header": "custom-value"
proxyFailedRequests: truetarget: The downstream RPC server URL to proxy requests toheaders: Optional HTTP headers to include in proxied requestsproxyFailedRequests: Whether to proxy requests that fail (default: false)To run the old-faithful RPC server you need to generate indexes for the CAR files. You can do this via the faithful-cli index command.
faithful-cli index all : Generate all required indexes for a CAR file.faithful-cli index gsfa : Generate the gsfa index for a CAR file.NOTES:
cid_to_offset_and_size index has an older version, which you can specify with cid_to_offset instead of cid_to_offset_and_size.Flags:
--tmp-dir=/path/to/tmp/dir: Where to store temporary files. Defaults to the system temp dir. (optional)--verify: Verify the indexes after generation. (optional)--network=: Which network to use for the gsfa index. Defaults to mainnet (other options: testnet, devnet). (optional)--workers=: Number of workers used to decode CAR nodes in parallel (applies to both index all and index gsfa). Defaults to number of CPUs * 3. (optional)--cpuprofile=: (index gsfa only) Write a Go CPU profile to `` for performance debugging. The profile is flushed both on normal completion and on Ctrl-C (SIGINT/SIGTERM), so you can interrupt a long-running generation and still get a valid profile. (optional)Both index all and index gsfa read the CAR file sequentially (a CAR is a single append-only stream and cannot be seeked), but the CPU-heavy per-node work — decoding blocks/transactions, reassembling metadata, and verifying signatures (gsfa) — is fanned out across a pool of --workers workers. The results are applied to the indexes on a single writer in the original order, so the generated indexes are identical regardless of the worker count. On multi-core machines this substantially speeds up generation; the gsfa index benefits most because of signature verification. Set --workers=1 to fall back to fully sequential processing.
Generating the gsfa index for a large epoch can take many hours. If you need to investigate where the time is spent, run it with --cpuprofile:
faithful-cli index gsfa \
--epoch 994 \
--car epoch-994.car \
--index-dir /storage/indexes/epoch-994 \
--cpuprofile /tmp/gsfa-994.pprofLet the run reach steady state, then either let it finish or press Ctrl-C — the profile is flushed either way. Analyze it with the standard Go tooling, passing the same faithful-cli binary you ran (needed for symbol resolution):
go tool pprof -top -nodecount=30 ./faithful-cli /tmp/gsfa-994.pprof
# or open an interactive web UI / flamegraph:
go tool pprof -http=:8080 ./faithful-cli /tmp/gsfa-994.pprofIf you already know the CID of the data you are looking for you can fetch it via faithful-cli fetch . This requires no further indexes and can also be used to recursively fetch data for example for an epoch. To avoid fetching the full dataset for an epoch (100s of GB) you probably want to pass the parameter --dag-scope=block to fetch only the particular CID entity that you are interested in.
The production RPC server is accessible via faithful-cli rpc. More documentation on this can be found at https://old-faithful.net.
The (deprecated) testing server (rpc-server-car and rpc-server-filecoin) only supports single Epoch access. The production server supports handling a full set of epochs.
Filecoin retrievals without a CDN can also be slow. We are working on integration with Filecoin CDNs and other caching solutions. Fastest retrievals will happen if you service from local disk.
The core of the project is history archives in Content Addressable format (overview, specs). These represent a verifiable, immutable view of the Solana history. The CAR files that this project generates follows a schema specifically developed for Solana's historical archives.
The content addressable nature means that each epoch, block, transaction and shredding is uniquely identified by a content hash. By knowing this content hash a user will be able to retrieve a specific object of interest in a trustless manner, i.e. retrieve an object verifiably from a non-trusted source. Retrievals can be made via IPFS, the Filecoin network, or even by hosting the CAR files yourself on disk, a ceph cluster, S3, you name it.
Indexes will be needed to map Solana's block numbers, transaction signatures and addresses to their respective CIDs. These indexes will be developed as part of this project. There are several kinds of indexes that the Old Faithful index generation can provide:
The archive is currently under development. There will be two main ways to access the archive during its development phase:
The data that you will need to be a
暂无开放 Issues,或尚未同步最近议题。