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

refactor(starknet_state_sync): refactor state sync to use p2p sync #2515

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

noamsp-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

noamsp-starkware commented Dec 8, 2024

Copy link

github-actions bot commented Dec 8, 2024

@noamsp-starkware noamsp-starkware force-pushed the noam.s/refactor_state_sync_to_use_p2p_sync branch from 0104cc9 to 64882cb Compare December 8, 2024 09:10
@noamsp-starkware noamsp-starkware force-pushed the noam.s/refactor_state_sync_to_use_p2p_sync branch from 64882cb to f1589c9 Compare December 8, 2024 15:15
@noamsp-starkware noamsp-starkware changed the title refactor(sync): refactor state sync to use p2p sync refactor(starknet_state_sync): refactor state sync to use p2p sync Dec 8, 2024
@noamsp-starkware noamsp-starkware marked this pull request as ready for review December 8, 2024 17:37
@starkware-libs starkware-libs deleted a comment from codecov bot Dec 8, 2024
Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 5 files at r1, 2 of 3 files at r2, all commit messages.
Reviewable status: 3 of 5 files reviewed, 2 unresolved discussions (waiting on @noamsp-starkware)


crates/starknet_state_sync/src/runner/mod.rs line 47 at r2 (raw file):

                }
                result = &mut self.p2p_sync_client_future => return result.map_err(|_| ComponentError::InternalComponentError),
                _ = &mut self.p2p_sync_server_future => {

change _ to () so that if sync server changes the return type you'll get a compiler error and will change the code here to return result.map_err


crates/starknet_state_sync/src/config.rs line 15 at r2 (raw file):

    #[validate]
    pub storage_config: StorageConfig,
    // TODO(shahak): add validate to P2PSyncClientConfig, NetworkConfig and use them here.

NetworkConfig already has validate. Use it

Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions (waiting on @noamsp-starkware)


crates/starknet_state_sync/src/runner/test.rs line 1 at r2 (raw file):

// TODO: Refactor these to suit the change to state sync now using p2p sync.

Erase these instead of commenting them out

Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 5 files at r1, 1 of 3 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noamsp-starkware)


crates/starknet_state_sync/src/runner/test.rs line 1 at r2 (raw file):

Previously, ShahakShama wrote…

Erase these instead of commenting them out

We have git to store the old code

Copy link
Contributor Author

@noamsp-starkware noamsp-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ShahakShama)


crates/starknet_state_sync/src/config.rs line 15 at r2 (raw file):

Previously, ShahakShama wrote…

NetworkConfig already has validate. Use it

Done.


crates/starknet_state_sync/src/runner/mod.rs line 47 at r2 (raw file):

Previously, ShahakShama wrote…

change _ to () so that if sync server changes the return type you'll get a compiler error and will change the code here to return result.map_err

Done.


crates/starknet_state_sync/src/runner/test.rs line 1 at r2 (raw file):

Previously, ShahakShama wrote…

We have git to store the old code

Alon's PR already took care of the file. I left this as so his PR doesn't have merge conflicts.

https://reviewable.io/reviews/starkware-libs/sequencer/2560

@noamsp-starkware noamsp-starkware force-pushed the noam.s/refactor_state_sync_to_use_p2p_sync branch from f1589c9 to 5e44f1b Compare December 9, 2024 12:51
Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware)

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 58 lines in your changes missing coverage. Please review.

Project coverage is 77.47%. Comparing base (e3165c4) to head (5e44f1b).
Report is 772 commits behind head on main.

Files with missing lines Patch % Lines
crates/starknet_state_sync/src/runner/mod.rs 0.00% 56 Missing ⚠️
crates/starknet_state_sync/src/config.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2515       +/-   ##
===========================================
+ Coverage   40.10%   77.47%   +37.36%     
===========================================
  Files          26      387      +361     
  Lines        1895    41434    +39539     
  Branches     1895    41434    +39539     
===========================================
+ Hits          760    32101    +31341     
- Misses       1100     7067     +5967     
- Partials       35     2266     +2231     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@noamsp-starkware noamsp-starkware merged commit aa78ee4 into main Dec 9, 2024
22 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants