pm-v2-oo-reporter: pass rules updates through to Managed OO#49
Conversation
There was a problem hiding this comment.
💡 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".
| /// @notice Default re-request budget seeded onto each request at initialization. | ||
| uint256 defaultRerequestBudget; | ||
| /// @notice Whether first-dispute and P4 automatic re-requests are enabled. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
OO reporter proxy has never been deployed, so this is not a concern.
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>
fe9b559 to
8c06449
Compare
Reinis-FRP
left a comment
There was a problem hiding this comment.
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
462753a to
936eac8
Compare
Relocates request-rules update recording from the
OOReporterto theManagedOptimisticOracleV2, so updates live alongside the request and become part of the canonical on-chain store and event source the broader UMA ecosystem already watches.updateRequestRules(identifier, ancillaryData, updatedRules)to the Managed OO — gated by the existingrequesterWhitelist, keyed bymanagedRequestId(no timestamp), storing history and emitting a newRequestRulesUpdatedevent. IncludesgetRequestRulesUpdates/getLatestRequestRulesUpdategetters and aRequestRulesUpdateUnavailableerror. Storage is append-only (__gap993 → 992).updateRequestRuleskeeps its exact signature and access rules but now forwards to the OO instead of storing; its recording surface (storage, getters, struct, error) is removed.