Hello, I am new to klaytn dev. Recently I was implementing a feature to get all klaytn calltraces from self-host klaytn node or mainnet(cypress) via RPC call (debug_traceTransaction). There are some interesting findings during implementation that need your help to clarify as following.
- When fetching calltrace with RPC call (debug_traceTransaction) from mainnet (https://public-node-api.klaytnapi.com/v1/cypress), I found there are only calltraces available after Block No 81000000 in public mainnet as below screenshots:
- 0x9dbf67b227b878ea1640758ef27b8be36834d763807bd2f036239a60fd8e740f in Block 81000000, 1st call returns err “required historical state unavailable”. 2nd call returns correct response
- 0x3fc8fabb55c1dd6438e3faf192669c01d7ba7949377e3f298883d85dc50a44a0 in Block 78000000, always returns “required historical state unavailable”. I also tried other blocks before 81000000, returns “required historical state unavailable” either.
- I also host a self-hosted klaytn node with snapshots, and I enable archive gcmode in kend.config. Trying to fetch calltrace with rpc call from self-hosted node, I got same blocker that calltrace is only available after Block No.83000000.
So my question is that is it possible for me to implement a feature to fetch all calltraces (0~latest block)? If yes, how should I do it?