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(base_layer): remove optional finality #869

Merged
merged 1 commit into from
Sep 22, 2024
Merged

Conversation

giladchase
Copy link
Contributor

@giladchase giladchase commented Sep 18, 2024

No finality is equivalent to passing finality 0.

commit-id:2f82d223


This change is Reviewable

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 74.29%. Comparing base (7da2d63) to head (dee5efe).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
crates/papyrus_sync/src/sources/base_layer.rs 0.00% 2 Missing ⚠️
...rus_base_layer/src/ethereum_base_layer_contract.rs 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #869   +/-   ##
=======================================
  Coverage   74.29%   74.29%           
=======================================
  Files         358      357    -1     
  Lines       36288    36214   -74     
  Branches    36288    36214   -74     
=======================================
- Hits        26960    26907   -53     
+ Misses       7190     7170   -20     
+ Partials     2138     2137    -1     
Flag Coverage Δ
74.29% <25.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@elintul elintul 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 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

Copy link
Collaborator

@elintul elintul 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 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

Copy link
Collaborator

@elintul elintul 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 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

@giladchase giladchase changed the base branch from spr/main/a4bb6349 to main September 19, 2024 14:15
@giladchase giladchase force-pushed the spr/main/2f82d223 branch 2 times, most recently from e279ad0 to 8f600fe Compare September 19, 2024 14:29
Copy link
Collaborator

@elintul elintul 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 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)


crates/papyrus_base_layer/src/ethereum_base_layer_contract.rs line 102 at r4 (raw file):

    async fn latest_proved_block(
        &self,
        finality: u64,

Maybe add a short sentence about 0 signifying "latest"? Might be obvious, so your call.

Code quote:

finality: u64,

Copy link
Collaborator

@elintul elintul 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 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)


crates/papyrus_base_layer/src/ethereum_base_layer_contract.rs line 100 at r5 (raw file):

    type Error = EthereumBaseLayerError;

    /// Gets the latest proved block on Ethereum, where finality determines how many

Suggestion:

Returns

No finality is equivalent to passing finality 0.

commit-id:2f82d223
Copy link
Collaborator

@elintul elintul 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 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

@giladchase giladchase merged commit 23c69c5 into main Sep 22, 2024
27 of 67 checks passed
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