Versions in this module Expand all Collapse all v0 v0.1.3 Nov 25, 2021 Changes in this version + func DeriveRand(r *rand.Rand) *rand.Rand + func RandIntBetween(r *rand.Rand, min, max int) int + func RandPositiveInt(r *rand.Rand, max sdk.Int) (sdk.Int, error) + func RandStringOfLength(r *rand.Rand, n int) string + func RandSubsetCoins(r *rand.Rand, coins sdk.Coins) sdk.Coins + func RandTimestamp(r *rand.Rand) time.Time + func RandomAmount(r *rand.Rand, max sdk.Int) sdk.Int + func RandomDecAmount(r *rand.Rand, max sdk.Dec) sdk.Dec + func RandomFees(r *rand.Rand, ctx sdk.Context, spendableCoins sdk.Coins) (sdk.Coins, error) + type Account struct + Address sdk.AccAddress + PrivKey crypto.PrivKey + PubKey crypto.PubKey + func FindAccount(accs []Account, address sdk.Address) (Account, bool) + func RandomAcc(r *rand.Rand, accs []Account) (Account, int) + func RandomAccounts(r *rand.Rand, n int) []Account + func (acc Account) Equals(acc2 Account) bool + type AppParams map[string]json.RawMessage + func (sp AppParams) GetOrGenerate(cdc *codec.Codec, key string, ptr interface{}, r *rand.Rand, ps ParamSimulator) + type AppStateFn func(r *rand.Rand, accs []Account, config Config) (appState json.RawMessage, accounts []Account, chainId string, ...) + type Config struct + AllInvariants bool + BlockSize int + ChainID string + Commit bool + ExportParamsHeight int + ExportParamsPath string + ExportStatePath string + ExportStatsPath string + GenesisFile string + InitialBlockHeight int + Lean bool + NumBlocks int + OnOperation bool + ParamsFile string + Seed int64 + type ContentSimulatorFn func(r *rand.Rand, ctx sdk.Context, accs []Account) govtypes.Content + type FutureOperation struct + BlockHeight int + BlockTime time.Time + Op Operation + type Operation func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []Account, ...) (OperationMsg OperationMsg, futureOps []FutureOperation, err error) + type OperationMsg struct + Comment string + Msg json.RawMessage + Name string + OK bool + Route string + func NewOperationMsg(msg sdk.Msg, ok bool, comment string) OperationMsg + func NewOperationMsgBasic(route, name, comment string, ok bool, msg []byte) OperationMsg + func NoOpMsg(route string) OperationMsg + func (om OperationMsg) LogEvent(eventLogger func(route, op, evResult string)) + func (om OperationMsg) MustMarshal() json.RawMessage + func (om OperationMsg) String() string + type ParamSimulator func(r *rand.Rand) + type SimValFn func(r *rand.Rand) string v0.1.1 Nov 25, 2021 Changes in this version + const AverageBlockTime + const BeginBlockEntryKind + const EndBlockEntryKind + const MsgEntryKind + const QueuedMsgEntryKind + func CreateTransitionMatrix(weights [][]int) (simulation.TransitionMatrix, error) + func GetMemberOfInitialState(r *rand.Rand, weights []int) int + func NewSimParamChange(subspace, key string, simVal simulation.SimValFn) simulation.ParamChange + func NewWeightedProposalContent(appParamsKey string, defaultWeight int, ...) simulation.WeightedProposalContent + func RandomConsensusParams(r *rand.Rand, appState json.RawMessage) *abci.ConsensusParams + func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, ...) abci.RequestBeginBlock + type DummyLogWriter struct + func (lw *DummyLogWriter) AddEntry(_ OperationEntry) + func (lw *DummyLogWriter) PrintLogs() + type EventStats map[string]map[string]map[string]int + func NewEventStats() EventStats + func (es EventStats) ExportJSON(path string) + func (es EventStats) Print(w io.Writer) + func (es EventStats) Tally(route, op, evResult string) + type LogWriter interface + AddEntry func(OperationEntry) + PrintLogs func() + func NewLogWriter(testingmode bool) LogWriter + type OperationEntry struct + EntryKind string + Height int64 + Operation json.RawMessage + Order int64 + func BeginBlockEntry(height int64) OperationEntry + func EndBlockEntry(height int64) OperationEntry + func MsgEntry(height, order int64, opMsg simulation.OperationMsg) OperationEntry + func NewOperationEntry(entry string, height, order int64, op json.RawMessage) OperationEntry + func QueuedMsgEntry(height int64, opMsg simulation.OperationMsg) OperationEntry + func (oe OperationEntry) MustMarshal() json.RawMessage + type OperationQueue map[int][]simulation.Operation + func NewOperationQueue() OperationQueue + type ParamChange struct + func (spc ParamChange) ComposedKey() string + func (spc ParamChange) Key() string + func (spc ParamChange) SimValue() simulation.SimValFn + func (spc ParamChange) Subspace() string + type Params struct + func RandomParams(r *rand.Rand) Params + func SimulateFromSeed(tb testing.TB, w io.Writer, app *baseapp.BaseApp, ...) (stopEarly bool, exportedParams Params, err error) + func (p Params) BlockSizeTransitionMatrix() simulation.TransitionMatrix + func (p Params) EvidenceFraction() float64 + func (p Params) InitialLivenessWeightings() []int + func (p Params) LivenessTransitionMatrix() simulation.TransitionMatrix + func (p Params) NumKeys() int + func (p Params) PastEvidenceFraction() float64 + type StandardLogWriter struct + OpEntries []OperationEntry + func (lw *StandardLogWriter) AddEntry(opEntry OperationEntry) + func (lw *StandardLogWriter) PrintLogs() + type TransitionMatrix struct + func (t TransitionMatrix) NextState(r *rand.Rand, i int) int + type WeightedOperation struct + func NewWeightedOperation(weight int, op simulation.Operation) WeightedOperation + func (w WeightedOperation) Op() simulation.Operation + func (w WeightedOperation) Weight() int + type WeightedOperations []simulation.WeightedOperation + type WeightedProposalContent struct + func (w WeightedProposalContent) AppParamsKey() string + func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulatorFn + func (w WeightedProposalContent) DefaultWeight() int