How the Internet Computer Works
Learn how the Internet Computer blockchain works and explore its technology, open-source repositories, in-depth video academy sessions, white papers, publications, and long-form deep dives.
Internet Computer Stack
The last original Layer 1 blockchain project has launched a revolutionary public network that provides a limitless environment for smart contracts that run at web speed, serve web, scale, and reduce compute costs by a million times or more. Build everything from DeFi, to mass market tokenized social media services that run on-chain, or extend Ethereum dapps.
The Internet Computer was launched and open-sourced on May 10th 2021 by the DFINITY Foundation.
Chain key cryptography
Chain Key cryptography is one of the fundamental breakthroughs enabling the Internet Computer to scale to millions of nodes. The most notable innovation of Chain Key cryptography is that the Internet Computer has a single public key, which enables any device to verify the authenticity of artifacts generated by the Internet Computer, even smart watches and mobile phones.
NIDKG is a cryptographic protocol to distributedly generate key shares for each of the nodes participating in a subnet blockchain. It applies advanced cryptography, including encryption with forward secrecy and noninteractive zero-knowledge proofs of correct key sharing.
The Internet Computer blockchain is designed to be secure, reliable, and scalable. Scalability is provided through subnet blockchains that run Canister smart contracts on a selection of nodes. The peer-to-peer layer ("P2P") enables reliable and secure communication between nodes participating in the same subnet. P2P collects and advertises messages from users, as well as from other nodes, so that they will eventually be replicated across all nodes in the same subnet blockchain.
The Internet Computer blockchain runs on a network of nodes in independent data centers located around the world. In each of its subnet blockchains, the participating nodes must process the same messages in the same order to ensure that they achieve the same state. To this end, the Internet Computer relies on a novel consensus protocol, as described in this presentation.
The Internet Computer blockchain enables users to send messages to canister smart contracts and canisters to send messages between themselves. For scalability, the Internet Computer is composed of many subnet blockchains and the Internet Computer's Network Nervous System can add new subnets as required. The message routing component routes messages to and from canisters across all of the Internet Computer's subnet blockchains and ensures that new subnets can be added seamlessly.
Here you can see how to create canister smart contracts on the Internet Computer, how to install and upgrade their software, and how to top up canisters with cycles.
Network Nervous System
The Network Nervous System (NNS) is the open algorithmic system governing the Internet Computer blockchain. Its most notable innovations include its ability to upgrade the Internet Computer protocol and software running on node machines, onboard new node providers, add node machines into the blockchain network, and create new subnet blockchains to increase capacity. Anyone can participate in the NNS by staking ICP tokens into one or more neurons. Neurons can submit proposals and decide to adopt or reject them. The NNS implements liquid democracy: neurons can follow other neurons a delegate voting power.
The Internet Computer Protocol has been designed to provide a reliable service despite some of the nodes failing or misbehaving. More precisely, even if a node has been offline for a while or is being added to a subnet, efficient mechanisms are in place to ensure that such a node is able to process messages quickly. This involves learning which other nodes to connect to, gathering the necessary key material and information to participate in the consensus algorithm, and obtaining a recent checkpoint of the state and the queues of the canister smart contracts hosted on the subnet. The latter is particularly challenging, since it can require several GiB of data to be transmitted to the node that is catching up.
The Internet Computer blockchain is powered by nodes located in numerous independent data centers around the world. These nodes are running the Internet Computer Protocol (ICP) that ensures security and reliability for canister smart contracts through sufficient replication of canister state and computation. In this talk, the parts of the protocol are explained that enable nodes to catch up to the lasted replicated state and to resume participation in the blockchain after they have been disconnected from the network. The same mechanism is also key when a new node gets added to one of the Internet Computer's subnet blockchains.
The Internet Computer blockchain is governed by the Network Nervous System (NNS), its algorithmic governance system. One of the many duties of the NNS is to orchestrate upgrades to the Internet Computer to a new protocol version, when the community has adopted a upgrade proposal. Making upgrades to any blockchain requires solutions to several challenging problems posed by the nature of a decentralized system including how to allow arbitrary changes to the protocol, preserve state of all canister smart contracts, minimize downtime, and roll out upgrades autonomously.
Ingress message lifecycle
When a user sends an update call to a canister smart contract on the Internet Computer, it traverses several components before it is actually executed. In a first step, P2P ensures that it is broadcast to a sufficiently large set of other nodes. At some point, consensus forms a block that contains the message and passes it in a batch to message routing, which in turn inserts it into its destination canister’s queue, where it waits for the scheduler to select the next message to be executed. A message is subject to several checks, and a number of conditions must be satisfied for it to make it into the Induction Pool for execution to ensure that the right parties are charged and rewarded for its processing.
Motoko is a new programming language for smart contracts. It is designed to seamlessly support the programming model of the Internet Computer and makes it easier to take advantage of the unique features of the blockchain. Motoko is strongly typed, actor-based, and has built-in support for orthogonal persistence and asynchronous message passing. Productivity and safety features include automatic memory management, generics, type inference, pattern matching, and both arbitrary- and fixed-precision arithmetic. Messaging transparently employs the Internet Computer’s Candid interface definition language and wire format for typed, high-level, and cross-language interoperability.
Canister smart contracts can declare variables as certified. Whenever set, these variables will automatically get a Merkle tree certificate, signed by the Internet Computer blockchain. This allows anyone to verify the authenticity of this type of data using the Internet Computer's public key.
The Internet Computer protocol has been extended to add smart contracts to Bitcoin. An application of Chain Key cryptography gives each canister their own Bitcoin public key, thus directly integrating the Internet Computer blockchain with the Bitcoin network. In particular, smart contracts on the Internet Computer will be able to hold, send and receive their own Bitcoin.
Service Nervous System (SNS)
An SNS would derive from the Network Nervous System (NNS) , the autonomous tokenized governance system that controls the Internet Computer blockchain in a completely open, permissionless, and decentralized manner.
Threshold ECDSA signing
ECDSA signatures are widely used in the blockchain industry. This feature will enable canister smart contracts to have an ECDSA public key and to sign with regard to it. The corresponding secret key is threshold-shared among the nodes of the subnet holding the canister smart contract. This is a prerequisite for the direct integration between the Internet Computer and Bitcoin and Ethereum.
Today, the main means of identity and authentication prevalently used online are usernames and passwords. The Internet Computer blockchain has replaced this model with a more advanced and much more secure method of cryptographic authentication that is more convenient, works across all of a user's devices, and helps to protect user privacy.