floki
28 October 2022 08:36
1
Not able to query tip using cardano-cli. Could anyone please help me. I am new to cardano.
floki@aspire:~$ cardano-cli query tip --testnet-magic NATURAL
option --testnet-magic: cannot parse value `NATURAL'
Usage: cardano-cli query tip
[ --shelley-mode
| --byron-mode [--epoch-slots NATURAL]
| --cardano-mode [--epoch-slots NATURAL]
]
(--mainnet | --testnet-magic NATURAL)
[--out-file FILE]
Get the node's current tip (slot no, hash, block no)
NATURAL
in the usage information is a variable. You have to replace it in the call with a natural number, with the testnet magic for the testnet you are trying to query.
floki
28 October 2022 08:42
3
I have tried using 2 but seems it is not giving same block number which is on the cardano testnet explorer
If you are using 2, you are on the Preview testnet, right?
Then, it should give you same block number as: https://preview.cexplorer.io/
1 Like
floki
28 October 2022 08:58
5
Thanks now I want to run 1 when i changed the environment and started the node it gives me and error of cardano-node: invariant violation: invalid current chain
floki
28 October 2022 09:01
6
And also in preview in terminal current epoch is 35 but in explorer it is 80. Is there anything I have missed
Did you remove the database and get the new configuration files after the Preprod respin last week?
Is it already fully synced? Maybe it just needs more time to get to 80?
floki
28 October 2022 09:47
8
I have got the new configuration files but have not removed database. How do i remove the database?
Depends on how you installed the node.
If you, for example, followed https://developers.cardano.org/docs/get-started/running-cardano#cardano-node-parameters (but put Preview in $HOME/cardano/preview
and Preprod in $HOME/cardano/preprod
), it would be rm -r $HOME/cardano/preprod/db/*
.
Also: Preview will also be respun next week. So, look out for announcements on that.