-
Notifications
You must be signed in to change notification settings - Fork 53
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
[DRB] - Store DRB seed and epoch root with consistent block info #4019
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.
I think this looks good to me, just a few minor comments
crates/task-impls/src/helpers.rs
Outdated
} else { | ||
tracing::warn!( | ||
"No decided leaf while a view has been decided, which should be impossible." | ||
); |
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.
I feel like this might sometimes happen with the way our code is written, but I'm not 100% sure either way. I don't think we necessarily need to log here, but no strong opinion
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.
Changed this to an info
log and removed "which should be impossible", to still log something but not indicate an error.
crates/task-impls/src/helpers.rs
Outdated
tracing::warn!( | ||
"No decided leaf while a view has been decided, which should be impossible." |
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.
same 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.
Same change as above.
// Skip if we are not in the committee of the next epoch. | ||
if !task_state | ||
.membership | ||
.read() | ||
.await | ||
.has_stake(&task_state.public_key, current_epoch_number + 1) | ||
{ | ||
return Ok(()); | ||
} |
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.
does it make sense to remove the has_stake
check here too?
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.
Removed!
Closes #3998. Closes #4008.
This PR:
store_received_drb_result
insidestore_drb_seed_and_result
to handle storing the seed, the received result, and the computed result together.store_drb_seed_and_result
to use the decided block rather than the newly proposed block for storing the DRB seed.decide_from_proposal_add_epoch_root
todecide_epoch_root
.decide_epoch_root
for adding epoch root.