Closed sduchesneau closed 1 year ago
First iteration here: https://github.com/graphprotocol/graph-node/commit/27f2d3b05ce9ddb62b55d7cc64e1c247a49ed1cd
(not tested yet)
Example of live substreams logs on an UNDO on commit 27f2d3b05ce9ddb62b55d7cc64e1c247a49ed1cd, branch stepd/substreams_undo_rework
Apr 17 19:16:18.614 DEBG 1 candidate trigger in this block, block_hash: 0xaf663d6acfed3c2bd60fb8407707bf5dd29bf3538cd88d689b2b28456ed9fab2, block_number: 17068500, sgd: 20, subgraph_id: QmYoeG7Y6EPsfSnhWjSQNKHXcWuArZqwEdjBfAUNRxYCPc, component: SubgraphInstanceManager
Apr 17 19:16:18.618 INFO Applying 3 entity operation(s), block_hash: 0xaf663d6acfed3c2bd60fb8407707bf5dd29bf3538cd88d689b2b28456ed9fab2, block_number: 17068500, sgd: 20, subgraph_id: QmYoeG7Y6EPsfSnhWjSQNKHXcWuArZqwEdjBfAUNRxYCPc, component: SubgraphInstanceManager
Apr 17 19:16:37.803 INFO Reverting block to get back to main chain, revert_to_ptr: #17068499 (d4167390009a48572851a541a4669e9ee3aa9f679a11b02e72965ccde98e244b), subgraph_ptr: #17068500 (af663d6acfed3c2bd60fb8407707bf5dd29bf3538cd88d689b2b28456ed9fab2), sgd: 20, subgraph_id: QmYoeG7Y6EPsfSnhWjSQNKHXcWuArZqwEdjBfAUNRxYCPc, component: SubgraphInstanceManager
Apr 17 19:16:37.960 DEBG 1 candidate trigger in this block, block_hash: 0x64315a119b85286be5603c15f3b7b1061e42aa3027db54b89961bdd79dfd37d7, block_number: 17068500, sgd: 20, subgraph_id: QmYoeG7Y6EPsfSnhWjSQNKHXcWuArZqwEdjBfAUNRxYCPc, component: SubgraphInstanceManager
Apr 17 19:16:37.973 INFO Applying 3 entity operation(s), block_hash: 0x64315a119b85286be5603c15f3b7b1061e42aa3027db54b89961bdd79dfd37d7, block_number: 17068500, sgd: 20, subgraph_id: QmYoeG7Y6EPsfSnhWjSQNKHXcWuArZqwEdjBfAUNRxYCPc, component: SubgraphInstanceManager
thanks @sduchesneau
Graph-node will need to support this: https://github.com/streamingfast/substreams/blob/rework_undo/docs/release-notes/change-log.md#110-unreleased