cosmos-sdk: github.com/cosmos/cosmos-sdk/x/slashing/simulation Index | Files

package simulation

import "github.com/cosmos/cosmos-sdk/x/slashing/simulation"

Index

Package Files

decoder.go genesis.go operations.go params.go

Constants

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

const (
    OpWeightMsgUnjail = "op_weight_msg_unjail"
)

Simulation operation weights constants

func GenDowntimeJailDuration Uses

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

GenDowntimeJailDuration randomized DowntimeJailDuration

func GenMinSignedPerWindow Uses

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

GenMinSignedPerWindow randomized MinSignedPerWindow

func GenSignedBlocksWindow Uses

func GenSignedBlocksWindow(r *rand.Rand) int64

GenSignedBlocksWindow randomized SignedBlocksWindow

func GenSlashFractionDoubleSign Uses

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

GenSlashFractionDoubleSign randomized SlashFractionDoubleSign

func GenSlashFractionDowntime Uses

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

GenSlashFractionDowntime randomized SlashFractionDowntime

func NewDecodeStore Uses

func NewDecodeStore(cdc codec.Marshaler) 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 Uses

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

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

func RandomizedGenState Uses

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for slashing

func SimulateMsgUnjail Uses

func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper) simtypes.Operation

SimulateMsgUnjail generates a MsgUnjail with random values nolint: interfacer

func WeightedOperations Uses

func WeightedOperations(
    appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper,
    bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper,
) simulation.WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Package simulation imports 18 packages (graph) and is imported by 1 packages. Updated 2020-08-13. Refresh now. Tools for package owners.