Skip to content

feat: added support for debug_traceBlockByNumber #3744

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

Merged

Conversation

quiet-node
Copy link
Contributor

@quiet-node quiet-node commented May 6, 2025

Description:
This PR adds a new debug method debug_traceBlockByNumber to the RPC interface. The method enables tracing of all transactions within a specified block using one of the supported tracers.

  • Parameters:

    • blockNumber (required): Block number or tag (e.g., latest, pending).

    • tracerOptions (optional):

      • tracer: Type of tracer (callTracer or prestateTracer).
      • tracerConfig: Additional configuration (e.g., onlyTopCall).
  • Response

    • callTracer: Returns a call frame structure with fields like type, from, to, value, gas, gasUsed, input, output, and any sub-calls.
    • prestateTracer: Returns a mapping of addresses to account states, including balance, nonce, code, and storage.

Fixes #3742

@quiet-node quiet-node added this to the 0.68.0 milestone May 6, 2025
@quiet-node quiet-node self-assigned this May 6, 2025
@quiet-node quiet-node requested review from a team as code owners May 6, 2025 22:34
@quiet-node quiet-node added the enhancement New feature or request label May 6, 2025
@quiet-node quiet-node requested a review from leninmehedy May 6, 2025 22:34
@quiet-node quiet-node linked an issue May 6, 2025 that may be closed by this pull request
@quiet-node quiet-node requested a review from simzzz May 6, 2025 22:34
Copy link

github-actions bot commented May 6, 2025

Test Results

 20 files   -  2  251 suites   - 32   32m 10s ⏱️ - 7m 51s
645 tests + 5  640 ✅ +10  5 💤 ±0  0 ❌  - 5 
661 runs   - 98  656 ✅  - 93  5 💤 ±0  0 ❌  - 5 

Results for commit 60287e6. ± Comparison against base commit d7d6380.

♻️ This comment has been updated with latest results.

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from 9027faa to c43c8b0 Compare May 7, 2025 00:34
@lfdt-bot
Copy link

lfdt-bot commented May 7, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from fdfe205 to 0da7efd Compare May 7, 2025 21:50
@quiet-node quiet-node marked this pull request as draft May 8, 2025 20:54
@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from e0f832b to 6065022 Compare May 8, 2025 23:06
@quiet-node quiet-node marked this pull request as ready for review May 9, 2025 00:24
Ferparishuertas
Ferparishuertas previously approved these changes May 9, 2025
Copy link

@Ferparishuertas Ferparishuertas left a comment

Choose a reason for hiding this comment

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

LGTM
Curious to see Acceptance test were not covering debug

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from 6065022 to f88adc2 Compare May 9, 2025 16:34
@quiet-node
Copy link
Contributor Author

LGTM Curious to see Acceptance test were not covering debug

@Ferparishuertas yes I was surprised too. We only have debug_traceTransaction and debug_traceBlockByNumber atm. For some reason, e2e tests for debug_traceTransaction was missed. There are quite some improvements we can make for debug_traceTransaction as well so I added the e2e test requirement to this issue #3739

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch 7 times, most recently from 9d09c35 to 91c6a55 Compare May 9, 2025 21:29
Copy link

@Ferparishuertas Ferparishuertas left a comment

Choose a reason for hiding this comment

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

LGTM

natanasow
natanasow previously approved these changes May 13, 2025
Copy link
Contributor

@natanasow natanasow left a comment

Choose a reason for hiding this comment

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

LGTM.

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from 05b23db to bd2d99c Compare May 13, 2025 19:18
@acuarica acuarica modified the milestones: 0.68.0, 0.69.0 May 13, 2025
Copy link
Contributor

@konstantinabl konstantinabl left a comment

Choose a reason for hiding this comment

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

Few changes needed

@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from 88dc3cd to 49c9db7 Compare May 14, 2025 17:12
Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node force-pushed the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch from 9c6eb70 to 5204d8a Compare May 14, 2025 19:01
@quiet-node quiet-node requested a review from konstantinabl May 15, 2025 18:55
Copy link
Contributor

@andrewb1269hg andrewb1269hg left a comment

Choose a reason for hiding this comment

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

Review and approve .github/workflows/acceptance.yml

@quiet-node quiet-node merged commit fca86cc into main May 16, 2025
45 of 46 checks passed
@quiet-node quiet-node deleted the 3627-implement-debug_traceblockbynumber-and-trace_block-api branch May 16, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement debug_traceBlockByNumber Implement debug_traceBlockByNumber or trace_block API
7 participants