Skip to content
Blockchain Association of Cameroon
BAC-L2-SUB-112Substrate / Polkadot SDKAdvanced

Runtime APIs and custom RPC

Exposing a read the raw storage does not give directly, without turning the node into an application server.

Level
L2Appchain developer
Duration
4 h
Track
Substrate / Polkadot SDK
Maintainer
Polkadot / Substrate Lead Architect

Learning objectives

  • 01Define a runtime API and expose it over RPC
  • 02Separate what must be computed on-chain from what must not
  • 03Version an API without breaking existing clients

Guided lab

Expose an aggregated view of the registry over RPC and query it from a TypeScript client.

Independent lab

Version the API and demonstrate two client generations coexisting.

Security angle

An unbounded public RPC is a denial-of-service vector: bound it, paginate it, rate-limit it.

Assessment

API successfully queried by a peer's client.