Skip to content

Conversation

@jiangjinyuan
Copy link
Collaborator

Summary

This PR adds consensus rewrite support for the eth_getBlockReceipts method in proxyd, enabling it to participate in the consensus-aware request rewriting system.

Changes

  • Added eth_getBlockReceipts to rewrite method list: The method is now included in the consensus rewrite logic alongside debug_getRawReceipts and consensus_getReceipts
  • Updated documentation: Added eth_getBlockReceipts to the list of rewritten request methods in README.md
  • Fixed test configuration: Corrected the NewMetricsClient function call in otel_test.go by adding missing parameters
  • Added test coverage: Extended test cases to include eth_getBlockReceipts method testing

Technical Details

The eth_getBlockReceipts method is now handled by the rewriteParam function with the following configuration:

  • Position: 0 (first parameter)
  • Required: true
  • Block number or hash: false

This ensures that when clients request block receipts using consensus tags (latest, safe, finalized), proxyd will rewrite the request to use the resolved consensus block number before forwarding to backends.

Testing

  • All existing tests continue to pass
  • New test cases added for eth_getBlockReceipts method
  • Test coverage includes various scenarios: latest tag, within range, out of range, and missing parameters

Impact

This change improves the consistency of block receipt responses when using consensus-aware backend groups, ensuring clients receive receipts from the same consensus block across different backend services.

@jiangjinyuan jiangjinyuan marked this pull request as ready for review October 10, 2025 08:30
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