Peercoin v0.4.0 Release for OS X

Announcing the reference release of Peercoin-Qt.app (v0.4.0), for OS X.

PPCoin-Qt-v0_4_0.dmg
MD5: 38451f4f73c38e1292d102dedad7c0d0

ppcoind-0.4.0-macosx.zip
SHA-256 (ppcoind): 5bd91f8c5f0a8bd3fa65cf22f298fad327f930e62771a77cd7a491789e84f312

Release Notes

[ul][li]The current :master branch of the ppcoin/ppcoin source code requires a few files to be updated for the application to be built correctly. Those updates were included in a pull request that Bitpar submitted, which, as of 05-05-2014, has not been merged with the main repo. I personally compiled this distribution using those changes.[/li]
[li]The distribution is still called “PPCoin-Qt.app”, as that is what the official release uses.[/li]
[li]The distribution has been tested on OS X 10.8.5 (Mountain Lion) and 10.9 (Mavericks). It has been built to support any version of 64-bit version of OS X, which includes 10.6 through 10.9. 32-bit support has been discontinued.[/li][/ul]

OPTION 1 (updated 06-MAY-2014):

If the last time you ran your PPCoin-Qt.app client or ppcoind daemon on your Mac was BEFORE 05-MAY-2014, you should not have to re-download the block chain or follow the instructions below. To update from v0.3 to v0.4.0, do the following:

[ol][li]For one last time, launch PPCoin-Qt.app (v0.3). Once it is running, from the file menu, select “File” > “Backup Wallet”, and pick a location to store the backup.[/li]
[li]After the backup has been made, close the application. You are now ready to replace it with the new version.[/li]
[li]In your Applications folder, locate PPCoin-Qt.app (v0.3). Drag the application outside of the Applications folder (or, use right-click, “Move to Trash”)[/li]
[li]Open the v0.4 .dmg that you downloaded from the link above.[/li]
[li]In the folder that opens up when you launch the .dmg, drag the application, PPCoin-Qt.app into the “Applications” shortcut. This will copy the application to your hard drive.[/li]
[li]Launch PPCoin-Qt.app from your Applications folder (any dock icons you have are going to point at the old v0.3 version, so they will need to be removed and replaced). The network will synchronize with any changes to the block chain since you last had the application open. After that, you will be set up on v0.4.0, and won’t need to do anything else.[/li][/ol]

OPTION 2:
If the last time you ran your PPCoin-Qt.app client or ppcoind daemon on your Mac was AFTER 05-MAY-2014, you will have to re-download the block chain or follow the instructions below.

Because this release came after the protocol switch from v0.3.1 to v0.4.0, if you previously ran PPCoin-Qt.app on your Mac, you will need to re-download and synchronize with the Peercoin block chain. I’d like to make this as easy as possible for people, but at the same time, do everything I can to ensure that you don’t run into any problems. The most straight-forward way to do this is using the command line, which may make you nervous, but I will walk you through every step. I’ll consider if it makes sense to pull together script that can run these steps automatically, but until then, here are the instructions.

First, a disclaimer…

THE WALLET.DAT FILE CONTAINS THE PRIVATE KEYS THAT LINK PEERCOINS IN THE BLOCK CHAIN TO YOUR PERSONAL WALLET – FAILURE TO PRESERVE THEM WILL RESULT IN A LOSS OF THE ABILITY TO CLAIM OWNERSHIP.

Take care while conducting the next steps, and if you have any questions at all, please don’t hesitate to ask – I’d rather have 100’s of questions posted, than to have one of you run into any problems with these instructions.

Note: It’s easiest if you copy/paste the lines, rather than typing them, because there may be spaces or characters present that you do not notice.

  1. If the previous version of PPCoin-Qt.app is running, shut it down (which it shouldn’t be, but just in case…)

  2. Launch Terminal.app (Applications > Utilities > Terminal)

  3. From the command line, you’ll need to first navigate to the hidden folder that contains all of the relevant Peercoin files (block chain database, block index, wallet.dat, etc.) Enter this command to change your directory to “PPCoin”:

cd ~/Library/Application\ Support/PPCoin/

Press ENTER. You can confirm that you are in the right place by looking at the command line prompt. If you are, you’ll see something like:

mac:PPCoin your-username$

