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

Zkcrypto lab1 #245

Merged
merged 34 commits into from
Nov 23, 2023
Merged

Conversation

Justuxs
Copy link
Contributor

@Justuxs Justuxs commented Oct 29, 2023

No description provided.

Comment on lines 26 to 33
- backend: blst
support_wasm: true
support_ckzg: true
# Override all-features flag for blst, due to incompatibility between portable & force-adx
clippy-flag: --features=default,std,rand,parallel
- backend: arkworks
support_wasm: true
support_ckzg: true
Copy link
Contributor

@lynxcs lynxcs Nov 3, 2023

Choose a reason for hiding this comment

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

add:

- backend: zkcrypto
  support_wasm: true (if project compiles on wasm target)
  support_ckzg: true (if c-kzg bindings work)

EDIT: And add similar thing to backend-benchmarks.yml

strategy:
fail-fast: false
matrix:
backend: [blst, arkworks]
Copy link
Contributor

Choose a reason for hiding this comment

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

add zkcrypto into backend matrix so that releases contain zkcrypto zip files

Comment on lines +102 to +108
# 3.3. rust-kzg with zkcrypto backend (sequential)
print_msg "rust-kzg with zkcrypto backend (sequential)" ../"$paste_file"
taskset --cpu-list "${taskset_cpu_list[$i]}" cargo bench --manifest-path zkcrypto/Cargo.toml >> ../"$paste_file"

# 3.4. rust-kzg with arkworks backend (parallel)
print_msg "rust-kzg with arkworks backend (parallel)" ../"$paste_file"
taskset --cpu-list "${taskset_cpu_list[$i]}" cargo bench --manifest-path arkworks/Cargo.toml --features parallel >> ../"$paste_file"
# 3.4. rust-kzg with zkcrypto backend (parallel)
print_msg "rust-kzg with zkcrypto backend (parallel)" ../"$paste_file"
taskset --cpu-list "${taskset_cpu_list[$i]}" cargo bench --manifest-path zkcrypto/Cargo.toml --features parallel >> ../"$paste_file"
Copy link
Member

Choose a reason for hiding this comment

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

Is it correct? I see that benchmarks for zkcrypto are executed below.

version = "0.12"
default-features = false
kzg = { path = "../kzg", default-features = false }
bls12_381 = { path = "../zkcrypto/bls12_381" }
Copy link
Member

Choose a reason for hiding this comment

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

It wasn't possible to avoid copying blst12_381 crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem I ran into that Scalar doesn't have a public constructor that would purely create a Scalar from [u64; 4], so I can't create custom from bytes big endien. Same with to bytes - cannot access directly internal structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sauliusgrigaitis sauliusgrigaitis merged commit a1ad8b1 into grandinetech:integration Nov 23, 2023
18 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.

4 participants