docs(request-units): document full vs archive billing for Polkadot#445
docs(request-units): document full vs archive billing for Polkadot#445CSFeo wants to merge 3 commits into
Conversation
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.
|
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…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.
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
polkadotclassifier (forwardFromBlockdefault 128) now classifies it across both transports.JSON-RPC (Substrate node RPC)
chain_getBlockHash— archive 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-inclusionsSidecar 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/operationsEverything 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.goclassifier andtype_polkadot_test.go(passing):forwardFromBlockdefault 128, boundary is strictly greater-than (latest - block > 128, so a block exactly attip − 128is full), andhead/latest/block-less requests resolve to full.docs.jsonvalid;mint broken-linkspasses.