Silur
    • 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Polynomial commitments, KZG and the necessity of EIP4844 --- ## Agenda - ZkSnark = Commitment + IOP - But what are commitment schemes? - Various form of commitments imply costs on ZK - Polynomial "balance" - Constraints to polynomials - Why KZG became the hot thing? - KZG in etherum --- ## Zk ~= Commitment + IOP - ZK is a form of communication when you can't decide if Alice talked to herself or to Bob, no matter how long you investigate the dialoge. - The "snark" part also makes this fast, small and one-shot. - It's a trend in crypto engineering to create new ZKSnarks by combining commitments and IOPs - It's not the **only** way to do it, but it works all the time if you have both components ready, and it's easy to model --- ## Commitment schemes - Appeared first in a thought experiment "coin tossing over phone". - You need an encoding of your **secret** data in a way that you cannot **change your mind** when it's time to decide who won. - Formally these are the **binding** and **hiding** requirements --- ## Commitment hierarchy in ZK ![](https://kroki.io/plantuml/svg/eNptkUEKwjAQRfc9xeDORXsAF6WIIEGFYMGFu9CMpZgmMk0Rb29sqk1aV5n5f5iflxSdFWT7ViWElRW6VgirEu0q7C-uNBRJR_OEHdaEGMncqJc2bSNUJDOtkYCTkX3lVofWuWQlbNbR-Anp7k473860RXoYJWyja-hmtzxc91G_7ZVC60LNDRjnLtZxQSrTHDxQ4g8vRURh4-0JLJlKyGSWL-mGGPrs_MF9kwY1woujBv8PZviw49SAO8serQV5gVq6P34DpgCgRw==) --- ## Polynomial $94x_1^{4} + 16x_2^3 - 20x_3 + 3$ or $\sum_{i=0}^{4} c_ix_i^i$ or $(94, 16, 0, -20, 3)$ --- ## Polynomial - they can encode an enormous amount of data - they also encode enormous amount of RELATIONS between data $A(x) + B(x) = C(x)$ - they can express everything that is computable \o/ --- ![](https://i.imgur.com/Jr6WAQW.png) $x_2*(x_1+x_2)*(x_2+1)$ --- ## Why KZG is special? - Fixed commitment size (48 bytes), regardless of how long is your "equation" - Fixed proof size too! - Fixed time verification, just 2 operations! - Multiple proofs can be squeezed into one -> sounds like a rollup! :rolled_up_newspaper: --- ## Ethereum and KZG - Storage is still the most expensive resource in web3 (contrary to IT in general) - Storing commitments, even if just 48 bytes, cost a lot of gas (2100 per byte) - But we nee lots of these if we were to create ZK layer2 dApps --- ## So we made a storage layer just for KZG :shrug: From EIP4844, a separate layer is introduced that ONLY stores KZG commitments, cheaply, and deletes them after 2 weeks... you gonna verify them by that time anyway. --- ## Rules of the new layer - New type of transaction, only to be used if you want blobs - Not really sharded, but only synced by consensus nodes (prism, not geth) - Contracts cannot read directly, only the commitment - On the long term, sharding will be limited per block, so it **has it's own fee market** - New precompile contracts to verify proofs --- ## Layer2 after EIP4844 (the scroll way) - You made $T$ transactions off-chain that you need to anchor back to L1 for the fraction of the gas - Make a KZG commitment you T (remember you cannot change this later) - Make another KZG commitment to the circuit that gets executed inside EVM when you feed it these transactions - Evaluate both equations at the same point and check if they equal all the time --- ## The Future - DankSharding is only the first, forward-compatible step for real sharding - You still store all the blob transactions, but prune them frequently - Fee market experiments can run ahead of time and toolchain can mature before the real thing --- ## Thanks for your attention! Questions? https://silur.me @silur@infosec.exchange https://t.me/huohuli ![](data:image/gif;base64,R0lGODlhlACUAJEAAAAAAP///wAAAAAAACH5BAEAAAIALAAAAACUAJQAAAL/jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTFPAjef6zkM59lvwdIigYohMAmzKprHxZN4YzSKO6sxKs0rf9RI9VMXfI3csOaOh5UrYsH4H1N2J3DsVtofYvNk/12PXtlUIRkgGyKcHaKUomIYY2fhwVykZ+LjTt8TYCQcZYekwmlDKiZpI5JkKujlIOfkpulfnOrsoW3rmiFub1Gt4m5vp+6qL2Rv3a4wUDNtM/ESMt0rK9XyrHHqqun1c/D1bvYvtfT7MncyqKs2cHX4IPq2u6YxOa+9uD9/9Zx0vHb929cZd0lew3zt5AOnNY7bP4DWEDwdqw7fFYbSF/wIbrvsnTqO4kQTBtQrIhqLHWCk3VnQJM+RHlOVUioQm02IxjTxDnawJ86asnM1IdiRaDd5PWyiTMjS6cybSkvcuWvDXFCdVqOQKLmPpdOjTrWSRvfwqMV/ak8KiqszolSlWpQfpJMQnlCZHvTbtwrW7N6/gwIQBm6xruHBRvIoV9qXz17DjxVb5UrZMlNcMwJM5RaxxgjNjlmhBmxBdWU5p0yRQY/b02XRPLXU9Y8o7teMaIBDNTUxLbTRwuX43zHYS1pRP4bbP+s5wfDe7f6r35naL3DhxsNOVH9a9HSDd37yBYawN+3bxo92TR8aNnrp6yGW9r20PLbZY+aTXY/9nG58biWVnFoFqNTeceVcNKN1vmu1nX3UKCsjghF3RBiFXVM21YYXc8Wege/VdFxmAqfmHYHDgOWdhfvMlGBRTKS634kohuthfjjG2CKKK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mSsZVjoZYkUTa6QDIOYpVc4CLpKEwfslCOPtwfy+5WSjI6kJCXSR/5TFlCC8JvhLiCXDCV2cNpmtKPvHPkNlmDznSqc53sbKc73wnPeMpznvSspz3vic98ZqAAADs=)

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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