deroproject / derohe

DERO Homomorphic Encryption Blockchain Protocol
Other
208 stars 82 forks source link

derod --prune-hsitory option does not work #101

Closed deroholic closed 2 years ago

deroholic commented 2 years ago

Trying to prune a node's blockchain results in an error and a hung daemon. From a freshly synced mainnet full node:

% ./dero_darwin_universal/derod-darwin --prune-history=700000
03/10 10:14:07  INFO    derod   DERO HE daemon :  It is an alpha version, use it for testing/evaluations purpose only.
03/10 10:14:07  INFO    derod   Copyright 2017-2021 DERO Project. All rights reserved.
03/10 10:14:07  INFO    derod           {"OS": "darwin", "ARCH": "amd64", "GOMAXPROCS": 32}
03/10 10:14:07  INFO    derod           {"Version": "3.5.2-113.DEROHE.STARGATE+01102022"}
03/10 10:14:07  INFO    derod           {"MODE": "mainnet"}
03/10 10:14:07  INFO    derod           {"Daemon data directory": "/home/derohe/mainnet"}
03/10 10:14:07  INFO    derod   will prune history till {"topo_height": 700000}
03/10 10:15:47  ERROR   error rewriting graviton store  {"error": "all trees simultaneously committed must be derived from the same snapshot"}
03/10 10:17:32  INFO    Block store before pruning      {"size": "3.3 GiB"}
03/10 10:57:29  INFO    Block store after pruning       {"size": "297.4 MiB"}
03/10 10:57:29  INFO    Old balance tree        {"size": "26.9 GiB"}
03/10 10:57:29  INFO    balance tree after pruning history      {"size": "514.8 MiB"}
03/10 10:57:29  INFO    derod   blockchain pruning successful
03/10 10:57:29  INFO    CORE    Initialized     {"path": "/home/derohe/mainnet"}
03/10 10:57:29  INFO    CORE    will use        {"integrator_address": "dero1qykyta6ntpd27nl0yq4xtzaf4ls6p5e9pqu0k2x4x3pqq5xavjsdxqgny8270"}
03/10 10:57:29  INFO    MEMPOOL Mempool started
03/10 10:57:29  INFO    REGPOOL Regpool started

It sits there for days although the OS's activity monitor shows derod with ~ 90% CPU load. The disk space consumed by the data directory as reported by du -s mainnet does not change while it is hung. Stopping and restarting without the --prune-history results in the process hanging at the same location. This issue has been replicated more than once.

CaptainDero commented 2 years ago

Noted.

CaptainDero commented 2 years ago

Fixed. Update to latest release.