Skip to content
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

[RPC] debug_traceBlockByHash throws error #140

Closed
mateipopp opened this issue Jun 21, 2023 · 9 comments
Closed

[RPC] debug_traceBlockByHash throws error #140

mateipopp opened this issue Jun 21, 2023 · 9 comments
Assignees

Comments

@mateipopp
Copy link

System information

Erigon version: ./erigon --version
erigon version 2.43.0-dev-1ad23c29
OS & Version: Windows/Linux/OSX
Ubuntu22.04
Commit hash:
1ad23c2
Erigon Command (with flags/config):
erigon --chain=chapel --datadir=/node/data --metrics --metrics.addr=0.0.0.0 --metrics.port=6060 --private.api.addr=0.0.0.0:9090 --pprof --pprof.addr=0.0.0.0 --pprof.port=6061 --torrent.download.rate=1000mb --p2p.protocol=66 --db.size.limit=1800GB --http=false
Concensus Layer:

Concensus Layer Command (with flags/config):

Chain/Network: BSC Chapel

Expected behaviour

Return trace of the block hash for following API:

curl localhost:8545   -X POST   -H "Content-Type: application/json"   --data '{"method":"debug_traceBlockByHash","params":["0x36e62d559fc61c55bc5bef9ee619db1d65fb946c6e7c100fa74164a4701e0e04", {"tracer": "callTracer", "tracerConfig": {"onlyTopCall":false,"withLog":true}}],"id":1,"jsonrpc":"2.0"}'

Actual behaviour

Handler crashes and response ends with

,{"result":{"from":"0x4714f276709b44c7b3174cee99ed95610f3be3fd","gas":"0x0","gasUsed":"0x5208","to":"0x4432704147b8ec64ea23f6202e1dfd036167f0f6","input":"0x","value":"0x2c68af0bb140000","type":"CALL"}},{"result":null,"error":{"code":-32000,"message":"method handler crashed"}}

Steps to reproduce the behaviour

make the call to bsc erigon node:

curl localhost:8545   -X POST   -H "Content-Type: application/json"   --data '{"method":"debug_traceBlockByHash","params":["0x36e62d559fc61c55bc5bef9ee619db1d65fb946c6e7c100fa74164a4701e0e04", {"tracer": "callTracer", "tracerConfig": {"onlyTopCall":false,"withLog":true}}],"id":1,"jsonrpc":"2.0"}'
@blxdyx
Copy link
Collaborator

blxdyx commented Jun 26, 2023

add this flag in your start command: --http.api=web3,net,eth,debug,trace,txpool

@mateipopp
Copy link
Author

mateipopp commented Jun 27, 2023

Hey @blxdyx , the flags mentioned are present and the error still persist

@blxdyx
Copy link
Collaborator

blxdyx commented Jun 27, 2023

It's test fine in my case.
curl --location --request POST 'localhost:8545' --header 'content-type: application/json' --data-raw '{"method":"debug_traceBlockByHash","params":["0x36e62d559fc61c55bc5bef9ee619db1d65fb946c6e7c100fa74164a4701e0e04", {"tracer": "callTracer", "tracerConfig": {"onlyTopCall":false,"withLog":true}}],"id":1,"jsonrpc":"2.0"}'

@mateipopp
Copy link
Author

Maybe could be related to my node data? Would be possible to have a BSC snapshot for testnet?

@blxdyx
Copy link
Collaborator

blxdyx commented Jun 28, 2023

We will upload it soon.

@mateipopp
Copy link
Author

Here are the logs from the erigon node:
RPC method debug_traceBlockByHash crashed: runtime error: slice bounds out of range [-8256602180500207105:]
Jun 28 10:12:28 bsc-archive-testnet-1-eu erigon[909351]: [service.go:217 panic.go:884 panic.go:153 memory.go:94 call.go:185 interpreter.go:234 interpreter.go:279 evm.go:71 evm.go:276 evm.go:299 state_transition.go:404

@blxdyx
Copy link
Collaborator

blxdyx commented Jul 3, 2023

It also happen in other chain, will follow up
erigontech#7498

@blxdyx blxdyx mentioned this issue Jul 13, 2023
@blxdyx
Copy link
Collaborator

blxdyx commented Jul 14, 2023

Fixed in latest commit

@mateipopp
Copy link
Author

Hey @blxdyx , thanks for the support. Everything works well.

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

No branches or pull requests

2 participants