Bug: on Windows, can't reconnect to a blockchain

+2 votes
with v1.0-alpha25 on Windows 10, I can successfully establish connection to an admin node for the first time. However, after disconnected and run `multichaind chain_index` again, I constantly get the following error msg:

```

ERROR: Parameter set for blockchain chain_index is invalid. You may generate new network using these parameters by runni
ng:

  multichain-util clone chain_index <new-blockchain-name>

```

On the other hand, I have no problem reconnecting to the same blockchain on CentOS (linux)

Could someone please verify and maybe help? Thanks
asked Nov 17, 2016 by John
Sounds like this might be a Windows issue. We've forwarded both your questions to the dev team to look into.

1 Answer

+1 vote
This error message should appear only in one case: params.dat file was manually modified after nodes were successively connected for the first time (please see multiple "don't edit" warnings in the file itself).

If this is not the case, please post contents of params.dat files from both nodes.
answered Nov 20, 2016 by Michael
edited Nov 21, 2016 by MultiChain
Hi, I didn't modify param.dat and am able to repeat it. It seems it's a Windows (10) only issue. I made a copy of param.dat after the client connected successfully initially, and found nothing changed after I stopped the process with Ctrl + C. Then it failed as expected when I tried to restart the multichaind process and it came back the same error as seen before: "ERROR: Parameter set for blockchain chain_limbo is invalid. You may generate new network using these parameters by running:"ERROR: Parameter set for blockchain chain_limbo is invalid. You may generate new network using these parameters by running"

Here are two param.dat files (in separated thread) . Hope it helps
1st from the client on Windows that won't connect:
# ==== MultiChain configuration file ====

# Created by multichain-util
# Protocol version: 10006

# This parameter set is VALID.
# To join network please run "multichaind chain_limbo".

# The following parameters can only be edited if this file is a prototype of another configuration file.
# Please run "multichain-util clone chain_limbo <new-network-name>" to generate new network.


# Basic chain parameters

chain-protocol = multichain             # Chain protocol: multichain (permissions, native assets) or bitcoin
chain-description = MultiChain chain_limbo # Chain description, embedded in genesis block coinbase, max 256 chars.
root-stream-name = root                 # Root stream name, blank means no root stream.
root-stream-open = true                 # Allow anyone to publish in root stream
chain-is-testnet = false                # Content of the 'testnet' field of API responses, for compatibility.
target-block-time = 15                  # Target time between blocks (transaction confirmation delay), seconds. (5 - 86400)
maximum-block-size = 1000000            # Maximum block size in bytes. (1000 - 1000000000)

# Global permissions

anyone-can-connect = false              # Anyone can connect, i.e. a publicly readable blockchain.
anyone-can-send = false                 # Anyone can send, i.e. transaction signing not restricted by address.
anyone-can-receive = false              # Anyone can receive, i.e. transaction outputs not restricted by address.
anyone-can-create = false               # Anyone can create new streams.
anyone-can-issue = false                # Anyone can issue new native assets.
anyone-can-mine = false                 # 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.
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)
mining-requires-peers = true            # Default for whether nodes only mine blocks if connected to other nodes.

# Native blockchain currency (likely not required)

initial-block-reward = 0                # Initial block mining reward in raw native currency units. (0 - -1486618624)
first-block-reward = -1                 # Different mining reward for first block only, ignored if negative. (-1 - -1486618624)
reward-halving-interval = 52560000      # Interval for halving of mining rewards, in blocks. (60 - -1)
reward-spendable-delay = 1              # Delay before mining reward can be spent, in blocks. (1 - 100000)
minimum-per-output = 0                  # 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 = 276447232          # Maximum native currency per output, in raw units. (0 - -1486618624)
minimum-relay-fee = 0                   # 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 = 16                   # 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 - -1)
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 = 100000                # Maximum size of standard transactions, in bytes. (1024 - 10000000)
max-std-op-returns-count = 10           # Maximum number of OP_RETURN metadata outputs in standard transactions. (0 - 1024)
max-std-op-return-size = 4096           # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 8388608)
max-std-op-drops-count = 5              # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 600              # Maximum size of data elements in standard transactions, in bytes. (128 - 32768)

# The following parameters were generated by multichain-util.
# They SHOULD ONLY BE EDITED IF YOU KNOW WHAT YOU ARE DOING.

default-network-port = 4369             # Default TCP/IP port for peer-to-peer connection with other nodes.
default-rpc-port = 4368                 # Default TCP/IP port for incoming JSON-RPC API requests.
chain-name = chain_limbo                # Chain name, used as first argument for multichaind and multichain-cli.
protocol-version = 10006                # Protocol version at the moment of blockchain genesis.
network-message-start = fbc0e6e5        # Magic value sent as the first 4 bytes of every peer-to-peer message.
address-pubkeyhash-version = 000564bf   # Version bytes used for pay-to-pubkeyhash addresses.
address-scripthash-version = 0586f7af   # Version bytes used for pay-to-scripthash addresses.
private-key-version = 800cbbda          # Version bytes used for exporting private keys.
address-checksum-value = 71491fcd       # Bytes used for XOR in address checksum calculation.

# The following parameters were generated by multichaind.
# They SHOULD NOT BE EDITED.

