-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Description
go-ethereum/internal/ethapi/api.go
Line 1375 in 34d5072
| V *hexutil.Big `json:"v"` |
Geth currently is returning transactions that have a v value even when that doesn't make sense. EIP-2930 and EIP-1559 declare a yParity property on those transactions which is defined as "The parity (0 for even, 1 for odd) of the y-value of a secp256k1 signature." v is not defined anywhere in either of those EIPs and what one might put in a variable called v is incredibly ambiguous as it could be any of:
- yParity + 27
- yParity + 35 + 2 * chainId
- yParity (what I think geth is doing)
While I advocate for fixing the source code to use yParity instead of v for type 1 and 2 transactions internally so the code is more readable and follows the specification closer, what actually matters here is that the JSON-RPC should be including a yParity in any transaction response with a type 1 or type 2 transaction.
For backward compatibility, it seems reasonable to continue to include a v value that contains whatever it contains now, with perhaps some plan (or not) to eventually remove it.