Interactions

This section explores how sequencer node interacts with Laïka smart contracts. It's intended for developers building sequencer applications and outlines the key functionalities sequencers perform.


Communication with Smart Contracts

Sequencer node interacts with Laïka smart contracts to fulfill its responsibilities. Here's an overview of the interaction process:

  • Sequencer Client: Sequencer node runs a client application that connects to Laïka's smart contracts using a secure communication channel, the client also requires a full Dogecoin Node be run along with the Laïka Node.

  • Contract Interaction Methods: The sequencer client utilizes functions exposed by the relevant smart contracts (e.g., Sequencer contract, Fee contract). These functions allow sequencers to perform actions like:

    • Submitting batches of L2 transactions.

    • Publishing ZK proofs for the batched transactions.

    • Withdrawing earned fees (subject to specific fee distribution mechanisms).


Batching and Submitting Transactions

Sequencers play a crucial role in optimizing transaction processing on Laïka. Here's a breakdown of their workflow:

  1. Transaction Pool: The sequencer maintains a pool of L2 transactions submitted by users on the Laïka network.

  2. Batch Creation: The sequencer node efficiently aggregates multiple transactions into batches to minimize gas costs when submitting them to the L1 blockchain.

  3. L1 Submission: The sequencer submits the batched transactions to the L1 blockchain (Dogecoin) for inclusion in a block. This leverages L1's security while enabling faster and cheaper transactions on L2.


Ensuring L2 Transaction Verifiability with zk-SNARKs

To guarantee the verifiability of L2 transactions even if the original L1 data becomes unavailable, sequencers leverage zk-SNARKs (Zero-Knowledge Succinct Non-interactive Argument of Knowledge).

zk-SNARK Proof Generation:

Data Commitment:

The sequencer generates a commitment (public key) for the entire block data, including transactions. This commitment acts as a compressed representation of the data.

zk-SNARK Proof Creation:

The sequencer utilizes a zk-SNARK proving system to generate a cryptographic proof. This proof demonstrates the knowledge of the actual block data corresponding to the commitment without revealing the data itself.

Submitting zk-SNARK Proof

Once the zk-SNARK proof is generated, the sequencer submits it alongside the batched transactions to Laika's smart contracts:

Proof Publication: The sequencer publishes the zk-SNARK proof to the Sequencer contract on L2. This allows validators to efficiently verify the data availability of L2 transactions on the L1 blockchain without requiring the entire L1 data. Validators also submit their own Proofs to further increase trust and provide decentralized trust between the Validators and Sequencers.

Last updated