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

You should not call "cache" something that stores persistent metadata #1542

Closed
fai1coin opened this issue Apr 15, 2021 · 2 comments
Closed

Comments

@fai1coin
Copy link

Describe the bug
Storage contains 3 folders: sealed, unsealed, cache. "cache" contains folders for each sector (s-[miner]-[id]). Sector's "cache" contains two files (p_aux, t_aux) and tree cache (*.dat).
t_aux is useless serialized rust struct.
tree cache can be easily generated using update_tree_r_cache utility.
The most important part of the "cache" is p_aux file. The file contains serialized rust struct with 2 hashes: comm_r_last and comm_c. Both values are required in proofs. comm_r_last is hash of tree cache and can be regenerated via update_tree_r_cache.
comm_c is computed after PC2 step. There are complex computations. Also there is no ready to use tool for recomputing. So i think comm_c is not "cache". it's persistent metadata of the sector.

Expected behavior
I see some options here:

  1. Store p_aux near the sector data (s-[miner]-[id].p_aux).
  2. Rename "cache" to something else.
  3. Store comm_c in miner's database and display via sectors status command.
@rjan90
Copy link

rjan90 commented Nov 25, 2021

Hi, this seems to be a proposal rather then an issue per se, and also seems to belong in the proofs-repo if so. So I think this can be closed, and rather re-opened in another repo if you want. #rengjøring

@jennijuju jennijuju transferred this issue from filecoin-project/lotus Nov 26, 2021
@cryptonemo cryptonemo changed the title [BUG] You should not call "cache" something that stores persistent metadata ~[BUG]~ You should not call "cache" something that stores persistent metadata Nov 30, 2021
@cryptonemo cryptonemo changed the title ~[BUG]~ You should not call "cache" something that stores persistent metadata You should not call "cache" something that stores persistent metadata Nov 30, 2021
@cryptonemo
Copy link
Collaborator

Renamed, as it's not a bug, but given that there is no standalone tool to regenerate the cached artifact, it's more like an enhancement/request to build that tool. See #1545 and feel free to give it a go if you'd like.

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

No branches or pull requests

3 participants