fix(core): revalidate OOv3 whitelists and reject duplicate relayers#4954
Draft
tcoatswo wants to merge 2 commits into
Draft
fix(core): revalidate OOv3 whitelists and reject duplicate relayers#4954tcoatswo wants to merge 2 commits into
tcoatswo wants to merge 2 commits into
Conversation
Signed-off-by: Tyler Coatsworth <tyler@coatsworth.me>
0e04fdb to
62eaa1f
Compare
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.
Motivation
This PR addresses two validation assumptions where cached or downstream state could diverge from the authoritative input.
OptimisticOracleV3 caches positive collateral and identifier whitelist results to avoid repeated external calls. The positive-cache fast paths treated those results as non-revocable: after governance removed a previously cached currency or identifier,
assertTruthcontinued to accept it until an external caller invokedsyncUmaParams.A removed identifier has an additional failure mode because the DVM revalidates the identifier when a dispute requests a price. OOv3 could accept the assertion from its stale cache while the DVM rejected the dispute against the live whitelist. The reverted dispute left the assertion undisputed, allowing it to settle as true after liveness.
ChainBridge also accepted duplicate addresses in
initialRelayers.AccessControldeduplicated role membership, but_totalRelayersincremented for every array element, causing recorded quorum membership to diverge from the actual authorized relayer set.Summary
Details
The identifier path no longer returns early on a cached
truevalue. It updates the cached value fromIdentifierWhitelist.isIdentifierSupportedon every validation.The currency path first checks
AddressWhitelist.isOnWhitelistlive. If the currency has been removed, validation returns false. If it is live-whitelisted but is not currently represented by a positive cache entry, OOv3 restores the entry and fetches its final fee. Existing positive entries continue to reuse their cached final fee.The ChainBridge constructor now rejects an initial relayer already granted
RELAYER_ROLE, ensuring_totalRelayersalways matches unique role membership.Testing
Commands:
Results:
Issue(s)
Security-sensitive fixes. No public issue was opened before the patches to avoid publishing vulnerable behavior without proposed remediations.