why-midnight

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

What is Midnight?

Midnight是什么?

Midnight is a data protection blockchain platform. It addresses a fundamental challenge in blockchain technology: how to use the benefits of distributed ledgers while maintaining the privacy required for sensitive data.
Unlike traditional blockchains where every transaction is permanently visible to all participants, Midnight introduces selective disclosure — the ability to prove facts about data without revealing the data itself. This enables blockchain adoption in regulated industries like healthcare, finance, and government services where data protection is not just important, but legally required.

Midnight是一个数据保护区块链平台。它解决了区块链技术中的一个核心挑战:如何在利用分布式账本优势的同时,维护敏感数据所需的隐私性。
与传统区块链中每笔交易对所有参与者永久可见不同,Midnight引入了选择性披露——即无需披露数据本身就能证明数据相关事实的能力。这使得区块链能够在医疗、金融和政府服务等受监管行业中得到应用,这些行业对数据保护不仅重要,更是法律要求。

Core concepts

核心概念

Data protection blockchain

数据保护区块链

Midnight maintains two parallel states:
  • Public state: Traditional blockchain data stored on-chain, visible to all network participants. This includes transaction proofs, contract code, and any intentionally public information.
  • Private state: Encrypted data stored locally by users, never exposed to the network. This includes personal information, business data, and any sensitive content that must remain confidential.
Midnight维护两个并行状态:
  • 公开状态:存储在链上的传统区块链数据,对所有网络参与者可见。包括交易证明、合约代码以及任何有意公开的信息。
  • 私有状态:由用户本地存储的加密数据,绝不会暴露给网络。包括个人信息、业务数据以及任何必须保密的敏感内容。

Zero-knowledge proofs

零知识证明

The bridge between public and private states is zero-knowledge cryptography. Using zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge), Midnight can:
  • Verify computations without seeing the input data
  • Prove statements are true without revealing why they're true
  • Generate compact proofs (128 bytes) regardless of computation complexity
  • Validate proofs in milliseconds on-chain
For example:
  • A healthcare application can prove a patient qualifies for treatment without revealing medical history.
  • A financial system can verify sufficient account balance without exposing the actual amount.
连接公开与私有状态的桥梁是零知识密码学。Midnight使用zk-SNARKs(Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge),能够:
  • 在不查看输入数据的情况下验证计算结果
  • 证明陈述为真而无需揭示其为真的原因
  • 生成紧凑的证明(128字节),无论计算复杂度如何
  • 在链上以毫秒级速度验证证明
例如:
  • 医疗应用可以证明患者符合治疗条件,而无需披露其病史。
  • 金融系统可以验证账户余额充足,而无需暴露实际金额。

Compact programming language

Compact编程语言

Midnight introduces Compact, a domain-specific language based on TypeScript that makes privacy-preserving smart contracts accessible to mainstream developers. Instead of requiring cryptographic expertise, developers write familiar code that compiles into zero-knowledge circuits.

Midnight引入了Compact,一种基于TypeScript的领域特定语言,使主流开发者能够轻松开发隐私保护型智能合约。开发者无需具备密码学专业知识,只需编写熟悉的代码,即可编译为零知识电路。

Why Midnight

为什么选择Midnight

Regulations require controlled data use

法规要求受控数据使用

Privacy laws demand strong data protection, but public blockchains make all on-chain activity visible by default.
Frameworks such as GDPR, CCPA, and HIPAA require tight control over personal data. Midnight helps by enabling controlled, provable disclosure so teams can share only the information that is necessary.
隐私法律要求严格的数据保护,但公开区块链默认使所有链上活动可见。
GDPR、CCPA和HIPAA等框架要求对个人数据进行严格管控。Midnight通过实现可控的、可证明的披露,帮助团队仅分享必要的信息。

Public chains expose too much

公链暴露过多信息

Organizations need decentralization but cannot place sensitive information on fully open ledgers.
Public chains reveal balances, actions, and metadata on a shared ledger. Private chains improve confidentiality but reduce decentralization. Midnight combines public and private state, giving teams decentralization with programmable confidentiality.
组织需要去中心化,但不能将敏感信息放置在完全开放的账本上。
公链会在共享账本上暴露余额、操作和元数据。私有链提高了保密性,但降低了去中心化程度。Midnight结合了公开与私有状态,为团队提供兼具去中心化和可编程保密性的解决方案。

