Service: Commitment Model
Closed this issue · 0 comments
nkostoulas commented
The Commitment Model will replace the latest Ocean hash being used so far for attestations. This will incorporate the hashes from all clients into a merle tree. Template:
type Commitment struct {
commitments type map < position , hash >
root type hash
updated type bool
}
GetRoot() // calculate and update merkle root
GetHashForPosition(position) // get hash at position
UpdateHash(position, hash) // update commitments and trigger root update
Changes required:
-
Commitment model
-
Merkle tree util and testing
-
Attestation model to move from Hash to Commitment
-
AttestService to request/store/use Commitment instead of hash
-
Server to store latest Commitment not Hash per client
-
Commitment proofs