-
Notifications
You must be signed in to change notification settings - Fork 17
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
refactor: bls_aggr
encapsulate task initialization params in TaskMetadata
#254
base: main
Are you sure you want to change the base?
Conversation
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.
Left some minor comments
CHANGELOG.md
Outdated
```rust | ||
let metadata = TaskMetadata::new( | ||
task_index, | ||
block_number, | ||
quorum_numbers, | ||
quorum_threshold_percentages, | ||
time_to_expiry, | ||
) | ||
.with_window_duration(window_duration); | ||
bls_agg_service.initialize_new_task(metadata).await.unwrap(); | ||
``` |
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.
We should have before and after examples here. One for initialize_new_task
and another with initialize_new_task_with_window
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.
Done 7730ed1! What do you think about the format?
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.
The "before" and "after" don't render correctly in markdown. We could have them as code comments instead
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.
Really good format otherwise!
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
Co-authored-by: Tomás Grüner <[email protected]>
What Changed?
This PR introduces a refactor in task initialization by encapsulating related parameters into a new struct and simplifying function interfaces.
TaskMetadata
with a constructorTaskMetadata::new
to initialize a new task andwith_window_duration
to set the window duration.initialize_new_task
andsingle_task_aggregator
acceptTaskMetadata
instead of multiple params.initialize_new_task_with_window
.Reviewer Checklist
changelog-X
labels (if applies)