trie_blake2b_verify

package
v0.0.0-...-2b1eae4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitmentToTheTerminalNode

func CommitmentToTheTerminalNode(p *trie_blake2b.Proof) []byte

CommitmentToTheTerminalNode returns hash of the last node in the proof If it is a valid proof, it s always contains terminal commitment It is useful to get commitment to the sub-state. It must contain some value at its nil postfix

func IsProofOfAbsence

func IsProofOfAbsence(p *trie_blake2b.Proof) bool

IsProofOfAbsence checks if it is proof of absence. Proof that the trie commits to something else in the place where it would commit to the key if it would be present

func MustKeyWithTerminal

func MustKeyWithTerminal(p *trie_blake2b.Proof) ([]byte, []byte)

MustKeyWithTerminal returns key and terminal commitment the proof is about. It returns: - key - commitment slice of up to hashSize bytes long. If it is nil, the proof is a proof of absence It does not verify the proof, so this function should be used only after Validate()

func Validate

func Validate(p *trie_blake2b.Proof, rootBytes []byte) error

Validate check the proof against the provided root commitments

func ValidateWithValue

func ValidateWithValue(p *trie_blake2b.Proof, rootBytes []byte, value []byte) error

ValidateWithValue checks the proof and checks if the proof commits to the specific value

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL