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

op-proposer: service lifecycle cleanup #8040

Merged
merged 6 commits into from
Nov 17, 2023

Conversation

joohhnnn
Copy link
Contributor

@joohhnnn joohhnnn commented Nov 5, 2023

In reference to pull/7682, I've addressed portions of issue 7671 / 7684, within the proposer code. I've strived to maintain a coding style consistent with pull/7682, though I'm not certain if anything has been overlooked.

@joohhnnn joohhnnn requested a review from a team as a code owner November 5, 2023 07:35
@joohhnnn joohhnnn requested a review from refcell November 5, 2023 07:35
@protolambda
Copy link
Contributor

Thank you, this refactor looks great. I'm catching up with some more PR review after having been OOO for a while, but will take a look at this soon!

@protolambda protolambda self-requested a review November 7, 2023 23:35
Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

Structure looks good, but this needs several golint fixes. run make lint-go from the top level of the repo to verify that they are fixed. Best practice is also to split up moving code from modifying code - it's not easy to quickly check that the function for l2_output_submitter.go got correctly moved over to driver.go

Adding the Admin RPC is also very nice, but again, a little harder to review when including it with the other refactor.

op-e2e/faultproof_test.go:535:55: Error return value of `(github.com/ethereum-optimism/optimism/op-proposer/proposer/rpc.ProposerDriver).StopL2OutputSubmitting` is not checked (errcheck)
        sys.L2OutputSubmitter.Driver().StopL2OutputSubmitting()
                                                             ^
op-e2e/system_fpp_test.go:262:55: Error return value of `(github.com/ethereum-optimism/optimism/op-proposer/proposer/rpc.ProposerDriver).StopL2OutputSubmitting` is not checked (errcheck)
        sys.L2OutputSubmitter.Driver().StopL2OutputSubmitting()
                                                             ^
op-proposer/metrics/noop.go:30: File is not `goimports`-ed (goimports)
}
op-proposer/proposer/config.go:9: File is not `goimports`-ed (goimports)

op-proposer/proposer/driver.go:12: File is not `goimports`-ed (goimports)

op-proposer/metrics/noop.go Outdated Show resolved Hide resolved
op-proposer/proposer/driver.go Outdated Show resolved Hide resolved
op-proposer/proposer/service.go Outdated Show resolved Hide resolved
@joohhnnn
Copy link
Contributor Author

joohhnnn commented Nov 9, 2023

Best practice is also to split up moving code from modifying code

Thank you @trianglesphere for the advice. Next time, I will open two separate pull requests to make the review process smoother :)

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #8040 (519ea7a) into develop (111f3f3) will decrease coverage by 1.07%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8040      +/-   ##
===========================================
- Coverage    53.78%   52.71%   -1.07%     
===========================================
  Files          162      162              
  Lines         6171     6171              
  Branches       966      966              
===========================================
- Hits          3319     3253      -66     
- Misses        2728     2763      +35     
- Partials       124      155      +31     
Flag Coverage Δ
cannon-go-tests 63.47% <ø> (ø)
chain-mon-tests 26.95% <ø> (ø)
common-ts-tests 26.74% <ø> (ø)
contracts-bedrock-tests 58.38% <ø> (-3.37%) ⬇️
contracts-ts-tests 100.00% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-next-tests 41.92% <ø> (ø)
sdk-tests 41.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 5 files with indirect coverage changes

@trianglesphere
Copy link
Contributor

@joohhnnn there's a couple more lints & one merge conflict to fix.

@joohhnnn joohhnnn requested review from a team and ajsutton as code owners November 13, 2023 21:13
@joohhnnn joohhnnn marked this pull request as draft November 13, 2023 21:15
@joohhnnn joohhnnn marked this pull request as ready for review November 13, 2023 21:45
@joohhnnn joohhnnn marked this pull request as draft November 13, 2023 21:56
@joohhnnn joohhnnn marked this pull request as ready for review November 13, 2023 22:47
@ajsutton
Copy link
Contributor

@trianglesphere Are you ok to do a final review on this or do you want me to dive in and review (I'd have to come up to speed on the general context of the proposer)?

@trianglesphere trianglesphere added this pull request to the merge queue Nov 17, 2023
Merged via the queue into ethereum-optimism:develop with commit afea36e Nov 17, 2023
61 checks passed
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.

4 participants