-
Notifications
You must be signed in to change notification settings - Fork 158
chore: adopt libevm options, simplify constructors and unexport configs #1289
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
+284
−274
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- `sync/statesync`: - Options on syncer, NewSyncer requires leafsRequestSize, add WithBatchSize, remove defaults. - `plugin/evm/atomic/sync`: - unexport config, keep `WithRequestSize/WithNumWorkers`, NewSyncer takes targetHeight. - `sync/statesync/code_queue.go`: - unexport queueConfig, WithCapacity via options. - `sync/statesync/code_syncer.go: - Options for numWorkers/batchSize. - `sync/blocksync`: - Drop Options in favour of required params `NewSyncer(client, db, fromHash, fromHeight, blocksToFetch)` - Update test call sites. resolves #1281 Signed-off-by: Tsvetan Dimitrov ([email protected])
bfc7582
to
8e65d3d
Compare
ARR4N
reviewed
Sep 29, 2025
…Queue and stateSync - Inline queueConfig into CodeQueue with a capacity field. - Change CodeQueueOption to options.Option[CodeQueue] and update WithCapacity to mutate CodeQueue. - Apply options to CodeQueue before channel creation in NewCodeQueue. - Inline stateSyncConfig into stateSync and change SyncerOption to options.Option[stateSync]. - Update WithBatchSize to mutate stateSync and apply options to the instance in NewSyncer.
alarso16
reviewed
Sep 29, 2025
- Construct start key as [8-byte height][32-byte zero blockchainID] in addZeroes. - Prevent over-fetch by aligning with TrieKeyLength (wrappers.LongLen + common.HashLength).
021fa62
to
97530dc
Compare
97530dc
to
6a400d6
Compare
alarso16
approved these changes
Sep 30, 2025
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.
Aside from my nits about input validation, looks good to me.
ARR4N
approved these changes
Oct 3, 2025
2798088
to
f3113a5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this should be merged
Check #1281
How this works
sync/statesync
:NewSyncer
requiresleafsRequestSize
, addWithBatchSize
, remove defaults.plugin/evm/atomic/sync
:config
, keepWithRequestSize/WithNumWorkers
,NewSyncer
takestargetHeight
.sync/statesync/code_queue.go
:queueConfig
,WithCapacity
via options.numWorkers/batchSize
.sync/blocksync
:NewSyncer(client, db, fromHash, fromHeight, blocksToFetch)
How this was tested
existing UT
Need to be documented?
no
Need to update RELEASES.md?
no
resolves #1281
Signed-off-by: Tsvetan Dimitrov ([email protected])