-
Notifications
You must be signed in to change notification settings - Fork 26
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): set active/obserever height based on batcher height #2736
base: main
Are you sure you want to change the base?
Conversation
Artifacts upload workflows: |
Benchmark movements: |
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @asmaastarkware)
crates/starknet_consensus_manager/src/consensus_manager.rs
line 72 at r1 (raw file):
ConsensusError::InternalNetworkError( "Failed to get height from batcher".to_string(), )
This is not a network error. I'm fine with just defining an Other(String)
error type. Another option is for us to define another error type in this crate and have it inherit from ConsensusError and then add BatcherError. That feels more "proper," but not sure how much I care. What do you prefer?
Code quote:
ConsensusError::InternalNetworkError(
"Failed to get height from batcher".to_string(),
)
crates/starknet_consensus_manager/src/consensus_manager.rs
line 78 at r1 (raw file):
} else { BlockNumber(observer_height.0 + 1) };
Suggestion:
let active_height = if self.config.consensus_config.start_height == observer_height {
// Setting `start_height` is only used to enable consensus starting immediately without observing
// the first height. This means consensus may return to a height it already voted in, risking
// equivocation. This is only safe to do if we restart all nodes at this height.
observer_height
} else {
BlockNumber(observer_height.0 + 1)
};
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @matan-starkware)
crates/starknet_consensus_manager/src/consensus_manager.rs
line 72 at r1 (raw file):
Previously, matan-starkware wrote…
This is not a network error. I'm fine with just defining an
Other(String)
error type. Another option is for us to define another error type in this crate and have it inherit from ConsensusError and then add BatcherError. That feels more "proper," but not sure how much I care. What do you prefer?
went with Other(String), but can revisit if needed..
c591619
to
2d3a175
Compare
No description provided.