Post your mining run commands. Share greps / denoising

Share the mining run command you use! Omit your mining public key if you want… or leave it and people can send you some Nock? :smiley:

This worked well for me after some trial and error (all of this done at the top level of the nockchain directory that’s created when cloning the repository):

  1. From their README: copied their example .env file to the one that will be used by the running node: cp .env_example .env
  2. Replace the value of MINING_PUBKEY in the .env with my own (generated during the nockchain-wallet keygen step)
  3. With that all in place, I made a couple of edits to the run_nockchain_miner.sh bash script in the scripts directory. The first was to add the following line just above the final nockchain line:echo ${MINING_PUBKEY}; sleep 5 This allows me to view the pub key for a few seconds to make sure it’s right, giving me a chance to cancel out if I somehow messed up my .env file.
  4. The second edit was to change the nockchain --mining-pubkey ${MINING_PUBKEY} --mine line to nockchain --mining-pubkey ${MINING_PUBKEY} --mine --bind /ip4/0.0.0.0/udp/3277/quic-v1. That way, no matter how many times I launch it, I know it will always be listening at UDP port 3277. This is important for me because my machine is behind a regular consumer home router, and I needed to set up Port Forwarding properly so that my machine would receive incoming UDP traffic on that port.
  5. Once those adjustments were made, I was ready to run sh ./scripts/run_nockchain_miner.sh which displayed my pub key for 5 seconds and then got to work. I just leave the terminal window open where it’s running. The output isn’t too egregiously verbose.

Hope this is useful info for someone!

1 Like

In the spirit of the original question, I have just restarted my node but instead of using sh ./scripts/run_nockchain_miner.sh, I’m now using sh ./scripts/run_nockchain_miner.sh | grep -v "friendship ended with" to filter out all of that pesky output. Now basically all of my (much quieter) output is new block related.

2 Likes