-
Notifications
You must be signed in to change notification settings - Fork 4
2627 lines (2520 loc) · 123 KB
/
upgrade-gaia-v16-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 v16 Upgrade - Fresh State
on:
# repository_dispatch:
# types: [new_main_build]
# schedule:
# - cron: '0 6,14 * * 1-6'
workflow_dispatch:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Versions
VERSION_CUTOFF: v15.2.0
TARGET_VERSION: v16
# All chain variables
COMMIT_TIMEOUT: 3
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: v47
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.2
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 $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
- name: Test globalfee module
env:
COSMOS_SDK: v47
run: |
tests/test_globalfee.sh
v16-2-ibc-rate-limit:
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 }}
CHAIN_BINARY_SECONDARY: gaiad-ibc
COMMIT_TIMEOUT: 1
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: Set up relayer
run: scripts/gaia-v16/setup_relayer_rate_limit.sh
- 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_single_val.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: Installing secondary chain binaries
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
echo "Chain binary URL: $CHAIN_BINARY_URL"
echo "Installing secondary chain binary..."
wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q
chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY
- name: Start osmosis-1 chain
env:
CHAIN_SERVICE: osmosis.service
CHAIN_HOME: /home/runner/.osmosis
CHAIN_ID: osmosis-1
API_PORT: 25011
GRPC_PORT: 26011
RPC_PORT: 27011
P2P_PORT: 28011
PPROF_PORT: 29011
run: |
scripts/start_chain_secondary.sh
- name: Generate osmosis-1 channels
env:
TARGET_CHAIN_ID: osmosis-1
CLIENT_COUNT: 0
CHANNEL_START: 0
CHANNEL_END: 141
TRANSFER_CHANNEL: channel-141
RPC_PORT: 27011
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start core-1 chain
env:
CHAIN_SERVICE: core.service
CHAIN_HOME: /home/runner/.core
CHAIN_ID: core-1
API_PORT: 25021
GRPC_PORT: 26021
RPC_PORT: 27021
P2P_PORT: 28021
PPROF_PORT: 29021
run: |
scripts/start_chain_secondary.sh
- name: Generate core-1 channels
env:
TARGET_CHAIN_ID: core-1
CLIENT_COUNT: 1
CHANNEL_START: 142
CHANNEL_END: 190
TRANSFER_CHANNEL: channel-190
RPC_PORT: 27021
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start injective-1 chain
env:
CHAIN_SERVICE: injective.service
CHAIN_HOME: /home/runner/.injective
CHAIN_ID: injective-1
API_PORT: 25031
GRPC_PORT: 26031
RPC_PORT: 27031
P2P_PORT: 28031
PPROF_PORT: 29031
run: |
scripts/start_chain_secondary.sh
- name: Generate injective-1 channels
env:
TARGET_CHAIN_ID: injective-1
CLIENT_COUNT: 2
CHANNEL_START: 191
CHANNEL_END: 220
TRANSFER_CHANNEL: channel-220
RPC_PORT: 27031
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start secret-4 chain
env:
CHAIN_SERVICE: secret.service
CHAIN_HOME: /home/runner/.secret
CHAIN_ID: secret-4
API_PORT: 25041
GRPC_PORT: 26041
RPC_PORT: 27041
P2P_PORT: 28041
PPROF_PORT: 29041
run: |
scripts/start_chain_secondary.sh
- name: Generate secret-4 channels
env:
TARGET_CHAIN_ID: secret-4
CLIENT_COUNT: 3
CHANNEL_START: 221
CHANNEL_END: 235
TRANSFER_CHANNEL: channel-235
RPC_PORT: 27041
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start kaiyo-1 chain
env:
CHAIN_SERVICE: kaiyo.service
CHAIN_HOME: /home/runner/.kaiyo
CHAIN_ID: kaiyo-1
API_PORT: 25051
GRPC_PORT: 26051
RPC_PORT: 27051
P2P_PORT: 28051
PPROF_PORT: 29051
run: |
scripts/start_chain_secondary.sh
- name: Generate kaiyo-1 channels
env:
TARGET_CHAIN_ID: kaiyo-1
CLIENT_COUNT: 4
CHANNEL_START: 236
CHANNEL_END: 343
TRANSFER_CHANNEL: channel-343
RPC_PORT: 27051
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start stride-1 chain
env:
CHAIN_SERVICE: stride.service
CHAIN_HOME: /home/runner/.stride
CHAIN_ID: stride-1
API_PORT: 25061
GRPC_PORT: 26061
RPC_PORT: 27061
P2P_PORT: 28061
PPROF_PORT: 29061
run: |
scripts/start_chain_secondary.sh
- name: Generate stride-1 channels
env:
TARGET_CHAIN_ID: stride-1
CLIENT_COUNT: 5
CHANNEL_START: 344
CHANNEL_END: 391
TRANSFER_CHANNEL: channel-391
RPC_PORT: 27061
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- name: Start neutron-1 chain
env:
CHAIN_SERVICE: neutron.service
CHAIN_HOME: /home/runner/.neutron
CHAIN_ID: neutron-1
API_PORT: 25071
GRPC_PORT: 26071
RPC_PORT: 27071
P2P_PORT: 28071
PPROF_PORT: 29071
run: |
scripts/start_chain_secondary.sh
- name: Generate neutron-1 channels
env:
TARGET_CHAIN_ID: neutron-1
CLIENT_COUNT: 6
CHANNEL_START: 392
CHANNEL_END: 569
TRANSFER_CHANNEL: channel-569
RPC_PORT: 27071
run: |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
sleep 10
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT
- 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: _Test IBC rate limits - osmosis-1
env:
CHANNEL: channel-141
RATE: 0.05
RPC_PORT: 27011
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - core-1
env:
CHANNEL: channel-190
RATE: 0.01
RPC_PORT: 27021
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - injective-1
env:
CHANNEL: channel-220
RATE: 0.01
RPC_PORT: 27031
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - secret-4
env:
CHANNEL: channel-235
RATE: 0.01
RPC_PORT: 27041
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - kaiyo-1
env:
CHANNEL: channel-343
RATE: 0.01
RPC_PORT: 27051
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - stride-1
env:
CHANNEL: channel-391
RATE: 0.01
RPC_PORT: 27061
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
- name: _Test IBC rate limits - neutron-1
env:
CHANNEL: channel-569
RATE: 0.01
RPC_PORT: 27071
run: |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT
# v16-1-vesting-liquid-staking:
# 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 }}
# VESTING_AMOUNT: 110000000
# VESTING_DELEGATED_AMOUNT: 100000000
# VESTING_WALLET: cosmos1jf7j9nvjmnflal5ehaj25p7nsk2t3lkd3tj7zp
# VESTING_MNEMONIC: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon trouble"
# 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: Set up vesting account
# run: |
# echo "Adding key..."
# echo "$VESTING_MNEMONIC" | $CHAIN_BINARY keys add vesting --home $HOME_1 --recover
# echo "Creating vesting wallet..."
# start_time=$(date +%s)
# echo "start time: $start_time"
# end_time=$(date -d '10 minutes' +%s)
# echo "end time: $end_time"
# $CHAIN_BINARY tx vesting create-vesting-account \
# $VESTING_WALLET $VESTING_AMOUNT$DENOM $end_time \
# --from $WALLET_1 --home $HOME_1 \
# --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
# sleep $COMMIT_TIMEOUT
# sleep $COMMIT_TIMEOUT
# echo "Saving vesting times..."
# duration=$(echo "$end_time - $start_time" | bc -l)
# echo "duration: $duration"
# echo "vesting_start_time=$start_time" >> $GITHUB_ENV
# echo "vesting_end_time=$end_time" >> $GITHUB_ENV
# echo "vesting_duration=$duration" >> $GITHUB_ENV
# - name: Set up bonding
# run: |
# $CHAIN_BINARY tx staking validator-bond $VALOPER_1 --from $WALLET_1 --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
# - name: Delegate with vesting wallet
# run: |
# $CHAIN_BINARY q bank spendable-balances $VESTING_WALLET --home $HOME_1 -o json | jq '.'
# echo "Delegating from vesting wallet..."
# $CHAIN_BINARY tx staking delegate $VALOPER_1 $VESTING_DELEGATED_AMOUNT$DENOM \
# --from $VESTING_WALLET --home $HOME_1 \
# --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
# sleep $COMMIT_TIMEOUT
# sleep $COMMIT_TIMEOUT
# - name: Tokenize with vesting wallet
# run: |
# $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.'
# echo "vesting_start_time = $vesting_start_time"
# echo "vesting_end_time = $vesting_end_time"
# echo "vesting_duration = $vesting_duration"
# echo "Calculating vested delegation..."
# current_epoch=$(date +%s)
# echo "epoch: $current_epoch"
# elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc)
# echo "elapsed_time: $elapsed_time"
# vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l)
# echo "vested ratio: $vested_ratio"
# vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc)
# echo "vested amount: $vested_amount"
# # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
# txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash')
# echo "txhash: $txhash"
# sleep $COMMIT_TIMEOUT
# $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq '.'
# liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount')
# echo "liquid tokens: $liquid_tokens"
# if [[ "$liquid_tokens" -gt "0" ]]; then
# echo "FAIL: Greater than zero amount in liquid tokens balance."
# exit 0
# else
# echo "PASS: No liquid tokens balance."
# fi
# - 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 3
# - name: Tokenize with vesting wallet
# run: |
# $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.'
# echo "vesting_start_time = $vesting_start_time"
# echo "vesting_end_time = $vesting_end_time"
# echo "vesting_duration = $vesting_duration"
# echo "Calculating vested delegation..."
# current_epoch=$(date +%s)
# echo "epoch: $current_epoch"
# elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc)
# echo "elapsed_time: $elapsed_time"
# vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l)
# echo "vested ratio: $vested_ratio"
# vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc)
# echo "vested amount: $vested_amount"
# # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y
# txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash')
# echo "txhash: $txhash"
# sleep $COMMIT_TIMEOUT
# $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1")'
# liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount')
# echo "liquid tokens: $liquid_tokens"
# if [[ "$liquid_tokens" -gt "0" ]]; then
# echo "PASS: Greater than zero amount in liquid tokens balance."
# else
# echo "FAIL: No liquid tokens balance."
# exit 0
# fi
Baseline-3-icsv330:
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
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
CONSUMER_ICS: v3.3.0
PROVIDER_ICS: v3.3.0
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
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
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' }}