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

Timlord updates state immediately, prevents race condition #1271

Merged
merged 2 commits into from
Mar 13, 2021

Conversation

mariano54
Copy link
Contributor

@mariano54 mariano54 commented Mar 13, 2021

  • The first issue is what we saw in the first epoch in testnet6. The full node was hardcoding the default difficulty if block height is < EPOCH_BLOCKS. However there were many overlapping blocks, so none of the blocks reached the height, and therefore the timelord infused the wrong difficulty.
  • The second fix is fixing a race condition in the timelord, where it took time to update the state, so it ignored the new_peak_timelord form the full_node, which should have reset the timelord to a good state.

This should be tested for a few hours on the fastest timelord in testnet6.

@mariano54 mariano54 changed the title Timlord updates state immediately, prevents race conditionn Timlord updates state immediately, prevents race condition Mar 13, 2021
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

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

+1

@hoffmang9 hoffmang9 merged commit de61385 into dev Mar 13, 2021
@hoffmang9 hoffmang9 deleted the ms.timelord_improvement branch March 13, 2021 18:03
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