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

GraphQL mutations to bisect POI divergences and fetch entity changes and cache contents metadata #55

Open
neysofu opened this issue May 16, 2023 · 2 comments
Assignees

Comments

@neysofu
Copy link
Member

neysofu commented May 16, 2023

No description provided.

@neysofu neysofu self-assigned this May 16, 2023
@fordN
Copy link
Contributor

fordN commented May 18, 2023

Placing a strawperson proposal here to kick off discussion around the interfaces we use here.

type mutationRoot {
    deploymentPOIReport(deployment: String!): DeploymentPOIReport
    divergenceReport(deployment: String!, blockNumber: String!): Divergence
}

type DeploymentPOIReport { 
    deployment: String!
    uniquePoisCount: Int!
    latestBlockPois: [POI!]
    divergences: [Divergence!]
}

type Divergence {
    block: Block!
    deployment: String!
    uniquePoisCount: Int!
    poiReports: [POIReport!]
}

type Block {
    number: Int!
    hash: Bytes!
}

type POI {
    block: Block!
    hash: Bytes!
    deployment: Deployment!
    indexersCount: Int!
    allocatedTokens: BigInt
    indexers: [Indexer!]
}

type POIReport {
    poi: POI!
    blockCache: BlockCache
    callCache: CallCache
    entityChanges: entityChanges
}

@neysofu
Copy link
Member Author

neysofu commented May 19, 2023

I think it's a good start! I have a few suggestions, in no particular order:

  • Block should also have a network field.
  • I don't think there's yet any plans to include allocatedTokens in POI. We can leave the field optional and not populate it, for now.
  • I think there's some confusion in the schema with regards to subgraph versus deployment. A POI should have a subgraph field, and possibly deployments instead of indexers.
  • Subgraph should have the manifest hash and network.
  • Deployment should have a latestKnownPoi.

Still unsure how we should model divergences, but I think the proposed mutations are too high-level. The workflow that I imagine requires the investigator persona to look at a dashboard, notice that are e.g. 3 different POI values at the latest block, and launch investigations between those POIs. We may automate more of it in the future but the "primitive" investigation capability is between two POIs, fundamentally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants