Skip to content

Conversation

@juanmardefago
Copy link

@juanmardefago juanmardefago commented Oct 20, 2021

Could potentially fix #15. Changes the uses of getUnderlyingPrice to a safe call with try_getUnderlyingPrice.

We will need to restart the js wrappers after merging and deploying.

@ghostry
Copy link

ghostry commented Oct 25, 2021

ERRO Handler skipped due to execution failure, error: attempted to divide BigDecimal `2` by zero	wasm backtrace:	    0: 0x1051 - <unknown>!<wasm function 36>	    1: 0x284c - <unknown>!<wasm function 165>	    2: 0x2aca - <unknown>!<wasm function 168>	, handler: handleTransfer, block_hash: 0x5f469457371b974f86cc99689c3558d111b56120298f3d7ca07317d34b13ab5c, block_number: 13364303, sgd: 1, subgraph_id: QmT8REdioaAoLYep453coxfDDFhGniBwE8k14pUMSPcUjB, component: SubgraphInstanceManager

@juanmardefago
Copy link
Author

@ghostry did you run the code in your own infrastructure and got that error?

@ghostry
Copy link

ghostry commented Oct 26, 2021

@ghostry did you run the code in your own infrastructure and got that error?

The issue of the contract is already okay.

@cwang25
Copy link

cwang25 commented Nov 11, 2021

Hi it seems this fix might help on unblocking the current subgraph blockage.
Can you check-in the code changes ?

(I tried a bit on my subgraph studio, and found several other functions are also needed to wrap with try_ in order to unblock.)

Since this PR is 20+ days ago, not sure if it's still active here.
I have also created a PR #17 that included other fixes so at least the compound v2 subgraph can be unblocked.

Thanks

@juanmardefago
Copy link
Author

this code is deployed on my own subgraph as a workaround (https://thegraph.com/hosted-service/subgraph/juanmardefago/compound-v2) but ideally should be merged to the original one.

There might be additional places where try_ functions should be used (which I think you probably take care on your PR), this fix was mostly focused to the actual one that made the subgraph break, since it was meant as a fast patch to make sure some apps kept on working.

Feel free to continue with your PR, I'm quite sure there are other possible failure points which you might cover there :)

@juanmardefago juanmardefago merged commit 07817fd into graphprotocol:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexing error on subgraph

3 participants