simulation

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWeightMsgJoinService                int = 80
	DefaultWeightMsgLeaveService               int = 30
	DefaultWeightMsgAddOperatorToAllowList     int = 50
	DefaultWeightMsgRemoveOperatorFromAlloList int = 50
	DefaultWeightMsgBorrowPoolSecurity         int = 80
	DefaultWeightMsgCeasePoolSecurityBorrow    int = 30
	DefaultWeightMsgDelegatePool               int = 80
	DefaultWeightMsgDelegateOperator           int = 80
	DefaultWeightMsgDelegateService            int = 80
	DefaultWeightMsgSetUserPreferences         int = 20

	OperationWeightMsgJoinService                 = "op_weight_msg_join_service"
	OperationWeightMsgLeaveService                = "op_weight_msg_leave_service"
	OperationWeightMsgAddOperatorToAlloList       = "op_weight_msg_add_operator_to_allow_list"
	OperationWeightMsgRemoveOperatorFromAllowList = "op_weight_msg_remove_operator_from_allow_list"
	OperationWeightMsgBorrowPoolSecurity          = "op_weight_msg_borrow_pool_security"
	OperationWeightMsgCeasePoolSecurityBorrow     = "op_weight_msg_cease_pool_security_borrow"
	OperationWeightMsgDelegatePool                = "Op_weight_msg_delegate_pool"
	OperationWeightMsgDelegateOperator            = "op_weight_msg_delegate_operator"
	OperationWeightMsgDelegateService             = "op_weight_msg_delegate_service"
	OperationWeightMsgSetUserPreferences          = "op_weight_msg_set_user_preferences"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 50

	OperationWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GetRandomExistingDelegation

func GetRandomExistingDelegation(
	r *rand.Rand,
	ctx sdk.Context,
	k *keeper.Keeper,
	filter func(delegation types.Delegation) bool,
) (types.Delegation, bool)

func NewDecodeStore

func NewDecodeStore(cdc codec.BinaryCodec, keeper *keeper.Keeper) func(kvA kv.Pair, kvB kv.Pair) string

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding restaking type.

func ProposalMsgs

func ProposalMsgs(keeper *keeper.Keeper) []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomOperatorJoinedServices

func RandomOperatorJoinedServices(
	r *rand.Rand,
	operators []operatorstypes.Operator,
	services []servicestypes.Service,
) []types.OperatorJoinedServices

func RandomParams

func RandomParams(r *rand.Rand) types.Params

func RandomServiceAllowedOperators

func RandomServiceAllowedOperators(
	r *rand.Rand,
	services []servicestypes.Service,
	operators []operatorstypes.Operator,
) []types.ServiceAllowedOperators

func RandomServiceSecuringPools

func RandomServiceSecuringPools(
	r *rand.Rand,
	pools []poolstypes.Pool,
	services []servicestypes.Service,
) []types.ServiceSecuringPools

func RandomUserPreferences

func RandomUserPreferences(r *rand.Rand, services []servicestypes.Service) types.UserPreferences

func RandomUserPreferencesEntries

func RandomUserPreferencesEntries(
	r *rand.Rand,
	services []servicestypes.Service,
) []types.UserPreferencesEntry

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the restaking module

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg

SimulateMsgUpdateParams returns a random MsgUpdateParams

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

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