Overview
The Internet Computer registry is a system canister that stores and manages network configuration, node metadata, subnet information, and cryptographic keys. It provides versioned, immutable records that enable coordination across the distributed network. Source Location:rs/registry/
Registry Architecture
Version-Based Storage
The registry uses a version-based storage model where:- Each mutation creates a new version (monotonically increasing)
- Historical versions are preserved (immutable history)
- Clients can query any past version
- Version 0 represents the empty registry
Storage Representations
The registry supports two stable storage formats:- VERSION_1 (Current)
- VERSION_UNSPECIFIED (Legacy)
Changelog-based representation indexed by version:Preserves complete history of changes applied to the registry.
Protocol Buffer Definitions
Defined inrs/registry/canister/proto/ic_registry_canister/pb/v1/registry.proto
ChangelogEntry
Represents a single mutation in the registry’s version history.
The registry version produced by this mutation
Serialized
RegistryAtomicMutateRequest with preconditions removed. Stored as bytes to ensure hash stability across schema changes.RegistryStableStorage
Container for registry data that gets persisted to stable memory.
Indicates which storage representation is used
List of all mutations in chronological order (VERSION_1 only)
RegistryCanisterStableStorage
Top-level container written to stable storage during canister upgrades.
The actual registry data
Version before upgrade, used to detect rollbacks after upgrade
Registry Canister API
Defined inrs/registry/canister/api/src/lib.rs
Node Registration
AddNodePayload
Request to add a new node to the network.
Node’s public signing key (raw protobuf PublicKey bytes)
Public key for committee participation
Non-interactive DKG encryption public key
X.509 certificate for transport layer security
Interactive DKG encryption public key (optional for backward compatibility)
Endpoint for cross-subnet communication
HTTP endpoint for client requests
SEV-SNP attestation for secure node registration. When provided, the registry verifies the attestation and extracts the chip_id.
IPv4 network configuration
IPv4Config
Network configuration for IPv4 connectivity.
Constructor:
UpdateNodeDirectlyPayload
Request to update an existing node’s cryptographic keys.
UpdateNodeIPv4ConfigDirectlyPayload
Request to update a node’s IPv4 configuration.
Subnet Queries
GetSubnetForCanisterRequest
Query which subnet a canister is assigned to.
The canister’s principal ID
There is no guarantee that the canister exists, even if a subnet ID is returned. This query only checks the routing table.
Rewards
GetNodeProvidersMonthlyXdrRewardsRequest
Query monthly XDR rewards for node providers.
NodeProvidersMonthlyXdrRewards
Maps node provider IDs to their monthly rewards.
Map from node provider principal ID to reward amount in 10,000ths of an SDR (XDR)
Registry version at which rewards were calculated
API Boundary Nodes
GetApiBoundaryNodeIdsRequest
Query for API boundary node IDs.
ApiBoundaryNodeIdRecord
Response containing boundary node IDs.
Chunk Management
GetChunkRequest
Request for large registry entries split into chunks.
When a registry entry is too large for a single response, it’s split into chunks that must be fetched individually.
Chunk
Response containing chunk data.
Registry Client Interface
See Registry Client Interface for details on theRegistryClient trait.
Query Methods
get_versioned_value
Get a value at a specific version with metadata
get_value
Get a value at a specific version
get_key_family
Get all keys matching a prefix
get_latest_version
Get the current registry version
Stored Configuration Types
The registry stores various types of network configuration:Node Records
- Node public keys (signing, committee, DKG)
- Network endpoints (XNet, HTTP, P2P)
- TLS certificates
- IPv4 configuration
- SEV attestation data
- Reward types
Subnet Records
- Subnet membership (list of nodes)
- DKG transcripts
- Threshold signature keys
- Subnet configuration parameters
- Canister routing table
Cryptographic Keys
- NI-DKG dealing encryption keys
- I-DKG dealing encryption keys
- Threshold signature public keys
- Chain key configurations
Network Topology
- Subnet assignments
- Node provider information
- API boundary nodes
- Routing tables
Security Features
SEV-SNP Attestation
Custom data embedded in SEV attestation reports for secure node registration.
- Binds the attestation to the node by including
node_signing_pk - Used to construct and verify
node_registration_attestation - Ensures registered nodes have valid hardware attestations
Version Management
Version Guarantees
Monotonically Increasing: Each mutation produces version n+1 from version n
Immutability: Historical versions never change once created
Availability: Latest version is always fully available to clients
Determinism: Same query parameters always return the same result
Empty Registry
None at this version.
Example Usage
Querying Registry
Adding a Node
Polling for Updates
See Also
- Core Types - Registry version and ID types
- Core Interfaces - RegistryClient trait definition
- NNS Governance - How registry updates are governed
- Threshold Cryptography - DKG and threshold signatures