simulation

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GenDowntimeJailDuration added in v0.43.1

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

GenDowntimeJailDuration randomized DowntimeJailDuration

func GenMinSignedPerWindow added in v0.43.1

func GenMinSignedPerWindow(r *rand.Rand) sdk.Dec

GenMinSignedPerWindow randomized MinSignedPerWindow

func GenSignedBlocksWindow added in v0.43.1

func GenSignedBlocksWindow(r *rand.Rand) int64

GenSignedBlocksWindow randomized SignedBlocksWindow

func GenSlashFractionDoubleSign added in v0.43.1

func GenSlashFractionDoubleSign(r *rand.Rand) sdk.Dec

GenSlashFractionDoubleSign randomized SlashFractionDoubleSign

func GenSlashFractionDowntime added in v0.43.1

func GenSlashFractionDowntime(r *rand.Rand) sdk.Dec

GenSlashFractionDowntime randomized SlashFractionDowntime

func NewDecodeStore added in v0.43.1

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 ParamChanges added in v0.43.1

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

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

func RandomizedGenState added in v0.43.1

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for slashing

func SimulateMsgUnjail added in v0.25.0

SimulateMsgUnjail generates a MsgUnjail with random values

func WeightedOperations added in v0.43.1

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