-
Notifications
You must be signed in to change notification settings - Fork 145
[WIP] Add GraphQL interface to Ethereum node data #972
Conversation
trinity/graph_ql/graphiql.py
Outdated
@@ -0,0 +1,95 @@ | |||
import json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to get rid of this file. This was added for testing.
This PR is now functionally complete. However, there's a lot more work remaining before this is ready for reviewing. I'm adding a bunch of TODO's for myself here. TODO
|
Sorry, for keeping this PR on hold. Some work came up along the way. Will resume this on this weekend. |
trinity/graph_ql/types.py
Outdated
return hex(self.value) | ||
|
||
async def resolve_index(self, info): | ||
# FIXME: Figure out a way to get this value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be a good starting point:
We store this additional metadata about transactions. Maybe we need to store more?
@voith Can you list
|
@adamschmideg My humble Apologies for the late reply. I will start working on this PR again from tomorrow. Just to warm things up, I fixed the broken |
I'd like to write a test script for Trinity, similar to this one. It has a number of assumptions:
|
@adamschmideg I don't have a workaround at hand but maybe I could find time to add that feature next week. |
make lint happy fix tests fix tests fix tests fix tests make lint happy
@adamschmideg Can you try the following.
|
I had to When I refresh the browser, I get this error ERROR 2019-11-11 13:51:02,599 http Unrecognized exception while executing RPC
Traceback (most recent call last):
File "/tmp/voith-trinity/venv/lib/python3.7/site-packages/trinity/rpc/http.py", line 41, in handler
result = await rpc.execute_post(body_json)
File "/tmp/voith-trinity/venv/lib/python3.7/site-packages/trinity/rpc/graph_ql/server.py", line 44, in execute_post
return_promise=True
File "/tmp/voith-trinity/venv/lib/python3.7/site-packages/promise/iterate_promise.py", line 10, in iterate_promise
yield from promise.future # type: ignore
concurrent.futures._base.CancelledError The graphiql part is working (schema, etc), but running a |
I've never seen the
Interesting! It takes a while for that endpoint to respond initially. The @pipermerriam Although this |
@adamschmideg I still need to write some tests but other than that the They do only allow exporting / importing of single blocks so far (geth allows ranges) |
Our JSON-RPC requests being served slowly and often timing out is a real problem that is also well reflected in our flaky integration tests. However, I don't the eventbus is at fault. We run benchmarks for the event bus and it can easily propagate thousands of events per second. What I think is at fault is that our networking process may be overloaded with blocking calls, stalling the event loop. For these tests where you just import blocks and then query them through graphql one thing that you could try is to drastically trim down the jobs of the node. Maybe try running with |
Sorry, I no longer have the bandwidth to work on this. So, I'm closing this PR |
What was wrong?
closes #302
How was it fixed?
This is some very dirty code. Please don't bother to review. I will ping here once this is ready for review. I'm submitting early to show that I'm actively working on this.
To-Do
Cute Animal Picture