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

[CHIA-1608] Use a cache eviction logic that matches our BlsCache usage pattern #758

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

AmineKhaldi
Copy link
Contributor

No description provided.

Copy link

coveralls-official bot commented Oct 17, 2024

Pull Request Test Coverage Report for Build 11854445955

Details

  • 88 of 100 (88.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 83.862%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/chia-bls/src/bls_cache.rs 88 100 88.0%
Totals Coverage Status
Change from base Build 11851422401: 0.006%
Covered Lines: 12913
Relevant Lines: 15398

💛 - Coveralls

@AmineKhaldi AmineKhaldi marked this pull request as ready for review October 17, 2024 17:31
@AmineKhaldi AmineKhaldi changed the title CHIA-1608 Use a cache eviction logic that matches our BlsCache usage pattern [CHIA-1608] Use a cache eviction logic that matches our BlsCache usage pattern Oct 21, 2024
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.

did you run the benchmark to compare against main? I think that would be an interesting comparison.

Could you also make sure that it's OK to evict on a cache hit? i.e. that we never rely on two or more cache hits?

If there's a reorg we might get more cache hits, but we should probably not optimize for that case. If there are competing unfinished blocks is another example where we'll have multiple cache hits.

It might make sense to make the eviction explicit. When a block is fully validated and added to the chain it should be safe to evict its keys from the cache.

crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
@AmineKhaldi AmineKhaldi force-pushed the bls_cache_eviction_logic branch 2 times, most recently from 4b60431 to 795f6c4 Compare October 28, 2024 13:20
crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
wheel/generate_type_stubs.py Show resolved Hide resolved
@AmineKhaldi AmineKhaldi force-pushed the bls_cache_eviction_logic branch 3 times, most recently from d2f5947 to f588a3b Compare November 1, 2024 11:26
arvidn
arvidn previously approved these changes Nov 6, 2024
crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
crates/chia-bls/src/bls_cache.rs Outdated Show resolved Hide resolved
@arvidn arvidn merged commit d988747 into Chia-Network:main Nov 15, 2024
50 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.

2 participants