session

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSessionTreeClosed                   = sdkerrors.Register(codespace, 1, "session tree already closed")
	ErrSessionTreeNotClosed                = sdkerrors.Register(codespace, 2, "session tree not closed")
	ErrSessionTreeStorePathExists          = sdkerrors.Register(codespace, 3, "session tree store path already exists")
	ErrSessionTreeProofPathMismatch        = sdkerrors.Register(codespace, 4, "session tree proof path mismatch")
	ErrSessionTreeUndefinedStoresDirectory = sdkerrors.Register(codespace, 5, "session tree key-value store directory undefined for where they will be saved on disk")
	ErrSessionTreeAlreadyMarkedAsClaimed   = sdkerrors.Register(codespace, 6, "session tree already marked as claimed")
	ErrSessionSupplierClientNotFound       = sdkerrors.Register(codespace, 7, "supplier client not found")
	ErrSessionUpdatingTree                 = sdkerrors.Register(codespace, 8, "error updating session SMST")
	ErrSessionRelayMetaHasNoServiceID      = sdkerrors.Register(codespace, 9, "service ID not specified in relay metadata")
	ErrSessionRelayMetaHasInvalidServiceID = sdkerrors.Register(codespace, 10, "service specified in relay metadata not found")
)
View Source
var ClamAndProofGasCost = sdktypes.NewInt64Coin(volatile.DenomuPOKT, 50000)

The cumulative fees of creating a single claim, followed by submitting a single proof. The value was obtained empirically by observing logs during load testing and observing the claim & proof lifecycle. The gas price at the time of observance was 0.01uPOKT. The value is subject to change as the network parameters change.

Functions

func NewRelayerSessions

func NewRelayerSessions(
	ctx context.Context,
	deps depinject.Config,
	opts ...relayer.RelayerSessionsManagerOption,
) (_ relayer.RelayerSessionsManager, err error)

NewRelayerSessions creates a new relayerSessions.

Required dependencies:

  • client.BlockClient
  • client.SupplierClientMap
  • client.ProofQueryClient

Available options:

  • WithStoresDirectory
  • WithSigningKeyNames

func NewSessionTree

func NewSessionTree(
	sessionHeader *sessiontypes.SessionHeader,
	supplierOperatorAddress string,
	storesDirectory string,
	logger polylog.Logger,
) (relayer.SessionTree, error)

NewSessionTree creates a new sessionTree from a Session and a storePrefix. It also takes a function removeFromRelayerSessions that removes the sessionTree from the RelayerSessionsManager. It returns an error if the KVStore fails to be created.

func WithStoresDirectory

func WithStoresDirectory(storesDirectory string) relayer.RelayerSessionsManagerOption

WithStoresDirectory sets the path on disk where KVStore data files used to store SMST of work sessions are created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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