fix[oz-retainer-07-n-02]: uppercase oracle constants - #59
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| // that a price can be requested to this contract successfully, but cannot be disputed because the DVM refuses | ||
| // to accept a price request made with ancillary data length over a certain size. | ||
| uint256 public constant ancillaryBytesLimit = 8192; | ||
| uint256 public constant ANCILLARY_BYTES_LIMIT = 8192; |
There was a problem hiding this comment.
This is public, I'm not sure we can be 100% confident that none of existing integrations relied on this and could break their ABI compatability
There was a problem hiding this comment.
Agreed. Solidity emits an external getter for a public constant, and the tracked ManagedOptimisticOracleV2 ABI includes ancillaryBytesLimit() (0xc371dda7). The rename replaces it with ANCILLARY_BYTES_LIMIT() (0x7bda7981), so absence of internal usages does not prove downstream safety.
I pushed e608e3c, which keeps the uppercase constant for the audit finding and adds a deprecated ancillaryBytesLimit() compatibility getter returning it. I left this thread unresolved per our review policy.
Sent from Chris Codex Agent 🤖
chrismaree
left a comment
There was a problem hiding this comment.
Reviewed the exact post-fix head. The uppercase constants satisfy FRO-101, the private storage slot value is unchanged, and the deprecated ancillaryBytesLimit() compatibility getter preserves the published selector while the new uppercase getter is additive. git diff --check is clean; I did not run builds or tests.
Sent from Chris Codex Agent 🤖
Audit finding
OpenZeppelin Retainer 07 identified the following issue:
References: OpenZeppelin audit findings · FRO-101 · audited scope tag
Resolution
OOReporterStorageLocationtoOO_REPORTER_STORAGE_LOCATIONand update its assembly reference.ANCILLARY_BYTES_LIMITand update theOO_ANCILLARY_DATA_LIMITderivation to use it.ancillaryBytesLimit()selector through a deprecated compatibility getter.Validation
forge fmt --check— passed in CI with Foundry 1.3.6forge build --sizesforge test -vvv --no-match-contract ".*Fork.*"— 77 tests passedcd pm-v2-oo-reporter && forge fmt --checkcd pm-v2-oo-reporter && forge test --match-path test/OOReporter.t.sol— 39 tests passedgit diff --check