Francesco
    • 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
    # PeerDAS design progress at the interop Some meaningful changes in the PeerDAS design have been discussed, and agreed upon, at the interop: - Do not use the tight fork-choice in the first iteration of PeerDAS - Increase custody requirement and subnet count - Introduce validator custody - Take peer sampling completely out of the critical path of consensus In my opinion, they represent both a huge simplification and an increase in robustness of the design. Let's break down what these points mean and why that is the case. ## Trailing fork-choice instead of tight fork-choice Firstly, remember the difference between the *tight* and *trailing* fork-choice, also discussed [here](https://ethresear.ch/t/das-fork-choice/19578): with the first, we require peer sampling to be satisfied in order to vote for a new block proposal, whereas with the latter we only require it to vote for older blocks. In other words, with the trailing fork-choice we only start taking peer sampling into account when determining the availability of blocks after some time, e.g., one or multiple slots, with the goal of allowing enough time for it to happen, without getting in the way of voting. Essentially, the trailing fork-choice attempts to take peer sampling out of the critical path of consensus, making it harder for it to cause liveness failures. At the very least, it seems prudent to start by using a fork-choice where peer sampling trails by one slot, because the tight fork-choice has very strict timing requirements, and many ways they might not be satisfied, both due to network failures or malicious behavior. With the tight fork-choice, if any one of the peers you have requested a sample from does not respond before the attestation deadline, you're unable to vote for the latest proposal. On the other hand, if the timing constraints are sufficiently relaxed, it is ok for a few queries to time out, as you only need one to eventually succeed. There are ways to make peer sampling more robust even on tighter timelines, such as [LossyDAS](https://ethresear.ch/t/lossydas-lossy-incremental-and-diagonal-sampling-for-data-availability/18963), which introduces some tolerance of sampling failures while keeping the same soundness error, by increasing the number of sampling queries and requiring more of them to succeed. For example, instead of requiring 16 out of 16 queries to succeed, we can require 19 out of 20 successes or 21 out of 23. Still, there is much work to do before we can confidently say that peer sampling achieves the same level of reliability under tight timing constraints as mesh diffusion, which is currently what we rely on for the critical path of consensus. We can keep working on this and test out different strategies in production once peer sampling is already on mainnet, but for the first iteration it seems much safer to stick to the trailing fork-choice. ## Increase custody requirement and subnet count Once we have agreed to go with the trailing fork-choice, even with the smallest possible trailing period of one slot, there are many downstream consequences to other design decisions. Firstly, [the trailing fork-choice exacerbates some existing ex-ante reorg attacks](https://notes.ethereum.org/P1iDee8lTwyAtHpZwd8LMw?view#With-the-trailing-fork-choice), *unless we set a sufficiently high custody requirement*. The intuition here is that votes cast before doing peer sampling are "insecure", in the sense that they might be well be for an unavailable block, and this opens us up to fork-choice attacks. That is, unless we have some other way of gauging availability before doing peer sampling, which gives us sufficient guarantees. This other way is to consider something available as long as we can retrieve everything that we are custodying. Another way to think about it, given that custody happens through subnets, is that we consider something available before doing peer sampling as long as *subnet sampling* is satisfied. For this to give us meaningful security guarantees, we have to sample enough, meaning we have to have a sufficiently high custody requirement. With that, the trailing fork-choice becomes essentially a hybrid of [SubnetDAS](https://ethresear.ch/t/subnetdas-an-intermediate-das-approach/17169) and PeerDAS, utilizing the former during the trailing period and the latter afterwards. Once we have increased the minimum custody requirement (say to 8, which provides sufficient guarantees), it also makes sense to increase the number of subnets so as to keep the ratio of data custodied by each node to total data low. For example, with a custody requirement of 8 and 128 subnets, each node would download 1/16 of the extended data, or 1/8 of the original data. This means that we can increase the blob count up to 8x, without increasing the bandwidth required by each node (here ignoring what is required by peer sampling, which is much less than what is required for custody, since it doesn't suffer from gossip amplification). Were we to keep the number of subnets to 32 as in the first version of the PeerDAS spec, each node would instead be downloading 1/2 of the original data, and we would hardly get any scalability benefits. We have agreed to increase the number of subnets to at least 64, and possibly even to 128. ## Introducing validator custody Setting a higher custody requirement, sufficient to give meaningful security guarantees before peer sampling is performed, is a decision that's entirely centered around attesting and proposing, i.e., validator duties. *It is not actually beneficial for full nodes*, which do not have such duties. Therefore, we introduce validator custody, i.e., make the default behavior of nodes with validators attached be to custody more than full nodes. We can then also set the general custody requirement to be lower, as this is only driven by the need to provide a backbone for the subnets and a minimum level of data diffusion throughout the network, as a baseline for peer sampling. In particular, we can do the following: - Each full node participates in only 1 out of 32 of the subnets (e.g., set the custody to 4 if we go with 128 subnets), and therefore only downloads 1/16 of the original data. - The baseline custody requirement for a node with at least one validator attached is 6. We also assign additional custody beyond the minimum 6, based on the total balance of all validators that a node has attached. For example, a node could participate in one extra subnet for every 16 ETH of balance, mapping to two extra subnets per pre-MaxEB validator. This has two main implications: - A node with at least one validator (above the minimum activation balance) attached custodies a minimum of 8 subnets, which ensures a good minimum level of security when performing validator duties - With 128 subnets, a node with ~2000 ETH would attempt to download all of the columns, and thus be able to reconstruct whenever it is at all possible to do so. These choices give us a few benefits. Firstly, while full nodes without validators are still contributing to the network by doing some custody, they are cheaper to run than if we were to set their minimum level of custody based on what is required for validator duties. Moreover, scaling the validator custody with number of validators lets us take advantage of the fact that we do not have one million independent validators, and rather 10 to 20 thousand nodes, many of which have 100s or 1000s of validators attached. Such nodes would by default be supernodes, downloading all of the data, which seems entirely appropriate for a node whose associated stake is worth 10s or 100s of millions of dollars. For these nodes, availability essentially works as in 4844, because they do not do any sampling: either they can get all of the data, or they do not consider it available. As far as they are concerned, system can actually even be a bit more robust than with 4844, because they can reconstruct the whole data as soon as any 50% is available, so that localized failures or slowdowns of some subnets does not affect them. *Since such nodes hold a vast majority of the stake, neither subnet nor peer sampling will have much of an impact on consensus in practice*, making the system nearly as robust as what we have today. ## Taking peer sampling out of the critical path By adopting the trailing fork-choice, we have already deferred peer sampling and prevented it from affecting the most time critical consensus tasks. *In fact, there's very little reason not to go further and remove almost any influence it has consensus.* In my opinion, this represents a huge simplification and a major de-risking of the move from 4844 to PeerDAS. ### Using peer sampling for transaction confirmation, not for consensus Let's first consider a system where validators only use their custody check to determine whether something is available, i.e., SubnetDAS. If there is an honest majority of validators, everything works out, because all but a small percentage of honest validators will never vote for an unavailable block, as their custody check would fail. Consensus can stay safe and live (with the right fork-choice design, see [here](https://notes.ethereum.org/P1iDee8lTwyAtHpZwd8LMw?view)) and we can be sure that no unavailable block will ever be finalized. On the other hand, what happens if we don't have an honest majority? Then, we of course don't have any security guarantees about consensus. Still, we want to guarantee that full nodes do not accept unavailable blocks, just like they do not accept invalid blocks. *This is precisely where peer sampling finds its value*, because it is cheaper (no gossip amplification, so we can do more sampling) and makes it a bit harder to target specific nodes (the queries are not all public as with subnet sampling). We can reintroduce peer sampling by having it just be part of transaction confirmation, without affecting the fork-choice, and thus neither attestations nor proposing. In other words, *without it affecting consensus at all*. Furthermore, we actually only need to require peer sampling for finalized blocks, because confirmation on non finalized blocks anyway relies on honest majority. ### Reintroducing peer sampling in a limited capacity The system we have described is very appealing, because full nodes get all the security guarantees of peer sampling, while consensus is completely untouched by it. In particular, liveness of consensus only requires subnets to work reliably. Still, it might make sense to employ peer sampling in an extremely limited capacity within the consensus protocol, namely for justification. Meaning, a node would not consider a checkpoint to be justified if it does not pass the peer sampling check. Luckily, justification takes several minutes, so the timing constraints here are very loose. By doing this, we prevent an honest node from voting with a source checkpoint which is not available, even if their custody check is satisfied. For example, consider the scenario where there's a malicious supermajority which justifies an unavailable block, and also targets some validators by releasing only the columns they are custodying. Such validators would be tricked into voting with this unavailable justified checkpoint as source, and would subsequently unable to switch to a minority fork without slashing themselves. They would instead be stuck on the malicious fork, and be inactivity leaked on any other.

    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