hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Refactor configuration validation errors

Open ljoss17 opened this issue 2 years ago • 0 comments

Summary

There are many ConfigValidation... errors. These could be refactored using an enum. See comment https://github.com/informalsystems/ibc-rs/pull/2537#discussion_r949903850.

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

ljoss17 avatar Aug 23 '22 12:08 ljoss17