Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] upgrade/chain halt recovery #837

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

[Docs] upgrade/chain halt recovery #837

wants to merge 41 commits into from

Conversation

okdas
Copy link
Member

@okdas okdas commented Sep 24, 2024

Summary

Performed the first upgrade on the Alpha TestNet. Add some documentation changes to prevent some issues in the future.

Issue

N/A

Type of change

Select one or more from the following:

Testing

  • Documentation: make docusaurus_start; only needed if you make doc changes
  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

@okdas okdas self-assigned this Sep 24, 2024
@okdas okdas added the documentation Improvements or additions to documentation label Sep 24, 2024
@okdas okdas added this to the Shannon Beta TestNet Launch milestone Sep 24, 2024
@okdas okdas requested a review from Olshansk September 24, 2024 23:50
@okdas okdas changed the title [Upgrades] Document learnings from the past upgrade [Upgrades] Document learnings from the last upgrade Sep 25, 2024
@okdas
Copy link
Member Author

okdas commented Sep 26, 2024

Items to add:

  • Configure cosmovisor to create backups before upgrade
  • Have more bump validators to 5.
  • Instructions on how to test the upgrade locally. Thinking a script w/o LocalNet.

@Olshansk
Copy link
Member

@okdas Let's add the details here as well: https://x.com/olshansky/status/1846211059989778741

@okdas okdas marked this pull request as ready for review October 17, 2024 01:18
@okdas
Copy link
Member Author

okdas commented Oct 17, 2024

@Olshansk can I get a review on this PR, please?

I think I want to investigate/add information about the new Cosmovisor feature mentioned in cosmos-sdk slack, but I'll look into that later. :)

@okdas okdas changed the title [Upgrades] Document learnings from the last upgrade [Upgrades] Document upgrade/chain halt recovery Oct 17, 2024
@okdas okdas changed the title [Upgrades] Document upgrade/chain halt recovery [Docs] upgrade/chain halt recovery Oct 17, 2024
Copy link

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 837)
Grafana network dashboard for devnet-issue-837

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Oct 17, 2024
@okdas okdas requested a review from Olshansk November 19, 2024 00:41
@okdas
Copy link
Member Author

okdas commented Nov 19, 2024

@okdas Lmk when this is ready for another look.

It is ready now! Thanks!

Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great docs @okdas! 🙌 😍

app/upgrades/historical.go Outdated Show resolved Hide resolved
docusaurus/docs/protocol/upgrades/contigency_plans.md Outdated Show resolved Hide resolved

## Submitting the upgrade on-chain

The `MsgSoftwareUpgrade` can be submitted using the following command:

```bash
poktrolld tx authz exec PATH_TO_TRANSACTION_JSON --from pnf
poktrolld tx authz exec $PATH_TO_UPGRADE_TRANSACTION_JSON --from=pnf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make target?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command needs to be adjusted for different networks, I'd prefer the PNF/TestNet Devs to write the full CLI command.

docusaurus/docs/protocol/upgrades/upgrade_procedure.md Outdated Show resolved Hide resolved

5. **(`old` repo)** - Clean up and generate an empty genesis using the old version.
```bash
rm -rf ~/.poktroll && ./release_binaries/poktroll_darwin_arm64 comet unsafe-reset-all && make localnet_regenesis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make target?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these commands, I want a developer to 100% understand what they are doing, checking all arguments.


8. **(`old` repo)** Submit the upgrade transaction. **Note:** The upgrade height in the transaction should be higher than the current block height. Adjust and submit if necessary:
```bash
./release_binaries/poktroll_darwin_arm64 tx authz exec tools/scripts/upgrades/local_test_v0.2.json --from=pnf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make target?

Note: we can use env vars to pass arguments (see: poktroll_addr, acc_balance_query, query_tx, etc.).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these commands, I want a developer to 100% understand what they are doing, checking all arguments.

@okdas
Copy link
Member Author

okdas commented Nov 27, 2024

@Olshansk I noticed you started reviewing this. I addressed @bryanchriswhite review and pushed more changes to the branch. Just FYI.

Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a bunch of changes. A couple lingering comments but g2g afterwards!


.PHONY: localnet_show_upgrade_plan
localnet_show_upgrade_plan: ## Shows the upgrade plan on local node
poktrolld query upgrade plan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto regarding --home=$(POKTROLLD_HOME) --node $(POCKET_NODE) here too?


.PHONY: localnet_cancel_upgrade
localnet_cancel_upgrade: ## Cancels the planed upgrade on local node
poktrolld tx authz exec tools/scripts/upgrades/authz_cancel_upgrade_tx.json --gas=auto --from=pnf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Don't we need to --home=$(POKTROLLD_HOME) q bank balances $(ACC) --node $(POCKET_NODE)
  2. Don't we need to add fees?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devnet devnet-test-e2e documentation Improvements or additions to documentation push-image CI related - pushes images to ghcr.io
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

3 participants