I don't have a docker compose setup to share since this is happening in production. This also isn't happening because of a specific subgraph but during initial network setup in the graph node.
curl -X POST -H "Content-Type: application/json" -d '{"method": "eth_getBlockByHash", "params": ["0xd28bc799751815a0923d673d97dc8ca932e32c41e1d1f8ec08956106bd981018", false], "id": 1, "jsonrpc": "2.0"}' https://earpc.apothem.network which contains a single transaction: 0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b
curl -X POST -H "Content-Type: application/json" -d '{"method": "eth_getTransactionReceipt", "params": ["0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b"], "id": 1, "jsonrpc": "2.0"}' https://earpc.apothem.network which apparently belongs to block 0x037d2d9f0e9e5c38ee9fb0c6721f5873cee7984bfe3bca2f91974daadcebbfd7
Note that the two block hashes, 0xd28bc799751815a0923d673d97dc8ca932e32c41e1d1f8ec08956106bd981018 and 0x037d2d9f0e9e5c38ee9fb0c6721f5873cee7984bfe3bca2f91974daadcebbfd7, differ and match the log statements which say
graph-node Oct 20 12:12:40.288 INFO receipt block mismatch, receipt_tx_hash: 0xc1b5…f55b, tx_hash: 0xc1b5…f55b, block_hash: 0xd28b…1018, receipt_block_hash: 0x037d…bfd7, provider: xdc-testnet, component: EthereumPollingBlockIngestor
The mainnet has same transaction hash bug also, such as both of blocks 39185599 and 39185611 has transaction hash 0x000f94c5677e68504bc8daabdb051d3f1e51fd626b59d9533f5fc55f656f6fd1. There is a fix already: github.com/XinFinOrg/XDPoSChain/pu.... Please wait for some time.
In your case, both of blocks 0x354ce39 and 0x354ce45 contain the transaction hash 0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b. This is reported in github.com/XinFinOrg/XDPoSChain/pu.... Maybe this is a problem or bug. I will study your log messages later. Would you please share below files?
Could you please share the below files?
So I can reproduce your problem.
I don't have a docker compose setup to share since this is happening in production. This also isn't happening because of a specific subgraph but during initial network setup in the graph node.
Here are more logs: gist.github.com/paymog/33659ee46f0...
Here's how you can manually reproduce this:
curl -X POST -H "Content-Type: application/json" -d '{"method": "eth_getBlockByHash", "params": ["0xd28bc799751815a0923d673d97dc8ca932e32c41e1d1f8ec08956106bd981018", false], "id": 1, "jsonrpc": "2.0"}' https://earpc.apothem.network
which contains a single transaction:0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b
curl -X POST -H "Content-Type: application/json" -d '{"method": "eth_getTransactionReceipt", "params": ["0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b"], "id": 1, "jsonrpc": "2.0"}' https://earpc.apothem.network
which apparently belongs to block0x037d2d9f0e9e5c38ee9fb0c6721f5873cee7984bfe3bca2f91974daadcebbfd7
Note that the two block hashes,
0xd28bc799751815a0923d673d97dc8ca932e32c41e1d1f8ec08956106bd981018
and0x037d2d9f0e9e5c38ee9fb0c6721f5873cee7984bfe3bca2f91974daadcebbfd7
, differ and match the log statements which sayPlease set
ETHEREUM_REORG_THRESHOLD
to 1. You can refer to github.com/XinFinOrg/XDC-Graph-Nod....That seems like a bandaid solution that will end up with incorrect data long term. From the graph node docs
Note that we're not seeing this against the XDC mainnet, only the testnet. Are the RPC calls I provided above expected and correct behavior?
I'm not sure whether the mainnet has this issue. This issue will affect some software. But It's a very big project to solve it.
I'll write a script to check the duplicate transaction hashes on mainnet when I'm free.
The mainnet has same transaction hash bug also, such as both of blocks 39185599 and 39185611 has transaction hash 0x000f94c5677e68504bc8daabdb051d3f1e51fd626b59d9533f5fc55f656f6fd1. There is a fix already: github.com/XinFinOrg/XDPoSChain/pu.... Please wait for some time.
In your case, both of blocks
0x354ce39
and0x354ce45
contain the transaction hash0xc1b52110f52120b4faf9e8502d568fb6dc88e90b0acd9f48d0af443782b9f55b
. This is reported in github.com/XinFinOrg/XDPoSChain/pu.... Maybe this is a problem or bug. I will study your log messages later. Would you please share below files?