Alternatively, you can list the directory contents with the ls command. If you haven’t made previous modifications to the folder, you should see this displayed after you run the command (depending on how long you have had your Peercoin wallet, you may see multiple versions of the block data files (blk0001.dat, blk0002.dat, etc.):

ls
addr.dat           blkindex.dat     db.log     wallet.dat
blk0001.dat     database          debug.log

Note; If you have a file called [font=courier]ppcoin.conf[/font], include it in the next step when you duplicate the files.

  1. Just to be safe, you’ll next want to back up your [font=courier]wallet.dat[/font] and [font=courier]addr.dat[/font] files. The steps you will do after this won’t touch those files, but it’s a good idea to keep them backed up before you make any modifications to the directory, just to be extra cautious. We’ll first create a new folder on your desktop and then move a copy of the two files into it.
mkdir ~/Desktop/DuplicatedPPCFiles
cp wallet.dat ~/Desktop/DuplicatedPPCFiles/wallet.dat
cp addr.dat ~/Desktop/DuplicatedPPCFiles/addr.dat
  1. Check on your desktop to make sure that the “DuplicatedPPCFiles” directory has been created and that the duplicates of wallet.dat and addr.dat are in there. Once you’ve confirmed that they are, move on to the next step.

  2. It’s now time to remove the block chain database and index. Run this command to remove all of the files that start with “blk” (the ones we want to remove):

rm blk*
  1. And that’s it. You can now open up the .dmg that is linked above, and copy PPCoin-Qt into the Applications folder alias in the disk image. This will overwrite your v0.3 version of PPCoin-Qt.app with the new v0.4 version. Once that’s finished, launch PPCoin-Qt.app and your client will synchronize with the block chain, and begin to re-download it. Don’t be concerned if the wallet balance shows “0.00 PPC” for a while – you’re going to need to catch up with the block chain before your transactions start to appear, as their containing blocks are processed.

The last four times that I tried this, to confirm that the process was working correctly, it took about 35 minutes to fully download and synchronize the Peercoin block chain, though your times may vary depending on your network speed and processor.

  1. You can confirm that you are running the correct version of the software by selecting Help > Debug window from the menu bar. For the client version, you should see “v0.4.0ppc-3-gc4b38a3-beta” listed.

Once that’s done, you’re back to where you were before the protocol switch. No changes will have been made to your wallet files, so your existing pass phrase is still the same if you’ve encrypted your wallet. You can either retain the backups of the wallet.dat and addr.dat files you made, or delete them, though I’d recommend maintaining them until you’re sure that you didn’t experience anything out of the ordinary.

Thank you all for your patience, and hopefully that’s the last time that we run into a situation where the OS X build isn’t ready at the same time that the Linux and Windows versions are.

Please don’t hesitate to let me know if you have any questions or concerns, or if you experience any problems using the distribution.

I’ll be producing versions of Peerunity (beta for v0.1) and Peershares (alpha) for OS X within the next day. They will be included in their own topics and posted here on PeercoinTalk.org as soon as they are ready.

Guys, please let us know if this is working for you.

Thanks for the good work!

One comment:

It is highly recommended to use UI menu dialog to backup wallet, before performing upgrade. Copying wallet.dat file is not a 100% safe backup.

[quote=“Sunny King, post:4, topic:2319”]Thanks for the good work!

One comment:

It is highly recommended to use UI menu dialog to backup wallet, before performing upgrade. Copying wallet.dat file is not a 100% safe backup.[/quote]

I agree, but given the conflicting concerns (rare case of a corrupted file, for a backup that should not even be needed vs. starting the v0.3 client after the protocol switch to use the GUI backup), the manual duplication appeared to have less risk.

If this isn’t the case, and there is a reason to update the instructions, I’ll be happy to.

v0.3 blockchain fork is about 20 days away. It’s okay to start old client for backup before upgrade, at least for another two more weeks.

Another thing to note is to make sure v0.3 client is uninstalled/removed from the system during the upgrade. If both v0.3 and v0.4 are present on the system, accidentally running the old client would corrupt the local transaction db.

Thanks. The client works fine for me (so far), but I am having a problem with your build of ppcoind.

with the command

./ppcoind walletpassphrase “$passphrase” 9999999 true

I get the error

dyld: Library not loaded: /opt/local/lib/db48/libdb_cxx-4.8.dylib
Referenced from: /Users/lunokhod/Library/Application Support/PPCoin/ppcoind
Reason: image not found
Trace/BPT trap

Any ideas?

Yes, that’s a statically linked resource issue. It looks like I grabbed the locally compiled versus static version. I’ll get that fixed and replaced.

Thank you for the heads up.

[quote=“Sunny King, post:6, topic:2319”]v0.3 blockchain fork is about 20 days away. It’s okay to start old client for backup before upgrade, at least for another two more weeks.

Another thing to note is to make sure v0.3 client is uninstalled/removed from the system during the upgrade. If both v0.3 and v0.4 are present on the system, accidentally running the old client would corrupt the local transaction db.[/quote]

Sunny, in that case, if the protocol-forced fork has not occurred, is there a reason that the block chain re-synchronization needs to occur (prior to that date)? I’ve heard form some people that they were just able to remove their v0.3 client binary and install the v0.4, without purging their block chain index or database, and functions appear to be working fine (new client, block height is correct, new blocks are appearing).

[quote=“lunokhod, post:7, topic:2319”]Thanks. The client works fine for me (so far), but I am having a problem with your build of ppcoind.

with the command

./ppcoind walletpassphrase “$passphrase” 9999999 true

I get the error

dyld: Library not loaded: /opt/local/lib/db48/libdb_cxx-4.8.dylib
Referenced from: /Users/lunokhod/Library/Application Support/PPCoin/ppcoind
Reason: image not found
Trace/BPT trap

Any ideas?[/quote]

@lunokhod : I’ve recompiled ppcoind and ran the command to statically link the Berkeley database .dylib. The file has been replaced in the OP link, and the MD5 hash updated to reflect the change. Could you please try it again and let me know if that works for you? Thank you!

[quote=“Ben, post:10, topic:2319”][quote=“lunokhod, post:7, topic:2319”]Thanks. The client works fine for me (so far), but I am having a problem with your build of ppcoind.

with the command

./ppcoind walletpassphrase “$passphrase” 9999999 true

I get the error

dyld: Library not loaded: /opt/local/lib/db48/libdb_cxx-4.8.dylib
Referenced from: /Users/lunokhod/Library/Application Support/PPCoin/ppcoind
Reason: image not found
Trace/BPT trap

Any ideas?[/quote]

@lunokhod : I’ve recompiled ppcoind and ran the command to statically link the Berkeley database .dylib. The file has been replaced in the OP link, and the MD5 hash updated to reflect the change. Could you please try it again and let me know if that works for you? Thank you![/quote]
Now I get the error…

dyld: Library not loaded: @executable_path/…/Frameworks/libdb_cxx-4.8.dylib
Referenced from: /Users/lunokhod/Library/Application Support/PPCoin/./ppcoind
Reason: image not found

I’ll try to recreate on a clean environment. What version of OS X are you running?

10.9.2

on maverick, confirmed that PPCoin-Qt works,

ppcoind doesn’t, and got the same error as lunokhod

I’ll wait to announce on Facebook until you get these errors sorted out.

I believed that I had shut down my client before the deadline.

I did Option 1.

I installed and launched the client. All my coins are there. It synced fine.

But it says at the bottom: “WARNING: Blockchain redownload required approaching or past v0.4 upgrade deadline.”

What’s that mean?

[quote=“Blackbird, post:16, topic:2319”]I believed that I had shut down my client before the deadline.

I did Option 1.

I installed and launched the client. All my coins are there. It synced fine.

But it says at the bottom: “WARNING: Blockchain redownload required approaching or past v0.4 upgrade deadline.”

What’s that mean?[/quote]

Blackbird, if you look at the block height (file menu > debug window), what does it say there?

[quote=“Ben, post:17, topic:2319”][quote=“Blackbird, post:16, topic:2319”]I believed that I had shut down my client before the deadline.

I did Option 1.

I installed and launched the client. All my coins are there. It synced fine.

But it says at the bottom: “WARNING: Blockchain redownload required approaching or past v0.4 upgrade deadline.”

What’s that mean?[/quote]

Blackbird, if you look at the block height (file menu > debug window), what does it say there?[/quote]

“Block height?” You mean the current block? 110542.

[quote=“Ben, post:9, topic:2319”][quote=“Sunny King, post:6, topic:2319”]v0.3 blockchain fork is about 20 days away. It’s okay to start old client for backup before upgrade, at least for another two more weeks.

Another thing to note is to make sure v0.3 client is uninstalled/removed from the system during the upgrade. If both v0.3 and v0.4 are present on the system, accidentally running the old client would corrupt the local transaction db.[/quote]

Sunny, in that case, if the protocol-forced fork has not occurred, is there a reason that the block chain re-synchronization needs to occur (prior to that date)? I’ve heard form some people that they were just able to remove their v0.3 client binary and install the v0.4, without purging their block chain index or database, and functions appear to be working fine (new client, block height is correct, new blocks are appearing).[/quote]

Yes if a normal upgrade done at least 1 day before the protocol switch on May 5th, it’s a supported upgrade mode without the need to redownload blockchain. However if upgrade is late, an error message would say requiring blockchain redownload. In this case, the new client should be running in safe mode, it’s still on the same blockchain with main network, but the node’s block index could be already different from the main network, and would stop working with main network within 20 days.

[quote=“Blackbird, post:16, topic:2319”]I believed that I had shut down my client before the deadline.

I did Option 1.

I installed and launched the client. All my coins are there. It synced fine.

But it says at the bottom: “WARNING: Blockchain redownload required approaching or past v0.4 upgrade deadline.”

What’s that mean?[/quote]

That means you must perform blockchain redownload. Instructions provided by Ben in this thread and also my original v0.4 release thread (bottom of original post): http://www.peercointalk.org/index.php?topic=2473.msg20620#msg20620