I haven’t thought super deep on the implementation details. In general, anything that requires a private key to complete should be part of the signer API and antsything that requires chain interaction would be part of the other API.
This does get murky when you want to do things like verifiable signing UIs, because the signer needs chain access. In such cases I would argue that should be part of the signing API, as the signer can gracefully degrade if it doesn’t have chain access.
@charles-cooper: That works for me. If you tag me in a PR, I’ll be sure to review it. I’m also open to adding an additional EIP maintainer to 1474 so I’m not the sole reviewer and don’t be come bottleneck.
I posted something similar to this in the EIP PR for discussion on OpenRPC, but can these OpenRPC documents be composed? i.e. if we had a standard set of documents “these OpenRPC files represent the standard eth_* RPCs for 1.0” can I then publish a document on my node that includes the standard RPCs and includes my server specific endpoint name?
My reason for asking is that a spec for this should not consist of “please use OpenRPC” but instead it should be “here are the standard OpenRPC mappings for EIP X, EIP Y, and EIP Z, they live at URLs A, B, and C, and here is a sample of MultiGeth composing those into one endpoint.” Otherwise this EIP is noting more than “OpenRPC is cool, please use it.”
Yes! Excellently phrased. Same goes for GraphQL and anything else.
@bitpshr want to take another crack at making a separate JSON-RPC repo? I don’t have time to lead this process, but much like devp2p now has a separate repo to gather interested parties I think this would be valuable.
I think that having 1 canonical EIP that contains ALL the methods will help get everyone on the same page, rather than breaking it out to separate files. The same way the #1474 gets updated. Any client can easily extend it.
My concern with one canonical EIP is then clients that do not implement all the endpoints will need to edit the canonical file to remove them, and if clients are chopping up canonical files their value is diminished.
As an example Pantheon does not implement eth_send* and eth_sign* methods because we do not integrate a key management system for wallet keys in the node (this is a deliberate security decision).
I like the idea of just removing eth_send* and eth_sign* (except send raw) from the specification altogether. I’d rather users not be able to keep their funds in clients either.
EIP-1767 (the GraphQL EIP) also didn’t implement the send and sign transactions as a non-essential call for nodes. There appears to be some consensus on that. A second file with those APIs may be useful to clients who do implement it.
The draft says the following with regard to eth_getLogs -
Note: The return value of eth_getLogs when retrieving logs from eth_newBlockFilter and eth_newPendingTransactionFilter filters will be an array of hashes, not an array of Log objects.
I think it would be nice to clarify how to use eth_getLogs with block/pendingTransaction filters.
Is OpenRPC important to you? Do you see anything in the current spec that you’d like to change or improve? If so, please consider supporting the OpenRPC standard development process by joining the Technical Steering Committee. Contact me for details.
What’s the expected behavior of eth_getLogs if the blockHash does not correspond to any block? This is not just a theoretical consideration, since chain reorganizations might cause a blockHash to no longer be valid.
I’ve seen implementations which return the error code -32000 (invalid input) with the message "unknown block", I’ve seen implementations which simply return an empty array. Perhaps -32001 (resource not found) would be a better error code, but I didn’t see it in any implementation.
I think that the behavior for unknown blocks should be standardized.