we are currently doing graphnode compatibility project,when we send request to arpc
curl -X POST https://arpc.apothem.network/ -H "Content-Type: application/json" -d '
it returns the following
and we found that the blockHash is 0x194a513ea40c94fccaca470cccb24c2ff3bd6398dec9a04e3eb3a4bfef8a330e which doesnt exist.
Anyone knows the reason?
Just an update on the findings. So, the issue is from this line of code: github.com/XinFinOrg/XDPoSChain/bl...
Basically, at the time of this line being executed, the block is missing values for its
The value of
validatoris missing returned
0x194a513ea40c94fccaca470cccb24c2ff3bd6398dec9a04e3eb3a4bfef8a330e, and this hash has been written into the DB. At later stage, the block is fully finalised: github.com/XinFinOrg/XDPoSChain/bl... Which included the value of
validatorinto its header, and the
0xe8ec0bfc021f839fd0a69ae89689e309632af2cc434e8a096732068f0736864b(this matches the one on canonical chain).
In short, this 0x194a...30e hash does not belong to any block, it's a bug in the code where "in-progress" block somehow had its hash wrote into DB.
I would recommend to ignore this
hashvalue from getLogs API calls. This issue likely to exist in all getLogs calls.
We may try fix this issue in the near future, but it's probably gonna take a while.
I can also confirm the rest of the data in this
getLogsshall be accurate(except the blockHash)
I'm not too sure what you using this API for, hence I can only provide a suggestion based on the assumption that you trying to perform a data migration into a new table and index it for graphQl purpose.
You can still do that by making two API calls.
getLogswhere wrong blockHash is returned. (Use the result except the blockHash)
getTransactionby supplying the tx hash you get from step 1. This shall give you the correct blockHash corresponding to the tx.
You can then combine the two data source into a single one and continue processing.
btw, are you able to provide a bit more context on what you trying to achieve, as well as the values of the
topicsyou put in the parameters?
we are trying to make it compatible with the graph
I'm not too sure what graph is or its relationship with XDC consensus engine.
Did you by any chance created a smart contract?
Basically try provide as much information/context as possible so that we can help identify the root cause
our enigneer said you just need to return the correct block hash
Even we are facing a similar issue , xdc.dev/ncode/block-not-found-erro...
We have received your query, and the development team is working on the same.
Interesting. We will take a look shortly.