diff --git a/go.mod b/go.mod index 1f05100cd2..5f869f97db 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,7 @@ require ( github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -88,7 +88,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.5.9 github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect @@ -161,7 +161,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v0.5.5 sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/tests/e2e/README.md b/tests/e2e/README.md new file mode 100644 index 0000000000..ee9c962651 --- /dev/null +++ b/tests/e2e/README.md @@ -0,0 +1,13 @@ +## Updating the trace format and tests when adjusting the framework + +Some things in the test framework should stay consistent, in particular with respect to the trace format. +When adding or modifying actions, please follow these guidelines: +* Add a case for your action to `main.go` +* Add a case for your action to `json_utils.go/UnmarshalMapToActionType` +* Add a generator for your action to `action_rapid_test.go` and add the generator to `GetActionGen` + +If the chain state from `state.go` is modified, the `ChainStateWithProposalTypes` in `json_utils.go/MarshalJSON` should be updated. + +When adding a new proposal type: +* add a case for your proposal type to `json_utils.go/UnmarshalProposalWithType` +* add a generator for your proposal type in `state_rapid_test.go` and add it to the `GetProposalGen` function \ No newline at end of file diff --git a/tests/e2e/action_rapid_test.go b/tests/e2e/action_rapid_test.go new file mode 100644 index 0000000000..005f52610d --- /dev/null +++ b/tests/e2e/action_rapid_test.go @@ -0,0 +1,501 @@ +package main + +import ( + "encoding/json" + "fmt" + "testing" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "pgregory.net/rapid" +) + +// This file contains tests for serialization/deserialization of actions. +// The tests are written using the rapid testing library, which allows us to +// generate arbitrary actions and test that they can be serialized and +// deserialized without error. +// The generators for the various actions are defined in this file, and +// essentially tell rapid how to build these actions. + +func TestActionMarshalling(t *testing.T) { + rapid.Check(t, func(t *rapid.T) { + action := GetActionGen().Draw(t, "Action") + err := MarshalAndUnmarshalAction(action) + if err != nil { + t.Fatalf("error marshalling and unmarshalling action: %v", err) + } + }) +} + +func MarshalAndUnmarshalAction(action interface{}) error { + // wraps the action with a step, since it needs custom unmarshalling that is called by the step unmarshaller + step := Step{ + Action: action, + } + jsonobj, err := json.Marshal(step) + if err != nil { + return fmt.Errorf("error marshalling action inside step: %v", err) + } + + var got Step + err = json.Unmarshal(jsonobj, &got) + if err != nil { + return fmt.Errorf("error unmarshalling action inside step: %v", err) + } + + diff := cmp.Diff(step, got) + if diff != "" { + return fmt.Errorf("got (-), want (+): %v", diff) + } + + return nil +} + +// This needs to be adjusted manually when new actions are added and should +// include generators for all actions that are mentioned in main.go/runStep. +func GetActionGen() *rapid.Generator[any] { + return rapid.OneOf( + GetStartSovereignChainActionGen().AsAny(), + GetSubmitLegacyUpgradeProposalActionGen().AsAny(), + GetWaitUntilBlockActionGen().AsAny(), + GetChangeoverChainActionGen().AsAny(), + GetSendTokensActionGen().AsAny(), + GetStartChainActionGen().AsAny(), + GetSubmitTextProposalActionGen().AsAny(), + GetSubmitConsumerAdditionProposalActionGen().AsAny(), + GetSubmitConsumerRemovalProposalActionGen().AsAny(), + GetSubmitParamChangeProposalActionGen().AsAny(), + GetSubmitEquivocationProposalActionGen().AsAny(), + GetVoteGovProposalActionGen().AsAny(), + GetStartConsumerChainActionGen().AsAny(), + GetAddChainToRelayerActionGen().AsAny(), + GetAddIbcConnectionActionGen().AsAny(), + GetAddIbcChannelActionGen().AsAny(), + GetStartRelayerActionGen().AsAny(), + GetTransferChannelCompleteActionGen().AsAny(), + GetRelayPacketsActionGen().AsAny(), + GetRelayRewardPacketsToProviderActionGen().AsAny(), + GetDelegateTokensActionGen().AsAny(), + GetUnbondTokensActionGen().AsAny(), + GetRedelegateTokensActionGen().AsAny(), + GetDowntimeSlashActionGen().AsAny(), + GetUnjailValidatorActionGen().AsAny(), + GetRegisterRepresentativeActionGen().AsAny(), + GetDoublesignSlashActionGen().AsAny(), + GetAssignConsumerPubKeyActionGen().AsAny(), + GetSlashThrottleDequeueActionGen().AsAny(), + GetCreateIbcClientsActionGen().AsAny(), + CreateCancelUnbondTokensActionGen().AsAny(), + CreateLightClientEquivocationAttackActionGen().AsAny(), + CreateLightClientAmnesiaAttackActionGen().AsAny(), + CreateLightClientLunaticAttackActionGen().AsAny(), + ) +} + +func CreateSubmitChangeRewardDenomsProposalActionGen() *rapid.Generator[submitChangeRewardDenomsProposalAction] { + return rapid.Custom(func(t *rapid.T) submitChangeRewardDenomsProposalAction { + return submitChangeRewardDenomsProposalAction{ + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Denom: rapid.String().Draw(t, "Denom"), + } + }) +} + +func CreateLightClientEquivocationAttackActionGen() *rapid.Generator[lightClientEquivocationAttackAction] { + return rapid.Custom(func(t *rapid.T) lightClientEquivocationAttackAction { + return lightClientEquivocationAttackAction{ + Validator: GetValidatorIDGen().Draw(t, "Validator"), + Chain: GetChainIDGen().Draw(t, "Chain"), + } + }) +} + +func CreateLightClientAmnesiaAttackActionGen() *rapid.Generator[lightClientAmnesiaAttackAction] { + return rapid.Custom(func(t *rapid.T) lightClientAmnesiaAttackAction { + return lightClientAmnesiaAttackAction{ + Validator: GetValidatorIDGen().Draw(t, "Validator"), + Chain: GetChainIDGen().Draw(t, "Chain"), + } + }) +} + +func CreateLightClientLunaticAttackActionGen() *rapid.Generator[lightClientLunaticAttackAction] { + return rapid.Custom(func(t *rapid.T) lightClientLunaticAttackAction { + return lightClientLunaticAttackAction{ + Validator: GetValidatorIDGen().Draw(t, "Validator"), + Chain: GetChainIDGen().Draw(t, "Chain"), + } + }) +} + +func CreateCancelUnbondTokensActionGen() *rapid.Generator[cancelUnbondTokensAction] { + return rapid.Custom(func(t *rapid.T) cancelUnbondTokensAction { + return cancelUnbondTokensAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Amount: rapid.Uint().Draw(t, "Amount"), + Delegator: GetValidatorIDGen().Draw(t, "Delegator"), + Validator: GetValidatorIDGen().Draw(t, "Validator"), + } + }) +} + +func GetCreateIbcClientsActionGen() *rapid.Generator[createIbcClientsAction] { + return rapid.Custom(func(t *rapid.T) createIbcClientsAction { + return createIbcClientsAction{ + ChainA: GetChainIDGen().Draw(t, "ChainA"), + ChainB: GetChainIDGen().Draw(t, "ChainB"), + } + }) +} + +func GetStartSovereignChainActionGen() *rapid.Generator[StartSovereignChainAction] { + return rapid.Custom(func(t *rapid.T) StartSovereignChainAction { + return StartSovereignChainAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validators: GetStartChainValidatorsGen().Draw(t, "Validators"), + GenesisChanges: rapid.String().Draw(t, "GenesisChanges"), + } + }) +} + +func GetSubmitLegacyUpgradeProposalActionGen() *rapid.Generator[LegacyUpgradeProposalAction] { + return rapid.Custom(func(t *rapid.T) LegacyUpgradeProposalAction { + return LegacyUpgradeProposalAction{ + ChainID: GetChainIDGen().Draw(t, "ChainID"), + UpgradeTitle: rapid.String().Draw(t, "UpgradeTitle"), + Proposer: GetValidatorIDGen().Draw(t, "Proposer"), + UpgradeHeight: rapid.Uint64().Draw(t, "UpgradeHeight"), + } + }) +} + +func GetWaitUntilBlockActionGen() *rapid.Generator[waitUntilBlockAction] { + return rapid.Custom(func(t *rapid.T) waitUntilBlockAction { + return waitUntilBlockAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Block: rapid.Uint().Draw(t, "Block"), + } + }) +} + +func GetChangeoverChainActionGen() *rapid.Generator[ChangeoverChainAction] { + return rapid.Custom(func(t *rapid.T) ChangeoverChainAction { + return ChangeoverChainAction{ + SovereignChain: GetChainIDGen().Draw(t, "SovereignChain"), + ProviderChain: GetChainIDGen().Draw(t, "ProviderChain"), + Validators: GetStartChainValidatorsGen().Draw(t, "Validators"), + GenesisChanges: rapid.String().Draw(t, "GenesisChanges"), + } + }) +} + +func GetSendTokensActionGen() *rapid.Generator[SendTokensAction] { + return rapid.Custom(func(t *rapid.T) SendTokensAction { + return SendTokensAction{ + Amount: rapid.Uint().Draw(t, "Amount"), + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + To: GetValidatorIDGen().Draw(t, "To"), + } + }) +} + +func GetStartChainActionGen() *rapid.Generator[StartChainAction] { + return rapid.Custom(func(t *rapid.T) StartChainAction { + return StartChainAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validators: GetStartChainValidatorsGen().Draw(t, "Validators"), + GenesisChanges: rapid.String().Draw(t, "GenesisChanges"), + SkipGentx: rapid.Bool().Draw(t, "SkipGentx"), + } + }) +} + +func GetStartChainValidatorsGen() *rapid.Generator[[]StartChainValidator] { + return rapid.Custom(func(t *rapid.T) []StartChainValidator { + return rapid.SliceOf(GetStartChainValidatorGen()).Draw(t, "StartChainValidators") + }) +} + +func GetStartChainValidatorGen() *rapid.Generator[StartChainValidator] { + return rapid.Custom(func(t *rapid.T) StartChainValidator { + return StartChainValidator{ + Id: GetValidatorIDGen().Draw(t, "Id"), + Allocation: rapid.Uint().Draw(t, "Allocation"), + Stake: rapid.Uint().Draw(t, "Stake"), + } + }) +} + +func GetSubmitTextProposalActionGen() *rapid.Generator[submitTextProposalAction] { + return rapid.Custom(func(t *rapid.T) submitTextProposalAction { + return submitTextProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Title: rapid.String().Draw(t, "Title"), + Description: rapid.String().Draw(t, "Description"), + } + }) +} + +func GetSubmitConsumerAdditionProposalActionGen() *rapid.Generator[submitConsumerAdditionProposalAction] { + return rapid.Custom(func(t *rapid.T) submitConsumerAdditionProposalAction { + return submitConsumerAdditionProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + ConsumerChain: GetChainIDGen().Draw(t, "ConsumerChain"), + SpawnTime: rapid.Uint().Draw(t, "SpawnTime"), + InitialHeight: GetHeightGen().Draw(t, "InitialHeight"), + } + }) +} + +func GetSubmitConsumerRemovalProposalActionGen() *rapid.Generator[submitConsumerRemovalProposalAction] { + return rapid.Custom(func(t *rapid.T) submitConsumerRemovalProposalAction { + return submitConsumerRemovalProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + ConsumerChain: GetChainIDGen().Draw(t, "ConsumerChain"), + StopTimeOffset: time.Duration(rapid.Int64().Draw(t, "StopTimeOffset")), + } + }) +} + +func GetSubmitParamChangeProposalActionGen() *rapid.Generator[submitParamChangeLegacyProposalAction] { + return rapid.Custom(func(t *rapid.T) submitParamChangeLegacyProposalAction { + return submitParamChangeLegacyProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Subspace: rapid.String().Draw(t, "Subspace"), + Key: rapid.String().Draw(t, "Key"), + Value: rapid.String().Draw(t, "Value"), // could make this more generic in the future, since Value takes interfaces + } + }) +} + +func GetSubmitEquivocationProposalActionGen() *rapid.Generator[submitEquivocationProposalAction] { + return rapid.Custom(func(t *rapid.T) submitEquivocationProposalAction { + return submitEquivocationProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: GetValidatorIDGen().Draw(t, "From"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Height: rapid.Int64().Draw(t, "Height"), + Time: GetTimeGen().Draw(t, "Time"), + Power: rapid.Int64().Draw(t, "Power"), + } + }) +} + +func TestMarshalAndUnmarshalTime(t *testing.T) { + rapid.Check(t, func(t *rapid.T) { + time1 := GetTimeGen().Draw(t, "time") + data, err := time1.MarshalJSON() + require.NoError(t, err) + var time2 time.Time + err = time2.UnmarshalJSON(data) + require.NoError(t, err) + require.True(t, time1.Equal(time2)) + }) +} + +func GetTimeGen() *rapid.Generator[time.Time] { + return rapid.Custom(func(t *rapid.T) time.Time { + return time.Unix(rapid.Int64Range(-5.9959e+10, 1.5779e+11).Draw(t, "unix time"), 0).UTC() + }) +} + +func GetVoteGovProposalActionGen() *rapid.Generator[voteGovProposalAction] { + return rapid.Custom(func(t *rapid.T) voteGovProposalAction { + return voteGovProposalAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + From: rapid.SliceOf(GetValidatorIDGen()).Draw(t, "From"), + Vote: rapid.SliceOf(rapid.String()).Draw(t, "Vote"), + PropNumber: rapid.Uint().Draw(t, "PropNumber"), + } + }) +} + +func GetStartConsumerChainActionGen() *rapid.Generator[startConsumerChainAction] { + return rapid.Custom(func(t *rapid.T) startConsumerChainAction { + return startConsumerChainAction{ + ConsumerChain: GetChainIDGen().Draw(t, "ConsumerChain"), + ProviderChain: GetChainIDGen().Draw(t, "ProviderChain"), + Validators: GetStartChainValidatorsGen().Draw(t, "Validators"), + GenesisChanges: rapid.String().Draw(t, "GenesisChanges"), + } + }) +} + +func GetAddChainToRelayerActionGen() *rapid.Generator[addChainToRelayerAction] { + return rapid.Custom(func(t *rapid.T) addChainToRelayerAction { + return addChainToRelayerAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validator: GetValidatorIDGen().Draw(t, "Validator"), + } + }) +} + +func GetAddIbcConnectionActionGen() *rapid.Generator[addIbcConnectionAction] { + return rapid.Custom(func(t *rapid.T) addIbcConnectionAction { + return addIbcConnectionAction{ + ChainA: GetChainIDGen().Draw(t, "ChainA"), + ChainB: GetChainIDGen().Draw(t, "ChainB"), + ClientA: rapid.Uint().Draw(t, "ClientA"), + ClientB: rapid.Uint().Draw(t, "ClientB"), + } + }) +} + +func GetAddIbcChannelActionGen() *rapid.Generator[addIbcChannelAction] { + return rapid.Custom(func(t *rapid.T) addIbcChannelAction { + return addIbcChannelAction{ + ChainA: GetChainIDGen().Draw(t, "ChainA"), + ChainB: GetChainIDGen().Draw(t, "ChainB"), + ConnectionA: rapid.Uint().Draw(t, "ConnectionA"), + PortA: rapid.String().Draw(t, "PortA"), + PortB: rapid.String().Draw(t, "PortB"), + Order: rapid.String().Draw(t, "Order"), + } + }) +} + +func GetStartRelayerActionGen() *rapid.Generator[startRelayerAction] { + return rapid.Just(startRelayerAction{}) +} + +func GetTransferChannelCompleteActionGen() *rapid.Generator[transferChannelCompleteAction] { + return rapid.Custom(func(t *rapid.T) transferChannelCompleteAction { + return transferChannelCompleteAction{ + ChainA: GetChainIDGen().Draw(t, "ChainA"), + ChainB: GetChainIDGen().Draw(t, "ChainB"), + ConnectionA: rapid.Uint().Draw(t, "ConnectionA"), + PortA: rapid.String().Draw(t, "PortA"), + PortB: rapid.String().Draw(t, "PortB"), + Order: rapid.String().Draw(t, "Order"), + ChannelA: rapid.Uint().Draw(t, "ChannelA"), + ChannelB: rapid.Uint().Draw(t, "ChannelB"), + } + }) +} + +func GetRelayPacketsActionGen() *rapid.Generator[relayPacketsAction] { + return rapid.Custom(func(t *rapid.T) relayPacketsAction { + return relayPacketsAction{ + ChainA: GetChainIDGen().Draw(t, "Chain"), + ChainB: GetChainIDGen().Draw(t, "Chain"), + Port: rapid.String().Draw(t, "Port"), + Channel: rapid.Uint().Draw(t, "Channel"), + } + }) +} + +func GetRelayRewardPacketsToProviderActionGen() *rapid.Generator[relayRewardPacketsToProviderAction] { + return rapid.Custom(func(t *rapid.T) relayRewardPacketsToProviderAction { + return relayRewardPacketsToProviderAction{ + ConsumerChain: GetChainIDGen().Draw(t, "ConsumerChain"), + ProviderChain: GetChainIDGen().Draw(t, "ProviderChain"), + Port: rapid.String().Draw(t, "Port"), + Channel: rapid.Uint().Draw(t, "Channel"), + } + }) +} + +func GetDelegateTokensActionGen() *rapid.Generator[delegateTokensAction] { + return rapid.Custom(func(t *rapid.T) delegateTokensAction { + return delegateTokensAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Amount: rapid.Uint().Draw(t, "Amount"), + From: GetValidatorIDGen().Draw(t, "From"), + To: GetValidatorIDGen().Draw(t, "To"), + } + }) +} + +func GetUnbondTokensActionGen() *rapid.Generator[unbondTokensAction] { + return rapid.Custom(func(t *rapid.T) unbondTokensAction { + return unbondTokensAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Amount: rapid.Uint().Draw(t, "Amount"), + Sender: GetValidatorIDGen().Draw(t, "Sender"), + UnbondFrom: GetValidatorIDGen().Draw(t, "UnbondFrom"), + } + }) +} + +func GetRedelegateTokensActionGen() *rapid.Generator[redelegateTokensAction] { + return rapid.Custom(func(t *rapid.T) redelegateTokensAction { + return redelegateTokensAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Amount: rapid.Uint().Draw(t, "Amount"), + Src: GetValidatorIDGen().Draw(t, "Src"), + Dst: GetValidatorIDGen().Draw(t, "Dst"), + TxSender: GetValidatorIDGen().Draw(t, "TxSender"), + } + }) +} + +func GetDowntimeSlashActionGen() *rapid.Generator[downtimeSlashAction] { + return rapid.Custom(func(t *rapid.T) downtimeSlashAction { + return downtimeSlashAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validator: GetValidatorIDGen().Draw(t, "Validator"), + } + }) +} + +func GetUnjailValidatorActionGen() *rapid.Generator[unjailValidatorAction] { + return rapid.Custom(func(t *rapid.T) unjailValidatorAction { + return unjailValidatorAction{ + Validator: GetValidatorIDGen().Draw(t, "Validator"), + Provider: GetChainIDGen().Draw(t, "Provider"), + } + }) +} + +func GetRegisterRepresentativeActionGen() *rapid.Generator[registerRepresentativeAction] { + return rapid.Custom(func(t *rapid.T) registerRepresentativeAction { + return registerRepresentativeAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Representatives: rapid.SliceOf(GetValidatorIDGen()).Draw(t, "Representatives"), + Stakes: rapid.SliceOf(rapid.Uint()).Draw(t, "Stakes"), + } + }) +} + +func GetDoublesignSlashActionGen() *rapid.Generator[doublesignSlashAction] { + return rapid.Custom(func(t *rapid.T) doublesignSlashAction { + return doublesignSlashAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validator: GetValidatorIDGen().Draw(t, "Validator"), + } + }) +} + +func GetAssignConsumerPubKeyActionGen() *rapid.Generator[assignConsumerPubKeyAction] { + return rapid.Custom(func(t *rapid.T) assignConsumerPubKeyAction { + return assignConsumerPubKeyAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + Validator: GetValidatorIDGen().Draw(t, "Validator"), + ConsumerPubkey: rapid.String().Draw(t, "ConsumerPubkey"), + ReconfigureNode: rapid.Bool().Draw(t, "ReconfigureNode"), + ExpectError: rapid.Bool().Draw(t, "ExpectError"), + } + }) +} + +func GetSlashThrottleDequeueActionGen() *rapid.Generator[slashThrottleDequeueAction] { + return rapid.Custom(func(t *rapid.T) slashThrottleDequeueAction { + return slashThrottleDequeueAction{ + Chain: GetChainIDGen().Draw(t, "Chain"), + CurrentQueueSize: rapid.Int().Draw(t, "CurrentQueueSize"), + NextQueueSize: rapid.Int().Draw(t, "NextQueueSize"), + Timeout: time.Duration(rapid.Int().Draw(t, "Timeout")) * time.Millisecond, + } + }) +} diff --git a/tests/e2e/actions.go b/tests/e2e/actions.go index 36e0c47dd2..408c9066fc 100644 --- a/tests/e2e/actions.go +++ b/tests/e2e/actions.go @@ -2045,8 +2045,8 @@ func (tr TestRun) assignConsumerPubKey(action assignConsumerPubKeyAction, verbos tr.waitBlocks(ChainID("provi"), 2, 30*time.Second) } -// slashThrottleDequeue polls slash queue sizes until nextQueueSize is achieved -type slashThrottleDequeue struct { +// slashThrottleDequeueAction polls slash queue sizes until nextQueueSize is achieved +type slashThrottleDequeueAction struct { Chain ChainID CurrentQueueSize int NextQueueSize int @@ -2055,7 +2055,7 @@ type slashThrottleDequeue struct { } func (tr TestRun) waitForSlashThrottleDequeue( - action slashThrottleDequeue, + action slashThrottleDequeueAction, verbose bool, ) { timeout := time.Now().Add(action.Timeout) @@ -2077,7 +2077,7 @@ func (tr TestRun) waitForSlashThrottleDequeue( } if time.Now().After(timeout) { - panic(fmt.Sprintf("\n\n\nwaitForSlashThrottleDequeuemethod has timed out after: %s\n\n", action.Timeout)) + panic(fmt.Sprintf("\n\n\nwaitForSlashThrottleDequeue method has timed out after: %s\n\n", action.Timeout)) } time.Sleep(500 * time.Millisecond) diff --git a/tests/e2e/json_marshal_test.go b/tests/e2e/json_marshal_test.go new file mode 100644 index 0000000000..5ee91dcb66 --- /dev/null +++ b/tests/e2e/json_marshal_test.go @@ -0,0 +1,189 @@ +package main + +import ( + "encoding/json" + "reflect" + "strings" + "testing" + + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/davecgh/go-spew/spew" +) + +func TestProposalUnmarshal(t *testing.T) { + proposalAndTypeString := `{ + "Type": "main.ConsumerAdditionProposal", + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + } + }` + + expectedProposal := ConsumerAdditionProposal{ + Deposit: 10000001, + Chain: ChainID("consu"), + SpawnTime: 0, + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + Status: "PROPOSAL_STATUS_PASSED", + } + + type ProposalAndType struct { + RawProposal json.RawMessage + Type string + } + + propAndType := &ProposalAndType{} + err := json.Unmarshal([]byte(proposalAndTypeString), propAndType) + if err != nil { + t.Errorf("Unexpected error while unmarshalling: %v", err) + } + + actualProposal, err := UnmarshalProposalWithType(propAndType.RawProposal, propAndType.Type) + if err != nil { + t.Errorf("Unexpected error while unmarshalling\n error: %v\n Raw proposal: %v\n Type: %v", err, spew.Sdump(propAndType.RawProposal), propAndType.Type) + } + + if !reflect.DeepEqual(actualProposal, expectedProposal) { + t.Errorf("Expected proposal: %v, but got: %v", spew.Sdump(expectedProposal), spew.Sdump(actualProposal)) + } +} + +type ChainStateTestCase struct { + name string + jsonBytes []byte + chainState ChainState + expectedUnmarshalErrorText string +} + +var testCases = []ChainStateTestCase{ + { + name: "valid JSON with proposals", + jsonBytes: []byte(`{ + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "Proposals": { + "1": { + "Type": "main.ConsumerAdditionProposal", + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + } + } + } + }`), + chainState: ChainState{ + ValBalances: &map[ValidatorID]uint{ + ValidatorID("alice"): 9500000000, + ValidatorID("bob"): 9500000000, + ValidatorID("carol"): 9500000000, + }, + Proposals: &map[uint]Proposal{ + 1: ConsumerAdditionProposal{ + Deposit: 10000001, + Chain: ChainID("consu"), + SpawnTime: 0, + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + Status: "PROPOSAL_STATUS_PASSED", + }, + }, + }, + expectedUnmarshalErrorText: "", + }, + { + name: "invalid JSON", + jsonBytes: []byte(`thisisnotagoodjsonstring`), + expectedUnmarshalErrorText: "invalid json", + }, + { + name: "unknown proposal type", + jsonBytes: []byte(`{ + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "Proposals": { + "1": { + "Type": "main.NotAProposalTypeProposal", + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + } + } + }, + }`), + expectedUnmarshalErrorText: "not a known proposal type", + }, +} + +func TestUnmarshalJSON(t *testing.T) { + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + var result ChainState + err := result.UnmarshalJSON(tc.jsonBytes) + if err != nil && tc.expectedUnmarshalErrorText == "" { + t.Errorf("Test case %v: Unexpected error: %v", tc.name, err) + } + + if err == nil && tc.expectedUnmarshalErrorText != "" { + t.Errorf("Test case %v: Expected error to contain: %v, but got no error", tc.name, tc.expectedUnmarshalErrorText) + } + + if err != nil && tc.expectedUnmarshalErrorText != "" && strings.Contains(err.Error(), tc.expectedUnmarshalErrorText) { + t.Errorf("Test case %v: Expected error to contain: %v, but got: %v", tc.name, tc.expectedUnmarshalErrorText, err) + } + + if !reflect.DeepEqual(result, tc.chainState) { + t.Errorf("Test case %v: Expected ChainState: %v, but got: %v", tc.name, tc.chainState, result) + } + }) + } +} + +func TestMarshalJSON(t *testing.T) { + // checks that marshalling and unmarshalling is the identity + // would optimally check that the marshalled JSON is the same as the expected JSON, + // but the marshalled JSON will specifically list null fields + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result, err := tc.chainState.MarshalJSON() + if err != nil { + t.Errorf("Test case %v: Unexpected error while marshalling: %v", tc.name, err) + } + + if tc.expectedUnmarshalErrorText != "" { + // unmarshalling to compare does not make sense, since we expect it to + // fail, so just test that marshalling works and continue + return + } + + unmarshalledResult := ChainState{} + err = unmarshalledResult.UnmarshalJSON(result) + if err != nil { + t.Errorf("Test case %v: Unexpected error while unmarshalling: %v", tc.name, err) + } + + if !reflect.DeepEqual(unmarshalledResult, tc.chainState) { + t.Errorf("Test case %v: Expected: %v, but got: %v", tc.name, string(tc.jsonBytes), string(result)) + } + }) + } +} diff --git a/tests/e2e/json_parser.go b/tests/e2e/json_parser.go new file mode 100644 index 0000000000..3f85a23e30 --- /dev/null +++ b/tests/e2e/json_parser.go @@ -0,0 +1,35 @@ +package main + +import ( + "encoding/json" + "os" + "path/filepath" +) + +// TraceParser provides an interface for parsers that read sequences of Steps from files. +type TraceParser interface { + ReadTraceFromFile(filepath string) ([]Step, error) +} + +// JSONParser is a simple parser that reads steps by unmarshalling from a file. +type JSONParser struct{} + +var GlobalJSONParser = JSONParser{} + +func (parser JSONParser) ReadTraceFromFile(path string) ([]Step, error) { + // Open the JSON file and read into a byte array + jsonData, err := os.ReadFile(filepath.Clean(path)) + if err != nil { + return nil, err + } + + // Unmarshal the JSON into a slice of Step structs + var steps []Step + + err = json.Unmarshal(jsonData, &steps) + if err != nil { + return nil, err + } + + return steps, nil +} diff --git a/tests/e2e/json_utils.go b/tests/e2e/json_utils.go new file mode 100644 index 0000000000..692c34a14f --- /dev/null +++ b/tests/e2e/json_utils.go @@ -0,0 +1,374 @@ +package main + +import ( + "encoding/json" + "fmt" + "reflect" +) + +// stores a proposal as a raw json, together with its type +type ProposalAndType struct { + RawProposal json.RawMessage + Type string +} + +type ( + // to have a ChainState object that does not have the overridden Marshal/Unmarshal method + ChainStateCopy ChainState + + // duplicated from the ChainState with a minor change to the Proposals field + ChainStateWithProposalTypes struct { + ChainStateCopy + Proposals *map[uint]ProposalAndType // the only thing changed from the real ChainState + } +) + +// MarshalJSON marshals a step into JSON while including the type of the action. +func (step Step) MarshalJSON() ([]byte, error) { + actionType := reflect.TypeOf(step.Action) + + result := struct { + ActionType string + Action interface{} + State State + }{ + ActionType: actionType.String(), + Action: step.Action, + State: step.State, + } + + return json.Marshal(result) +} + +// UnmarshalJSON unmarshals a step from JSON while including the type of the action. +func (step *Step) UnmarshalJSON(data []byte) error { + var tmp struct { + ActionType string + Action json.RawMessage + State State + } + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + + action, err := UnmarshalMapToActionType(tmp.Action, tmp.ActionType) + if err != nil { + return err + } + + step.Action = action + step.State = tmp.State + return nil +} + +// UnmarshalMapToActionType takes a JSON object and an action type and marshals into an object of the corresponding action. +func UnmarshalMapToActionType(rawAction json.RawMessage, actionTypeString string) (interface{}, error) { + var err error + switch actionTypeString { + case "main.submitConsumerAdditionProposalAction": + var a submitConsumerAdditionProposalAction + err = json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.SendTokensAction": + var a SendTokensAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.StartChainAction": + var a StartChainAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.submitTextProposalAction": + var a submitTextProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.submitConsumerRemovalProposalAction": + var a submitConsumerRemovalProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.submitEquivocationProposalAction": + var a submitEquivocationProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.submitParamChangeLegacyProposalAction": + var a submitParamChangeLegacyProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.voteGovProposalAction": + var a voteGovProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.startConsumerChainAction": + var a startConsumerChainAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.addChainToRelayerAction": + var a addChainToRelayerAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.addIbcConnectionAction": + var a addIbcConnectionAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.addIbcChannelAction": + var a addIbcChannelAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.transferChannelCompleteAction": + var a transferChannelCompleteAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.unjailValidatorAction": + var a unjailValidatorAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.assignConsumerPubKeyAction": + var a assignConsumerPubKeyAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.delegateTokensAction": + var a delegateTokensAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.relayPacketsAction": + var a relayPacketsAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.registerRepresentativeAction": + var a registerRepresentativeAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.relayRewardPacketsToProviderAction": + var a relayRewardPacketsToProviderAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.submitChangeRewardDenomsProposalAction": + var a submitChangeRewardDenomsProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.downtimeSlashAction": + var a downtimeSlashAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.unbondTokensAction": + var a unbondTokensAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.cancelUnbondTokensAction": + var a cancelUnbondTokensAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.redelegateTokensAction": + var a redelegateTokensAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.doublesignSlashAction": + var a doublesignSlashAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.startRelayerAction": + var a startRelayerAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.slashThrottleDequeueAction": + var a slashThrottleDequeueAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.createIbcClientsAction": + var a createIbcClientsAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.LegacyUpgradeProposalAction": + var a LegacyUpgradeProposalAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.waitUntilBlockAction": + var a waitUntilBlockAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.ChangeoverChainAction": + var a ChangeoverChainAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.StartSovereignChainAction": + var a StartSovereignChainAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.lightClientEquivocationAttackAction": + var a lightClientEquivocationAttackAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.lightClientAmnesiaAttackAction": + var a lightClientAmnesiaAttackAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + case "main.lightClientLunaticAttackAction": + var a lightClientLunaticAttackAction + err := json.Unmarshal(rawAction, &a) + if err == nil { + return a, nil + } + default: + return nil, fmt.Errorf("unknown action type: %s", actionTypeString) + } + return nil, err +} + +// custom marshal and unmarshal functions for the chainstate that convert proposals to/from the auxiliary type with type info + +// MarshalJSON transforms the ChainState into a ChainStateWithProposalTypes by adding type info to the proposals +func (c ChainState) MarshalJSON() ([]byte, error) { + chainStateCopy := ChainStateCopy(c) + chainStateWithProposalTypes := ChainStateWithProposalTypes{chainStateCopy, nil} + if c.Proposals != nil { + proposalsWithTypes := make(map[uint]ProposalAndType) + for k, v := range *c.Proposals { + rawMessage, err := json.Marshal(v) + if err != nil { + return nil, err + } + proposalsWithTypes[k] = ProposalAndType{rawMessage, reflect.TypeOf(v).String()} + } + chainStateWithProposalTypes.Proposals = &proposalsWithTypes + } + return json.Marshal(chainStateWithProposalTypes) +} + +// UnmarshalJSON unmarshals the ChainStateWithProposalTypes into a ChainState by removing the type info from the proposals and getting back standard proposals +func (c *ChainState) UnmarshalJSON(data []byte) error { + chainStateWithProposalTypes := ChainStateWithProposalTypes{} + err := json.Unmarshal(data, &chainStateWithProposalTypes) + if err != nil { + return err + } + + chainState := ChainState(chainStateWithProposalTypes.ChainStateCopy) + *c = chainState + + if chainStateWithProposalTypes.Proposals != nil { + proposals := make(map[uint]Proposal) + for k, v := range *chainStateWithProposalTypes.Proposals { + proposal, err := UnmarshalProposalWithType(v.RawProposal, v.Type) + if err != nil { + return err + } + proposals[k] = proposal + } + c.Proposals = &proposals + } + return nil +} + +// UnmarshalProposalWithType takes a JSON object and a proposal type and marshals into an object of the corresponding proposal. +func UnmarshalProposalWithType(inputMap json.RawMessage, proposalType string) (Proposal, error) { + var err error + switch proposalType { + case "main.TextProposal": + prop := TextProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + case "main.ConsumerAdditionProposal": + prop := ConsumerAdditionProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + case "main.UpgradeProposal": + prop := UpgradeProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + case "main.ConsumerRemovalProposal": + prop := ConsumerRemovalProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + case "main.EquivocationProposal": + prop := EquivocationProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + case "main.ParamsProposal": + prop := ParamsProposal{} + err := json.Unmarshal(inputMap, &prop) + if err == nil { + return prop, nil + } + default: + return nil, fmt.Errorf("%s is not a known proposal type", proposalType) + } + + return nil, err +} diff --git a/tests/e2e/json_writer.go b/tests/e2e/json_writer.go new file mode 100644 index 0000000000..ea56d779dd --- /dev/null +++ b/tests/e2e/json_writer.go @@ -0,0 +1,28 @@ +package main + +import ( + "encoding/json" + "os" +) + +// TraceWriter is an interface for writers that write steps to files. +type TraceWriter interface { + // WriteTraceToFile writes a given trace to a file, overwriting the file if it already exists. + WriteTraceToFile(filepath string, trace []Step) error +} + +// JSONWriter is a simple writer that marshals the array of Step objects. +// To identify which type of action is being used, we add a field to the Step struct. +type JSONWriter struct{} + +var GlobalJSONWriter = JSONWriter{} + +func (writer JSONWriter) WriteTraceToFile(filepath string, trace []Step) error { + jsonobj, err := json.MarshalIndent(trace, "", " ") + if err != nil { + panic(err) + } + + err = os.WriteFile(filepath, jsonobj, 0o600) + return err +} diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 0a376664a0..d24f42676a 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -254,7 +254,7 @@ func (tr *TestRun) runStep(step Step, verbose bool) { tr.registerRepresentative(action, verbose) case assignConsumerPubKeyAction: tr.assignConsumerPubKey(action, verbose) - case slashThrottleDequeue: + case slashThrottleDequeueAction: tr.waitForSlashThrottleDequeue(action, verbose) case startRelayerAction: tr.startRelayer(action, verbose) diff --git a/tests/e2e/state_rapid_test.go b/tests/e2e/state_rapid_test.go new file mode 100644 index 0000000000..6c82c2e7fb --- /dev/null +++ b/tests/e2e/state_rapid_test.go @@ -0,0 +1,250 @@ +package main + +import ( + "testing" + + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "pgregory.net/rapid" +) + +// This file contains tests for serialization/deserialization of state. +// The tests are written using the rapid testing library, which allows us to +// generate arbitrary state structs and test that they can be serialized and +// deserialized without error. +// The generators for the various parts of the state are defined in this file, and +// essentially tell rapid how to build the state. + +func TestChainStateMarshalling(t *testing.T) { + rapid.Check(t, func(t *rapid.T) { + chainState := GetChainStateGen().Draw(t, "ChainState") + err := MarshalAndUnmarshalChainState(chainState) + if err != nil { + t.Fatalf("error marshalling and unmarshalling chain state: %v", err) + } + }) +} + +// Below this are utility functions for Rapid that define generators for the various structs that can appear in testing. +// These are used in the rapid tests and generate arbitrary test traces for fuzzing. +// These traces will not in general be useful to execute as e2e tests, since they are filled with essentially completely random values. +func GetStateGen() *rapid.Generator[State] { + return rapid.Custom(func(t *rapid.T) State { + return rapid.MapOf(GetChainIDGen(), GetChainStateGen()).Draw(t, "State") + }) +} + +func GetChainStateGen() *rapid.Generator[ChainState] { + return rapid.Custom( + func(t *rapid.T) ChainState { + valBalances := GetValBalancesGen().Draw(t, "ValBalances") + proposals := GetProposalsGen().Draw(t, "Proposals") + valPowers := GetValPowersGen().Draw(t, "ValPowers") + representativePowers := GetRepresentativePowersGen().Draw(t, "RepresentativePowers") + params := GetParamsGen().Draw(t, "Params") + rewards := GetRewardsGen().Draw(t, "Rewards") + consumerChains := GetConsumerChainsGen().Draw(t, "ConsumerChains") + assignedKeys := GetAssignedKeysGen().Draw(t, "AssignedKeys") + providerKeys := GetProviderKeysGen().Draw(t, "ProviderKeys") + consumerChainQueueSizes := GetConsumerChainQueueSizesGen().Draw(t, "ConsumerChainQueueSizes") + globalSlashQueueSize := rapid.Uint().Draw(t, "GlobalSlashQueueSize") + registeredConsumerRewardDenoms := GetRegisteredConsumerRewardDenomsGen().Draw(t, "RegisteredConsumerRewardDenoms") + + return ChainState{ + ValBalances: &valBalances, + Proposals: &proposals, + ValPowers: &valPowers, + RepresentativePowers: &representativePowers, + Params: ¶ms, + Rewards: &rewards, + ConsumerChains: &consumerChains, + AssignedKeys: &assignedKeys, + ProviderKeys: &providerKeys, + ConsumerChainQueueSizes: &consumerChainQueueSizes, + GlobalSlashQueueSize: &globalSlashQueueSize, + RegisteredConsumerRewardDenoms: ®isteredConsumerRewardDenoms, + } + }) +} + +func GetRegisteredConsumerRewardDenomsGen() *rapid.Generator[[]string] { + return rapid.Custom(func(t *rapid.T) []string { + return rapid.SliceOf(rapid.String()).Draw(t, "RegisteredConsumerRewardDenoms") + }) +} + +func GetConsumerChainQueueSizesGen() *rapid.Generator[map[ChainID]uint] { + return rapid.Custom(func(t *rapid.T) map[ChainID]uint { + return rapid.MapOf(GetChainIDGen(), rapid.Uint()).Draw(t, "ConsumerChainQueueSizes") + }) +} + +func GetProviderKeysGen() *rapid.Generator[map[ValidatorID]string] { + return rapid.Custom(func(t *rapid.T) map[ValidatorID]string { + return rapid.MapOf(GetValidatorIDGen(), rapid.String()).Draw(t, "ProviderKeys") + }) +} + +func GetAssignedKeysGen() *rapid.Generator[map[ValidatorID]string] { + return rapid.Custom(func(t *rapid.T) map[ValidatorID]string { + return rapid.MapOf(GetValidatorIDGen(), rapid.String()).Draw(t, "AssignedKeys") + }) +} + +func GetChainIDGen() *rapid.Generator[ChainID] { + return rapid.Custom(func(t *rapid.T) ChainID { + return ChainID(rapid.String().Draw(t, "ChainID")) + }) +} + +func GetConsumerChainsGen() *rapid.Generator[map[ChainID]bool] { + return rapid.Custom(func(t *rapid.T) map[ChainID]bool { + return rapid.MapOf(GetChainIDGen(), rapid.Bool()).Draw(t, "ConsumerChains") + }) +} + +func GetRewardsGen() *rapid.Generator[Rewards] { + return rapid.Custom(func(t *rapid.T) Rewards { + return Rewards{ + IsIncrementalReward: rapid.Bool().Draw(t, "IsIncrementalReward"), + IsNativeDenom: rapid.Bool().Draw(t, "IsNativeDenom"), + IsRewarded: rapid.MapOf(GetValidatorIDGen(), rapid.Bool()).Draw(t, "IsRewarded"), + } + }) +} + +func GetParamsGen() *rapid.Generator[[]Param] { + return rapid.Custom(func(t *rapid.T) []Param { + return rapid.SliceOf(GetParamGen()).Draw(t, "Params") + }) +} + +func GetParamGen() *rapid.Generator[Param] { + return rapid.Custom(func(t *rapid.T) Param { + return Param{ + Key: rapid.String().Draw(t, "Key"), + Value: rapid.String().Draw(t, "Value"), + } + }) +} + +func GetRepresentativePowersGen() *rapid.Generator[map[ValidatorID]uint] { + return rapid.Custom(func(t *rapid.T) map[ValidatorID]uint { + return rapid.MapOf( + GetValidatorIDGen(), + rapid.Uint(), + ).Draw(t, "RepresentativePowers") + }) +} + +func GetValPowersGen() *rapid.Generator[map[ValidatorID]uint] { + return rapid.Custom(func(t *rapid.T) map[ValidatorID]uint { + return rapid.MapOf( + GetValidatorIDGen(), + rapid.Uint(), + ).Draw(t, "ValPowers") + }) +} + +func GetValBalancesGen() *rapid.Generator[map[ValidatorID]uint] { + return rapid.Custom(func(t *rapid.T) map[ValidatorID]uint { + return rapid.MapOf( + GetValidatorIDGen(), + rapid.Uint(), + ).Draw(t, "ValBalances") + }) +} + +func GetValidatorIDGen() *rapid.Generator[ValidatorID] { + return rapid.Custom(func(t *rapid.T) ValidatorID { + return ValidatorID(rapid.String().Draw(t, "ValidatorID")) + }) +} + +func GetProposalsGen() *rapid.Generator[map[uint]Proposal] { + return rapid.Custom(func(t *rapid.T) map[uint]Proposal { + return rapid.MapOf( + rapid.Uint(), + GetProposalGen(), + ).Draw(t, "Proposals") + }) +} + +func GetProposalGen() *rapid.Generator[Proposal] { + return rapid.Custom(func(t *rapid.T) Proposal { + gen := rapid.OneOf( + GetConsumerAdditionProposalGen().AsAny(), + GetConsumerRemovalProposalGen().AsAny(), + GetEquivocationProposalGen().AsAny(), + GetTextProposalGen().AsAny(), + GetParamsProposalGen().AsAny(), + ) + return gen.Draw(t, "Proposal").(Proposal) + }) +} + +func GetConsumerAdditionProposalGen() *rapid.Generator[ConsumerAdditionProposal] { + return rapid.Custom(func(t *rapid.T) ConsumerAdditionProposal { + return ConsumerAdditionProposal{ + Deposit: rapid.Uint().Draw(t, "Deposit"), + Chain: GetChainIDGen().Draw(t, "Chain"), + SpawnTime: rapid.Int().Draw(t, "SpawnTime"), + InitialHeight: GetHeightGen().Draw(t, "InitialHeight"), + Status: rapid.String().Draw(t, "Status"), + } + }) +} + +func GetConsumerRemovalProposalGen() *rapid.Generator[ConsumerRemovalProposal] { + return rapid.Custom(func(t *rapid.T) ConsumerRemovalProposal { + return ConsumerRemovalProposal{ + Deposit: rapid.Uint().Draw(t, "Deposit"), + Chain: GetChainIDGen().Draw(t, "Chain"), + StopTime: rapid.Int().Draw(t, "StopTime"), + Status: rapid.String().Draw(t, "Status"), + } + }) +} + +func GetEquivocationProposalGen() *rapid.Generator[EquivocationProposal] { + return rapid.Custom(func(t *rapid.T) EquivocationProposal { + return EquivocationProposal{ + Power: rapid.Uint().Draw(t, "Power"), + Height: rapid.Uint().Draw(t, "Height"), + ConsensusAddress: rapid.String().Draw(t, "ConesnsuAddress"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Status: rapid.String().Draw(t, "Status"), + } + }) +} + +func GetTextProposalGen() *rapid.Generator[TextProposal] { + return rapid.Custom(func(t *rapid.T) TextProposal { + return TextProposal{ + Title: rapid.String().Draw(t, "Title"), + Description: rapid.String().Draw(t, "Description"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Status: rapid.String().Draw(t, "Status"), + } + }) +} + +func GetParamsProposalGen() *rapid.Generator[ParamsProposal] { + return rapid.Custom(func(t *rapid.T) ParamsProposal { + return ParamsProposal{ + Subspace: rapid.String().Draw(t, "Subspace"), + Key: rapid.String().Draw(t, "Key"), + Value: rapid.String().Draw(t, "Value"), + Deposit: rapid.Uint().Draw(t, "Deposit"), + Status: rapid.String().Draw(t, "Status"), + } + }) +} + +func GetHeightGen() *rapid.Generator[clienttypes.Height] { + return rapid.Custom(func(t *rapid.T) clienttypes.Height { + return clienttypes.Height{ + RevisionNumber: rapid.Uint64().Draw(t, "RevisionNumber"), + RevisionHeight: rapid.Uint64().Draw(t, "RevisionHeight"), + } + }) +} diff --git a/tests/e2e/step_rapid_test.go b/tests/e2e/step_rapid_test.go new file mode 100644 index 0000000000..dde5f2f465 --- /dev/null +++ b/tests/e2e/step_rapid_test.go @@ -0,0 +1,51 @@ +package main + +import ( + "log" + "os" + "path/filepath" + "testing" + + "pgregory.net/rapid" +) + +// TestReadAndWriteTrace uses rapid to do property based testing +// of reading and writing traces. +// It generates a random trace, writes it to a file, then reads it back. +// It then compares the original trace to the read trace. +// If the traces are not equal, rapid will generate a minimal example +// that causes the test to fail. +func TestReadAndWriteTrace(t *testing.T) { + parser := JSONParser{} + writer := JSONWriter{} + + dir, err := os.MkdirTemp("", "example") + if err != nil { + log.Fatal(err) + } + defer os.RemoveAll(dir) // clean up + + rapid.Check(t, func(t *rapid.T) { + trace := GetTraceGen().Draw(t, "Trace") + filename := filepath.Join(dir, "trace.json") + err := WriteAndReadTrace(parser, writer, trace, filename) + if err != nil { + t.Fatalf("error writing and reading trace: %v", err) + } + }) +} + +// This can be used to test writing and parsing traces, but does not make much sense +// for testing trace execution, since the generated traces are almost guaranteed to be nonsensical. +func GetTraceGen() *rapid.Generator[[]Step] { + return rapid.SliceOf(GetStepGen()) +} + +func GetStepGen() *rapid.Generator[Step] { + return rapid.Custom(func(t *rapid.T) Step { + return Step{ + Action: GetActionGen().Draw(t, "Action"), + State: GetStateGen().Draw(t, "State"), + } + }) +} diff --git a/tests/e2e/steps_downtime.go b/tests/e2e/steps_downtime.go index 08054f9089..7b4152023b 100644 --- a/tests/e2e/steps_downtime.go +++ b/tests/e2e/steps_downtime.go @@ -381,7 +381,7 @@ func stepsThrottledDowntime(consumerName string) []Step { }, }, { - Action: slashThrottleDequeue{ + Action: slashThrottleDequeueAction{ Chain: ChainID(consumerName), CurrentQueueSize: 1, NextQueueSize: 0, diff --git a/tests/e2e/trace_handlers_test.go b/tests/e2e/trace_handlers_test.go new file mode 100644 index 0000000000..725496c51f --- /dev/null +++ b/tests/e2e/trace_handlers_test.go @@ -0,0 +1,229 @@ +package main + +import ( + "encoding/json" + "fmt" + "log" + "os" + "path/filepath" + "testing" + + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/google/go-cmp/cmp" +) + +// an isolated test case for a proposal submission +var proposalSubmissionSteps = []Step{ + {submitTextProposalAction{Title: "Proposal 1", Description: "Description 1"}, State{}}, +} + +// an isolated test case for a state check involving a proposal +var proposalInStateSteps = []Step{ + { + Action: submitConsumerRemovalProposalAction{}, + State: State{ + ChainID("provi"): ChainState{ + Proposals: &map[uint]Proposal{ + 1: ConsumerRemovalProposal{ + Deposit: 10000001, + Chain: ChainID("foo"), + StopTime: 0, + Status: "PROPOSAL_STATUS_VOTING_PERIOD", + }, + }, + }, + }, + }, +} + +// Checks that writing, then parsing a trace results in the same trace. +func TestWriterThenParser(t *testing.T) { + tests := map[string]struct { + trace []Step + }{ + "proposalSubmission": {proposalSubmissionSteps}, + "proposalInState": {proposalInStateSteps}, + "start_provider_chain": {stepStartProviderChain()}, + "happyPath": {happyPathSteps}, + "democracy": {democracySteps}, + "slashThrottle": {slashThrottleSteps}, + "multipleConsumers": {multipleConsumers}, + "shorthappy": {shortHappyPathSteps}, + "democracyRewardsSteps": {democracyRewardsSteps}, + "changeover": {changeoverSteps}, + } + + dir, err := os.MkdirTemp("", "example") + if err != nil { + log.Fatal(err) + } + defer os.RemoveAll(dir) // clean up + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + filename := filepath.Join(dir, "trace.json") + err := WriteAndReadTrace(GlobalJSONParser, GlobalJSONWriter, tc.trace, filename) + if err != nil { + log.Fatalf("got error for testcase %v: %s", name, err) + } + }) + } +} + +// Checks that writing a trace does not result in an error. +func TestWriteExamples(t *testing.T) { + tests := map[string]struct { + trace []Step + }{ + "happyPath": {happyPathSteps}, + "democracy": {democracySteps}, + "slashThrottle": {slashThrottleSteps}, + "multipleConsumers": {multipleConsumers}, + "shorthappy": {shortHappyPathSteps}, + "democracyRewardsSteps": {democracyRewardsSteps}, + "changeover": {changeoverSteps}, + } + + dir := "tracehandler_testdata" + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + filename := filepath.Join(dir, name+".json") + err := GlobalJSONWriter.WriteTraceToFile(filename, tc.trace) + if err != nil { + t.Fatalf("error writing trace to file: %v", err) + } + }) + } +} + +func TestMarshalAndUnmarshalChainState(t *testing.T) { + tests := map[string]struct { + chainState ChainState + }{ + "consumer addition proposal": {ChainState{ + ValBalances: &map[ValidatorID]uint{ + ValidatorID("alice"): 9489999999, + ValidatorID("bob"): 9500000000, + }, + Proposals: &map[uint]Proposal{ + 2: ConsumerAdditionProposal{ + Deposit: 10000001, + Chain: ChainID("test"), + SpawnTime: 0, + InitialHeight: clienttypes.Height{RevisionNumber: 5, RevisionHeight: 5}, + Status: "PROPOSAL_STATUS_VOTING_PERIOD", + }, + }, + }}, + "params-proposal": {ChainState{ + ValBalances: &map[ValidatorID]uint{ + ValidatorID("alice"): 9889999998, + ValidatorID("bob"): 9960000001, + }, + Proposals: &map[uint]Proposal{ + 1: ParamsProposal{ + Deposit: 10000001, + Status: "PROPOSAL_STATUS_VOTING_PERIOD", + Subspace: "staking", + Key: "MaxValidators", + Value: "105", + }, + }, + }}, + "consuemr removal proposal": {ChainState{ + Proposals: &map[uint]Proposal{ + 5: ConsumerRemovalProposal{ + Deposit: 10000001, + Chain: ChainID("test123"), + StopTime: 5000000000, + Status: "PROPOSAL_STATUS_PASSED", + }, + }, + ValBalances: &map[ValidatorID]uint{ + ValidatorID("bob"): 9500000000, + }, + ConsumerChains: &map[ChainID]bool{}, // Consumer chain is now removed + }}, + "text-proposal": {ChainState{ + ValPowers: &map[ValidatorID]uint{ + ValidatorID("alice"): 509, + ValidatorID("bob"): 500, + ValidatorID("carol"): 495, + }, + ValBalances: &map[ValidatorID]uint{ + ValidatorID("bob"): 9500000000, + }, + Proposals: &map[uint]Proposal{ + // proposal does not exist + 10: TextProposal{}, + }, + }}, + "equivocation-proposal": {ChainState{ + ValPowers: &map[ValidatorID]uint{ + ValidatorID("alice"): 509, + ValidatorID("bob"): 500, + ValidatorID("carol"): 0, + }, + ValBalances: &map[ValidatorID]uint{ + ValidatorID("bob"): 9489999999, + }, + Proposals: &map[uint]Proposal{ + 5: EquivocationProposal{ + Deposit: 10000001, + Status: "PROPOSAL_STATUS_VOTING_PERIOD", + ConsensusAddress: "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + Power: 500, + Height: 10, + }, + }, + }}, + } + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + err := MarshalAndUnmarshalChainState(tc.chainState) + if err != nil { + t.Fatalf(err.Error()) + } + }) + } +} + +func MarshalAndUnmarshalChainState(chainState ChainState) error { + jsonobj, err := json.Marshal(chainState) + if err != nil { + return fmt.Errorf("error marshalling chain state: %v", err) + } + + var got *ChainState + err = json.Unmarshal(jsonobj, &got) + if err != nil { + return fmt.Errorf("error unmarshalling chain state: %v", err) + } + + diff := cmp.Diff(chainState, *got) + if diff != "" { + log.Print(string(jsonobj)) + return fmt.Errorf(diff) + } + + return nil +} + +func WriteAndReadTrace(parser TraceParser, writer TraceWriter, trace []Step, tmp_filepath string) error { + err := writer.WriteTraceToFile(tmp_filepath, trace) + if err != nil { + return fmt.Errorf("error writing trace to file: %v", err) + } + + got, err := GlobalJSONParser.ReadTraceFromFile(tmp_filepath) + if err != nil { + return fmt.Errorf("got error reading trace from file: %v", err) + } + diff := cmp.Diff(trace, got, cmp.AllowUnexported(Step{})) + if diff != "" { + return fmt.Errorf("Got a difference (-want +got):\n%s", diff) + } + return nil +} diff --git a/tests/e2e/tracehandler_testdata/changeover.json b/tests/e2e/tracehandler_testdata/changeover.json new file mode 100644 index 0000000000..42613462f8 --- /dev/null +++ b/tests/e2e/tracehandler_testdata/changeover.json @@ -0,0 +1,603 @@ +[ + { + "ActionType": "main.StartSovereignChainAction", + "Action": { + "Chain": "sover", + "Validators": [ + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "" + }, + "State": { + "sover": { + "ValBalances": { + "alice": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "sover", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.createIbcClientsAction", + "Action": { + "ChainA": "sover", + "ChainB": "provi" + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "sover", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "transfer", + "PortB": "transfer", + "Order": "unordered", + "Version": "ics20-1" + }, + "State": {} + }, + { + "ActionType": "main.LegacyUpgradeProposalAction", + "Action": { + "ChainID": "sover", + "UpgradeTitle": "sovereign-changeover", + "Proposer": "alice", + "UpgradeHeight": 110 + }, + "State": { + "sover": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Title": "sovereign-changeover", + "Description": "", + "UpgradeHeight": 110, + "Type": "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", + "Deposit": 10000000, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.UpgradeProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "sover", + "From": [ + "alice" + ], + "Vote": [ + "yes" + ], + "PropNumber": 1 + }, + "State": { + "sover": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Title": "sovereign-changeover", + "Description": "", + "UpgradeHeight": 110, + "Type": "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", + "Deposit": 10000000, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.UpgradeProposal" + } + } + } + } + }, + { + "ActionType": "main.waitUntilBlockAction", + "Action": { + "Block": 110, + "Chain": "sover" + }, + "State": {} + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": true, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "sover", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 111 + }, + "DistributionChannel": "channel-0" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "sover", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 111 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "sover", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 111 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.ChangeoverChainAction", + "Action": { + "SovereignChain": "sover", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "sover", + "ChainB": "provi", + "ClientA": 1, + "ClientB": 1 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "sover", + "ChainB": "provi", + "ConnectionA": 1, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "sover", + "From": "alice", + "To": "bob", + "Amount": 100 + }, + "State": { + "sover": { + "ValBalances": { + "bob": 0 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "sover", + "Port": "provider", + "Channel": 1 + }, + "State": { + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "sover", + "From": "alice", + "To": "bob", + "Amount": 100 + }, + "State": { + "sover": { + "ValBalances": { + "bob": 100 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unbondTokensAction", + "Action": { + "Chain": "provi", + "Sender": "alice", + "UnbondFrom": "alice", + "Amount": 1000000 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "sover", + "Port": "provider", + "Channel": 1 + }, + "State": { + "sover": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/democracy.json b/tests/e2e/tracehandler_testdata/democracy.json new file mode 100644 index 0000000000..706eb944f5 --- /dev/null +++ b/tests/e2e/tracehandler_testdata/democracy.json @@ -0,0 +1,935 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "democ": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.transferChannelCompleteAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "transfer", + "PortB": "transfer", + "Order": "unordered", + "ChannelA": 1, + "ChannelB": 1 + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "democ", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "democ", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9999999999, + "bob": 10000000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.registerRepresentativeAction", + "Action": { + "Chain": "democ", + "Representatives": [ + "alice", + "bob" + ], + "Stakes": [ + 100000000, + 40000000 + ] + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": { + "alice": 100000000, + "bob": 40000000 + }, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": true, + "bob": true, + "carol": false + }, + "IsIncrementalReward": true, + "IsNativeDenom": true + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "democ", + "From": "carol", + "To": "alice", + "Amount": 500000 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": { + "alice": 100500000, + "bob": 40000000 + }, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": true, + "bob": true, + "carol": true + }, + "IsIncrementalReward": true, + "IsNativeDenom": true + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitParamChangeLegacyProposalAction", + "Action": { + "Chain": "democ", + "From": "alice", + "Deposit": 10000001, + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": true + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9889999998, + "bob": 9960000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD", + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": "true" + }, + "Type": "main.ParamsProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "democ", + "From": [ + "alice", + "bob" + ], + "Vote": [ + "yes", + "no" + ], + "PropNumber": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9889999998, + "bob": 9960000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": [ + { + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": "true" + } + ], + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayRewardPacketsToProviderAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Port": "transfer", + "Channel": 1 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": false, + "bob": false, + "carol": false + }, + "IsIncrementalReward": false, + "IsNativeDenom": false + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [], + "Proposals": null + } + } + }, + { + "ActionType": "main.submitChangeRewardDenomsProposalAction", + "Action": { + "Denom": "ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [], + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [ + "ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9" + ], + "Proposals": null + } + } + }, + { + "ActionType": "main.relayRewardPacketsToProviderAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Port": "transfer", + "Channel": 1 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": false, + "bob": false, + "carol": false + }, + "IsIncrementalReward": false, + "IsNativeDenom": false + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "democ", + "Validator": "bob" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "bob" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": { + "alice": 100500000, + "bob": 40000000 + }, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json b/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json new file mode 100644 index 0000000000..cea7f937be --- /dev/null +++ b/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json @@ -0,0 +1,935 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "democ", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "democ", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "democ": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.transferChannelCompleteAction", + "Action": { + "ChainA": "democ", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "transfer", + "PortB": "transfer", + "Order": "unordered", + "ChannelA": 1, + "ChannelB": 1 + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "democ", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "democ", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9999999999, + "bob": 10000000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.registerRepresentativeAction", + "Action": { + "Chain": "democ", + "Representatives": [ + "alice", + "bob" + ], + "Stakes": [ + 100000000, + 40000000 + ] + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": { + "alice": 100000000, + "bob": 40000000 + }, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": true, + "bob": true, + "carol": false + }, + "IsIncrementalReward": true, + "IsNativeDenom": true + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "democ", + "From": "carol", + "To": "alice", + "Amount": 500000 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": { + "alice": 100500000, + "bob": 40000000 + }, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": true, + "bob": true, + "carol": true + }, + "IsIncrementalReward": true, + "IsNativeDenom": true + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitParamChangeLegacyProposalAction", + "Action": { + "Chain": "democ", + "From": "alice", + "Deposit": 10000001, + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": true + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9889999998, + "bob": 9960000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD", + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": "true" + }, + "Type": "main.ParamsProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "democ", + "From": [ + "alice", + "bob" + ], + "Vote": [ + "yes", + "no" + ], + "PropNumber": 1 + }, + "State": { + "democ": { + "ValBalances": { + "alice": 9889999998, + "bob": 9960000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": [ + { + "Subspace": "transfer", + "Key": "SendEnabled", + "Value": "true" + } + ], + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayRewardPacketsToProviderAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Port": "transfer", + "Channel": 1 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": false, + "bob": false, + "carol": false + }, + "IsIncrementalReward": false, + "IsNativeDenom": false + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [], + "Proposals": null + } + } + }, + { + "ActionType": "main.submitChangeRewardDenomsProposalAction", + "Action": { + "Denom": "ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [], + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": [ + "ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9" + ], + "Proposals": null + } + } + }, + { + "ActionType": "main.relayRewardPacketsToProviderAction", + "Action": { + "ConsumerChain": "democ", + "ProviderChain": "provi", + "Port": "transfer", + "Channel": 1 + }, + "State": { + "provi": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": { + "IsRewarded": { + "alice": true, + "bob": true, + "carol": true + }, + "IsIncrementalReward": false, + "IsNativeDenom": false + }, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "democ", + "Validator": "bob" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "bob" + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "democ", + "Port": "provider", + "Channel": 0 + }, + "State": { + "democ": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": { + "alice": 100500000, + "bob": 40000000 + }, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/happyPath.json b/tests/e2e/tracehandler_testdata/happyPath.json new file mode 100644 index 0000000000..2ed4363c96 --- /dev/null +++ b/tests/e2e/tracehandler_testdata/happyPath.json @@ -0,0 +1,2007 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "consu", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 9999999999, + "bob": 10000000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"QlG+iYe6AyYpvY1z9RNJKCVlH14Q/qSz4EjGdGCru3o=\"}", + "ReconfigureNode": true, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "cosmosvalcons1uuec3cjxajv5te08p220usrjhkfhg9wyvqn0tm", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "bob": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "cosmosvalcons1uuec3cjxajv5te08p220usrjhkfhg9wyvqn0tm", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "bob": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unbondTokensAction", + "Action": { + "Chain": "provi", + "Sender": "alice", + "UnbondFrom": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unbondTokensAction", + "Action": { + "Chain": "provi", + "Sender": "alice", + "UnbondFrom": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.cancelUnbondTokensAction", + "Action": { + "Chain": "provi", + "Delegator": "alice", + "Validator": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.redelegateTokensAction", + "Action": { + "Chain": "provi", + "Src": "alice", + "Dst": "carol", + "TxSender": "alice", + "Amount": 450000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "alice" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.redelegateTokensAction", + "Action": { + "Chain": "provi", + "Src": "carol", + "Dst": "alice", + "TxSender": "carol", + "Amount": 449000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 60, + "bob": 500, + "carol": 950 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitEquivocationProposalAction", + "Action": { + "Chain": "consu", + "Height": 10, + "Time": "2023-09-20T18:24:51.823193+02:00", + "Power": 500, + "Validator": "bob", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Title": "", + "Description": "", + "Deposit": 0, + "Status": "" + }, + "Type": "main.TextProposal" + } + } + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "carol", + "Chain": "provi" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "bob", + "Chain": "consu" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitEquivocationProposalAction", + "Action": { + "Chain": "consu", + "Height": 10, + "Time": "2023-09-20T18:24:51.823197+02:00", + "Power": 500, + "Validator": "bob", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Height": 10, + "Power": 500, + "ConsensusAddress": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.EquivocationProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Height": 10, + "Power": 500, + "ConsensusAddress": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.EquivocationProposal" + } + } + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.startRelayerAction", + "Action": {}, + "State": {} + }, + { + "ActionType": "main.submitConsumerRemovalProposalAction", + "Action": { + "Chain": "provi", + "From": "bob", + "Deposit": 10000001, + "ConsumerChain": "consu", + "StopTimeOffset": 0 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "3": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "no", + "no", + "no" + ], + "PropNumber": 3 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "3": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_REJECTED" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.submitConsumerRemovalProposalAction", + "Action": { + "Chain": "provi", + "From": "bob", + "Deposit": 10000001, + "ConsumerChain": "consu", + "StopTimeOffset": 0 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "4": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 4 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": {}, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "4": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/multipleConsumers.json b/tests/e2e/tracehandler_testdata/multipleConsumers.json new file mode 100644 index 0000000000..0630749179 --- /dev/null +++ b/tests/e2e/tracehandler_testdata/multipleConsumers.json @@ -0,0 +1,2381 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "consu", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "densu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "densu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "densu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "densu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "densu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "densu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "densu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "densu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "densu", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "densu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "densu", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 1 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "densu", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unbondTokensAction", + "Action": { + "Chain": "provi", + "Sender": "alice", + "UnbondFrom": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.redelegateTokensAction", + "Action": { + "Chain": "provi", + "Src": "alice", + "Dst": "carol", + "TxSender": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "carol", + "Chain": "provi" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "bob", + "Chain": "consu" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "densu", + "Port": "provider", + "Channel": 1 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "densu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/shorthappy.json b/tests/e2e/tracehandler_testdata/shorthappy.json new file mode 100644 index 0000000000..04827a04cf --- /dev/null +++ b/tests/e2e/tracehandler_testdata/shorthappy.json @@ -0,0 +1,1578 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "consu", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 9999999999, + "bob": 10000000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unbondTokensAction", + "Action": { + "Chain": "provi", + "Sender": "alice", + "UnbondFrom": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.redelegateTokensAction", + "Action": { + "Chain": "provi", + "Src": "alice", + "Dst": "carol", + "TxSender": "alice", + "Amount": 1000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 510, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 501 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.unjailValidatorAction", + "Action": { + "Provider": "provi", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitEquivocationProposalAction", + "Action": { + "Chain": "consu", + "Height": 10, + "Time": "2023-09-20T18:24:51.823231+02:00", + "Power": 500, + "Validator": "bob", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Title": "", + "Description": "", + "Deposit": 0, + "Status": "" + }, + "Type": "main.TextProposal" + } + } + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "carol", + "Chain": "provi" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 495 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.doublesignSlashAction", + "Action": { + "Validator": "bob", + "Chain": "consu" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitEquivocationProposalAction", + "Action": { + "Chain": "consu", + "Height": 10, + "Time": "2023-09-20T18:24:51.823235+02:00", + "Power": 500, + "Validator": "bob", + "Deposit": 10000001, + "From": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Height": 10, + "Power": 500, + "ConsensusAddress": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.EquivocationProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 500, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Height": 10, + "Power": 500, + "ConsensusAddress": "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + "Deposit": 10000001, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.EquivocationProposal" + } + } + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 509, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.startRelayerAction", + "Action": {}, + "State": {} + }, + { + "ActionType": "main.submitConsumerRemovalProposalAction", + "Action": { + "Chain": "provi", + "From": "bob", + "Deposit": 10000001, + "ConsumerChain": "consu", + "StopTimeOffset": 0 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "3": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "no", + "no", + "no" + ], + "PropNumber": 3 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "3": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_REJECTED" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.submitConsumerRemovalProposalAction", + "Action": { + "Chain": "provi", + "From": "bob", + "Deposit": 10000001, + "ConsumerChain": "consu", + "StopTimeOffset": 0 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "4": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 4 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": {}, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "4": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + } +] \ No newline at end of file diff --git a/tests/e2e/tracehandler_testdata/slashThrottle.json b/tests/e2e/tracehandler_testdata/slashThrottle.json new file mode 100644 index 0000000000..dc25e590b0 --- /dev/null +++ b/tests/e2e/tracehandler_testdata/slashThrottle.json @@ -0,0 +1,807 @@ +[ + { + "ActionType": "main.StartChainAction", + "Action": { + "Chain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": "", + "SkipGentx": false + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerAdditionProposalAction", + "Action": { + "PreCCV": false, + "Chain": "provi", + "From": "alice", + "Deposit": 10000001, + "ConsumerChain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "DistributionChannel": "" + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9489999999, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": false, + "ExpectedError": "" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "carol", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": {} + }, + { + "ActionType": "main.assignConsumerPubKeyAction", + "Action": { + "Chain": "consu", + "Validator": "bob", + "ConsumerPubkey": "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=\"}", + "ReconfigureNode": false, + "ExpectError": true, + "ExpectedError": "a validator has assigned the consumer key already: consumer key is already in use by a validator" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": { + "bob": "", + "carol": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + }, + "ProviderKeys": { + "carol": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6" + }, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 1 + }, + "State": { + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "1": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "SpawnTime": 0, + "InitialHeight": { + "revision_height": 1 + }, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerAdditionProposal" + } + } + } + } + }, + { + "ActionType": "main.startConsumerChainAction", + "Action": { + "ConsumerChain": "consu", + "ProviderChain": "provi", + "Validators": [ + { + "Id": "bob", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "alice", + "Allocation": 10000000000, + "Stake": 500000000 + }, + { + "Id": "carol", + "Allocation": 10000000000, + "Stake": 500000000 + } + ], + "GenesisChanges": ".app_state.ccvconsumer.params.soft_opt_out_threshold = \"0.05\"" + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000, + "carol": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": { + "alice": 9500000000, + "bob": 9500000000, + "carol": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.addIbcConnectionAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ClientA": 0, + "ClientB": 0 + }, + "State": {} + }, + { + "ActionType": "main.addIbcChannelAction", + "Action": { + "ChainA": "consu", + "ChainB": "provi", + "ConnectionA": 0, + "PortA": "consumer", + "PortB": "provider", + "Order": "ordered", + "Version": "" + }, + "State": {} + }, + { + "ActionType": "main.delegateTokensAction", + "Action": { + "Chain": "provi", + "From": "alice", + "To": "alice", + "Amount": 11000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 500, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 10000000000, + "bob": 10000000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.SendTokensAction", + "Action": { + "Chain": "consu", + "From": "alice", + "To": "bob", + "Amount": 1 + }, + "State": { + "consu": { + "ValBalances": { + "alice": 9999999999, + "bob": 10000000001 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "bob" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": { + "consu": 0 + }, + "GlobalSlashQueueSize": 0, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.downtimeSlashAction", + "Action": { + "Chain": "consu", + "Validator": "carol" + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 500, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": { + "consu": 1 + }, + "GlobalSlashQueueSize": 1, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.slashThrottleDequeueAction", + "Action": { + "Chain": "consu", + "CurrentQueueSize": 1, + "NextQueueSize": 0, + "Timeout": 80000000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": { + "consu": 0 + }, + "GlobalSlashQueueSize": 0, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.relayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 0 + }, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": { + "consu": 0 + }, + "GlobalSlashQueueSize": 0, + "RegisteredConsumerRewardDenoms": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.submitConsumerRemovalProposalAction", + "Action": { + "Chain": "provi", + "From": "bob", + "Deposit": 10000001, + "ConsumerChain": "consu", + "StopTimeOffset": 0 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9489999999 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": { + "consu": true + }, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + }, + { + "ActionType": "main.voteGovProposalAction", + "Action": { + "Chain": "provi", + "From": [ + "alice", + "bob", + "carol" + ], + "Vote": [ + "yes", + "yes", + "yes" + ], + "PropNumber": 2 + }, + "State": { + "provi": { + "ValBalances": { + "bob": 9500000000 + }, + "ValPowers": null, + "RepresentativePowers": null, + "Params": null, + "Rewards": null, + "ConsumerChains": {}, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerChainQueueSizes": null, + "GlobalSlashQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "Proposals": { + "2": { + "RawProposal": { + "Deposit": 10000001, + "Chain": "consu", + "StopTime": 0, + "Status": "PROPOSAL_STATUS_PASSED" + }, + "Type": "main.ConsumerRemovalProposal" + } + } + } + } + } +] \ No newline at end of file