-
Notifications
You must be signed in to change notification settings - Fork 0
fix: make block query cutoff properly configurable #181
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: main
Are you sure you want to change the base?
Conversation
src/config.rs
Outdated
|
|
||
| /// Number of seconds before the end of the slot to stop querying for new blocks | ||
| #[from_env( | ||
| var = "BLOCK_QUERY_CUTOFF_SECS", |
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.
let's change to BLOCK_QUERY_CUTOFF
src/config.rs
Outdated
| desc = "Number of seconds before the end of the slot to stop querying for new blocks", | ||
| default = 2 | ||
| )] | ||
| pub block_query_cutoff_secs: u64, |
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.
ditto, for consistency with other services
Evalir
left a comment
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.
Actually, disregard the other review. This should be called BLOCK_QUERY_CUTOFF_BUFFER
| #[from_env( | ||
| var = "BLOCK_QUERY_CUTOFF_BUFFER", | ||
| desc = "Number of seconds before the end of the slot to stop querying for new blocks", | ||
| default = 2 |
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.
default should be 3
prestwich
left a comment
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.
seconds is not enough resolution. needs to be milliseconds

fix: make block query cutoff properly configurable
At some point in the past, the block query cutoff configuration value was removed and a hard-coded value was added in.
This PR adds the block query cutoff back into the config and uses the config value in the
calculate_deadline function.Builder example environment documentation needs to be updated to reflect this change.