Skip to content

Investigate Firehose restarts with static filters #5327

Closed

Description

@mangas

using GRAPH_STATIC_FILTERS_THRESHOLD=10 doesn't actually force the static_filter restart behavior

Apr 09 10:11:28.268 INFO Blockstream disconnected, connecting, provider_err_count: 0, cursor: k95Ckk4pxvCKaJXWXAG9taWwLpc_DFttVgzjKhlEj4ii8XqR3JuhAjIna0nVkqii1EC5SQn539ieFnsv8cBZvYS-krph6nU-FSgsx4jq_uDvfvP0alkScOk2X-PaatHRWj7UZQz7crQK44HmMqfYYUUwMZUleGOxjm1Z99dWI_YQviA3xmj-c8bTha_H84dGq-R2F-T1lC-mUzV7LEkJbsWDNaaftmgobA==, subgraph: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, start_block: 12376086, endpoint_uri: mainnet-firehose-sf, provider: mainnet-firehose-sf, deployment: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: FirehoseBlockStream
Apr 09 10:11:30.579 INFO Blockstream connected, provider: mainnet-firehose-sf, deployment: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: FirehoseBlockStream
Apr 09 10:11:30.606 DEBG Connecting to firehose to retrieve block for cursor uHKOvulyt13gSxcPZkVUS6WwLpc_DFttVgzjKhlHj4zy9CSXiZSgAGB0Ok6GlPiljhLoGQuo2N_ER3h_p8YDvIXpy-5guXM_RXx4kdy_r-W-Lvb7a14dI79kCruMYorRWj7UZQz7crcK59HjbKGNbkQyY8Z0fzC33moDpYYGIacXuXpmxTiodZzShPiep4YVreUmQ7CjwHr3VmQrKUYIacrQY_TK7j4gNw==, block_hash: 0x744fbd96011bcf4aec73ba4609c64e6c0d38f4db737d2eadaaf59bd6b46ea20b, block_number: 12376086, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 10:11:30.928 DEBG Starting or restarting subgraph, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 10:11:30.928 INFO **forcing subgraph to use static filters., sgd: 11, subgraph_id:** QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 10:11:30.928 INFO Blockstream disconnected, connecting, provider_err_count: 0, cursor: uHKOvulyt13gSxcPZkVUS6WwLpc_DFttVgzjKhlHj4zy9CSXiZSgAGB0Ok6GlPiljhLoGQuo2N_ER3h_p8YDvIXpy-5guXM_RXx4kdy_r-W-Lvb7a14dI79kCruMYorRWj7UZQz7crcK59HjbKGNbkQyY8Z0fzC33moDpYYGIacXuXpmxTiodZzShPiep4YVreUmQ7CjwHr3VmQrKUYIacrQY_TK7j4gNw==, subgraph: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, start_block: 12376087, endpoint_uri: mainnet-firehose-sf, provider: mainnet-firehose-sf, deployment: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: FirehoseBlockStream
Apr 09 10:11:33.152 INFO Blockstream connected, provider: mainnet-firehose-sf, deployment: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: FirehoseBlockStream
Apr 09 10:11:33.242 DEBG Connecting to firehose to retrieve block for cursor tO-Ipe_4_qtBlfY98USWq6WwLpc_DFttVgzjKhhAj4qkpnuXjpr3VGAgO0uDl_ii1US9TQn6jNzJQiov9sZT7Yfulblh7iA5Ry56kozo_by5LfT7awkeebgwV76KY9nRWj7UZQz7c7AK4YexM6GKYBNmY5J1ejW03m1Y89NSI_VDundjl2j5dcyDhv_A8IdC_uMkEbKgkC2lD2MoK0YIPsmKZKCX6zghZA==, block_hash: 0x1bf9bc7ad1ecfc7ab8af6cfb34fdd463af4f153111ef15668fe79b3583b8d411, block_number: 12376091, sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
**Apr 09 10:11:33.511 DEBG Starting or restarting subgraph, sgd: 11, subgraph_id**: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 10:11:33.511 INFO forcing subgraph to use static filters., sgd: 11, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager

After replacing switching from threshold to EXPERIMENTAL_STATIC_FILTERS=true. With this flag the subgraph did not experience any restarts. An example from the logs:

Of note in the logs that data sources were created, which normally would trigger a restart and didn't. There's also no log "Starting or Restart Subgraph"

Apr 09 09:39:18.526 INFO 259 triggers found in this block for the new data sources, block_hash: 0x0721c402537a91b437e8f3652f282fcab3590e559f859993e91cb1c8705e9954, block_number: 12376283, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.526 DEBG Creating 1 dynamic data source(s), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.526 DEBG Persisting data_source, address: 919fa96e88d67499339577fa202345436bcdaf79, name: Pool, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.533 INFO Done processing trigger, gas_used: 1035565975, data_source: Pool, handler: handleInitialize, total_ms: 7, transaction: 0x165e…4d5f, address: 0x919f…af79, signature: Initialize(uint160,int24), block_hash: 0x0721c402537a91b437e8f3652f282fcab3590e559f859993e91cb1c8705e9954, block_number: 12376283, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.538 INFO Done processing trigger, gas_used: 1772330326, data_source: Pool, handler: handleMint, total_ms: 4, transaction: 0x165e…4d5f, address: 0x919f…af79, signature: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256), block_hash: 0x0721c402537a91b437e8f3652f282fcab3590e559f859993e91cb1c8705e9954, block_number: 12376283, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.539 INFO Applying 22 entity operation(s), block_hash: 0x0721c402537a91b437e8f3652f282fcab3590e559f859993e91cb1c8705e9954, block_number: 12376283, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.543 DEBG Start processing block, triggers: 36, block_hash: 0x46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, block_number: 12376284, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.550 INFO Done processing trigger, gas_used: 1808814013, data_source: Pool, handler: handleMint, total_ms: 6, transaction: 0x70c4…aef1, address: 0x4e68…fa36, signature: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.551 INFO Done processing trigger, gas_used: 151129235, data_source: NonfungiblePositionManager, handler: handleTransfer, total_ms: 0, transaction: 0x70c4…aef1, address: 0xc364…fe88, signature: Transfer(indexed address,indexed address,indexed uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.552 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: 99fbab88000000000000000000000000000000000000000000000000000000000000020f, address: c36442b4a4522e871399cd717abdd847ab11fe88, fn: positions, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.555 INFO Done processing trigger, gas_used: 5470114672, data_source: NonfungiblePositionManager, handler: handleIncreaseLiquidity, total_ms: 4, transaction: 0x70c4…aef1, address: 0xc364…fe88, signature: IncreaseLiquidity(indexed uint256,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.559 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: f3058399, address: 7858e59e0c01ea06df3af3d20ac7b0003275d4bf, fn: feeGrowthGlobal0X128, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.562 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: 46141319, address: 7858e59e0c01ea06df3af3d20ac7b0003275d4bf, fn: feeGrowthGlobal1X128, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.566 INFO Done processing trigger, gas_used: 11910804271, data_source: Pool, handler: handleSwap, total_ms: 10, transaction: 0x3f3b…c100, address: 0x7858…d4bf, signature: Swap(indexed address,indexed address,int256,int256,uint160,uint128,int24), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.573 INFO Done processing trigger, gas_used: 1806409708, data_source: Pool, handler: handleMint, total_ms: 6, transaction: 0x1e24…cbcd, address: 0x1d42…d801, signature: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.574 INFO Done processing trigger, gas_used: 151129235, data_source: NonfungiblePositionManager, handler: handleTransfer, total_ms: 0, transaction: 0x1e24…cbcd, address: 0xc364…fe88, signature: Transfer(indexed address,indexed address,indexed uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.575 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: 99fbab880000000000000000000000000000000000000000000000000000000000000210, address: c36442b4a4522e871399cd717abdd847ab11fe88, fn: positions, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.578 INFO Done processing trigger, gas_used: 5468237049, data_source: NonfungiblePositionManager, handler: handleIncreaseLiquidity, total_ms: 3, transaction: 0x1e24…cbcd, address: 0xc364…fe88, signature: IncreaseLiquidity(indexed uint256,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.584 INFO Done processing trigger, gas_used: 1773435408, data_source: Pool, handler: handleMint, total_ms: 5, transaction: 0xb41b…8e34, address: 0x1d42…d801, signature: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.585 INFO Done processing trigger, gas_used: 144178642, data_source: NonfungiblePositionManager, handler: handleTransfer, total_ms: 0, transaction: 0xb41b…8e34, address: 0xc364…fe88, signature: Transfer(indexed address,indexed address,indexed uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.586 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: 99fbab880000000000000000000000000000000000000000000000000000000000000211, address: c36442b4a4522e871399cd717abdd847ab11fe88, fn: positions, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.590 INFO Done processing trigger, gas_used: 5459997432, data_source: NonfungiblePositionManager, handler: handleIncreaseLiquidity, total_ms: 4, transaction: 0xb41b…8e34, address: 0xc364…fe88, signature: IncreaseLiquidity(indexed uint256,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.597 INFO Done processing trigger, gas_used: 2079378541, data_source: Pool, handler: handleMint, total_ms: 7, transaction: 0x57f4…dcaf, address: 0x8ad5…e6d8, signature: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.598 INFO Done processing trigger, gas_used: 212561180, data_source: NonfungiblePositionManager, handler: handleTransfer, total_ms: 0, transaction: 0x57f4…dcaf, address: 0xc364…fe88, signature: Transfer(indexed address,indexed address,indexed uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.599 DEBG eth_call, block_number: 12376284, block_hash: 46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, data: 99fbab880000000000000000000000000000000000000000000000000000000000000212, address: c36442b4a4522e871399cd717abdd847ab11fe88, fn: positions, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.603 INFO Done processing trigger, gas_used: 5533448147, data_source: NonfungiblePositionManager, handler: handleIncreaseLiquidity, total_ms: 5, transaction: 0x57f4…dcaf, address: 0xc364…fe88, signature: IncreaseLiquidity(indexed uint256,uint128,uint256,uint256), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.606 INFO Applying 37 entity operation(s), block_hash: 0x46f66c8e2713af370b73fe61756698d19fd3d953b4ddacb72d844173f1ff094a, block_number: 12376284, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.610 DEBG Start processing block, triggers: 4, block_hash: 0xb8108986ff7eae37958a76c89ed9984359f95a1c89af0902f1a6ee1426b40c40, block_number: 12376285, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.616 DEBG eth_call, block_number: 12376285, block_hash: b8108986ff7eae37958a76c89ed9984359f95a1c89af0902f1a6ee1426b40c40, data: f3058399, address: 1d42064fc4beb5f8aaf85f4617ae8b3b5b8bd801, fn: feeGrowthGlobal0X128, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.619 DEBG eth_call, block_number: 12376285, block_hash: b8108986ff7eae37958a76c89ed9984359f95a1c89af0902f1a6ee1426b40c40, data: 46141319, address: 1d42064fc4beb5f8aaf85f4617ae8b3b5b8bd801, fn: feeGrowthGlobal1X128, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.625 INFO Done processing trigger, gas_used: 12287168169, data_source: Pool, handler: handleSwap, total_ms: 13, transaction: 0x3689…e429, address: 0x1d42…d801, signature: Swap(indexed address,indexed address,int256,int256,uint160,uint128,int24), sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
Apr 09 09:39:18.625 INFO Applying 10 entity operation(s), block_hash: 0xb8108986ff7eae37958a76c89ed9984359f95a1c89af0902f1a6ee1426b40c40, block_number: 12376285, sgd: 10, subgraph_id: QmUewYbSaje7v8AvLdWQUCiSQQedgGnbNEgcyiqhhiRbCT, component: SubgraphInstanceManager
A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions