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

Improve L2NetworkGasPricingService test coverage #88

Open
7 tasks
Filter94 opened this issue Sep 24, 2024 · 0 comments
Open
7 tasks

Improve L2NetworkGasPricingService test coverage #88

Filter94 opened this issue Sep 24, 2024 · 0 comments

Comments

@Filter94
Copy link
Collaborator

Description

L2NetworkGasPricingService as it is now, is hard to test. Specifically, Web3j, Web3jBlobExtended and VertxHttpJsonRpcClientFactory input interfaces aren't minimal. They contain more methods than is absolutely needed for L2NetworkGasPricingService, which makes them hard to mock / inject test implementations. We can refactor L2NetworkGasPricingService to accept interfaces that are more focused on inputs and outputs of this business logic and create tests that would simulate different L1 fees market conditions and verify that L2 pricing is adequate

Motivation

This is to improve test coverage of the L2 gas pricing logic

Tasks

  • Refactor L2NetworkGasPricingService so it's more easily testable
  • Cover L2NetworkGasPricingService with tests:
    • High L1 fees
    • Low L1 fees
    • Normal conditions
    • Normal conditions with a L1 fees spike

Acceptance criteria

  • L2NetworkGasPricingService test coverage is improved and different market conditions are covered

Risks

  • L2NetworkGasPricingService in the tests may be created differently than how it's created in the main Coordinator app. We need to ensure it's created exactly the same way from the E2E tests config file

Remember to

  • Add the documentation label in case there is an impact on the documentation
  • Add priority and team labels
  • Add Task for updating the Runbook or adding/updating existing metrics and alerts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant