János Tapolcai
    • 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- author: - Tapolcai János and Bence Ladóczki bibliography: - reference.bib date: February 2023 title: Fast Signature Aggregation Protocol for Single Slot Finality --- # Project Abstract The project proposes to solve the verification bottleneck of Casper. We aim to aggregate $\sim300K$ signatures issued by the $2/3$ of the validators to achieve single-slot finality. The proposed aggregation scheme uses state-of-the-art techniques in cryptography, network coding, and succinct data structures. # Objectives A system design, theoretical proofs of its performance and performance related measurements with large-scale simulations. We open-source our code and summarize our findings in a scientific paper submitted to IEEE INFOCOM 2024 or a similar high quality venue, e.g. NDSS or ACM CCS. # Outcomes We aim to deliver single slot (12 seconds) on-chain Casper finality loops. We see a space-time tradeoff in signature aggregation schemes. On one hand, the signatures stored on-chain must not occupy too much space. On the other hand, the time to achieve finality is also an important performance metric. We investigate a two-step solution. The primary objective of the first step is to achieve finality in the shortest time by sacrificing space, and once each validator has generated a proof on the votes from $2/3$ of the validators, a second step commences with the aim of finding a small proof of finality that will later be submitted to the chain through a lengthy process. # Grant Scope Currently, the aggregation schemes in Ethereum 2.0 use an aggregation tree (subcommittees) to collect votes from validators. Although the aggregated signature is small, storing the subset of validators who voted requires significant space. Right now, this is done using a binary array (called *bitlist*). With bitlists one can only aggregate disjunct sets of signatures. This is ensured through the rigid structure of the aggregation tree (validators are assigned to subcommittees), to avoid overlapping. Our high-level idea is the following intuition. When the task is to collect data quickly, it is usually worth sending more data such that the nodes rather share everything they know with each other than coordinate the data collection. And bitmaps in Ethereum 2.0 require a lot of coordination. In the project, we investigate the use of sophisticated data structures for storing the set of validators for each aggregated signature, allowing fully distributed P2P gossiping protocols to collect votes. The data structure we propose is a succinct representation of an integer array. This simplifies the signature aggregation process and makes it much faster to reach finality. To achieve this, we focus on solving the following four research problems. ## Task 1: Design of compressed data structure for faster signature aggregation Here the task is to store the set of validators who have already voted, along with an integer weight for each of them that should represent the number of times their vote is part of the aggregated signature. The compressed data structure should be capable of efficient union operation when two (already aggregated) signatures are aggregated into one. The list of validators is known (stored on-chain); thus, we can refer to them using their ID, which is an integer number in the range $[0,n]$ where $n$ is the maximum number of validators. In the Ethereum 2.0 specification $n\leq 2^{22}$. For efficient union operation, we store an ordered list of validator IDs. Moreover, instead of the IDs themselves, we store the difference between the adjacent elements in the array. Since the list is ordered, the differences are non-negative. It is zero if a validator's signature is part of the aggregated signature multiple times. We store the differences using prefix codes (variable-length codes), such as Huffman codes. Hufmann codes can attain the theoretical "compression" limit established by Shannon if the distribution of each symbol of the coding alphabet (the integer differences of the IDs) is known apriori. As a part of the project, we simulate such a signature aggregation scheme and suggest distributions for the coding alphabet that work well in actual implementations. ## Task 2: Investigate efficient signature aggregation schemes Signature schemes usually implement three functions: keygen, sign, verify, and aggregate. Here aggregate means for a given two (possibly already aggregated signatures) to generate a single aggregated signature. Today BLS signatures are ubiquitous in blockchains, mostly due to their convenient support for signature aggregation and, in general, better space efficiency. This comes at a price of slower operations than traditional ECDSA or Schnorr. However, Casper could do without the full flexibility of aggregation in BLS because the message that needs to be signed does not change. Therefore we invetigate t a simplified Schnorr signature scheme that allows simple aggregation while it is much faster than BLS in terms of signature verification. The idea is to compute the cryptographic hash function on the message (without concatenating it with the nonce commitment). This can achieve basically the same efficiency in aggregation as BLS. Because aggregating two such simplified Schnorr signatures only requires adding two points on an elliptic curve (and adding numbers in the prime field), even if the two simplified Schnorr signatures are aggregated. ## Task 3: Simulating gossiping in the P2P network to achieve finality Based on the outcome of Task 1 and Task 2, we can now design the gossiping protocol to collect the required amount of signatures to provide finality in a single slot. If downloading the previous block and generating the new block takes little time, thus we have almost 12 seconds to collect a proof of a sufficient number of votes (signatures) that can even be attached to the new block. This way, the nodes can immediately verify if finality is achieved when downloading the new block. It can simplify Casper's supermajority link mechanism. The idea is that the validators iteratively exchange the information they have about votes. Each message contains an aggregated signature (defined in Task 1) and a succinct representation of the list validators with their weights. In each iteration, a single aggregated signature is computed based on the (aggregated) signatures the validator has received. For example, in the first iteration, every validator signs the new block and sends its signature to its neighbors. Giant Ethereum validators (Binance, Lido Finance, Coinbase, Kraken, etc.) can send aggregated signatures in the first iteration. Second, the validator generates a single aggregated signature and sends it to all its neighbors with a list of validators involved in it. Third, each validator generates an aggregated signature of these, ideally signed by every validator in a two-hop distance and signed multiple times by its neighbors. This is repeated until the validator has a sufficient number of signatures. The P2P network of Ethereum is 3.7 hops wide on average (and at most 6 hops wide)[^1]. Therefore this will probably be achieved after 4 or 5 iterations. These messages becomes larger and larger as the compressed data structure stores more and information, i.e. more and more validators participating in the an aggregated signature. Once they reach the maximum message transmission unit (MTU) sizes ($\sim1500$bytes), there is no need to aggregate them further, and the protocol turns into a traditional gossiping protocol. Therefore the succinct data structure of Task 2 should be tailored to the outcome of Task 3 such that its size fits in a single IP packet (until the last iteration). In our preliminary estimate, each IP packet can store $50-100K$ aggregated signatures. ## Task 4: Collecting signatures to generate a space-efficient finality proof So far, our goal has been to optimize the speed of reaching finality, by generating a possibly larger off-chain proof. The next step is to generate a space-efficient proof of finality to add on-chain. In this second step, time is not an issue. An ideal solution would be to have an aggregated signature that is signed by every validator (single time) because then it is enough to add a single aggregated signature (64 bytes). Once we have a large aggregated signature reaching finality, the next task is to collect individual (or aggregated) signatures from the validators that are not part of this aggregated signature or they are part of them albeit multiple times. We call them *imperfect* validators. For this purpose, we will use a different data structure to store the list of these imperfect validators, in other words, the complementary set. The block proposal and the imperfect validators will be incentivized to cooperate in this process. In other words, the imperfect validators will be punished unless they provide a signature in this lengthy second step. # Project Team We plan to have three teams working on cryptography, data structures, and computer networm related tasks. Each team shall have one MSc student and one or two experts. János Tapolcai is an expert in computer science and computer networks; he would be working 80 hours per month for 6 months. Bence Ladóczki is an expert in algorithmic implementations; he would be working 80 hours per month for 6 months. Lajos Rónyai is an expert in theoretical computer science; he would be working 20 hours per month for 3 months. We plan to have 2 MSc students, each working 80 hours per month on implementing the algorithms for 4 months. # Background **János Tapolcai** He is a full professor at the Budapest University of Technology and Economics. He has received the prestigious *Lendulet* (Momentum) Grant (2012--2017), the Hungarian equivalent to the ERC Starting Grant, to establish his research group. He has published 16 papers at the IEEE Infocom conference. He is recognized for applied mathematical achievements in practically relevant problems of communication networks. He is active in international collaborations with highly recognized scholars. In 2013 he received Google Faculty Award for designing and implementing succinct data structures in routers. **Bence Ladóczki** He is an assistant research fellow at the Budapest University of Technology and Economics. e is the developer of the electron repulsion integral driver of the MRCC[^2] program suite. During his post graduate years he developed massively parallel algorithms for the K computer in Japan. Since 2021 he has been working on blockchain related problems, including atomic swaps[^3] and signature algorithms. As such he has several years of experience in implementations of algorithms and high performance computing. **Lajos Rónyai** is a Research Professor with the Institute of Computer Science and Control, Eötvös Loránd Research Network, Budapest, Hungary. He leads a research group there which focuses on theoretical computer science, number theory and discrete mathematics. He is also a Full Professor at the Mathematics Institute of the Budapest University of Technology and Economics. He received the Ph.D. degree in 1987 from the Eötvös Loránd University Budapest. His research interests include efficient algorithms, complexity of computation, algebra, and discrete mathematics. <!---He is a member of the Hungarian Academy of Sciences and a recipient of the Count Széchenyi Prize.--> <!--- **Gábor Kovács** He is a research fellow at the Institute for Computer Science and Control. During his PhD he was developing algorithms for space exploration rovers in collaboration with the Japan Aerospace Exploration Agency. He has experience data science and machine/deep learning methods.--> # Methodology **Task 1:** We develop a succinct data structure to store the multi-set of validators. We deliver an implementation and evaluate its performance. **Task 2:** We survey the theory related to aggregated schemes. Many studies have slightly different definitions of signature aggregation. We define these primitives and survey these papers. We implement the simplified Schnorr signature scheme and evaluate its performance when singing, verifying, and aggregating signatures. Finally, we plan to compare its performance with BLS. **Task 3:** We develop a gossiping algorithm that can collect $300K$ signatures in 9 seconds. We evaluate it by simulating Ethereum's P2P network and bolster it with a scalability analysis. **Task 4:** We devise a methodology for the second step of the finality gadget and find a method to generate succint proofs of validity. We analyze different punishment strategies to disincentivise imperfect validators. **Dissemination Task:** Theoretical results of Tasks 1-4 will be summarized in a study and will be submitted to an IEEE Infocom conference. # Timeline ![](https://i.imgur.com/x1bebVK.jpg) # Budget We estimate 1040 hours of working time for the expert members of our team. An amount of 14.5 ETH shall cover the related labour costs. An additional 640 hours for MSc students accounts for 3.3 ETH according to our calculations. [^1]: T. Wang, C. Zhao, Q. Yang, S. Zhang, and S. C. Liew, "Ethna: Analyzing the underlying peer-to-peer network of ethereum blockchain",*IEEE Transactions on Network Science and Engineering*, vol.8, no.3, pp. 2131--2146, 2021. [^2]: https://www.mrcc.hu/index.php [^3]: B. Ladóczki, J. Bíró, and J. Tapolcai, `"Stochastic analysis of the success rate in atomic swaps between blockchains,"" in *International Conference on Blockchain Computing and Applications (BCCA)*, 2022, pp. 41--46.

    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