Skip to content

docs(request-units): document full vs archive billing for Polkadot#445

Open
CSFeo wants to merge 3 commits into
mainfrom
docs/polkadot-archive-billing
Open

docs(request-units): document full vs archive billing for Polkadot#445
CSFeo wants to merge 3 commits into
mainfrom
docs/polkadot-archive-billing

Conversation

@CSFeo

@CSFeo CSFeo commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Documents full vs archive RU billing for Polkadot, mirroring the TON/Aptos/Starknet classifiers. Polkadot was previously listed as "no archive split — every request full"; the smart-proxy polkadot classifier (forwardFromBlock default 128) now classifies it across both transports.

JSON-RPC (Substrate node RPC)

  • chain_getBlockHasharchive when the requested block is more than 128 behind the tip.

Sidecar REST API — block-scoped (archive when the block in the path is more than 128 behind)

  • /blocks/{number}
  • /blocks/{number}/header
  • /blocks/{blockId}/extrinsics/{extrinsicIndex}
  • /blocks/{blockId}/extrinsics-raw
  • /blocks/{blockId}/para-inclusions

Sidecar REST API — trace (always 2 RUs, regardless of block age)

  • /experimental/blocks/head/traces
  • /experimental/blocks/{number}/traces
  • /experimental/blocks/{number}/traces/operations
  • /experimental/blocks/head/traces/operations

Everything else — including head-targeted or block-less requests — is full.

Changes

  • docs/request-units.mdx — moved Polkadot out of the flat "no archive split" row, added a Polkadot row and a "Polkadot method scope" section.

Verification

Checked against the smart-proxy type_polkadot.go classifier and type_polkadot_test.go (passing): forwardFromBlock default 128, boundary is strictly greater-than (latest - block > 128, so a block exactly at tip − 128 is full), and head/latest/block-less requests resolve to full. docs.json valid; mint broken-links passes.

Polkadot traffic is now classified for billing by the smart-proxy
polkadot classifier (forwardFromBlock default 128), across both the
Substrate node JSON-RPC and the Sidecar REST API:

- JSON-RPC: chain_getBlockHash -> archive when the requested block is
  more than 128 behind the tip
- Sidecar REST: /blocks/{number}, /blocks/{number}/header,
  /blocks/{blockId}/extrinsics/{extrinsicIndex}, extrinsics-raw,
  para-inclusions -> archive when the block in the path is more than 128
  behind the tip
- Sidecar trace: /experimental/blocks/.../traces[/operations] -> always
  2 RUs (trace class), regardless of block age
- everything else -> full

Move Polkadot out of the flat "no archive split" row, add a Polkadot
row, and add a "Polkadot method scope" section. Boundary is strictly
greater-than (latest - block > 128), matching the TON/Aptos/Starknet
classifiers and verified against type_polkadot.go + its tests.
@infra-bot-atlantis

Copy link
Copy Markdown
Error: This repo is not allowlisted for Atlantis.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@CSFeo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8cadacb8-540e-4bef-88cb-78eb3fa0e2fa

📥 Commits

Reviewing files that changed from the base of the PR and between 8447e41 and 6656031.

📒 Files selected for processing (1)
  • docs/request-units.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/polkadot-archive-billing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mintlify

mintlify Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
chainstack 🟢 Ready View Preview Jun 22, 2026, 11:22 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

CSFeo added 2 commits June 22, 2026 07:24
…t archive

On Sidecar, archive billing is triggered only by the path-based
/blocks/... endpoints. Selecting a historical block via the ?at= query
parameter (e.g. /accounts/{address}/balance-info?at=<block>) is billed
as full — confirmed by type_polkadot_test.go. Spell this out so the
path-vs-query asymmetry is not surprising.
The ?at= historical reads billing as full looks like a classifier gap
rather than intended policy, so don't enshrine it in customer docs (it
could change, and it reads as a billing workaround). The doc stays
accurate without it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants