-
Notifications
You must be signed in to change notification settings - Fork 118
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
Update panics by todo!
and unimplemented!
macros
#2471
Update panics by todo!
and unimplemented!
macros
#2471
Conversation
zebra-chain/src/orchard/tree.rs
Outdated
impl From<Vec<NoteCommitment>> for NoteCommitmentTree { | ||
fn from(_values: Vec<NoteCommitment>) -> Self { | ||
unimplemented!(); | ||
} | ||
} | ||
|
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.
Thinking about merge conflicts here: we probably just want to let PR #2407 deal with this.
zebra-chain/src/sapling/tree.rs
Outdated
impl From<Vec<NoteCommitment>> for NoteCommitmentTree { | ||
fn from(_values: Vec<NoteCommitment>) -> Self { | ||
unimplemented!(); | ||
} | ||
} |
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.
Thinking about merge conflicts here: we probably just want to let PR #2407 deal with this.
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.
This looks good.
There's just a few changes we need to revert to avoid conflicts with other PRs.
I also have a suggestion about cleaning up the transaction verifier struct, but please don't spend too much time on it. It's not as urgent as unexpected panics.
e37e17e
to
0d00293
Compare
So that it is clear why the panic happened upon initial inspection. Also include a reference to the mempool epic, so that it's easier to find the issue that tracks the implementation of the missing code.
Make it easy to find the relevant issue if the panic occurs.
The current implementation works, the commented out code was just a previous improvement idea, which is now tracked by issue ZcashFoundation#2473.
0d00293
to
7e6d8bb
Compare
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.
This is actually a really good outcome, we only have poseidon hash and mempool left to go.
(And all the other tickets in the next few sprints.)
Motivation
When NU5 activates, Zebra must not panic unexpectedly. This can happen for example if execution reaches a code that's not complete and has a
todo!
orunimplemented!
panicking placeholder.Solution
I executed the command:
and went through each occurrence.
unreachable
if I figured that there was no code missing but the condition could be reached due a coding mistake;Closes #2369
Review
@teor2345.
Reviewer Checklist
Follow Up Work
Go through all
TODO
,FIXME
andXXX
comments to see if there are any missing pieces that aren't tracked by issues.