-
Notifications
You must be signed in to change notification settings - Fork 18
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 rollback cmd #62
add rollback cmd #62
Conversation
Warning Rate limit exceeded@beer-1 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 7 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes introduce a new command in the Cosmos SDK and CometBFT environment for rolling back the application state to a specified block height. This rollback feature is implemented in a new file and integrated into the command-line interface, enhancing user control over application states. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant App
participant DB
participant CometBFT
User->>CLI: Execute mrollback <target_height>
CLI->>App: Retrieve server context
CLI->>DB: Connect to database
CLI->>App: Create application instance
CLI->>CometBFT: RollbackMultipleState
CometBFT-->>CLI: Rollback successful
CLI->>DB: RollbackToVersion <target_height>
DB-->>CLI: Confirm new height and hash
CLI-->>User: Output confirmation
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 4
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
Files selected for processing (3)
- cmd/minitiad/rollback.go (1 hunks)
- cmd/minitiad/root.go (1 hunks)
- go.mod (1 hunks)
Additional comments not posted (5)
cmd/minitiad/rollback.go (1)
17-58
: LGTM! The rollback command is well-implemented.The
NewMultipleRollbackCmd
function is well-structured and follows a clear sequence of steps to perform the rollback operation. It handles errors appropriately and returns informative error messages.cmd/minitiad/root.go (1)
183-185
: LGTM!The
NewMultipleRollbackCmd
command is correctly added to the root command, enhancing the functionality of the command-line interface. The command is created using the appropriate application creator function.go.mod (3)
277-277
: Using a local version ofcometbft
for development.Redirecting the
github.com/cometbft/cometbft
dependency to a local path (../cometbft
) indicates that the project is using a modified or custom version ofcometbft
for development or testing purposes. This change can facilitate easier modifications and testing of thecometbft
module.
279-279
: Using a local version ofOPinit
for development.Redirecting the
github.com/initia-labs/OPinit
dependency to a local path (../opinit
) suggests that the project is using a local version of theOPinit
module for development or testing purposes. This change can facilitate easier modifications and testing of theOPinit
module.
280-280
: Using a local version ofOPinit/api
for development.Redirecting the
github.com/initia-labs/OPinit/api
dependency to a local path (../opinit/api
) suggests that the project is using a local version of theOPinit/api
module for development or testing purposes. This change, along with the previousreplace
directive forOPinit
, indicates that both the main module and itsapi
submodule are being replaced with local versions. Using local versions can facilitate easier modifications and testing of theOPinit
andOPinit/api
modules.
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 74.35% 76.80% +2.45%
==========================================
Files 15 14 -1
Lines 1470 1410 -60
==========================================
- Hits 1093 1083 -10
+ Misses 328 280 -48
+ Partials 49 47 -2 |
Summary by CodeRabbit
New Features
Chores