Go-Ethereum

私人集團網路,我在哪裡可以獲得區塊封印器和區塊獎勵?

  • December 28, 2019
  • 私有區塊鏈
  • PoA 驗證算法

使用geth attach MY-GETH-CLIENT,我想檢查一個塊的密封器以及它的獎勵。


使用eth.getBlock(BLOCK-NUMBER),礦工欄位有時等於 0x00…0:

   > eth.getBlock('216567')
   {
     difficulty: 2,
     extraData: "0xd883010907846765746888676f312e31332e34856c696e757800000000000000a5d63126675c1b8f9811e995dd8cb5276486a64b06ad590a542c74aea142b68a64abc2f5bbd1ba3b10adfa8200ce678961b22c724f4eca81ba1bb770942c7d6e01",
     gasLimit: 8000000,
     gasUsed: 0,
     hash: "0xed19228537c738101308a08811c4232ca72176efa55a498f7286ef915be854f0",
     logsBloom: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
   00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",      
     miner: "0x9a9ee44782accc4b5e893c0e7d16473ce19b79d6",
     mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
     nonce: "0xffffffffffffffff",
     number: 216567,
     parentHash: "0x1f80f98bfa571053745d99146f2665a2a69004e8134cc750ba94b17bd2fd5639",
     receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
     sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
     size: 609,
     stateRoot: "0xe2236887f5f873fd7e4a12ba8e6bbf10ab6b2c70adcba3488bb6e9c9e89b1151",
     timestamp: 1577436727,
     totalDifficulty: 433020,
     transactions: [],
     transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
     uncles: []
   }
   > eth.getBlock('216568')
   {
    properties,   
     miner: "0x0000000000000000000000000000000000000000",
Some more properties
   }

檢查地址的餘額0x9a9ee44782accc4b5e893c0e7d16473ce19b79d6返回 0:

> eth.getBalance('0x9a9ee44782accc4b5e893c0e7d16473ce19b79d6')
0

我在這裡讀到封印地址應該在額外數據中,但它在以下額外數據中的哪一部分(來自上面的塊 216567)?

extraData: "0xd883010907846765746888676f312e31332e34856c696e757800000000000000a5d63126675c1b8f9811e995dd8cb5276486a64b06ad590a542c74aea142b68a64abc2f5bbd1ba3b10adfa8200ce678961b22c724f4eca81ba1bb770942c7d6e01",

在 PoA 中,我如何獲得區塊的封印者以及如何知道區塊獎勵?

PS:我可以訪問 geth 中的以下模組: admin:1.0 clique:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

PoA 網路本身並沒有將獎勵納入共識。在某些情況下,這些是使用進行系統呼叫的智能合約創建的(請參閱 Energy Web Chain 和 POS_DAO),但如果您在本地執行 clique,則不會獲得區塊獎勵。

參考:

引用自:https://ethereum.stackexchange.com/questions/78535