dfinity/ic Repository Documentation

repository·master·Indexed 23 days ago

https://github.com/dfinity/ic

Development and build documentation for the Internet Computer (IC), featuring comprehensive guides on using Bazel for Rust and Go development, IC-OS development in containers, and the SNS CLI. Includes instructions for managing Rust targets, third-party crates, flaky tests, and deploying independent API boundary nodes for disaster recovery.

Tokens
252.8K
Snippets
503
Records
1.3K
Agent score
83%

What's inside dfinity/ic

  1. Overview of IC Metrics Assert

    master

    ic-metrics-assert is a library providing fluent, regex-based assertions for testing Prometheus-style metrics exposed by Internet Computer (IC) canisters. It allows developers to verify the state of canister metrics via the /metrics HTTP endpoint.

    Key capabilities include:

    • Querying metrics directly from a canister's /metrics endpoint.
    • Performing regex-based assertions on metric values.
    • Supporting both synchronous and asynchronous test flows.
    • Integration with PocketIc for local canister testing environments.
  2. Overview of the NNS Governance Canister

    master

    The Network Nervous System (NNS) Governance canister is the central component of the Internet Computer's governance. It manages the staking of ICP tokens to create 'neurons', which are the entities used to vote on or create proposals.

    Proposals managed by the Governance canister can:

    1. Update the Internet Computer Protocol (ICP) code, including the Governance canister itself.
    2. Add nodes to an IC subnet.
    3. Create a Service Nervous System (SNS), which provides similar governance capabilities for individual dapps.
  3. Overview of the Bitcoin Checker Canister

    master

    The Bitcoin checker canister (oltsj-fqaaa-aaaar-qal5q-cai) provides a service for canisters using the Internet Computer's Bitcoin integration to verify if a Bitcoin address or transaction is associated with illicit activities. It checks addresses against the Specially Designated Nationals (SDN) list provided by OFAC.

    Key behaviors:

    • Address/Transaction Hit: If a match is found on the SDN list, the check returns Failed.
    • Integration Example: The ckBTC minter canister uses this to prevent minting from tainted deposits (quarantining the BTC instead) or to block tainted withdrawals.
  4. Overview of the IC Crypto Component and related crates

    master

    The Crypto Component of the Internet Computer (IC) provides core cryptographic functionality. It is divided into the main component used by the replica and several smaller, specialized public crates.

    Key Components:

    • ic-crypto: The primary Crypto Component used by a replica. It includes the SecretKeyStore, which is responsible for managing and protecting the secret keys owned by a node.
    • Public Utility Crates: A collection of smaller crates providing specific cryptographic primitives (hashing, signature validation, tree hashing, etc.). Many of these are compatible with WebAssembly (Wasm).

    Important Note on Usage: Do not use crates located in the internal/ directory directly. These contain the underlying implementations for the public crates and are intended for internal use within the /crypto/ directory only.

  5. Overview of GuestOS Recovery components

    master

    GuestOS Recovery consists of two primary components used to perform GuestOS upgrades and complete recovery processes, primarily during NNS (Network Nervous System) recovery events.

    1. guestos-recovery-upgrader: A lightweight component triggered from the HostOS limited-console to perform a GuestOS upgrade using a specified update image version.
    2. guestos-recovery-engine: A service triggered by the GuestOS image once recovery has started, which completes the full recovery process.
  6. Overview of dfn_http types for HTTP communication

    master

    The dfn_http collection provides types used by both the http_handler and Canisters to facilitate sending and receiving messages from the HTTP gateway. This enables developers to build canisters that function like regular web servers by communicating over structured HTTP.

    Note on implementation: Currently, HTTP requests are structured rather than being raw byte arrays (as per the public spec). This design choice was made to handle requests that arrive in multiple chunks and to allow the server to send messages to maintain chunk flow, which would be impractical or impossible using standard consensus or stateless query calls. This implementation is subject to change.

  7. Overview of NNS common types and interfaces

    master
    The rs/nns/common Cargo module provides a centralized collection of shared types and interfaces used across various Network Nervous System (NNS) canisters. Developers building or interacting with NNS-related canisters should use this module to ensure type compatibility and consistent interface implementation with the rest of the NNS ecosystem.