After star/stop/start, height recycle, why?

I start aeternity by bin/aeternity start, use curl http://127.0.0.1:3013/v2/blocks/top check the height, after a while bin/aeternity stop, and bin/aeternity start agin, then I found the height recycle to the begining, why?

Hello,

the aeternity node does not persist the chain database by default (it’s kept in memory), thus when you restart the node it is lost.

So you need below snippet somewhere in your node configuration file:

chain:
    persist: true
    db_path: ./my_db

You can read more about configuration in the docs.

1 Like

I have the config in aeternity.yaml to persist data, in custom path, and set AETERNITY_TOP to use aeternity.yaml, how can I check whether the config takes effect?

I install aeternity in windows WSL

and found the same problem in macOS

I tried to use bin/aeternity console, after a while, the program crashed:

18:43:08.682 [error] application_master: shutdown_error, aecore_app: {prep_stop,[[]]}, error_info: {noproc,{gen_server,call,[exometer_report,{change_reporter_status,aec_metrics_main,disabled}]}}
18:43:08.707 [info] Couldn’t insert received block ({illegal_orphan,<<29,176,223,236,244,151,211,169,140,170,252,53,233,26,146,221,28,25,191,132,231,255,94,141,72,232,223,34,117,128,10,247>>})

(epoch@localhost)1>
{“Kernel pid terminated”,application_controller,"{application_terminated,exometer_core,shutdown}"}
Kernel pid terminated (application_controller) ({application_terminated,exometer_core,shutdown})

Crash dump is being written to: erl_crash.dump…

Installed versions:

  • 2.1.0 permanent

Do you mind to update to latest 2.2.0 version ?
Also is the bin/aeternity console also crash in macOS? That’s the easiest way to see what configuration file is used. Also you can try increasing log level to debug

yes I can update to 2.2.2, but how can I confirm the config is right? I already set persist and db_path , but doesn’t work, this is the big problem.

for block data not persisted to file, I can’t keep on doing my work

I use config file named aeternity.yaml showing in document as fllows, and set AETERNITY_TOP to the path to aeternity.yaml, then bin/aeternity start/stop/start, is there somting wrong?

sync:
    port: 3015

keys:
    dir: keys
    peer_password: "PASSWORD"

http:
    external:
        port: 3013
    internal:
        port: 3113

websocket:
    channel:
        port: 3014

mining:
    autostart: false

chain:
    persist: true
    db_path: ./my_db

fork_management:
    network_id: ae_mainnet

I made it, thank you dincho

1 Like

Meaning you got it to work? How?

create:
~/.aeternity/aeternity/aeternity.yaml, use config as described in config
~/aeternity/node
cd ~/aeternity/node
download binary program, and tar xf
bin/aeternity start