Skip to content
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

Change endorsements #3004

Merged
merged 8 commits into from
Sep 13, 2022
Merged

Change endorsements #3004

merged 8 commits into from
Sep 13, 2022

Conversation

adrien-zinger
Copy link
Contributor

#2976

On processing a slot, select the latest block on the same thread as endorsed block.
Target the current slot to check the endorsements for the best parent.

We need to PoS-select endorsement creators that are allowed to be included in blocks at slot (period, thread).
The endorsements selected at (period, thread) are created/emitted at time genesis_timestamp + period * t0 + thread * (t0/thread_count) - t0/2 and endorse the latest blockclique (or final) block of their thread.
@adrien-zinger adrien-zinger self-assigned this Sep 13, 2022
@adrien-zinger adrien-zinger requested a review from damip September 13, 2022 07:14
adrien-zinger and others added 2 commits September 13, 2022 10:07
Avoid useless lock, cleanup useless index by threads in storage.
Co-authored-by: Damir Vodenicarevic <damipator@gmail.com>
@damip
Copy link
Member

damip commented Sep 13, 2022

Some things to check:

  • in the endorsement pool, when we prune the pool after receiving a finality notification from consensus, now we should remove all endorsements whose slot <= latest_final_slot[endorsement.thread]
  • in the endorsement factory, when creating an endorsement that will be included in slot S, we should produce the endorsement at time(S) - t0/2
  • make sure we don't create endorsements to be included in period 0

Fix pruning methods old endorsements
Short circuit at the first clique on looking latest BC block
Change next slot timings
Copy link
Member

@damip damip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's not merge yet tho (breaking)

@damip damip mentioned this pull request Sep 13, 2022
@damip damip changed the base branch from main to prepare_testnet_15 September 13, 2022 14:54
@damip damip merged commit 12c7e42 into prepare_testnet_15 Sep 13, 2022
@AurelienFT AurelienFT deleted the change_endorsements branch May 29, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants