-
Notifications
You must be signed in to change notification settings - Fork 249
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
Construct isogeny map using new function #529
base: master
Are you sure you want to change the base?
Construct isogeny map using new function #529
Conversation
Co-authored-by: Pratyush Mishra <[email protected]>
- Move `isogeny_map` function from `WBParams` to `IsogenyMap` - Update BLS12_381 test-curve accordingly.
…G.md` Cargo fmt on test-curves
of domain field to avoid phantomData.
error[E0716]: temporary value dropped while borrowed
@lamafab has done some tests and thinks this might be a rust bug. Quoting them here: this works
this does NOT:
I'm really not sure if this is expected behavior or a bug? 🤔 |
ec/src/hashing/curve_maps/wb/mod.rs
Outdated
pub const fn new( | ||
x_map_numerator: &'a [BaseField<CODOMAIN>], | ||
x_map_denominator: &'a [BaseField<CODOMAIN>], | ||
y_map_numerator: &'a [BaseField<CODOMAIN>], | ||
y_map_denominator: &'a [BaseField<CODOMAIN>], | ||
) -> Self { | ||
Self { | ||
x_map_numerator, | ||
x_map_denominator, | ||
y_map_numerator, | ||
y_map_denominator, | ||
_phantom_domain: PhantomData::<DOMAIN>, | ||
} | ||
} |
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.
We can also limit this to 'static
lifetimes. That might help with the "temporary dropped while borrowed" issue.
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.
do you mean to hard code static life time? I think I did that and the error still persists.
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 tried it too, couldn't find a way around it...
I think this is a Rust bug. What seems to be the equivalent code does compile: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=51633acd5ecaf330b62a44216c1b7e41 @drskalman do you want to file a bug against rust-lang/rust? |
Sure, I'll do it but I need find a minimal example that it doesn't work beside arkworks :-) I'll try. |
I think you can just make an issue linking the playground and your branch. Re: minimization tips, the main differences that come to mind are
|
@drskalman Have you filed a bug report in the end? |
Description
This PR is trying to open discussion around issue #525 and hopefully closes it.
closes: #525
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer