Filter out trust threshold values less than 1/3 and greater than 2/3 #2798
Description
Summary
Filter out trust threshold values less than 1/3 and greater than 2/3 to better cater to relaying use-cases that require trust threshold values other than 1/3.
Problem Definition
Building off of the issue outlined in #2746, where packets were not being relayed due to a trust threshold of 1/2 (currently, Hermes crudely requires a threshold of 1/3), Hermes should filter out messages relayed with a trust threshold lower than 1/3 (for security reasons) and greater than 2/3 (for cost-efficiency reasons). This would better cater to relaying use-cases that require a trust threshold other than 1/3.
Proposal
Remove the current hard-coded trust threshold of 1/3 and replace it with a bounds check that ensures that the user's trust threshold is configured to be between 1/3 and 2/3.
These values are sensible defaults, but will still be hard-coded for the time being. In the case where users feel it would be beneficial for these bounds to be configurable, we will address that in a future PR.
Acceptance Criteria
- Hermes filters out trust thresholds below 1/3 and greater than 2/3.
- Add an integration test testing the client filter functionality.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate milestone (priority) applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned