flashbots / mev-boost

MEV-Boost allows Ethereum validators to source high-MEV blocks from a competitive builder marketplace
https://boost.flashbots.net
MIT License
1.17k stars 208 forks source link

server: move mock relay into mock package #642

Closed MariusVanDerWijden closed 6 months ago

MariusVanDerWijden commented 6 months ago

📝 Summary

This PR moves the mock relay into its own package and moves some shared dependencies into their own packages in order to simplify the server package.

⛱ Motivation and Context

In order to simplify the architecture of mev-boost, it makes sense in my opinion to move certain functionalities into their own package. This makes it easier to reason about components and abstractions and its easier to add some more tests and refactors in the future. This is just an initial PR to move the files, it changes no behavior. I will send some follow-up PRs to clean up the server code and the mock relay

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 67.01031% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 44.00%. Comparing base (8b662e0) to head (e555c15).

Files Patch % Lines
server/mock/mock_relay.go 35.89% 25 Missing :warning:
cli/types.go 0.00% 3 Missing :warning:
server/service.go 89.47% 2 Missing :warning:
server/types/U256str.go 0.00% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #642 +/- ## =========================================== - Coverage 52.37% 44.00% -8.38% =========================================== Files 14 15 +1 Lines 1600 1609 +9 =========================================== - Hits 838 708 -130 - Misses 703 845 +142 + Partials 59 56 -3 ``` | [Flag](https://app.codecov.io/gh/flashbots/mev-boost/pull/642/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/flashbots/mev-boost/pull/642/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `44.00% <67.01%> (-8.38%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.