Resources

Understanding DFINITY: A Deep Dive into the Internet Computer Protocol (ICP) and Web3

The Internet Computer (IC) is a blockchain network that aims to provide an open and scalable platform for decentralized applications. It utilizes distributed data centers, nodes, subnets, and canisters as its building blocks. Canisters serve as smart contracts, storing both code and ecosystem state. Chain Key Cryptography enables efficient transaction validation and secure message validation. The Network Nervous System (NNS) governs the network through proposals and voting using neurons. The consensus model combines Chain Key Cryptography with a Byzantine Fault Tolerant (BFT) system. Non-Interactive Distributed Key Generation (NI-DKG) ensures the secure redistribution of public keys within subnets. Overall, the Internet Computer empowers developers to build applications without traditional limitations.

Understanding DFINITY: A Deep Dive into the Internet Computer Protocol (ICP) and Web3

The Internet Computer (IC) is a blockchain network launched by DFINITY in 2020. It aims to provide a scalable and high-speed platform for smart contract development and decentralized applications, with the goal of returning the freedom to developers and creating an open ecosystem. The IC allows developers to build software without the censorship and control that is prevalent on many large platforms.

The IC encourages the development of various applications, including decentralized finance (DeFi) platforms, decentralized websites, and social media applications. It provides a unique architecture consisting of distributed data centers, nodes, subnets, and canisters.

Canisters are a key component of the IC's architecture and serve as smart contracts that store both the application's code and the ecosystem's state. Developers can write code in languages like Rust or Motoko, enabling enhanced performance capabilities compared to smart contracts on Ethereum.

The IC relies on several innovative technologies to function effectively:

  1. Chain Key Cryptography: This set of cryptographic protocols directs the nodes on the IC. It enables the use of a single network-wide public key, allowing devices of various sizes to verify data. Chain Key Cryptography also facilitates quick transaction validation and improves the IC's speed by dividing smart contract function execution into update calls and query calls.
  2. Network Nervous System (NNS): The NNS is an open governance system that manages the entire network. It oversees upgrades, sets economic parameters, and rearranges or forms subnets. Neurons, created by staking the IC's native token (ICP), are used to submit proposals and vote on incoming proposals, with the dissolve delay influencing voting rewards.
  3. Consensus Model: The IC achieves consensus through a unique system of queries and updates, using Chain Key Cryptography. It is a Byzantine Fault Tolerant (BFT) system, meaning it can execute software even if some nodes are faulty or malicious. The consensus protocol consists of four layers: identity, random beacon, blockchain, and notary layers, enabling block making, notarization, random beacon generation, and finalization.
  4. Non-Interactive Distributed Key Generation (NI-DKG): NI-DKG allows for the redistribution of new public keys corresponding to a subnet as nodes change. It utilizes a non-interactive key sharing system with zero-knowledge proofs and forward secrecy to securely broadcast messages between old and new nodes.

The ICP token plays several roles within the IC ecosystem, including governance, network rewards, and fuel for canister computation. It serves as a governance token when staked in neurons, rewards neuron owners for voting on proposals, and provides network rewards to nodes securing the network. Additionally, ICP tokens can be converted into a stablecoin called Cycles, which is used to pay for computation done by canisters.

Overall, the Internet Computer is a groundbreaking blockchain network that aims to create an open and scalable platform for decentralized applications, enabling developers to build software without the limitations imposed by traditional platforms.

Internet Computer's building blocks

The Internet Computer's building blocks consist of distributed data centers, nodes, subnets, and canisters. Let's take a closer look at each of these components and how they work together:

  1. Distributed Data Centers: The Internet Computer network consists of independent data centers distributed across the world. These data centers host specialized hardware nodes and contribute to the network's overall computing power and decentralization. By distributing the data centers globally, the Internet Computer aims to provide a highly available and fault-tolerant infrastructure.
  2. Nodes: Nodes are the individual components that make up the network. They run the Internet Computer Protocol (ICP) software and contribute to the processing and verification of transactions and smart contract execution. Nodes collaborate to form subnets.
  3. Subnets: Subnets are essentially blockchains within the Internet Computer network. They are formed by groups of nodes that collaborate to process and validate transactions. Each subnet has its own public key, and nodes within a subnet collectively sign messages using their individual shares of the private key corresponding to the subnet's public key.
  4. Canisters: Canisters are the key building blocks of the Internet Computer's functionality. They allow developers to build applications on the protocol. Canisters are highly scalable and can interact with each other. They store both the code for the application and the state of the ecosystem in which it operates. Developers can write code for canisters using programming languages like Rust or the Internet Computer's native language, Motoko. Canisters can be seen as similar to smart contracts on Ethereum but with enhanced performance capabilities.

