refactor(composer): streamline geth and executor run_until_stopped#1361
Merged
ethanoroshiba merged 14 commits intoENG-670/add_composer_instrumentationfrom Aug 28, 2024
Conversation
added 4 commits
August 12, 2024 10:32
….com/astriaorg/astria into ENG-670/add_composer_instrumentation
…://github.com/astriaorg/astria into ENG-670/refactor_for_composer_instrumentation
Fraser999
reviewed
Aug 14, 2024
Contributor
Fraser999
left a comment
There was a problem hiding this comment.
A few nitpicks, but the moved logic all seems to be unchanged.
Co-authored-by: Fraser Hutchison <190532+Fraser999@users.noreply.github.com>
Fraser999
approved these changes
Aug 20, 2024
SuperFluffy
suggested changes
Aug 20, 2024
Contributor
SuperFluffy
left a comment
There was a problem hiding this comment.
Looks mosly fine except for some oddities.
Requesting changes because an early return in the select loop skips shutdown logic.
| } else { | ||
| // log all the bundles that have not been drained | ||
| let report: Vec<SizedBundleReport> = | ||
| bundles_to_drain.iter().map(SizedBundleReport).collect(); |
Contributor
There was a problem hiding this comment.
I think we might be able to avoid the extra allocation here entirely by using: https://docs.rs/serde/latest/serde/ser/trait.Serializer.html#method.collect_seq. But leave it to a followup probably.
added 2 commits
August 20, 2024 10:32
SuperFluffy
reviewed
Aug 21, 2024
Co-authored-by: Richard Janis Goldschmidt <github@aberrat.io>
Co-authored-by: Richard Janis Goldschmidt <github@aberrat.io>
SuperFluffy
approved these changes
Aug 21, 2024
Contributor
SuperFluffy
left a comment
There was a problem hiding this comment.
Looks great, thank you for your work. Made a suggestion to clean up report_exit_reason, but otherwise this is good to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shortened and streamlined geth and executor
run_until_stopped()functions to get rid of clippy exceptions and ensure events are emitted within spans.Background
#1326 removed instrumentation on these
run_until_stopped()functions, which revealed a clippy warning for too many lines. Additionally, this made it so that logging inside these functions would not be emitted within any span.Changes
utilsmodule to house a sharedreport_exit_reason()function.ensure_chain_id_is_correct()andget_latest_nonce()toinit()(previosulypre_run_checks())Testing
Passing all tests.
Related Issues
Part of #1321