Skip to content

Feat/switch reporter refactor#1021

Open
CJPotter10 wants to merge 25 commits into
mainfrom
feat/immediate-switch-reporter
Open

Feat/switch reporter refactor#1021
CJPotter10 wants to merge 25 commits into
mainfrom
feat/immediate-switch-reporter

Conversation

@CJPotter10
Copy link
Copy Markdown
Contributor

@CJPotter10 CJPotter10 commented May 20, 2026

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

  • Bug fix
  • [ x ] New feature
  • Documentation update
  • State Changes (please describe)"
  • [ x ] Chain Changes (please describe): decreased time it takes it switch reporters and updated dispute logic to work with new logic
  • Daemon Changes
  • Tests
  • Added Getter

Testing

Wrote a multitude of integration, unit, and e2e tests

Checklist

  • [ x ] Code follows project style guidelines
  • [ x ] I have added appropriate comments to my code
  • [ x ] I have updated the documentation accordingly
  • [ x ] I have added tests that prove my fix or feature works
  • [ x ] go test ./... is passing locally
  • [ x ] make e2e is passing locally

…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
@brendaloya brendaloya requested a review from akremstudy May 28, 2026 14:36
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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danflo27
Copy link
Copy Markdown
Contributor

qwen 3.7 max and gpt 5.5 xhigh awdits came back with no concerns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants