[SOLVED] Is there a way to make verification more efficient?

Cookiefamily

Renowned Member
Jan 29, 2020
138
40
68
Germany
Hi,

the new feature of delaying verifications if done in the last X days got me thinking a bit about how verification works and if there would be a better approach to it. Here are a couple of question the devs could maybe answer :)
  1. AFAIK verification checks what kind of chunks should be in a snapshot, calculates the hash for each chunk and compares it to the reference. Correct yes/no?
  2. If 1 is a yes, this would result in some chunks getting hashed possibly hundred of times. Is there a benefit to this?
  3. Adding to 2 and assuming you don't want to verify only a couple selected snapshots but everything: Wouldn't it be more efficient to have a "verify everything" mode that creates a list of all used chunks (wouldn't be necessary if you run GC regularly) and hashes those once to avoid hashing chunks multiple times? I guess you already thought about that, but what is conclusion on why not to do this?
 
Hi,

the new feature of delaying verifications if done in the last X days got me thinking a bit about how verification works and if there would be a better approach to it. Here are a couple of question the devs could maybe answer :)
  1. AFAIK verification checks what kind of chunks should be in a snapshot, calculates the hash for each chunk and compares it to the reference. Correct yes/no?
yes
  1. If 1 is a yes, this would result in some chunks getting hashed possibly hundred of times. Is there a benefit to this?
no
  1. Adding to 2 and assuming you don't want to verify only a couple selected snapshots but everything: Wouldn't it be more efficient to have a "verify everything" mode that creates a list of all used chunks (wouldn't be necessary if you run GC regularly) and hashes those once to avoid hashing chunks multiple times? I guess you already thought about that, but what is conclusion on why not to do this?
that's exactly what we are doing (the list a set, it's in-memory only for a single verification task) ;)
 
  • Like
Reactions: Cookiefamily