-
Notifications
You must be signed in to change notification settings - Fork 88
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
core/scheduler: add support for duty builder proposer #827
core/scheduler: add support for duty builder proposer #827
Conversation
The proposer duty type originates in Scheduler (in Charon) As a first pass on the builder api for me it makes sense to exclusively schedule normal blocks or builder blocks We mentioned having a flag to enable the builder-api this flag would disable normal blocks from being scheduled thoughts? |
core/scheduler/scheduler.go
Outdated
err = s.resolveProDuties(ctx, slot, vals) | ||
if err != nil { | ||
return err | ||
// TODO: replace if false with check for builder api flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be some check on the builder api flag not sure how we want to handle it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think you can just add a builderAPI bool
variable/field to New
and Scheduler
. We can add the flag itself in another PR. But it would basically be adding BuilderAPI bool
field to app.Config
and wiring it up in the cmd
and app
packages.
core/scheduler/scheduler.go
Outdated
@@ -317,7 +325,12 @@ func (s *Scheduler) resolveProDuties(ctx context.Context, slot slot, vals valida | |||
continue | |||
} | |||
|
|||
// TODO: replace if false with check for builder api flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have 2 options for checking for the builder api flag
in the resolveDuties function and implement the resolveBuilderProDuties function in this PR or have one generic resolveProDuties and have the check for the builder api flag in there
In the future i think you'll probably want to schedule both and only execute 1
Some notes from flashbots
- MEV Boost has a BUILDER_PROPOSAL_DELAY_TOLERANCE which is the deadline within the slot for a builder to have proposed a block (External Block Build)
- After this deadline the “External Block Build” will be aborted in favour of a “Local Block Build”
- From MEV Boost documentation, both “External Block Build” and “Local Block Build” should begin as soon as they are able to. The Charon client must ensure one or the other NOT both are submitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we schedule just 1 for now to simplify things. Once we know and understand more, we can look at scheduling both and executing one.
Can switch inside resolveProDuties
, just flip the duty type basically based on the flag.
Codecov Report
@@ Coverage Diff @@
## main #827 +/- ##
==========================================
+ Coverage 53.92% 54.90% +0.97%
==========================================
Files 109 111 +2
Lines 11183 11508 +325
==========================================
+ Hits 6030 6318 +288
- Misses 4253 4277 +24
- Partials 900 913 +13
Continue to review full report at Codecov.
|
core/scheduler/scheduler.go
Outdated
err = s.resolveProDuties(ctx, slot, vals) | ||
if err != nil { | ||
return err | ||
// TODO: replace if false with check for builder api flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think you can just add a builderAPI bool
variable/field to New
and Scheduler
. We can add the flag itself in another PR. But it would basically be adding BuilderAPI bool
field to app.Config
and wiring it up in the cmd
and app
packages.
core/scheduler/scheduler.go
Outdated
@@ -317,7 +325,12 @@ func (s *Scheduler) resolveProDuties(ctx context.Context, slot slot, vals valida | |||
continue | |||
} | |||
|
|||
// TODO: replace if false with check for builder api flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we schedule just 1 for now to simplify things. Once we know and understand more, we can look at scheduling both and executing one.
Can switch inside resolveProDuties
, just flip the duty type basically based on the flag.
category: feature
ticket: #809