state

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyDeleteMarkerBytes = []byte{1}

Functions

func CalcHash

func CalcHash(bytes [][]byte) ([]byte, error)

func CalculateKeyValueHash

func CalculateKeyValueHash(key, value []byte) ([]byte, error)

func ConstructCompositeKey

func ConstructCompositeKey(dbName, key string) ([]byte, error)

Types

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

Proof contains correct path in Merkle-Patricia Trie

func NewProof

func NewProof(path []*types.MPTrieProofElement) *Proof

func (*Proof) GetPath

func (p *Proof) GetPath() []*types.MPTrieProofElement

func (*Proof) Verify

func (p *Proof) Verify(valueHash, rootHash []byte, isDeleted bool) (bool, error)

Verify validates correctness of path and checks is path first element contains valueHash and last element is trie root

Jump to

Keyboard shortcuts

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