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

trigger megabundle worker loop when new megabundle is received #104

Open
thegostep opened this issue Dec 21, 2021 · 0 comments
Open

trigger megabundle worker loop when new megabundle is received #104

thegostep opened this issue Dec 21, 2021 · 0 comments

Comments

@thegostep
Copy link

thegostep commented Dec 21, 2021

Rationale

The logic for generating a block using megabundles currently sits inside of the multi worker which is triggered by the recommit interval which defaults to 3 second intervals. This means that the megabundle worker may sit idle even if there is a megabundle pending construction.

for i := 0; i < len(config.TrustedRelays); i++ {
workers = append(workers,
newWorker(config, chainConfig, engine, eth, mux, isLocalBlock, init, &flashbotsData{
isFlashbots: true,
isMegabundleWorker: true,
queue: queue,
relayAddr: config.TrustedRelays[i],
}))
}

Implementation

The megabundle worker should instead begin assembling a megabundle block immediately after receiving a megabundle from one of the trusted relays. If the miner receives a second megabundle while it is still assembling the first block, it should wait until the first block has completed, then begin work on the second block irrespective of the recommit interval.

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

No branches or pull requests

1 participant