To mine SOLO you will need to setup your local daemon (node). After compiling and starting up it connects to some other nodes and synchronizes its database. This took many hours!! Solo mining it will be hard to get yourself a block, if you not have a really big hash power it’s a gamble.
Connect here and download the node for your platform
https://github.com/monero-project/monero/releases
Extract to a given folder and start monerod. This is the daemon which will now start syncing and the operation can take many days!
The monerod daemon uses a database to store the blockchain, so normally it doesn't need anything special to save, as it should always be in a good state. However, an OS crash (or OS/filesystem bug) could cause some disk writes to be lost, causing corruption so we must use special command to save the work. Run the daemon using one of these command line options:
monerod --db-sync-mode safe --block-sync-size 20
or
monerod --block-sync-size 20
Remember: "--db-sync-mode safe " option it's a lot slower but more secure. To check your blockheight type status into monerod, the blockheight should be equal to the blockheight reported on MoneroBlocks https://moneroblocks.info/ in order to be fully synced.
Use the command exit to stop it gracefully. You must write: exit and press return button in the console. If you do not do this, maybe you have to resync from scratch everything!
If you do not use "db-sync-mode safe" and your PC crash, you wil have blockchain database (LMDB) corruption. The easiest way to fix it is to rename your corrupt lmdb folder to something else, for example: rename C:\ProgramData\bitmonero\lmdb to C:\ProgramData\bitmonero\lmdb-old and run monerod again. It should start without errors and it will again create a fresh copy of C:\ProgramData\bitmonero\lmdb and sync from scratch. It will take some time to catch up with the network again, though.
If everything is slow and after many days you are stuck, you can try this other solution. Importing the blockchain file directly:
Download https://downloads.getmonero.org/blockchain.raw
copy the file in your monero directory and import the file
monero-blockchain-import.exe --verify 0 --input-file ./blockchain.raw
after the import, you can delete the raw blockchain download as it is no longer needed. Read here for further instructions
https://github.com/monero-project/monero/blob/master/src/blockchain_utilities/README.md
Because we want to mine solo with CPU and GPU, you must use an external miner that connects to our pool (to not have to share the machine between the node and the miner). We chose to set up the monero-stratum solo mining pool on the machine that already hosts the node.
Download and install Redis Database for Windows
https://github.com/MicrosoftArchive/redis/releases
Download and install Python 2.7
https://www.python.org/download/releases/2.7/
Download and install OpenSSL
https://s3.amazonaws.com/brave-deps/OpenSSL/Win64OpenSSL-1_0_2j.zip
Download and install NodeJs for Windows
https://nodejs.org/en/download/
After the install, first you can execute scripts on your system by running the following command from an elevated PowerShell. To run PowerShell as Administrator, click Start, search for PowerShell, right-click PowerShell and select Run as Administrator.
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
Then, to install and use this upgrader tool, run the following command (also from an elevated PowerShell or cmd.exe).
npm install --global --production npm-windows-upgrade
npm-windows-upgrade --npm-version latest
npm install -g node-gyp
npm config set msvs_version 2017 --global
npm config set python python2.7
npm install redis
npm install dateformat
npm install cli-color
npm install async
npm install bignum
* If you have an error like the following, delete or rename "youtuername
.node-gyp" to somethingelse
C:\Users\.youtuername
.node-gyp\0.12.7\Release\node.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x....
npm install base58-native
npm install multi-hashing
* error ..\multihashing.cc(93): error C2039: 'New': non è un membro di 'v8::String' [C:\node_modules\multi-hashing\build\multih
ashing.vcxproj]
If you have the previuos error, install https://github.com/clintar/node-multi-hashing and move it to node_modules folder.
npm install nan@latest
stuck here "multihashing.cc(38): error C3861: 'NanScope':"
Downloadhttps://github.com/zone117x/node-cryptonote-pool/archive/master.zip
unzip in C:\node-cryptonote-pool-master
open command line and go inside the directory
cd C:\node-cryptonote-pool-master
You need to copy the config_example.json to active configuration so your pool start working, copy config_example.json to config.json edit this file to configure the pool, more info here:
after configuration use this command to start the pool
node init.js
only for windows 10?? I try to install on win 7 pro 64bit, failed when install Redis
ReplyDeleteWindows 2008 installation fails with too many npm errors and requires windows server 2008 method
ReplyDeleteWindows 10 failed to install the pool a lot of mistakes
ReplyDeleteThis machine has a vs2017 installed
So this does not work at all for me :(
ReplyDeleteCan't install bignum because node-pre-gyp does not build. node-pre-gryp does not build because a "binary" section is missing in the package.json-file. package.json looks nothing like the example, so I don't know which file to edit. "Binary" section requires a host section, which is a URL to something, that I have no idea what is. This all result in init.js failing to run. Hours wasted on this with absolutely no information to find anywhere about how to solve it. Don't try this unless you know enough to write a guide yourself - and thus would not need this guide anyway.