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

Separate block and blob processing errors #5667

Open
realbigsean opened this issue Apr 30, 2024 · 1 comment
Open

Separate block and blob processing errors #5667

realbigsean opened this issue Apr 30, 2024 · 1 comment

Comments

@realbigsean
Copy link
Member

Description

  • Attributing errors in RPC peer scoring is difficult due to the fact that we are combining block and blob processing errors
  • All error variants should clearly map to an action of downscoring block peer, blob peer, both, or neither
  • related PR discussion Merge parent and current sync lookups #5655 (comment)

@pawanjay176 has started some work here

@dapplion
Copy link
Collaborator

dapplion commented May 1, 2024

I looked into this, all errors in import_block should be internal errors. The only two contentious cases:

  • fork_choice.on_block: Has some fallible cases:
    • UnknownParent: It's already checked when validating the block, the check is redundant an any error can be considered an internal inconsistency
    • FutureSlot: Same as above ^ (already checked, if error = inconsistency)
    • FinalizedSlot, NotFinalizedDescendant: Already checked when validating the block, but it may happen if finality advances between block validation and import. In that case this block is not useful to use anymore and we can discard it. I think it's okay to label this as an internal error, as it's not the fault of the serving peer but just an internal timing coincidence.
  • check_block_is_finalized_checkpoint_or_descendant: This check is redundant to fork_choice.on_block which checks the same condition

This branch explores having dedicated error types for:

  • ProcessBlockError: returned by process_block (verifies block and calls import_block)
  • ProcessBlobError: returned by process_blob (verifies blob and calls import_block)
  • BlockImportError: returned by import_block

https://github.com/dapplion/lighthouse/pull/27/files#diff-c15ca8b30f33ec7edc5fb1d021f71ad868db71da74ec3e8e1ab81186a3bafe72L3226

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

No branches or pull requests

2 participants