darwinia-network / darwinia

Darwinia Chain, EVM+, Polkadot parachain and integrating with XCMP.
https://darwinia.network
GNU General Public License v3.0
241 stars 51 forks source link

Msgscan missed some logs using `eth_getLogs` #1472

Closed wuminzhe closed 2 months ago

wuminzhe commented 2 months ago

The logs indexing task of msgscan missed some logs before adding an extra scan.

code: https://github.com/darwinia-network/pindex/blob/e5521205757278baebd720f972cfc9bffb32f461/lib/tasks/logs.rake#L17

rpc: https://github.com/darwinia-network/pindex/blob/e5521205757278baebd720f972cfc9bffb32f461/config/pindex.yml#L21

wuminzhe commented 2 months ago

To mitigate this problem, I added an extra scan a little behind the head. The head here means the latest block number - 6. code: https://github.com/darwinia-network/pindex/blob/e5521205757278baebd720f972cfc9bffb32f461/lib/tasks/logs.rake#L26C1-L31C10

hackfisher commented 2 months ago

duplicate with #1473