eos icon indicating copy to clipboard operation
eos copied to clipboard

nodeos should not complain about genesis file after it has initialized its data directory

Open DavidHuie opened this issue 8 years ago • 13 comments

We're seeing nodeos crash when being restarted with the following error:

!fc::exists( my-\u003eblocks_dir / \"blocks.log\" ): Genesis state can only be set on a fresh blockchain.

This implies that nodeos should be initially started with the genesis-json flag, but then it should be removed in subsequent restarts.

This is a pretty bad UX, especially for automated setups since the nodeos boot command depends on its own internal state. As a server operator, we would have to change the boot command after manually detecting that nodeos came up correctly.

In my opinion, nodeos should just ignore the --genesis-json flag after the database after the data directory is detected, as in previous releases.

DavidHuie avatar Jun 02 '18 02:06 DavidHuie

I am working on Mac 10.13.x with latest code (v1.0.1)and I got same ERR. How can I remove this issues?

screen shot 2018-06-06 at 11 03 10 am

jimmiwoo avatar Jun 06 '18 03:06 jimmiwoo

hey, I haven't create a node before, when i use this instruction: ./nodeos, i got the same problem, you said we can remove it, i'm not much understand, canyou say more clearly, thanks

xywen97 avatar Jun 07 '18 11:06 xywen97

Does this problem still exist?

taokayan avatar Jun 22 '18 09:06 taokayan

Yes, it's still happening even with latest image and v1.1.2.

vimalbera92 avatar Aug 03 '18 06:08 vimalbera92

I would also appreciate when the flag would be possible to use later on. But instead of ignoring it later on - would it be possible to verify, that the chain EOS works with is indeed the chain with that genesis block?

toschdev avatar Aug 29 '18 23:08 toschdev

./nodeos 2018-09-12T08:49:00.698 thread-0 chain_plugin.cpp:317 plugin_initialize ] initializing chain plugin 2018-09-12T08:49:00.718 thread-0 chain_plugin.cpp:556 plugin_initialize ] Starting up fresh blockchain with default genesis state. Killed

Drug0j avatar Sep 12 '18 08:09 Drug0j

the parameter genesis-json is only valid when starts with an empty database. It's also used to ensure the database is actually empty for security reason.

taokayan avatar Sep 12 '18 09:09 taokayan

ok, how to fix this error I'm running like this : ./nodeos --delete-all-blocks --genesis-json genesis.json

Drug0j avatar Sep 12 '18 09:09 Drug0j

getting an error

Drug0j avatar Sep 12 '18 09:09 Drug0j

?

Drug0j avatar Sep 12 '18 11:09 Drug0j

In general, the solution of deleting the folder eosio /admin/.local/share/eosio

Drug0j avatar Sep 13 '18 15:09 Drug0j

all again earned

Drug0j avatar Sep 13 '18 15:09 Drug0j

Closed as refers to old version of code. Please refer to latest code and documentation: https://github.com/EOSIO https://developers.eos.io/ If problem persists with latest version please raise new issue.

halsaphi avatar Oct 30 '18 07:10 halsaphi