simulation

package
v0.47.10-ics-lsm Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 20 Imported by: 6

Documentation

Index

Constants

View Source
const (
	GroupInfo       = "group-info"
	GroupMembers    = "group-members"
	GroupPolicyInfo = "group-policy-info"
	GroupProposals  = "group-proposals"
	GroupVote       = "group-vote"
)
View Source
const (
	OpMsgCreateGroup                     = "op_weight_msg_create_group"
	OpMsgUpdateGroupAdmin                = "op_weight_msg_update_group_admin"
	OpMsgUpdateGroupMetadata             = "op_wieght_msg_update_group_metadata"
	OpMsgUpdateGroupMembers              = "op_weight_msg_update_group_members"
	OpMsgCreateGroupPolicy               = "op_weight_msg_create_group_account"
	OpMsgCreateGroupWithPolicy           = "op_weight_msg_create_group_with_policy"
	OpMsgUpdateGroupPolicyAdmin          = "op_weight_msg_update_group_account_admin"
	OpMsgUpdateGroupPolicyDecisionPolicy = "op_weight_msg_update_group_account_decision_policy"
	OpMsgUpdateGroupPolicyMetaData       = "op_weight_msg_update_group_account_metadata"
	OpMsgSubmitProposal                  = "op_weight_msg_submit_proposal"
	OpMsgWithdrawProposal                = "op_weight_msg_withdraw_proposal"
	OpMsgVote                            = "op_weight_msg_vote"
	OpMsgExec                            = "ops_weight_msg_exec"
	OpMsgLeaveGroup                      = "ops_weight_msg_leave_group"
)

Simulation operation weights constants

View Source
const (
	WeightMsgCreateGroup                     = 100
	WeightMsgCreateGroupPolicy               = 50
	WeightMsgSubmitProposal                  = 90
	WeightMsgVote                            = 90
	WeightMsgExec                            = 90
	WeightMsgLeaveGroup                      = 5
	WeightMsgUpdateGroupMetadata             = 5
	WeightMsgUpdateGroupAdmin                = 5
	WeightMsgUpdateGroupMembers              = 5
	WeightMsgUpdateGroupPolicyAdmin          = 5
	WeightMsgUpdateGroupPolicyDecisionPolicy = 5
	WeightMsgUpdateGroupPolicyMetadata       = 5
	WeightMsgWithdrawProposal                = 20
	WeightMsgCreateGroupWithPolicy           = 50
)

If update group or group policy txn's executed, `SimulateMsgVote` & `SimulateMsgExec` txn's returns `noOp`. That's why we have less weight for update group & group-policy txn's.

Variables

View Source
var (
	TypeMsgCreateGroup                     = sdk.MsgTypeURL(&group.MsgCreateGroup{})
	TypeMsgUpdateGroupMembers              = sdk.MsgTypeURL(&group.MsgUpdateGroupMembers{})
	TypeMsgUpdateGroupAdmin                = sdk.MsgTypeURL(&group.MsgUpdateGroupAdmin{})
	TypeMsgUpdateGroupMetadata             = sdk.MsgTypeURL(&group.MsgUpdateGroupMetadata{})
	TypeMsgCreateGroupWithPolicy           = sdk.MsgTypeURL(&group.MsgCreateGroupWithPolicy{})
	TypeMsgCreateGroupPolicy               = sdk.MsgTypeURL(&group.MsgCreateGroupPolicy{})
	TypeMsgUpdateGroupPolicyAdmin          = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyAdmin{})
	TypeMsgUpdateGroupPolicyDecisionPolicy = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyDecisionPolicy{})
	TypeMsgUpdateGroupPolicyMetadata       = sdk.MsgTypeURL(&group.MsgUpdateGroupPolicyMetadata{})
	TypeMsgSubmitProposal                  = sdk.MsgTypeURL(&group.MsgSubmitProposal{})
	TypeMsgWithdrawProposal                = sdk.MsgTypeURL(&group.MsgWithdrawProposal{})
	TypeMsgVote                            = sdk.MsgTypeURL(&group.MsgVote{})
	TypeMsgExec                            = sdk.MsgTypeURL(&group.MsgExec{})
	TypeMsgLeaveGroup                      = sdk.MsgTypeURL(&group.MsgLeaveGroup{})
)

group message types

Functions

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

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

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the group module.

func SimulateMsgCreateGroup

func SimulateMsgCreateGroup(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation

SimulateMsgCreateGroup generates a MsgCreateGroup with random values

func SimulateMsgCreateGroupPolicy

func SimulateMsgCreateGroupPolicy(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgCreateGroupPolicy generates a NewMsgCreateGroupPolicy with random values

func SimulateMsgCreateGroupWithPolicy

func SimulateMsgCreateGroupWithPolicy(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation

SimulateMsgCreateGroupWithPolicy generates a MsgCreateGroupWithPolicy with random values

func SimulateMsgExec

// SimulateMsgExec generates a MsgExec with random values

func SimulateMsgLeaveGroup

func SimulateMsgLeaveGroup(cdc *codec.ProtoCodec, k keeper.Keeper, ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation

SimulateMsgLeaveGroup generates a MsgLeaveGroup with random values

func SimulateMsgSubmitProposal

func SimulateMsgSubmitProposal(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgSubmitProposal generates a NewMsgSubmitProposal with random values

func SimulateMsgUpdateGroupAdmin

func SimulateMsgUpdateGroupAdmin(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgUpdateGroupAdmin generates a MsgUpdateGroupAdmin with random values

func SimulateMsgUpdateGroupMembers

func SimulateMsgUpdateGroupMembers(cdc *codec.ProtoCodec, ak group.AccountKeeper,
	bk group.BankKeeper, k keeper.Keeper,
) simtypes.Operation

SimulateMsgUpdateGroupMembers generates a MsgUpdateGroupMembers with random values

func SimulateMsgUpdateGroupMetadata

func SimulateMsgUpdateGroupMetadata(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgUpdateGroupMetadata generates a MsgUpdateGroupMetadata with random values

func SimulateMsgUpdateGroupPolicyAdmin

func SimulateMsgUpdateGroupPolicyAdmin(cdc *codec.ProtoCodec, ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgUpdateGroupPolicyAdmin generates a MsgUpdateGroupPolicyAdmin with random values

func SimulateMsgUpdateGroupPolicyDecisionPolicy

func SimulateMsgUpdateGroupPolicyDecisionPolicy(cdc *codec.ProtoCodec, ak group.AccountKeeper,
	bk group.BankKeeper, k keeper.Keeper,
) simtypes.Operation

// SimulateMsgUpdateGroupPolicyDecisionPolicy generates a NewMsgUpdateGroupPolicyDecisionPolicy with random values

func SimulateMsgUpdateGroupPolicyMetadata

func SimulateMsgUpdateGroupPolicyMetadata(cdc *codec.ProtoCodec, ak group.AccountKeeper,
	bk group.BankKeeper, k keeper.Keeper,
) simtypes.Operation

// SimulateMsgUpdateGroupPolicyMetadata generates a MsgUpdateGroupPolicyMetadata with random values

func SimulateMsgVote

SimulateMsgVote generates a MsgVote with random values

func SimulateMsgWithdrawProposal

func SimulateMsgWithdrawProposal(cdc *codec.ProtoCodec, ak group.AccountKeeper,
	bk group.BankKeeper, k keeper.Keeper,
) simtypes.Operation

SimulateMsgWithdrawProposal generates a MsgWithdrawProposal with random values

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