-
Notifications
You must be signed in to change notification settings - Fork 146
Implement eth_getTransactionByHash #1011
Comments
This is fairly simple to implement using graphql. I have added a test here: trinity/tests/core/graphql-rpc/test_grqphql.py Lines 418 to 446 in 6b6d224
I haven't exposed all fields, but just writing all the attribute names in the query will fetch the needed attributes. Maybe this is off topic as this needs to be implemented in JSON-RPC , but I'm just excited to share my progress : )
EDIT: |
Some thoughts... Initial implementation should be dead simple. If we have the transaction we return it. The later work is to figure out what we can do when we don't know about the hash yet. If we want to be a full client in 5 minutes we need a solution for getting them on demand. Ideas for how we might do that?
|
As a note, Jason and I talked about this and had the idea that |
This RPC is less critical than the RPCs which involved state, I think I remember that syncing the chain + bodies only takes a few hours? But if we want to make the UX even better yeah, I don't see a way beyond what you've described here, somehow asking remote peers for these transactions. As an ugly kludge, each day we could generate a bunch of shards and upload them to s3 for clients to download-on-demand, then clients would be able to answer |
This has now landed as part of #1329. It doesn't do any clever beam sync related things to deal with the case were we try to act as a full node when in reality we haven't synced any historical data yet. But I don't think this is what the ticket is about so I'm closing this for now. |
From #26,
eth_getTransactionByHash
is not implemented.The text was updated successfully, but these errors were encountered: