Skip to content

Conversation

Avaneesh-axiom
Copy link
Contributor

@Avaneesh-axiom Avaneesh-axiom commented Apr 7, 2025

Note to reviewer: the Github PR review UI doesn't diff some files properly across renaming despite my best efforts. For example, crates/circuits/sha256-air/src/air.rs -> crates/circuits/sha-air/src/air.rs isn't detected and it shows as deletion of the old file and creation of the new one. To make the review easier, consider reviewing each commit one at a time. The diffs work nicer that way.

The sha air is separated into two directories: crates/circuits/sha2-air/ has the SubAir that constrains all of the hash except the padding. extensions/sha2/circuit/ has the sha chip that constrains message padding. We added, in both directories, a config.rs file that stores generic parameters of each SHA-2 variant. All the constraints and tracegen were updated to be in terms of these parameters.

A new guest library was also added in guest-libs/sha2.

A new derive macro, ColsRef was added in crates/circuits/primitives/derive/src/cols_ref/ that helps define columns structs that work in general for all SHA-2 variants.

Updated (Jun 27): Rebased onto main (from develop) to incorporate guest-libs changes and to support build script.

Closes INT-3211 and INT-3213

@Avaneesh-axiom Avaneesh-axiom changed the base branch from main to develop April 7, 2025 22:40

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@Avaneesh-axiom Avaneesh-axiom changed the base branch from develop to main June 27, 2025 20:04
@Avaneesh-axiom Avaneesh-axiom force-pushed the feat/sha-512 branch 3 times, most recently from f718681 to 8e11373 Compare June 27, 2025 21:10

This comment has been minimized.

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-6 [-0.5%]) 1,186 322,699 17,340,132 - - -
fibonacci (-3 [-0.1%]) 2,668 1,500,277 50,589,503 - - -
regex (-77 [-1.0%]) 7,805 4,165,226 166,511,152 - - -
ecrecover (+26 [+2.2%]) 1,201 136,241 8,089,270 - - -
pairing (+107 [+2.3%]) 4,663 1,862,964 97,277,783 - - -

Commit: 665237e

Benchmark Workflow

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.

1 participant