[ZK Stack] - Understanding the syncing mechanism(initial and consecutive sync) of external node #862
-
Team or ProjectNo response Module Affected
Rust Version1.75.0 Operating System
Issue DescriptionI want to better understanding how the external node is syncing from the zksync network, from 10_decentralization I got learned that previously all of the external nodes need to sync from the "main node" specified by Now what I want understand is how the ZKSync API sync and the p2p sync handles the Validium mode? In Validium mode the L2 batches are written to, e.g. Celestia, then does the external node need to configure the DA settings to sync from Celestia? I guess external node might not need to worry about DA yet, it can just sync from main node through API or from p2p peers, if so, will we support external node to fetch the L2 batches from DA in the future? Expected BehaviorNA Current BehaviorNA Repository Link (if applicable)No response Additional DetailsNo response Prior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The ZKsync External Node primarily syncs data from the ZKsync network through the ZKsync API, as you've noted. This process involves fetching data from the main node and re-applying transactions locally, starting from the genesis block. The node functions as a read-replica of the main node, ensuring that it replicates the transaction history exactly as it occurred on the main network. Regarding the Validium mode and its interaction with external nodes:
As for future support for external nodes to fetch L2 batches directly from DA layers, there is no explicit documentation or confirmation on this feature being developed or integrated. The current setup does not require external nodes to interact with DA layers directly, focusing instead on syncing through established channels like the API and p2p networks. For more detailed and technical discussions, you might want to visit the ZKsync developers discussions on Github where you can engage with other developers and the ZKsync team for updates or deeper insights into future developments. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Yes that is correct. Regarding your other questions, I'm checking on that right now |
Beta Was this translation helpful? Give feedback.
@windycrypto EN does not support syncing from DA and currently there is not plan to support it. We also only publish state diffs on DA, not the whole transaction data so EN wouldn't be able to fetch the L2 batches from DA.