-
-
Notifications
You must be signed in to change notification settings - Fork 327
Defining non-standard RPC method for transaction list #49
Comments
I like that approach. It makes the provider-engine into a sort of web3 middleware ecosystem, where you can plug extra APIs in that you’d like.
|
yeah i like this, but we need a better rpc prefix there |
Some ideas: |
|
I do like |
this should eventually go into an EIP/RFC |
Why the differentiation between |
|
@kumavis most block explorers don't make a distinction between that. You do that client side by comparing the |
From trufflesuite/ganache-cli-archive#45: I'm worried about adding application specific functions that don't directly relate to the TestRPC. i.e., I think this feature is great for the provider engine as the provider engine is meant to provide features on top of what's available in your Ethereum client. But the TestRPC has a much narrower scope. |
My thoughts on this have been evolving, and I've mostly come to this conclusion:
Because of the above reasons, it's far better to create a new npm module that abstracts out these two apis, similar to the pkgcloud module for services like Rackspace, AWS, etc. This module would be generally useful, rather than coupled to the provider engine, and it would have a more direct API since you wouldn't need to call it via This is where I currently stand. I'd do a complete 180, however, if you told me we were going to lobby @frozeman, Jeff, Gavin, etc. to get the method added to Ethereum clients and to the JSON RPC API (not unheard of). I think this is very valuable functionality for a client to have, but if it's not standard and will never be we should make different development decisions. |
Sorry - accidentally closed. |
A lengthy discussion over at geth about the same topic: ethereum/go-ethereum#1897. |
@axic thanks for the link! I have most of an rpc polyfill for PS: doesnt work for |
@kumavis yeah, it takes a big toll on RPC :( Experimented a bit too. I still think it would be a real addition to testrpc, albeit maybe should be somewhat hidden and only made available through provider-engine. |
If there were an RPC-middleware service that were responsible for exposing and caching those sorts of responses, it should be wrappable around any RPC, be it |
@FlySwatter well provider-engine is the middleware, isn't it? And it certainly can be implemented, although it should have a more persistent storage. Based on personal experience as well as from that other thread, it takes a lot of effort to build up that data, even if a node sees all transactions and not speaking about retroactively trying to retrieve all blocks. |
FYI: Very happy to add |
I was just thinking how since you might want to consume an RPC server (like testrpc), and also customize an RPC, there might be room for an RPC-centric wrapper for provider-engine, that allows intercepting and forwarding network requests the same way provider-engine does with javascript methods.
|
@tcoulter well I do not see that coming along anytime soon. I fully understand your point of not misleading devs with a method in testrpc, which isn't available elsewhere. Would it be possible to have a non-publicly exposed method in testrpc to keep this data, which could be somehow accessed by provider-engine? |
fwiw, the testrpc would handle the polyfill well |
The official RPC doesn't (and probably will never) support a method to retrieve transaction list associated with an address.
I think it could make sense having a non-standard method for that. There are multiple ways to create that data:
The reason having a fixed API is useful:
Suggestion:
zeroclient_getTransactions
which returns an array of transactionsSample response: http://api.etherscan.io/api?module=account&action=txlist&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae&sort=asc
The text was updated successfully, but these errors were encountered: