Skip to content

Commit

Permalink
Checkpoint pre refactor driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Nov 1, 2022
1 parent c72cd64 commit b8019ac
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
1 change: 1 addition & 0 deletions tests/difference/core/driver/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.log
debug.json
tracesDowntime.json
tracesNoDowntime.json
3 changes: 3 additions & 0 deletions tests/difference/core/driver/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package core
import (
"bytes"
"encoding/json"
"fmt"
"time"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down Expand Up @@ -785,5 +786,7 @@ func GetZeroState(suite *suite.Suite, initState InitState) (
heightLastCommitted := b.chain(P).CurrentHeader.Height - 1
// Time of the last committed block (current header is not committed)
timeLastCommitted := b.chain(P).CurrentHeader.Time.Add(-b.initState.BlockSeconds).Unix()
// TODO:
fmt.Println("id", b.providerKeeper().GetValidatorSetUpdateId(b.ctx(P)))
return b.path, b.valAddresses, heightLastCommitted, timeLastCommitted
}
37 changes: 19 additions & 18 deletions tests/difference/core/driver/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,25 @@ type ActionAndConsequence struct {
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"`
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"`
EnableDowntime bool `json:"ENABLE_DOWNTIME"`
EnableKeyAssignment bool `json:"ENABLE_KEY_ASSIGNMENT"`
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 {
Expand Down

0 comments on commit b8019ac

Please sign in to comment.