Skip to content

Commit 5288b40

Browse files
authored
chore: remove union-testnet-4 migrations (#1120)
2 parents 4424893 + 27f8c9f commit 5288b40

File tree

6 files changed

+30
-102
lines changed

6 files changed

+30
-102
lines changed

e2e/upgrades.nix

+29-41
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
let
33
unionvisorBin = pkgs.lib.meta.getExe unionvisor;
44

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+
# '';
2525

2626
forEachNode = f: ''
2727
${f "0"}
@@ -30,20 +30,20 @@ let
3030
${f "3"}
3131
'';
3232

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'))
3636

37-
time.sleep(6)
37+
# time.sleep(6)
3838

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)
4040

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'))")}
4242

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)
4444

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+
# '';
4747
in
4848
{
4949
upgrade-from-genesis = e2e.mkTest {
@@ -57,10 +57,6 @@ in
5757
5858
# Ensure the union network commits more than one block
5959
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}
6460
'';
6561

6662
nodes = {
@@ -82,14 +78,6 @@ in
8278
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")
8379
time.sleep(6)
8480
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 ]]")
9381
'';
9482

9583
nodes = {

uniond/app/upgrades.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ package app
33
import (
44
"fmt"
55
"union/app/upgrades"
6-
"union/app/upgrades/v0_15_0"
7-
"union/app/upgrades/v0_17_0"
86

97
upgradetypes "cosmossdk.io/x/upgrade/types"
108
)
119

12-
var Upgrades = []upgrades.Upgrade{v0_15_0.Upgrade, v0_17_0.Upgrade}
10+
var Upgrades = []upgrades.Upgrade{}
1311

1412
// configure store loader that checks if version == upgradeHeight and applies store upgrades
1513
func (app *UnionApp) setupUpgradeStoreLoaders() {

uniond/app/upgrades/v0_15_0/constants.go

-14
This file was deleted.

uniond/app/upgrades/v0_15_0/upgrade.go

-15
This file was deleted.

uniond/app/upgrades/v0_17_0/constants.go

-14
This file was deleted.

uniond/app/upgrades/v0_17_0/upgrade.go

-15
This file was deleted.

0 commit comments

Comments
 (0)