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

Create a cache for BLS #453

Merged
merged 58 commits into from
May 14, 2024
Merged

Create a cache for BLS #453

merged 58 commits into from
May 14, 2024

Conversation

matt-o-how
Copy link
Contributor

@matt-o-how matt-o-how commented Apr 2, 2024

Creates a BLSCache struct and Py bindings for it.
Also adds a requirements.txt

@matt-o-how matt-o-how requested a review from arvidn April 2, 2024 15:55
Copy link

socket-security bot commented Apr 2, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@arvidn
Copy link
Contributor

arvidn commented Apr 3, 2024

@matt-o-how I imagine the security warnings comes from just adding the requirements.txt. I don't see the dependency graph for those wheels though. Do we need pluggy on there? I imagine most of them come via pytest though

Copy link

coveralls-official bot commented Apr 5, 2024

Pull Request Test Coverage Report for Build 9081446412

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 165 of 165 (100.0%) changed or added relevant lines in 2 files are covered.
  • 128 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.09%) to 84.163%

Files with Coverage Reduction New Missed Lines %
crates/chia-protocol/src/full_node_protocol.rs 2 0.0%
crates/chia-puzzles/src/puzzles/standard.rs 2 93.75%
crates/chia-puzzles/src/puzzles/did.rs 3 76.92%
crates/chia-puzzles/src/puzzles/singleton.rs 5 26.67%
crates/chia-puzzles/src/puzzles/offer.rs 5 44.44%
crates/chia-consensus/src/fast_forward.rs 8 97.99%
crates/chia-protocol/src/chia_protocol.rs 9 0.0%
crates/clvm-utils/src/tree_hash.rs 16 93.47%
crates/chia-protocol/src/wallet_protocol.rs 17 0.0%
wheel/src/api.rs 18 77.92%
Totals Coverage Status
Change from base Build 9011508250: 0.09%
Covered Lines: 12010
Relevant Lines: 14270

💛 - Coveralls

crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
wheel/README.md Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/gtelement.rs Outdated Show resolved Hide resolved
@arvidn
Copy link
Contributor

arvidn commented Apr 29, 2024

this is a sensitive part of the consensus. we need really thorough tests and fuzzers. I think we should have some benchmarks as well

Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

do you feel confident the unit tests cover all interesting cases?
A few cases are:
0% cache hit rate
100% cache hit rate
validating a signature of 0 messages and keys
validating a signature of 1 message and key

Can you think if any aspect that might benefit from fuzzing?

crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
tests/test_blscache.py Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/cached_bls.rs Outdated Show resolved Hide resolved
tests/test_blscache.py Outdated Show resolved Hide resolved
@matt-o-how matt-o-how merged commit 090ff48 into main May 14, 2024
64 checks passed
@matt-o-how matt-o-how deleted the bls_cache_rebased branch May 14, 2024 15:25
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