Skip to content

Commit

Permalink
Merge branch 'main' into DEV-1698-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Sep 17, 2024
2 parents 8c335ae + 8e31bdc commit 5741ae1
Show file tree
Hide file tree
Showing 57 changed files with 11,496 additions and 247 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/delete-branch-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Retrieve post upgrade snapshot generator binary
run: |
POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION=v0.3.18
POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION=v0.4.0
DOWNLOAD_URL=https://github.com/elys-network/post-upgrade-snapshot-generator/releases/download/${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}/post-upgrade-snapshot-generator-${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}-linux-amd64
POST_UPGRADE_SNAPSHOT_GENERATOR_PATH=/tmp/post-upgrade-snapshot-generator-${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}
curl -L $DOWNLOAD_URL -o $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH && chmod +x $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# helper functions
extract_txhash() { awk -F 'txhash: ' '/txhash:/{print $2; exit}'; }
extract_proposal_id() { awk -F 'key: proposal_id|value: ' '/key: proposal_id/ { getline; gsub(/"/, "", $2); print $2; exit }'; }
extract_and_calc_upgrade_height() { awk -F'"latest_block_height":"' '{ split($2,a,"\""); print a[1]+900; exit }'; }
extract_and_calc_upgrade_height() { awk -F'"latest_block_height":"' '{ split($2,a,"\""); print a[1]+4500; exit }'; }
extract_checksum() { awk "/elysd-${{ github.ref_name }}-linux-amd64.tar.gz/ {print \$1; exit}"; }
# environment variables
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/software-upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Retrieve post upgrade snapshot generator binary
run: |
POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION=v0.3.17
POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION=v0.4.0
DOWNLOAD_URL=https://github.com/elys-network/post-upgrade-snapshot-generator/releases/download/${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}/post-upgrade-snapshot-generator-${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}-linux-amd64
POST_UPGRADE_SNAPSHOT_GENERATOR_PATH=/tmp/post-upgrade-snapshot-generator-${POST_UPGRADE_SNAPSHOT_GENERATOR_VERSION}
curl -L $DOWNLOAD_URL -o $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH && chmod +x $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
run: |
${POST_UPGRADE_SNAPSHOT_GENERATOR_PATH} chain-snapshot-export \
${SNAPSHOT_FILE_PATH} \
${NEW_BINARY_PATH} \
${OLD_BINARY_PATH} \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-submit-new-proposal.outputs.cache-hit != 'true'
Expand All @@ -173,7 +173,7 @@ jobs:
- name: Create second validator
run: |
${POST_UPGRADE_SNAPSHOT_GENERATOR_PATH} create-second-validator \
${NEW_BINARY_PATH} \
${OLD_BINARY_PATH} \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-submit-new-proposal.outputs.cache-hit != 'true'
Expand Down
8 changes: 7 additions & 1 deletion app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
m "github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

const (
// make sure to update these when you upgrade the version
NextVersion = "v0.45.1"
NextVersion = "v0.46.0"

LocalNetVersion = "v999.999.999"
)
Expand All @@ -33,6 +34,11 @@ func setUpgradeHandler(app *ElysApp) {

// Add any logic here to run when the chain is upgraded to the new version

app.Logger().Info("Deleting proposals with ID < 274")
store := ctx.KVStore(app.keys[govtypes.StoreKey])
for i := uint64(1); i < 274; i++ {
store.Delete(govtypes.ProposalKey(i))
}
}

return app.mm.RunMigrations(ctx, app.configurator, vm)
Expand Down
Loading

0 comments on commit 5741ae1

Please sign in to comment.