-
Notifications
You must be signed in to change notification settings - Fork 100
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
fix(state): Avoid panicking in zebra-state initialization when checkpoints are missing #7770
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -389,8 +389,7 @@ impl StateService { | |
let full_verifier_utxo_lookahead = max_checkpoint_height | ||
- HeightDiff::try_from(checkpoint_verify_concurrency_limit) | ||
.expect("fits in HeightDiff"); | ||
let full_verifier_utxo_lookahead = | ||
full_verifier_utxo_lookahead.expect("unexpected negative height"); | ||
let full_verifier_utxo_lookahead = full_verifier_utxo_lookahead.unwrap_or(block::Height(0)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, there is a significant amount of consensus code that isn't implemented due to the mandatory checkpoint, including:
If the eventual goal of this PR series is to make all those things work, then this list should become a tracking issue. Until we do all those things, Zebra won't be compatible with However, if the eventual goal is to test ZSAs, then forking the current testnet chain by adding NU6 at a nearby height might be more reliable (and much faster to implement, although slower to sync). |
||
|
||
let non_finalized_state_queued_blocks = QueuedBlocks::default(); | ||
let pending_utxos = PendingUtxos::default(); | ||
|
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.
I think this code change is helpful, but the explanation isn't correct.
Zebra must have checkpoints up to
mandatory_checkpoint_height()
. If it doesn't, then it could break consensus rules:zebra/zebra-chain/src/parameters/network.rs
Lines 96 to 102 in 290ccf2
Is there a specific situation or bug that this change fixes?
That might be helpful context to put in the PR description.