go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Print disk space cleared after `prune-history`

Open lightclient opened this issue 6 months ago • 0 comments

History pruning currently looks like this

$ geth prune-history
...
INFO [05-28|16:11:50.823] Starting history pruning                 head=22,582,306 tail=15,537,393 tailHash=0x55b11b918355b1ef9c5db810302ebad0bf2544255b530cdce90674d5887bb286
INFO [05-28|16:11:51.706] History pruning completed                tail=15,537,393 elapsed=883.604ms
INFO [05-28|16:11:51.706] Persisting dirty state to disk           head=22,582,306 root=e815ac..3fa2af layers=655
INFO [05-28|16:11:51.707] Aborting snapshot generation             root=6fa71b..58c5f4 in=000e2e..db59ca at=25a73d..62bb7d accounts=64490 slots=153,643 storage=14.05MiB dangling=0 elapsed=889.042ms eta=1h8m31.977s
INFO [05-28|16:11:53.166] Persisted dirty state to disk            size=416.09MiB elapsed=1.458s
INFO [05-28|16:11:53.219] Blockchain stopped

It would be nice to update the "History pruning completed" log with something like "cleared=672GB" so users see immediately the impact.

lightclient avatar May 28 '25 16:05 lightclient