-
Notifications
You must be signed in to change notification settings - Fork 860
1D PeerDAS prototype: Data format and Distribution #5050
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
eee0b0d
Build and publish column sidecars. Add stubs for gossip.
jimmygchen e340737
Add blob column subnets
jimmygchen 22bc8b0
Add `BlobColumnSubnetId` and initial compute subnet logic.
jimmygchen 8e86500
Subscribe to blob column subnets.
jimmygchen 985c98c
Introduce `BLOB_COLUMN_SUBNET_COUNT` based on DAS configuration param…
jimmygchen d6d6a64
Fix column sidecar type to use `VariableList` for data.
jimmygchen 036ce21
Merge branch 'unstable' into column_sidecars
jimmygchen ed6fa22
Fix lint errors.
jimmygchen b9a970b
Update types and naming to latest consensus-spec #3574.
jimmygchen 31cde69
Fix test and some cleanups.
jimmygchen fb0a2d0
Merge branch 'das' into column_sidecars
jimmygchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ use crate::attester_cache::{AttesterCache, AttesterCacheKey}; | |
use crate::beacon_block_streamer::{BeaconBlockStreamer, CheckEarlyAttesterCache}; | ||
use crate::beacon_proposer_cache::compute_proposer_duties_from_head; | ||
use crate::beacon_proposer_cache::BeaconProposerCache; | ||
use crate::blob_verification::{GossipBlobError, GossipVerifiedBlob}; | ||
use crate::blob_verification::{ | ||
GossipBlobError, GossipVerifiedBlob, GossipVerifiedBlobColumnSidecar, | ||
}; | ||
use crate::block_times_cache::BlockTimesCache; | ||
use crate::block_verification::POS_PANDA_BANNER; | ||
use crate::block_verification::{ | ||
|
@@ -2055,6 +2057,19 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
}) | ||
} | ||
|
||
pub fn verify_blob_column_sidecar_for_gossip( | ||
self: &Arc<Self>, | ||
blob_column_sidecar: Arc<BlobColumnSidecar<T::EthSpec>>, | ||
subnet_id: u64, | ||
) -> Result<GossipVerifiedBlobColumnSidecar<T>, GossipBlobError<T::EthSpec>> { | ||
metrics::inc_counter(&metrics::BLOBS_COLUMN_SIDECAR_PROCESSING_REQUESTS); | ||
let _timer = metrics::start_timer(&metrics::BLOBS_COLUMN_SIDECAR_GOSSIP_VERIFICATION_TIMES); | ||
GossipVerifiedBlobColumnSidecar::new(blob_column_sidecar, subnet_id, self).map(|v| { | ||
metrics::inc_counter(&metrics::BLOB_COLUMNS_SIDECAR_PROCESSING_SUCCESSES); | ||
v | ||
}) | ||
} | ||
|
||
pub fn verify_blob_sidecar_for_gossip( | ||
self: &Arc<Self>, | ||
blob_sidecar: Arc<BlobSidecar<T::EthSpec>>, | ||
|
@@ -2870,6 +2885,20 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
self.remove_notified(&block_root, r) | ||
} | ||
|
||
pub fn process_gossip_blob_column( | ||
self: &Arc<Self>, | ||
blob_column: GossipVerifiedBlobColumnSidecar<T>, | ||
) { | ||
let blob_column = blob_column.as_blob_column(); | ||
// TODO(das) send to DA checker | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Until crypto is ready a basic impl could just check that > 50% of columns per row have been seen, without attempting re-construction otherwise |
||
info!( | ||
self.log, | ||
"Processed gossip blob column"; | ||
"index" => blob_column.index, | ||
"slot" => blob_column.slot().as_u64() | ||
); | ||
} | ||
|
||
/// Cache the blobs in the processing cache, process it, then evict it from the cache if it was | ||
/// imported or errors. | ||
pub async fn process_rpc_blobs( | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
All checks in https://github.com/ethereum/consensus-specs/pull/3574/files#diff-bacd55427cc3606e97b0f11dada895de104a8f9c532aca270efae967199bf261R123 can be implemented except for the crypto, aliasing
verify_data_column_sidecar_kzg_proof
to a noop