curl http://localhost:8732/chains/main/blocks

The beginning and end of the block hash sequence obtained by the above command is as follows


If I specify the leading block hash, I get the result, but if I specify the trailing block hash, an empty array will be returned

[root]# curl http://localhost:8732/chains/main/blocks?head=BLe4yLudai3nG9oo6zdCFAJohWoV4o8XMpGzHgmrzhZ7VtQZsMY
[root]# curl http://localhost:8732/chains/main/blocks?head=BLyBQkwiiqTPxShUHjuc6rrJunrEZYfuewqqVvDxtKXQxVjxFFR

I think tezos-node took in the wrong chain.

How can I resynchronize from a specific block height?

  • This problem is on ghostnet
    – user8974
    Jan 11 at 6:55

1 Answer 1


I'm no sure to understand your issue here.

You can query the current head of your node using curl http://localhost:8732/chains/main/blocks/head (head can be replaced by any level or block hash). The command you are using shows all the blocks known by your node.

Regarding the "wrong chain", what do you mean? The wrong network? To show the network on which your node is running, you can run ./octez-admin-client config show (or look at the config.json file at the root of your node's data directory) -- if no network is specified, you are on mainnet (which is the default). If the returned network is not the expected one, you need to remove your data directory, start with an empty one and make sure to specify the network you want with `./octez-node config init --network <the_network> (see doc); then run your node as usual.

Note that if you don't want to bootstrap the whole chain (which is quite long), you can use a snapshot to get in sync with a network within minutes. See the snapshot documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.