The hive
test suite graphQL tests found inconsistencies in the graphQL responses between the besu and geth client, namely in the number encoding where Geth returns hex for certain fields whereas Besu returns int.
Below are examples of queries for which the responses of Geth and Besu differ due to different number encoding:
eth_blockNumber
besu:
{
"data" : {
"block" : {
"number" : 32
}
}
}
geth:
{
"data": {
"block": {
"number": "0x20"
}
}
}
eth_call_Block8
besu:
{
"data": {
"block": {
"call": {
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": 1
},
"number": 8
}
}
}
geth:
{
"data": {
"block": {
"number": "0x8"
}
},
"errors": [
{
"message": "hex string without 0x prefix"
}
]
}
eth_call_BlockLatest
besu:
{
"data": {
"block": {
"call": {
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
"status": 1
},
"number": 32
}
}
}
geth:
{
"data": {
"block": {
"number": "0x20"
}
},
"errors": [
{
"message": "hex string without 0x prefix"
}
]
}
eth_estimateGas_contractDeploy
besu:
{
"data": {
"block": {
"estimateGas": 111953
}
}
}
geth:
{
"data": {
"block": {
"estimateGas": "0x1b551"
}
}
}
eth_estimateGas_noParams
besu:
{
"data": {
"block": {
"estimateGas": 21000
}
}
}
geth:
{
"data": {
"block": {
"estimateGas": "0x5208"
}
}
}
eth_estimateGas_transfer
besu:
{
"data": {
"block": {
"estimateGas": 21000
}
}
}
geth:
{
"data": {
"block": {
"estimateGas": "0x5208"
}
}
}
eth_getBlock_byHash
besu:
{
"data": {
"block": {
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": 3141592,
"gasUsed": 23585,
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"number": 30,
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
geth:
{
"data": {
"block": {
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": "0x2fefd8",
"gasUsed": "0x5c21",
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"number": "0x1e",
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
eth_getBlock_byNumber
besu:
{
"data": {
"block": {
"account": {
"balance": "0x12c"
},
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": 3141592,
"gasUsed": 23585,
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"miner": {
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1"
},
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"ommerAt": null,
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"ommers": [],
"parent": {
"hash": "0xf8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803"
},
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
geth:
{
"data": {
"block": {
"account": {
"balance": "0x12c"
},
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": "0x2fefd8",
"gasUsed": "0x5c21",
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"miner": {
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1"
},
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"ommerAt": null,
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"ommers": [],
"parent": {
"hash": "0xf8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803"
},
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
eth_getBlockTransactionCount_byNumber
besu:
{
"data": {
"block": {
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": 3141592,
"gasUsed": 23585,
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
geth:
{
"data": {
"block": {
"difficulty": "0x20740",
"extraData": "0x",
"gasLimit": "0x2fefd8",
"gasUsed": "0x5c21",
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"logsBloom": "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000",
"mixHash": "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c",
"nonce": "0x5c321bd9e9f040f1",
"ommerCount": 0,
"ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"timestamp": "0x561bc336",
"totalDifficulty": "0x3e6cc0",
"transactionCount": 1,
"transactions": [
{
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4"
}
],
"transactionsRoot": "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01"
}
}
}
eth_getLogs_range
besu:
{
"data": {
"logs": [
{
"account": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"data": "0x000000000000000000000000000000000000000000000000000000000000002a",
"index": 0,
"topics": [
"0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580"
],
"transaction": {
"block": {
"number": 23
},
"hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6"
}
},
{
"account": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"data": "0x000000000000000000000000000000000000000000000000000000000000002a",
"index": 0,
"topics": [],
"transaction": {
"block": {
"number": 24
},
"hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e"
}
}
]
}
}
geth:
{
"data": {
"logs": [
{
"account": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"data": "0x000000000000000000000000000000000000000000000000000000000000002a",
"index": 0,
"topics": [
"0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580"
],
"transaction": {
"block": {
"number": "0x17"
},
"hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6"
}
},
{
"account": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"data": "0x000000000000000000000000000000000000000000000000000000000000002a",
"index": 0,
"topics": [],
"transaction": {
"block": {
"number": "0x18"
},
"hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e"
}
}
]
}
}
eth_getTransaction_byHash
besu:
{
"data": {
"transaction": {
"block": {
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6"
},
"createdContract": null,
"from": {
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
},
"gas": 314159,
"gasPrice": "0x1",
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4",
"index": 0,
"inputData": "0xe8beef5b",
"logs": [
{
"index": 0
}
],
"nonce": 29,
"status": null,
"to": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"value": "0xa"
}
}
}
geth:
{
"data": {
"transaction": {
"block": {
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6"
},
"createdContract": null,
"from": {
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
},
"gas": "0x4cb2f",
"gasPrice": "0x1",
"hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4",
"index": 0,
"inputData": "0xe8beef5b",
"logs": [
{
"index": 0
}
],
"nonce": "0x1d",
"status": "0x0",
"to": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"value": "0xa"
}
}
}
eth_getTransactionReceipt
besu:
{
"data": {
"transaction": {
"block": {
"hash": "0x10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
"createdContract": null,
"cumulativeGasUsed": 493172,
"from": {
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
},
"gas": 3141592,
"gasUsed": 493172,
"hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed",
"index": 0,
"logs": [],
"to": null
}
}
}
geth:
{
"data": {
"transaction": {
"block": {
"hash": "0x10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
"createdContract": {
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"
},
"cumulativeGasUsed": "0x78674",
"from": {
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
},
"gas": "0x2fefd8",
"gasUsed": "0x78674",
"hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed",
"index": 0,
"logs": [],
"to": null
}
}
}
graphql_pending
besu:
{
"data": {
"pending": {
"account": {
"balance": "0x140"
},
"call": {
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
"status": 1
},
"estimateGas": 21000,
"transactionCount": 1,
"transactions": [
{
"gas": 1048575,
"nonce": 50
}
]
}
}
}
geth:
{
"data": {
"pending": {
"account": {
"balance": "0x140"
},
"estimateGas": "0x5208",
"transactionCount": 0,
"transactions": []
}
},
"errors": [
{
"message": "hex string without 0x prefix"
}
]
}
graphql_blocks_byFrom
besu:
{
"data": {
"blocks": [
{
"number": 30
},
{
"number": 31
},
{
"number": 32
}
]
}
}
geth:
{
"data": {
"blocks": [
{
"number": "0x1e"
},
{
"number": "0x1f"
},
{
"number": "0x20"
}
]
}
}
graphql_blocks_byRange
besu:
{
"data": {
"blocks": [
{
"gasLimit": 3141592,
"gasUsed": 23585,
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"nonce": "0x5c321bd9e9f040f1",
"number": 30,
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"transactionCount": 1
},
{
"gasLimit": 3141592,
"gasUsed": 24303,
"hash": "0x0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49",
"nonce": "0xd3a27a3001616468",
"number": 31,
"receiptsRoot": "0x2440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6",
"stateRoot": "0xa80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bd",
"transactionCount": 1
},
{
"gasLimit": 3141592,
"gasUsed": 23705,
"hash": "0x71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53",
"nonce": "0xdb063000b00e8026",
"number": 32,
"receiptsRoot": "0xa50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183c",
"stateRoot": "0xf65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1be",
"transactionCount": 1
}
]
}
}
geth:
{
"data": {
"blocks": [
{
"gasLimit": "0x2fefd8",
"gasUsed": "0x5c21",
"hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",
"nonce": "0x5c321bd9e9f040f1",
"number": "0x1e",
"receiptsRoot": "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d",
"stateRoot": "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e",
"transactionCount": 1
},
{
"gasLimit": "0x2fefd8",
"gasUsed": "0x5eef",
"hash": "0x0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49",
"nonce": "0xd3a27a3001616468",
"number": "0x1f",
"receiptsRoot": "0x2440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6",
"stateRoot": "0xa80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bd",
"transactionCount": 1
},
{
"gasLimit": "0x2fefd8",
"gasUsed": "0x5c99",
"hash": "0x71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53",
"nonce": "0xdb063000b00e8026",
"number": "0x20",
"receiptsRoot": "0xa50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183c",
"stateRoot": "0xf65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1be",
"transactionCount": 1
}
]
}
}