Steem: Config clarification

Created on 5 Aug 2016  路  7Comments  路  Source: steemit/steem

Hi, could you please clarify some cases:

  • What will happen if I specify multiple witness = some-witness in the config file?
  • What will happen if I specify multiple private-key = some-key in the config file?

Could you please provide a valid configuration for mining on multiple machines.

Thank you!

Most helpful comment

@mahnunchik:
1) With single node, you don't need to specify private-key unless your active key and signing key are different.
2) With multiple nodes,

  • in the witness node, you should use signing key for private-key (if a signing key is created already and not same as active key)
  • in miner nodes, if your account's active key is same as signing key, please don't set the account as witness. You can set a dummy account as witness, e.g. witness = "dummy".

All 7 comments

  • What will happen if I don't specify witness = * and private-key = * at all ?
  • What will happen if I specify only miner = ["account","WIF PRIVATE KEY"] ?

You need to know that

  • witness is for producing blocks (enable block producing for an account or not)
  • private-key and WIF_KEY in miner are for signing the block when it's a configured witness's turn to produce a block
  • miner is for mining POW tickets to produce a block. When a ticket is mined out, the account is put in to the mining queue; the node (_a running steemd process_) will produce a block when the account reaches the top of queue.

So,

What will happen if I specify multiple witness = some-witness in the config file?

You're monitoring multiple accounts, when any one of them is in turn, the node tries to produce a block with that account.

What will happen if I specify multiple private-key = some-key in the config file?

It depends on how did you configure your witness accounts. Every witness's signing key should be specified here once, otherwise it will fail to produce a block when in turn. Check with command get_witness account_name. You can have multiple witnesses with same key, in this case only need to specify the key once.

What will happen if I don't specify witness = * and private-key = * at all ?

If no witness configured you'll miss the block when it's your turn to produce, thus no block producing reward.
If no private-key configured, and if no miner configured, you'll miss the block as well.
If no private-key configured but have miner configured, and if the witness's signing key is same to the key configured with miner (or witness is not created already), you'll be able to produce blocks when in turn.

What will happen if I specify only miner = ["account","WIF PRIVATE KEY"] ?

With miner configured you'll be able to mine tickets. There was a bug which causes the node to not start mining when no witness configured, but I'm not sure if it's fixed.
If you have only one node and specify only miner, you won't produce blocks thus no block producing reward.
If you have multiple nodes with same account(s) configured as miner(s), you only need (and SHOULD) to add witness to one of them, or even to a new node (for block producing only). If you set same pair of (witness, private-key) in multiple nodes, you'll produce multiple blocks at same time (one block by one node) which will probably lead to network forking, and you'll be punished when the punishment code is enabled (now disabled).

@mahnunchik last comment is updated. It was published when I accidentally pressed ctrl+enter but not finished writing.

@abitmore Thank you!

It's great explanation of the configuration!

Do I understand correctly the following cases:

1) Single node (Single steemd process) - Witness and Miner

miner = ["account", "ACTIVE PRIVATE KEY"]
# The same as in miner
witness = "account"
# The same as in miner
private-key = "ACTIVE PRIVATE KEY"

2) Multiple node configuration (Multiple steemd processes) - Witness + Some Miners

Witness - only one node

witness = "account"
private-key = "ACTIVE PRIVATE KEY"

Miner - one or more nodes

# The same as in witness
miner = ["account", "ACTIVE PRIVATE KEY"]
# Should be specified due to the bug
witness = "account"

Do I understand correctly that it is enough to specify active private key in both cases?

@mahnunchik:
1) With single node, you don't need to specify private-key unless your active key and signing key are different.
2) With multiple nodes,

  • in the witness node, you should use signing key for private-key (if a signing key is created already and not same as active key)
  • in miner nodes, if your account's active key is same as signing key, please don't set the account as witness. You can set a dummy account as witness, e.g. witness = "dummy".

@abitmore Thank you again!

Closing, I don't think there's any actual bug here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trashhalo picture trashhalo  路  4Comments

pfunks picture pfunks  路  6Comments

jnordberg picture jnordberg  路  3Comments

mvandeberg picture mvandeberg  路  6Comments

finleyexp picture finleyexp  路  4Comments