simulation

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSegmentLength       = "max_segment_length"
	MinSegmentLength       = "min_segment_length"
	MaxNameLevels          = "max_namne_levels"
	AllowUnrestrictedNames = "allow_unrestricted_names"
	RootNameSegment        = "root_name_segment"
	ModifyName             = "jackthecat"
)

Simulation parameter constants

View Source
const (
	//nolint:gosec // not credentials
	OpWeightMsgBindName = "op_weight_msg_bind_name"
	//nolint:gosec // not credentials
	OpWeightMsgDeleteName = "op_weight_msg_delete_name"
	//nolint:gosec // not credentials
	OpWeightMsgModifyName = "op_weight_msg_modify_name"
)

Simulation operation weights constants

View Source
const OpWeightSubmitCreateRootNameProposal = "op_weight_submit_create_root_name_proposal"

OpWeightSubmitCreateRootNameProposal app params key for create root name proposal

Variables

This section is empty.

Functions

func Dispatch added in v1.0.0

Dispatch sends an operation to the chain using a given account/funds on account for fees. Failures on the server side are handled as no-op msg operations with the error string as the status/response.

func GenAllowUnrestrictedNames

func GenAllowUnrestrictedNames(r *rand.Rand) bool

GenAllowUnrestrictedNames returns a randomized AllowUnrestrictedNames parameter.

func GenMaxNameLevels

func GenMaxNameLevels(r *rand.Rand) uint32

GenMaxNameLevels randomized Maximum number of segment levels

func GenMaxSegmentLength

func GenMaxSegmentLength(r *rand.Rand) uint32

GenMaxSegmentLength randomized Max Segment Length

func GenMinSegmentLength

func GenMinSegmentLength(r *rand.Rand) uint32

GenMinSegmentLength randomized minimum segment name length

func GenRootNameSegment added in v1.0.0

func GenRootNameSegment(r *rand.Rand, minSegmentLength uint32) string

GenRootNameSegment returns a randomized String to use for the root name binding

func NewDecodeStore added in v1.0.0

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

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value

func ParamChanges

func ParamChanges(_ *rand.Rand) []simtypes.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals on the simulation

func ProposalContents

func ProposalContents(k keeper.Keeper) []simtypes.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for name

func SimulateCreateRootNameProposalContent

func SimulateCreateRootNameProposalContent(_ keeper.Keeper) simtypes.ContentSimulatorFn

SimulateCreateRootNameProposalContent generates random create-root-name proposal content

func SimulateMsgBindName added in v1.0.0

SimulateMsgBindName will bind a NAME under an existing name using a 40% probability of restricting it.

func SimulateMsgDeleteName added in v1.0.0

SimulateMsgDeleteName will dispatch a delete name operation against a random name record

func SimulateMsgModifyName added in v1.16.0

SimulateMsgModifyName will dispatch a modify name operation against a random name record

func WeightedOperations added in v1.0.0

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