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

[DMNs] Chainlock optimizations #2884

Closed

Conversation

panleone
Copy link

@panleone panleone commented Sep 9, 2023

This PR refactor and fixes bugs of the ChainLock class:

Refactor:

  • Remove unused variable from UpdatedBlockTip
  • Decouple init/destroy and start/stop steps as we do for all llmq classes
  • Use LookUpBlockIndex in place of mapblockindex
  • Decouple the chainlock signing part from UpdateBlockTip to a new function TrySignChainTip
  • Make EnforceBestChainLock the only function where blocks can be invalidated
  • Use a local scheduler instead of the global one

Bug fixes:

  • Call EnforceBestChainLock only throught the scheduler to avoid recursions
  • Don't ban peers if the received chainlock is not valid since it could simply means that the node is not fully synced yet
  • Remove non used locks/ lock only when it's necessary
  • Improve the functional test that was failing

@panleone panleone self-assigned this Sep 9, 2023
@panleone panleone added this to the 6.0.0 milestone Sep 9, 2023
@panleone panleone force-pushed the chainlocks_optimizations branch 2 times, most recently from 1f10b36 to 81c46c0 Compare September 13, 2023 17:39
@panleone panleone force-pushed the chainlocks_optimizations branch 4 times, most recently from 29c5ba5 to edddada Compare September 14, 2023 10:13
@panleone panleone removed their assignment Apr 7, 2024
@panleone panleone removed this from the 6.0.0 milestone Apr 7, 2024
@panleone panleone closed this Apr 7, 2024
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.

1 participant