https://github.com/friedger/pub-stacks-dump
Hourly update of stacks-dump on Stacks 2.0 Mainnet
https://github.com/friedger/pub-stacks-dump
Last synced: 5 months ago
JSON representation
Hourly update of stacks-dump on Stacks 2.0 Mainnet
- Host: GitHub
- URL: https://github.com/friedger/pub-stacks-dump
- Owner: friedger
- Created: 2021-01-17T11:01:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-13T01:25:55.000Z (over 5 years ago)
- Last Synced: 2025-03-05T03:22:48.623Z (over 1 year ago)
- Language: HTML
- Homepage: https://friedger.github.io/pub-stacks-dump/
- Size: 3.84 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pub-stacks-dump
This script is used to provide an hourly update of stacks-dump from an independent miner on the [Stacks 2.0 Mainnet](https://www.stacks.co/).
The information is published via GitHub pages and available at the link below:
[https://friedger.github.io/pub-stacks-dump/](https://friedger.github.io/pub-stacks-dump/)
## Requirements
This script _should_ run on any system that supports Bash. Please file an issue if you get an error.
This script expects that you have `git` installed and configured on your system.
This script relies on (pub-stacks-dump fork](https://github.com/friedger/stacks-dump/tree/pub-stacks-dump) of [stacks-dump by psq](https://github.com/psq/stacks-dump) to review the stacks-node storage and output statistics based on the miner's data. The `stacks-dump` repository must be downloaded separately.
This script has a set of variables that need to be updated to match your system configuration:
- directory for working_dir data from stacks-node
`__stacksnode="/tmp/stacks-testnet-bb8423eafa69dc8f/"`
- directory for running stacks-dump
`__stacksdump="/home/friedger/_repos/github/psq/stacks-dump"`
- directory for repo to publish results
`__publishdir="/home/friedger/_repos/github/friedger/pub-stacks-dump"`
- file name for saving stacks-node data
`__outputfile="stacks-dump.txt"`
- file name for saving jsummary stacks-node data as json
`__outputjsonfile="stacks-dump.json"`
- file name for saving miners stacks-node data as csv
`__outputcsvfile="stacks-dump.csv"`
- file name for saving blocks stacks-node data as txt
`__outputcsvfile="stacks-dump-blocks.txt"`
- website to access data after published
`__website="https://friedger.github.io/pub-stacks-dump/"`
- twitter account used for twitter card in SEO
`__twitter="@fmdroid"`
- average costs for commit transaction in sats
`__avg_tx_costs=60000`
GitHub Pages is used for publishing, however instructions to set that up are outside the scope of this readme. Feel free to [review the GitHub documentation](https://docs.github.com/en/github/working-with-github-pages) or use the publishing platform of your choice.
## Usage
By default, the script will run one time and exit.
```bash
bash publish.sh
```
If you would like to run the script in a loop, it accepts a value after the file name that is passed to `sleep` as a parameter. From the [sleep man page](https://linux.die.net/man/1/sleep):
> Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
For example, to publish every hour:
```bash
bash publish.sh 1h
```