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

imp: single service for all relayer modules #279

Merged
merged 13 commits into from
Feb 15, 2025
Merged

Conversation

srdtrk
Copy link
Member

@srdtrk srdtrk commented Feb 13, 2025

Description

closes: #224


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Wrote unit and integration tests.
  • Added relevant natspec and godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.84%. Comparing base (4edeb49) to head (1c7fee6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #279   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          14       14           
  Lines         643      643           
=======================================
  Hits          642      642           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@srdtrk srdtrk marked this pull request as ready for review February 13, 2025 21:04
Copy link
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

I think it mostly looks really good. 🚀 Thank you for pulling through so quickly on this 🙏
The only thing I want to change (which I will look at shortly) is the module serve function which doesn't make much sense anymore.

config: serde_json::Value,
addr: SocketAddr,
) -> Result<(), tonic::transport::Error> {
async fn serve(&self, config: serde_json::Value) -> anyhow::Result<Box<dyn RelayerService>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a confusing artifact that doesn't really make sense anymore. I think a more reasonable approach might be simply let the modules not need to care about how the config gets to them, and instead just have the router that do this work and call new. I will look into this after I'm done with my current deployment work.

@srdtrk srdtrk merged commit 59eb804 into main Feb 15, 2025
60 of 61 checks passed
@srdtrk srdtrk deleted the serdar/224-relayer-api branch February 15, 2025 18:07
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.

Serve a single endpoint for all modules
2 participants