Skip to content

Conversation

@tclemos
Copy link
Contributor

@tclemos tclemos commented Sep 30, 2025

closes https://github.com/0xPolygon/devtools/issues/418

  • extends the utils.GetReceipts method to get receipts by block, with a fallback to get them by tx

@tclemos tclemos self-assigned this Sep 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the range calculation in the dumpblocks command and extends the GetReceipts method to support getting receipts by block with a fallback to getting them by transaction hash.

  • Fixed off-by-one error in block range iteration logic
  • Added support for eth_getBlockReceipts RPC method with fallback to existing transaction-based approach
  • Refactored receipt fetching into separate functions for better maintainability

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
cmd/dumpblocks/dumpblocks.go Fixed range calculation to use inclusive end boundary and correct range advancement
util/util.go Added block-based receipt fetching with fallback and refactored existing logic into separate function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@minhd-vu minhd-vu changed the title dumpblocks: fix range; get receipts by block feat(dumpblocks): fix range; get receipts by block Oct 1, 2025
tclemos and others added 5 commits October 1, 2025 16:16
* feat: adding command to parse batchl2 data

* fix: issue with rpc flags

* Update cmd/parsebatchl2data/parsebatchl2data.go

Co-authored-by: Léo Vincent <28714795+leovct@users.noreply.github.com>

* fix: flag_loader import

* fix: lint

* fix: err shadow

* fix: handle errors from printTxData

---------

Co-authored-by: Minh Vu <minhd_vu@yahoo.com>
Co-authored-by: Léo Vincent <28714795+leovct@users.noreply.github.com>
Co-authored-by: Minh Vu <mvu@polygon.technology>
@minhd-vu minhd-vu merged commit c410f6e into main Oct 3, 2025
14 checks passed
@minhd-vu minhd-vu deleted the thiago/dumpblocks-batch-receipts branch October 3, 2025 13:52
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.

5 participants