-
Notifications
You must be signed in to change notification settings - Fork 920
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
fix(share/eds): remove bitswap cache wrap from eds store #3101
base: main
Are you sure you want to change the base?
fix(share/eds): remove bitswap cache wrap from eds store #3101
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3101 +/- ##
==========================================
- Coverage 44.83% 44.83% -0.01%
==========================================
Files 265 263 -2
Lines 14620 14628 +8
==========================================
+ Hits 6555 6558 +3
- Misses 7313 7321 +8
+ Partials 752 749 -3 ☔ View full report in Codecov by Sentry. |
Iirc, it doesnt cache the full blocks there but their local availability for Has method via bloomfilters. It is an optimization for bitswap to avoid doing Hazes(reads). This might still be helpful, but needs more thoughts. |
The blockstore cache implemented in our full node does not update when a block is acquired from shrex. If a block request fails because it's absent in the eds-store, the cache erroneously flags it as 'not available'. Consequently, when the block is later synchronized, the cache fails to reflect this update. This discrepancy leads to the risk of generating false 'not available' statuses:
Considering this, disabling the blockstore cache might be advisable to prevent such inaccuracies. |
This is not a problem for Light nodes, as blockstore cache will be updated on successful sampling. |
Two layers of caching were implemented for bitswap requests in full nodes using EDS store:
A bitswap cache that caches individual shares.
An internal EDS store cache that caches accessors.
In the event of a cache miss, both the internal cache of the EDS store and the bitswap cache will be populated with the same share, introducing redundancy in caching. Moreover, having a per-share cache doesn't seem to make much sense for full nodes, given the astronomically small chances of requesting the same share from a block that is not cached in the EDS cache.
The pull request removes the per-share cache as it brings close to no value while consuming RAM. Your understanding and consideration of this change are greatly appreciated.