bnb-chain / bsc

A BNB Smart Chain client based on the go-ethereum fork
GNU Lesser General Public License v3.0
2.73k stars 1.56k forks source link

I want to get the data of Internal Txns. #2625

Closed junghyun0783 closed 3 months ago

junghyun0783 commented 3 months ago

Hello! I have a question. I want to use debug_traceBlockByHash, debug_traceTransaction RPC in BNB, but when I make a request, the value is

request :
{ "jsonrpc": "2.0", "id": "1",
"method": "debug_traceBlockByHash", "params": ["0xb384412cb17ef410f6f14a19832641e42dbc933875bd83014fe7a0ac95570775", {"tracer": "callTracer"}] } response : { "jsonrpc": "2.0", "id": "1", "error": { "code": -32000, "message": "missing trie node" } }

This is what I get. The endpoint is "https://bsc-testnet-dataseed.bnbchain.org". Why doesn't it work? I want to get the data of Internal Txns. Is there an RPC that can get the data of Internal Txns? Please help me, experts!!!!

zzzckck commented 3 months ago

try this endpoint: https://bsc-prebsc-dataseed.bnbchain.org, it may work. but as it is not an archive node, you can only trace the most recent 128 blocks

junghyun0783 commented 3 months ago

@zzzckck Thanks for your kind reply. Is there any endpoint that provides archive nodes? I need to query blocks older than 128 blocks.

zzzckck commented 3 months ago

@zzzckck Thanks for your kind reply. Is there any endpoint that provides archive nodes? I need to query blocks older than 128 blocks.

sorry, there is no free archive node service right now, but there is a charged one provided by meganode, refer: https://nodereal.io/meganode

or you can setup a Testnet archive node, with Erigon v3, it could take ~6 hours and 500GB disk, depending on your network capacity. https://github.com/bnb-chain/bsc-snapshots/?tab=readme-ov-file#source-3-erigon-archive-node8tb