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

Make e2e test more deterministic #143

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

ferranbt
Copy link
Contributor

📝 Summary

This PR does not fix the e2e test but makes it a bit more deterministic to execute. I feel the problem is that due to flashbots/builder-playground#14 issue, the rbuilder it not consistent in building blocks at the correct time for the playground. So, it misses building some blocks.

The previous e2e test would send the transaction to the EL node (to be picked up by the builder) and the acceptance condition was for the transaction to be mined and that block to be mined by the local builder. However, since the builder was not consistent, the transaction would be mined by the local EL node instead and trigger the acceptance check.

In this fix, I am only sending the transaction to the builder, so that the EL node cannot include it. Then, if the transaction gets mined, it was for sure done by the builder. I have tested it locally multiple times (>10) and it only failed once and I think due to flashbots/builder-playground#14.

💡 Motivation and Context


✅ I have completed the following steps:

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

Copy link

Benchmark results for eeaf1fe

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

Date (UTC) 2024-08-25T10:36:36+00:00
Commit eeaf1feb5a0bd2d4dd5c4fe480fbd84bd2c742dd
Base SHA b84a0d1940dd3392f3ea5d069e1dc54d828b9c45

Significant changes

None

@ferranbt ferranbt added the A-e2e Area dedicated to end-to-end testing of the application or system label Aug 25, 2024
Copy link
Contributor

@ryanschneider ryanschneider left a comment

Choose a reason for hiding this comment

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

lgtm!

@ferranbt ferranbt merged commit bc18738 into develop Aug 26, 2024
3 checks passed
@ferranbt ferranbt deleted the ferranbt/fix-playground-test branch August 26, 2024 16:27
ferranbt added a commit that referenced this pull request Aug 28, 2024
## 📝 Summary

The new integration test introduced in #143 requires the rbuilder to be
running to work. However, the playground setup was not waiting for it.
This PR fixes that. It adds a loop after the rbuilder creation that
checks in the output log for a specific log "RPC server job: started"
that signals that the builder is running and the test can start.

## 💡 Motivation and Context

<!--- (Optional) Why is this change required? What problem does it
solve? Remove this section if not applicable. -->

---

## ✅ I have completed the following steps:

* [x] Run `make lint`
* [x] Run `make test`
* [x] Added tests (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-e2e Area dedicated to end-to-end testing of the application or system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants