Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid identical chain info updates #290

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

byte-bandit
Copy link
Collaborator

@byte-bandit byte-bandit commented Sep 28, 2023

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

  • test coverage exists or has been added/updated
  • tested in a private testnet

Breaking changes

  • I have checked my code for breaking changes

@byte-bandit byte-bandit merged commit 7c39ce8 into palomachain:master Sep 28, 2023
@byte-bandit byte-bandit deleted the clohr/chain-info-cache branch September 28, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants