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

Fix verify functions' return type to be bool #144

Closed
wants to merge 2 commits into from

Conversation

dr-orlovsky
Copy link
Member

@dr-orlovsky dr-orlovsky commented Oct 15, 2023

Targeting v0.11, since it is a breaking API change

@dr-orlovsky dr-orlovsky changed the title Fix verify function return type to be bool Fix verify functions' return type to be bool Oct 15, 2023
@dr-orlovsky dr-orlovsky added *security* Issues affecting safety/security (include undefined behaviours) *compatibility* Issues affecting compatibility and interoperability labels Oct 15, 2023
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Oct 15, 2023
@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Files Coverage Δ
commit_verify/src/mpc/tree.rs 98.6% <100.0%> (+0.1%) ⬆️
commit_verify/src/convolve.rs 66.7% <75.0%> (-20.0%) ⬇️
commit_verify/src/embed.rs 96.2% <85.7%> (-1.5%) ⬇️
commit_verify/src/commit.rs 77.8% <0.0%> (-3.0%) ⬇️
commit_verify/src/mpc/atoms.rs 36.8% <0.0%> (-5.2%) ⬇️

📢 Thoughts on this report? Let us know!.

@@ -303,8 +293,8 @@ mod test {
impl<T> EmbedCommitProof<T, DummyVec, TestProtocol> for DummyProof
where T: AsRef<[u8]> + Clone + CommitEncode
{
fn restore_original_container(&self, _: &DummyVec) -> Result<DummyVec, Error> {
Ok(DummyVec(self.0.clone()))
fn restore_original_container(&self, _: &DummyVec) -> Option<DummyVec> {
Copy link
Member

Choose a reason for hiding this comment

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

Why change from Result to Option?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is internal method called from verify, which was relying on type VerifyError which is not there anymore. So there is no error type we can return from here.

@dr-orlovsky
Copy link
Member Author

Closing in favor of #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*compatibility* Issues affecting compatibility and interoperability *security* Issues affecting safety/security (include undefined behaviours)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants