-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial powdr acceleration #3
Conversation
let mut data = Array::default(); | ||
proptest!(ProptestConfig::with_cases( | ||
if cfg!(all(target_os = "zkvm", target_arch = "riscv32")) { | ||
1 |
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.
@qwang98 why did you change this from 1000 to 1 in your PR?
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.
PR #2 is mix of Risc0 field implementation and Powdr modmul syscall, so this part is actually from the Risc0 commit here: https://github.com/risc0/RustCrypto-elliptic-curves/blob/risczero/k256/src/arithmetic/hash2curve.rs#L418-L424. Other ported over elements are also from this same commit.
ce5952d
to
87d2805
Compare
@@ -796,6 +803,22 @@ version = "1.9.0" | |||
source = "registry+https://github.com/rust-lang/crates.io-index" | |||
checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" | |||
|
|||
[[package]] | |||
name = "powdr-riscv-runtime" | |||
version = "0.1.0-alpha.2" |
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.
is this right?
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 the current version of that package because we didn't update it with the releases. But we actually merged 0.1.2 today, so a cargo update should change this too
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.
yea this is actually correct because we use the tag v0.1.1 which had this wrong version
k256/src/arithmetic/field.rs
Outdated
if #[cfg(target_pointer_width = "32")] { | ||
|
||
if #[cfg(all(target_os = "zkvm", target_arch = "riscv32"))] { | ||
mod field_8x32_risc0; |
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.
powdr?
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.
rn I actually prefer just field_8x32
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
#![allow(unsafe_code)] | ||
|
||
// This file is the same as the original below except for minor snippets. | ||
// https://github.com/risc0/RustCrypto-elliptic-curves/blob/risczero/k256/src/arithmetic/field/field_8x32_risc0.rs |
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.
change our version to _powdr.rs?
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.
yea ok. I mean, IMO we could actually only call it 8x32
and keep this attribution, and also not call it powdr
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
review fixed |
fixed failing native test |
c07c388
to
f0a0282
Compare
This PR
I think we should just merge this PR to our master and keep working on top.