@@ -38,12 +38,10 @@ type (
38
38
StartChainAction = e2e.StartChainAction
39
39
StartChainValidator = e2e.StartChainValidator
40
40
StartConsumerChainAction = e2e.StartConsumerChainAction
41
- StartSovereignChainAction = e2e.StartSovereignChainAction
42
41
SubmitConsumerAdditionProposalAction = e2e.SubmitConsumerAdditionProposalAction
43
42
SubmitConsumerRemovalProposalAction = e2e.SubmitConsumerRemovalProposalAction
44
43
DelegateTokensAction = e2e.DelegateTokensAction
45
44
UnbondTokensAction = e2e.UnbondTokensAction
46
- ChangeoverChainAction = e2e.ChangeoverChainAction
47
45
)
48
46
49
47
type SendTokensAction struct {
@@ -1100,111 +1098,6 @@ func (tr *Chain) transformConsumerGenesis(targetVersion string, genesis []byte)
1100
1098
return result
1101
1099
}
1102
1100
1103
- func (tr Chain ) changeoverChain (
1104
- action e2e.ChangeoverChainAction ,
1105
- verbose bool ,
1106
- ) {
1107
- consumerGenesis := ".app_state.ccvconsumer = " + tr .getConsumerGenesis (action .ProviderChain , action .SovereignChain )
1108
-
1109
- consumerGenesisChanges := tr .testConfig .ChainConfigs [action .SovereignChain ].GenesisChanges
1110
- if consumerGenesisChanges != "" {
1111
- consumerGenesis = consumerGenesis + " | " + consumerGenesisChanges
1112
- }
1113
- if action .GenesisChanges != "" {
1114
- consumerGenesis = consumerGenesis + " | " + action .GenesisChanges
1115
- }
1116
-
1117
- tr .startChangeover (e2e.ChangeoverChainAction {
1118
- Validators : action .Validators ,
1119
- GenesisChanges : consumerGenesis ,
1120
- }, verbose )
1121
- }
1122
-
1123
- func (tr Chain ) startChangeover (
1124
- action e2e.ChangeoverChainAction ,
1125
- verbose bool ,
1126
- ) {
1127
- chainConfig := tr .testConfig .ChainConfigs [ChainID ("sover" )]
1128
- type jsonValAttrs struct {
1129
- Mnemonic string `json:"mnemonic"`
1130
- Allocation string `json:"allocation"`
1131
- Stake string `json:"stake"`
1132
- ValId string `json:"val_id"`
1133
- PrivValidatorKey string `json:"priv_validator_key"`
1134
- NodeKey string `json:"node_key"`
1135
- IpSuffix string `json:"ip_suffix"`
1136
-
1137
- ConsumerMnemonic string `json:"consumer_mnemonic"`
1138
- ConsumerPrivValidatorKey string `json:"consumer_priv_validator_key"`
1139
- StartWithConsumerKey bool `json:"start_with_consumer_key"`
1140
- }
1141
-
1142
- var validators []jsonValAttrs
1143
- for _ , val := range action .Validators {
1144
- validators = append (validators , jsonValAttrs {
1145
- Mnemonic : tr .testConfig .ValidatorConfigs [val .Id ].Mnemonic ,
1146
- NodeKey : tr .testConfig .ValidatorConfigs [val .Id ].NodeKey ,
1147
- ValId : fmt .Sprint (val .Id ),
1148
- PrivValidatorKey : tr .testConfig .ValidatorConfigs [val .Id ].PrivValidatorKey ,
1149
- Allocation : fmt .Sprint (val .Allocation ) + "stake" ,
1150
- Stake : fmt .Sprint (val .Stake ) + "stake" ,
1151
- IpSuffix : tr .testConfig .ValidatorConfigs [val .Id ].IpSuffix ,
1152
-
1153
- ConsumerMnemonic : tr .testConfig .ValidatorConfigs [val .Id ].ConsumerMnemonic ,
1154
- ConsumerPrivValidatorKey : tr .testConfig .ValidatorConfigs [val .Id ].ConsumerPrivValidatorKey ,
1155
- // if true node will be started with consumer key for each consumer chain
1156
- StartWithConsumerKey : tr .testConfig .ValidatorConfigs [val .Id ].UseConsumerKey ,
1157
- })
1158
- }
1159
-
1160
- vals , err := json .Marshal (validators )
1161
- if err != nil {
1162
- log .Fatal (err )
1163
- }
1164
-
1165
- // Concat genesis changes defined in chain config, with any custom genesis changes for this chain instantiation
1166
- var genesisChanges string
1167
- if action .GenesisChanges != "" {
1168
- genesisChanges = chainConfig .GenesisChanges + " | " + action .GenesisChanges
1169
- } else {
1170
- genesisChanges = chainConfig .GenesisChanges
1171
- }
1172
-
1173
- isConsumer := true
1174
- changeoverScript := tr .target .GetTestScriptPath (isConsumer , "start-changeover.sh" )
1175
- cmd := tr .target .ExecCommand (
1176
- "/bin/bash" ,
1177
- changeoverScript , chainConfig .UpgradeBinary , string (vals ),
1178
- "sover" , chainConfig .IpPrefix , genesisChanges ,
1179
- tr .testConfig .TendermintConfigOverride ,
1180
- )
1181
-
1182
- cmdReader , err := cmd .StdoutPipe ()
1183
- if err != nil {
1184
- log .Fatal (err )
1185
- }
1186
- cmd .Stderr = cmd .Stdout
1187
-
1188
- if err := cmd .Start (); err != nil {
1189
- log .Fatal (err )
1190
- }
1191
-
1192
- scanner := bufio .NewScanner (cmdReader )
1193
-
1194
- for scanner .Scan () {
1195
- out := scanner .Text ()
1196
- if verbose {
1197
- fmt .Println ("startChangeover: " + out )
1198
- }
1199
- if out == done {
1200
- break
1201
- }
1202
- }
1203
- if err := scanner .Err (); err != nil {
1204
- log .Fatal ("startChangeover died" , err )
1205
- }
1206
- }
1207
-
1208
1101
type AddChainToRelayerAction struct {
1209
1102
Chain ChainID
1210
1103
Validator ValidatorID
0 commit comments