Skip to content

fix: prevent endless retry when CL times out validating large payloads#10

Open
ZZZ0h wants to merge 2 commits intodevfrom
fix_endless_retry
Open

fix: prevent endless retry when CL times out validating large payloads#10
ZZZ0h wants to merge 2 commits intodevfrom
fix_endless_retry

Conversation

@ZZZ0h
Copy link

@ZZZ0h ZZZ0h commented Feb 11, 2026

This PR addresses the endless retry issue caused by CL (Consensus Layer) timeout when validating large payloads in PBFT consensus model. The problem occurs because:

  1. Hash mismatch after execution: The block hash changes after execution when gas_used is updated from 0 to actual value, causing standard hash-based lookup to fail on retry.
  2. Infinite retry on invalid payload: The CL may repeatedly send the same invalid payload if it times out before receiving the INVALID response.

Changes:

  1. Add executed block lookup by (number, parent_hash):

    • Add executed_block_by_number_and_parent method to TreeState
    • Before executing a payload, check if it has already been executed using (block_number, parent_hash) pair
    • Validate payload structure without re-executing and return previous execution result
    • This avoids redundant EVM execution for the same payload on timeout retry
  2. Add fast reject for known invalid blocks:

    • Early check in newPayload handler for blocks already marked as invalid
    • Immediately return INVALID response without re-executing signature recovery or EVM
    • Prevents infinite retry loop for invalid payloads

These changes significantly improve system stability and resource utilization under high-pressure testing with large blocks.

@ZZZ0h ZZZ0h force-pushed the fix_endless_retry branch from 545995e to 0f5574c Compare February 11, 2026 15:37
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.

1 participant