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

feat: optimize sync + checkpoint sync v3 + better tracing #135

Closed
wants to merge 2 commits into from

Conversation

0xOsiris
Copy link
Member

@0xOsiris 0xOsiris commented Mar 30, 2024

Motivation

  • Significantly speed up sync speed with JoinSets and Asynchronous processing of BURN/MINT/SWAP logs for v3 sync. - Syncing v3 pool tick data properly from a cached checkpoint.
  • Better tracing during sync with progress bars and ETA's.

Solution

  • Integrate's multi progress bars during sync with ETA's on finality. Packs as much compute as possible into a JoinSet when syncing the Mint/Burn/Swap logs on v3 pools.
  • Asynchronous processing of the Mint/Burn/Swap logs by changing liquidity, liquidity_gross to i128 allowing underflow to happen if we hit a burn log before the corresponding mint log. This will yield the same final state when fully synced assuming no overflow on the i128 (unlikely).
  • Populates v3 pool tick data from the last synced block on the checkpoint to the current chain head.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@0xKitsune
Copy link
Collaborator

Closing this in favor of upcoming 0.7.0 changes.

#235 for further details.

@0xKitsune 0xKitsune closed this Dec 3, 2024
@0xKitsune 0xKitsune deleted the 0xOsiris/sync-improvements branch December 9, 2024 06:16
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