-
Notifications
You must be signed in to change notification settings - Fork 95
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
score-all command #119
base: master
Are you sure you want to change the base?
score-all command #119
Conversation
* make stake pool optional, score-all command * generate validator-detail.csv * skip heavy rpc-call, ensure all validators scored * compute score * scripts * parametrize score, do not combine with --confirm * fix score-all arguments
bot/src/db.rs
Outdated
/// computed score (more granular than ValidatorStakeState) | ||
pub epoch_credits: u64, // epoch_credits is the base score | ||
pub score_discounts: ScoreDiscounts, | ||
pub commission: u8, | ||
pub active_stake: u64, | ||
pub data_center_concentration: f64, | ||
|
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.
In order to avoid breaking the existing database entries, the new fields here need to each be wrapped in an Option<>
. You might find it easier to move them all out into a single struct and wrap an Option
around just that struct
@@ -196,6 +196,15 @@ struct Config { | |||
|
|||
dry_run: bool, | |||
|
|||
/// compute score foll all validators in the cluster | |||
score_all: bool, |
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.
How about rebasing this PR on #118, where we add a Command
enum to avoid adding command-specific (ScoreAll
in this case) parameters into the Config
struct
@@ -293,7 +306,9 @@ impl Config { | |||
} | |||
|
|||
fn cluster_db_path_for(&self, cluster: Cluster) -> PathBuf { | |||
self.db_path.join(format!("data-{}", cluster)) | |||
// store db on different dir for score-all to not mess with SPL-stake-pool distribution usage | |||
let dir = if self.score_all { "score-all" } else { "data" }; |
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.
Can we avoid this change by making the db.rs changes backwards compatible ?
bot/src/main.rs
Outdated
continue; | ||
} | ||
|
||
/* -- ------------------ |
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.
Please remove this comment block
making some changes, will fix based on recommendations after our launch |
make stake pool optional, score-all command
generate validator-detail.csv
skip heavy rpc-call, ensure all validators scored
compute score
scripts
parametrize score, do not combine with --confirm
fix score-all arguments