Feat/switch reporter refactor#1021
Open
CJPotter10 wants to merge 25 commits into
Open
Conversation
…as quickly as the original reporter selected to no longer has any reports on open queries with the selector's power are aggregated
…isputes as they were before would have allowed reporters switching to circumvent the jailing punishments as it was only placed on the reporter
…ove unneeded functions
…o unjail-reporter tx to allow for anyone to unjail a reporter who is 7 days passed when they could have unjailed so that they can be disputed again if needed
…the minimum amount allowed
brendaloya
reviewed
May 31, 2026
| Wait until `dispute_locked_until` is in the past, then call **`MsgUnjailReporter`** on your own address (if you also have a reporter row, that is cleared too when applicable). The chain may also lazy-clear an expired dispute lock when you interact with reporter messages. | ||
|
|
||
| **Can someone else unjail me?** | ||
| A third party can call unjail on your reporter/selector address only after **7 days beyond** when you would have been allowed to unjail yourself. |
Collaborator
There was a problem hiding this comment.
this could be clearer:
Yes. You have 7 days to address any problems and unjail yourself. Anyone can unjail you after that 7 day period. This is to prevent people waiting 21 days in a jailed state to avoid disputes.
Contributor
|
qwen 3.7 max and gpt 5.5 xhigh awdits came back with no concerns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These changes allow for selectors to switch reporters without the 21 day wait period. Selectors will still need to wait a period of time possibly but only until there are no open queries for which the original reporter has reported with the selectors power. A new collection called MaxOpenCommitmentByReporter that is updated on every MsgSubmitValue made by a reporter that reflects the highest expiration height of any report they have made. For example, if the original reporter reported for a bridge deposit, which has a long reporting window, before the selector calls switch then the switch will not be processed until after that bridge deposit query finishes and is aggregated.
Some of the original dispute logic was implemented assuming that switching would take 21 days so with the changes to how switching reporters works there were some updates needed on the disputes side of things as well. We now reflect the jailing of the reporter on all selectors so that even if they have already switched the chain will still be able to slash and jail those selectors.
State Change: Added param to reporter to cap number of pending switches a reporter can have
Related Issue
Fixes #
Type of Change
Testing
Wrote a multitude of integration, unit, and e2e tests
Checklist