Skip to content

Solana - Block.slot and Block.height are messed up #401

@BeaRRRRR

Description

@BeaRRRRR

Image

Image

my code:
Image

Run:

╰─ node -r dotenv/config lib/main.js solana                                                         ─╯
13:42:02 FATAL sqd:batch-processor HttpError: Got 404 from https://v2.archive.subsquid.io/network/solana-mainnet/269828500/worker
                                       at HttpClient.request (/Users/sqd/node_modules/@subsquid/http-client/lib/client.js:51:27)
                                       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
                                       at async /Users/sqd/node_modules/@subsquid/util-internal-archive-client/lib/client.js:41:26
                                       at async ArchiveClient.retry (/Users/sqd/node_modules/@subsquid/util-internal-archive-client/lib/client.js:58:24)
                                       at async ingest (/Users/sqd/node_modules/@subsquid/util-internal-ingest-tools/lib/archive.js:26:30)
                                       at async map (/Users/sqd/node_modules/@subsquid/util-internal/lib/async.js:169:24)
                                       response: {"status":404,"headers":[["access-control-allow-credentials","true"],["access-control-allow-headers","DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"],["access-control-allow-methods","GET, PUT, POST, DELETE, PATCH, OPTIONS"],["access-control-allow-origin","*"],["access-control-max-age","1728000"],["alt-svc","h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"],["content-length","50"],["content-type","text/plain; charset=utf-8"],["date","Fri, 13 Jun 2025 10:42:02 GMT"],["via","1.1 google"]],"body":"solana-mainnet dataset starts from 299804550 block","url":"https://v2.archive.subsquid.io/network/solana-mainnet/269828500/worker"}

Then i change Block.from to 299900000

Image

and now my code:

 for (const block of ctx.blocks as Block[]) {
    console.log('Block:', block.header);
}

gives me this:

Image

Block.slot on the screenshot is actually a block height. Look at solscan and compare (by blockHash)

Image

My questions:

  1. Why when i set .SetBlockRange({ from: Number }) - it is NOT height, but in the Docs it says its block height
  2. in the logs Block.slot is actually a height, NOT a slot.
  3. How to setup SQD to index Solana by real block height, not some weird value 299900000 that is not a slot and not a block height?
  4. What is Block.height in the logs then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions