0

Syncing an archive node from scratch. I noticed that the block level is inconsistent with the block hash.

# tail -n 2 /home/ubuntu/.tezos-node/tezos-node.log && tc rpc get /chains/main/blocks/head | jq '.header.level'
Aug 17 03:50:57 - main: validator-block : Block BLw3Kx7EfiSbMYAwH8nUyQLNc6aLiARZVmrrFVayQHcfxGaPJWU successfully validated
Aug 17 03:50:57 - main:                   Pushed: 2019-08-17T03:50:56-00:00, Treated: 2019-08-17T03:50:56-00:00, Completed: 2019-08-17T03:50:57-00:00(2019-08-17T03:50:57-00:00)
465454

BLw3Kx7EfiSbMYAwH8nUyQLNc6aLiARZVmrrFVayQHcfxGaPJWU is 465965, 511 blocks ahead of 465454

Why would this happen?

6
  • 1
    It should not happen. I think the rpc call was somehow delayed during ~511 blocks (or the log file is not the expected one). You should remove the "jq filter" to check if you are looking to the expected block information.
    – vect0r
    Aug 19 '19 at 10:20
  • The log file was/is the only one, as specified in config.json. As far as removing jq, since the node was still syncing, I could see header.level changing very fast - it was the tip of the chain. Most importantly though, if you use | grep level instead of jq, you will get a dozen lines, but they all point to the same level. So it could have not been jq.
    – Gaia
    Aug 19 '19 at 15:55
  • It seems that your are bootstrapping the chain: it explains the many head changes. Using grep level will also show you endorsements of the previous blocks. You should call tezos-client rpc get /chains/main/blocks/<expected_block_hash> | jq '.header.level' instead of the last head to ensure that you are looking at the expected block.
    – vect0r
    Aug 19 '19 at 16:02
  • my understanding is that if I am trying to find out how far I've synced I could look either at the log or at the head. maybe I have this wrong?
    – Gaia
    Aug 19 '19 at 16:40
  • 1
    Of course. However, as a delay can occur between the two commands, it may explain this behavior. To track the bootstrap progress, you should rather use the ./tezos-client bootstrapped command.
    – vect0r
    Aug 20 '19 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.