ZKsync External Node
This documentation explains the basics of the ZKsync Era External Node.
Disclaimers
- The ZKsync node software is provided "as-is" without any express or implied warranties.
- The ZKsync node is in the beta phase, and should be used with caution.
- The ZKsync node is a read-only replica of the main node.
- The ZKsync node is not going to be the consensus node.
- Running a sequencer node is currently not possible and there is no option to vote on blocks as part of the consensus mechanism or fork-choice like on Ethereum.
What is the ZKsync External Node?
The ZKsync External Node is a read-replica of the main (centralized) node that can be run by anyone. It functions by fetching data from the ZKsync API and re-applying transactions locally, starting from the genesis block. The ZKsync External Node shares most of its codebase with the main node. Consequently, when it re-applies transactions, it does so exactly as the main node did in the past.
In Ethereum terms, the current state of the ZKsync node represents an archive node, providing access to the entire history of the blockchain.
High-level Overview
At a high level, the ZKsync node can be seen as an application that has the following modules:
- API server that provides the publicly available Web3 interface.
- Synchronization layer that interacts with the main node and retrieves transactions and blocks to re-execute.
- Sequencer component that actually executes and persists transactions received from the synchronization layer.
- Several checker modules that ensure the consistency of the ZKsync node state.
With the ZKsync node, you are able to:
- Locally recreate and verify the ZKsync Era mainnet/testnet state.
- Interact with the recreated state in a trustless way (in a sense that the validity is locally verified, and you should not rely on a third-party API ZKsync Era provides).
- Use the Web3 API without having to query the main node.
- Send L2 transactions (that will be proxied to the main node).
With the ZKsync node, you can not:
- Create L2 blocks or L1 batches on your own.
- Generate proofs.
- Submit data to L1.
Running the Node
Detailed information on how to run, configure, and maintain the External Node can be found in the ZKsync Core book.