Documentation ¶
Index ¶
- Constants
- func GetZeroState(suite *suite.Suite, initState InitState) (path *ibctesting.Path, addrs []sdk.ValAddress, ...)
- type Action
- type ActionAndPartialState
- type Builder
- type InitState
- type PartialState
- type TraceData
- type Traces
- func (t *Traces) Action() Action
- func (t *Traces) Actions() []ActionAndPartialState
- func (t *Traces) Consequence() PartialState
- func (t *Traces) ConsumerPower(i int) *int
- func (t *Traces) Delegation(i int) int
- func (t *Traces) DelegatorTokens() int
- func (t *Traces) Diagnostic() string
- func (t *Traces) Height() int
- func (t *Traces) Jailed(i int) *int
- func (t *Traces) OutstandingDowntime(i int) bool
- func (t *Traces) Status(i int) stakingtypes.BondStatus
- func (t *Traces) Time() int
- func (t *Traces) Tokens(i int) int
- func (t *Traces) Trace() TraceData
- type ValStates
Constants ¶
View Source
const ( P = "provider" C = "consumer" )
Variables ¶
This section is empty.
Functions ¶
func GetZeroState ¶
func GetZeroState( suite *suite.Suite, initState InitState, ) (path *ibctesting.Path, addrs []sdk.ValAddress, heightLastCommitted, timeLastCommitted int64)
The state of the data returned is equivalent to the state of two chains after a full handshake, but the precise order of steps used to reach the state does not necessarily mimic the order of steps that happen in a live scenario.
Types ¶
type ActionAndPartialState ¶
type ActionAndPartialState struct { Action Action `json:"action"` PartialState PartialState `json:"partialState"` Ix int `json:"ix"` }
type InitState ¶
type InitState struct { PKSeeds []string NumValidators int MaxValidators int InitialDelegatorTokens int SlashDoublesign sdk.Dec SlashDowntime sdk.Dec UnbondingP time.Duration UnbondingC time.Duration Trusting time.Duration MaxClockDrift time.Duration BlockInterval time.Duration ConsensusParams *abci.ConsensusParams ValStates ValStates MaxEntries int }
type PartialState ¶
type PartialState struct { Delegation []int `json:"delegation,omitempty"` DelegatorTokens int `json:"delegatorTokens,omitempty"` Jailed []*int `json:"jailed,omitempty"` OutstandingDowntime []bool `json:"outstandingDowntime,omitempty"` ConsumerPower []*int `json:"consumerPower,omitempty"` Status []string `json:"status,omitempty"` Tokens []int `json:"tokens,omitempty"` H int `json:"h,omitempty"` T int `json:"t,omitempty"` }
type TraceData ¶
type TraceData struct { Actions []ActionAndPartialState `json:"actions"` Constants struct { BlockSeconds int `json:"BLOCK_SECONDS"` C string `json:"C"` DelegateAmtMax int `json:"DELEGATE_AMT_MAX"` DelegateAmtMin int `json:"DELEGATE_AMT_MIN"` InitialDelegatorTokens int `json:"INITIAL_DELEGATOR_TOKENS"` IsDowntimeProbability float64 `json:"ISDOWNTIME_PROBABILITY"` JailSeconds int `json:"JAIL_SECONDS"` MaxNumPacketsForDeliver int `json:"MAX_NUM_PACKETS_FOR_DELIVER"` MaxValidators int `json:"MAX_VALIDATORS"` NumValidators int `json:"NUM_VALIDATORS"` P string `json:"P"` SlashDoublesign int `json:"SLASH_DOUBLESIGN"` SlashDowntime int `json:"SLASH_DOWNTIME"` TrustingSeconds int `json:"TRUSTING_SECONDS"` UnbondingSecondsC int `json:"UNBONDING_SECONDS_C"` UnbondingSecondsP int `json:"UNBONDING_SECONDS_P"` UndelegateAmtMax int `json:"UNDELEGATE_AMT_MAX"` UndelegateAmtMin int `json:"UNDELEGATE_AMT_MIN"` } `json:"constants"` Events []string `json:"events"` Meta struct { Commit string `json:"commit"` Diff string `json:"diff"` } `json:"meta"` }
func LoadTraces ¶
type Traces ¶
type Traces struct { // index of trace in json CurrentTraceIx int // index of current action CurrentActionIx int // traces Data []TraceData }
Traces stores a list of traces and gives a diagnostic for debugging failed tests.
func (*Traces) Actions ¶
func (t *Traces) Actions() []ActionAndPartialState
func (*Traces) Consequence ¶
func (t *Traces) Consequence() PartialState
func (*Traces) ConsumerPower ¶
func (*Traces) Delegation ¶
func (*Traces) DelegatorTokens ¶
func (*Traces) Diagnostic ¶
diagnostic returns a string for diagnosing errors
func (*Traces) OutstandingDowntime ¶
func (*Traces) Status ¶
func (t *Traces) Status(i int) stakingtypes.BondStatus
type ValStates ¶
type ValStates struct { Delegation []int Tokens []int ValidatorExtraTokens []int Status []stakingtypes.BondStatus }
ValStates represents the total delegation and bond status of a validator
Click to show internal directories.
Click to hide internal directories.