ZKsync OS Server is the sequencer implementation for the ZKsync OS,
the new operating system of the ZK Stack.
The ZKsync OS Server design optimizes for throughput, low latency, and a seamless development experience.
Install | User docs | Developer docs | 
- Minimal, async persistence
- to meet throughput and latency requirements, we avoid synchronous persistence at the critical path. Additionally, we aim at storing only the data that is strictly needed - minimizing the potential for state inconsistency
- Easy to replay arbitrary blocks
- Sequencer: components are idempotent
- Batcher:
batchercomponent skips all blocks until the first uncommitted batch. Thus, downstream components only receive batches that they need to act upon
- State - strong separation between
- Actual state - data needed to execute VM: key-value storage and preimages map
- Receipts repositories - data only needed in API
- Data related to Proofs and L1 - not needed by sequencer / JSON RPC - only introduced downstream from
batcher
To run server locally with in-memory L1 node and dummy proofs, run the following commands:
# Start in-memory L1 node
anvil --load-state zkos-l1-state.json --port 8545
# Launch zksync-os-server on the default port 3050
# By default, fake (dummy) proofs are used both for FRI and SNARK proofs.
cargo run --release --bin zksync-os-server
# Use default rich account for testing
RICH_ACCOUNT=0x36615Cf349d7F6344891B1e7CA7C72883F5dc049
PRIVATE_KEY=0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110
# Send test transaction
TO=0x5A67EE02274D9Ec050d412b96fE810Be4D71e7A0
cast send --private-key ${PRIVATE_KEY} --rpc-url http://localhost:3050 ${TO} --value 100For more configuration and detailed instructions, check the developer documentation.
See CONTRIBUTING.md for contribution guidelines.
See SECURITY.md for security policy details.
ZKsync OS repositories are distributed under the terms of either
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/blog/license/mit/)
at your option.
