-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Dynamic Data Sources with unknown ABIS #892
Comments
First thoughts on this:
@leodasvacas Since we've both worked on the TS API a bunch, what do you think? |
@Jannis I searched a bit, to implement My concern with trying to call is whether we can know if the call failed for a deterministic reason. If we cannot tell transient failures from a missing method failure, that API would bring up the same determinism issue we have with IPFS. But it's probably possible to tell if the web3 error was a network failure or an error returned by the ethereum node, which should be good enough for us. I don't think codegen bloat is a concern for us, so my preference is for generating |
Can we push this up the list and get it done this week? The plan right now is to show the updated Uniswap subgraph to them next Monday. Let's figure this out tomorrow morning! |
I did a quick test to see what sort of error @davekaj we need a source of truth for which contracts implement these interfaces, be it hardcoded, in IPFS or on-chain. Ideally Uniswap would have interfaces for those methods and mandate that the exchanges implement ERC-165, but that doesn't seem to be the case. |
Yeah, I see your point. It would be useful if Uniswap had used ERC-165. Is it possible to still try and call the function, and if it fails - we just leave it out, even though it is non-deterministic? I am wondering for this reason:
Is this possible? Or can we not bring in this non-determinism into the graph node? |
@davekaj The only precedent for successful, non-deterministic indexing is |
Okay cool, so the question now becomes:
I am going to relay this back in the engineering chat so we can decide quickly |
Actually I've changed my mind - the subgraph will still be very good, its just a small implementation detail. I can work around it, and then a small update can be pushed in the future. We have pushed small updates to Compound so it is normal for this to happen. So I am going to say we do not have to figure this out by monday, but we still have to figure it out - the sooner the better though! |
👋🏻 noah from uniswap here, just read through the thread, please let me know if there's anything i can do to help on my end! |
initially I thought we couldn't solve this since the Geth RPC response is too generic, but depending on what Parity responds it might be possible to solve this. |
It turns out that, at least for Parity, the response for a missing method is the same as when the call reverts, so this was the same as #1139 which is fixed. Yay! |
Right now we can't run dynamic data sources for reading
symbol()
anddecimal()
andname()
for all the tokens on Uniswap.This is because Uniswap does not do any checking to see what contracts are stored in its Factory contract as a "Uniswap Exchange." This has led to the fact that the Graph Node will crash when trying to read
symbol
anddecimal
.The feature I am requesting is this: have functionality in the mappings to call into a contract and see if a function exists. It might look something like this:
This is causing a blocker on Uniswap as I can't index all the exchanges for their symbol and decimal and these are important for the data, otherwise it gets confusing what you are looking at. I could hard code them all, but thats over 250 exchanges, and it isn't a long term solution.
The text was updated successfully, but these errors were encountered: