Difference between revisions of "Replicated state structure"

From Internet Computer Wiki
Jump to: navigation, search
Line 3: Line 3:
  
 
== Per-round Certified State ==  
 
== Per-round Certified State ==  
In each consensus round, one of the nodes in the subnet proposes a new block. The nodes in the subnet execute consensus protocol to finalize one block for consensus round. Finalized blocks are passed onto the <i>message routing</i> layer. Message routing layer routes each message in the block into queue of the target canister.  
+
In each consensus round, one of the nodes in the subnet proposes a new block. The nodes in the subnet execute the consensus protocol to finalize one block per consensus round. Finalized blocks are passed onto the <i>message routing</i> layer. Message routing layer routes each message in the block into the appropriate queue of the target canister.  
 +
 
 +
For each canister C running on a subnet, there are several input queues. There is one input queue specifically for ingress messages (sent by the external users) to C. For each other canister C′, with whom C communicates, there is one input queue. In each round, the execution layer will consume some of the inputs in these queues, update the replicated state of the relevant canisters, and place outputs in various output queues. For each canister C running on a subnet, there are several output queues. For each other canister C′, with whom C communicates, there is one output queue.
 +
 
 
[[File:Per-Round certified state.png|1000px|frameless|left]]
 
[[File:Per-Round certified state.png|1000px|frameless|left]]

Revision as of 22:23, 10 November 2022

This Page is Still Work in Progress

Each node of the Internet Computer maintains a state. The state includes the data related to canisters, the messages processed by the node, responses generated after processing the messages, etc. A portion of the state is individual to each node (Eg: messages received in the peer-to-peer layer). A portion of the state is identical for all the honest nodes in the subnet. This portion of the state is called replicated state of the subnet. In this article, we describe the structure of the replicated state stored on the Internet Computer.

Per-round Certified State

In each consensus round, one of the nodes in the subnet proposes a new block. The nodes in the subnet execute the consensus protocol to finalize one block per consensus round. Finalized blocks are passed onto the message routing layer. Message routing layer routes each message in the block into the appropriate queue of the target canister.

For each canister C running on a subnet, there are several input queues. There is one input queue specifically for ingress messages (sent by the external users) to C. For each other canister C′, with whom C communicates, there is one input queue. In each round, the execution layer will consume some of the inputs in these queues, update the replicated state of the relevant canisters, and place outputs in various output queues. For each canister C running on a subnet, there are several output queues. For each other canister C′, with whom C communicates, there is one output queue.

Per-Round certified state.png