Backtesting Solana

Kiểm thử chiến lượctrên chain đã thực sự xảy ra.

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

Vì sao cần replay lịch sử

Mainnet là backtest trung thực duy nhất.

Devnet không có MEV, không có nghẽn, không có đối thủ thật. Simulator tự xây trượt khỏi hành vi validator ngay khi một program mới chạm vào một edge case mới.

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.

Cách hoạt động

Ba bước từ một subscription live.

  1. 01
    Trỏ client tới endpoint của sillage.

    Cùng Yellowstone gRPC, cùng SubscribeRequest, cùng filter. sillage.sh phục vụ giao thức như một server.

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

    Stream khởi chạy từ đó và replay đúng tốc độ thực, thứ tự trong slot được giữ chính xác tới 100 microsecond.

  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.

Drop-in

yellowstone-grpc-client, không đổi.

Chỉ endpoint và slot bắt đầu thay đổi. SubscribeRequest, filter và xử lý message của bạn giữ nguyên.

Backtest replay
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?);
}
Câu hỏi

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.

Tôi có phải đổi code client không?

Không. sillage.sh phục vụ giao thức Yellowstone gRPC như một server. Trỏ client hiện tại tới endpoint mới và truyền slot bắt đầu — SubscribeRequest, filter và xử lý message của bạn chạy nguyên trạng.

Replay chính xác đến mức nào?

Mỗi message mang timestamp lúc nó được nhận trong live capture, giữ chính xác tới 100 microsecond. Thứ tự trong slot, độ trễ lan truyền và kết cấu thời gian mạng thực đều replay đúng như đã xảy ra.

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.

Khác gì so với tự chạy RPC của riêng tôi?

RPC cho bạn các query theo yêu cầu; nó không cho bạn một stream replay-được, có thứ tự thời gian, của mọi account write đã xảy ra hôm qua. sillage.sh thì có, qua chính giao thức mà bot bạn đã wired sẵn.

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.