simulation

package
v0.47.8-ics-lsm-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 1,010

Documentation

Index

Constants

View Source
const (
	MaxMemoChars           = "max_memo_characters"
	TxSigLimit             = "tx_sig_limit"
	TxSizeCostPerByte      = "tx_size_cost_per_byte"
	SigVerifyCostED25519   = "sig_verify_cost_ed25519"
	SigVerifyCostSECP256K1 = "sig_verify_cost_secp256k1"
)

Simulation parameter constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params" //nolint:gosec
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GenMaxMemoChars

func GenMaxMemoChars(r *rand.Rand) uint64

GenMaxMemoChars randomized MaxMemoChars

func GenSigVerifyCostED25519

func GenSigVerifyCostED25519(r *rand.Rand) uint64

GenSigVerifyCostED25519 randomized SigVerifyCostED25519

func GenSigVerifyCostSECP256K1

func GenSigVerifyCostSECP256K1(r *rand.Rand) uint64

GenSigVerifyCostSECP256K1 randomized SigVerifyCostSECP256K1

func GenTxSigLimit

func GenTxSigLimit(r *rand.Rand) uint64

GenTxSigLimit randomized TxSigLimit make sure that sigLimit is always high so that arbitrarily simulated messages from other modules can still create valid transactions

func GenTxSizeCostPerByte

func GenTxSizeCostPerByte(r *rand.Rand) uint64

GenTxSizeCostPerByte randomized TxSizeCostPerByte

func NewDecodeStore

func NewDecodeStore(ak AuthUnmarshaler) func(kvA, kvB kv.Pair) string

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

func ProposalMsgs added in v0.47.0

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomGenesisAccounts

func RandomGenesisAccounts(simState *module.SimulationState) types.GenesisAccounts

RandomGenesisAccounts defines the default RandomGenesisAccountsFn used on the SDK. It creates a slice of BaseAccount, ContinuousVestingAccount and DelayedVestingAccount.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState, randGenAccountsFn types.RandomGenesisAccountsFn)

RandomizedGenState generates a random GenesisState for auth

func SimulateMsgUpdateParams added in v0.47.0

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

SimulateMsgUpdateParams returns a random MsgUpdateParams

Types

type AuthUnmarshaler added in v0.40.0

type AuthUnmarshaler interface {
	UnmarshalAccount([]byte) (types.AccountI, error)
	GetCodec() codec.BinaryCodec
}

Jump to

Keyboard shortcuts

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