Skip to content

Force load default tracers#560

Merged
cffls merged 1 commit into
0xPolygon:developfrom
cffls:develop
Oct 20, 2022
Merged

Force load default tracers#560
cffls merged 1 commit into
0xPolygon:developfrom
cffls:develop

Conversation

@cffls

@cffls cffls commented Oct 19, 2022

Copy link
Copy Markdown
Contributor

Description

This change is to fix a bug where callTracer could not be found in new CLI. This fix is using the solution in geth cmd.

Before:

curl -s --data '{"id": 2326357, "jsonrpc": "2.0", "params": ["0xeeb1b9ef1ab822cfbcb01bb8ec9cfad079dc03e8b553b331b0c56fd7a837cd06", { "tracer": "callTracer" }], "method":"debug_traceTransaction"}' -H "Content-Type: application/json" -X POST http://localhost:8547
{"jsonrpc":"2.0","id":2326357,"error":{"code":-32000,"message":"tracer not found"}}

Test output after this change:

curl -s --data '{"id": 2326357, "jsonrpc": "2.0", "params": ["0xeeb1b9ef1ab822cfbcb01bb8ec9cfad079dc03e8b553b331b0c56fd7a837cd06", { "tracer": "callTracer" }], "method":"debug_traceTransaction"}' -H "Content-Type: application/json" -X POST http://localhost:8547
{"jsonrpc":"2.0","id":2326357,"result":{"type":"CALL","from":"0x80668a5012564c2e7f825903b345e0ca807272f4","to":"0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f","value":"0x0","gas":"0x4a50","gasUsed":"0x14fc","input":"0x095ea7b3000000000000000000000000564edce4faa31e48421100a9da7b8eb4a38b3654ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","output":"0x0000000000000000000000000000000000000000000000000000000000000001"}}

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@codecov-commenter

codecov-commenter commented Oct 19, 2022

Copy link
Copy Markdown

Codecov Report

Base: 56.89% // Head: 56.86% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (f32d2bd) compared to base (7c9cd4c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #560      +/-   ##
===========================================
- Coverage    56.89%   56.86%   -0.03%     
===========================================
  Files          606      606              
  Lines        70128    70128              
===========================================
- Hits         39901    39881      -20     
- Misses       26810    26835      +25     
+ Partials      3417     3412       -5     
Impacted Files Coverage Δ
internal/cli/server/server.go 30.89% <ø> (ø)
eth/downloader/modes.go 10.34% <0.00%> (-13.80%) ⬇️
p2p/discover/v4_udp.go 72.75% <0.00%> (-4.35%) ⬇️
consensus/ethash/ethash.go 51.90% <0.00%> (-1.15%) ⬇️
miner/worker.go 73.89% <0.00%> (-0.80%) ⬇️
rpc/client.go 82.94% <0.00%> (-0.78%) ⬇️
eth/filters/api.go 41.13% <0.00%> (-0.71%) ⬇️
eth/downloader/fetchers_concurrent.go 53.06% <0.00%> (-0.69%) ⬇️
eth/protocols/snap/sync.go 71.72% <0.00%> (-0.68%) ⬇️
les/costtracker.go 62.43% <0.00%> (-0.53%) ⬇️
... and 16 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cffls cffls merged commit aab7214 into 0xPolygon:develop Oct 20, 2022
@cffls cffls mentioned this pull request Oct 20, 2022
15 tasks
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