Skip to content

docs: expand cycle-costs reference with Threshold cryptography and External integrations sections#272

Open
marc0olo wants to merge 8 commits into
mainfrom
docs/cycle-costs-special-features
Open

docs: expand cycle-costs reference with Threshold cryptography and External integrations sections#272
marc0olo wants to merge 8 commits into
mainfrom
docs/cycle-costs-special-features

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented May 26, 2026

Summary

Expands docs/references/cycle-costs.md with four previously-stub cost entries and restructures the page into two named sections:

  • Threshold cryptography: threshold ECDSA/Schnorr signing, VetKeys
  • External integrations: HTTPS outcalls, EVM RPC, SOL RPC, Bitcoin, Dogecoin

Applies a Diataxis pass to concepts/cycles.md (prose replaces the cost table, links to the new sections) and adds an XDR rate query subsection to system-canisters.md.

Review guidance

File What to check
docs/references/cycle-costs.md New cost tables (Dogecoin, SOL RPC, VetKeys, threshold signing) — verify numbers; section structure; EVM RPC collateral description
docs/concepts/cycles.md Messaging table replaced with prose and links — does it still give a clear mental model?
docs/references/system-canisters.md New XDR rate subsection in the CMC section — Candid signature, xdr_permyriad_per_icp semantics, Prometheus table
docs/guides/chain-fusion/ethereum.mdx EVM RPC collateral correction — "consumed, not refunded" is the key factual change

Key factual correction: the original text said EVM RPC collateral cycles "are currently refunded in full" — that's wrong. Tracing through canhttp/src/cycles/mod.rs shows msg_cycles_accept(request_cost + collateral), meaning collateral is consumed. A second pair of eyes on the corrected wording is welcome.

Sync recommendation

docs/references/cycle-costs.md: hand-written (informed by multiple upstream sources listed in the Upstream comment)

@marc0olo marc0olo requested a review from a team as a code owner May 26, 2026 06:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

🤖 Here's your preview: https://uc7il-jaaaa-aaaam-ai2gq-cai.icp0.io

@marc0olo marc0olo changed the title docs: expand cycle costs reference with signing, VetKeys, EVM RPC, and Bitcoin API docs: expand and update cycle costs reference with special features and May 2026 rates May 26, 2026
@marc0olo marc0olo changed the title docs: expand and update cycle costs reference with special features and May 2026 rates docs: expand cycle-costs reference — Protocol integrations section with Dogecoin and SOL RPC May 26, 2026
@marc0olo marc0olo requested review from a team as code owners May 26, 2026 09:41
@github-actions github-actions Bot added the interface-spec Changes to the IC interface specification label May 26, 2026
@marc0olo marc0olo changed the title docs: expand cycle-costs reference — Protocol integrations section with Dogecoin and SOL RPC docs: expand cycle-costs reference with Threshold cryptography and Chain integrations sections May 26, 2026
@marc0olo marc0olo requested a review from Dfinity-Bjoern May 26, 2026 14:46
@marc0olo
Copy link
Copy Markdown
Member Author

marc0olo commented May 26, 2026

@Dfinity-Bjoern sorry for the noise in his PR. some icp brand voice changes were also applied in between and I didn't want to revert those along the way.

please focus on the Review guidance in the PR summary. the rest is just cosmetics.

following pages are relevant in the preview deployment:

Copy link
Copy Markdown
Contributor

@mraszyk mraszyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the one-line change in docs/references/ic-interface-spec/management-canister.md

