Skip to content

Commit

Permalink
chore: retagging with v4.0.2 to prevent dual tagging of same commit (#…
Browse files Browse the repository at this point in the history
…440)

* retagging with v4.0.2 to prevent dual tagging of same commit and same tag name

* fixing test

---------

Signed-off-by: Spoorthi <[email protected]>
  • Loading branch information
spoo-bar authored Aug 31, 2023
1 parent 424d7f7 commit 23404f9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ Contains bug fixes.
Contains all the PRs that improved the code without changing the behaviours.
-->

## [main]
## [v4.0.2]

### Changed

- [#440](https://github.com/archway-network/archway/pull/440) - Retagging with v4.0.2 to prevent dual tagging of same commit and same tag name

### Fixed

Expand All @@ -38,7 +42,7 @@ Contains all the PRs that improved the code without changing the behaviours.

### Fixed

- [#437](https://github.com/archway-network/archway/pull/437) - adding upgrade handler with missing burn permissions for feecollector account
- [#437](https://github.com/archway-network/archway/pull/437) - Adding upgrade handler with missing burn permissions for feecollector account

## [v4.0.0]

Expand Down
4 changes: 2 additions & 2 deletions app/app_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
upgrade2_0_0 "github.com/archway-network/archway/app/upgrades/2_0_0"
upgrade3_0_0 "github.com/archway-network/archway/app/upgrades/3_0_0"
upgrade4_0_0 "github.com/archway-network/archway/app/upgrades/4_0_0"
upgrade4_0_1 "github.com/archway-network/archway/app/upgrades/4_0_1"
upgrade4_0_2 "github.com/archway-network/archway/app/upgrades/4_0_2"
)

// UPGRADES
Expand All @@ -22,7 +22,7 @@ var Upgrades = []upgrades.Upgrade{
upgrade2_0_0.Upgrade, // v2.0.0
upgrade3_0_0.Upgrade, // v3.0.0
upgrade4_0_0.Upgrade, // v4.0.0
upgrade4_0_1.Upgrade, // v4.0.1
upgrade4_0_2.Upgrade, // v4.0.2
}

func (app *ArchwayApp) setupUpgrades() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package upgrade4_0_1
package upgrade4_0_2

import (
"fmt"
Expand All @@ -13,7 +13,7 @@ import (
"github.com/archway-network/archway/app/upgrades"
)

const Name = "v4.0.1"
const Name = "v4.0.2"

var Upgrade = upgrades.Upgrade{
UpgradeName: Name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package upgrade4_0_1_test
package upgrade4_0_2_test

import (
"fmt"
Expand Down Expand Up @@ -78,7 +78,7 @@ func (suite *UpgradeTestSuite) TestUpgrade() {
tc.pre_upgrade()

ctx := suite.archway.GetContext().WithBlockHeight(dummyUpgradeHeight - 1)
plan := upgradetypes.Plan{Name: "v4.0.1", Height: dummyUpgradeHeight}
plan := upgradetypes.Plan{Name: "v4.0.2", Height: dummyUpgradeHeight}
upgradekeeper := suite.archway.GetApp().UpgradeKeeper
err := upgradekeeper.ScheduleUpgrade(ctx, plan)
suite.Require().NoError(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// To run this test, you will need the following heighliner images
// heighliner build --org archway-network --repo archway --dockerfile cosmos --build-target "make build" --build-env "BUILD_TAGS=muslc" --binaries "build/archwayd" --git-ref v2.0.0 --tag v2.0.0 -c archway
// heighliner build --org archway-network --repo archway --dockerfile cosmos --build-target "make build" --build-env "BUILD_TAGS=muslc" --binaries "build/archwayd" --git-ref v4.0.0 --tag v4.0.0 -c archway
// heighliner build --org archway-network --repo archway --dockerfile cosmos --build-target "make build" --build-env "BUILD_TAGS=muslc" --binaries "build/archwayd" --git-ref v4.0.1 --tag v4.0.1 -c archway
// heighliner build --org archway-network --repo archway --dockerfile cosmos --build-target "make build" --build-env "BUILD_TAGS=muslc" --binaries "build/archwayd" --git-ref v4.0.2 --tag v4.0.2 -c archway
func TestFeeCollectorBurnChainUpgrade(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
Expand All @@ -37,7 +37,7 @@ func TestFeeCollectorBurnChainUpgrade(t *testing.T) {
queryRes2 := getModuleAccount(t, ctx, authtypes.FeeCollectorName, archwayChain)
require.Len(t, queryRes2.Account.Permissions, 0, "feecollector should not have burn permissions in v2.0.0")

// Upgrading to v4.0.0 => Not directly upgrading to v4.0.1 to simulate how things went on constantine.
// Upgrading to v4.0.0 => Not directly upgrading to v4.0.2 to simulate how things went on constantine.
haltHeight := submitUpgradeProposalAndVote(t, ctx, "v4.0.0", archwayChain, chainUser)
height, err := archwayChain.Height(ctx)
require.NoError(t, err, "cound not fetch height before upgrade")
Expand All @@ -59,8 +59,8 @@ func TestFeeCollectorBurnChainUpgrade(t *testing.T) {
queryRes4 := getModuleAccount(t, ctx, authtypes.FeeCollectorName, archwayChain)
require.Len(t, queryRes4.Account.Permissions, 0, "feecollector should not have burn permissions in v4.0.0")

// Upgrading to v4.0.1
haltHeight = submitUpgradeProposalAndVote(t, ctx, "v4.0.1", archwayChain, chainUser)
// Upgrading to v4.0.2
haltHeight = submitUpgradeProposalAndVote(t, ctx, "v4.0.2", archwayChain, chainUser)
height, err = archwayChain.Height(ctx)
require.NoError(t, err, "cound not fetch height before upgrade")
testutil.WaitForBlocks(timeoutCtx, int(haltHeight-height)+1, archwayChain)
Expand All @@ -69,18 +69,18 @@ func TestFeeCollectorBurnChainUpgrade(t *testing.T) {
require.Equal(t, int(haltHeight), int(height), "height is not equal to halt height")
err = archwayChain.StopAllNodes(ctx)
require.NoError(t, err, "could not stop node(s)")
archwayChain.UpgradeVersion(ctx, client, chainName, "v4.0.1")
archwayChain.UpgradeVersion(ctx, client, chainName, "v4.0.2")
err = archwayChain.StartAllNodes(ctx)
require.NoError(t, err, "could not start upgraded node(s)")
timeoutCtx, timeoutCtxCancel = context.WithTimeout(ctx, time.Second*45)
defer timeoutCtxCancel()
err = testutil.WaitForBlocks(timeoutCtx, int(blocksAfterUpgrade), archwayChain)
require.NoError(t, err, "chain did not produce blocks after upgrade")

// Ensuring feecollector HAS burn permissions in v4.0.1
// Ensuring feecollector HAS burn permissions in v4.0.2
queryRes401 := getModuleAccount(t, ctx, authtypes.FeeCollectorName, archwayChain)
require.Len(t, queryRes401.Account.Permissions, 1, "feecollector should have one permissions in v4.0.1")
require.Equal(t, authtypes.Burner, queryRes401.Account.Permissions[0], "feecollector should have burn permissions in v4.0.1")
require.Len(t, queryRes401.Account.Permissions, 1, "feecollector should have one permissions in v4.0.2")
require.Equal(t, authtypes.Burner, queryRes401.Account.Permissions[0], "feecollector should have burn permissions in v4.0.2")
}

func getModuleAccount(t *testing.T, ctx context.Context, moduleAccountName string, archwayChain *cosmos.CosmosChain) QueryModuleAccountResponse {
Expand Down
4 changes: 2 additions & 2 deletions interchaintest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
)

const (
initialVersion = "v4.0.0" // The last release of the chain. The one the mainnet is running on
upgradeName = "v4.0.1" // The next upgrade name. Should match the upgrade handler.
initialVersion = "v4.0.1" // The last release of the chain. The one the mainnet is running on
upgradeName = "v4.0.2" // The next upgrade name. Should match the upgrade handler.
chainName = "archway"
)

Expand Down

0 comments on commit 23404f9

Please sign in to comment.