Go-Ethereum
哪個節點可以在區塊 0 中提供交易?
我們正在為乙太坊交易建立一個數據分析平台。我同時使用本地 Parity 節點和 Infura Geth 節點,但找不到在塊 0 發生的事務。
Etherscan 告訴我塊 0 有8893個事務,但這些事務在兩個節點中都不可用。
Infura 節點的結果
>>> from ethjsonrpc import InfuraEthJsonRpc >>> c = InfuraEthJsonRpc(network='mainnet') >>> block_data = c.eth_getBlockByNumber(0) >>> block_data {u'nonce': u'0x0000000000000042', u'receiptsRoot': u'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', u'hash': u'0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3', u'uncles': [], u'timestamp': u'0x0', u'sha3Uncles': u'0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', u'miner': u'0x0000000000000000000000000000000000000000', u'parentHash': u'0x0000000000000000000000000000000000000000000000000000000000000000', u'extraData': u'0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa', u'gasLimit': u'0x1388', u'number': u'0x0', u'stateRoot': u'0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544', u'difficulty': u'0x400000000', u'transactionsRoot': u'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', u'size': u'0x21c', u'transactions': [], u'mixHash': u'0x0000000000000000000000000000000000000000000000000000000000000000', u'totalDifficulty': u'0x400000000', u'gasUsed': u'0x0', u'logsBloom': u'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'}
奇偶校驗節點的結果
>>> from ethjsonrpc import ParityEthJsonRpc >>> c = ParityEthJsonRpc() >>> block_data = c.eth_getBlockByNumber(0) >>> block_data {u'transactionsRoot': u'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', u'gasLimit': u'0x1388', u'number': u'0x0', u'size': u'0x21c', u'author': u'0x0000000000000000000000000000000000000000', u'mixHash': u'0x0000000000000000000000000000000000000000000000000000000000000000', u'sha3Uncles': u'0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', u'miner': u'0x0000000000000000000000000000000000000000', u'logsBloom': u'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', u'nonce': u'0x0000000000000042', u'hash': u'0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3', u'uncles': [], u'transactions': [], u'timestamp': u'0x0', u'sealFields': [u'0xa00000000000000000000000000000000000000000000000000000000000000000', u'0x880000000000000042'], u'receiptsRoot': u'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', u'difficulty': u'0x400000000', u'parentHash': u'0x0000000000000000000000000000000000000000000000000000000000000000', u'extraData': u'0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa', u'stateRoot': u'0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544', u'totalDifficulty': u'0x400000000', u'gasUsed': u'0x0'}
通常,交易資訊附加在區塊資訊之後。沒有一個節點在響應中給出在塊 0 發生的事務。
我在哪裡可以獲得這些資訊?我寧願從乙太坊節點抓取這些數據。
我在 Gitter 上得到了這個問題的回复,所以在這裡發布結果:
- 區塊 0 中沒有交易。
- 兩個節點的結果都是規範真理
- 乙太坊的創世狀態始於很少的賬戶餘額。
- “創世區塊有很多餘額;我假設 Etherscan 已經實施了自己的‘虛擬交易’來平衡賬目。”
創世狀態的平衡可以在這裡找到