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
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 ofsampled_nodes.len()
.Of course, unless you do cross validation
sampled_nodes.len() == chunks_count
as per the code