pchain-org / pchain

Pchain client-in-Go
https://plian.org
GNU General Public License v3.0
24 stars 12 forks source link

different block hash on same height #5

Closed liaoyd closed 5 years ago

liaoyd commented 6 years ago

起三个节点后分别向三个节点发送 curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["10", true],"id":1}' 三个节点分别返回: {"jsonrpc":"2.0","id":1,"result":{"difficulty":"0x20240","extraData":"0x","gasLimit":"0x7ec167f","gasUsed":"0x0","hash":"0xa9a375b1a727598b0b6929f29dc705afb1c802df10c7084cb6d1241ae276c6c2","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0xa","parentHash":"0x9e1e769d8a9d4d452d036b0ac0b4601a246f5ad3c263624e596cd448ca8cec20","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x200","stateRoot":"0xf02c8a25370c391ba0b4ebd57ea06e9475485b2ee24770cd45e1d0a7a2669191","timestamp":"0x5ad97a93","totalDifficulty":"0x140f40","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}}

{"jsonrpc":"2.0","id":1,"result":{"difficulty":"0x20240","extraData":"0x","gasLimit":"0x7ec167f","gasUsed":"0x0","hash":"0x632c6ba43ec01db48c747beaa7c95fcd667ee4061858682a4251aa1384f3e131","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0xa","parentHash":"0x40142ae1a43df201a3843d16c41be71d4d41fa18e7261938f0143063ed9109fd","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x200","stateRoot":"0xf02c8a25370c391ba0b4ebd57ea06e9475485b2ee24770cd45e1d0a7a2669191","timestamp":"0x5ad97a93","totalDifficulty":"0x140f40","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}}

{"jsonrpc":"2.0","id":1,"result":{"difficulty":"0x20240","extraData":"0x","gasLimit":"0x7ec167f","gasUsed":"0x0","hash":"0xd5cb1989e8e1d4156598d98495117d0e31daf17d586d6312f01d977c4a123f8e","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0xa","parentHash":"0xe480d6b599133249d057f8bf6b06a581b58d3cae4829fcfb4a6ee614187c80b7","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x200","stateRoot":"0xf02c8a25370c391ba0b4ebd57ea06e9475485b2ee24770cd45e1d0a7a2669191","timestamp":"0x5ad97a93","totalDifficulty":"0x140f40","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}} 可以看出同一高度的block在每个节点的blockhash都不一样。 (三个节点的chain_Id一致并且在同一高度的tendermint block hash一致) @pchain-org

liaoyd commented 5 years ago

already fixed