You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Block miner hash value always 0x0 in eth_getBlockBy* jsonrpc response
Description
According to https://eth.wiki/json-rpc/API#eth_getBlockByHash, the miner hash should be "the address of the beneficiary to whom the mining rewards were given" (or the address of the block's validator).
Using either the dev or server command - and tested on both eth_getBlockByNumber and eth_getBlockByHash, I always see the miner value being:
0x0000000000000000000000000000000000000000
I expect the miner value to be one of the validator's addresses.
I expect the miner value to be one of the validator's addresses. In my example above running 4 validators, I expect the miner hash to be the address of one of those 4 validators.
@dankostiuk The consensus used currently in polygon-sdk is IBFT, which is implemented according to ethereum/EIPs#650 which in turn builds upon the voting mechanism explained in Clique PoA: ethereum/EIPs#225
Looking at the EIP-225 (Clique PoA), this is the relevant part that explains what the miner (aka beneficiary) is used for:
We repurpose the ethash header fields as follows:
beneficiary: Address to propose modifying the list of authorized signers with.
Should be filled with zeroes normally, modified only while voting.
Arbitrary values are permitted nonetheless (even meaningless ones such as voting out non signers) to avoid extra complexity in implementations around voting mechanics.
Must be filled with zeroes on checkpoint (i.e. epoch transition) blocks.
thus, you can see that the miner field is used for proposing a vote for a certain address, not to show the proposer of the block.
The information about the proposer of the block can be found by recovering the pubkey from the Seal field of the RLP encoded Istanbul extra data field in the block headers.
…ng logic (#112)
* Introduce ECDSAKey and decouple from ethgo transactions signing logic
* Fix panic in e2e test(s)
* Fix checkpoint manager unit tests
* Try to fix extract signature failure
* Change signature of sign callback function
* Use the latest signer in the tx relayer
* Minor fixes
* Fix panic when unsigned transaction is sent to txrelayer
* Instantiate LondonOrBerlin signer in the TestCluster.SendTxn
* Minor change
* Lint fix
* Build fixes
* Add log to tx pool
* Typo fix and small simplification
* Build fix
* callback function fix
* rebase fixes
* lint fix
* fixes for e2e
* migration test fix
* transactionWithHeaderInstructions fix
* Fix linters
* Fix linter (uncapitalize param name)
* Remove debug log
* Adapt the unit test
* Merge fix
* Fix TestE2E_JsonRPC_NewEthClient
* Lint fix
* comment fix
* lint fix
* test fix
* one more transaction contructor
---------
Co-authored-by: Dusan Nosovic <[email protected]>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Block miner hash value always 0x0 in
eth_getBlockBy*
jsonrpc responseDescription
According to https://eth.wiki/json-rpc/API#eth_getBlockByHash, the miner hash should be "the address of the beneficiary to whom the mining rewards were given" (or the address of the block's validator).
Using either the
dev
orserver
command - and tested on botheth_getBlockByNumber
andeth_getBlockByHash
, I always see the miner value being:I expect the miner value to be one of the validator's addresses.
Your environment
OSX 11.4
develop
Steps to reproduce
./main server...
and ensure all 4 nodes have visibility of eachother:{"id":1,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", true]}
Expected behaviour
I expect the miner value to be one of the validator's addresses. In my example above running 4 validators, I expect the miner hash to be the address of one of those 4 validators.
Actual behaviour
I always see the HTTP response containing:
which makes it difficult to determine who mined the block.
The text was updated successfully, but these errors were encountered: