-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add upgrade handler for v5.1 #1864
Conversation
(cherry picked from commit 7aa0952) # Conflicts: # protocol/app/upgrades.go # protocol/testing/containertest/containertest.sh # protocol/testing/containertest/preupgrade_genesis.json # protocol/testing/containertest/testnet.go
WalkthroughThe changes introduce a new version upgrade to version 5.1.0 for the protocol's application. This update includes setting a constant for the upgrade name, implementing an upgrade handler function for migrations and logging, and updating the pre-upgrade script and genesis configuration to reflect this new version. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Upgrader as Upgrader
participant ModuleManager as Module Manager
participant Logger as Logger
User->>Upgrader: Start Upgrade to v5.1.0
Upgrader->>ModuleManager: Run Migrations
ModuleManager-->>Upgrader: Migration Completed
Upgrader->>Logger: Log Upgrade Information
Logger-->>Upgrader: Information Logged
Upgrader-->>User: Upgrade Completed Successfully
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- protocol/app/upgrades/v5.1.0/constants.go (1 hunks)
- protocol/app/upgrades/v5.1.0/upgrade.go (1 hunks)
- protocol/testing/containertest/containertest.sh (1 hunks)
- protocol/testing/containertest/preupgrade_genesis.json (1 hunks)
Files skipped from review due to trivial changes (3)
- protocol/app/upgrades/v5.1.0/constants.go
- protocol/testing/containertest/containertest.sh
- protocol/testing/containertest/preupgrade_genesis.json
Additional comments not posted (3)
protocol/app/upgrades/v5.1.0/upgrade.go (3)
1-10
: LGTM!The package declaration and imports are appropriate and necessary for the functionality provided.
12-15
: LGTM!The function signature and parameters are clear and appropriate for the upgrade handler functionality.
16-20
: LGTM!The function implementation correctly unwraps the SDK context, logs the upgrade information, and runs migrations.
@@ -7,7 +7,7 @@ set -eo pipefail | |||
source "./genesis.sh" | |||
|
|||
CHAIN_ID="localdydxprotocol" | |||
PREUPGRADE_VERSION="v5.0.2" | |||
PREUPGRADE_VERSION="v5.1.0-rc1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: here and below, use v5.1.0-rc2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- protocol/testing/containertest/containertest.sh (1 hunks)
- protocol/testing/containertest/preupgrade_genesis.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- protocol/testing/containertest/containertest.sh
- protocol/testing/containertest/preupgrade_genesis.json
Changelist
Front-port from release/protocol/v5.1.x, adding upgrade handler so upgrade path of v5.0.x to v5.1.x is clear. Removed tests.
Test Plan
N/A, tested in release/protocol/v5.1.x
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit