Basic Concepts

Operations

There are two types of operations in Horizon Network's Layer 2:

Priority Operations

  • At Horizon Network, users can execute priority operations on the Ethereum mainnet through transactions that are identified by a numeric ID or hash. A deposit transaction is an example of a priority operation that moves funds from the Ethereum network to the Horizon Network.

There are currently two types of priority operations on Horizon Network:

  1. Deposit: This operation facilitates the movement of funds from the Ethereum network to the Horizon Network by directing them to the designated account. If the recipient account doesn't exist yet on the Horizon Network, it will be automatically created and assigned a unique numeric ID.

  2. FullExit: In the event of censorship or other emergency situations, the FullExit operation allows users to withdraw funds from the Horizon Network to the Ethereum network without needing to interact with the Horizon Network server. This operation is also useful when the signing key for an account on Horizon Network cannot be set, such as with smart contract addresses.

Transactions

  • When using Horizon Network, customers need to send transactions through the network's operator using the API to interact with it. The transactions on the Horizon Network are identified by the hash of their serialized representation.

There are several types of transactions that can be performed on Horizon Network:

  1. Transfer: Transfers funds from one Horizon Network account to another. If the recipient account doesn't exist yet on the network, it will be automatically created and assigned a unique numeric ID.

  2. Withdraw: Withdraws funds from the Horizon Network to the Ethereum network.

  3. MintNFT: This transaction mints an NFT based on a provided content hash to the designated recipient.

  4. WithdrawNFT: This transaction withdraws an NFT from Horizon Network to the Ethereum network.

Blocks

  • The Horizon Network organizes all actions into blocks, which is similar to how transactions are handled on the Ethereum mainnet. Once the Horizon Network operator creates a block, it is sent to the Horizon Network smart contract on the Ethereum mainnet using a Commit transaction. At this point, the block's state is not yet final. However, after a couple of minutes, a ZK proof for the block's accuracy is created. This proof is then posted to Ethereum using a Verify transaction. The new state is only considered final after the Verify transaction has been processed. It's worth noting that multiple blocks may be committed but not verified yet.

  • However, the Horizon Network's execution model differs slightly. To avoid making users wait for block finalization, transactions are grouped into "mini-blocks" with a much shorter timeout. These mini-blocks are partially applied with a small interval, so shortly after the transaction is received, it is executed and the L2 state is updated accordingly.

  • This means that after sending a transaction on Horizon Network, users do not have to wait for block commitment or verification. Transferred funds can be used immediately after the corresponding transaction execution, providing faster and more efficient transactions for users.

More informations

Last updated