Validium Docs
  • Overview
  • Connect to Validium
  • Start Coding 🚀
    • Quickstart
      • Overview
      • Deploy using Validium CLI
      • Deploy using Quickstart Repository
      • Deploy your first contract
      • Create an ERC20 token
  • Tooling
    • Block Explorers
    • Hardhat-Validium
      • Overview
      • Installation
      • Guides
        • Getting started
        • Migrating Hardhat project to Validium
        • Compiling non-inlinable libraries
      • Plugins
        • hardhat-zksync
        • hardhat-zksync-solc
        • hardhat-zksync-vyper
        • hardhat-zksync-deploy
        • hardhat-zksync-upgradable
        • hardhat-zksync-verify
        • hardhat-zksync-verify-vyper
        • hardhat-zksync-ethers
        • hardhat-zksync-node
        • Hardhat Community Plugins
    • Foundary
      • Overview
      • Installation
      • Getting Started
      • Migration Guide
        • Overview
        • Compilation
        • Deployment
        • Testing
  • Test and Debug
    • Getting Started
    • Docker L1 - L2 Nodes
    • In-Memory Node
    • Continuous Integration
    • Hardhat
    • Foundry
  • API Reference
    • Overview
    • Conventions
    • ZKs JSON-RPC API
    • Debug JSON-RPC API
    • Ethereum JSON-RPC API
    • PubSub JSON-RPC API
  • Concepts
    • Transaction Lifecycle
    • Blocks and Batches
    • Validium Network Fee Mechanism
    • Finality
    • System Upgrades
    • ZK Chains
    • Data Availability
      • Overview
      • Recreating L2 state from L1 pubdata
      • Validiums
    • Account Abstraction
    • L1 <-> L2 Communication
  • Components
    • Overview
    • Smart & System Contracts
      • Smart Contracts
      • System Contracts
    • Shared Bridges
    • Sequencer / Server
    • Validium Network EVM
      • Overview
      • Bootloader
      • Precompiles
      • Virtual Machine Specification
        • ZKsync Virtual Machine primer
        • VM Formal Specification
    • Prover
      • Overview
      • ZK Terminology
      • Running the Prover
      • Circuits
        • Overview
        • Circuit Testing
        • CodeDecommitter
        • DemuxLogQueue
        • ECRecover
        • KeccakRoundFunction
        • L1MessagesHasher
        • LogSorter
        • Main VM
        • RAMPermutation
        • Sha256RoundFunction
        • StorageApplication
        • Sorting and Deduplicating
          • Overview
          • SortDecommitments
          • StorageSorter
          • LogSorter
      • Boojum Gadgets
      • Boojum Function - `check_if_satisfied`
    • Compiler
      • Compiler Toolchain Overview
        • Compiler Toolchain Overview
        • Solidity Compiler
        • Vyper Compiler
        • LLVM Framework
      • Specification
        • Overview
        • Code Separation
        • System Contracts
        • Exception Handling
        • EVM Legacy Assembly Translator
        • Instructions
          • Instruction Reference
          • EVM
            • Native EVM Instructions
            • Arithmetic
            • Bitwise
            • Block
            • Call
            • Create
            • Environment
            • Logging
            • Logical
            • Memory
            • Return
            • Sha3
            • Stack
          • Extensions
            • Overview
            • Validium Network Extension Simulation (call)
            • Validium Network Extension Simulation (verbatim)
          • EVM Legacy Assembly
          • Yul
        • EraVM Binary Layout
    • Fee Withdrawer
    • Portal - Wallet + Bridge
    • Block Explorer
    • Transaction filtering
Powered by GitBook
On this page
  • Workflow of Transactions
  • Transaction Data
  • Contract Deployment Transactions
  • Transaction Statuses
  • Transaction Types
  • Legacy: 0x0
  • EIP-2930: 0x1
  • EIP-1559: 0x2
  • EIP-712: 0x71
  • Priority: 0xff
  1. Concepts

Transaction Lifecycle

An in-depth guide on the transaction lifecycle within the Validium ecosystem, explaining the roles of the sequencer and prover, and detailing the transaction statuses and types in Validium Network.

PreviousConceptsNextBlocks and Batches

Last updated 7 months ago


The Validium Network facilitates the launch of rollups, which require certain operators like the sequencer and the prover. These operators are responsible for creating blocks and proofs, and submitting them to the L1 contract.

Transactions are cryptographically signed instructions from accounts that aim to update the state of the Ethereum network. The simplest transaction involves transferring ETH from one account to another. .


Workflow of Transactions

Users submit their transactions to the sequencer, whose role is to collect and execute these transactions using the zkEVM. The sequencer also provides a soft confirmation to users about the execution of their transactions. Users have the option to force the inclusion of their transactions by submitting them through L1. After execution, the sequencer forwards the block to the prover, who then creates a cryptographic proof of the block's execution. This proof, along with the necessary data, is submitted to the L1 contract. An L1 smart contract verifies the validity of the proof and the completeness of the data submission, thereby updating the rollup's state on the contract.