genesis-pubkey = 02b96e33be99fd9603e592481815d810add6295c65b5e67cd3c3bc1dd5859ab4a4 # Genesis block coinbase output public key.
genesis-version = 1                     # Genesis block version.
genesis-timestamp = 1479865326          # Genesis block timestamp.
genesis-nbits = 520159231               # Genesis block difficulty (nBits).
genesis-nonce = 108343                  # Genesis block nonce.
genesis-pubkey-hash = 46d284614d843471283500a3dd53f9509f10eedb # Genesis block coinbase output public key hash.
genesis-hash = 0000cac1c530ed3cde6daad6654705e858270518488e7601f2f9ec0f3f7d2b22 # Genesis block hash.
chain-params-hash = 81f83d4045afacf87327a8785e137df892882fc7b1b75ad7ff7681687c10d2dc # Hash of blockchain parameters, to prevent accidental changes.
And this is from the genesis node:
# ==== MultiChain configuration file ====

# Created by multichain-util
# Protocol version: 10006

# This parameter set is VALID.
# To join network please run "multichaind chain_limbo".

# The following parameters can only be edited if this file is a prototype of another configuration file.
# Please run "multichain-util clone chain_limbo <new-network-name>" to generate new network.


# Basic chain parameters

chain-protocol = multichain             # Chain protocol: multichain (permissions, native assets) or bitcoin
chain-description = MultiChain chain_limbo # Chain description, embedded in genesis block coinbase, max 256 chars.
root-stream-name = root                 # Root stream name, blank means no root stream.
root-stream-open = true                 # Allow anyone to publish in root stream
chain-is-testnet = false                # Content of the 'testnet' field of API responses, for compatibility.
target-block-time = 15                  # Target time between blocks (transaction confirmation delay), seconds. (5 - 86400)
maximum-block-size = 1000000            # Maximum block size in bytes. (1000 - 1000000000)

# Global permissions

anyone-can-connect = false              # Anyone can connect, i.e. a publicly readable blockchain.
anyone-can-send = false                 # Anyone can send, i.e. transaction signing not restricted by address.
anyone-can-receive = false              # Anyone can receive, i.e. transaction outputs not restricted by address.
anyone-can-create = false               # Anyone can create new streams.
anyone-can-issue = false                # Anyone can issue new native assets.
anyone-can-mine = false                 # 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.
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)
mining-requires-peers = true            # Default for whether nodes only mine blocks if connected to other nodes.

# Native blockchain currency (likely not required)

initial-block-reward = 0                # Initial block mining reward in raw native currency units. (0 - 1000000000000000000)
first-block-reward = -1                 # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000)
reward-halving-interval = 52560000      # 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 = 0                  # 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 = 100000000000000    # Maximum native currency per output, in raw units. (0 - 1000000000000000000)
minimum-relay-fee = 0                   # 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 = 16                   # 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 = 100000                # Maximum size of standard transactions, in bytes. (1024 - 10000000)
max-std-op-returns-count = 10           # Maximum number of OP_RETURN metadata outputs in standard transactions. (0 - 1024)
max-std-op-return-size = 4096           # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 8388608)
max-std-op-drops-count = 5              # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 600              # Maximum size of data elements in standard transactions, in bytes. (128 - 32768)

# The following parameters were generated by multichain-util.
# They SHOULD ONLY BE EDITED IF YOU KNOW WHAT YOU ARE DOING.

default-network-port = 4369             # Default TCP/IP port for peer-to-peer connection with other nodes.
default-rpc-port = 4368                 # Default TCP/IP port for incoming JSON-RPC API requests.
chain-name = chain_limbo                # Chain name, used as first argument for multichaind and multichain-cli.
protocol-version = 10006                # Protocol version at the moment of blockchain genesis.
network-message-start = fbc0e6e5        # Magic value sent as the first 4 bytes of every peer-to-peer message.
address-pubkeyhash-version = 000564bf   # Version bytes used for pay-to-pubkeyhash addresses.
address-scripthash-version = 0586f7af   # Version bytes used for pay-to-scripthash addresses.
private-key-version = 800cbbda          # Version bytes used for exporting private keys.
address-checksum-value = 71491fcd       # Bytes used for XOR in address checksum calculation.

# The following parameters were generated by multichaind.
# They SHOULD NOT BE EDITED.

genesis-pubkey = 02b96e33be99fd9603e592481815d810add6295c65b5e67cd3c3bc1dd5859ab4a4 # Genesis block coinbase output public key.
genesis-version = 1                     # Genesis block version.
genesis-timestamp = 1479865326          # Genesis block timestamp.
genesis-nbits = 520159231               # Genesis block difficulty (nBits).
genesis-nonce = 108343                  # Genesis block nonce.
genesis-pubkey-hash = 46d284614d843471283500a3dd53f9509f10eedb # Genesis block coinbase output public key hash.
genesis-hash = 0000cac1c530ed3cde6daad6654705e858270518488e7601f2f9ec0f3f7d2b22 # Genesis block hash.
chain-params-hash = 81f83d4045afacf87327a8785e137df892882fc7b1b75ad7ff7681687c10d2dc # Hash of blockchain parameters, to prevent accidental changes.
Thank you for reporting this.

I see the problem in the files you sent. Though we couldn't reproduce this issue on several Windows 10 servers, we found the bug which can lead to this.

We already fixed this bug. Next version is scheduled for release for next week.
Good job! Thanks!
Alpha 26 was just released. Please let us know if the issue is resolved.

Thank you.
Hi Michael, things are looking good. Good work! Thanks!
...