Skip to content

feat: no stability window buffer til volatile #947

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

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

mkazlauskas
Copy link
Member

@mkazlauskas mkazlauskas commented Oct 13, 2023

Context

Projector is inserting block data into the database even when it's far away from the tip and there is no chance of a fork/rollback happening.

LW-6953

Proposed Solution

Projector no longer inserts block data until it reaches tip-securityParameter block height. This is implemented by extracting Tip tracking capabilities out of StabilityWindowBuffer interface.

Preliminary performance testing of utxo projection on my computer resulted in

  • ~3x projector speed on empty blocks
  • ~2x projector speed on non-empty blocks

Important Changes Introduced

See commit log

@mkazlauskas mkazlauskas force-pushed the feat/no-stability-window-buffer-til-volatile branch from ae701e7 to e549b96 Compare October 13, 2023 11:08
@github-actions
Copy link

Standard DiffPost

This PR would generate the following kubectl diff:

Preview

restructure observable DataSource utils for easier re-use
as preparation for new StabilityWindowBuffer interface that
will require it's own connection during Bootstrap
hoist from wallet TipTracker tests
It's implemented by splitting StabilityWindowBuffer into 2 pieces:
- Tip observable, which is used to determine local tip
- StabilityWindowBuffer is now simplified to just 'getBlock' method

BREAKING CHANGE: simplify StabilityWindowBuffer interface to just 'getBlock'
- Bootstrap.fromCardanoNode now requires Tip observable parameter
@mkazlauskas mkazlauskas force-pushed the feat/no-stability-window-buffer-til-volatile branch from e549b96 to b2244ea Compare October 13, 2023 11:38
@mkazlauskas mkazlauskas mentioned this pull request Oct 18, 2023
Copy link
Collaborator

@iccicci iccicci left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

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

Have you done a performance test @mkazlauskas ? I'm curios to know the gains we're getting here Edit: It's in the description 😬

@rhyslbw rhyslbw self-requested a review October 19, 2023 10:27
Copy link
Member

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

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

Awesome work @mkazlauskas 🧙

@mkazlauskas mkazlauskas merged commit e8a2e87 into master Oct 19, 2023
@mkazlauskas mkazlauskas deleted the feat/no-stability-window-buffer-til-volatile branch October 19, 2023 10:49
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.

3 participants