Mining steem on multiple machines

in #mining8 years ago

A lot of people seem to be confused about configuring multiple nodes for parallel mining, so here are some best practices you may find useful.

The basics of steem PoW mining

Your nodes will keep crunching numbers until they find a valid PoW. When a PoW is found, the account associated with the PoW will enter the miner queue and gain the right to generate a block on the chain when it reaches the top of the queue. When it does reach the top of the queue, the witness node for the account will generate a block, the account will receive the mining reward and leave the miner queue.

Miner vs witness

There are two relevant options in the node config:
witness = "your-steem-account-name"
and
miner = ["your-steem-account-name","PrivateWIFKey"]

So here's the deal:
miner defines which account the current node will associate the Proof of Work with.
This is the account that will enter the miner queue when a PoW is found by the node.

witness defines which account the current node will generate blocks for. That is, once the account reaches the top of the miner queue, this node will be responsible for generating the block and thus securing the mining reward.

Now, for any given account, you do NOT want more than 1 node configured as witness. Otherwise, multiple nodes will try to generate a block at the same time and the network may even consider it malicious activity and punish you.

Mining multiple accounts

It's worth noting that once an account finds a PoW and enters the miner queue, that account can not mine until it leaves the miner queue (this currently takes about 2 hours).
For this reason, it's recommended to set up multiple accounts for mining, so even if one of them is in the queue, your nodes can still try to find PoW for the other accounts.

Bottom line

With all that in mind, here's what you wanna do:

Say you have n nodes. Depending on your total hash power, you will want to have at least 3 miner accounts.

On all n nodes:

miner = ["your-account-2","Private-WIF-Key-Of-Account-2"]
miner = ["your-account-1","Private-WIF-Key-Of-Account-1"]
miner = ["your-account-3","Private-WIF-Key-Of-Account-3"]

The accounts will enter the miner queue in alphabetical order of the account names, regardless of the order you define in the config. So in this case, "your-account-1" will enter first, and if you find a PoW while that account is already in the queue, "your-account-2" will enter the queue.

On only 1 (preferably the most stable) node

In addition to the miner entries, have witness lines for all accounts
witness = "your-account-2"
witness = "your-account-1"
witness = "your-account-3"

Hopefully this helps clear up some of the confusion about configuring multiple nodes for steem mining.

Sort:  

And in which case the :
##WIF PRIVATE KEY to be used by one or more witnesses or miners
##private-key =
is needed ?

I've succesfully mined in the way I described and I've never used that option, so to be honest I'm not sure what that's for.
Maybe if you want to set up a witness node without POW mining, you can set the key there (since the witness entry itself doesn't have a key part).

So, do you need 2 separate nodes to effectively mine?
That is , a miner node and a witness node?
What about a seed node? Do you need one too?
Please explain.
Thanks

The seed node is not needed to mine. The seednode can be compared to the "fullnode" in the "old" cryptoworld. It provides the blockchain to nodes/miners.

Is there a reward to run a Seed Node?

No, you can configure a single node to be both a miner and a witness. Since there are already a lot more detailed tutorials about that, this post was specifically intended for multi-node setups, because that's what seems to confuse most people.
And no, you don't have to run a seed node to mine. Seed nodes are for bootstrapping new nodes in a distributed network - they are specific initial nodes to talk to when you join the network, that are known to be already part of the network, so they can tell your new node more about who else is currently in the network.

Who can help. I have 2 computers and 1 account. How to configure config.ini for 1 mashine and for second?

Is there a way to have all the rewards be deposited in only one account wallet?
It seems a bit of a mess to have funds "scattered" on all n different accounts/wallets
I can see a variable:
WIF PRIVATE KEY to be used by one or more witnesses or miners
private-key =
Is this what you use for one wallet operation for multiple miners?
Thanks

i did try mining without private-key = and got only missed blocks

Not that I'm aware of. Yeah, it is a mess trying to vote/curate with your scattered SP.
You can set a withdrawal route though, so over 2 years you can transfer over your funds between accounts without manual interaction either as SP or Steem.

Thanks for the post Orly. The part I'm still confused about is it possible to have all the Steem power being mined go to a single Steemit account?

Using mutliple accounts seems kind of awkward for using the social network. With your method in order to consolidate your Steem Power you would have to power it down and wait 104 weeks to transfer it all to your main account right?

Is there no way to use multiple miners on multiple computers and have all the Steem Power go to a single Steemit account?

Can you mine from multiple computers to the same remote witness instance?

The part I'm still confused about is it possible to have all the Steem power being mined go to a single Steemit account?

Most steem power will go to the account that comes first alphabetically. It's only if you find a PoW while that account is already in the miner queue, that the next account will be used.

Using mutliple accounts seems kind of awkward for using the social network. With your method in order to consolidate your Steem Power you would have to power it down and wait 104 weeks to transfer it all to your main account right?

Exactly. This is not a limitation of my method, it's a limitation of either the protocol or the miner implementation, but there's currently no way around it.

Can you mine from multiple computers to the same remote witness instance?

Yes, and this is exactly what you should do. Only have one witness instance for each account (they may be the same node though, which may also be miner at the same time).

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

Hi! This post has a Flesch-Kincaid grade level of 11.3 and reading ease of 65%. This puts the writing level on par with Michael Crichton and Mitt Romney.