-
Notifications
You must be signed in to change notification settings - Fork 174
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: remove FALCON_SIG_TO_STACK
event
#1703
Conversation
processor/src/host/mod.rs
Outdated
// key is in the advice provider and uses it to in signature generation | ||
#[cfg(any(test, feature = "testing"))] | ||
if event_id == crate::utils::EVENT_FALCON_SIG_TO_STACK { | ||
let advice_provider = self.advice_provider_mut(); | ||
push_signature(advice_provider, process, SignatureKind::RpoFalcon512) | ||
} else { | ||
#[cfg(feature = "std")] | ||
std::println!( | ||
"Event with id {} emitted at step {} in context {}", | ||
event_id, | ||
process.clk(), | ||
process.ctx() | ||
); | ||
Ok(()) | ||
return test::push_falcon_signature(advice_provider, process); | ||
} |
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 put this here since our Test
struct uses DefaultHost
instead of some TestHost
. But I don't think anyone uses DefaultHost
anyways, so its main use is probably just tests
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 would maybe add a very brief comment here as well (basically, saying what you said in the comment above).
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.
Done
f49818b
to
eeca630
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.
Thank you! Looks good! I added some comments inline - but nothing too significant.
We'll probably also need a parallel PR in miden-base
to introduce the signature verification event there.
The issue with #1647 is that we still don't package the event handlers with the library. Hence, users still cannot define event handlers with their libraries, since they won't be able to ship them e.g. to some delegated prover.
I think we still may want to do this - but the event handlers could probably be much simpler. So, I wouldn't close #1584 just yet.
processor/src/host/mod.rs
Outdated
// key is in the advice provider and uses it to in signature generation | ||
#[cfg(any(test, feature = "testing"))] | ||
if event_id == crate::utils::EVENT_FALCON_SIG_TO_STACK { | ||
let advice_provider = self.advice_provider_mut(); | ||
push_signature(advice_provider, process, SignatureKind::RpoFalcon512) | ||
} else { | ||
#[cfg(feature = "std")] | ||
std::println!( | ||
"Event with id {} emitted at step {} in context {}", | ||
event_id, | ||
process.clk(), | ||
process.ctx() | ||
); | ||
Ok(()) | ||
return test::push_falcon_signature(advice_provider, process); | ||
} |
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 would maybe add a very brief comment here as well (basically, saying what you said in the comment above).
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.
Looks good to me!
Also added |
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.
Looks great! Thank you! I left a couple of nits inline - some of them can be ignored.
|
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.
All looks good! Thank you!
Supersedes #1647
The issue with #1647 is that we still don't package the event handlers with the library. Hence, users still cannot define event handlers with their libraries, since they won't be able to ship them e.g. to some delegated prover.
This PR then applies this suggestion in isolation, effectively cleaning up the tech debt associated with the
FALCON_SIG_TO_STACK
event.