Skip to content

[api] Delayed transaction receipt availability #4677

@Liuhaai

Description

@Liuhaai

What version of iotex-core image (or code branch) are you using?

origin/archive

What operating system and processor architecture are you using?

What did you do? If possible, provide a recipe for reproducing the error.

TX 0xf6ebfc4c55da142f6d265c78d97d365f4888a6f4186e2b30ac3ff52a5b6302f9 is in the block 0x6b6c88579cd8eb1ba95c27aa40d81bfa827aea1786a6a732e963c4d580a47946. But it is returned as NIL when requested via eth_getTransactionReceipt in the first time when the block was the lastest block in the syncing.

{"level":"debug","ts":1752779834.4560218,"caller":"api/web3server.go:163","msg":"handleWeb3Req","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","method":"eth_getBlockByNumber","requestParams":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\",false],\"id\":735}"}
{"level":"debug","ts":1752779834.53141,"caller":"api/web3server.go:277","msg":"web3Debug","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","response":"&{blk:0xc00261f080 transactions:[0xf6ebfc4c55da142f6d265c78d97d365f4888a6f4186e2b30ac3ff52a5b6302f9]}"}

***

{"level":"debug","ts":1752779834.5540557,"caller":"api/web3server.go:163","msg":"handleWeb3Req","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","method":"eth_getBlockByHash","requestParams":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\":[\"0x6b6c88579cd8eb1ba95c27aa40d81bfa827aea1786a6a732e963c4d580a47946\",true],\"id\":736}"}
{"level":"debug","ts":1752779834.6846297,"caller":"api/web3server.go:277","msg":"web3Debug","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","response":"&{blk:0xc00261f080 transactions:[0xc005afea50]}"}

***

{"level":"debug","ts":1752779834.725079,"caller":"api/web3server.go:163","msg":"handleWeb3Req","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","method":"eth_getTransactionReceipt","requestParams":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xf6ebfc4c55da142f6d265c78d97d365f4888a6f4186e2b30ac3ff52a5b6302f9\"],\"id\":737}"}
{"level":"debug","ts":1752779834.8138723,"caller":"api/web3server.go:277","msg":"web3Debug","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","response":"<nil>"}


***

{"level":"debug","ts":1752779835.9030993,"caller":"api/web3server.go:163","msg":"handleWeb3Req","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","method":"eth_getBlockByNumber","requestParams":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\",false],\"id\":738}"}
{"level":"debug","ts":1752779836.0919042,"caller":"api/web3server.go:277","msg":"web3Debug","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","response":"&{blk:0xc00261f080 transactions:[0xf6ebfc4c55da142f6d265c78d97d365f4888a6f4186e2b30ac3ff52a5b6302f9]}"}

***

{"level":"debug","ts":1752779836.555131,"caller":"api/web3server.go:163","msg":"handleWeb3Req","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","method":"eth_getTransactionReceipt","requestParams":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xf6ebfc4c55da142f6d265c78d97d365f4888a6f4186e2b30ac3ff52a5b6302f9\"],\"id\":740}"}
{"level":"debug","ts":1752779836.6942468,"caller":"api/web3server.go:277","msg":"web3Debug","ioAddr":"io129mzh0t0xesw45nju30wff62cv3ucy6vmxcnrj","response":"&{blockHash:[107 108 136 87 156 216 235 27 169 92 39 170 64 216 27 250 130 122 234 23 134 166 167 50 233 99 196 213 128 164 121 70] from:0xc005b24ba0 to:0xc001a3a7e0 contractAddress:<nil> logsBloom: receipt:0xc005d7a000 txType:0}"}

What did you expect to see?

The tx receipt is available via API once the block is queryable .

What did you see instead?

The tx receipt was unavailable in the first try, but available after several seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions