graphprotocol / allocation-optimizer

Agents and algorithms for optimizing Indexer decision problems.
MIT License
13 stars 14 forks source link

Choose only subgraphs where data is sourced from a specific network. #22

Closed cryptovestor21 closed 10 months ago

cryptovestor21 commented 1 year ago

Is your feature request related to a problem? Please describe. As far as I understand it today, the optimiser can optimise against all subgraphs from a subgraph network endpoint. In the case of the MIPs program, user allocation choices are limited in scope, allowing profit only from subgraphs that are sourced with Gnosis data, so they will want to be able to focus optimisation on subgraphs for that chain alone.

This may only be a problem on testnet right now, but in the future I imagine some indexers will want to try and optimise for syncing subgraphs across only certain source chains and ignore others. I am interested to know if you think the optimiser still remains useful in these situations, where we are essentially ignoring some signals?

Describe the solution you'd like Two ideas:

  1. Prompt the user for which source chains they want to optimise for. I imagine this would involve interrogating a network subgraph to pull a list of the source chains for which subgraphs have been published and presenting them as inclusions or exclusions to the user.

  2. A config file of some sort to include/exclude source chains (still requires the interrogation of the network subgraph at some point, I suppose)

hopeyen commented 1 year ago

Hi there! It is a good idea to be able to specify the source chains, but I'm not aware of the graphQL query that returns the source chain information, I would be happy to learn if you know how.

The alternatives I could think of require either querying indexingStatuses from graph node (limited to the syncing instances) or all subgraphs' ipfs manifest files, but neither seems like a reasonable dependency to introduce. I would more or less propose for indexers to populate the whitelist/blacklist, if they want to pick something specific or using a script. Please do let me know if there's an easy way to get all subgraph's source information on the network subgraph!

hopeyen commented 10 months ago

There hasn't been any response in a while so we will close for now. Feel free to re-open if anything occurs