-
Notifications
You must be signed in to change notification settings - Fork 1
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
porting builder changes - code compiles #1
base: branch-v1.0.4
Are you sure you want to change the base?
Conversation
a63f687
to
13d32d5
Compare
@@ -278,6 +279,12 @@ func NewServer(config *Config, opts ...serverOption) (*Server, error) { | |||
} | |||
} | |||
|
|||
if config.Builder.Enabled { | |||
if err := builder.Register(stack, srv.backend, config.Builder); err != nil { |
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 is where builder is attached to the node, here we call builder's service Register
method.
Register do a bunch of initialisation but important is it configures and starts CliqueBuilder
At the very end of the Register we register BuilderService which implements Lifecycle interface into the stack.
Lifecycle exposes 2 methods where important is Start
which calls our
CliqueBuilder.Start
method.
In Start
builder subscribe its channel to the HeadEvent and starts listening on new events calling onChainHeadEvent
method which finally spins up new goroutine with runBuildingJob
Here I will leave the further investigation as it's mostly builder related black magic inside runRetryLoop
88ae219
to
9a18a92
Compare
Description
Very painful & long effort to make bor a builder 👷♂️