xiaodao
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 零知识证明与区块链扩容 Zero Knowledge && Blockchain Scalability [toc] 年前我报名了 03 月 25 日 在台北举办的 [SITCON](https://sitcon.org/2019/),正好看到 [Changwu](https://www.linkedin.com/in/changwu-tw) 分享 Vitalik 03 月 15 日会来 Taipei Ethereum Meetup 的活动,于是就决定提前动身。Vitalik 当天在台北的行程也安排的很满,一共会出席三个活动 [^1]。但根据我以往的经验,最重要的活动当然是晚上的 Taipei Ethereum Meetup,每次 Vitalik 来 Taipei 都会带来一些新的 idea[^2],这次果然也是如此。 zKSnarks 和 Layer2 我们都不陌生,[但是 zKSnarks 可以用来做扩容](https:https://www.youtube.com/watch?time_continue=1&v=aEqhjpjoaEA)[^3],很多人包括我就是第一次听说了。再把这个结合进 Layer2,知道的人恐怕就更少了。 在这次的演讲中,Vitalik 首次提出了自己对这一问题的一系列想法,以及其 Layer2 中数据可用性问题([Data Availability Problem](https://www.youtube.com/watch?v=OJT_fR7wexw))的联系。下面是这次演讲相关的资料,其中 [Trenton Van Epps](https://twitter.com/trent_vanepps) 在 Medium 上忠实的记录了这次 Tech Talk 的 Transcript,并且包含了许多相关的资料和历史记录,强烈推荐大家阅读。 - [Recorded Livestream](https://www.youtube.com/watch?v=mOm47gBMfg8) - [Slides](https://docs.google.com/presentation/d/1EVjrZhoxw-ikzelFGGv7czxuJsIIWfl5I-CPIlnjsME/edit#slide=id.p) - [Transcript](https://medium.com/@trenton.v/transcript-scalable-blockchains-as-data-layers-vitalik-buterin-11aa18b37e07?sk=52eba61c9f8eb4a2462e9a45bc00df81) | [中译](http://blog.hubwiz.com/2019/03/17/ethereum-vitalik-taibei/) [^1]: [證劵型代幣融合區塊鏈與實體世界——台灣的金融新契機](https://www.accupass.com/event/1902270632438226436330) | [A Day in Life: Crypto Congressman 區塊鏈立委的一天]( https://www.facebook.com/augama/videos/10156883020352040/) [^2]: [Keyword Vitalik in Taipei Ethereum Meetup](https://www.youtube.com/channel/UCVmRAQeesq4TA3rdvbz-IkQ/search?query=vitalik) [^3]: [Kent Barton & Alex Gluchowski ~ Scaling With Zero Knowledge](https://www.youtube.com/watch?time_continue=1&v=aEqhjpjoaEA) ## 区块链扩容三元悖论 Blockchain Scalability Trilemma 从比特币到以太坊,围绕扩容产生的争议从来就没有断绝过,这点只要看比特币的各种分叉就可见一斑了。 我们知道目前以太坊最大的挑战也是在维持 decentralized & secure 的前提下,解决 scalable 的问题。类比分布式数据库中的三元悖论,在公有链之中,这被称之为扩容悖论 (Scalability Trilemma)。在 [以太坊官方关于 Sharding 的文档](https://github.com/ethereum/wiki/wiki/Sharding-FAQ#this-sounds-like-theres-some-kind-of-scalability-trilemma-at-play-what-is-this-trilemma-and-can-we-break-through-it) 里,扩容悖论 (Scalability Trilemma) 的定义如下: > The trilemma claims that blockchain systems can only at most have two of the following three properties: > > - **Decentralization** (defined as the system being able to run in a scenario where each participant only has access to O\(c\) resources, i.e. a regular laptop or small VPS) > - **Scalability** (defined as being able to process O(n) > O\(c\) transactions) > - **Security** (defined as being secure against attackers with up to O(n) resources) 不过 Vitalik 也曾在 Twitter 中提到过,自己一直认为扩容悖论从来都不是一个不可能的结果,而是一个困难的追求目标[^4]。围绕扩容的争议与各种创新,通证通研究院 x FENBUSHI DIGITAL 写过 [一组不错的文章](https://medium.com/search?q=%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF%E5%BC%95%E5%8D%B7) 可供参考: [^4]: [“And the trilemma was never an impossibility result, it was claiming that getting 3 of 3 is *hard*.”](https://twitter.com/VitalikButerin/status/1050117973543858176) - [坎坷的 “共识机制” 之路 —— 区块链技术引卷之一](https://medium.com/@tokenroll/%E5%9D%8E%E5%9D%B7%E7%9A%84-%E5%85%B1%E8%AF%86%E6%9C%BA%E5%88%B6-%E4%B9%8B%E8%B7%AF-%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF%E5%BC%95%E5%8D%B7%E4%B9%8B%E4%B8%80-25557c66af70) - [扩容,解决区块链的阿克琉斯之踵 —— 区块链技术引卷之二](https://medium.com/@tokenroll/%E6%89%A9%E5%AE%B9-%E8%A7%A3%E5%86%B3%E5%8C%BA%E5%9D%97%E9%93%BE%E7%9A%84%E9%98%BF%E5%85%8B%E7%90%89%E6%96%AF%E4%B9%8B%E8%B8%B5-%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF%E5%BC%95%E5%8D%B7%E4%B9%8B%E4%BA%8C-78424fabec41) - [主流区块链共识机制的简介与比较  —— 区块链技术引卷之三](https://medium.com/@tokenroll/%E4%B8%BB%E6%B5%81%E5%8C%BA%E5%9D%97%E9%93%BE%E5%85%B1%E8%AF%86%E6%9C%BA%E5%88%B6%E7%9A%84%E7%AE%80%E4%BB%8B%E4%B8%8E%E6%AF%94%E8%BE%83-%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF%E5%BC%95%E5%8D%B7%E4%B9%8B%E4%B8%89-e8d1995554b5) - [分片:分而治之,无限扩展  —— 区块链技术引卷之四](https://medium.com/@tokenroll/%E5%88%86%E7%89%87-%E5%88%86%E8%80%8C%E6%B2%BB%E4%B9%8B-%E6%97%A0%E9%99%90%E6%89%A9%E5%B1%95-%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF%E5%BC%95%E5%8D%B7%E4%B9%8B%E5%9B%9B-d835f0a2f738) <!--- ### 区块扩容与 DPos ### Layer2 解决方案 - Ethereum Plasma, Coscup 2018, https://youtu.be/s7GGlk8CV5I?t=16606 --> ## 用零知识证明进行扩容 Scaling With Zero Knowledge ### 零知识证明 Zero Knowledge Proof 共有链领域的另一大难题就是用户隐私的问题,Vitalik 也多次在 Tech Talk 以及 Blog 中阐述这一议题[^5],而 zKSnarks 就是这个领域最为强大的密码学武器之一。 关于 zKSnarks,以太坊上的身份识别系统 [uPort](https://medium.com/uport) 的创始人 [Christian Lundkvist](https://twitter.com/chrislundkvist) 在 [ConsenSys Media](https://media.consensys.net/) 上也写过 [一篇引人入胜的文章](https://media.consensys.net/introduction-to-zksnarks-with-examples-3283b554fc3b?source=search_post---------0) 可供参考。 [^5]: [Vitalik Buterin at ETHWaterloo: Blockchains and Privacy through Strong Cryptography](https://www.youtube.com/watch?v=9cDFpACnK1U&t=759s) | [Zk-SNARKs: Under the Hood](https://medium.com/@VitalikButerin/zk-snarks-under-the-hood-b33151a013f6) ### 用零知识证明进行扩容 Scaling With Zero Knowledge Vitalik 在这次的演讲中,用了两页 PPT 来介绍这一方法的历史,并且提到在 Alex Gluchowski 和 Kent Barton 在 ETHDenver 2019 上的 [报告](https://www.youtube.com/watch?time_continue=1&v=aEqhjpjoaEA) 中,就已经详细介绍了这一机制。简答来说,我们可以类比 Plasma,不过最大的不同时在 ZK Rollup 中我们不需要 [设计各种 tricky 的方法来解决数据可用性问题 (Data Availability Problem)](https://medium.com/onther-tech/data-availability-problem-in-implementing-plasma-design-6e23df1a147f),因为所有交易都被发布到链,并且没有签名。 这种方法可以安全地将转账操作的 tps 从 15 增加 500。 ### 作为数据层的可扩展区块链 Scalable Blockchains as Data Layers ZK ZK Rollup 的基本思想就是在 ZK Rollup 的基础上在里面嵌入一个 Mini 版本的 Zcash 机制。这样 Relayer 就无需发布 Txs,而只要发布每次的交易回执(Receipts)即可。除了和 ZK Rollup 一样可以提高 tps 之外,Vatalik 也提到了这种方法的一些潜在应用,其中最为激动人心的的应用就是可以加速跨片之间的交易。 ## 总结 To Sum Up 这样一圈看下来,ZK Rollup 本质上也是一种空间换时间的策略,将每次交易的回执放在链上做验证,而把计算任务放在侧链中完成。 在加密货币播客节目 [Magical Crypto Friends](https://www.youtube.com/channel/UCVVDsIYJBQ_C7Bh_aI3ZMxQ) 的主题曲 [Magical Cryptoland 的歌词](http://www.shuizilong.com/house/archives/magical-crypto-friends-magical-cryptoland/) 中,就写到 > Scaling the right way is a long and challenging road. > SegWit is now here - for the UASF we cheer. > Layer 2 solutions are a must, > Always verify, don't trust. > 通过 ZK ZK Rollup,我们可以更清楚的认识到为什么说 Layer 2 解决方案是不可或缺的了。 ![](https://i.imgur.com/9V43BDe.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully