fix: Resolve bugs introduced from new flashblocks timing logic#393
fix: Resolve bugs introduced from new flashblocks timing logic#393sieniven wants to merge 6 commits intoflashbots:mainfrom
Conversation
|
I addressed all of your comments on #380. This PR is moving against the architectural decisions made in that PR and reintroduces the strong coupling between payload building, flashblock timing calculations, and the flashblock timer loop. One side effect is that the unit tests for timing calculations would no longer be testing the actual times when flashblocks would be triggered and (at least one that I can think of right now) log statements would become misleading. If you're running into problems running the latest version of op-rbuilder we definitely want to know about them since they may be affecting others or us too. Details like your configuration and the logs you see would be very helpful so we can work together to fix things. I want to share our product requirements here, since they may not be obvious from the code, and I wasn't too clear about it in my PR. For us it is very important that flashblocks are spaced evenly apart so that dapps and searchers can rely on a predictable service. If we're seeing that we're not getting evenly spaced flashblocks in production, then we want the appropriate logs to help us why, so we can figure out if we can mitigate the issue in the builder or correlate it to another issue upstream in the op stack. If you build flashblocks at the start of each interval you might end up sending an extra flashblock per slot than if you chose to build at the end of the interval, but this just improves the reported metric for flashblocks sent without improving the underlying reliability. It introduces a tradeoff of increasing the time between the last flashblock of a block and the first flashblock of the next block, and this is more difficult for flashblock consumers to adapt to. I do appreciate you digging into this since the timing logic is pretty hairy and it's good to have multiple people looking at it. I'm going to close this PR for now but I think the best path forward would be to start with a github issue or to reach out to us directly so we can align on changes that would be good for both of us. |
|
@akundaz thanks for sharing this and i understant better the intent now. Quick questions:
It is also found, as detailed in the PR comment previously, the new fixes produces 1 less flashblock than what would be expected. This makes sense now since it seems like it is intended on your end for the builder to wait on your end up till the first interval offset, before triggering the first block building. Our biggest concern with the fix is that it reduces the throughput of the chain, since we spend idling time waiting for the first flashblock offset, which could potentially be used to mint the first flashblock itself. |
|
I also want to add that lowering tx inclusion latency is important for us. A user should be able to send a tx late in the slot and still have it be included. re uneven spacing. We have an offset for the last flashblock because we don't know exactly when re extra flashblock. I'm not too sure what you're referring to with div_ceil. Can you elaborate on what you mean by idle time? Most of the time is idle anyway since we're waiting between each tick to build flashblocks. Also can you share your configuration that result in one less flashblock and share logs? We're not seeing and reduction in number of flashblocks being produced on our end from this. |
📝 Summary
This PR resolves the bugs introduced in #380 from the refactoring of the flashblocks timing scheduler logic.
None✅ I have completed the following steps:
make lintmake test