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

fix: added MAXIMUM_GOSSIP_CLOCK_DISPARITY into account to distinguish future slots #1316

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rodrigo-o
Copy link
Collaborator

@rodrigo-o rodrigo-o commented Oct 2, 2024

Motivation

This PR fixes an issue where some blocks where ignored (6000656 started at 21.11.12 for us)
WARNING 21:11:11.831 [Gossip] Block ignored, reason: "Block is from the future: block.slot=6000656. Current slot: 6000655.".

Description
In fact, the blocks where being received in time, just a couple of milliseconds before we made the transition, having into account MAXIMUM_GOSSIP_CLOCK_DISPARITY in the calculation, allow us to process the block at the time.

I also moved the current_slot function from Store to ForkChoice, to have both depending on the same calculation. There is an outstanding function that previously used the old Clock.get_current_time/0 that is using the system time since then, I added a comment where it is used for future reference, the function is: get_current_chain_slot/0.

Resolves #1315

@rodrigo-o
Copy link
Collaborator Author

After various tests, I've spotted no more warnings related to blocks being received a couple of milliseconds before. while still seeing them in the main branch, specially at different times of the day.

@rodrigo-o rodrigo-o marked this pull request as ready for review October 2, 2024 15:02
@rodrigo-o rodrigo-o requested a review from a team as a code owner October 2, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
1 participant