AbsorbingChaos / stx-miner-script

Script and tips to setup a Blockstack Testnet Miner
https://stacks101.com
MIT License
8 stars 7 forks source link

Add status bar using screen util #35

Closed whoabuddy closed 3 years ago

whoabuddy commented 3 years ago

Using net-tools we can run ifconfig, which will show the local IP address of the server. It could be added to the output during startup, or possibly used with something else.

I would love to see a status bar at the bottom with relevant info, but have not tested the screen utility nor do I think the extra complexity is worth it.

I'd like an easy way to:

  1. Identify the IP address of my local node(s)
  2. View output of commands such as: curl -sS 192.168.0.102:20443/v2/info | jq
  3. View the BTC and STX address of the node

which results in:

{
  "peer_version": 385875968,
  "pox_consensus": "255f86aafb9e6fdc53f4c8e4e012b7f4f28aeedc",
  "burn_block_height": 480,
  "stable_pox_consensus": "7d44048832f9b11bfa7645aa2e17c87a30131ad1",
  "stable_burn_block_height": 479,
  "server_version": "blockstack-core 0.0.1 => 23.0.0.0 (master:9b62cc3ac, debug build, linux [x86_64])",
  "network_id": 2147483648,
  "parent_network_id": 3669344250,
  "stacks_tip_height": 115,
  "stacks_tip": "13e37524c7b3d5e8f3b5a57c6f8ed7a80251257561f6564377886f1c853d58e1",
  "stacks_tip_consensus_hash": "255f86aafb9e6fdc53f4c8e4e012b7f4f28aeedc",
  "unanchored_tip": "c3c563594d12baf74791267e798f6b4b5c9ab192323eb610d0241ce3421ad498",
  "exit_at_block_height": null
}

If I do decide to use screen, here are some good resources: https://linuxize.com/post/how-to-use-linux-screen/ http://aperiodic.net/screen/appearance https://genericnerd.blogspot.com/2015/01/getting-your-local-ip-address-in-gnu.html https://gist.github.com/joaopizani/2718397

whoabuddy commented 3 years ago

Good article on networking config in newer versions of Ubuntu, ifconfig is now deprecated, and change is hard.

https://www.linuxjournal.com/content/have-plan-netplan

whoabuddy commented 3 years ago

Closing in favor of Daemon-Technologies/Mining-Bot, but happy to resurrect if someone is really familiar on the subject.