-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
463 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,6 @@ dependency-graph.png | |
*.synctex.gz | ||
contract_tests/* | ||
app.test | ||
|
||
mytestnet | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package alpha7 | ||
|
||
const ( | ||
UpgradeName = "alpha7" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package alpha7 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
"github.com/jackalLabs/canine-chain/types" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
logger := ctx.Logger().With("upgrade", UpgradeName) | ||
|
||
if types.IsTestnet(ctx.ChainID()) { | ||
logger.Debug("Updating to 1.2.0-alpha.7") | ||
} | ||
|
||
if types.IsMainnet(ctx.ChainID()) { | ||
logger.Debug("Ignoring alpha7 for mainnet") | ||
} | ||
|
||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Jackal v1.2.0 Upgrade Guide | ||
|
||
## Installing New Binary | ||
|
||
Clone the Jackal repo | ||
|
||
``` | ||
git clone https://github.com/JackalLabs/canine-chain.git | ||
cd canine-chain | ||
``` | ||
Checkout the upgrade version | ||
|
||
``` | ||
git fetch | ||
git checkout v1.2.0 | ||
``` | ||
|
||
Build the binary | ||
|
||
``` | ||
make build | ||
``` | ||
|
||
The resulting binary will be `canine-chain/build/canined` | ||
|
||
## Starting the Blockchain | ||
|
||
### Cosmovisor Method | ||
|
||
Ensure your chain is at the following block height: TODO | ||
|
||
**If you halted your chain early, this may not be the case. I recommend following the Canined upgrade below any situation where your node is not already at the halt height.** | ||
|
||
Copy the new binary in place of the existing genesis cosmovisor binary | ||
|
||
``` | ||
cp $HOME/canine-chain/build/canined $HOME/.canine/cosmovisor/genesis/bin/canined | ||
``` | ||
|
||
### Traditonal Method | ||
Set the halt height in the canined app config | ||
``` | ||
sed -i.bak 's/halt-height = 0/halt-height = TODO/' $HOME/.canine/config/app.toml | ||
``` | ||
|
||
Wait until the planned upgrade time (approx. Dec 19 2022, 15:00 UTC) | ||
|
||
At the uprgade time, run the binary to ensure the node syncs to the halt height | ||
|
||
``` | ||
canined start | ||
``` | ||
|
||
Once it stops due to the halt-height, replace the old canined binary with the new one: | ||
|
||
``` | ||
cp $HOME/canine-chain/build/canined $(which canined) | ||
``` | ||
|
||
Remove the halt-height from the config: | ||
|
||
``` | ||
sed -i.bak 's/halt-height = TODO/halt-height = 0/' $HOME/.canine/config/app.toml | ||
``` | ||
|
||
Restart the node: | ||
|
||
``` | ||
canined start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.