rootmulti

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const ProofOpMultiStore = "multistore"

the multi-store proof operation constant value

Variables

This section is empty.

Functions

func DefaultProofRuntime

func DefaultProofRuntime() (prt *merkle.ProofRuntime)

XXX: This should be managed by the rootMultiStore which may want to register more proof ops?

func MultiStoreProofOpDecoder

func MultiStoreProofOpDecoder(pop merkle.ProofOp) (merkle.ProofOperator, error)

MultiStoreProofOpDecoder returns a multi-store merkle proof operator from a given proof operation.

func NewMultiStore

func NewMultiStore(db dbm.DB) *multiStore

func RequireProof

func RequireProof(subpath string) bool

RequireProof returns whether proof is required for the subpath.

Types

type MultiStoreProof

type MultiStoreProof struct {
	StoreInfos []storeInfo
}

MultiStoreProof defines a collection of store proofs in a multi-store

func NewMultiStoreProof

func NewMultiStoreProof(storeInfos []storeInfo) *MultiStoreProof

func (*MultiStoreProof) ComputeRootHash

func (proof *MultiStoreProof) ComputeRootHash() []byte

ComputeRootHash returns the root hash for a given multi-store proof.

type MultiStoreProofOp

type MultiStoreProofOp struct {

	// To encode in ProofOp.Data.
	Proof *MultiStoreProof `json:"proof"`
	// contains filtered or unexported fields
}

TODO: document

func NewMultiStoreProofOp

func NewMultiStoreProofOp(key []byte, proof *MultiStoreProof) MultiStoreProofOp

func (MultiStoreProofOp) GetKey

func (op MultiStoreProofOp) GetKey() []byte

GetKey returns the key for a multi-store proof operation.

func (MultiStoreProofOp) ProofOp

func (op MultiStoreProofOp) ProofOp() merkle.ProofOp

ProofOp return a merkle proof operation from a given multi-store proof operation.

func (MultiStoreProofOp) Run

func (op MultiStoreProofOp) Run(args [][]byte) ([][]byte, error)

Run executes a multi-store proof operation for a given value. It returns the root hash if the value matches all the store's commitID's hash or an error otherwise.

func (MultiStoreProofOp) String

func (op MultiStoreProofOp) String() string

String implements the Stringer interface for a mult-store proof operation.

Jump to

Keyboard shortcuts

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