atoma-network / atoma-contracts

Smart contracts repository for the Atoma Network
2 stars 0 forks source link

Probabilistic Cross Validation #1: Introduction #48

Closed porkbrain closed 5 months ago

porkbrain commented 6 months ago

LGTM,

left a few minor comments. I don't think we should hash chunks the output, but instead we should have an n-ary tree which leaf is the hash H(output, i), where i is the index of the sampled node (even with cross validation).

I believe we are doing this. And the root is the hash of all chunks. It's just that in the special case of cross validation, initial sampled nodes count does not equal the total sampled nodes count if triggered. Hence, you obey the chunks_count parameter instead of sampled_nodes.len().

Of course, unless you do cross validation sampled_nodes.len() == chunks_count as per the code