@marc0olo marc0olo force-pushed the docs/cycle-costs-special-features branch from 490f44d to e016589 Compare May 27, 2026 09:46
marc0olo added a commit that referenced this pull request May 27, 2026
…guage (#277)

## Summary

- Replaces `onchain`/`on-chain` with precise attribute language (e.g.
\"runs on the network\", \"canister code\", \"network-enforced\") across
26 pages. Domain exceptions retained for DeFi/MEV context and governance
API identifiers per brand voice rules.
- Normalizes compound terms to no-hyphen style consistent with
`tamperproof`: `offchain`, `crosschain`. Replaces \"tokenize your
application\" with \"issue a governance asset and transfer control\".
- Retains `decentralized` in governance/trust contexts where it
describes no-single-party control (not a marketing claim). Replaces
`distributed` back to `decentralized` where the PR had incorrectly
substituted it.
- Renames `onchain-ai` page to `ai-inference`; updates title and
internal links.
- Fixes Motion proposal description: replaces \"no direct network
effect\" with \"Non-binding vote\".
- Replaces `Onchain encryption` heading with `Encryption` in
chain-key-cryptography concept page.
- Applies review suggestions: `DAO-governed` → `Community-governed`,
`token holders` → `asset holders`, `offchain systems` → `external
systems`, `offchain dependencies` → `external dependencies`, `network
oracle` → descriptive system service label, `Offchain availability` →
`Availability` / `client-side` in the IC interface spec.

28 files changed, 42 insertions, 42 deletions.

## Why a separate PR

These changes were originally part of #272. Splitting them out so
reviewers can focus on the structural content changes in #272 without
terminology noise.

**Merge this PR first. Once merged, #272 will be rebased on top of it
and the two terminology commits removed from that branch.**

## Sync recommendation

hand-written
marc0olo added 7 commits May 27, 2026 11:48
…d Bitcoin API costs

The Special features section was a stub with TODO comments for threshold
signing and Bitcoin API. Adds complete cost tables for all four feature
categories, verified against portal source material.

- Threshold ECDSA / Schnorr signing: cost table by key name (test_key_1
  and key_1), with note that cost is determined by the signing subnet
- VetKeys (vetkd_derive_key): same cost structure, same subnet layout
- EVM RPC canister: full cost formula plus collateral cycles requirement
  and worked example
- Bitcoin API: testnet and mainnet tables with base cost, minimum cycles
  to attach, and USD column; two-tier pricing model explained in prose

Also fixes the chain-key-cryptography.md link to point to the specific
#threshold-ecdsa-and-schnorr-signing anchor, and adds a cross-reference
from vetkeys.md to the cycle-costs reference.
- Remove dead-end HTTPS outcalls subsection under Special features
- Split Bitcoin API USD column into base cost and min-to-attach columns
- Fix EVM RPC description: formula uses different constants from HTTPS outcalls
- Add subnet IDs to ECDSA/Schnorr signing table (consistency with VetKeys)
- Add back-link from Bitcoin guide inline table to cycle-costs reference
- Update XDR rate May 2025 ($1.354820) -> May 2026 ($1.366430) across
  cycle-costs.md, subnet-types.md, and concepts/cycles.md
- Fix 34-node storage/month: was incorrectly $1.70, correct value is $1.18
  (861B cycles * $1.366430/T = $1.18, not $1.70)
… and new chain API tables

- Rename "Special features" to "Protocol integrations" and move HTTPS
  outcalls inside it as first subsection (all four integration types now
  grouped together)
- Add dedicated XDR exchange rate section (May 22, 2026: 1 XDR = $1.366430
  USD); remove month/year suffixes from all column headers
- Add Dogecoin integration API cost table (mainnet-only, costs verified
  against dfinity/dogecoin-canister interface/src/lib.rs; identical to
  Bitcoin Mainnet tier)
- Add SOL RPC canister section with pricing formula (standard HTTPS outcall
  + 10_000_000 cycles × n per-node processing fee × rpc_providers),
  verified against dfinity/sol-rpc-canister constants.rs and http/mod.rs;
  reference getBalanceCyclesCost and sibling query methods for per-call
  estimates
- Update upstream comment to include dogecoin-canister and sol-rpc-canister
  source files
- cycle-costs.md: expand XDR exchange rate section with CMC mechanics
  (5-minute XRC sampling, get_icp_xdr_conversion_rate returns ICP/XDR not
  XDR/USD), three machine-readable methods to derive XDR/USD (ICP dashboard
  API derivation formula, CMC metrics endpoint, on-chain XRC+CMC pattern)
- system-canisters.md: add "Querying the current ICP/XDR rate" subsection
  under CMC — documents get_icp_xdr_conversion_rate Candid signature,
  xdr_permyriad_per_icp unit semantics, and Prometheus metrics fields
  (cmc_icp_xdr_conversion_rate, cmc_avg_icp_xdr_conversion_rate,
  cmc_cycles_per_xdr); cross-links to cycle-costs#getting-the-current-xdrusd-rate
- cycles.md: add sentence pointing to cycle-costs for programmatic rate
  lookup, and note that CMC samples from XRC every 5 minutes
- exchange-rate-canister.md: clarify CMC is the XRC's primary consumer
  (calls every 5 minutes for ICP/XDR to use in cycle minting)
…pages

- concepts/cycles.md: replace messaging cost table with prose + link to
  cycle-costs.md; strip USD values from storage/canister creation numbers
- guides/chain-fusion/ethereum.mdx: remove duplicated EVM RPC formula,
  fix stale collateral cycles figure (0.00028 TC → 10_000_000 * nodes * rpc_services),
  link to cycle-costs.md#evm-rpc-canister for the full spec
- guides/chain-fusion/solana.mdx: add link to cycle-costs.md#sol-rpc-canister
- guides/canister-management/cycles-management.mdx: replace "Onchain" with
  "Network-based" in CycleOps description
…in integrations

- Splits `## Protocol integrations` in cycle-costs.md into two sections:
  `## Threshold cryptography` (threshold ECDSA/Schnorr, VetKeys) and
  `## Chain integrations` (HTTPS outcalls, EVM RPC, SOL RPC, Bitcoin, Dogecoin)
- Reorders sections for Diataxis: Cycle units → Replication factors → Cost
  table → formulas → Threshold cryptography → Chain integrations → XDR rate
- Reorders chain integrations by pricing mechanism: HTTPS outcalls (base
  primitive) → EVM RPC → SOL RPC (HTTPS-outcall-based) → Bitcoin → Dogecoin
  (two-tier model)
- Corrects EVM RPC collateral: consumed by the canister, not refunded; adds
  note that sending above the minimum is safe
- Renames "Cycles units" → "Cycle units"; moves XDR rate section to end;
  embeds current rate inline in the intro
- Fixes "On-chain (certified, from a canister)" → "From canister code
  (certified)" in the XDR rate section
- Fixes "specialized subnets" description to accurately describe the mechanism
- Updates concepts/cycles.md: replaces messaging cost table with prose + link;
  replaces single "Protocol integrations" bullet and paragraph with separate
  "Threshold cryptography" and "Chain integrations" entries, each linking to
  the corresponding reference section
- Removes duplicate EVM RPC formula from ethereum.mdx; corrects stale
  collateral figure to the current formula
@marc0olo marc0olo force-pushed the docs/cycle-costs-special-features branch from e016589 to 94cb11b Compare May 27, 2026 09:49
@marc0olo marc0olo changed the title docs: expand cycle-costs reference with Threshold cryptography and Chain integrations sections docs: expand cycle-costs reference with Threshold cryptography and External integrations sections May 27, 2026
@marc0olo
Copy link
Copy Markdown
Member Author

The brand voice / terminology changes mentioned in my earlier comment have been split into a separate PR (#277) and merged. This PR now contains only the substantive cycle costs changes described in the Review guidance section.

@marc0olo marc0olo removed the request for review from a team May 27, 2026 09:58
@marc0olo marc0olo removed the interface-spec Changes to the IC interface specification label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants