erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.15k stars 1.13k forks source link

polygon/bridge: fix snapshot stores, logging, replay blocks if needed on startup #12849

Closed taratorio closed 5 days ago

taratorio commented 6 days ago
  1. fixes a bug with snapshot store which was causing uint64 underflow (due to 0-1) because it was not filtering out snapshot segment indices that were empty (so index.BaseDataId()+index.KeyCount()-1 = 0+0-1) in LastFrozenEntityId - this caused the milestone scrapper to be stuck forever in SynchronizeMilestone
  2. fixes a bug with bridge block replay on startup if it is behind current execution tip - this relates to situations that can happen after initial sync and snapshot download and/or during regeneration of bridge/heimdall snapshots from 0 as described here https://github.com/erigontech/erigon/issues/12737#issuecomment-2485896540 (hence also closes https://github.com/erigontech/erigon/issues/12737)
  3. improves our Info logging by introducing periodic progress logging so it doesn't look like the node is stuck/not doing anything upon initial sync on Info level