We were reviewing Storj network.
We were looking at contracts and negotiations. Contracts is between the data owner and the farmer. The latter is a term used to describe the one who houses the data. The term farmer or banker is interchangeable because he provides a storage for one of the distributed ledgers and hopes to make money from mining it. The banker or farmer does not need to know the contents of the data. The data owner retains complete control over the encryption key which determines access to the data. The data owner keeps a set of challenges, selects one of them and sends it to the farmer. The farmer uses the challenge and the data to generate the Merkle pre-leaf and uses it with the other leaves to generate a Merkle proof. This proof is sent back to the data owner. The data owner uses the root and tree depth to verify the proof.
The proofs may be compact but the tree may not be. Moreover the shard may be hashed many times to generate pre-leaves. Therefore an optimization is used to generate partial audits using subsets of data which reduces overhead in compute and storage. Unlike the full audits, the partial audits give only a probabilistic assurance that the farmer retains the entire file. This means there could be false positives since the probability is known, it gives a confidence level.
#codingexercise
We were discussing the count of the number of decreasing paths in a matrix if the traversal is permitted only on adjacent horizontal and vertical cells
Solution: we can sum the number of paths with each cell as the starting location if we know how to do it for a given starting position. We saw the backtracking solution and we now see the dynamic programming one which utilizes the calculations of previously computed start locations.
initialize the sum to one for the number of paths at the center where the center forms a standalone single element path
foreach of the four adjacent positions around a center:
if the value is less than the center:
recurse to find the count at the adjacent cell of its not available in the dp matrix or insert the value there after finding.
add the count through that adjacent cell to the sum at the center.
return the sum of paths for this position
We were looking at contracts and negotiations. Contracts is between the data owner and the farmer. The latter is a term used to describe the one who houses the data. The term farmer or banker is interchangeable because he provides a storage for one of the distributed ledgers and hopes to make money from mining it. The banker or farmer does not need to know the contents of the data. The data owner retains complete control over the encryption key which determines access to the data. The data owner keeps a set of challenges, selects one of them and sends it to the farmer. The farmer uses the challenge and the data to generate the Merkle pre-leaf and uses it with the other leaves to generate a Merkle proof. This proof is sent back to the data owner. The data owner uses the root and tree depth to verify the proof.
The proofs may be compact but the tree may not be. Moreover the shard may be hashed many times to generate pre-leaves. Therefore an optimization is used to generate partial audits using subsets of data which reduces overhead in compute and storage. Unlike the full audits, the partial audits give only a probabilistic assurance that the farmer retains the entire file. This means there could be false positives since the probability is known, it gives a confidence level.
#codingexercise
We were discussing the count of the number of decreasing paths in a matrix if the traversal is permitted only on adjacent horizontal and vertical cells
Solution: we can sum the number of paths with each cell as the starting location if we know how to do it for a given starting position. We saw the backtracking solution and we now see the dynamic programming one which utilizes the calculations of previously computed start locations.
initialize the sum to one for the number of paths at the center where the center forms a standalone single element path
foreach of the four adjacent positions around a center:
if the value is less than the center:
recurse to find the count at the adjacent cell of its not available in the dp matrix or insert the value there after finding.
add the count through that adjacent cell to the sum at the center.
return the sum of paths for this position
No comments:
Post a Comment