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

Match block and blobs after validating execution #6469

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Oct 6, 2024

Issue Addressed

After PeerDAS we request block and data to different peers. Consider the following scenario when doing a by range sync:

  • Block at slot N contains no data
  • Peer serving the block at slot N forges the block adding KZG commitments
  • The peers serving data columns do not return any data columns for slot N

Current unstable will attempt to match block and columns and consider the entire RpcBlock invalid. A similar scenario can occur where the block peer is honest and the column peer is dishonest.

We need to make the code more aware of who is at fault, and specifically do not attempt to match columns before validating the block.

Part of

Note: this PR touches code on the mainnet path, not only PeerDAS

Proposed Changes

Relax RpcBlock construction with new_unchecked and perform matching in verify_kzg_for_rpc_block after the block is execution validated.

This PR does not include a fix for peer scoring. This will be tackled latter as part of #6258

@dapplion dapplion added the ready-for-review The code is ready for review label Oct 6, 2024
@pawanjay176 pawanjay176 added under-review A reviewer has only partially completed a review. and removed ready-for-review The code is ready for review labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under-review A reviewer has only partially completed a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants