ZKsync 백서

ZKsync

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 12쪽 중 9쪽

ith multiple RaaS partners to ensure that projects can choose the setup that best fits their technical, business, and operational needs . Whether you’re optimizing for scalability, flexibility, compliance, or time-to-market, you can select from a range of providers with varying architectures, hosting options, and service models. Benefits of Using a RaaS Provider Simplified deployment and lifecycle management of your ZKsync chain. Reliable infrastructure and performance monitoring tools. Reduced operational overhead and faster development cycles. Integration of specialized services such as custom settings or data availability layers. Flexibility and scalability as your chain evolves . Available RaaS Providers Below is a list of RaaS providers that support ZKsync chain deployment and customization: Matter Labs Alchemy AltLayer Ankr Caldera QuickNode Zeeve Unifra Ownership Model An overview of the most important contracts and roles in the ZK Stack ecosystem. Custom base tokens Learn how to use custom base tokens for a ZKsync chain. ## /zk-stack/customizations/custom-base-tokens ZK Stack Custom base tokens Learn how to use custom base tokens for a ZKsync chain. You can customize your ZKsync chain by changing the base token used for gas from ETH to an ERC20 token. Choosing a base token is a non-revertible action and token can not be changed. To use a custom base token with a locally running ZKsync OS chain, check out the zk-deployer CLI documentation . Rollup as a Service Validium in ZK Stack Dive deeper into ZK Stack Validiums. ## /zk-stack/customizations/validium ZK Stack Validium in ZK Stack Dive deeper into ZK Stack Validiums. What is a DA Layer? A Data Availability layer (or DA Layer) is a blockchain network optimized for storing data in a cost-effective way. A DA layer does not prove the correctness of a L2 chain. Often DA layers are used in tandem with Ethereum for consensus. A DA layer can prove on Ethereum that some specific data in their network exists. By extension, this means that it can prove that data exists in a L2 blockchain that uses that DA layer. The ZKsync protocol for the Elastic Network then uses the DA layer's contracts on Ethereum to verify the inclusion proofs it receives from the chain. What data does it store? The DA layer receives and stores pubdata of L1 batches from a ZKsync chain. Pubdata consists of the state diffs, L2 to L1 logs, L2 to L1 messages, and published bytecodes. After the data is sent to the DA layer, the corresponding entry in the node's data_availability table is created. Types of Validium There are 3 different types of validiums based on the level of data availability they provide: Stage 0 - the simplest type of validium that only stores its pubdata in the database of the node(s) running the chain. Stage 1 - a validium that only sends its pubdata to the DA layer, but doesn’t verify its inclusion onchain. Stage 2 - a validium that sends its pubdata to the DA layer, and also verifies its inclusion on the L1, either by using verification bridges or ZK proofs directly. There are multiple DA layers that ZK Stack will be integrated with, however the first on the list are: Avail , Celestia , and EigenDA . How is DA validated? The DA inclusion verification process consists of two steps, with a corresponding smart contract responsible for each of them: Committing to the pubdata, done by the L2DAValidator contract. Using a commitment and a data provided by the operator to verify that the pubdata was included in the DA layer, done by the L1DAValidator contract. L2DAValidator The commitment is passed from L2DAValidator to L1DAValidator via L2→L1 logs, this happens within the system contracts’ execution, so this process can be trusted as it is covered by ZK proof. The format of the commitment is arbitrary, it is up to the L2DAValidator to decide what is the one that suits the specific DA layer the most. L1DAValidator The IL1DAValidator contract interface has one function: checkDA which checks the data availability for the given batch input. It returns a struct with the state diff hash, the hashes of the blobs on L1, and the commitments to the blobs on L1. Separate contracts that implement this interface are deployed for each DA layer. These contracts are stateless and can't be proxies, meaning that they are immutable once deployed. The L1DAValidator implementations may have different logic from DA layer to DA layer, however the ZKsync protocol only requires it to return whether the commitment and proof pair is valid. Approaches There are 2 approaches that can be used here: verification bridges and ZK poofs. The chain operator would be able to change the implementations of the L1/L2DAValidators, which allows for applying updates/optimizations or completely changing the DA verification logic, e.g. due to migration to the different DA layer. Verification bridges: these are the smart contracts that get updated with the state roots of the specific DA layers. They utilize the ZK proofs to verify the validity of the provided state roots. Later on, the verification bridges can be called from L1DAValidator contract and normally use Merkle-proofs to verify against the known state roots. ZK proofs: similarly to the verification bridges, it's possible to utilize ZK proofs here, but directly in the L1DAValidator . If we go a step further and do the ZK proof that has the following characteristics: Complete the asserts that verification bridges do to ensure the validity of the state root. Verify that the pubdata commitment relates to the data included in the data root of some specific block. Verify that the data root is included in the state root. It would be possible only verify the proof without the need for additional checks against the bridges. This solution is especially relevant with DA layers that use the commitments that are inefficient to produce on EVM. FAQ Is it possible to transition from Validium to Rollup and vice versa? How can I enable privacy? Custom base tokens Learn how to use custom base tokens for a ZKsync chain. Transaction filtering Learn how to filter transactions on the ZKsync chain, including L1→L2 and L2 transactions. ## /zk-stack/customizations/transaction-filtering ZK Stack Transaction filtering Learn how to filter transactions on the ZKsync chain, including L1→L2 and L2 transactions. The ZKsync Chain operators can filter both the transactions initiated from L1 and the ones submitted via API directly to L2. L1->L2 Transactions To filter L1→L2 transactions coming through the Diamond proxy, operators shall: Implement & deploy the TransactionFilterer contract which implement the ITransactionFilterer Have the TransactionFilterer address set in the state transition storage (by using this function ). If the filterer exists, it will be called by the Mailbox facet with the tx details, and will return whether the transaction can be executed. To disable L1→L2 filtering, the same function that registers the filtered to the storage can be used with 0x0 address. L2 Transactions Instructions for L2 transaction filtering is not yet updated for ZKsync OS. These instructions reflect how to achieve L2 transaction filtering for EraVM. To filter the transactions sent via the API, operators shall include filtering logic before txs get to the mempool. To do this, an alternative TxSinkLayer must be implemented and used by the node framework by modifying the code here . For reference, See Node Framework example See example implementation Note on Withdrawals Imagine a case where a user deposited funds and then was added to the denylist or removed from the allowlist. In that scenario, the user may have their funds locked on the L2 or potentially even in a contract on the L2. Please think about handling such cases and ensuring that the user can still withdraw their funds. Validium in ZK Stack Dive deeper into ZK Stack Validiums. Prividium™ Overview Learn about Prividium™. ## /zk-stack/prividium/features ZK Stack Features Dive into Prividium™'s key features and capabilities. Prividium™ delivers private execution, enterprise-grade access control, and Ethereum-level security in a single composable stack. It is the only solution available today that combines this level of confidentiality, auditability, and interoperability, without tradeoffs. For implementation guides and reference documentation, visit the official Prividium documentation . Composable Privacy Prividium™ operates as a permissioned ZKsync Chain , where transaction inputs, calldata, and full state are stored off-chain in an operator-controlled database. Only cryptographic commitments—state roots and STARK-based proofs—are submitted to Ethereum, ensuring public verifiability without exposing private data. Key capabilities: Keep all data inside your infrastructure (no transaction details on Ethereum) Configure contract access policies through the Prividium™ Admin Dashboard, defining which functions are public, private, or role-restricted Update access settings without redeploying contracts Supply Merkle proofs or DB extracts for selective disclosure (e.g., audits, investigations) Design Summary: Data location: Entire state is stored off-chain in a private database Proofs: Each block produces a STARK proof verified on Ethereum External visibility: L1 observers only see state roots, metadata, and proof hashes Selective disclosure: Auditors can view chain segments without affecting behavior Fine-Grained Access Control All interactions with the chain are routed through a Proxy RPC that enforces access policies managed in the Prividium™ Permissioning System. Administrators configure roles, users, and permissions through the Admin Dashboard, which stores policies dynamically in the Prividium API. Features: Manage access using roles (e.g., Trader, Auditor, Admin) and assign them to users in the dashboard Restrict contract functions by role, argument match, or both Enforce access at the RPC layer; unauthorized calls return HTTP 403 and are logged for audit Apply consistent access control across user calls, dApps, explorers, and bridges Support for Okta and crypto-native Sign-in With Ethereum (SIWE) authentication Configure and update permissions without redeploying contracts or editing files Request Path: Client → Proxy RPC (permission validation) → Prividium API (policy check) → Sequencer RPC Compliance & Audit Support Regulated entities require visibility, traceability, and selective access. Prividium™ is designed with that in mind. Features: A private block explorer shows only what each user is authorized to view (gated via Proxy) System logs from all core components are available for integration with enterprise logging and analytics tools Chain operators can export inclusion proofs or filtered ledger views on-demand Auditors can be granted scoped roles through the Permissioning System, enabling view-only access without exposing unrelated data. Ethereum-Grade Finality Every finalized Prividium™ batch is proven and posted to Ethereum. Finalization Flow: The Prividium™ sequencer finalizes a batch of blocks The prover generates a STARK proof for the batch The relayer submits the state root and proof to Ethereum Once verified on-chain, the batch becomes immutable (unless Ethereum reorganizes) This ensures that every block is cryptographically verified and finalized on Ethereum, ensuring tamper-proof integrity and eliminating settlement risk. All without revealing sensitive information Seamless Interoperability ZKsync enables protocol-level interoperability across private and public chains, all anchored to Ethereum. With shared settlement and ZK proofs, institutions can move assets securely and atomically between networks, all without consortium agreements, third-party bridges, or compromises to customization. Daily operations remain private, but interoperability is opt-in and cryptographically verified. Prividium™ Overview Learn about Prividium™. Architecture Understand how Prividium™ works under the hood. ## /zk-stack/prividium/architecture ZK Stack Architecture Understand how Prividium™ works under the hood. Prividium™ is built on a permissioned Validium chain with integrated, role-based access control. It runs a private instance of the ZKsync Chain, complete with its own sequencer and prover, inside an organization’s infrastructure or cloud. All transaction data and state are stored off-chain in a secure database, ensuring privacy by design. A Proxy RPC layer serves as the single entry point to the network. All interactions — from users, enterprise applications, block explorers, or bridge operations — must pass through this proxy. It enforces fine-grained access rules using the Prividium™ Permissioning System , ensuring that only authenticated and authorized requests reach the chain. By separating the public interface from internal blockchain components, Prividium™ prevents unauthorized access and safeguards sensitive data. State updates are finalized on Ethereum, which receives the chain’s state roots and zero-knowledge proofs. This anchors the chain to Ethereum, providing L1-grade security and enabling interoperability with other ZKsync Chains. This architecture delivers privacy, compliance, and auditability at the L2 level while inheriting the trust and finality of Ethereum, making Prividium™ ideal for institutional use cases such as trading, settlement, asset issuance, and compliance-sensitive workflows. For implementation guides and reference documentation, visit the official Prividium documentation . Figure: High-level architecture of Prividium™. Components Prividium™ extends the ZK Stack architecture with dedicated modules for privacy, governance, and access control. These components work together to provide secure, verifiable, and customizable network operations. Permissioning System : A built-in role-based framework that manages users , roles , permissions , and selective disclosure through the Admin Dashboard . Administrators define who can read or write to contracts and configure disclosure settings without modifying code or YAML files. Proxy RPC : The secure interface that filters every request based on the policies defined in the Permissioning System. It validates user tokens issued via Okta or crypto-native (SIWE) login and enforces role and argument-level restrictions before forwarding to the sequencer. Private Block Explorer : A self-hosted explorer with access restrictions aligned to user roles. It allows authorized participants to view transactions, blocks, and state data while protecting sensitive information from public exposure. ZKsync Chain : A private ZKsync Chain deployed within your infrastructure. It includes a dedicated sequencer and prover that execute transactions and generate zero-knowledge proofs locally. How Access Control Works Users authenticate via Okta SSO or Sign-in With Ethereum (SIWE) in the User Dashboard . The Proxy RPC forwards their request and token to the Prividium API . The Prividium API verifies the user’s identity, role, and function-level rules. Authorized requests are sent to the Sequencer RPC , which executes transactions privately. State updates are committed to Ethereum. This design ensures that access control, compliance, and selective disclosure are built directly into the network stack, not managed through static configuration files. Features Dive into Prividium™'s key features and capabilities. Deployment Model Learn where to deploy each Prividium™ component. ## /zk-stack/prividium/deployment ZK Stack Deployment Model Learn where to deploy each Prividium™ component. This page outlines the recommended deployment model for running a Prividium™ chain in production. Components are grouped by trust boundary and network tier, following enterprise best practices for security, scalability, and maintainability. Prividium™ is a licensed product. Non-production use requires accepting the license terms; production deployments require a commercial agreement. For implementation guides and reference documentation, visit the official Prividium documentation . DMZ / API Gateway Tier Components: Proxy RPC Explorer front-end Hosting: Deployed in a public subnet behind a secure edge load balancer Purpose: Acts as the single ingress point for users and apps All JSON-RPC and Explorer requests pass through the Proxy, which enforces access control via policy files Explorer front-end communicates only with the Proxy, avoiding direct access to internal infrastructure Application Tier (Private Subnet) Components: Sequencer Prover farm (CPU/GPU workers; auto-scalable) Hosting: Deployed in private address space, inaccessible from the public Internet Purpose: Runs all consensus-critical logic Sequencer requires fast access to the state database Provers consume large compute resources but require no inbound access Data Tier (Private Subnet) Components: PostgreSQL (state DB) Optional: Blob or object store for off-chain data Hosting: Self-hosted or managed service inside a dedicated subnet with no Internet exposure Purpose: Stores the complete L2 state securely Must support encryption, snapshots, and backup policies Only Sequencer and Prover have DB access Security and Placement Rationale Single ingress, early rejection: All external requests hit the Proxy RPC in the DMZ. Unauthorized requests are filtered before reaching internal systems. Private consensus logic: Sequencer and Prover run in a non-routable subnet. Only internal services can communicate with them. Outbound-only proof posting: The relayer submits proofs to Ethereum without opening any inbound ports. Data-at-rest controls: Databases and blob stores are isolated and regularly backed up to support compliance and disaster recovery. Architecture Understand how Prividium™ works under the hood. Proxy RPC API Understand how the Prividium™ Proxy RPC enforces access control. ## /zk-stack/prividium/proxy ZK Stack Proxy RPC API Understand how the Prividium™ Proxy RPC enforces access control. The Proxy RPC sits between end users and the chain's standard RPC API. It enforces transaction-level access control by filtering all blockchain interactions before they reach the sequencer. Prividium™ is a licensed product. Non-production use requires accepting the license terms; production deployments require a commercial agreement. For implementation guides and reference documentation, visit the official Prividium documentation . How It Works The Proxy RPC validates every request against the Prividium API : User submits a transaction or query through the Proxy RPC Proxy validates the user's JWT and wallet address Proxy checks permissions for the requested contract function Authorized requests proceed to the standard RPC; unauthorized requests return 401 Unauthorized Keep the standard RPC endpoint private. Implement a firewall to restrict access. Only expose the Proxy RPC publicly. Limitations Multicall Contracts Multicall contract methods bypass individual function permission checks. The Proxy blocks multicall patterns to prevent policy circumvention. L1-L2 Transactions Forced transactions originating from Ethereum (L1) can bypass the Proxy entirely. These transactions provide censorship resistance on public chains but create security risks for permissioned networks: Deploy arbitrary contracts Execute unauthorized writes Leak data through blind attacks Mitigation: L1-L2 transactions are not automatically disabled . Chain operators can implement transaction filtering to control forced transaction behavior. The PrividiumTransactionFilterer contract provides an allowlist-based filter: Allowlisted addresses execute unrestricted forced transactions Other addresses can only transfer ETH or ERC-20 tokens Enabling transaction filtering grants the chain operator censorship capability. Document your filtering policy for users. Deployment Model Learn where to deploy each Privi
프로젝트로 돌아가기