Upgrading the chain's protocol [closed]

+1 vote
Hello again.

After I updated the chain's software to the new beta and I ran `multichaind -version`, it showed that the new range of supported protocols are (20001-20006). So, I tried to upgrade the chain's protocol by running:

`multichain-cli chainName createfrom 1.. upgrade protocol_upgrade false '{"protocol-version":20006}'`

However, I am getting this error:

`Invalid value for protocol version. Valid range: 10004-10011, 20001-20004`

Am I missing something? Thanks for the help in advance.
closed with the note: Due to lack of reproducible case
asked Dec 20, 2018 by SDVII
closed Dec 24, 2018 by SDVII
The output of `multichaind -version` was the following:

`MultiChain 2.0 beta 1 Daemon (protocol 10004-10011, 20001-20006)`

2 Answers

0 votes
hope you deleted the previous node that you may have created (chainName ) or create a new node
answered Dec 20, 2018 by dannydias
Why should I delete it?
+1 vote
Please make sure you stopped MultiChain node running the previous version (20004?) before upgrading to 20006.
answered Dec 20, 2018 by Michael
The node needs to be running in order for the upgrade command to work. Not to mention that there is no mention of the need to stop the node in the official tutorial.
You should upgrade your node software first.

You can find the description of node upgrading procedure here: https://www.multichain.com/developers/upgrading-nodes-chains/
(Upgrading MultiChain software section 3-4)

You have to stop the node, wait couple of seconds, download and install new version of multichaind and start new version of the node.

Only then, you can make protocol version upgrade
(Upgrading blockchain protocol)
The node is already updated as mentioned above to beta 1
I also need to mention that I already used the upgrade command to update the block size before, and I didn't need to stop the node. Thanks for the reply though.
Can you please send output of

multichain-cli chainName getinfo
Can't ATM, but I'll log it tomorrow. Thanks for the help.
No problem, but if it shows "version" other than "2.0 beta 1", you have to:

1. Run 'multichain-cli chainName stop'
2. Make sure multichaind is not running
3. Start multichaind
4. Run 'multichain-cli chainName getinfo' again to make sure the version is "2.0 beta 1"

then, you will be able to upgrade to 20006
    "version" : "2.0 beta 1",
    "nodeversion" : 20000201,
    "protocolversion" : 20004,
    "chainname" : "...",
    "description" : "...",
    "protocol" : "multichain",
    "port" : 6297,
    "setupblocks" : 60,
    "nodeaddress" : "...",
    "burnaddress" : "1XXXXXXXACXXXXXXxuXXXXXXYmXXXXXXbD9tkv",
    "incomingpaused" : false,
    "miningpaused" : false,
    "offchainpaused" : false,
    "walletversion" : 60000,
    "balance" : 0,
    "walletdbversion" : 2,
    "reindex" : false,
    "blocks" : 734,
    "timeoffset" : 0,
    "connections" : 4,
    "proxy" : "",
    "difficulty" : 5.96046447753906e-8,
    "testnet" : false,
    "keypoololdest" : 1545037159,
    "keypoolsize" : 2,
    "paytxfee" : 0,
    "relayfee" : 0,
    "errors" : ""
A small note though.

I tried this operation with a new chain and it seems to be working. I just can't seem to be able to do it on my established node.
Can you please retry

multichain-cli chainName createfrom 1.. upgrade protocol_upgrade false '{"protocol-version":20006}

command on the 'established node' returning "version" : "2.0 beta 1" in getinfo
I did, same error
It is very strange. It doesn't makes sense to me because the list of supported protocol versions (10004-10011, 20001-20006) in  
'MultiChain 2.0 beta 1 Daemon (protocol 10004-10011, 20001-20006)'  and in
'Invalid value for protocol version. Valid range: 10004-10011, 20001-20004'

is generated by the same function. So it can happen only if they are created by different versions of multichaind. Can you please:

1. Stop the node. multichain-cli chainName stop
2. Make sure multichaind is not running. ps -ef | grep multichaind
3. Check multichaind version. multichaind -version (should be ...-20006)
4. Start multichaind.  multichaind chainName -daemon. Should have "(latest protocol 20006)" in startup messages
5. Make sure only one instance of multichaind is running. ps -ef | grep multichaind
6. Try to create upgrade. multichain-cli chainName createfrom 1.. upgrade protocol_upgrade false '{"protocol-version":20006}

Please make sure that you see
'Invalid value for protocol version. Valid range: 10004-10011, 20001-20004'

and not some other error
I am still getting the same error, and at this point I'll just continue with a new chain.

But the team should investigate this issue though
Hi, we're still confused how this issue could happen. If you are willing, please stop the node on the problematic blockchain, then zip up the entire blockchain directory and send it to us at multichain dot debug at gmail dot com. We'll then open it here in 2.0 beta 1 and see if we can reproduce the problem.
It was a test chain, so I deleted it once i got frustrated with it. A bad habbit I admit.

I'll ask if any if my coworkers who were peers on the chain still had it. I'll zip and send it.

Thanks for the interest.
Hello again.

First of all, thank you for following up on the issue and for your patience.

Secondly, I am sorry to say that I didn't find the chain in question at any of my coworkers devices, mainly because we are still testing the features of this chain and we usually end up with a lot of chain per day and we sometimes end purging them from time to time.

With that been said, for the sake of posterity, I tried to recreate the issue by creating a chain on alpha 5 with the same parameters and then upgrading it to the latest version. However, the whole thing went without a hitch.

I'd like to apologize for the confusion this ended up as, and if I ever encountered this issue again, I'll make sure to keep the chain this time around.

Thanks @Michael @MultiChain !