Steem Mining in Microsoft Windows : A Miner's Guide (Part 2)

in #steem8 years ago (edited)

This guide is a continuation from Part 1 - https://steemit.com/steem/@bitcube/steem-mining-in-microsoft-windows-a-builder-s-guide-part-1. Part 1 describes how to build a Windows miner from Steem source codes.

If you are only interested in running a Windows build version and not interested in building one. You can ignore Part1.

Edit: User is asking for zip instead of rar file. Winziped file is provided. WinRAR is no longer needed.

Edit2: One of the links was not working. It is fixed.

Dependencies

If you built your own binary using Part 1 of this guide

Download the following software:

Steem Runtime ComponentsLink
runtimeparts.ziphttps://mega.nz/#!idoEHABY!SGv8nAaUJMUVLVcwQJthGywIJ2jr28HN1ehhPNaTz0g
blockchain.zip (optional)https://mega.nz/#!TFYzxApT!pKkGH0SxyErx1rnwA-eEYlDIIOu3DHv6VVAtNN4cJeg
> Download and instal Win RAR

> Create a folder, say L:\mine

> Copy L:\build\programs\steemd\Release\steemd.exe to L:\mine

> Copy L:\build\programs\cli_wallet\Release\cli_wallet.exe to L:\mine

> Extract the files in runtimeparts.rar  to L:\mine

> Extract the files in blockchain.zip  to L:\mine\stm

Note:

  • Downloading the blockchain.zip is optional. But it helps because it saves you time from syncing. The blockchain is cloned on 6 July 2016.

If you do not wish to build your own binary

Download the following software:

Steem Runtime ComponentsLink
Visual C++ Redistributable Packages for Visual Studio 2013https://www.microsoft.com/en-us/download/details.aspx?id=40784
Steem Windows Build (aka CLI Tools) cli-tools-085b.ziphttps://github.com/btscube/steem/releases
blockchain.zip (optional)https://mega.nz/#!TFYzxApT!pKkGH0SxyErx1rnwA-eEYlDIIOu3DHv6VVAtNN4cJeg

[]

> Download and install both the Microsoft C++ Redistributable

> Download and instal Win RAR

> Create a folder, say L:\mine

> Go to the latest release, download the "Steem Windows Build", also known as "CLI Tools". In this example, download "cli-tools-085b.zip"

> Extract the files in cli-tools-085b.zip to L:\mine

> Extract the files in blockchain.zip  to L:\mine\stm

Note:

  • Downloading the blockchain.zip is optional. But it helps because it saves you time from syncing. The blockchain is cloned on 6 July 2016.
  • In this example, we are using the L drive. You may use C:\ drive or D:\ drive if you do not have a L:\ drive

Running Steemd for the first time

> Open a new Command Prompt window

>cd L:\mine

>steemd -d L:\mine\stm --rpc-endpoint

[]

Note:

The "-d" parameter specifies the location path to store the blockchain and configuration files. In this example, we choose L:\mine\stm to store them.

The "--rpc-endpoint" is to let the cli_wallet.exe (to be run later) to communicate with steemd.

You will see this error "Error parsing logging config from config file L:\stm2\stm\config.ini, using default config". You can safely ignore it.

steemd will attempt to download the latest blocks from the network. We leave this command prompt windows running and wait for steemd to be fully in synced with the latest block.

We will now run cli_wallet to check the status of the blockchain syncing.

> Open a new Command Prompt window

>cd L:\mine

>cli_wallet.exe
> You will see a "new >>>" prompt

Now, let's check the steem version to be sure we are running the latest software.

[]

> At the cli_wallet "new >>>" prompt, type about

We will wait for steem to sync all the blocks. You can type "info" at the cli_wallet prompt to check. Check that the head_block_age is a few seconds old.

[]

Note:

  • If you see "head_block_age" specify a time in the future, it means you need to synchronise your computer's clock with a internet time server.

