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

Improve reliability of the database provider health check #276

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dvush
Copy link
Contributor

@dvush dvush commented Dec 10, 2024

📝 Summary

  1. It fixes +1 error in the check_provider_factory_health method. We need to check last 256 blocks for the block that we are building right now and that mean we need to include latest committed block to the checking range but we were excluding that.
  2. It adds additional last check to eliminate possibility of having broken database transaction.
    The way we do this check is that we look at the database provider factory which is not the db transaction but something that creates them. So there is a possibility that we can check provider factory just before it breaks. Checking it in the block builder helper makes this check on the database transaction level so there is a guarantee that the state will not be changed during the lifetime of the block builder helper.

💡 Motivation and Context

Database provider factory is likely to be responsible for the incorrect block that we built.

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

Copy link

Benchmark results for 5313984

Report: https://flashbots-rbuilder-ci-stats.s3.us-east-2.amazonaws.com/benchmark/5313984-17776cc/report/index.html

Date (UTC) 2024-12-10T13:37:41+00:00
Commit 5313984d12d7190db4cf2c586a171756319179b3
Base SHA 17776ccfde349baed05b523883493c890918aac1

Significant changes

Benchmark Mean Status
MEV-Boost SubmitBlock serialization/JSON encoding 3.91% Performance has degraded.

@dvush
Copy link
Contributor Author

dvush commented Dec 18, 2024

I'll benchmark how long does it take to do this check and I'll merge if its ok.

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.

3 participants