The zkEVM plays a crucial role similar to, yet distinct from, the traditional EVM in Ethereum. Transactions can also be initiated via L1, which facilitates L1<>L2 communication, providing censorship resistance and enabling trustless bridges to L1.

Before submitting a proof, the data is sent to L1. The method optimizes data submission by detailing only the changes in blockchain state, termed 'state diff.' This approach makes transactions affecting the same storage slots more cost-effective.

At the final stage, proofs are generated and sent to L1 using our Boojum proof system, which operates efficiently on 16GB of GPU RAM, allowing for decentralization of proof generation.


Transaction Data

Returned values from any RPC call outputting transaction details include:

  • is_l1_originated: bool

  • initiator_address: Address

  • received_at: DateTime<Utc>

  • eth_commit_tx_hash: Option<H256>

  • eth_prove_tx_hash: Option<H256>

  • eth_execute_tx_hash: Option<H256>


Contract Deployment Transactions

Contract deployment transactions interact with the ContractDeployer system contract and differ from standard transactions.


Transaction Statuses

Transactions are always in one of the following statuses:

  • Pending: Awaiting inclusion in a block.

  • Included: Added to a block, but the block's batch is not yet committed.

  • Verified: Included and verified after batch commitment and execution on the Ethereum L1 network.

  • Failed: Transaction did not verify successfully.


Transaction Types

Validium supports a range of transaction types that are compatible with Ethereum, yet they incorporate unique settings particularly around fee configurations. Here’s a detailed look at the transaction types, including legacy, EIP-2930, EIP-1559, and EIP-712, and how they are implemented in Validium.

When using RPC methods like eth_getTransactionByHash, the transaction type hex value is included in the output.

Legacy: 0x0

This is the original Ethereum transaction format used before the introduction of typed transactions.

EIP-2930: 0x1

EIP-1559: 0x2

  • maxPriorityFeePerGas: Maximum fee users are willing to pay miners as an incentive.

  • maxFeePerGas: Overall maximum fee, including the maxPriorityFeePerGas and the base fee determined by the network.

In Validium Network, while the EIP-1559 transaction format is supported, the maxFeePerGas and maxPriorityFeePerGas parameters are not utilized.

EIP-712: 0x71

"gasPerPubdata": "1212",
"customSignature": "0x...",
"paymasterParams": {
  "paymaster": "0x...",
  "paymasterInput": "0x..."
},
"factoryDeps": ["0x..."]
  • gasPerPubdata: Specifies the maximum gas payable per byte of public data.

  • customSignature: For transactions where the account is not an externally owned account (EOA).

  • paymasterParams: Configuration for custom paymasters, including address and inputs.

  • factoryDeps: Includes bytecode of contracts for deployment, essential for factory contracts.

EIP-712 transactions are designated with a transaction_type of 113 due to the one-byte limit, differing from 712.

Instead of signing the RLP-encoded transaction, the user signs the following typed EIP-712 structure:

  • txType: uint256

  • from: uint256

  • to: uint256

  • gasLimit: uint256

  • gasPerPubdataByteLimit: uint256

  • maxFeePerGas: uint256

  • maxPriorityFeePerGas: uint256

  • paymaster: uint256

  • nonce: uint256

  • value: uint256

  • data: bytes

  • factoryDeps: bytes32[]

  • paymasterInput: bytes

These fields are handled by our SDKs.

Priority: 0xff


Each of these transaction types ensures that while Validium Network remains closely aligned with Ethereum standards, it also optimizes for its Layer 2 specific needs and functionalities.

The sequencer collects transactions into blocks and, to enhance user experience, ensures quick soft confirmations through small block sizes. Unlike Ethereum, , where batches—collections of blocks—are processed by the prover.

Transactions in Validium Network are , allowing the use of the same wallets. Minor differences exist, particularly regarding fee settings. For details on fees, refer to the .

status: TransactionStatus, one of Pending, Included, Verified, or Failed. See below.

fee: U256. See the for more information.

For more on transaction completion and irrevocability, see the .

Implemented to mitigate risks introduced by EIP-2929, adds an accessList to transactions, which is an array of addresses and storage keys.

Introduced in Ethereum's London update, modifies how transaction fees are handled, replacing gasPrice with a base fee and allowing users to set maxPriorityFeePerGas and maxFeePerGas.

enables structured data hashing and signing within transactions. Validium uses this for features like and .

zkEVM distinguishes between blocks and batches
comparable to those on Ethereum
fee model documentation
Transaction statuses section
fee mechanism documentation
finality documentation
EIP-2930: Optional access lists
EIP-1559: Fee market change for ETH 1.0 chain
EIP-712: Typed structured data hashing and signing
account abstraction
paymasters
Learn more about Ethereum transactions