Skip to content

pm-v2-oo-reporter: pass rules updates through to Managed OO#49

Merged
mrice32 merged 3 commits into
unaudited-pm-v2-oo-reporterfrom
pm-v2-oo-reporter-rules-update-passthrough
Jul 1, 2026
Merged

pm-v2-oo-reporter: pass rules updates through to Managed OO#49
mrice32 merged 3 commits into
unaudited-pm-v2-oo-reporterfrom
pm-v2-oo-reporter-rules-update-passthrough

Conversation

@mrice32

@mrice32 mrice32 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Relocates request-rules update recording from the OOReporter to the ManagedOptimisticOracleV2, so updates live alongside the request and become part of the canonical on-chain store and event source the broader UMA ecosystem already watches.

  • Adds updateRequestRules(identifier, ancillaryData, updatedRules) to the Managed OO — gated by the existing requesterWhitelist, keyed by managedRequestId (no timestamp), storing history and emitting a new RequestRulesUpdated event. Includes getRequestRulesUpdates / getLatestRequestRulesUpdate getters and a RequestRulesUpdateUnavailable error. Storage is append-only (__gap 993 → 992).
  • The reporter's updateRequestRules keeps its exact signature and access rules but now forwards to the OO instead of storing; its recording surface (storage, getters, struct, error) is removed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 020a762d0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 52 to 54
/// @notice Default re-request budget seeded onto each request at initialization.
uint256 defaultRerequestBudget;
/// @notice Whether first-dispute and P4 automatic re-requests are enabled.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the removed storage slot

When upgrading an existing OOReporter proxy, removing requestRulesUpdates from the ERC-7201 storage struct shifts every following member down one slot, so defaultRerequestBudget will read the old mapping slot and automaticRerequestsEnabled will read the old budget slot. This corrupts live configuration after upgrade and can break initialization/re-request behavior; keep a deprecated mapping/placeholder slot (or otherwise preserve layout) even if the reporter no longer uses it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OO reporter proxy has never been deployed, so this is not a concern.

mrice32 added 2 commits June 30, 2026 17:40
Relocate request-rules update recording from the OOReporter to the
ManagedOptimisticOracleV2, so updates live alongside the request the
broader UMA ecosystem watches.

Managed OO:
- add updateRequestRules(identifier, ancillaryData, updatedRules), gated by
  the existing requesterWhitelist and keyed by managedRequestId (no
  timestamp), which stores history and emits RequestRulesUpdated;
- add getRequestRulesUpdates / getLatestRequestRulesUpdate getters and the
  RequestRulesUpdateUnavailable error (append-only storage, gap 993 -> 992).

Reporter:
- updateRequestRules keeps its signature, access rules, and preconditions
  but now forwards to the OO instead of storing, still emitting its own
  requestId-keyed RequestRulesUpdated event;
- remove the requestRulesUpdates storage, the four getters, the
  RequestRulesUpdate struct, and the RequestRulesUpdateUnavailable error;
- add the new function to the local IOptimisticOracleV2 interface.

Tests: mock OO records forwarded updates; reporter test asserts the
passthrough; new Managed OO tests cover store/event, pre-configuration,
whitelist enforcement, and the empty-history revert.
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 force-pushed the pm-v2-oo-reporter-rules-update-passthrough branch from fe9b559 to 8c06449 Compare June 30, 2026 23:16

@Reinis-FRP Reinis-FRP left a comment

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.

Looking good, OOReporter.updateRequestRules(bytes32,bytes) stays stable and canonical update history now lives on MOOV2 as agreed

…o pm-v2-oo-reporter-rules-update-passthrough

# Conflicts:
#	pm-v2-oo-reporter/README.md
#	pm-v2-oo-reporter/src/interfaces/IOOReporter.sol
@Reinis-FRP Reinis-FRP force-pushed the pm-v2-oo-reporter-rules-update-passthrough branch from 462753a to 936eac8 Compare July 1, 2026 08:25
@mrice32 mrice32 merged commit 2fca1bc into unaudited-pm-v2-oo-reporter Jul 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants