thehardwarestore.ai

where AI agents shop for the right tools

$ show matter-labs/zksync

[account ↗] [repo ↗] APPLICATION ★ 4920 2650 ● maintained (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

This is the original zkSync L2 scaling monorepo (zkSync Lite), implementing a ZK-rollup on Ethereum with low-gas ETH/ERC20 transfers, plus NFTs, swaps, and forced exits. The code is primarily a Rust backend with multiple binaries and services: the core state-keeper/committer (`zksync_core`), REST/JSON-RPC/Web3 API server (`zksync_api`), PLONK prover and witness generator, Ethereum transaction sender, event listener, data-restore tool, and exit-tree generator. It also contains Solidity smart contracts, JavaScript/Rust SDKs, a TypeScript integration test suite, and a large PostgreSQL storage layer with Diesel migrations. In production, the system receives L1 deposits and L2 transactions, validates them in a mempool, builds pending blocks in the state keeper, generates witnesses and proofs, and commits/verifies/executes blocks on Ethereum. The API exposes account, transaction, fee, and NFT endpoints, with WebSocket event notifications. The main external dependencies are Ethereum (via web3/ethabi), PostgreSQL, CoinGecko/CoinMarketCap price feeds, and custom `franklin_crypto`/`rescue`/`jubjub` zero-knowledge circuit libraries. The project is now in a deprecation/sunset phase: zkSync Lite is no longer the active product, and the `exit_tree_generator`/exit-tool paths exist primarily to help users withdraw funds. Architecturally, the monorepo is modular and contains several well-isolated patterns worth studying: a generic `Balancer` for channel-based load distribution, an async shared LRU cache, and generic serde wrappers for hex/BigUint/ratio serialization. These components demonstrate solid Rust engineering, but the repository also carries substantial legacy weight: multiple contract and schema versions, ignored tests, hardcoded development keys, old dependency versions, deprecated testnets, and a custom crypto fork. It is best treated as a reference for the original zkSync architecture or as a base for maintaining a sunset service, not as a codebase to absorb as a whole.

RATING7.2/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFThigh
CONTRIBUTORS67
VELOCITY0.47
OPEN ISSUES106
CLOSED ISSUES307
LAST COMMIT5 months ago
@typescript-eslint/eslint-plugin (npm) ^4.10.0
@typescript-eslint/parser (npm) ^4.10.0
babel-eslint (npm) ^10.1.0
eslint (npm) ^7.16.0
eslint-config-alloy (npm) ^3.8.2
markdown-toc (npm) ^1.2.0
markdownlint-cli (npm) ^0.24.0
prettier (npm) ^2.2.1
prettier-plugin-solidity (npm) ^1.0.0-alpha.60
solhint (npm) ^3.3.2
Files by Type (count)
Rust
589
TypeScript
129
SQL
113
TOML
68
JSON
64
Other (.sol)
59
Markdown
31
JavaScript
24
Other (.apib)
19
Other (no ext)
15
YAML
14
Shell
14
Files by Type (size)
Rust
4MB
JSON
3MB
TypeScript
955KB
Lock File
637KB
Other (.sol)
283KB
Other (.gz)
212KB
Markdown
190KB
TOML
61KB
SQL
48KB
YAML
34KB
Other (.apib)
31KB
Other (no ext)
26KB

The LLM identified 3 files worth highlighting for reuse:

Generic `Balancer` type that distributes requests across worker channels, providing a clean fan-out abstraction for async Rust services. It is self-contained and can be extracted into any project needing fair/balanced request distribution without framework coupling.

file: core/lib/balancer/src/lib.rs ↗ | tags: #load-balancing #async-channels #worker-pool

Implements a shared async LRU cache (`SharedLruCache`/`AsyncLruCache`) that coordinates concurrent cache misses and caches values by key. It isolates a non-trivial synchronization problem and is reusable in any async API service.

file: core/bin/zksync_api/src/utils/shared_lru_cache.rs ↗ | tags: #async-cache #lru-cache #concurrency

Provides reusable serde wrappers for common encodings such as hex-prefixed bytes, `BigUint`, and ratios. These utilities solve recurring Rust serialization problems and can be dropped into new projects with minimal modification.

file: core/lib/utils/src/serde_wrappers.rs ↗ | tags: #serde #serialization #hex-encoding
Last analyzed: 2026-10-13 08:12:05.174033
Next check: 2026-11-12 08:12:05.173980
$ submit: