Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[METADATA] improve subgraph related metadata #1855

Open
d10r opened this issue Jan 22, 2024 · 1 comment
Open

[METADATA] improve subgraph related metadata #1855

d10r opened this issue Jan 22, 2024 · 1 comment
Assignees
Labels
Project: SUBGRAPH Superfluid protocol subgraph Tag: Blocked The issue is blocked by other issues Tag: TechDebt Technical debt that needs to be addressed

Comments

@d10r
Copy link
Collaborator

d10r commented Jan 22, 2024

Example for what it currently looks like:

        "subgraphV1": {
            "cliName": "goerli",
            "name": "protocol-v1-goerli",
            "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli"
        },
        "subgraphVesting": {
            "name": "vesting-v1-eth-goerli",
            "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-goerli"
        },
...

Schema:

interface SubgraphData {
    readonly name: string;
    readonly cliName?: string;
    readonly hostedEndpoint?: string;
    readonly satsumaEndpoint?: string;
}

This schema was added when we had only one subgraph (protocol-v1) and only the vendor graph (hosted service).

There's several issues with the status quo:

  • ignores that we now want to use canonical endpoints instead of vendor specific endpoints
  • cliName is redundant if there's multiple subgraphs
  • need to clarify the meaning of "name" here and how it's used

Ideally we get to an outcome which is similar to the RPCs, where there's a canonical URL template which only needs the canonical network name applied. In the case of the subgraph, the subgraph name will also be needed.
E.g. https://optimism-sepolia.subgraph.x.superfluid.dev/protocol-v1

Needs to be done in tandem with infra and products in order to avoid breakage.

Next steps:

  • enumerate uses of the current subgraph related metadata (what would break if changed?)
  • specify and set up a canonical subgraph endpoint schema which supports multiple subgraphs per network (while keeping existing endpoints operational)
  • define new metadata schema, implement it, create a new metadata package
  • define changes to be done across the stack to avoid breakage and implement them
@d10r d10r self-assigned this Jan 22, 2024
@d10r d10r changed the title [METADATA] review subgraphV1 object [METADATA] improve subgraph related metadata Jan 22, 2024
@hellwolf hellwolf added Project: SUBGRAPH Superfluid protocol subgraph Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps Tag: TechDebt Technical debt that needs to be addressed labels Mar 5, 2024
@hellwolf hellwolf transferred this issue from another repository Mar 5, 2024
@hellwolf hellwolf removed the Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps label Mar 11, 2024
@d10r d10r added the Tag: Blocked The issue is blocked by other issues label Mar 12, 2024
@d10r
Copy link
Collaborator Author

d10r commented Mar 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: SUBGRAPH Superfluid protocol subgraph Tag: Blocked The issue is blocked by other issues Tag: TechDebt Technical debt that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants