FusedMerklePatriciaForestry

scalus.cardano.onchain.plutus.crypto.trie.FusedMerklePatriciaForestry
See theFusedMerklePatriciaForestry companion object

Fused Merkle Patricia Forestry (radix-16).

Proofs are encoded as a single flat ByteString instead of List[ProofStep]. This eliminates per-step CBOR/Data overhead.

Binary proof format (all fields fixed-size): Branch: 0x00 | skip[1] | neighbors[128] = 130 bytes Fork: 0x01 | skip[1] | nibble[1] | prefixLen[1] | halfLeft[32] | halfRight[32] = 68 bytes Leaf: 0x02 | skip[1] | key[32] | value[32] = 66 bytes

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Extension method from FusedMerklePatriciaForestry

Delete key/value using combined single-pass: parse proof once, compute both including (verify present) and excluding (new root) simultaneously.

Delete key/value using combined single-pass: parse proof once, compute both including (verify present) and excluding (new root) simultaneously.

Attributes

def has(key: ByteString, value: ByteString, proof: Proof): Boolean
Extension method from FusedMerklePatriciaForestry
Extension method from FusedMerklePatriciaForestry

Insert key/value using combined single-pass: parse proof once, compute both excluding (verify absent) and including (new root) simultaneously.

Insert key/value using combined single-pass: parse proof once, compute both excluding (verify absent) and including (new root) simultaneously.

Attributes

def isEmpty: Boolean
Extension method from FusedMerklePatriciaForestry
def update(key: ByteString, proof: Proof, oldValue: ByteString, newValue: ByteString): FusedMerklePatriciaForestry
Extension method from FusedMerklePatriciaForestry
def verifyMembership(key: ByteString, value: ByteString, proof: Proof): Unit
Extension method from FusedMerklePatriciaForestry

Verify membership of a key-value pair, throwing if the proof is invalid

Verify membership of a key-value pair, throwing if the proof is invalid

Attributes

def verifyNonMembership(key: ByteString, proof: Proof): Unit
Extension method from FusedMerklePatriciaForestry

Verify non-membership of a key, throwing if the proof is invalid

Verify non-membership of a key, throwing if the proof is invalid

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product