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

Initial powdr acceleration #3

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Initial powdr acceleration #3

merged 1 commit into from
Nov 12, 2024

Conversation

leonardoalt
Copy link
Member

This PR

I think we should just merge this PR to our master and keep working on top.

let mut data = Array::default();
proptest!(ProptestConfig::with_cases(
if cfg!(all(target_os = "zkvm", target_arch = "riscv32")) {
1
Copy link
Member Author

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?

Copy link

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.

@leonardoalt leonardoalt force-pushed the powdr-leo-steve branch 2 times, most recently from ce5952d to 87d2805 Compare November 7, 2024 13:31
@@ -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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this right?

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 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

Copy link
Member Author

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

if #[cfg(target_pointer_width = "32")] {

if #[cfg(all(target_os = "zkvm", target_arch = "riscv32"))] {
mod field_8x32_risc0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

powdr?

Copy link
Member Author

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

Copy link
Member Author

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
Copy link
Collaborator

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?

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@leonardoalt
Copy link
Member Author

review fixed

@leonardoalt
Copy link
Member Author

fixed failing native test

@leonardoalt leonardoalt added this pull request to the merge queue Nov 12, 2024
Merged via the queue into master with commit 39aab01 Nov 12, 2024
130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants