Documentation ¶
Index ¶
- Constants
- func DefaultProofRuntime() (prt *merkle.ProofRuntime)
- func MultiStoreProofOpDecoder(pop merkle.ProofOp) (merkle.ProofOperator, error)
- func RequireProof(subpath string) bool
- type MultiStoreProof
- type MultiStoreProofOp
- type Store
- func (rs *Store) CacheMultiStore() types.CacheMultiStore
- func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStore, error)
- func (rs *Store) CacheWrap() types.CacheWrap
- func (rs *Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap
- func (rs *Store) Commit() types.CommitID
- func (rs *Store) CopyStore() *Store
- func (rs *Store) GetCommitKVStore(key types.StoreKey) types.CommitKVStore
- func (rs *Store) GetCommitStore(key types.StoreKey) types.CommitStore
- func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore
- func (rs *Store) GetStore(key types.StoreKey) types.Store
- func (rs *Store) GetStoreType() types.StoreType
- func (rs *Store) LastCommitID() types.CommitID
- func (rs *Store) LoadLatestVersion() error
- func (rs *Store) LoadVersion(ver int64) error
- func (rs *Store) MountStoreWithDB(key types.StoreKey, typ types.StoreType, db dbm.DB)
- func (rs *Store) Query(req abci.RequestQuery) abci.ResponseQuery
- func (rs *Store) SetLazyLoading(lazyLoading bool)
- func (rs *Store) SetPruning(pruningOpts types.PruningOptions)
- func (rs *Store) SetTracer(w io.Writer) types.MultiStore
- func (rs *Store) SetTracingContext(tc types.TraceContext) types.MultiStore
- func (rs *Store) TracingEnabled() bool
Constants ¶
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 RequireProof ¶
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.
type Store ¶
Store is composed of many CommitStores. Name contrasts with cacheMultiStore which is for cache-wrapping other MultiStores. It implements the CommitMultiStore interface.
func (*Store) CacheMultiStore ¶
func (rs *Store) CacheMultiStore() types.CacheMultiStore
Implements MultiStore.
func (*Store) CacheMultiStoreWithVersion ¶
func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStore, error)
CacheMultiStoreWithVersion is analogous to CacheMultiStore except that it attempts to load stores at a given version (height). An error is returned if any store cannot be loaded. This should only be used for querying and iterating at past heights.
func (*Store) CacheWrapWithTrace ¶
CacheWrapWithTrace implements the CacheWrapper interface.
func (*Store) GetCommitKVStore ¶
func (rs *Store) GetCommitKVStore(key types.StoreKey) types.CommitKVStore
Implements CommitMultiStore.
func (*Store) GetCommitStore ¶
func (rs *Store) GetCommitStore(key types.StoreKey) types.CommitStore
Implements CommitMultiStore.
func (*Store) GetKVStore ¶
GetKVStore implements the MultiStore interface. If tracing is enabled on the Store, a wrapped TraceKVStore will be returned with the given tracer, otherwise, the original KVStore will be returned. If the store does not exist, panics.
func (*Store) LastCommitID ¶
Implements Committer/CommitStore.
func (*Store) LoadLatestVersion ¶
Implements CommitMultiStore.
func (*Store) LoadVersion ¶
Implements CommitMultiStore.
func (*Store) MountStoreWithDB ¶
Implements CommitMultiStore.
func (*Store) Query ¶
func (rs *Store) Query(req abci.RequestQuery) abci.ResponseQuery
Query calls substore.Query with the same `req` where `req.Path` is modified to remove the substore prefix. Ie. `req.Path` here is `/<substore>/<path>`, and trimmed to `/<path>` for the substore. TODO: add proof for `multistore -> substore`.
func (*Store) SetLazyLoading ¶
SetLazyLoading sets if the iavl store should be loaded lazily or not
func (*Store) SetPruning ¶
func (rs *Store) SetPruning(pruningOpts types.PruningOptions)
Implements CommitMultiStore
func (*Store) SetTracer ¶
func (rs *Store) SetTracer(w io.Writer) types.MultiStore
SetTracer sets the tracer for the MultiStore that the underlying stores will utilize to trace operations. A MultiStore is returned.
func (*Store) SetTracingContext ¶
func (rs *Store) SetTracingContext(tc types.TraceContext) types.MultiStore
SetTracingContext updates the tracing context for the MultiStore by merging the given context with the existing context by key. Any existing keys will be overwritten. It is implied that the caller should update the context when necessary between tracing operations. It returns a modified MultiStore.
func (*Store) TracingEnabled ¶
TracingEnabled returns if tracing is enabled for the MultiStore.