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(publisher): Simplify and test BlocksStream for old and new blocks #346

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

Jurshsmith
Copy link
Member

@Jurshsmith Jurshsmith commented Dec 5, 2024

BlocksStream now streams old blocks until reaching the latest chain height,
after which it subscribes to new blocks from the fuel-core importer.

This refactor removes the need for the UnpublishedBlocks abstraction, which
previously managed batches of blocks but caused contention issues, starving
fuel-core of its synchronization capacity.

By simplifying the block-handling logic, this fix improves performance, reduces
complexity, and ensures fuel-core can sync effectively.

pedronauck
pedronauck previously approved these changes Dec 5, 2024
@Jurshsmith Jurshsmith force-pushed the aj/fix-publisher-performance branch from 0d69eb4 to 5c9463c Compare December 5, 2024 10:54
@Jurshsmith Jurshsmith changed the title fix(publisher): Ensure relayer node is synced at least once before running publisher fix(publisher): Dynamically compute blocks stream to avoid starving fuel-core service Dec 5, 2024
@Jurshsmith Jurshsmith changed the title fix(publisher): Dynamically compute blocks stream to avoid starving fuel-core service fix(publisher): Simplify and test BlocksStream for old and new blocks Dec 5, 2024
@Jurshsmith Jurshsmith requested a review from pedronauck December 5, 2024 15:24
@Jurshsmith Jurshsmith force-pushed the aj/fix-publisher-performance branch from 97f7857 to 9629434 Compare December 5, 2024 15:37
…re` service

This fix gets rid of `UnpublishedBlocks` abstraction in favor of dynamically computing
the stream until it has published the latest height -- at this point, it subscribes to the
block importer for new blocks
BlocksStream now streams old blocks until reaching the latest chain height,
after which it subscribes to new blocks from the fuel-core importer.

This refactor removes the need for the UnpublishedBlocks abstraction, which
previously managed batches of blocks but caused contention issues, starving
fuel-core of its synchronization capacity.

By simplifying the block-handling logic, this fix improves performance, reduces
complexity, and ensures fuel-core can sync effectively.
This will allow the local OnChainDB to stay ahead of our blocks
streaming subscription to avoid subscribing to the new blocks
stream prematurely
@Jurshsmith Jurshsmith force-pushed the aj/fix-publisher-performance branch from 892a04b to 7029d1d Compare December 5, 2024 16:49
@Jurshsmith Jurshsmith self-assigned this Dec 5, 2024
@pedronauck pedronauck merged commit bae2de7 into main Dec 5, 2024
15 checks passed
@pedronauck pedronauck deleted the aj/fix-publisher-performance branch December 5, 2024 20:19
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