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

Conductor and sequencer p2p refactoring #11455

Merged
merged 10 commits into from
Aug 29, 2024
Merged

Conversation

anacrolix
Copy link
Contributor

@anacrolix anacrolix commented Aug 13, 2024

Addresses #10936 (comment).

  • Stops the sequencer before stopping p2p so it can communicate any last work.
  • Reworks the p2p enabled logic so it's behaving like p2p is disabled when it's only in a partially shutdown state.
  • Increases logging around sequencing management in conductor.
  • Tidies up context use in various places to avoid the conductor sleeping during shutdown or getting stuck in API calls.
  • Removes a check for host that's no longer optional.

@tynes
Copy link
Contributor

tynes commented Aug 13, 2024

very nice

@anacrolix anacrolix force-pushed the anacrolix/p2p-shutdown branch 2 times, most recently from 6affbf5 to 48045a6 Compare August 19, 2024 11:11
op-node/node/node.go Outdated Show resolved Hide resolved
@anacrolix anacrolix marked this pull request as ready for review August 20, 2024 06:07
op-conductor/conductor/service.go Show resolved Hide resolved
op-conductor/conductor/service.go Outdated Show resolved Hide resolved
op-conductor/conductor/service.go Outdated Show resolved Hide resolved
op-node/node/node.go Show resolved Hide resolved
op-node/node/node.go Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
@anacrolix anacrolix changed the title op-node: P2P shutdown Conductor and sequencer p2p refactoring Aug 20, 2024
@anacrolix anacrolix requested a review from tynes August 26, 2024 23:17
@tynes
Copy link
Contributor

tynes commented Aug 27, 2024

I am not sure how extensive the test coverage of this code is. Do we have unit tests? Is the best way to test just syncing a node?

@anacrolix
Copy link
Contributor Author

I'll check tests and fix conflicts now.

@anacrolix
Copy link
Contributor Author

I don't think the test failures are related to this code

@anacrolix anacrolix linked an issue Aug 28, 2024 that may be closed by this pull request
@anacrolix anacrolix self-assigned this Aug 28, 2024
@anacrolix
Copy link
Contributor Author

Looks like I need a code owners approval?

Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, effectively the only change in behavior in this PR is to call n.l2Driver.StopSequencer(ctx) inside OpNode.Stop. Everything else is just clean up work.

Will approve once the open conversations are resolved.

op-conductor/conductor/service.go Outdated Show resolved Hide resolved
op-conductor/conductor/service.go Outdated Show resolved Hide resolved
op-node/node/node.go Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
op-node/p2p/node.go Show resolved Hide resolved
op-node/node/config.go Outdated Show resolved Hide resolved
op-node/node/node.go Outdated Show resolved Hide resolved
@anacrolix anacrolix added this pull request to the merge queue Aug 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 29, 2024
@sebastianst sebastianst added this pull request to the merge queue Aug 29, 2024
Merged via the queue into develop with commit c7b91ab Aug 29, 2024
57 checks passed
@sebastianst sebastianst deleted the anacrolix/p2p-shutdown branch August 29, 2024 16:17
@anacrolix
Copy link
Contributor Author

🎉

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.

op-node: Improve shutdown behavior
4 participants