Daemon-Technologies / Mining-Bot

26 stars 15 forks source link

Add export function for chain data #97

Closed whoabuddy closed 3 years ago

whoabuddy commented 3 years ago

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:

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.

Additional context

None.

SherLzp commented 3 years ago

fixed by #108