From Start to Finish: A Lunar Transaction
Understanding the components of Lunar Mainnet is best done through the lens of a transaction. Each transaction undergoes several steps to ensure efficiency, accuracy, and security.
1. Transaction Creation
Users typically begin interacting with Lunar Mainnet through a decentralized application (dApp). Here’s how a transaction is initiated:
Proposing a Transaction: The dApp proposes a transaction for the user to sign via their wallet.
Sending the Transaction: Once signed, the transaction is sent to an RPC (Remote Procedure Call) node. Lunar supports both Ethereum Virtual Machine (EVM) and Solana Virtual Machine (SVM) transactions.
Lunar implements the SVM JSON-RPC specification. To handle EVM transactions, proxy nodes are utilized:
Proxy Nodes for EVM: These nodes implement Ethereum’s JSON-RPC, receive EVM transactions, wrap them into SVM-compatible transactions, and forward them to Lunar nodes.
Direct SVM Transactions: SVM wallets can send transactions directly to Lunar full nodes.
2. Transaction Sequencing
After receiving a transaction, it must be ordered relative to others. This ordering is crucial as it impacts miner extractable value (MEV) and the blockchain’s integrity.
Centralized Sequencers: Currently, Lunar employs a centralized sequencer to order transactions. Centralized sequencing ensures efficiency but introduces some centralization.
Future Decentralization Plans: Lunar plans to transition to decentralized sequencing, where a consensus mechanism orders transactions across multiple sequencers.
3. Block Production
Once transactions are sequenced, they are processed into blocks. This step includes:
State Transition Function: Transactions are executed to produce a new state:
Here, is the current state, is the transaction, and is the resulting state.
State Diff Commitments: Unlike traditional methods that compute a global state root, Lunar commits to the "state diff." This approach avoids bottlenecks and supports efficient parallelization.
Role of the Sequencer:
Provides transaction confirmations and state updates.
Constructs and executes rollup blocks.
Posts rollup blocks to the data availability layer (Celestia).
Currently, Lunar’s block production is managed by a centralized team, with plans for future decentralization.
4. Transaction Settlement
The final step ensures the computed state is correct. This is achieved through the settlement process:
Optimistic Settlement
Posting Commitments: The state commitment is posted to Celestia and relayed to Ethereum.
Verifier Challenges:
Verifiers, which are full nodes, pull transaction blocks from the data availability layer and re-execute them.
If the verifier’s computed commitment differs from the posted commitment, a challenge is raised within the challenge period.
Challenges are resolved using Lunar’s zk-VM (zero-knowledge virtual machine).
Finalization:
If no challenges arise during the challenge period, the transaction is finalized.
Once finalized, the bridge will not roll back the commitment.
Conclusion
Lunar Mainnet’s transaction lifecycle showcases a seamless integration of cutting-edge technologies to deliver a fast, scalable, and secure blockchain ecosystem. From the creation and sequencing of transactions to block production and settlement, Lunar’s architecture ensures every transaction is processed with precision, paving the way for a robust decentralized future.
Last updated