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

Polygon: debug_traceTransaction throws error for block 21615364 #7498

Closed
zimbabao opened this issue May 11, 2023 · 16 comments
Closed

Polygon: debug_traceTransaction throws error for block 21615364 #7498

zimbabao opened this issue May 11, 2023 · 16 comments
Assignees
Labels

Comments

@zimbabao
Copy link
Contributor

zimbabao commented May 11, 2023

System information

Erigon version: erigon version 2.43.0-stable-7e8beecf

OS & Version: Windows/Linux/OSX: Linux polygon-erigon-archive-a-0 5.10.173-154.642.amzn2.x86_64 #1 SMP Wed Mar 15 00:26:42 UTC 2023 x86_64 Linux

Commit hash: 7e8beec

Erigon Command (with flags/config): erigon--datadir=/data/volumes/erigon-bor--private.api.addr=localhost:9090--chain=bor-mainnet--http=true--http.addr=0.0.0.0--http.port=8545--maxpeers=300--metrics--metrics.addr=0.0.0.0--metrics.port=6061--private.api.addr=localhost:9090--http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine--ws--ws.compression--rpc.gascap=300000000--http.addr=0.0.0.0--txpool.api.addr=0.0.0.0:9091--http.vhosts=*--pprof--pprof.addr=0.0.0.0--pprof.port=6059--downloader.verify--p2p.protocol=66--sentry.drop-useless-peers=true

Concensus Layer: heimdalld 0.3.3

Concensus Layer Command (with flags/config): heimdalldstart--home=/data/volumes/heimdall--p2p.laddr=tcp://0.0.0.0:26656--rpc.laddr=tcp://0.0.0.0:26657/var/lib/heimdall

Chain/Network: Polygon

Expected behaviour

Return trace of the block for following API

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

Actual behaviour

Handler crashes and response ends with "output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000018556e69737761705632526f757465723a20455850495245440000000000000000","error":"execution reverted","revertReason":"UniswapV2Router: EXPIRED","value":"0x0","type":"CALL"}},{"result":null,"error":{"code":-32000,"message":"method handler crashed"}}

Steps to reproduce the behaviour

Make call to polygon erigon

curl  http://localhost:8545  -X POST  -H "Content-Type: application/json"  --data '{"method":"debug_traceBlockByNumber","params":["0x149d304", {"tracer": "callTracer",  "tracerConfig": {"withLog": true}}],"id":1,"jsonrpc":"2.0"}'
@fabwa
Copy link

fabwa commented May 24, 2023

Does not crash on erigon version 2.33.1-stable-41c0a474

@zimbabao
Copy link
Contributor Author

@0xKrishna : Did you get any chance to look at this?

@0xKrishna
Copy link
Collaborator

Nope, I don't have access to any mainnet node as of now, So not able to reproduce.

@zimbabao
Copy link
Contributor Author

@0xKrishna it crashes on mumbai archive node too, for block number 29689951

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

@quickchase
Copy link
Contributor

I can confirm both of these crash on erigon version 0.0.6-bor-d9c5a011

@0xKrishna
Copy link
Collaborator

0xKrishna commented Jun 1, 2023

I checked on a mumbai and debugged, It's something related to contract creation on evm level
Logs from server

[EROR] [06-01|09:57:48.401] RPC method debug_traceBlockByNumber crashed: runtime error: index out of range [-1]
[service.go:217 panic.go:890 panic.go:113 call.go:176 interpreter.go:234 interpreter.go:262 evm.go:63 evm.go:401 evm.go:449 state_transition.go:395 state_transition.go:186 tracing.go:195 tracing.go:141 tracing.go:32 value.go:584 value.go:368 service.go:222 handler.go:511 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1594]

@zimbabao
Copy link
Contributor Author

zimbabao commented Jun 5, 2023

I tried to look but didn't make much progress. Any luck?

@fabwa
Copy link

fabwa commented Jun 22, 2023

Still happening on v2.46.0

@Andrei-sys
Copy link

Any updates regarding this? Saw that similar issue on node-real/bsc-erigon has been solved.

@github-actions
Copy link

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 27, 2023
@fabwa
Copy link

fabwa commented Aug 27, 2023

bump

@0xKrishna
Copy link
Collaborator

Any updates regarding this? Saw that similar issue on node-real/bsc-erigon has been solved.

Hi, Can you refer to the commit or PR ?

@Andrei-sys
Copy link

Any updates regarding this? Saw that similar issue on node-real/bsc-erigon has been solved.

Hi, Can you refer to the commit or PR ?

Hi, there you go: node-real#159

@0xKrishna
Copy link
Collaborator

Thanks, I will look into this.

@mh0lt mh0lt added the polygon label Aug 28, 2023
@0xKrishna 0xKrishna self-assigned this Sep 5, 2023
@0xKrishna
Copy link
Collaborator

It worked for me on my v2.49.1 node which I have synced from scratch

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

@0xKrishna
Copy link
Collaborator

Also worked for

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants