You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforce startTimestamp >= uint64(backfillDuration.Seconds()) in either NewLogsDBChainIngester or calculateStartingBlock, or log the underflow and start ingestion from the genesis block as a fallback.
In
calculateStartingBlock,backfillTimestampunderflows ifc.startTimestamp < uint64(backfillDuration.Seconds()).https://github.com/ethereum-optimism/optimism/blob/be00aaa2cc3c8bea80e916d17c30a2b5d8d87696/op-interop-filter/filter/logsdb_chain_ingester.go#L337-L340
Both fields are set directly from arguments of
NewLogsDBChainIngester:https://github.com/ethereum-optimism/optimism/blob/be00aaa2cc3c8bea80e916d17c30a2b5d8d87696/op-interop-filter/filter/logsdb_chain_ingester.go#L79-L80
https://github.com/ethereum-optimism/optimism/blob/be00aaa2cc3c8bea80e916d17c30a2b5d8d87696/op-interop-filter/filter/logsdb_chain_ingester.go#L123-L124
In
service.go,startTimestampis set from the current system time, whereasbackfillDurationcomes from theConfig.https://github.com/ethereum-optimism/optimism/blob/45c7305a2045aa40dc5f881d771b97fc70394a2b/op-interop-filter/filter/service.go#L157-L162
https://github.com/ethereum-optimism/optimism/blob/45c7305a2045aa40dc5f881d771b97fc70394a2b/op-interop-filter/filter/service.go#L199-L200
Recommendation
Enforce
startTimestamp >= uint64(backfillDuration.Seconds())in eitherNewLogsDBChainIngesterorcalculateStartingBlock, or log the underflow and start ingestion from the genesis block as a fallback.Status
Fixed in ethereum-optimism@e7b34fe.