Mining

+2 votes
We have 41 connections, but only one node digs and digs continuously, causing other nodes to not exploit, why is that? I have setruntimeparam miningturnover is 1 but still so

 

 this params.dat

 

anyone-can-connect = true               # Anyone can connect, i.e. a publicly readable blockchain.
anyone-can-send = true                  # Anyone can send, i.e. transaction signing not restricted by address.
anyone-can-receive = true               # Anyone can receive, i.e. transaction outputs not restricted by address.
anyone-can-receive-empty = true         # Anyone can receive empty output, i.e. without permission grants, asset transfers and zero native currency.
anyone-can-create = false               # Anyone can create new streams.
anyone-can-issue = false                # Anyone can issue new native assets.
anyone-can-mine = true                  # Anyone can mine blocks (confirm transactions).
anyone-can-activate = false             # Anyone can grant or revoke connect, send and receive permissions.
anyone-can-admin = false                # Anyone can grant or revoke all permissions.
support-miner-precheck = true           # Require special metadata output with cached scriptPubKey for input, to support advanced miner checks.
allow-p2sh-outputs = true               # Allow pay-to-scripthash (P2SH) scripts, often used for multisig.
allow-multisig-outputs = true           # Allow bare multisignature scripts, rarely used but still supported.

# Consensus requirements

setup-first-blocks = 60                 # Length of initial setup phase in blocks, in which mining-diversity,
                                        # admin-consensus-* and mining-requires-peers are not applied. (1 - 31536000)
mining-diversity = 0.3                  # Miners must wait <mining-diversity>*<active miners> between blocks. (0 - 1)
admin-consensus-admin = 0.5             # <admin-consensus-admin>*<active admins> needed to change admin perms. (0 - 1)
admin-consensus-activate = 0.5          # <admin-consensus-activate>*<active admins> to change activate perms. (0 - 1)
admin-consensus-mine = 0.5              # <admin-consensus-mine>*<active admins> to change mining permissions. (0 - 1)
admin-consensus-create = 0.0            # <admin-consensus-issue>*<active admins> to change create permissions. (0 - 1)
admin-consensus-issue = 0.0             # <admin-consensus-issue>*<active admins> to change issue permissions. (0 - 1)

# Defaults for node runtime parameters

lock-admin-mine-rounds = 0             # Ignore forks that reverse changes in admin or mine permissions after this many mining rounds have passed. Integer only. (0 - 10000)
mining-requires-peers = false            # Nodes only mine blocks if connected to other nodes (ignored if only one permitted miner).
mine-empty-rounds = 10                  # Mine this many rounds of empty blocks before pausing to wait for new transactions. If negative, continue indefinitely (ignored if target-adjust-freq>0). Non-integer allowed. (-1 - 1000)
mining-turnover = 1                   # Prefer pure round robin between a subset of active miners to minimize forks (0.0) or random equal participation for all permitted miners (1.0). (0 - 1)

# Native blockchain currency (likely not required)

initial-block-reward = 25000000         # Initial block mining reward in raw native currency units. (0 - 1000000000000000000)
first-block-reward = 450000000000000    # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000)
reward-halving-interval = 2073600       # Interval for halving of mining rewards, in blocks. (60 - 4294967295)
reward-spendable-delay = 1              # Delay before mining reward can be spent, in blocks. (1 - 100000)
minimum-per-output = -1                 # Minimum native currency per output (anti-dust), in raw units.
                                        # If set to -1, this is calculated from minimum-relay-fee. (-1 - 1000000000)
maximum-per-output = 900000000000000    # Maximum native currency per output, in raw units. (0 - 1000000000000000000)
minimum-relay-fee = 1000                # Minimum transaction fee, in raw units of native currency. (0 - 1000000000)
native-currency-multiple = 100000000    # Number of raw units of native currency per display unit. (0 - 1000000000)

# Advanced mining parameters

skip-pow-check = false                  # Skip checking whether block hashes demonstrate proof of work.
pow-minimum-bits = 8                    # Initial and minimum proof of work difficulty, in leading zero bits. (1 - 32)
target-adjust-freq = -1                 # Interval between proof of work difficulty adjustments, in seconds, if negative - never adjusted. (-1 - 4294967295)
allow-min-difficulty-blocks = false     # Allow lower difficulty blocks if none after 2*<target-block-time>.

# Standard transaction definitions

only-accept-std-txs = true              # Only accept and relay transactions which qualify as 'standard'.
max-std-tx-size = 100000000             # Maximum size of standard transactions, in bytes. (1024 - 100000000)
max-std-op-returns-count = 1024         # Maximum number of OP_RETURN metadata outputs in standard transactions. (0 - 1024)
max-std-op-return-size = 8388608        # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 67108864)
max-std-op-drops-count = 100            # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 32768            # Maximum size of data elements in standard transactions, in bytes. (128 - 32768)

 

thank you
asked Aug 11, 2017 by anonymous

2 Answers

+2 votes

I am not sure what you mean with exploiting but i assume you only have one node that is mining of your 41 and you want to increase this number? 

This could be because you have not given permissions to your other nodes to mine and also you have to take into account the following: 

admin-consensus-mine = 0.5              # <admin-consensus-mine>*<active admins> to change mining permissions. (0 - 1)

This indicates that 50% of your admin nodes must give permissions to a given node to be able to mine.

Example: 

You have 4 nodes with the following permissions:  A(admin) B(admin) C(connect) D(connect). 

At least 1 of your admins must grant permissions to give node C permission to mine. If you have more admins then the ratio will need to be worked out to achieve consensus.

answered Aug 11, 2017 by RobertJ
this does not apply to anyone-can-mine = true?
0 votes

If you set anyone-can-mine=true then there is no control over who can mine the blocks, and it's quite possible that a single node performs all the mining. This is not generally the right approach for permissioned blockchains, where instead you would have a set of permitted miners who work in rotation.

answered Aug 11, 2017 by MultiChain
With one active multichain for 10 days, is there a way to change anyone-can-mine = true to anyone-can-mine = false, without having to reinstall or lose any data?
Once a node has been created you cannot change the params of that node without recreating the node with new params.
...