Skip to content
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

Trigger sampling on sync events #5776

Merged
merged 4 commits into from
May 15, 2024
Merged

Conversation

dapplion
Copy link
Collaborator

Issue Addressed

Currently we only trigger sampling on gossip blocks.

Proposed Changes

Trigger sampling for blocks:

  • Imported on range sync
  • Imported on lookup sync

@dapplion dapplion requested a review from jimmygchen May 13, 2024 20:26
/// Returns true if we should issue a sampling request for this block
/// TODO(das): check if the block is still within the da_window
pub fn should_sample_slot(&self, slot: Slot) -> bool {
self.spec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

self.spec.is_peer_das_enabled_for_epoch(slot.epoch(T::EthSpec::slots_per_epoch()))

@jimmygchen jimmygchen added das Data Availability Sampling ready-for-review The code is ready for review labels May 14, 2024
@jimmygchen jimmygchen mentioned this pull request May 14, 2024
44 tasks
@dapplion dapplion merged commit 07df74c into sigp:das May 15, 2024
8 of 13 checks passed
@dapplion dapplion deleted the trigger-sampling branch May 15, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants