keeper

package
v1.1.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyHashStr = "0x"

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	rarimo types.RarimocoreKeeper,
) *Keeper

func (Keeper) AddToWaitingList

func (k Keeper) AddToWaitingList(ctx sdk.Context, id string)

func (Keeper) EndBlocker

func (k Keeper) EndBlocker(ctx sdk.Context)

func (Keeper) GetAllNode

func (k Keeper) GetAllNode(ctx sdk.Context) (list []types.Node)

func (Keeper) GetAllStateInfo

func (k Keeper) GetAllStateInfo(ctx sdk.Context) (list []types.StateInfo)

func (Keeper) GetNode

func (k Keeper) GetNode(
	ctx sdk.Context,
	key string,
) (val types.Node, found bool)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetRootKey

func (k Keeper) GetRootKey(ctx sdk.Context) string

func (Keeper) GetStateInfo

func (k Keeper) GetStateInfo(
	ctx sdk.Context,
	index string,
) (val types.StateInfo, found bool)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) Path

func (k Keeper) Path(ctx sdk.Context, id string) []string

Path returns the Merkle path for the requested state hash by state index.

func (Keeper) PostTxProcessing

func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error

PostTxProcessing is used to listen EVM smart contract events, filter and process `StateTransited` events emitted by configured in module params contract address. Will be called by EVM module as hook.

func (Keeper) RemoveNode

func (k Keeper) RemoveNode(
	ctx sdk.Context,
	key string,
)

func (Keeper) RemoveStateInfo

func (k Keeper) RemoveStateInfo(
	ctx sdk.Context,
	index string,
)

func (Keeper) SetGIST

func (k Keeper) SetGIST(ctx sdk.Context, gist string)

func (Keeper) SetNode

func (k Keeper) SetNode(ctx sdk.Context, n types.Node)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetRootKey

func (k Keeper) SetRootKey(ctx sdk.Context, root string)

func (Keeper) SetStateInfo

func (k Keeper) SetStateInfo(ctx sdk.Context, n types.StateInfo)

func (Keeper) UpdateIdentity

func (k Keeper) UpdateIdentity(ctx sdk.Context, gist string, id string, hash string)

type LCG

type LCG struct {
	Keeper
}

func (LCG) Next

func (l LCG) Next(ctx sdk.Context) uint64

Next function returns the next pseudo-random value depending on generator state in module params. Such simple solution is claimed to be enough for balancing binary tree nodes. Linear congruential generator More about: https://en.wikipedia.org/wiki/Linear_congruential_generator

type Migrator added in v1.1.0

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

func NewMigrator added in v1.1.0

func NewMigrator(keeper Keeper) Migrator

func (Migrator) Migrate1to2 added in v1.1.0

func (m Migrator) Migrate1to2(ctx sdk.Context) error

type Treap

type Treap struct {
	Keeper
}

Treap implements dynamic Merkle tree using treap data structure. Proof of concept: https://github.com/olegfomenko/go-treap-merkle

func (Treap) Insert

func (t Treap) Insert(ctx sdk.Context, key string, priority uint64)

func (Treap) Merge

func (t Treap) Merge(ctx sdk.Context, r1, r2 string) string

func (Treap) MerklePath

func (t Treap) MerklePath(ctx sdk.Context, key string) []string

func (Treap) Remove

func (t Treap) Remove(ctx sdk.Context, key string)

func (Treap) Split

func (t Treap) Split(ctx sdk.Context, root, key string) (string, string)

Jump to

Keyboard shortcuts

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