Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

ethClient missing required field 'v' for txdata #684

Closed
oucye opened this issue Nov 5, 2018 · 1 comment
Closed

ethClient missing required field 'v' for txdata #684

oucye opened this issue Nov 5, 2018 · 1 comment
Assignees

Comments

@oucye
Copy link

oucye commented Nov 5, 2018

when I use ethClient to connect etc node with method BlockByNumber, I get an error "missing required field 'v' for txdata"
etc rpc api doesn't return the params "v", "r" and "s" , how to fix this

@whilei
Copy link
Contributor

whilei commented Nov 6, 2018

eth_getBlockByNumber returns for field transactions "Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter".

And as documented here, https://github.com/ethereumproject/go-ethereum/wiki/JSON-RPC#eth_gettransactionbyhash, a "transaction object" doesn't contain a field v (or r or s), as you mentioned. This is for the Ethereum Classic implementation.

However, reading https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyhash shows that ETH has apparently decided to modify the return value for transaction objects, including v, r, and s.

If I'm correct in thinking that your ethClient in question is from https://ethereum.org/cli -- then this is because you're using an ETH-maintained client in conjunction with an ETC RPC.

I'll begin working a PR to add these fields to transaction objects for this client. In the meantime, you can use https://github.com/ethoxy/multi-geth which should fully support the ETH interfaces for ethClient.

@whilei whilei self-assigned this Nov 6, 2018
whilei added a commit that referenced this issue Nov 6, 2018
whilei added a commit to whilei/go-ethereum that referenced this issue Nov 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants