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

Validate blob sidecar: check bad parent first #15013

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

terencechain
Copy link
Member

Mainly a cosmetic change to emit the correct log when receiving a blob sidecar that builds on an invalid parent. The end result remains the same—the peer gets penalized.

Currently, if a blob sidecar builds on top of an invalid parent, the following happens:

  • SidecarParentSeen returns nil
  • ValidProposerSignature returns "block not found"

What we want instead is for SidecarParentSeen to return nil, but for SidecarParentValid to return an error subsequently. This ensures the logs are emitted in the correct order, making them less confusing to read.

Note to the reviewer: I don’t see any downside to switching the order of validation. SidecarParentValid is a cheap check, and it’s unclear why it was always placed after ValidProposerSignature. The original intent is not obvious

@terencechain terencechain requested a review from a team as a code owner March 5, 2025 16:49
@terencechain terencechain force-pushed the check-bad-parent-first branch from 76b0470 to debaf59 Compare March 5, 2025 16:51
@prestonvanloon prestonvanloon added this pull request to the merge queue Mar 5, 2025
Merged via the queue into develop with commit 997a911 Mar 5, 2025
17 checks passed
@prestonvanloon prestonvanloon deleted the check-bad-parent-first branch March 5, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants