Kamil Salakhiev
    • 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 New
    • 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 Note Insights Versions and GitHub Sync 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Grid tags: Networking, BEAM description: View the slide with "Slide Mode". --- # Grid signature distribution in BEAM Kamil Salakhiev 𝕏 [@kamil_abiy](http://x.com/kamil_abiy) <i class="bi bi-globe"></i> qdrvm.io --- <style> .two-column-layout { column-count: 2; /* Set column number */ column-gap: 20px; max-width: 100%; overflow: hidden; } /* Media query for mobile devices */ @media (max-width: 768px) { .two-column-layout { column-count: 1; /* Switch to single column on small screens */ column-gap: 0; /* Optional: Set gap to 0 for single column */ } } .markdown-body, .ui-infobar { max-width: unset !important; } .two-column-layout ul, .two-column-layout ol { margin: 0; padding-left: 20px; } .two-column-layout strong { font-weight: bold; } .two-column-layout em { font-style: italic; } .two-column-layout h1, .two-column-layout h2, .two-column-layout h3, .two-column-layout h4, .two-column-layout h5, .two-column-layout h6 { margin-top: 0; } </style> ## Assumptions 1. $n=16384$ $(2^{14})$ validators 2. Each validator generates a 1.5KB signature 3. In addition to the validators there are untrusted, altruistic aggregators (provers) that generate SNARK to prove the signatures are valid 4. The addresses of the validators are known and could be matched with their signing public keys --- ## Goal * Design a network structure that allows $\frac{2}{3}n + 1$ of signatures to be aggregated as quickly as possible --- ## 2d grid <div class="two-column-layout"> ![image](https://hackmd.io/_uploads/BJmKJh9aJx.png) ### - Each validator uses the common source of randomness to form *grid view* - Each <span style="color:red">validator</span> maintains $\sqrt{n}$ connections with <span style="color:blue">column neighbors</span> and $\sqrt{n}$ connections with <span style="color:green">row neighbors</span> </div> --- ## Distribution pattern ![image](https://hackmd.io/_uploads/HyAyln9a1g.png) --- ## Benefits * Distance between any two validators is at most 2 hops * In gossipsub distance is $\approx 5.41$ for $N=2^{14},k=6$ * $O(n)$ signature messages in the validators network per signature * \+ additional $O(n^{\frac{3}{2}})$ `IHAVE` messages * Each validator can receive the same message from at most 2 peers <!-- ## Grid communication complexity (per signature) * Step 3. The remaining $n-2\sqrt{n}$ validators propagate `IHAVE` messages in orthogonal direction * $(n-2\sqrt{n})\times \sqrt{n}\approx O(n^{\frac{3}{2}})$ messages containing `IHAVE` * Total 2064384 `IHAVE` messages (31.5MB) for $n=2^{14}=16384$ validators --> <!-- --- ## Grid traffic consumption (per validator) * Each validator would propagate a signature message from each of its row/column neighbor to each of column/row neighbor * resulting into $2\sqrt{n}\times \sqrt{n}$ signature messages * Each validator would propagate `IHAVE` message to each of its non-neighbor validator * resulting into $(n-2\sqrt{n})\times 2\sqrt{n}$ `IHAVE` messages * Total outbound bandwidth required per validator (assuming 4-seconds slot, 3 seconds to vote, 16384 validators): 651264 bytes / 3 seconds = 1.65Mbps bandwidth is required --> <!-- --- ## Gossipsub communication complexity (per signature) > Note. Assuming gossipsub 1.1 without IDONTWANT 1. Each peer will propagate a new message to $k$ random peers 2. $N \gg n$ total nodes 3. Total messages in the network per signature: $O(N\times n \times k)$: * 98304 signature messages (144MB) for $N=16384,k=6$ * 6000000 signature messages (8789MB) for $N=1000000,k=6$ --> <!-- --- ## Gossipsub traffic consumption (per peer) 1. Each peer would propagate each signature message to $k$ random peers 2. $n$ total peers producing a signature 3. So each peer would distribute $n\times k$ signature messages * 98304 signature messages (144MB), 3 seconds to vote: 384MBps bandwidth is required --> <!-- --- ## Impact of malicious peers in grid Step 3. of grid distribution is needed to prevent eclipse attack scenario when two malicious peers can eclipse one validator from receiving a signature message. Let's break down such scenario. ### Two malicious nodes example Suppose the grid is 4x4. * Let's say s is at (2,2). * Its row neighbors are (2,1), (2,3), (2,4). * Column neighbors are (1,2), (3,2), (4,2). * If (2,1) and (1,2) are both malicious. Then: * Step 1: s sends to row neighbors (2,1), (2,3), (2,4) and column neighbors (1,2), (3,2), (4,2). * In step 2, malicious nodes (2,1) and (1,2) do not forward. * The other row neighbors (2,3), (2,4) forward to their column neighbors (1,3), (3,3), (4,3), (1,4), (3,4), (4,4) * The other column neighbors (3,2), (4,2) forward to their row neighbors: (3,1), (3,3), (3,4), (4,1), (4,3), (4,4) * Only (1,1) is not getting the signature message after step 2. * However, it receives `IHAVE` message from other non-malicious row and column neighbors and therefore requests the missing signature message from one of these nodes ### m malicious nodes * From the previous example we observed that two malicious nodes can eclipse one validator, if malicious nodes were positioned in the same row and column of validator $s$ producing the original signature message. * As result eclipsed validator would need to perform a signature request after receiving `IHAVE` In a worst case for $m$ malicious nodes that do not propagate signatures and are optimally distributed between rows and columns to maximize the number of blocked messages there would be $\approx\frac{m^2}{2}$ eclipsed validators, that would need to fetch the signature message after receiving `IHAVE`, i.e. causing additional $\frac{m^2}{2}$ messages * However, this also means that these malicious nodes would not propagate $\frac{m^2}{2}$ signature messages, therefore, total number of signature message remains the same * The latency in such scenario for nodes eclipsed during step 2, would be increased by `IHAVE` message communication + 1 signature message sent from honest validator --> --- ## Signature aggregation * Aggregators cannot join grid lattice * Aggregating nodes are untrusted entities with no stake * Aggregators may join or leave the network dynamically --- ## Challenges with a single grid - All validators receive all signatures - No benefit for aggregators - Network traffic congestion - Each validator will receive $O(n)$ signatures within a single slot - $\approx 128Mbps$ incoming bandwidth is required (assuming 3 seconds to distribute signatures) --- ## Signature aggregation with grid ![image](https://hackmd.io/_uploads/Sk4gtoqake.png) --- ## Conclusion - Grid is effective protocol for fast message distribution among validators - Grid could be helpful in accelerating of signatures batch collection --- ## Thanks! Link to slides ![image](https://hackmd.io/_uploads/rJXuwhq6ye.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