Solana 回测

在真实发生过的链上测试你的策略。

Replay recorded Solana mainnet through your existing Yellowstone gRPC client. Same protocol, same ordering, 100μs precision. Apache-2.0.

为什么需要历史回放

主网是唯一诚实的回测。

Devnet 没有 MEV,没有拥塞,没有真实对手。自建模拟器在新程序碰到新边界场景的那一刻起,就开始偏离验证节点的实际行为。

Sillage records mainnet as it was delivered — every account write, every transaction, every block — and streams it back through the same protocol your live bot already speaks. The chain that happened, on demand, at the timing it happened.

工作方式

从实时订阅出发的三个步骤。

  1. 01
    将客户端指向 sillage 的端点。

    相同的 Yellowstone gRPC、相同的 SubscribeRequest、相同的过滤器。sillage.sh 作为服务端讲这套协议。

  2. 02
    Pass a starting slot from the recorded window.

    数据流从该位置开始,按真实墙钟速度回放,slot 内部顺序保留至 100 微秒精度。

  3. 03
    Iterate without holding a live subscription open.

    Re-run the same window as many times as your tuning loop needs. The input never changes, so a difference in output is a difference in your code.

无缝接入

yellowstone-grpc-client,无需改动。

唯一变化的是端点和起始 slot。你的 SubscribeRequest、过滤器与消息处理逻辑保持不变。

回测回放
let mut client = GeyserGrpcClient::build_from_shared(
    "https://replay.sillage.sh",
)?
    .x_token(Some(api_key))?
    .connect()
    .await?;

let req = SubscribeRequest {
    // any slot within the last 24 hours
    from_slot: Some(312_847_201),
    transactions: hashmap! {
        "swaps".into() => SubscribeRequestFilterTransactions {
            account_include: vec![JUPITER_V6.into()],
            ..Default::default()
        },
    },
    ..Default::default()
};

let (_, mut stream) =
    client.subscribe_with_request(Some(req)).await?;

while let Some(msg) = stream.next().await {
    handle(msg?);
}
常见问题

Questions people ask first.

How do I get an endpoint?

Run one. Clone the repo and start a reader against a window you have recorded, or against the published sample archive. There is also a live demo endpoint at replay.sillage.sh if you want to see it working before setting anything up.

我需要改客户端代码吗?

不需要。sillage.sh 作为服务端讲 Yellowstone gRPC 协议。把你现有的客户端指向新端点,传入一个起始 slot —— 你的 SubscribeRequest、过滤器与消息处理逻辑都照常工作。

回放的精度如何?

每条消息都携带实时捕获时的时间戳,精度保留到 100 微秒。Slot 内部顺序、传播延迟以及真实网络时间的纹理,都会按其原本的样子回放出来。

How much history can I replay?

Whatever you record. Sillage is the recorder as well as the player — point the writer at a Geyser source for as long as you want history, and the reader serves exactly that back.

这和我自建 RPC 有什么不同?

RPC 给你的是按需查询;它不会给你一条可重播的、按时间排序的数据流,把昨天发生的每一次账户写入还原出来。sillage.sh 可以,而且走的就是你 bot 已经接好的那个协议。

How does this compare to a live Yellowstone provider?

Helius, Triton, and QuickNode all stream the chain forward beautifully. None of them let you replay a specific past window through the same protocol, and none of them are something you can run yourself. That's the inverse Sillage was built for.

Backtest the real chain.

Clone it, run it, or try the live endpoint.