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

Just-in-time valset updates #871

Merged

Conversation

MechanicalTyler
Copy link
Contributor

Closes VolumeFi#273

Background

We don't want to send valset updates every 50 blocks for chains that are relatively inactive. This is a waste of money and resources. Instead, we are switching to just-in-time valset updates.

Snapshots are still taken every 50 block if worth, they just aren't pushed to target chains on every snapshot. Instead, valsets are now published to a chain in one of two cases:

  1. If it's been a week since the last published valset on a chain
  2. If a job is executed and the most recent valset has not been published to the chain yet.

Testing completed

  • wrote tests
  • tested manually on a private testnet

Breaking changes

  • I have checked my code for breaking changes
  • If there are breaking changes, there is a supporting migration.

Tyler Ruppert added 8 commits June 8, 2023 13:16
* We need to know which snapshots are currently active for which chains.
  After a valset update is relayed, we are now setting that information
in the snapshot
* Tests for functionality that was added
* A bit of refactoring to support the tests
Copy link
Contributor

@taariq taariq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. We have tests and now snapshots that are less inefficient.

x/evm/keeper/attest_test.go Show resolved Hide resolved
@taariq taariq merged commit 315cbfa into palomachain:master Jun 8, 2023
@taariq taariq deleted the toaster/just-in-time-valset-updates branch June 8, 2023 19:30
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.

Reduce update valset frequency
2 participants