Together, these building blocks create a decentralized and scalable platform that enables developers to build applications on the Internet Computer. The distributed data centers provide the infrastructure, nodes process and validate transactions, subnets enhance scalability and fault-tolerance, and canisters encapsulate the code and state of applications running on the protocol.

Chain Key Cryptography

Chain Key Cryptography plays a crucial role in the Internet Computer Protocol (ICP) by providing a set of cryptographic protocols that direct the nodes on the network. The use of Chain Key Cryptography brings several important benefits to the Internet Computer:

  1. Single Network-wide Public Key: Chain Key Cryptography allows the network to use a single network-wide public key, which is only 48 bytes in size. This is significant because it enables devices as small as smartwatches and phones to efficiently verify data. By having a compact public key, even resource-constrained devices can participate in the network's cryptographic operations, enhancing inclusivity and accessibility.
  2. Faster Transaction Validation: With the help of Chain Key Cryptography, the Internet Computer can validate transactions in 1-2 seconds. Although not as fast as web browsing, this is still a remarkable achievement considering the decentralized nature of the network. By employing efficient cryptographic protocols, Chain Key Cryptography contributes to the overall speed and responsiveness of the system.
  3. Update Calls and Query Calls: The Internet Computer divides smart contract function execution into two distinct message types: 'update calls' and 'query calls.' Update calls modify the state of the canister and typically take 1-2 seconds for validation. On the other hand, query calls are read-only operations that do not alter the canister's state and can be executed in milliseconds. This differentiation allows for faster response times when querying information from canisters, providing a more interactive user experience.
  4. Secure Message Validation: When a user interacts with an app on the Internet Computer, the ICP sends a message to the corresponding canister. The canister executes the requested operation based on the message content and delivers a response back to the user. To ensure the integrity and authenticity of the messages, canisters are run on multiple nodes, preventing single points of failure. Each node within a subnet signs the message using its share of the private key corresponding to the subnet's public key. The subnet public key verifies the signatures, and the network public key signs the final message, establishing a chain of trust.
  5. Scalability and Upgradability: Chain Key Cryptography facilitates the addition of new nodes when creating new subnets, allowing the network to scale and accommodate more participants. It also enables the quick replacement of defective nodes, ensuring the network's robustness and resilience. Additionally, the smooth upgrading of the ICP is made possible through the use of cryptographic protocols provided by Chain Key Cryptography, allowing for the introduction of new features and enhancements without disrupting the overall operation of the network.

In summary, Chain Key Cryptography is instrumental in providing secure communication, faster transaction validation, differentiation between update and query calls, and enabling scalability and upgradability within the Internet Computer Protocol. It enhances the functionality, performance, and accessibility of the network while maintaining a high level of security and decentralization.

Network Nervous System (NNS)

The Network Nervous System (NNS) is the open governance system that manages the entire Internet Computer network. It is responsible for overseeing upgrades, setting economic parameters, and rearranging or forming subnets. While the NNS runs the network, it allows anyone to participate by putting forward proposals.

Proposals are submitted through the use of neurons, which are special accounts created by staking the network's native token, ICP. By staking ICP, participants create neurons that can be used for both submitting proposals and voting on incoming proposals. The locked ICP in a neuron can only be released by disbursing the neuron.

Creating and participating in neurons is incentivized by the network. Neuron holders receive rewards for voting on proposals, encouraging active participation in the governance process. The rewards depend not only on the amount of ICP staked but also on the neuron's age, voting activity, and the "dissolve delay."

The "dissolve delay" refers to the amount of time a neuron takes to dissolve after being put into "dissolve mode." When a neuron is dissolved, the owner can unlock the ICP balance. Each neuron has a pre-set dissolve delay of six months, which can be exclusively toggled upward to a maximum of eight years. The NNS rewards longer dissolve delays with higher voting rewards, providing an incentive for participants to commit to the governance process in the long term.

To prevent an oversaturation of proposals, the NNS imposes a fee on neurons that submit proposals that are ultimately rejected. This fee discourages spam or low-quality proposals and encourages participants to submit well-considered proposals.

In summary, the Network Nervous System (NNS) serves as the open governance system for the Internet Computer network. Neurons, created by staking ICP, are used to submit proposals and vote on them. Participants are incentivized to create neurons and actively participate in the governance process through rewards. The dissolve delay determines when a neuron can be dissolved, with longer delays earning higher voting rewards. The NNS fee discourages the submission of rejected proposals.

Consensus Model

