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:

> 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?

https://steemit.com/mining/@rolik/mining-steem this is group in telegram about mining

i have a problem
http://imgur.com/rc4KwoB

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.

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.

Hello,
you add accidently two times this row

seed-node = seed.steemed.net:2001

It generates an error, just remove one of them

Yes, my bad. There is a duplicate. Please remove the repeated line.

maybe you can help me.
I follow all your guide and started mining.
Found 2 block but I've got this error:
...
error when pushing block
"unlinkable_block_exception"

How can I fix this?
Thanks

Do you see this error keeps repeating or has it gone away after some messages? If you keeps seeing this repeatedly, it means your node went into a fork or being jammed up. Steem network is facing some forking issues ATM. You will have to remove the blockchain subfolder and replace it with the latest copy here - https://mega.nz/#!WEAV0KLZ!McIhGwTEJWcnubo2kuQjrrI5JclYa5cs9q_BaU0f7Sc

blockchain subfolder is located in L:\steem\stm if you follow this guide. Remember to shutdown steemd.exe before replacing the blockchain folder.

Now it works, maybe it was a bad luck block.
Another question:
In the config.ini is correct this settings with N witness for N miners
witness = "1abc"
witness = "2abc"
witness = "3abc"
miner = ["1abc","5key1"]
miner = ["2abc","5key2"]
miner = ["3abc","5key3"]

or this with only 1 witness for N miners?
witness = "1"
miner = ["1abc","5key1"]
miner = ["2abc","5key2"]
miner = ["3abc","5key3"]

Thanks!

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.

I am trying to use my current account. I am so confused about the WIF key.
Actually I have started mining with my current server since 3 days ago but I got nothing. is it normal or something is wrong with my config.ini?

hey
i'am using the latest version of the windows wallet from github. for me it is not possible to sync the blocks. when using the blockchain you provided on mega it definitely imports them... applies hardforks... but it doesn't continue.

when checking the status from cli_wallet.exe there is no progress after it is fully imported. do i need to do something to enable it to fetch the whole blockchain from the network?

thanks in advance

okay solved it. i had to manually add a couple of seed-nodes. i used the following:

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

it's not possible right now to mine in windows .. we have to wait release of new version

Am i mining now? and if i am when will i see the funds go into my steemit account? this has been running for about 18hr so far and nothing has gone into my account yet..

no sooner than after 2450 minutes + round time getting reward. usually with slow hashrate you will wait much longer time.

Hi, how to transfer balance from mining account to another account? Thanks

the link to part 1 doesnt work because of the . (dot) at the end

Hi There bitcube,

Thank you for the tuto. I am starting with steem, and am setting up mining. I'd like that the mining gains I make go to my steemIt account name "anarcharos" ....l the keys I got in my steemit account are: "Posting","active","memo","owner" ......but the keys generated by the steemd wallet are"public" "private" and "brain" .....wich key should I use to ensure the funds go to my anarcharos account in steemIt ?

Also the config file requires a :

WIF PRIVATE KEY to be used by one or more witnesses or miners

private-key =

Please can you clarify what is what?

Many thanks !!

Warning! mining STEEM is not possible anymore.
Save your time.

Can I mine STEEM?
No. Proof of work mining has been removed from Steem.
https://steemit.com/faq.html#Can_I_mine_STEEM

Good points in this post. I was about to post a similair thread. Not sure if I believe in the current crypto investment climate but I do believe in the blockchain. We really need more insights in the market and previous investment results (even though they don't deliver any guarantee for the future). I was wondering if anyone of you uses: https://www.coincheckup.com Supposingly they researched every crypto coin in the scene based on: the team, the product, advisors, community, the business and the business model. They even score the coins stengths. Check: https://www.coincheckup.com/coins/Steem#analysis To see the: Steem Investment and research analysis.