ExistenceProof takes a key and a value and a set of steps to perform on it. The result of peforming all these steps will provide a "root hash", which can be compared to the value in a header.

Since it is computationally infeasible to produce a hash collission for any of the used cryptographic hash functions, if someone can provide a series of operations to transform a given key and value into a root hash that matches some trusted root, these key and values must be in the referenced merkle tree.

The only possible issue is maliablity in LeafOp, such as providing extra prefix data, which should be controlled by a spec. Eg. with lengthOp as NONE, prefix = FOO, key = BAR, value = CHOICE and prefix = F, key = OOBAR, value = CHOICE would produce the same value.

With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field in the ProofSpec is valuable to prevent this mutability. And why all trees should length-prefix the data before hashing it.

from message ics23.ExistenceProof

Hierarchy

Constructors

Properties

key: Uint8Array = ...

from field: bytes key = 1;

leaf?: LeafOp

from field: ics23.LeafOp leaf = 3;

path: InnerOp[] = []

from field: repeated ics23.InnerOp path = 4;

value: Uint8Array = ...

from field: bytes value = 2;

fields: FieldList = ...
runtime: ProtoRuntime = proto3
typeName: "ics23.ExistenceProof" = 'ics23.ExistenceProof'

Methods