-
Notifications
You must be signed in to change notification settings - Fork 4.1k
gossip: local infostore can diverge from remote infostore at startup #29992
Description
#29398 changed infoStore.combine to ignore infos that originated at the local node. This was done to prevent "loopback infos" which were causing confusion to parts of gossip that weren't expecting them such as infoStore.mostDistant and the assertion in infoStore.addInfo that local infos always have a ratcheting timestamp.
As noted in #29398 (review), the downside to this approach is that the local infostore will be different from a remote infostore for a short period of time at startup. We don't have a scenario where this is a problem at this time, but it is surprising and might lead to an issue down the line.
Rather than rejecting locally generated infos in infoStore.combine, we could either limit their timestamps, remove the assertion in infoStore.addInfos, or ratchet the local monotonic clock.
@bdarnell Do you have a preference for any of these approaches or have an alternate approach?