Cardano Node Run - starts on random era

Hi,

I have set up cardano-node on Ubuntu 2004 on WSL Win 10.
After deleting $HOME/cardano/db dir and executing “cardano-node run …” command, the system randomly chooses era for blockchain.
Steps to reproduce:

  1. Delete /db folder

  2. Start “cardano-node run…”

  3. Execute “cardano-cli query tip --testnet-magic 1097911063”

  4. Get info that ERA is “Byron”

  5. Steps 1, 2 , 3

  6. Get info that era is “Byron” or “Shelley”

Question:
How can I choose ERA to start cardano-node.

Thx
Nemanja

Does this happen, when the sync process is complete?

Or put it in another way: Is it possible that you are querying so early that the node is still syncing the Byron era and if you query a bit later it will be in Shelley or Alonzo?

This is normal, if you delete the db folder and start the node, it will sync the blockchain again from the beginning, and the epoch and era will change while the synced part of the blocklchain grows. In a few hours it should be synced again on testnet.

Hi HeptaSean,
After deleting DB, and starting node, the chosen era will go all the way. Even if I restated server.
So, if node start in Byron era, then i will get next problem:

nemanja@LAPTOP-VKFNL6TM:
cardano-cli query utxo
–testnet-magic 1097911063
–address $(cat $HOME/cardano/keys/payment1.addr)
Command failed: query utxo Error: This query cannot be used for the Byron era

So, my solution is to start ERA in Shelley or any other except Byron.

Thx
N.

Hi George,

So, if the node starts in Byron Era, after some time it will switch to the Shelley era.
I just need to wait enough time.

Yes, you need to wait until the sync is complete, in order to be able to do transactions.

1 Like

Execute cardano-cli query tip --testnet-magic 1097911063 and wait until syncProgress is 100. That means the sync is complete. It also shows the era the already processed data belongs to.

1 Like

As far as I understand it, a node with an empty DB will always start in Byron, because the Cardano blockchain started in Byron and only later reach the other eras, when syncing has progressed enough.

So, it is not randomly starting in different eras, but it just depends on, when in the syncing you are querying.

1 Like

Ok,
I get it. Thx :sunglasses:
Maybe, we need to add short info on How to run cardano-node | Cardano Developer Portal to inform new developers to wait until sync is 100% complete in order to execute successful transaction queries. Also, they need to be sure that node started to sync in the Byron era, and later on, during sync, it will switch to the Shelley (or next) era’s.

screenshot-2022-01-06-11:08:22
is already stated on that very page. Otherwise, it’s a little bit outdated. The detailed discussion, how you find out if you are fully synced is not really necessary, since the output of cardano-cli query tip contains syncProgress.

1 Like


:ok_hand:

1 Like

I believe the cardano-cli transaction send command, that submits the actual transaction, will fail with a reasonable message in case the node is not fully synced… so no worries of doing something wrong.

I suggest you install gLiveView for a more visual representation of what is going on.
You can follow the instructions in the CoinCashew guide.

Anyway, if you are doing everything manually, which I advise you do when starting out so you can learn more, I suggest you follow the CoinCashew guide as it’s up to date and very detailed.

CNTOOLS is a semi-automated tool that allows you to spin up the node and maintain it without much hassle. You can find plenty of instructions on the forum. @Alexd1985 covers it in detail in several topics. I myself am doing everything manually but many people rely on CNTOOLS.

2 Likes