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

feat(host): Accelerate all BLS12-381 Precompiles #1010

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Feb 6, 2025

Description

Updates the kona-host to accelerate all BLS12-381 precompiles.

Fixes #1000

@refcell refcell requested a review from clabby as a code owner February 6, 2025 15:17
@refcell refcell self-assigned this Feb 6, 2025
@refcell refcell requested a review from emhane as a code owner February 6, 2025 15:17
@refcell
Copy link
Collaborator Author

refcell commented Feb 6, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

@refcell refcell added K-feature Kind: feature A-host Area: host binary H-isthmus Hardfork: Isthmus related labels Feb 6, 2025
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 54.23729% with 189 lines in your changes missing coverage. Please review.

Project coverage is 88.6%. Comparing base (2419b29) to head (9781e24).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
bin/client/src/precompiles/bls12_g1_msm.rs 63.3% 33 Missing ⚠️
bin/client/src/precompiles/bls12_g2_msm.rs 63.3% 33 Missing ⚠️
bin/client/src/precompiles/bls12_g1_add.rs 49.1% 29 Missing ⚠️
bin/client/src/precompiles/bls12_g2_add.rs 49.1% 29 Missing ⚠️
bin/client/src/precompiles/bls12_map_fp.rs 48.2% 29 Missing ⚠️
bin/client/src/precompiles/bls12_map_fp2.rs 48.2% 29 Missing ⚠️
bin/client/src/precompiles/mod.rs 0.0% 7 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@clabby clabby left a comment

Choose a reason for hiding this comment

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

Looks good for the host. Feel free to follow up in another PR or do it here, but this is only the host end of the equation - we'll also need to add accelerated versions of the precompiles in the client software (with limits on input size enforced.)

if spec_id.is_enabled_in(SpecId::ISTHMUS) {
ctx_precompiles.extend([bls12::FPVM_BLS12_PAIRING_ISTHMUS]);
}

Looks like BLS pairing is already done :)

@refcell refcell requested a review from clabby February 6, 2025 16:22
@refcell refcell force-pushed the rf/accelerate-bls12-381-precompiles branch from a3939d5 to 9781e24 Compare February 6, 2025 16:23
Copy link
Collaborator

@clabby clabby left a comment

Choose a reason for hiding this comment

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

This LGTM. Would love to see action tests covering these precompiles across op-program + kona as a part of the Isthmus acceptance testing, but no need to rush those in. Nice work.

@refcell refcell merged commit b1c5b9b into main Feb 6, 2025
14 of 16 checks passed
@refcell refcell deleted the rf/accelerate-bls12-381-precompiles branch February 6, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-host Area: host binary H-isthmus Hardfork: Isthmus related K-feature Kind: feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat: ensure BLS precompiles are all accelerated
2 participants