-
Notifications
You must be signed in to change notification settings - Fork 4
3804 lines (3692 loc) · 172 KB
/
upgrade-gaia-v15-fresh-state.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
name: Gaia v15 Upgrade - Fresh State
on:
# repository_dispatch:
# types: [new_main_build]
# schedule:
# - cron: '0 4,6,8,10 * * 1-6'
workflow_dispatch:
# push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Versions
VERSION_CUTOFF: v14.2.0
TARGET_VERSION: v15
# All chain variables
COMMIT_TIMEOUT: 6
DOWNTIME_BLOCKS: 10000
# Provider chain variables
CHAIN_BINARY: gaiad
CHAIN_ID: testnet
DENOM: uatom
BASE_FEES: 2000
HIGH_FEES: 10000
GAS: auto
GAS_ADJUSTMENT: 2
GAS_PRICE: 0.005
VOTING_PERIOD: 10s
COSMOS_SDK: v45
COSMOVISOR: false
# Provider nodes variables
HOME_1: /home/runner/.val1
HOME_2: /home/runner/.val2
HOME_3: /home/runner/.val3
PROVIDER_SERVICE_1: gaia1.service
PROVIDER_SERVICE_2: gaia2.service
PROVIDER_SERVICE_3: gaia3.service
MNEMONIC_1: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art
MNEMONIC_2: abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon garage
MNEMONIC_3: abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon earth
MNEMONIC_RELAYER: abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon success
MNEMONIC_4: abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon success
MNEMONIC_5: abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon claim
MONIKER_1: val1
MONIKER_2: val2
MONIKER_3: val3
MONIKER_RELAYER: relayer
MONIKER_4: relayer
MONIKER_5: wallet5
VALOPER_1: cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv
VALOPER_2: cosmosvaloper1ay4dpm0kjmvtpug28vgw5w32yyjxa5spq248vn
VALOPER_3: cosmosvaloper1v8zgdpzqfazvk6fgwhqqhzx0hfannrajukgdkc
WALLET_1: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
WALLET_2: cosmos1ay4dpm0kjmvtpug28vgw5w32yyjxa5sp97pjqq
WALLET_3: cosmos1v8zgdpzqfazvk6fgwhqqhzx0hfannrajezuc6t
WALLET_4: cosmos1ty2qlurqsxj6sgs378hxmzyxh0ds8ukc70w844
WALLET_RELAYER: cosmos1ty2qlurqsxj6sgs378hxmzyxh0ds8ukc70w844
VAL1_STAKE: 800000000
VAL2_STAKE: 200000000
VAL3_STAKE: 10000000
VAL_FUNDS: 11000000000
VAL_STAKE: 1000000000
VAL_STAKE_STEP: 1000000
VAL1_API_PORT: 25001
VAL2_API_PORT: 25002
VAL3_API_PORT: 25003
VAL1_GRPC_PORT: 26001
VAL2_GRPC_PORT: 26002
VAL3_GRPC_PORT: 26003
VAL1_RPC_PORT: 27001
VAL2_RPC_PORT: 27002
VAL3_RPC_PORT: 27003
VAL1_P2P_PORT: 28001
VAL2_P2P_PORT: 28002
VAL3_P2P_PORT: 28003
VAL1_PPROF_PORT: 29001
VAL2_PPROF_PORT: 29002
VAL3_PPROF_PORT: 29003
# Consumer chain variables
ICS_120: false
ICS_200: false
ICS_310: false
ICS_320: false
ICS_330: false
ICS_400: false
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V12_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v1.2.0-multiden/interchain-security-cd-linux
CONSUMER_CHAIN_V12_BINARY: consumerd_v1.2.0
CONSUMER_CHAIN_V2_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v2.0.0/interchain-security-cd-linux
CONSUMER_CHAIN_V2_BINARY: consumerd_v2.0.0
CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0
CONSUMER_CHAIN_V320_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.2.0/interchain-security-cd-linux
CONSUMER_CHAIN_V320_BINARY: consumerd_v3.2.0
CONSUMER_CHAIN_V330_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.3.0/interchain-security-cd-linux
CONSUMER_CHAIN_V330_BINARY: consumerd_v3.3.0
STRIDE_V18_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-consumer-v18.0.0/strided-consumer-linux
NEUTRON_V2_BINARY_URL: https://github.com/neutron-org/neutron/releases/download/v2.0.1/neutrond-linux-amd64
ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd
ICS_TRANSFORM_BINARY: cd-transform
# Stride chain variables
STRIDE_CHAIN_BINARY: strided
STRIDE_CHAIN_ID: stride-test
STRIDE_DENOM: ustrd
# STRIDE_HOME_1: /home/runner/.stride1
# STRIDE_HOME_2: /home/runner/.stride2
# STRIDE_SERVICE_1: stride1.service
# STRIDE_SERVICE_2: stride2.service
STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn
STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6
# STRIDE_API_1: 35001
# STRIDE_API_2: 35002
# STRIDE_GRPC_1: 36001
# STRIDE_GRPC_2: 36002
# STRIDE_RPC_1: 37001
# STRIDE_RPC_2: 37002
# STRIDE_P2P_1: 38001
# STRIDE_P2P_2: 38002
# STRIDE_PPROF_1: 39001
# STRIDE_PPROF_2: 39002
# CHANGEOVER_Hv330-2-OFFSET: false
# Neutron chain variables
NEUTRON_CHAIN_BINARY: neutrond
NEUTRON_CHAIN_ID: neutron-test
NEUTRON_DENOM: untrn
# Relayer variables
RELAYER: hermes
HERMES_VERSION: v1.8.0
RLY_VERSION: "2.5.0"
jobs:
set-version-matrix:
runs-on: ubuntu-22.04
steps:
# Get system info
- run: ifconfig
- run: arp -a
- run: sudo dmidecode
- run: df -h
- run: free -m
- run: uname -a
- run: lsb_release -a
- run: echo "GitHub branch is ${{ github.ref }}"
- run: whoami
- run: pwd
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests
- name: Generate starting versions
id: generate-start
run: |
start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF)
echo $start
echo "start_versions=$start" >> $GITHUB_OUTPUT
- name: Generate upgrade versions
id: generate-upgrade
run: |
upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF)
echo $upgrade
echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT
outputs:
upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }}
set-version-matrix-cosmovisor:
runs-on: ubuntu-22.04
steps:
# Get system info
- run: ifconfig
- run: arp -a
- run: sudo dmidecode
- run: df -h
- run: free -m
- run: uname -a
- run: lsb_release -a
- run: echo "GitHub branch is ${{ github.ref }}"
- run: whoami
- run: pwd
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests
- name: Generate starting versions
id: generate-start
run: |
start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF)
echo $start
echo "start_versions=$start" >> $GITHUB_OUTPUT
- name: Generate upgrade versions
id: generate-upgrade
run: |
upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF -c)
echo $upgrade
echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT
outputs:
upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }}
set-version-matrix-relayer:
runs-on: ubuntu-22.04
steps:
# Get system info
- run: ifconfig
- run: arp -a
- run: sudo dmidecode
- run: df -h
- run: free -m
- run: uname -a
- run: lsb_release -a
- run: echo "GitHub branch is ${{ github.ref }}"
- run: whoami
- run: pwd
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests
- name: Generate starting versions
id: generate-start
run: |
start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF)
echo $start
echo "start_versions=$start" >> $GITHUB_OUTPUT
- name: Generate upgrade versions
id: generate-upgrade
run: |
upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF -r)
echo $upgrade
echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT
outputs:
upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }}
Baseline-1-upgrade:
runs-on: ubuntu-22.04
needs: set-version-matrix-cosmovisor
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix-cosmovisor.outputs.upgrade_versions) }}
fail-fast: false
env:
COSMOVISOR_VERSION: ${{ matrix.cv_version }}
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }}
steps:
- name: start-version
run: echo ${{matrix.gaia_version}}
- name: target-version
run: echo ${{matrix.upgrade_version}}
- name: target-commit
if: ${{ matrix.upgrade_version == 'main' }}
run: |
BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}}
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name')
echo TARGET_COMMIT: $TARGET_COMMIT
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $GITHUB_PATH
echo "$HOME/.relayer" >> $GITHUB_PATH
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install toml-cli
- name: Install Cosmovisor > v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }}
run: |
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Install Cosmovisor v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }}
run: |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Start chain
env:
START_VERSION: ${{matrix.gaia_version}}
run: |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64
scripts/start_chain.sh
- name: Check Gaia log
run: sudo journalctl -u $PROVIDER_SERVICE_1
- name: Print Gaia version
run: $CHAIN_BINARY version --long
- name: Block production check
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks
- name: Test software upgrade for published releases
if: ${{ matrix.upgrade_version != 'main' }}
env:
DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64
run: |
echo $DOWNLOAD_URL
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION
- name: Test software upgrade for main branch
if: ${{ matrix.upgrade_version == 'main' }}
env:
DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux
run: |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION
- name: _Blocks produced after upgrade
run: |
tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10
- name: Flush "migration successful" lines
run: |
$CHAIN_BINARY keys list --home $HOME_1
- name: _Transactions verified> bank send, delegate, and withdraw rewards
run: tests/test_tx_fresh.sh
- name: _API endpoints check
run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT
- name: _RPC endpoints check
run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT
Baseline-2-globalfee:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }}
fail-fast: false
env:
COSMOVISOR_VERSION: ${{ matrix.cv_version }}
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }}
steps:
- name: start-version
run: echo ${{matrix.gaia_version}}
- name: target-version
run: echo ${{matrix.upgrade_version}}
- name: target-commit
if: ${{ matrix.upgrade_version == 'main' }}
run: |
BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}}
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name')
echo TARGET_COMMIT: $TARGET_COMMIT
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $GITHUB_PATH
echo "$HOME/.relayer" >> $GITHUB_PATH
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install toml-cli
- name: Install Cosmovisor > v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }}
run: |
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Install Cosmovisor v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }}
run: |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Start chain
env:
START_VERSION: ${{matrix.gaia_version}}
run: |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64
scripts/start_chain.sh
- name: Check Gaia log
run: sudo journalctl -u $PROVIDER_SERVICE_1
- name: Print Gaia version
run: $CHAIN_BINARY version --long
- name: Block production check
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks
- name: Test globalfee module
run: |
tests/test_globalfee.sh
- name: Test software upgrade for published releases
if: ${{ matrix.upgrade_version != 'main' }}
env:
DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64
run: |
echo $DOWNLOAD_URL
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: Test software upgrade for main branch
if: ${{ matrix.upgrade_version == 'main' }}
env:
DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux
run: |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: _Blocks produced after upgrade
run: |
tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10
- name: Flush "migration successful" lines
run: |
$CHAIN_BINARY keys list --home $HOME_1
- name: _Transactions verified> bank send, delegate, and withdraw rewards
run: tests/test_tx_fresh.sh
- name: _API endpoints check
run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT
- name: _RPC endpoints check
run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT
- name: Test globalfee module
env:
COSMOS_SDK: v47
run: |
tests/test_globalfee.sh
Baseline-3a-icsv310:
runs-on: ubuntu-22.04
needs: set-version-matrix-relayer
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }}
fail-fast: false
env:
COSMOVISOR_VERSION: ${{ matrix.cv_version }}
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }}
# Consumer chain variables
ICS_310: true
CONSUMER_ICS: v3.1.0
PROVIDER_ICS: v2.4.0
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0
ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd
ICS_TRANSFORM_BINARY: cd-transform
steps:
- name: start-version
run: echo ${{matrix.gaia_version}}
- name: target-version
run: echo ${{matrix.upgrade_version}}
- name: target-commit
if: ${{ matrix.upgrade_version == 'main' }}
run: |
BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}}
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name')
echo TARGET_COMMIT: $TARGET_COMMIT
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $GITHUB_PATH
echo "$HOME/.relayer" >> $GITHUB_PATH
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install toml-cli
- name: Install Cosmovisor > v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }}
run: |
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Install Cosmovisor v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }}
run: |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Select Hermes
if: ${{ matrix.relayer == 'hermes' }}
run: echo "RELAYER=hermes" >> $GITHUB_ENV
- name: Select Go Relayer
if: ${{ matrix.relayer == 'rly' }}
run: echo "RELAYER=rly" >> $GITHUB_ENV
- name: Set up relayer
run: scripts/setup_relayer.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V310_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY
wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q
chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY
- name: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V310_BINARY runs off $CONSUMER_CHAIN_V310_BINARY_URL"
- name: Start chain
env:
START_VERSION: ${{matrix.gaia_version}}
run: |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64
scripts/start_chain.sh
- name: Check Gaia log
run: sudo journalctl -u $PROVIDER_SERVICE_1
- name: Print Gaia version
run: $CHAIN_BINARY version --long
- name: Block production check
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks
- name: Add consumer chain with ICS v3.1.0
env:
COSMOS_SDK: v45
CONSUMER_CHAIN_ID: v310-one
run: |
scripts/add_consumer.sh
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
CONSUMER_HOME_2: /home/runner/.v310-1-2
CONSUMER_HOME_3: /home/runner/.v310-1-3
CONSUMER_SERVICE_1: v310-1-1.service
CONSUMER_SERVICE_2: v310-1-2.service
CONSUMER_SERVICE_3: v310-1-3.service
CON1_API_PORT: 31101
CON2_API_PORT: 31102
CON3_API_PORT: 31103
CON1_GRPC_PORT: 31111
CON2_GRPC_PORT: 31112
CON3_GRPC_PORT: 31113
CON1_RPC_PORT: 31121
CON2_RPC_PORT: 31122
CON3_RPC_PORT: 31123
CON1_P2P_PORT: 31131
CON2_P2P_PORT: 31132
CON3_P2P_PORT: 31133
CON1_PPROF_PORT: 31141
CON2_PPROF_PORT: 31142
CON3_PPROF_PORT: 31143
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
scripts/init_consumer_assign_keys.sh
sleep 20
- name: Prepare consumer chain v310-one
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
CONSUMER_HOME_2: /home/runner/.v310-1-2
CONSUMER_HOME_3: /home/runner/.v310-1-3
run: |
scripts/prepare_consumer.sh
- name: Start consumer chain v310-one
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_SERVICE_1: v310-1-1.service
CONSUMER_SERVICE_2: v310-1-2.service
CONSUMER_SERVICE_3: v310-1-3.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_1 --now
sleep 5
journalctl -u $CONSUMER_SERVICE_1
- name: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 31121
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for v310-one
env:
CONSUMER_CHAIN_ID: v310-one
run: |
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
if [ $RELAYER == "hermes" ]; then
echo "Creating channel with Hermes..."
hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id
hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1
elif [ $RELAYER == "rly" ]; then
echo "Creating channel with Go relayer..."
jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v310-1.json
jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json
rly paths add testnet v310-one v310-1 --file v310-2.json
rly transact connection v310-1
rly transact channel v310-1 --src-port consumer --dst-port provider --order ordered --version 1
fi
sudo systemctl restart $RELAYER
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CONSUMER_HOME_1: /home/runner/.v310-1-1
CON1_RPC_PORT: 31121
run: tests/test_ccv_key_assignment.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id')
channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id')
tests/test_consumer_ibc_transfer.sh $channel_id
- name: Test software upgrade for published releases
if: ${{ matrix.upgrade_version != 'main' }}
env:
DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64
run: |
echo $DOWNLOAD_URL
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: Test software upgrade for main branch
if: ${{ matrix.upgrade_version == 'main' }}
env:
DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux
run: |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: _Blocks produced after upgrade
run: |
tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10
- name: Restart relayer
run: sudo systemctl restart $RELAYER
- name: Flush "migration successful" lines
run: |
$CHAIN_BINARY keys list --home $HOME_1
- name: _CCV channel verified> ICS v3.1.0 chain 1
env:
CONSUMER_HOME_1: /home/runner/.v310-1-1
CON1_RPC_PORT: 31121
run: tests/test_ccv_key_assignment.sh
- name: _IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id')
channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id')
tests/test_consumer_ibc_transfer.sh $channel_id
- name: Add consumer chain with ICS v3.1.0
env:
COSMOS_SDK: v47
CONSUMER_CHAIN_ID: v310-two
run: |
scripts/add_consumer.sh
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: v310-two
CONSUMER_HOME_1: /home/runner/.v310-2-1
CONSUMER_HOME_2: /home/runner/.v310-2-2
CONSUMER_HOME_3: /home/runner/.v310-2-3
CONSUMER_SERVICE_1: v310-2-1.service
CONSUMER_SERVICE_2: v310-2-2.service
CONSUMER_SERVICE_3: v310-2-3.service
CON1_API_PORT: 31201
CON2_API_PORT: 31202
CON3_API_PORT: 31203
CON1_GRPC_PORT: 31211
CON2_GRPC_PORT: 31212
CON3_GRPC_PORT: 31213
CON1_RPC_PORT: 31221
CON2_RPC_PORT: 31222
CON3_RPC_PORT: 31223
CON1_P2P_PORT: 31231
CON2_P2P_PORT: 31232
CON3_P2P_PORT: 31233
CON1_PPROF_PORT: 31241
CON2_PPROF_PORT: 31242
CON3_PPROF_PORT: 31243
DOWNTIME_BLOCKS: 20
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
scripts/init_consumer_assign_keys.sh
sleep 20
- name: Prepare consumer chain v310-two
env:
CONSUMER_CHAIN_ID: v310-two
CONSUMER_HOME_1: /home/runner/.v310-2-1
CONSUMER_HOME_2: /home/runner/.v310-2-2
CONSUMER_HOME_3: /home/runner/.v310-2-3
CONSUMER_SERVICE_1: v310-2-1.service
CONSUMER_SERVICE_2: v310-2-2.service
CONSUMER_SERVICE_3: v310-2-3.service
ICS_310: true
COSMOS_SDK: v47
run: |
scripts/prepare_consumer.sh
- name: Start consumer chain v310-two
env:
CONSUMER_CHAIN_ID: v310-two
CONSUMER_SERVICE_1: v310-2-1.service
CONSUMER_SERVICE_2: v310-2-2.service
CONSUMER_SERVICE_3: v310-2-3.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_1 --now
sudo systemctl enable $CONSUMER_SERVICE_2 --now
sudo systemctl enable $CONSUMER_SERVICE_3 --now
sleep 5
journalctl -u $CONSUMER_SERVICE_1
- name: _Consumer chain produces blocks> ICS v3.1.0 chain 2
env:
CON1_RPC_PORT: 31221
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for v310-two
env:
CONSUMER_CHAIN_ID: v310-two
run: |
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
if [ $RELAYER == "hermes" ]; then
echo "Creating channel with Hermes..."
hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id
hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1
elif [ $RELAYER == "rly" ]; then
echo "Creating channel with Go relayer..."
jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v310-1.json
jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json
rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v310-2 --file v310-2.json
rly transact connection v310-2
rly transact channel v310-2 --src-port consumer --dst-port provider --order ordered --version 1
fi
sudo systemctl restart $RELAYER
sleep 10
- name: _CCV channel verified> ICS v3.1.0 chain 2
env:
CON1_RPC_PORT: 31221
CONSUMER_HOME_1: /home/runner/.v310-2-1
run: tests/test_ccv_key_assignment.sh
- name: _IBC transfer successful> ICS v3.1.0 chain 2
env:
CONSUMER_CHAIN_ID: v310-two
CONSUMER_HOME_1: /home/runner/.v310-2-1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id')
channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id')
tests/test_consumer_ibc_transfer.sh $channel_id
- name: Stop validator services
env:
CONSUMER_SERVICE_2: v310-2-2.service
CONSUMER_SERVICE_3: v310-2-3.service
run: |
sudo systemctl disable $CONSUMER_SERVICE_2 --now
sudo systemctl disable $CONSUMER_SERVICE_3 --now
sleep $(($COMMIT_TIMEOUT*30))
- name: _Soft opt-out test> Validator must be jailed - 1
run: tests/test_validator_jailed.sh $VALOPER_2 true
- name: _Soft opt-out test> Validator must not be jailed
run: tests/test_validator_jailed.sh $VALOPER_3 false
- name: Unjail validator
env:
CONSUMER_SERVICE_2: v310-2-2.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_2 --now
sleep $(($COMMIT_TIMEOUT*10))
$CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1
sleep $(($COMMIT_TIMEOUT*2))
- name: _Soft opt-out test> Validator must be unjailed
run: tests/test_validator_jailed.sh $VALOPER_2 false
# - name: Stop validator services
# env:
# CONSUMER_SERVICE_2: v310-2-2.service
# run: |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now
# sleep $(($COMMIT_TIMEOUT*30))
# - name: _Soft opt-out test> Validator must be jailed - 2
# run: tests/test_validator_jailed.sh $VALOPER_2 true
Baseline-3b-icsv310-some-keys-assigned:
runs-on: ubuntu-22.04
needs: set-version-matrix-relayer
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }}
fail-fast: false
env:
COSMOVISOR_VERSION: ${{ matrix.cv_version }}
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }}
# Consumer chain variables
ICS_310: true
CONSUMER_ICS: v3.1.0
PROVIDER_ICS: v2.4.0
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0
ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd
ICS_TRANSFORM_BINARY: cd-transform
steps:
- name: start-version
run: echo ${{matrix.gaia_version}}
- name: target-version
run: echo ${{matrix.upgrade_version}}
- name: target-commit
if: ${{ matrix.upgrade_version == 'main' }}
run: |
BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}}
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name')
echo TARGET_COMMIT: $TARGET_COMMIT
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $GITHUB_PATH
echo "$HOME/.relayer" >> $GITHUB_PATH
- name: Bypass the grub-efi-amd64-signed package
run: sudo apt-mark hold grub-efi-amd64-signed
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install toml-cli
- name: Install Cosmovisor > v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }}
run: |
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Install Cosmovisor v1.3.0
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }}
run: |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION
echo "COSMOVISOR=true" >> $GITHUB_ENV
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH
- name: Select Hermes
if: ${{ matrix.relayer == 'hermes' }}
run: echo "RELAYER=hermes" >> $GITHUB_ENV
- name: Select Go Relayer
if: ${{ matrix.relayer == 'rly' }}
run: echo "RELAYER=rly" >> $GITHUB_ENV
- name: Set up relayer
run: scripts/setup_relayer.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V310_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY
wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q
chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY
- name: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V310_BINARY runs off $CONSUMER_CHAIN_V310_BINARY_URL"
- name: Start chain
env:
START_VERSION: ${{matrix.gaia_version}}
run: |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64
scripts/start_chain.sh
- name: Check Gaia log
run: sudo journalctl -u $PROVIDER_SERVICE_1
- name: Print Gaia version
run: $CHAIN_BINARY version --long
- name: Block production check
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks
- name: Add consumer chain with ICS v3.1.0
env:
COSMOS_SDK: v45
CONSUMER_CHAIN_ID: v310-one
run: |
scripts/add_consumer.sh
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
CONSUMER_HOME_2: /home/runner/.v310-1-2
CONSUMER_HOME_3: /home/runner/.v310-1-3
CONSUMER_SERVICE_1: v310-1-1.service
CONSUMER_SERVICE_2: v310-1-2.service
CONSUMER_SERVICE_3: v310-1-3.service
CON1_API_PORT: 31101
CON2_API_PORT: 31102
CON3_API_PORT: 31103
CON1_GRPC_PORT: 31111
CON2_GRPC_PORT: 31112
CON3_GRPC_PORT: 31113
CON1_RPC_PORT: 31121
CON2_RPC_PORT: 31122
CON3_RPC_PORT: 31123
CON1_P2P_PORT: 31131
CON2_P2P_PORT: 31132
CON3_P2P_PORT: 31133
CON1_PPROF_PORT: 31141
CON2_PPROF_PORT: 31142
CON3_PPROF_PORT: 31143
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
scripts/init_consumer_assign_some_keys.sh
sleep 20
- name: Prepare consumer chain v310-one
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
CONSUMER_HOME_2: /home/runner/.v310-1-2
CONSUMER_HOME_3: /home/runner/.v310-1-3
run: |
scripts/prepare_consumer.sh
- name: Start consumer chain v310-one
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_SERVICE_1: v310-1-1.service
CONSUMER_SERVICE_2: v310-1-2.service
CONSUMER_SERVICE_3: v310-1-3.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_1 --now
sleep 5
journalctl -u $CONSUMER_SERVICE_1
- name: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 31121
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for v310-one
env:
CONSUMER_CHAIN_ID: v310-one
run: |
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
if [ $RELAYER == "hermes" ]; then
echo "Creating channel with Hermes..."
hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id
hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1
elif [ $RELAYER == "rly" ]; then
echo "Creating channel with Go relayer..."
jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v310-1.json
jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json
rly paths add testnet v310-one v310-1 --file v310-2.json
rly transact connection v310-1
rly transact channel v310-1 --src-port consumer --dst-port provider --order ordered --version 1
fi
sudo systemctl restart $RELAYER
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CONSUMER_HOME_1: /home/runner/.v310-1-1
CON1_RPC_PORT: 31121
run: tests/test_ccv_key_assignment.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: v310-one
CONSUMER_HOME_1: /home/runner/.v310-1-1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY
client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id')
connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id')
channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id')
tests/test_consumer_ibc_transfer.sh $channel_id
- name: Test software upgrade for published releases
if: ${{ matrix.upgrade_version != 'main' }}
env:
DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64
run: |
echo $DOWNLOAD_URL
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: Test software upgrade for main branch
if: ${{ matrix.upgrade_version == 'main' }}
env:
DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux
run: |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15
- name: _Blocks produced after upgrade
run: |
tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10
- name: Restart relayer