>
OKB.VN
Modular · Architecture

Execution Layer là gì?

Lớp thực thi trong kiến trúc modular, EVM parallel và ZK-proven execution

⏱ 12 phút đọc 🎯 Intermediate 📅 2025

TÓM TẮT

Execution Layer là thành phần thực thi transaction và smart contract trong blockchain. Trong kiến trúc modular, execution tách riêng khỏi consensus và DA — Rollup là execution layer chạy trên settlement layer Ethereum. Parallel execution và ZK-proven execution là hai xu hướng lớn.

IExecution Layer là gì?

Execution Layer (lớp thực thi) là thành phần trong kiến trúc blockchain chịu trách nhiệm thực thi transaction và smart contract. Trong kiến trúc monolithic truyền thống, execution được tích hợp chung với consensus và data availability. Trong kiến trúc modular, execution là một lớp riêng biệt có thể swap và customize.

Execution Layer nhận transaction từ mempool, thực thi chúng theo thứ tự, cập nhật state (account balance, smart contract storage), và tạo state root mới để commit lên consensus layer.

Ví dụ: Ethereum EVM là execution layer của Ethereum. Khi bạn gọi hàm swap trên Uniswap, EVM execute bytecode của Uniswap contract, cập nhật token balances, emit events — đây là execution layer làm việc.

IIExecution trong Monolithic vs Modular

Monolithic: Execution tích hợp

Bitcoin, Ethereum (pre-Merge), Solana — execution được thực hiện bởi tất cả node. Mỗi full node phải re-execute mọi transaction để verify. Điều này đảm bảo trustless verification nhưng giới hạn throughput: mỗi node phải có khả năng execute tất cả transaction trong 1 block.

Modular: Execution Layer riêng biệt

Trong kiến trúc modular (Celestia, Ethereum Rollup ecosystem), execution được tách ra:

  • Rollup: Execution xảy ra off-chain trên L2. State root được commit lên L1 (settlement layer). L1 không execute transaction — chỉ verify proof hoặc nhận state root.
  • Sovereign chain: Execution trên chain riêng, DA từ Celestia, consensus riêng.

IIICác loại Execution Environment

VMDùng bởiĐặc điểm
EVMEthereum, Polygon, BSC, Avalanche C-ChainStack-based, Solidity/Vyper, 200+ opcode, gas model
SVM (Sealevel)SolanaParallel execution, account model, Rust programs
MoveVMAptos, SuiResource-oriented, Move language, parallel safe
Cairo VMStarkNetSTARK-provable, Cairo language, ZK-native
WASMPolkadot, Near, CosmosWebAssembly, multi-language support

Xem so sánh chi tiết tại EVM vs SVM vs MoveVM.

IVEthereum: Phân tách Execution và Consensus

Sau The Merge (2022), Ethereum chính thức tách Execution Layer và Consensus Layer:

  • Execution Layer (EL): Geth, Nethermind, Besu, Erigon — xử lý transaction, EVM execution, mempool, state trie.
  • Consensus Layer (CL): Lighthouse, Prysm, Teku, Nimbus — PoS, validator, attestation, finality.

Hai layer giao tiếp qua Engine API. Đây không phải modular hoàn toàn (cả hai vẫn chạy cùng node) nhưng là bước đầu toward modular architecture.

VParallelization — Tương lai của Execution

Bottleneck lớn của execution: EVM thực thi tuần tự — transaction 1 xong mới làm transaction 2. Nếu transaction không conflict (không đụng chạm cùng storage slot), chúng có thể execute song song.

Solana SVM: Parallel Execution

Solana yêu cầu transaction khai báo trước accounts nào sẽ read/write. SVM scheduler phân tích dependencies và execute non-conflicting transaction song song. Lý thuyết có thể đạt 50,000+ TPS.

Ethereum parallel execution

Monad và Sei là EVM-compatible chain với parallel execution. Họ phân tích conflict on-the-fly (optimistic concurrency) thay vì yêu cầu khai báo trước. Block Stm algorithm của Aptos cũng dùng approach này.

Tác động

Parallel execution có thể tăng throughput 10-100x mà không thay đổi consensus hay DA. Đây là "free lunch" nếu implement đúng — không trade off security hay decentralization.

VIExecution Layer trong Modular Stack

Trong modular blockchain full stack, execution layer ngồi trên settlement và DA layer:

  • Execution: L2 Rollup (zkSync, Arbitrum, Scroll) — xử lý transaction, smart contract
  • Settlement: Ethereum L1 — verify proof, bridge, final arbiter
  • Data Availability: Ethereum blobs, Celestia, EigenDA — đảm bảo data accessible
  • Consensus: Ethereum beacon chain, Celestia consensus

Mỗi layer có thể được optimize riêng mà không ảnh hưởng các layer khác — đây là sức mạnh của modular design. Xem Modular Blockchain là gì.

VIIGas và Execution Pricing

Execution Layer cần cơ chế pricing để ngăn spam và phân bổ tài nguyên công bằng. EVM dùng Gas model:

  • Mỗi opcode có gas cost khác nhau (SSTORE đắt nhất — 20,000 gas)
  • Transaction đặt gas limit và gas price (EIP-1559: base fee + priority fee)
  • Unused gas được refund
  • Gas hết → transaction revert, phí vẫn mất

Solana dùng fee model khác — prioritization fee cho CU (Compute Unit), tương tự nhưng với multi-dimensional resource accounting.

VIIITương lai: ZK-Proven Execution

Xu hướng lớn nhất: ZK proof cho execution — bất kỳ node nào cũng có thể verify execution đúng mà không cần re-execute. Đây là "The Verge" trong Ethereum Roadmap.

Khi đạt được: Ethereum full node không cần re-execute block để verify — chỉ cần verify ZK proof. Sync time giảm từ ngày xuống giây. Hardware requirement cho node giảm mạnh → tăng decentralization. Đây là một trong những đột phá quan trọng nhất nếu thành công. Xem Ethereum RoadmapzkVM là gì.

Câu Hỏi Thường Gặp

Execution Layer là thành phần blockchain thực thi transaction và smart contract. Trong modular blockchain, execution tách riêng khỏi consensus và data availability — Rollup là execution layer riêng biệt, settle lên Ethereum là settlement layer.

Sau The Merge, Ethereum tách thành Execution Layer (Geth, Nethermind — EVM, transaction, state) và Consensus Layer (Lighthouse, Prysm — PoS, validator, finality). Hai layer giao tiếp qua Engine API.

EVM không biết trước transaction nào conflict nên chạy tuần tự để an toàn. SVM Solana yêu cầu transaction khai báo accounts sẽ dùng — scheduler phân tích dependencies và chạy non-conflicting transaction song song.

Thay vì re-execute block, node chỉ verify ZK proof chứng minh execution đúng. ZK proof tạo bởi prover chuyên biệt. Node biên chỉ cần verify proof (milliseconds) thay vì execute (giây). Đây là The Verge trong Ethereum Roadmap.

📚Tài liệu tham khảo

  1. Ethereum Foundation. Ethereum Architecture. ethereum.org/en/developers/docs/
  2. Celestia. Modular Blockchain Architecture. celestia.org/learn/
  3. Angeris, G. et al. (2021). Analysis of EIP-1559. arxiv.org
  4. Solana Labs. Sealevel Parallel Runtime. docs.solana.com
📚 Khám phá thêm theo chủ đề
113 bài phân tích kỹ thuật — Blockchain Infrastructure từ nền tảng đến nâng cao
📋 Xem tất cả bài viết →