Privacy tooling is often inaccessible

隐私工具通常难以获取

Most teams cannot build ZK systems because they require specialized cryptographic expertise.
Traditional ZK development demands circuit design and proof-system knowledge. Midnight’s Compact language lowers this barrier by compiling TypeScript-like code into circuits and proofs automatically.
大多数团队无法构建ZK系统,因为这需要专业的密码学知识。
传统ZK开发需要电路设计和证明系统知识。Midnight的Compact语言通过自动将类TypeScript代码编译为电路和证明,降低了这一门槛。

Private computation must still be verifiable

私有计算仍需可验证

Sensitive logic needs privacy, but it must still prove correctness to the network.
Midnight lets users compute on private data locally and submit zero-knowledge proofs instead of raw inputs. Validators verify correctness without learning the underlying data, preserving both privacy and trust.

敏感逻辑需要隐私保护,但仍需向网络证明其正确性。
Midnight允许用户在本地对私有数据进行计算,并提交零知识证明而非原始输入。验证者无需了解底层数据即可验证正确性,同时保留隐私和信任。

How Midnight works

Midnight的工作原理

Transaction flow

交易流程

When a user initiates a transaction on Midnight, the process follows a specific sequence to maintain privacy while ensuring validity:
  1. Users perform computations on private data locally, never exposing it to the network.
  2. The Midnight runtime generates a zero-knowledge proof of this computation.
  3. This proof, along with any intended public outputs, is submitted to the blockchain.
  4. Network validators verify the proof using the zk-SNARK verification algorithm (milliseconds on-chain).
  5. Once verified, both public and private states update according to the proven computation — public state on-chain and private state in users' local storage.
当用户在Midnight上发起交易时,流程遵循特定顺序,以在确保有效性的同时维护隐私:
  1. 用户在本地对私有数据执行计算,绝不会将其暴露给网络。
  2. Midnight运行时生成该计算的零知识证明。
  3. 该证明连同任何预期的公开输出一起提交至区块链。
  4. 网络验证者使用zk-SNARK验证算法在链上验证证明(毫秒级速度)。
  5. 验证通过后,公开状态和私有状态将根据已证明的计算结果更新——公开状态在链上更新,私有状态在用户本地存储中更新。

Network architecture

网络架构

Midnight operates as a proof-of-stake blockchain. Validators can participate permissionlessly through stake delegation, contributing to network security while earning rewards.
The platform maintains a native bridge to Cardano for asset transfers, enabling interoperability between the two chains.
The network processes two types of transactions:
  • Standard public transactions that function like traditional blockchain operations
  • Shielded transactions that use zero-knowledge proofs to maintain privacy
Both transaction types are validated by the same set of validators, ensuring consistent security across the network.
Midnight是一个权益证明(proof-of-stake)区块链。验证者可以通过权益委托无许可地参与,为网络安全做贡献的同时获得奖励。
该平台维护一个与Cardano的原生桥接,用于资产转移,实现两条链之间的互操作性。
网络处理两种类型的交易:
  • 标准公开交易,功能与传统区块链操作类似
  • 屏蔽交易,使用零知识证明维护隐私
两种交易类型均由同一组验证者验证,确保整个网络的安全一致性。

Privacy guarantees

隐私保障

Midnight implements several layers of privacy protection:
  • Data minimization: only essential data goes on-chain; sensitive information remains in local storage.
  • Forward secrecy: even if encryption keys are compromised in the future, past transactions remain private.
  • Selective disclosure: users choose precisely what information to reveal and to whom.
  • Optional compliance mechanisms: required reporting to authorities without compromising user privacy or exposing data to unauthorized parties.
Midnight实现了多层隐私保护:
  • 数据最小化:仅必要数据上链;敏感信息保留在本地存储中。
  • 前向保密性:即使未来加密密钥泄露,过往交易仍保持隐私。
  • 选择性披露:用户精确选择要披露的信息以及披露对象。
  • 可选合规机制:在不损害用户隐私或向未授权方暴露数据的前提下,向监管机构提交所需报告。