-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix(sims): check before sending RotateConsPubKey #20659
Conversation
@facundomedica your pull request is missing a changelog! |
WalkthroughWalkthroughThe recent change to the Changes
Sequence DiagramsOld FlowsequenceDiagram
participant Validator
participant StakingModule
participant ConsensusModule
Validator->>StakingModule: Request key rotation
StakingModule->>ConsensusModule: Rotate key
ConsensusModule->>StakingModule: Rotation success
StakingModule->>Validator: Rotation confirmed
New Flow with ValidationsequenceDiagram
participant Validator
participant StakingModule
participant ConsensusModule
Validator->>StakingModule: Request key rotation
StakingModule->>ConsensusModule: Check block key rotation history
ConsensusModule->>StakingModule: History result
StakingModule->>Validator: Validate rotation request
alt Rotation not previously performed
StakingModule->>ConsensusModule: Rotate key
ConsensusModule->>StakingModule: Rotation success
StakingModule->>Validator: Rotation confirmed
else Rotation already performed
StakingModule->>Validator: Rotation denied
end
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.yml
Review profile: CHILL
Files selected for processing (1)
- x/staking/simulation/operations.go (1 hunks)
Additional context used
Path-based instructions (1)
x/staking/simulation/operations.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (1)
x/staking/simulation/operations.go (1)
835-844
: Review of the added key rotation check.The implementation of the check to prevent duplicate key rotations within the same block appears to be correct and follows best practices. This addition enhances the security by ensuring that a consensus key is not rotated multiple times in the same block, which could lead to potential vulnerabilities.
* main: feat(tx): port simappv2 changes (#20648) build(deps): Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#20682) chore(proto): fix comments (#20679) (serverv2/cometbft) Commands support both json and yaml output (#20670) fix(x/staking,x/auth): regenerate mock to fix test (#20684) docs: ADR 074: Msg v2 (#20618) fix: nested multisig signatures using CLI (#20438) chore: fix spelling errors (#20674) fix: align Dockerfile for build-push-action (#20672) fix: avoid build fail when make localnet-build-env (#20671) build(deps): Bump bufbuild/buf-setup-action from 1.32.2 to 1.33.0 (#20669) chore: make function comment match function names (#20666) chore(consensus): add cometInfo to consensus (#20615) chore: fix typos (#20662) fix: Properly parse json in the wait-tx command. (#20631) fix(sims): check before sending RotateConsPubKey (#20659) test(types/address): add unit tests for the file types/address.go (#20237)
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit