Skip to main content

Architecture

The Tezlink architecture is very close to that of Etherlink. Like Etherlink, Tezlink network architecture has two main components: the nodes and the sequencer.

Sequencer

Tezlink relies on a sequencer to put operations in order and publish them to the nodes. The sequencer receives operations from Tezlink nodes and packages them into a Tezlink block based on the order it received them (first-in, first-out).

The sequencer generates blocks at a variable rate, depending on demand. Currently, it generates a block at least every 6 seconds, even if the block is empty. As demand increases, it generates blocks more quickly, up to a block every 500ms.

Nodes

Tezlink relies on three types of nodes, with instances of each type running in different modes:

  • Tezlink nodes: Tezlink nodes have several functions:

    • They maintain a local copy of the Tezlink state and update it as they receive operations from the sequencer
    • They expose a JSON-RPC interface for clients to request information from and submit operations to
    • They forward submitted operations to the sequencer
    • They check Smart Rollup nodes to verify that these operations make it to Tezos layer 1
  • Smart Rollup nodes: Smart Rollup nodes are Octez daemons that run the kernel of a Tezos Smart Rollup. For more information about Smart Rollup nodes in general, see Smart Rollup node in the Octez documentation.

    Tezlink Smart Rollup nodes run the kernel for the Tezlink Smart Rollup and store the state of the Tezlink blockchain from the perspective of Tezos layer 1. They monitor the Tezos layer 1 Smart Rollup inbox, filter the inbox to Tezlink-related messages, process them, and update their states. Importantly, the Smart Rollup nodes store the state of Tezlink based on the information that they get from layer 1, not on information from Tezlink nodes or the sequencer.

  • Tezos layer 1 nodes: Layer 1 nodes are responsible for the state of layer 1. In addition to ordinary layer 1 operations, they receive Tezlink blocks from the sequencer. Then they publish the Tezlink blocks in the Smart Rollup inbox in layer 1 blocks. For more information about Tezos layer 1 and its nodes, see Architecture on docs.tezos.com.

Operation flow

The lifecycle of a typical Tezlink operation is as follows:

  1. A user submits an operation to a Tezlink node.
  2. The node validates the operation and forwards it to the sequencer.
  3. The sequencer queues the operation.
  4. The sequencer puts the operation into a block as soon as possible (less than 500ms after receiving it in a nominal scenario).
  5. The sequencer publishes the block to the Tezlink nodes, which update their states based on the operation in the block.
  6. The sequencer publishes the block to the Smart Rollup inbox on layer 1 via a Smart Rollup node running in operator or batcher mode.
  7. The Smart Rollup nodes tracking the state of Tezlink fetch the block from the Smart Rollup inbox, read its operations, and update their states.
  8. The Tezlink nodes check the state of the Smart Rollup nodes to verify that blocks have successfully and faithfully been finalized on layer 1.
  9. The Smart Rollup nodes running in operator mode post hashes of Tezlink's state to layer 1 as commitments.