feat: verify DIPs proposal manifest network is supported#1043
Draft
MoonBoi9001 wants to merge 1 commit into
Draft
feat: verify DIPs proposal manifest network is supported#1043MoonBoi9001 wants to merge 1 commit into
MoonBoi9001 wants to merge 1 commit into
Conversation
0b4c34e to
ca26d2b
Compare
The indexer reads a proposal's network from the subgraph manifest but only rejected an unconfigured network indirectly, when the price lookup later missed it, and an empty network field slipped through. Check the network against the indexer's configured DIPs networks up front, and reject an empty one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19ff9b9 to
d920526
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.
TL;DR
Makes the indexer check a DIPs proposal's network against its configured DIPs networks at the manifest step, and treats a manifest with an empty network field as malformed. Small hardening change, stacked on #1041.
Motivation
When the indexer receives a DIPs proposal it fetches the subgraph manifest and reads the network the subgraph indexes. Today it never checks that network against the operator's configured DIPs networks directly — an unconfigured network is only caught later and indirectly, when the price lookup happens to find no minimum for it, and a manifest whose network field is empty slips through that gap entirely.
This adds an explicit check at the manifest step: a network the operator hasn't configured for DIPs is rejected up front with the unsupported-network reason, and an empty network field is reported as a malformed manifest rather than masquerading as an unsupported network.
Summary