|
2 | 2 | let
|
3 | 3 | unionvisorBin = pkgs.lib.meta.getExe unionvisor;
|
4 | 4 |
|
5 |
| - mkUpgradeProposal = version: height: pkgs.runCommand "upgrade-proposal" { } '' |
6 |
| - mkdir -p $out |
7 |
| - echo '{ |
8 |
| - "messages": [ |
9 |
| - { |
10 |
| - "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", |
11 |
| - "authority": "union10d07y265gmmuvt4z0w9aw880jnsr700js4jdcz", |
12 |
| - "plan": { |
13 |
| - "name": "${version}", |
14 |
| - "height": "${toString height}", |
15 |
| - "info": "${version}" |
16 |
| - } |
17 |
| - } |
18 |
| - ], |
19 |
| - "deposit": "15000000stake", |
20 |
| - "title": "${version}", |
21 |
| - "summary": "Upgrade to ${version}" |
22 |
| - }' > proposal-${version}.json |
23 |
| - mv proposal-${version}.json $out |
24 |
| - ''; |
| 5 | + # mkUpgradeProposal = version: height: pkgs.runCommand "upgrade-proposal" { } '' |
| 6 | + # mkdir -p $out |
| 7 | + # echo '{ |
| 8 | + # "messages": [ |
| 9 | + # { |
| 10 | + # "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", |
| 11 | + # "authority": "union10d07y265gmmuvt4z0w9aw880jnsr700js4jdcz", |
| 12 | + # "plan": { |
| 13 | + # "name": "${version}", |
| 14 | + # "height": "${toString height}", |
| 15 | + # "info": "${version}" |
| 16 | + # } |
| 17 | + # } |
| 18 | + # ], |
| 19 | + # "deposit": "15000000stake", |
| 20 | + # "title": "${version}", |
| 21 | + # "summary": "Upgrade to ${version}" |
| 22 | + # }' > proposal-${version}.json |
| 23 | + # mv proposal-${version}.json $out |
| 24 | + # ''; |
25 | 25 |
|
26 | 26 | forEachNode = f: ''
|
27 | 27 | ${f "0"}
|
|
30 | 30 | ${f "3"}
|
31 | 31 | '';
|
32 | 32 |
|
33 |
| - upgradeTo = version: height: '' |
34 |
| - union.succeed('docker cp ${mkUpgradeProposal version height}/proposal-${version}.json devnet-minimal-uniond-0-1:/proposal-${version}.json') |
35 |
| - print(union.succeed('docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} --root . call --bundle /bundle -- tx gov submit-proposal proposal-${version}.json --from val-0 --keyring-backend test --home ./home -y --gas 3000000000')) |
| 33 | + # upgradeTo = version: height: '' |
| 34 | + # union.succeed('docker cp ${mkUpgradeProposal version height}/proposal-${version}.json devnet-minimal-uniond-0-1:/proposal-${version}.json') |
| 35 | + # print(union.succeed('docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} --root . call --bundle /bundle -- tx gov submit-proposal proposal-${version}.json --from val-0 --keyring-backend test --home ./home -y --gas 3000000000')) |
36 | 36 |
|
37 |
| - time.sleep(6) |
| 37 | + # time.sleep(6) |
38 | 38 |
|
39 |
| - union.wait_until_succeeds("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query gov proposal ${toString (height / 10)} --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.status == \"PROPOSAL_STATUS_VOTING_PERIOD\"') == true ]]", timeout=30) |
| 39 | + # union.wait_until_succeeds("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query gov proposal ${toString (height / 10)} --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.status == \"PROPOSAL_STATUS_VOTING_PERIOD\"') == true ]]", timeout=30) |
40 | 40 |
|
41 |
| - ${forEachNode (id: "print(union.succeed('docker exec devnet-minimal-uniond-${id}-1 ${unionvisorBin} --root . call --bundle /bundle -- tx gov vote ${toString (height / 10)} yes --keyring-backend test --from val-${id} --home ./home -y'))")} |
| 41 | + # ${forEachNode (id: "print(union.succeed('docker exec devnet-minimal-uniond-${id}-1 ${unionvisorBin} --root . call --bundle /bundle -- tx gov vote ${toString (height / 10)} yes --keyring-backend test --from val-${id} --home ./home -y'))")} |
42 | 42 |
|
43 |
| - union.wait_until_succeeds("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query gov proposal ${toString (height / 10)} --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.status == \"PROPOSAL_STATUS_PASSED\"') == true ]]", timeout=30) |
| 43 | + # union.wait_until_succeeds("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query gov proposal ${toString (height / 10)} --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.status == \"PROPOSAL_STATUS_PASSED\"') == true ]]", timeout=30) |
44 | 44 |
|
45 |
| - union.wait_until_succeeds('[[ $(curl "http://localhost:26660/block" --fail --silent | ${pkgs.lib.meta.getExe pkgs.jq} ".result.block.header.height | tonumber > ${toString height}") == "true" ]]') |
46 |
| - ''; |
| 45 | + # union.wait_until_succeeds('[[ $(curl "http://localhost:26660/block" --fail --silent | ${pkgs.lib.meta.getExe pkgs.jq} ".result.block.header.height | tonumber > ${toString height}") == "true" ]]') |
| 46 | + # ''; |
47 | 47 | in
|
48 | 48 | {
|
49 | 49 | upgrade-from-genesis = e2e.mkTest {
|
|
57 | 57 |
|
58 | 58 | # Ensure the union network commits more than one block
|
59 | 59 | union.wait_until_succeeds('[[ $(curl "http://localhost:26660/block" --fail --silent | ${pkgs.lib.meta.getExe pkgs.jq} ".result.block.header.height | tonumber > 1") == "true" ]]')
|
60 |
| -
|
61 |
| - ${upgradeTo "v0.15.0" 10} |
62 |
| - # We skip v0.16.0 as it was never deployed |
63 |
| - ${upgradeTo "v0.17.0" 20} |
64 | 60 | '';
|
65 | 61 |
|
66 | 62 | nodes = {
|
|
82 | 78 | union.succeed("docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} --root . call --bundle /bundle -- tx tokenfactory create-denom bazinga --from val-0 --keyring-backend test --home ./home -y --gas 3000000000")
|
83 | 79 | time.sleep(6)
|
84 | 80 | union.succeed("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query tokenfactory denom-authority-metadata factory/union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw/bazinga --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.authority_metadata.admin == \"union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw\"') == true ]]")
|
85 |
| -
|
86 |
| - ${upgradeTo "v0.15.0" 10} |
87 |
| - union.succeed("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query tokenfactory denom-authority-metadata factory/union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw/bazinga --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.authority_metadata.admin == \"union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw\"') == true ]]") |
88 |
| -
|
89 |
| - # We skip v0.16.0 as it was never deployed |
90 |
| -
|
91 |
| - ${upgradeTo "v0.17.0" 20} |
92 |
| - union.succeed("[[ $(docker exec devnet-minimal-uniond-0-1 ${unionvisorBin} -l off --root . call --bundle /bundle -- query tokenfactory denom-authority-metadata factory/union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw/bazinga --home ./home --output json | ${pkgs.lib.meta.getExe pkgs.jq} '.authority_metadata.admin == \"union14fldwd959h7glh2e3k45veuqfszvgm69q07jhw\"') == true ]]") |
93 | 81 | '';
|
94 | 82 |
|
95 | 83 | nodes = {
|
|
0 commit comments