-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec without peer sampling #3870
Conversation
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I would like another review before merging this.
What is the reason for changing this ? Any reason we can't hold off on importing blocks till we verify that all custodied data is there . Importing unavailable blocks into forkchoice and the db, will require some special case handling |
I don't like this about the current behavior, applied to a system with sharded distribution:
Basically A ends up missing out on voting weight by no fault of its own. Of course, if B is actually not available (< 50%), the amount of "missed weight" would be low due to sampling. And if it is available, reconstruction should quickly enough make sure that everyone imports it and sees all weight for A. Therefore, we could also go with the simpler option of just not importing, at a small price. In principle I struggle to see why not importing should be simpler than this other solution, and so I would prefer what I see as the more principled approach. On the other hand, given that we already have the not importing approach implemented, there's little harm in keeping that one and leaving it up to a separate decision whether to at some point switch to the fork-choice filtering approach. I might revert to the original approach in this PR, and open another PR for the fork-choice change only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work! I like the simplification and if anything just makes the implementation process a bit more manageable with smaller chunks
going to merge for now to facilitate development targets for peerdas implementers let's address outstanding concerns in future PRs :) |
I realize the reply is late for this:
This is more of an issue on how clients handle invalid blocks. I view unavailable blocks as a class of them. For us if a block is invalid (either invalid consensus validation or execution validation), it would never be inserted into the db or forkchoice. In the event of optimistic sync this block would then be removed from the db. If we do start inserting blocks into the db which we have determined are unavailable and therefore invalid it would require a lot downstream changes ( ex: API,etc) on how to handle these class of blocks. |
A first spec for this proposed simplification of the first version of PeerDAS. This includes:
peer-sampling.md
max(custody_subnet_count, SAMPLES_PER_SLOT)
subnets, onlycustody_subnet_count
of which are advertised.custody_subnet_count
is required to be at leastCUSTODY_REQUIREMENT
, which is less thanSAMPLES_PER_SLOT
, so only a portion of the subnet sampling is enforced by peers.A simple fork-choice spec:Possibly moving this to its own separate PR and keeping the Deneb-style fork-choice (don't import unavailable blocks) for now, see Spec without peer sampling #3870 (comment)is_data_available
is entirely based on subnet sampling, meaning that something is available as long as all subnet sampling columns (again, a superset of custody) are available. This is used as a fork-choice filter inget_head
rather than as a block import filter inon_block
. We always import blocks regardless of whether they are available, but we never follow unavailable branches in the fork-choice.