The Internet Computer utilizes a unique consensus model that combines Chain Key Cryptography with a Byzantine Fault Tolerant (BFT) system. This consensus model enables the network to achieve agreement among nodes even in the presence of faulty or malicious nodes.

The nodes in the network, which are distributed across different data centers, are referred to as replicas. The consensus process is delegated to a random selection of replicas, forming a committee, through a method called Threshold Relay. This committee is updated periodically, enhancing the scalability and efficiency of the Internet Computer.

The consensus protocol is composed of four layers: the identity layer, random beacon layer, blockchain layer, and notary layer.

  1. Identity Layer: The identity layer requires replicas to register by making a stake deposit with a lock-up period. This registration process adds a variation of Proof-of-Stake to the Internet Computer's consensus model, as the stake deposit serves as a form of participation and influence in the consensus process.
  2. Random Beacon Layer: The random beacon layer generates a source of randomness that is crucial for the consensus protocol. This randomness is used for various purposes, including committee selection and block creation.
  3. Blockchain Layer: The blockchain layer hosts the process of block making, where the selected replicas in the committee create blocks of transactions. These blocks form the basis of the network's ledger and represent the state of the Internet Computer.
  4. Notary Layer: The notary layer handles the process of notarization, which involves confirming and finalizing the blocks created in the blockchain layer. Notarization ensures the validity and consistency of the blockchain, providing a high level of security and trust.

These four layers work together to enable consensus on the Internet Computer. The block making process creates new blocks, the random beacon layer provides a source of randomness, the notary layer ensures the finality of blocks, and the identity layer with stake deposits adds a Proof-of-Stake element to the consensus model.

Overall, the consensus protocol of the Internet Computer consists of these four layers, each contributing to the processes of block making, notarization, random beacon generation, and finalization, thereby achieving consensus among the network's replicas.

Non-Interactive Distributed Key Generation (NI-DKG)

Non-Interactive Distributed Key Generation (NI-DKG) is a mechanism utilized by the Internet Computer to address the issue of changing nodes and the redistribution of public keys within subnets. It enables the secure sharing of new public keys without the need for interactive communication between old and new nodes.

To facilitate the key sharing process, each subnet in the Internet Computer has a static public key associated with it. When nodes in a subnet change, the old nodes broadcast a message to the new nodes. This message contains non-interactive zero-knowledge proofs, which provide a cryptographic mechanism for proving knowledge of a secret without interactive back-and-forth communication.

Additionally, forward secrecy encryption is employed to ensure the security of the key sharing process. Forward secrecy ensures that even if an adversary gains access to encrypted data in the future, they cannot decrypt it using the current or future secret keys.

To enhance security and prevent the compromise of secret key shares, the Internet Computer's design incorporates proactive measures. This involves periodically resharing new threshold shares of the signing key among the nodes, even if the subnet's node composition remains unchanged for an extended period. By periodically refreshing key shares, the system mitigates the risk of bad actors discovering and compromising secret key shares. Once nodes receive their new key shares, they securely delete the old ones to maintain the integrity of the system.

In summary, NI-DKG is a non-interactive key sharing system employed by the Internet Computer to enable the redistribution of new public keys within subnets. It utilizes non-interactive zero-knowledge proofs and forward secrecy encryption to securely share keys between old and new nodes. The proactive security measures of periodically refreshing key shares ensure the resilience of the system against potential attacks.

Grant Program

Calling all developers! Join the DFINITY Grant Program and be part of the revolutionary Internet Computer network. As a participant, you'll have the opportunity to contribute to the open and scalable platform for decentralized applications. Whether you're interested in building decentralized finance platforms, social media applications, or other innovative solutions, the DFINITY Grant Program welcomes you.

By joining the program, you'll gain access to resources, funding, and support to turn your ideas into reality. Don't miss out on the chance to work with cutting-edge technologies like Chain Key Cryptography, the Network Nervous System (NNS), and Non-Interactive Distributed Key Generation (NI-DKG). Develop applications without censorship and control, and become part of the open ecosystem that returns freedom to developers.

Visit our website today to learn more about the DFINITY Grant Program and how you can apply. Together, let's shape the future of decentralized applications and unlock new possibilities for developers worldwide. Join us now!

Stay up-to-date with the latest news and updates from DFINITY by following us on Twitter. Join our vibrant community of developers, enthusiasts, and blockchain enthusiasts. Be the first to know about new features, product releases, events, and exciting announcements. Follow @dfinity on Twitter today and be part of the future of decentralized applications. Don't miss out on any important updates – join us now! #DFINITY #DecentralizedApplications #Blockchain