-
Notifications
You must be signed in to change notification settings - Fork 21
Consolidation target #644
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
base: master
Are you sure you want to change the base?
Consolidation target #644
Conversation
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
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.
Pull request overview
This PR adds support for specifying a target validator when consolidating validators. The consolidation logic now accepts an optional target_public_key parameter, allowing users to designate a specific validator as the consolidation target rather than automatically selecting one.
Changes:
- Added
target_public_keyparameter to the consolidation flow with validation logic - Bumped version from v4.1.4 to v4.1.5 across documentation and configuration files
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/commands/consolidate.py | Added target_public_key parameter and validation logic for target validator selection |
| scripts/install.sh | Updated default version to v4.1.5 |
| pyproject.toml | Updated package version to v4.1.5 |
| README.md | Updated docker image version references to v4.1.5 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: cyc60 <avsysoev60@gmail.com>
| if target_validator.status in EXITING_STATUSES: | ||
| raise click.ClickException( | ||
| f'Target validator {target_public_key} is in exiting ' | ||
| f'status {target_validator.status.value}.' | ||
| ) | ||
| if target_validator.index in consolidating_indexes: | ||
| raise click.ClickException( | ||
| f'Target validator {target_public_key} is consolidating to another validator.' | ||
| ) | ||
| if target_validator.public_key in exclude_public_keys: | ||
| raise click.ClickException( | ||
| f'Target validator {target_public_key} is excluded from consolidation.' | ||
| ) |
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.
Those checks already done on lines 615-620
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.
Use target_validator_candidates instead of all_validators
| raise click.ClickException( | ||
| f'Target validator {target_public_key} is excluded from consolidation.' | ||
| ) | ||
| if not target_validator.is_compounding: |
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.
You could pick target validator from target_validator_candidates using target_public_key. Then is_compounding check is unnecessary.
No description provided.