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

feat(consensus): add an error type for consensus and utlize in SingleHeightConsensus #2064

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

matan-starkware
Copy link
Contributor

@matan-starkware matan-starkware commented May 28, 2024

This change is Reviewable

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.73%. Comparing base (6fb8430) to head (7acc57e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2064      +/-   ##
==========================================
+ Coverage   68.68%   68.73%   +0.04%     
==========================================
  Files         131      131              
  Lines       17486    17486              
  Branches    17486    17486              
==========================================
+ Hits        12011    12019       +8     
+ Misses       4143     4133      -10     
- Partials     1332     1334       +2     

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

@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 6df1e6c to 0df3bb0 Compare May 28, 2024 14:07
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 0df3bb0 to 00fa36f Compare May 28, 2024 14:16
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 00fa36f to e376af6 Compare May 28, 2024 15:28
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from e376af6 to 1bb8e79 Compare May 30, 2024 09:09
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 1bb8e79 to fd9e2f1 Compare May 30, 2024 10:50
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from fd9e2f1 to cbdc72a Compare May 30, 2024 10:58
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from cbdc72a to 3101a95 Compare May 30, 2024 11:21
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 3101a95 to 422f130 Compare May 30, 2024 11:52
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from 422f130 to e4e9c88 Compare May 31, 2024 07:59
@matan-starkware matan-starkware marked this pull request as ready for review May 31, 2024 08:31
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from e4e9c88 to eb3fe26 Compare May 31, 2024 09:17
@matan-starkware matan-starkware force-pushed the matan/single_height_consensus_validate branch from eb3fe26 to 9fc58ce Compare June 2, 2024 09:12
Base automatically changed from matan/single_height_consensus_validate to main June 2, 2024 10:35
Copy link
Contributor

@DvirYo-starkware DvirYo-starkware left a comment

Choose a reason for hiding this comment

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

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

a discussion (no related file):
Try to make the comment more concise. To see ten lines of documentation for each line of code is annoying, time-consuming when reading the code, and has overhead for maintenance.



crates/sequencing/papyrus_consensus/Cargo.toml line 14 at r3 (raw file):

starknet_api.workspace = true
tokio = { workspace = true, features = ["full"] }
thiserror.workspace = true

We try to order the dependencies alphabetically

Code quote:

tokio = { workspace = true, features = ["full"] }
thiserror.workspace = true

crates/sequencing/papyrus_consensus/src/single_height_consensus.rs line 65 at r3 (raw file):

        // This means that Context failed when building a proposal. While Tendermint is able to
        // handle invalid proposals, I think it's more straightforward to panic here. If needed, we
        // can change this to work like an invalid proposal.

Consider deleting this entire comment as an example of where you can be more concise in comments.

Code quote:

        // This means that Context failed when building a proposal. While Tendermint is able to
        // handle invalid proposals, I think it's more straightforward to panic here. If needed, we
        // can change this to work like an invalid proposal.

Copy link
Contributor Author

@matan-starkware matan-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: 4 of 5 files reviewed, 3 unresolved discussions (waiting on @DvirYo-starkware)

a discussion (no related file):

Previously, DvirYo-starkware wrote…

Try to make the comment more concise. To see ten lines of documentation for each line of code is annoying, time-consuming when reading the code, and has overhead for maintenance.

Done.



crates/sequencing/papyrus_consensus/Cargo.toml line 14 at r3 (raw file):

Previously, DvirYo-starkware wrote…

We try to order the dependencies alphabetically

oh I had assumed VScode would do that automatically.


crates/sequencing/papyrus_consensus/src/single_height_consensus.rs line 65 at r3 (raw file):

Previously, DvirYo-starkware wrote…

Consider deleting this entire comment as an example of where you can be more concise in comments.

Done.

Copy link
Contributor

@DvirYo-starkware DvirYo-starkware 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 r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @matan-starkware)

…HeightConsensus

Most of the error locations remain `expect` as their meaning will change significantly
once we actually have Tendermint, which, being a byzantine consensus protocol, is able
to handle certain failures.
@matan-starkware matan-starkware added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit 1e6576d Jun 4, 2024
19 checks passed
@matan-starkware matan-starkware deleted the matan/consensus_add_errors branch June 4, 2024 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 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.

2 participants