bor icon indicating copy to clipboard operation
bor copied to clipboard

The new log indexer doesn't include state-sync logs before the Madhugiri fork

Open ngotchac opened this issue 1 month ago • 0 comments

System information

Bor client version: v2.5.3

OS & Version: Linux

Environment: Polygon Mainnet

Overview of the problem

We have activated the new log indexer, available since go-ethereum v1.15.6 via --history.logs=0

It works great, however it doesn't include logs from state-sync transactions before the latest Madhugiri fork (in which they are properly part of the block's transactions).

Reproduction Steps

  • See this state-sync tx from before the fork: https://polygonscan.com/tx/0xe26ba120985511555661bcada23f3c8e67bc6e0b5bdb8a71d4f9641c41f1fd2b
cast logs --from-block 80006032 --to-block 80006032 "Transfer(address indexed,address indexed,uint256)" 0x0000000000000000000000000000000000000000 0x6fE243a76fD51Aa2f3Cc0E731Da4cC0d877E556d

It returns nothing, so it doesn't include the mint to 0x6fE243a76fD51Aa2f3Cc0E731Da4cC0d877E556d

  • See this state-sync tx after the fork: https://polygonscan.com/tx/0x19266376c21947637ceefc22fc7b0547fd64e9dfa95dc65a6cd430d2ae4b15a7
cast logs --from-block 80194432 --to-block 80194432 "Transfer(address indexed,address indexed,uint256)" 0x0000000000000000000000000000000000000000 0x6fE243a76fD51Aa2f3Cc0E731Da4cC0d877E556d

- address: 0xdd28ec6b06983d01D37DbD9Ab581d8d884d95264
  blockHash: 0x01f63befb76da3cb4053d03c7c350bc70b2a8ef70e126866f3a8337e5307f53c
  blockNumber: 80194432
  data: 0x000000000000000000000000000000000000000000000195413e63a9379fd684
  logIndex: 1575
  removed: false
  topics: [
  	0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
  	0x0000000000000000000000000000000000000000000000000000000000000000
  	0x0000000000000000000000006fe243a76fd51aa2f3cc0e731da4cc0d877e556d
  ]
  transactionHash: 0x19266376c21947637ceefc22fc7b0547fd64e9dfa95dc65a6cd430d2ae4b15a7
  transactionIndex: 134

It finds the correct event.

ngotchac avatar Dec 12 '25 00:12 ngotchac