FeedProjects
Developers
Settings
🎉 A new chapter begins: Boardroom has joined Agora
Learn more
protocol logo
Explore / Projects
TheGraphCouncil

Proposals

Members

Information

Create Proposal

TheGraphCouncil

ProposalsMembersInformation
Proposal
Back to Proposals
closedEnded 3 years ago · Snapshot (Offchain)

GGP 0023: Add Mainnet Support for Fantom and Polygon Data Sources

By 0xd2Ee...dc6de2

Summary

This GGP proposal now updates the previously ratified Feature Support Matrix (GGP-0022) to include two new data sources: Fantom and Polygon.

Polygon and Fantom QoS Analysis

The table below summarises the gateway-based QoS metrics extracted for the two-week period MIPs participants were actively serving MIPs subgraphs on Goerli.

Chain / metricUnique indexerstotal_queriesnum_failed_queriessuccess_ratemedian_blocks_behindmedian_blocks_behind (s) & ~ block timemedian_latency_mslatency_90th_pctl_mslatency_99th_pctl_ms
Gnosis8598567560070.9879673.015 (5s)1704891847
Arbitrum4025297167960.99820374.018 (235 ms)49523605251
Avalanche199631973370.95618912.024 (2s)866562311574
Celo1860433720.9981984.020 (5s)3716771221
Fantom3469295317916001890.99268639.039 (1s)55814483866
Polygon29616919043474100.99867717.034 (2s)38711573199

The list of subgraphs Indexers have synced and served can be found here for Polygon and Fantom.

Potential Risks

Fantom

Apart from a lack of client diversity, no major issues have been verified during Goerli testing.

  • Indexers have been running Fantom archive nodes with no issues.
  • No outages have been recorded, and the underlying client is stable and worked reliably under average query load.

Polygon

Contrary to Fantom, there are some risks with Polygon clients (canonical Erigon and Polygon-forked Erigon).

Even though the Polygon and Erigon team have worked together since the recent hard fork to fix most of the issues which prevented Indexers from reliably serving Polygon subgraphs, it is still unclear if Erigon will formally accept a grant from the Polygon Foundation to maintain the canonical Erigon (which would result in Polygon deprecating their fork).

A summary of risks related to Polygon:

  • The official Polygon-provided snapshot has missing state sync transactions, which prevents Indexers from syncing subgraphs.
    • This can be mitigated by syncing a new archive node with Erigon’s built-in snapshot feature turned off. The Polygon team is aware of the problem, but as of April 28, 2023, there’s no one working to resolve due to a lack of bandwidth.
    • There are community-based snapshots Indexers are now sharing. These have been verified to work (no missing state sync transactions), allowing Erigon to continue running when syncing subgraphs.
  • Erigon’s default configuration options are not suitable for Polygon archive nodes. Graph Indexers must specify specific config parameters to ensure the node doesn’t get into read-only mode past the 7.2 TB database size mark. Read more here.
    • This can be mitigated with proper official Indexer-focused documentation under thegraph.com/docs. Different guides have been written for the program, which should now be added to our official docs.

It’s also important to note there’s a geth-based Firehose implementation, which has been tested heavily by core development teams like Edge & Node, Streaming Fast, and Pinax when serving the needs of the hosted service and Subgraph Studio. However, as of April 28, 2023, Indexers still need an Erigon-based archive node for the eth_call JSON-RPC method.

Lastly, data integrity is not verified as part of MIPs missions. This will change with the GIP-based chain integration process that’ll be in effect post-MIPs.


Proposed Updated Feature Support Matrix

The proposed updated Feature Support Matrix can be found below, and this PR will be merged once this proposal is accepted.

graph-node: ≥0.30.0 <0.31.0
valid from: 787
upgrade window: 795
Subgraph FeatureAliasesImplementedExperimentalQuery ArbitrationIndexing ArbitrationIndexing Rewards
Core Features
Full-text SearchYesNoNoYesYes
Non-Fatal ErrorsYesYesYesYesYes
GraftingYesYesYesYesYes
Data Source Types
eip155:**YesNoNoNoNo
eip155:1mainnetYesNoYesYesYes
eip155:100gnosisYesYesYesYesYes
near:**YesYesNoNoNo
cosmos:**YesYesNoNoNo
arweave:**YesYesNoNoNo
eip155:42161arbitrum-oneYesYesYesYesYes
eip155:42220celoYesYesYesYesYes
eip155:43114avalancheYesYesYesYesYes
eip155:250fantomYesYesYesYesYes
eip155:137polygonYesYesYesYesYes
Data Source Features
ipfs.cat in mappingsYesYesNoNoNo
ENSYesYesNoNoNo
File data sources: IPFSYesYesNoYesYes

Epoch Block Oracle (EBO) Multisig Transaction

At a protocol-level, adding experimental support for the two new chains with support for indexing rewards and arbitration is a matter of registering these two chains into the canonical EBO (Data Edge contract). The details can be found below.

RegisterNetworks EBO message:

[
  {
    "add": [
      "eip155:250",
      "eip155:137"
    ],
    "message": "RegisterNetworks",
    "remove": []
  }
]

Resulting calldata:

a1dce33200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000019030105156569703135353a323530156569703135353a31333700000000000000

The calldata can be verified with https://graphprotocol.github.io/block-oracle/

CAIP2-ID <> Network name

fantom:  eip155:250
polygon: eip155:137

Next Steps

Once this proposal is accepted:

  1. The resulting call data will be signed by Council members and executed against the following ratified EBO (Epoch Block Oracle) instances:

    Ethereum Mainnet DataEdge contract**:** 0xADE906194C923b28F03F48BC5D9D987AAE21fFab Arbitrum One DataEdge contract: 0x633bb9790d7c4c59991cebd377c0ed6501a35ebe

  2. The PR with the proposed updated feature matrix support will be merged.

  3. Anyone will be able to publish Fantom and Polygon subgraphs to the network (Ethereum and Arbitrum One), including through Subgraph Studio.

  4. Indexers will be able to serve any Polygon subgraph on Ethereum and Arbitrum One, earning indexing rewards.

Continue Reading
Connect Wallet to Add Note
0
Votes 2
VoterCast PowerVote & Rationale
0x38FA...8d4Da8
1

Yes

0x37BC...95B391
1

Yes

VOTE POWER
0
Connect Wallet
Proposal Status
  • Sat April 29 2023, 01:00 pmVoting Period Starts
  • Sat May 06 2023, 01:00 pmEnd Voting Period
Current Results

1-Yes

2

DocumentationBrandingContact Us
Home
This Project is Currently Disabled

If you would like to enable it, please checkout below.

Boardroom Subscription

Sign up for an individual subscription (access all projects on the platform)

Subscribe
Enable Project

Enable the entire project for every user

Enable Project
Contact Us