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

Refactor configuration validation errors #2589

Open
14 tasks
ljoss17 opened this issue Aug 23, 2022 · 0 comments
Open
14 tasks

Refactor configuration validation errors #2589

ljoss17 opened this issue Aug 23, 2022 · 0 comments
Labels
I: logic Internal: related to the relaying logic O: code-hygiene Objective: cause to improve code hygiene O: new-feature Objective: cause to add a new feature or support

Comments

@ljoss17
Copy link
Contributor

ljoss17 commented Aug 23, 2022

Summary

There are many ConfigValidation... errors. These could be refactored using an enum. See comment #2537 (comment).

Proposal

Refactor errors related to configuration validation in relayer/src/errors.rs in order to have a more elegant enum, which can then be converted to an error.

Acceptance Criteria

  • Use an enum for the relayer errors:
    • ConfigValidationJsonRpc
    • ConfigValidationTxSizeOutOfBounds
    • ConfigValidationMaxGasTooHigh
    • ConfigValidationTrustingPeriodSmallerThanZero
    • ConfigValidationTrustingPeriodGreaterThanUnbondingPeriod
    • ConfigValidationDefaultGasTooHigh
    • ConfigValidationGasMultiplierLow
  • Make the enum convertible to a relayer error by implementing From

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere added O: new-feature Objective: cause to add a new feature or support O: code-hygiene Objective: cause to improve code hygiene I: logic Internal: related to the relaying logic labels Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: logic Internal: related to the relaying logic O: code-hygiene Objective: cause to improve code hygiene O: new-feature Objective: cause to add a new feature or support
Projects
None yet
Development

No branches or pull requests

2 participants