Configure and prepare your mining account

Get a new mining account ready

Once the steemd is synced, we are ready to prepare a new mining account. But first check if the account name is taken up. Let's say we want to create an account named "bitcube"

> At the cli_wallet "new >>>" get_account bitcube

[]

From the above screenshot, you can see "id: 2.2.880" and "name: bitcube". So account bitcube is taken up. Let's try something very different, say 'supersteemminer'

> At the cli_wallet "new >>>" get_account supersteemminer

[]

We see that cli_wallet complains that 'Unknown account'. Great. This account is not in used. We will use it.

Let's create this account then. First set a password for this new wallet.

> At the cli_wallet "new >>>", type set_password mypassword

> The prompt will change to "locked >>>"

> At the cli_wallet "locked >>>", type unlock mypassword 

> The prompt will change to "unlocked >>>"

Note:

  • "mypassword" is just an example. Do make sure you use a real password and remember it! If you forget the password, you will lose access to this wallet.

All new account need a pair of public and private keys. Let's generate the two keys.

> At the cli_wallet "unlocked >>>", type suggest_brain_key

[]

You will see 3 keys created.

The "pub_key" is the Public Key.

The "wif_priv_key" is the PrivateKey.

The "brain_priv_key" is the Private Brain Key.

Note:

  • The two private keys are the keys to your account and its fund. Store them (and the public key) securely in a secret place!
  • Note down the public and private keys. You can copy them to a notepad. They will be needed later to configure the miner.
  • We are using this key pair for our example
    "wif_priv_key": "5JsMnPge4rDKAh8JRhsVVFw3nHw3fkdjbEXHXUB2TMe3qJy58V9",
    "pub_key": "STM4uXGcRAJmh4gxedZ1Lx3EKakXzCa4hiKksz6N7gXzArfvCmhQr"
  • BUT DO NOT use them in your actual setting. You need to generate your own keys!

Configure your steemd for mining

We need to stop steemd temporarily in order to configure it for mining. But before shutting it down, do remember to do a 'cli_wallet' info to make sure it is really in synced and up-to-date.

> Go to the steemd Command Prompt Window. Enter Control-C to shut it down properly.

[]

Now, edit the default config.ini generated.

> notepad L:\mine\stm\config.ini


> Look out for :
# P2P nodes to connect to on startup (may specify multiple times)
# seed-node = 

Add the following:

seed-node = seed.steemed.net:2001
seed-node = seed.cubeconnex.com:2001
seed-node = seed.steemed.net:2001
seed-node = steem.clawmap.com:2001
seed-node = seed.steemwitness.com:2001
seed-node = steem-seed1.abit-more.com:2001
seed-node = 185.82.203.92:2001
seed-node = 52.38.66.234:2001
seed-node = 52.37.169.52:2001
seed-node = 52.26.78.244:2001
seed-node = 192.99.4.226:2001
seed-node = 46.252.27.1:1337
seed-node = 81.89.101.133:2001
seed-node = 52.4.250.181:39705
seed-node = 85.214.65.220:2001


> Look out for :
# name of witness controlled by this node (e.g. initwitness )

Add the following:
 witness = "supersteemminer"
 
> Look out for :
# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] )

Add the following:

miner =["supersteemminer","5JsMnPge4rDKAh8JRhsVVFw3nHw3fkdjbEXHXUB2TMe3qJy58V9"]

Note:

  • We are using this key pair for our example
    "wif_priv_key": "5JsMnPge4rDKAh8JRhsVVFw3nHw3fkdjbEXHXUB2TMe3qJy58V9",
    "pub_key": "STM4uXGcRAJmh4gxedZ1Lx3EKakXzCa4hiKksz6N7gXzArfvCmhQr"
  • BUT DO NOT use them in your actual setting. You need to generate your own keys!
> Save the changed config.ini file

You are ready for some power hashing!


Let the power hashing begin!

