Skip to content

Gas errors on the network #3558

Open
Open
@leoyvens

Description

@leoyvens

A number of subgraphs on the network have hit the default gas limit, so indexers must configure a larger one. We should look into these with the purpose of adjusting gas costs that may be overestimated. These subgraphs have been reported as going over the limit:

QmTiKBqwDjDtjAoCNgKLFjyg9UmwyFkVMFRVzBdnFmwYEi, QmayVPFDjZ4PP8rsKiNsZ3bZsqrQo4RTaeMm966wQsjP7R, QmWd8mE5nedM5smvzQhDYmsWEcgiAtdqccdZ2XCsvCdVEK.

The Eden Network (QmWd8mE5nedM5smvzQhDYmsWEcgiAtdqccdZ2XCsvCdVEK, source link case has more details. It fails with:

May 11 12:44:54.957 ERRO Subgraph failed with non-deterministic error: failed to process trigger: block #13807949 (0x0bf6…ac4c), transaction 0229c81e816101dbb7f5ecfb4ea3a0eb2c82083f10123e0a504a1dbd7063eaa1: Gas limit exceeded. Used: 10000016722787	wasm backtrace:	    0: 0x2235 - <unknown>!~lib/@graphprotocol/graph-ts/index/Value#toArray	    1: 0x2891 - <unknown>!src/network/stakeUnstake	    2: 0x271f - <unknown>!src/network/stakeUnstake~anonymous|5	    3: 0x292b - <unknown>!src/network/stake	    4: 0x29d2 - <unknown>!~lib/internal/memory/memcmp	, retry_delay_s: 1800, attempt: 651, sgd: 101, subgraph_id: QmWd8mE5nedM5smvzQhDYmsWEcgiAtdqccdZ2XCsvCdVEK, component: SubgraphInstanceManager
May 11 12:44:54.955 INFO Done processing trigger, gas_used: 0, data_source: EdenNetwork, handler: stake, total_ms: 62643, transaction: 0x0229…eaa1, address: 0x9e33…c453, signature: Stake(indexed address,uint256), block_hash: 0x0bf6b37adec469650eeac0d9dea4add97fcf9acbc37c3412accf40b96399ac4c, block_number: 13807949, sgd: 101, subgraph_id: QmWd8mE5nedM5smvzQhDYmsWEcgiAtdqccdZ2XCsvCdVEK, component: SubgraphInstanceManager

Probably due to iterating over a large collection, the network.stakers array might be as large as 4.5k entries.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions