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

porting builder changes - code compiles #1

Draft
wants to merge 7 commits into
base: branch-v1.0.4
Choose a base branch
from

Conversation

pnowosie
Copy link

Description

Very painful & long effort to make bor a builder 👷‍♂️

@pnowosie pnowosie changed the base branch from master to branch-v1.0.4 October 11, 2023 13:12
@pnowosie pnowosie force-pushed the pnowosie/add_fb_builder branch from a63f687 to 13d32d5 Compare October 19, 2023 10:53
@@ -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 {
Copy link
Author

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

@pnowosie pnowosie force-pushed the pnowosie/add_fb_builder branch from 88ae219 to 9a18a92 Compare November 17, 2023 15:38
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

Successfully merging this pull request may close these issues.

1 participant