Documentation ¶
Index ¶
- func ElemKey(index uint64) []byte
- func First(st KVStore, start, end []byte) (kv cmn.KVPair, ok bool)
- func Last(st KVStore, start, end []byte) (kv cmn.KVPair, ok bool)
- func LengthKey() []byte
- func NewCacheKVStore(parent KVStore) *cacheKVStore
- func NewCommitMultiStore(db dbm.DB) *rootMultiStore
- func NewGasKVStore(gasMeter sdk.GasMeter, gasConfig sdk.GasConfig, parent sdk.KVStore) *gasKVStore
- func RequireProof(subpath string) bool
- func TopKey() []byte
- func VerifyMultiStoreCommitInfo(storeName string, storeInfos []storeInfo, appHash []byte) ([]byte, error)
- func VerifyRangeProof(key, value []byte, substoreCommitHash []byte, rangeProof *iavl.RangeProof) error
- type CacheKVStore
- type CacheMultiStore
- type CacheWrap
- type CacheWrapper
- type CommitID
- type CommitKVStore
- type CommitMultiStore
- type CommitStore
- type Committer
- type Gas
- type GasConfig
- type GasMeter
- type Iterator
- type KVPair
- type KVStore
- type List
- type MultiStore
- type MultiStoreProof
- type PruningStrategy
- type Queryable
- type Queue
- type Store
- type StoreKey
- type StoreType
- type TraceContext
- type TraceKVStore
- func (tkv *TraceKVStore) CacheWrap() sdk.CacheWrap
- func (tkv *TraceKVStore) CacheWrapWithTrace(_ io.Writer, _ TraceContext) CacheWrap
- func (tkv *TraceKVStore) Delete(key []byte)
- func (tkv *TraceKVStore) Gas(meter GasMeter, config GasConfig) KVStore
- func (tkv *TraceKVStore) Get(key []byte) []byte
- func (tkv *TraceKVStore) GetStoreType() sdk.StoreType
- func (tkv *TraceKVStore) Has(key []byte) bool
- func (tkv *TraceKVStore) Iterator(start, end []byte) sdk.Iterator
- func (tkv *TraceKVStore) Prefix(prefix []byte) KVStore
- func (tkv *TraceKVStore) ReverseIterator(start, end []byte) sdk.Iterator
- func (tkv *TraceKVStore) Set(key []byte, value []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGasKVStore ¶ added in v0.18.0
NewGasKVStore returns a reference to a new GasKVStore. nolint
func RequireProof ¶ added in v0.25.0
RequireProof return whether proof is require for the subpath
func VerifyMultiStoreCommitInfo ¶ added in v0.25.0
func VerifyMultiStoreCommitInfo(storeName string, storeInfos []storeInfo, appHash []byte) ([]byte, error)
VerifyMultiStoreCommitInfo verify multiStoreCommitInfo against appHash
func VerifyRangeProof ¶ added in v0.25.0
func VerifyRangeProof(key, value []byte, substoreCommitHash []byte, rangeProof *iavl.RangeProof) error
VerifyRangeProof verify iavl RangeProof
Types ¶
type CacheKVStore ¶
type CacheKVStore = types.CacheKVStore
Import cosmos-sdk/types/store.go for convenience. nolint
type CacheMultiStore ¶
type CacheMultiStore = types.CacheMultiStore
Import cosmos-sdk/types/store.go for convenience. nolint
type CacheWrapper ¶
type CacheWrapper = types.CacheWrapper
Import cosmos-sdk/types/store.go for convenience. nolint
type CommitKVStore ¶
type CommitKVStore = types.CommitKVStore
Import cosmos-sdk/types/store.go for convenience. nolint
type CommitMultiStore ¶
type CommitMultiStore = types.CommitMultiStore
Import cosmos-sdk/types/store.go for convenience. nolint
type CommitStore ¶
type CommitStore = types.CommitStore
Import cosmos-sdk/types/store.go for convenience. nolint
func LoadIAVLStore ¶
func LoadIAVLStore(db dbm.DB, id CommitID, pruning sdk.PruningStrategy) (CommitStore, error)
load the iavl store
type List ¶ added in v0.25.0
type List struct {
// contains filtered or unexported fields
}
List defines an integer indexable mapper It panics when the element type cannot be (un/)marshalled by the codec
func (List) Delete ¶ added in v0.25.0
Delete() deletes the element in the given position Other elements' indices are preserved after deletion Panics when the index is out of range
func (List) Iterate ¶ added in v0.25.0
CONTRACT: No writes may happen within a domain while iterating over it.
func (List) Len ¶ added in v0.25.0
Len() returns the length of the list The length is only increased by Push() and not decreased List dosen't check if an index is in bounds The user should check Len() before doing any actions
type MultiStore ¶
type MultiStore = types.MultiStore
Import cosmos-sdk/types/store.go for convenience. nolint
type MultiStoreProof ¶ added in v0.25.0
type MultiStoreProof struct { StoreInfos []storeInfo StoreName string RangeProof iavl.RangeProof }
MultiStoreProof defines a collection of store proofs in a multi-store
type PruningStrategy ¶ added in v0.24.0
type PruningStrategy = types.PruningStrategy
Import cosmos-sdk/types/store.go for convenience. nolint
type Queue ¶ added in v0.25.0
type Queue struct {
List List
}
Queue is a List wrapper that provides queue-like functions It panics when the element type cannot be (un/)marshalled by the codec
func (Queue) Flush ¶ added in v0.25.0
Flush() removes elements it processed Return true in the continuation to break The interface{} is unmarshalled before the continuation is called Starts from the top(head) of the queue CONTRACT: Pop() or Push() should not be performed while flushing
func (Queue) Peek ¶ added in v0.25.0
Popping/Peeking on an empty queue will cause panic The user should check IsEmpty() before doing any actions Peek() returns the element at the front of the queue without removing it
type TraceContext ¶ added in v0.21.0
type TraceContext = types.TraceContext
Import cosmos-sdk/types/store.go for convenience. nolint
type TraceKVStore ¶ added in v0.21.0
type TraceKVStore struct {
// contains filtered or unexported fields
}
TraceKVStore implements the KVStore interface with tracing enabled. Operations are traced on each core KVStore call and written to the underlying io.writer.
TODO: Should we use a buffered writer and implement Commit on TraceKVStore?
func NewTraceKVStore ¶ added in v0.21.0
func NewTraceKVStore(parent sdk.KVStore, writer io.Writer, tc TraceContext) *TraceKVStore
NewTraceKVStore returns a reference to a new traceKVStore given a parent KVStore implementation and a buffered writer.
func (*TraceKVStore) CacheWrap ¶ added in v0.21.0
func (tkv *TraceKVStore) CacheWrap() sdk.CacheWrap
CacheWrap implements the KVStore interface. It panics as a TraceKVStore cannot be cache wrapped.
func (*TraceKVStore) CacheWrapWithTrace ¶ added in v0.21.0
func (tkv *TraceKVStore) CacheWrapWithTrace(_ io.Writer, _ TraceContext) CacheWrap
CacheWrapWithTrace implements the KVStore interface. It panics as a TraceKVStore cannot be cache wrapped.
func (*TraceKVStore) Delete ¶ added in v0.21.0
func (tkv *TraceKVStore) Delete(key []byte)
Delete implements the KVStore interface. It traces a write operation and delegates the Delete call to the parent KVStore.
func (*TraceKVStore) Gas ¶ added in v0.24.0
func (tkv *TraceKVStore) Gas(meter GasMeter, config GasConfig) KVStore
Gas implements the KVStore interface.
func (*TraceKVStore) Get ¶ added in v0.21.0
func (tkv *TraceKVStore) Get(key []byte) []byte
Get implements the KVStore interface. It traces a read operation and delegates a Get call to the parent KVStore.
func (*TraceKVStore) GetStoreType ¶ added in v0.21.0
func (tkv *TraceKVStore) GetStoreType() sdk.StoreType
GetStoreType implements the KVStore interface. It returns the underlying KVStore type.
func (*TraceKVStore) Has ¶ added in v0.21.0
func (tkv *TraceKVStore) Has(key []byte) bool
Has implements the KVStore interface. It delegates the Has call to the parent KVStore.
func (*TraceKVStore) Iterator ¶ added in v0.21.0
func (tkv *TraceKVStore) Iterator(start, end []byte) sdk.Iterator
Iterator implements the KVStore interface. It delegates the Iterator call the to the parent KVStore.
func (*TraceKVStore) Prefix ¶ added in v0.21.0
func (tkv *TraceKVStore) Prefix(prefix []byte) KVStore
Prefix implements the KVStore interface.
func (*TraceKVStore) ReverseIterator ¶ added in v0.21.0
func (tkv *TraceKVStore) ReverseIterator(start, end []byte) sdk.Iterator
ReverseIterator implements the KVStore interface. It delegates the ReverseIterator call the to the parent KVStore.
func (*TraceKVStore) Set ¶ added in v0.21.0
func (tkv *TraceKVStore) Set(key []byte, value []byte)
Set implements the KVStore interface. It traces a write operation and delegates the Set call to the parent KVStore.