-
Notifications
You must be signed in to change notification settings - Fork 5
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
STR-180 Client state manager + related refactors #636
Conversation
Commit: c115954 SP1 Performance Test Results
|
5dc2247
to
bca88d8
Compare
Alright this is pretty mature as-is but it somewhat makes me want to include sync events in here too so that we can really clean things up around this. |
Ah I just realized unit tests are broken but that's fine, this is feature complete now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty good refactor. Some comments and questions though.
One question is that will this change where we are now storing whole Clientstate
to db instead of incremental ClientStateWrite
s at every SyncEvent
incur huge writes to database every sync event? Especially given that we have array of unaccepted l1 blocks inside the ClientState
.
I think the storage cost might appear huge when a node has not yet synced up to the latest L2 state, but has read a lot of L1 blocks in which case the unaccepted_l1_blocks
can grow very large in size. This actually happened while syncing a devnet fullnode.
This might probably get mitigated in future when we have smarter and faster syncing of L2Blocks. But until then, it seems like there's a good possibility of huge db writes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 41ccb23
I agree with Bibek's recent comments
…r to use client state manager where feasible
…unnecessary database call
c94852c
to
8ef9324
Compare
Force merging to keep the ball rolling. |
Description
The central goal of this PR is to create the client state manager described in the ticket. Like my other recent PR, this also intends to also include some refactors trying to simplify CSM operation as described in PR #469 .
Type of Change
Notes to Reviewers
Checklist
Related Issues