Documentation
¶
Index ¶
- Constants
- func GetZeroState(suite *suite.Suite, initState InitState) (*ibctesting.Path, []sdk.ValAddress, int64, int64)
- type Action
- type ActionAndConsequence
- type Builder
- type Consequence
- type InitState
- type TraceData
- type Traces
- func (t *Traces) Action() Action
- func (t *Traces) Actions() []ActionAndConsequence
- func (t *Traces) Consequence() Consequence
- 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 C = "consumer"
View Source
const P = "provider"
Variables ¶
This section is empty.
Functions ¶
func GetZeroState ¶
func GetZeroState(suite *suite.Suite, initState InitState) ( *ibctesting.Path, []sdk.ValAddress, int64, int64)
Types ¶
type ActionAndConsequence ¶
type ActionAndConsequence struct {
Action Action `json:"action"`
Consequence Consequence `json:"consequence"`
Ix int `json:"ix"`
}
type Consequence ¶
type Consequence 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 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
BlockSeconds time.Duration
ConsensusParams *abci.ConsensusParams
ValStates ValStates
MaxEntries int
}
type TraceData ¶
type TraceData struct {
Actions []ActionAndConsequence `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() []ActionAndConsequence
func (*Traces) Consequence ¶
func (t *Traces) Consequence() Consequence
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.