Restart steemd to begin mining!

> Go to your steemd Window

>steemd.exe -d L:\mine\stm --rpc-endpoint

> You will see a lot of messages.  Look out for 
"Started witness node on a chain".  

[]

> You will see 
 "hash rate: 1 hps  target: 29 queue: 102 estimated time to produce:"
 repeatedly printed for many lines.  

This means that steemd is in mining mode and it is syncing to the latest block.

Once steemd (ie the blockchain) is synced and up to date, you will start seeing your actual hash rate. A sample is shown below.
[]

Congratualtions! You are now a Steem miner.

Further Reading

Sort:  

Maybe a dumb question, but is it necessary/beneficial to make a new account? Would it be problematic to use the one generated for posting on steemit instead?

I think you can use the "Active" key of an existing account to mine. Copy the key pair from your Steemit account. It is under the "Permissions" section.

Perhaps need to become a witness first, by using update_witness command in the CLI (better generate another key and set it as signing key).

Then in config.ini,

witness = "your_account"
miner = ["your_account","your_active_key"]
private-key = your_signing_key

Note: no quotes around the private-key.

Awesome! Downloading the blockchain right now. Thanks for the guide.

Can I mine with my existing account name and Private Posting Key as wif private key?

You need active key and signing key.

I am looking for a same answer, did you find anything?

how import wallet was created ic CLI to wallet in STEEMIT account?

There was a fork last night. You need to update your miner to the new software.

Go to the steemd Command Prompt Window. Enter Control-C to shut it down properly.

Press only ONCE, and wait for a while, it will end by itself eventually. Otherwise you'll need to replay at next startup, which probably will take a long time.

I got to the part where i need to wait for it to sync. I had downloaded the blockchain, but it was 33 hours old and it stays there it seems. I don't see anything happening that resembles syncing, though I seem to have done everything as in the guide.

steem network was facing some bad forking. It seems like your steemd is stuck or forked. Try using the latest blockchain from here - https://mega.nz/#!WEAV0KLZ!McIhGwTEJWcnubo2kuQjrrI5JclYa5cs9q_BaU0f7Sc. Make sure you shutdown steemd before doing this replacement.

thank you! I'll try it out this evening^^

i had the exact same issue as you i wrote my solution above. i added some seed-nodes to the config.

Still no luck:(

try
1 - in the config.ini file set mining-threads : your number of threads
2 - start the steemd with --resync
steemd.exe -d L:\mine\stm --rpc-endpoint --resync
It takes about 2-3 hours

thank you, i'll let you know if it works^^

thank you, very detailed tutorial worked well but how we can see mining earnings balance??

open a new cmd and open cli_wallet.exe
in this example (using C:/)
1 - C:\mine\cli_wallet.exe (remember: steemd must run or you'll get error)
2 - then, if you set a password, type unlock yourpassword
3 - then type list_my_accounts

What's wrong?

unlocked >>> list_my_accounts
list_my_accounts
1528153ms th_a       websocket_api.cpp:88          on_message           ] messag
e: {"id":9,"result":[]}
-------------------------------------------------------------------------
TOTAL                     0.000 STEEM       0.000000 VESTS            0.000 SBD
unlocked >>>

You have to run import_key "your WIF private key".

Yes, thank you! Now is all correct! Good luck in mining! 8)

Managed to solve? I have the same problem.

As above, you have to run import_key "your WIF private key".

I believe this is what it displays before you actually mine a block.

The account is "claimed" when you mine your first POW block. If you import a key from steemit.com, it has a bit of steem already, so it shows up.

Thank for this great post bitcube, it's clear and to the point.
Just one thing, the first link is death because of a dot that got added to the url.

Yes, one of the links was not working. I think it should be fixed now.

Coin Marketplace

STEEM 0.23
TRX 0.26
JST 0.040
BTC 98185.12
ETH 3486.20
USDT 1.00
SBD 3.27