Skip to content

Conversation

@nischitpra
Copy link
Collaborator

@nischitpra nischitpra commented Dec 3, 2025

Summary by CodeRabbit

  • New Features
    • Added configuration option to disable RPC block receipts support, controlled via the RPC_DISABLE_BLOCK_RECEIPTS environment variable (disabled by default).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A new configuration flag RPCDisableBlockReceipts is added to allow disabling block receipts support via environment variable. When enabled, RPC initialization skips probing the eth_getBlockReceipts endpoint and logs a warning instead of attempting feature detection.

Changes

Cohort / File(s) Summary
Configuration Addition
configs/config.go
Added new public bool field RPCDisableBlockReceipts to Config struct with environment variable RPC_DISABLE_BLOCK_RECEIPTS and default value false.
RPC Block Receipts Support Check
internal/rpc/rpc.go
Modified checkGetBlockReceiptsSupport to check RPCDisableBlockReceipts flag; if set, logs warning and returns early without probing endpoint, disabling block receipts support conditionally.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–15 minutes

  • Review config field addition for proper env tag syntax and default value
  • Verify the early-return logic in RPC probe function and confirm warning message is appropriate
  • Ensure no unintended side effects downstream when supportsBlockReceipts remains false
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch np/disalbe_block_receipts_flag

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 655c22b and 3c83f2b.

📒 Files selected for processing (2)
  • configs/config.go (1 hunks)
  • internal/rpc/rpc.go (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@nischitpra nischitpra merged commit 19296e1 into main Dec 3, 2025
4 of 5 checks passed
@nischitpra nischitpra deleted the np/disalbe_block_receipts_flag branch December 3, 2025 08:15
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