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

Add chunking to da sync #239

Open
wants to merge 7 commits into
base: compatible
Choose a base branch
from

Conversation

MartinOndejka
Copy link
Collaborator

@MartinOndejka MartinOndejka commented Dec 6, 2024

When syncing the da node, do it in chunks of diffs. Currently the whole da layer is ~100MB so loading the all of the diffs to memory at once might will get out of hands in future. Doing all at the some time also timeouts the tcp connection currently, so it's not possible to do it.

Syncing currently takes ~10 minutes, so I've removed the syncing of da node out of sequencer into the cli command, so that it wouldn't block the sequencer from starting.

It takes that long even if the da node is missing only few diffs, this is because you need ledger openings to post a diff and to get ledger openings you need to sync the whole ledger from beginning. This is suboptimal, we might need to store some history of ledger checkpoints somewhere.

@MartinOndejka MartinOndejka requested a review from L-as as a code owner December 6, 2024 13:47
@L-as
Copy link
Collaborator

L-as commented Dec 7, 2024

Have you tested this pre-merge? It probably still works as it should if it compiles post-merge.

@MartinOndejka
Copy link
Collaborator Author

Yes, I've tested it

@L-as
Copy link
Collaborator

L-as commented Dec 10, 2024

Just fix the merge conflict then?

@L-as
Copy link
Collaborator

L-as commented Dec 10, 2024

And make sure it compiles.

@MartinOndejka
Copy link
Collaborator Author

The current compatible branch is broken so I wouldn't be able to release it

@L-as
Copy link
Collaborator

L-as commented Dec 11, 2024

No but you would be able to merge it

@MartinOndejka MartinOndejka force-pushed the MartinOndejka/add-chunking-to-da-sync branch from ea32e08 to 95d69f7 Compare December 17, 2024 14:47
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