This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
eth RPC should use Engine's extra_info()
to populate header fields
#3148
Labels
F3-annoyance 💩
The client behaves within expectations, however this “expected behaviour” itself is at issue.
M5-binaries 📦
External binaries (ethkey, ethstore, ethvm, etc.)
M6-rpcapi 📣
RPC API.
Milestone
As pointed out in ethereum/go-ethereum#3230, the Golang RPC client expects a
mixHash
field in the result of theeth_getBlockByNumber
method.Parity, also when using
--geth
, provides this information insealFields
instead of inmixHash
.The eth RPC should remain consensus-system neutral, however
Engine
trait providesextra_info()
function which can provide these fields (forEthash
engine, it translates a header into these extra fieldsmixHash
andnonce
).BlockChainClient
trait will need an additional function which proxys theEngine::extra_info()
function through toEth
RPC handler so it can return it under the normal circumstances of returning a header.The real difficult part is getting this into the JSONRPC serialiser, which afaik is hard coded to use only a structs fields. A custom serialiser will likely have to be done with the serialisable struct having an additional
extra_info
field, which is not serialised directly, but rather provides these additional key/value pairs for the JSON object.The text was updated successfully, but these errors were encountered: