A mineable SLP token using a proof-of-work covenant contract
This is a continuation of the 0.0.2 Miner that is on mistcoin.org
click Launchpad icon in the Dock
type Terminal in the search field
then click Terminal
Paste this into the terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install node
git clone https://github.com/blockparty-sh/mist-miner.git
Go into the downloaded directory
cd mist-miner
Paste this into the terminal:
cp example.env .env
npm install
Open Electron Cash SLP Edition and create a new normal wallet
https://simpleledger.cash/project/electron-cash-slp-edition/
Inside the wallet Click on the "Addresses" pane
Right click on the index 0 address and click on "Private key"
Copy the Private key (Command+c) (⌘ key)
Open the .env
file (not example.env) by typing this into the terminal:
open -a TextEdit .env
On the third line you will see WIF=""
Paste your private key inside the quotes so that it looks like this: WIF="Kansadjasd767263764"
Save the file and close the editor.
Inside Electron Cash SLP again, right click the address at index 0 again and click on "Copy address"
Open a different wallet which has BCH available using Electron Cash SLP
Go to the "Send" pane
Inside the "Pay to" field, paste the address and then add the amount like this:
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
Now copy everything in the "Pay to" field and paste it many more times, I did ~100
It should look like this:
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
simpleledger:qpasd8a7sdasdjkasd7as7dd,0.00001870
In the "BCH Amount" field put some small amount of BCH (like 0.0001), this wont be used but was needed for me to make it work
Click "Preview" to ensure that there are no mistakes and that the format was correct.
Then click "Sign" and then "Broadcast"
You can now close this wallet.
Inside the terminal type:
npm start
This will build the application and begin mining Mist!
If there are updates in the future you can update by running:
git pull origin master
You need a full node for this to connect to, with hashblock on port 28332.
IE your bitcoin.conf
should have this:
zmqpubhashblock=tcp://127.0.0.1:28332
Install zeromq package:
npm i [email protected]
In .env
set BLOCK_NOTIFIER
to zmq
Ensure you have a recent C++17-capable compiler and cmake
. The below assumes cmake
generates Makefiles, however you can use any generator such as Ninja
, etc, so long as you place the compiled binary in the fastmine/
subfolder of this project when done.
$ cd fastmine
$ cmake . && make
$ cd ..
Then set in .env
USE_FASTMINE="yes"
Note: In order for fast mining to work, the expectation is that the fastmine
executable will be present in the fastmine/
subdirectory.
Clone the repo as per above instructions, setup your .env file and fund your wallet in the same way. No need to install Homebrew, NodeJS, npm modules etc.
https://docs.docker.com/engine/install/
Run docker build -t mistminer .
from the root of the repo.
Run docker run mistminer
to run the miner in a Docker container. docker ps
will show you all running containers.
Note: Unsure how to get this playing well with zeromq running on the host machine; I've only run successfully without using zmq.