-
Notifications
You must be signed in to change notification settings - Fork 242
only last leader in epoch can pin #4451
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
Conversation
97f0ad2
to
7957c70
Compare
After some discussion with @hanssv we realized that this won't work, because in the micro block before a key block, the leader is not updated... Leaders are updated in Opened issue #4453 to get a solution on that. |
de71e9b
to
28f4a7f
Compare
28f4a7f
to
247533a
Compare
247533a
to
ff62e72
Compare
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.
Looked at it, but as initiator I cannot approve
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.
Sure, I can live with this. Once the pinning agent is up, these "artificial test will likely be removed, or at least changed quite a bit.
Fixes Issue #4448 in a particular way.
Instead of carrying around who the last leader is in the epochs (which resulted in rather complex code and unsatisfactory solution for first two epochs), decided to keep the contract simple and enforce pin call to be added to the last micro block. In that way, it is easy to check who the leader is.
Up to debate when to clear the PIN. If done in
step_eoe
then inspecting the last key block will not show it. Hence one needs to look before that. If done instep
then extra check needed that this is first block of epoch or reset to NONE in each call (since one cannot set it anyway).This PR is supported by the Aeternity foundation