simulation

package
v0.53.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 23 Imported by: 19

Documentation

Index

Constants

View Source
const (
	SignedBlocksWindow      = "signed_blocks_window"
	MinSignedPerWindow      = "min_signed_per_window"
	DowntimeJailDuration    = "downtime_jail_duration"
	SlashFractionDoubleSign = "slash_fraction_double_sign"
	SlashFractionDowntime   = "slash_fraction_downtime"
)

Simulation parameter constants

View Source
const (
	OpWeightMsgUnjail = "op_weight_msg_unjail"

	DefaultWeightMsgUnjail = 100
)

Simulation operation weights constants will be removed in the future

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Simulation operation weights constants will be removed in the future

Variables

This section is empty.

Functions

func GenDowntimeJailDuration

func GenDowntimeJailDuration(r *rand.Rand) time.Duration

GenDowntimeJailDuration randomized DowntimeJailDuration

func GenMinSignedPerWindow

func GenMinSignedPerWindow(r *rand.Rand) math.LegacyDec

GenMinSignedPerWindow randomized MinSignedPerWindow

func GenSignedBlocksWindow

func GenSignedBlocksWindow(r *rand.Rand) int64

GenSignedBlocksWindow randomized SignedBlocksWindow

func GenSlashFractionDoubleSign

func GenSlashFractionDoubleSign(r *rand.Rand) math.LegacyDec

GenSlashFractionDoubleSign randomized SlashFractionDoubleSign

func GenSlashFractionDowntime

func GenSlashFractionDowntime(r *rand.Rand) math.LegacyDec

GenSlashFractionDowntime randomized SlashFractionDowntime

func MsgUnjailFactory added in v0.53.0

func MsgUnjailFactory(k keeper.Keeper, sk types.StakingKeeper) simsx.SimMsgFactoryX

func MsgUpdateParamsFactory added in v0.53.0

func MsgUpdateParamsFactory() simsx.SimMsgFactoryFn[*types.MsgUpdateParams]

MsgUpdateParamsFactory creates a gov proposal for param updates

func NewDecodeStore

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

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

func ProposalMsgs added in v0.47.0

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents migrate to the msg factories instead, this method will be removed in the future

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for slashing

func SimulateMsgUnjail

SimulateMsgUnjail generates a MsgUnjail with random values migrate to the msg factories instead, this method will be removed in the future

func SimulateMsgUpdateParams added in v0.47.0

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

SimulateMsgUpdateParams returns a random MsgUpdateParams migrate to the msg factories instead, this method will be removed in the future

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights migrate to the msg factories instead, this method will be removed in the future

Types

This section is empty.

Jump to

Keyboard shortcuts

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