Is your feature request related to a problem? Please describe.
The chain state for miners is automatically stored in /tmp by default, so rebooting the machine can cause this information to clear out when it may have useful information.
Describe the solution you'd like
It would be nice if there was an "Export" button to dump the miner's chain data into csv format.
That way, if they want to analyze their own data, preserve their data before a reset, provide info about mining on a fork, or whatever else, there would be a copy of their local chain state.
Additional information could be added to the output to help better identify an individual miner, in the case of trying to prove someone was mining, such as a timestamp and their related btc/stx addresses.
This could be accomplished by integrating psq/stacks-dump. It supports the -c option for CSV output although there is some output beforehand that may need to be silenced.
Two considerations:
export should only be available if stacks-node is running to find the open /tmp/stacks-node-* directory via ps / lsof
stacks-dump would need to use report-24.0.x.x for krypton, whereas report supports newer structure of xenon
Describe alternatives you've considered
An alternative would be to direct those who want to run stacks-dump to run stacks-dump, but it involves a little trickery to find the directory currently in use, and adds another layer of complexity.
Is your feature request related to a problem? Please describe.
The chain state for miners is automatically stored in
/tmp
by default, so rebooting the machine can cause this information to clear out when it may have useful information.Describe the solution you'd like
It would be nice if there was an "Export" button to dump the miner's chain data into csv format.
That way, if they want to analyze their own data, preserve their data before a reset, provide info about mining on a fork, or whatever else, there would be a copy of their local chain state.
Additional information could be added to the output to help better identify an individual miner, in the case of trying to prove someone was mining, such as a timestamp and their related btc/stx addresses.
This could be accomplished by integrating psq/stacks-dump. It supports the
-c
option for CSV output although there is some output beforehand that may need to be silenced.Two considerations:
/tmp/stacks-node-*
directory via ps / lsofreport-24.0.x.x
for krypton, whereasreport
supports newer structure of xenonDescribe alternatives you've considered
An alternative would be to direct those who want to run stacks-dump to run stacks-dump, but it involves a little trickery to find the directory currently in use, and adds another layer of complexity.
Additional context
None.