Skip to content

feat: FIP-0079: syscall for aggregated bls verification #2003

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

Merged
merged 5 commits into from
May 8, 2024

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Apr 29, 2024

This PR tries to implement https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0079.md without breaking FVM backward compatibility.

(NOTE: This PR is largely based on #1914)

Closes #2001

Changes:

  • Add verify_bls_aggregate syscall
  • Add cargo feature verify-signature that keeps verify_signature syscall for backward compatibility
  • Add integration test for the verify-signature feature
  • Update CI to build and check the verify-signature feature

@hanabi1224 hanabi1224 changed the title [WIP] feat: syscall for aggregated bls verification (FIP-0079) feat: syscall for aggregated bls verification (FIP-0079) May 2, 2024
@hanabi1224 hanabi1224 marked this pull request as ready for review May 2, 2024 10:48
@hanabi1224 hanabi1224 changed the title feat: syscall for aggregated bls verification (FIP-0079) feat: FIP-0079: syscall for aggregated bls verification May 2, 2024
@jennijuju jennijuju requested review from fridrik01 and rvagg May 2, 2024 12:44
@jennijuju
Copy link
Member

@DrPeterVanNostrand could you please help taking a look at this PR?

@hanabi1224 hanabi1224 force-pushed the hm/fip-0079 branch 2 times, most recently from 056690e to e00667d Compare May 2, 2024 22:31
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

lgtm, but grain-of-salt from me given my limited expertise on this

@@ -220,6 +220,7 @@ pub trait ActorOps {
fn balance_of(&self, actor_id: ActorID) -> Result<TokenAmount>;
}

#[cfg(feature = "verify-signature")]
Copy link
Member

Choose a reason for hiding this comment

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

Can we not put this on the verify_signature operation itself?

Copy link
Member

Choose a reason for hiding this comment

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

It appears that the answer is no. Oh well...

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

nit, otherwise lgtm!

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.71429% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 57.04%. Comparing base (c39d880) to head (169d615).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2003       +/-   ##
===========================================
- Coverage   75.62%   57.04%   -18.58%     
===========================================
  Files         157      119       -38     
  Lines       15750    10381     -5369     
===========================================
- Hits        11911     5922     -5989     
- Misses       3839     4459      +620     
Files Coverage Δ
fvm/src/gas/price_list.rs 74.65% <100.00%> (-3.66%) ⬇️
fvm/src/syscalls/crypto.rs 100.00% <100.00%> (ø)
fvm/src/syscalls/mod.rs 97.14% <100.00%> (+0.06%) ⬆️
shared/src/crypto/signature.rs 53.84% <83.33%> (-9.76%) ⬇️
fvm/src/syscalls/context.rs 93.97% <72.22%> (-6.03%) ⬇️
fvm/src/kernel/default.rs 82.13% <76.66%> (-0.20%) ⬇️

... and 93 files with indirect coverage changes

@Stebalien Stebalien merged commit 31118cf into filecoin-project:master May 8, 2024
13 of 14 checks passed
@hanabi1224 hanabi1224 deleted the hm/fip-0079 branch May 8, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Implement FIP-0079 with Backwards Compatibility
5 participants