Recommended update v0.13.4.0
We are pleased to announce the release of Crown v0.13.4.0. This is a recommended update.
Although you can continue to run v0.13.2, unless you have already taken steps to mitigate the increased RAM and CPU usage, you almost certainly will hit problems further down the line. We recommend everyone update at their earliest convenience.
What does it include?
It was originally planned to include three fixes but actually includes four and some enhancements:
- The long awaited fix to the v0.13 sync problem.
Following the v0.13 update, a number of users experienced very severe performance problems with syncing the blockchain. A number of workarounds were published, which successfully circumvented the problem for most of those users. Others continued to experience unacceptably slow syncing. Ashot and presstab have worked hard to identify and resolve the issue.
With the new update, everyone with a part-way decent internet connection should be able to complete a full sync in less than 4 hours.
- Incorrect display of rewards on the wallet summary screen.
Rewards were showing as mature (available to spend and stake) before they actually were.
Fresh masternode and systemnode rewards, and staking rewards now show as “Immature” in the wallet summary screen until they receive the required 100 confirmations.
- Address labels.
Ashot has worked his magic in the wallet and old labels display correctly with no intervention from the user.
- CPU and memory usage.
It became apparent during development that there was a bigger and more pressing problem than any of the preceding three. Nodes and wallets were using much more RAM and CPU than in v0.12.5.3. Depending on the hardware they were running on, nodes could exhaust the available RAM and crash themselves or even the VPS after a couple of days. Painstaking research showed the increase to be related to code hardening against one of the PoS attack vectors. Presstab reworked the code so that it still provides the same protection but at much lower resource cost.
- Installer enhancements.
While waiting for the code fixes in v0.13.4 a number of workarounds for the sync and resource usage were deployed. Although they should no longer be required it was thought beneficial to provide easy access to them through the installation/update script. So the script now includes options to add the watchdog script to a new or existing node, to sync a node or wallet using the bootstrap, and to install a pipeline build.
I’m sold, how do I upgrade?
As always, the new release is a drop-in replacement. Essentially, make a backup of your wallet.dat, shutdown your wallet and node(s), replace the executables and restart. The details vary from platform to platform and environment.
If you use a hosted masternode/systemnode service they should take care of the node update for you. Since this is not a mandatory update you might need to ask them, but given the resource savings to be made by upgrading it’s likely they’ll be way ahead of you! You can update your node(s) before or after your wallet; the order is unimportant.
Restart the wallet and it should prompt you to download the update.
Self hosted node (linux) or a wallet
If you are already using the watchdog script you should disable it before upgrading (otherwise it could restart the node at an inopportune moment). See below.
If you’re not interested in the watchdog and bootstrap simply use the one-liner to update a masternode or systemnode. Log on to your server and run
sudo apt-get install curl -y && curl -s https://raw.githubusercontent.com/Crowndev/crowncoin/master/scripts/crown-server-install.sh | bash -s
The network protocol version has not changed so it isn’t necessary to issue start-alias commands for masternodes or systemnodes if you have already upgraded to v0.13.2.0
What about the watchdog and bootstrap thingies?
The installation/update script has new options which could still be useful in certain circumstances. If you want to take advantage of them, we recommend you download the latest version of the script and run it directly (doing so gives you the most flexibility, but if that sounds too complicated see below).
Download the installer
You can use curl or wget. The following example uses curl. Put the installer somewhere in your path (/usr/local/bin is recommended) and make sure it is executable.
sudo curl -o /usr/local/bin/crown-server-install.sh https://raw.githubusercontent.com/Crowndev/crowncoin/master/scripts/crown-server-install.shsudo chmod +x /usr/local/bin/crown-server-install.sh
The watchdog as originally published ran every 15 minutes and did two things:
- Check if crownd is running, start if it is isn’t.
- Check free memory and restart crownd if it is “too low”.
If you are already using the watchdog it won’t do any harm to continue running it after the upgrade, but you should disable the cron entry for the duration of the upgrade. Use the command
and comment out the watchdog entry by putting a hash sign (#) at the start of the line. Uncomment the line (by removing the hash sign) after upgrading.
The watchdog could still be useful after the upgrade. It is very unlikely you would need the memory checking. However, making sure your node is running every 15 minutes isn’t a bad thing (but don’t use the watchdog in conjunction with systemd or any other automatic process starter/monitoring system).
The installer has a new option, -w followed by a number 1 or 2 which corresponds exactly with the two actions described above. If you want to add the watchdog to an existing instance at the same time as upgrading then the command to use is
crown-server-install.sh -w 1
or, if you want to use the free memory checking as well
crown-server-install.sh -w 2
Syncing performance in the v0.13.4 update is vastly improved. Pretty much everyone should be able to sync a new node across the network, from scratch, in less than four hours. With a good internet connection, we saw several such syncs complete in less than two hours during testing.
There may still be times when syncing with the bootstrap is useful so the installer now has the option to use it. Most VPSs have a good internet connection but your local connection may not be as fast or reliable. We anticipate some wallet installations might benefit from syncing with the bootstrap, which can be done using the -b option. For example
crown-server-install.sh -c -b
The -c option indicates this is a new wallet installation (-w is already used for the watchdog). This example will ensure your system is updated, download the release package and the latest bootstrap, create swap space if you don’t have any, write a new crown.conf, update your firewall, install the release package, unzip the bootstrap into the datadir and start the daemon.
wait, there’s more!
Unless told otherwise the installer will fetch the latest release package from our Github mirror. There may be times when you want to use some other version, specifically a test version from a Gitlab pipeline build. A number of community members helped test this version before release and we’re grateful for their assistance. If you’d like to get involved and help with testing in future please get in touch via the #contributor-general channel in Discord.
Use the -j option to specify a pipeline build to install or update to. For example
crown-server-install.sh -j 6114
The installer has a number of other options. They are mostly additive although there are some mutually exclusive combinations (for instance you can’t specify both -m for a masternode and -s for a systemnode in a single invocation). You could combine all the options we’ve seen so far here, like
crown-server-install.sh -j 6114 -c -b -w 1
to install a pipeline build as a wallet, sync with the bootstrap and enable the watchdog (level 1).
We plan to publish another article soon describing the installer in more detail.
Thank you to everyone who has upgraded to v0.13.2 for your patience while we dealt with the glitches and performance issues. We recommend you update at your earliest convenience.
There are still a number of v0.12.5.x nodes and wallets which have not upgraded. Although the node count is down about 20% the network hasn’t really missed them but they have been missing out on both node rewards and staking rewards. We hope these fixes will encourage their owners to upgrade those nodes and rejoin the network.