A couple of weeks ago, with the release of fuel-core v0.31.0, we left the complexity query limit of our GraphQL endpoint set to 10M, mentioning that we would reduce it in the coming weeks. To ensure the ongoing stability of our network, we have now decided to reduce the complexity limits of our GraphQL endpoints from 10M to 20k. The original high limits exposed Fuel to potential DoS-like attacks, so it’s prudent to close these attack vectors as soon as possible.
Based on our analysis, the 20k limit will be sufficient for normal, ongoing use.
We will be implementing these changes in our Testnet environment today, October 2nd. We recommend that you load-test any large GraphQL queries to identify any potential impact. If this change affects your work or compromises any critical timelines, please let us know by putting your queries in this thread. The Mainnet, when released, will also have these limits in place.
The simplest fixes to issues will likely be one of the two options listed below:
- For ongoing updates, split large queries into multiple smaller queries of lower complexity.
- To synchronize with our nodes from scratch, use a local node rather than GraphQL queries.
We would appreciate a quick feedback loop. If you encounter specific issues that are not resolved using the above methods, please reach out to us for support by replying with your queries in here.
We have decreased the complexity to 80k in the testnet network i.e. you can query up to 40 blocks in one request. Let us know if something breaks for you.
@Nazeeh21 Hi!
We’re having this problem on one of our indexers right now
22:17:02 INFO sqd:batch-processor 7070049 / 12166604, rate: 364237 blocks/sec, mapping: 1189 blocks/sec, 30 items/sec, eta: 14s
22:17:09 INFO sqd:batch-processor 10790899 / 12166604, rate: 892557 blocks/sec, mapping: 2375 blocks/sec, 59 items/sec, eta: 2s
22:17:11 FATAL sqd:batch-processor GraphqlError: GraphQL error: Query is too complex.
at HttpClient.graphqlRequest (/Users/master/spark-subsquid-indexer/node_modules/@subsquid/http-client/lib/client.js:314:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/master/spark-subsquid-indexer/node_modules/@subsquid/fuel-data/lib/data-source.js:67:28
at async HttpDataSource.retry (/Users/master/spark-subsquid-indexer/node_modules/@subsquid/fuel-data/lib/data-source.js:94:24)
at async HttpDataSource.getSplit (/Users/master/spark-subsquid-indexer/node_modules/@subsquid/fuel-data/lib/data-source.js:66:24)
at async /Users/master/spark-subsquid-indexer/node_modules/@subsquid/util-internal-ingest-tools/lib/cold.js:50:22
messages: [{"message":"Query is too complex."}]
You will need to query less data in one request. It shouldnt be more than 40 blocks each request