Open koushiro opened 3 years ago
any ideas about it? @insipx
currently trying to reproduce currently on my archive node. Might require some further investigation into substrate
to see if anything has changed with regards to block finalization and storage in rocksdb. It's my hope that we can let substrate handle this, rather than dealing with reorgs within substrate-archive. But needs more research I think. A quick glance at this also lead me to believe it might just be an off-by-one somewhere along the path of blocks being inserted into postgres. Might be best to rule that out first before looking into reorgs, however since the pattern does not continue for anything but 3909355-3909356 3909357-3909358, leads me to believe that it is reorgs.
I also got different values for blocks 3909354 from subscan than you listed:
Subscan Values:
3909354: 0xd780f986d5dfbad0236876940b23bef8b0abbba03ba503cf7a8288732d6d2e37
3909355: 0xd28060f41e2b7854a04a4c75c922ad096bda8f875838095360995a96054c384d
3909356: 0x16a511d2aae56d02fac76b3553a0e45d5c084646dd60b54d5aa3e0d56f28a1e6
3909357: 0x6be2819b88e29250f1b6fedf27a6c809ac2f31ed104d78c165bf12deefe9000d
Interestingly again, Polkascan can't seem to agree on the values either:
Polkascan
3909354: 0xd780f986d5dfbad0236876940b23bef8b0abbba03ba503cf7a8288732d6d2e37
3909355: 0x29be35af4c97f731c9607f78467b9cbc6213fa22ef2403c104976c1a6783d83a
3909356: 0xeb5dd585e06635916228943f6d1eeae3074ed69efee0f97ddf9f314ebdbad4c3
3909357: 0x6be2819b88e29250f1b6fedf27a6c809ac2f31ed104d78c165bf12deefe9000d
Querying the RPC on my polkadot archive node, I got the same values you listed so those are definitely the correct ones
The easiest way to ensure we only index finalized blocks is not indexing anything beyond the latest finalized block:
We could just let reorgs take place, and only keep up with the last finalized block. I think this issue only arises once Archive is caught up to the running chain already, so it shouldn't matter too much if we're a couple blocks behind, and avoids all the logic or updating/reinserting blocks that are being reorged
polkadot 0.8.28-1-99043f78-x86_64-linux-gnu:
actual block 3909354 hash: 0xd780f986d5dfbad0236876940b23bef8b0abbba03ba503cf7a8288732d6d2e37 actual block 3909355 hash: 0x29be35af4c97f731c9607f78467b9cbc6213fa22ef2403c104976c1a6783d83a actual block 3909356 hash: 0xeb5dd585e06635916228943f6d1eeae3074ed69efee0f97ddf9f314ebdbad4c3 actual block 3909357 hash: 0x6be2819b88e29250f1b6fedf27a6c809ac2f31ed104d78c165bf12deefe9000d