fix: avoid identical chain info updates #290
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Github tickets
Background
This is a problem that's been around a long time as well. What's happening is that Pigeons will send their external chain infos every 30 seconds. Those records will NOT include the balances of the external addresses. There's a separate job running for this, which queries external chain balances and those will be attested by all pigeons before being added to the external chain information set.
Now, when Pigeon reports in every 30 seconds, it OVERRIDES the existing record. This might be by design, but either the balances aren't being attested properly or pigeon sends the chain info too often.
With this change, we store the last ExternalChainInfo record sent to Paloma - and if this value doesn't deviate from the last one sent, we simply skip the send. We save on fees and reduce messages and also stop constantly overriding this balance record.
Testing completed
Breaking changes