Problem with block hash for v1
This query:
query Query {
block(limit: 1, where: {height: {_eq: -1}}) {
height
hash
parentHash
}
}
gives me:
{
"data": {
"block": [
{
"height": -1,
"hash": "\\x7b2230223a302c2231223a302c2232223a302c2233223a302c2234223a31372c2235223a33322c2236223a32392c2237223a35372c2238223a3136322c2239223a3233332c223130223a3232302c223131223a302c223132223a302c223133223a302c223134223a302c223135223a302c223136223a302c223137223a302c223138223a302c223139223a302c223230223a302c223231223a302c223232223a302c223233223a302c223234223a302c223235223a302c223236223a302c223237223a302c223238223a302c223239223a302c223330223a302c223331223a307d",
"parentHash": "\\x7b2230223a302c2231223a302c2232223a302c2233223a302c2234223a33322c2235223a3131312c2236223a3135352c2237223a39362c2238223a3232392c2239223a3230382c223130223a3233382c223131223a302c223132223a302c223133223a302c223134223a302c223135223a302c223136223a302c223137223a302c223138223a302c223139223a302c223230223a302c223231223a302c223232223a302c223233223a302c223234223a302c223235223a302c223236223a302c223237223a302c223238223a302c223239223a302c223330223a302c223331223a307d"
}
]
}
}
The hash format is not what expected. It has common prefix and suffix:
# common prefix
x7b2230223a302c2231223a302c2232223a302c2233223a302c2234223a3
# common suffix
2c223131223a302c223132223a302c223133223a302c223134223a302c223135223a302c223136223a302c223137223a302c223138223a302c223139223a302c223230223a302c223231223a302c223232223a302c223233223a302c223234223a302c223235223a302c223236223a302c223237223a302c223238223a302c223239223a302c223330223a302c223331223a307d
The pattern 223a302c2231
appears a lot.
To make debugging easier the block number of the migration should be added somewhere or a computed field "real block number" should be added to offset negative block number back to their v1 positive value.