Peercoin Proof of Stake Minting Setup Guide


#41

I was running into the same issues on my Mac Mini yesterday. I’ll confirm as soon as I get home, but if memory serves, here’s the change I had to make to get it to work.

My first problem was that I was missing ‘ppcoind’ in the PPcoin-QT directory. Once I made sure that was accessible, I created a file called ‘start.sh’, and added the prompt code.

Once that was set up, I started to run into the same issues you did, until I noticed that the last line, ‘ppcoind walletpassphrase $passphrase 9999999 true’ wasn’t set up to invoke ‘ppcoind’ and pass in the variables. Update it to read:

#!/bin/bash
echo "make sure you've started ppcoin-qt first."
read -s -p "Enter ppcoin wallet passphrase  : " passphrase
echo "starting ppcoind with stake mining enabled"
./ppcoind walletpassphrase $passphrase 9999999 true

and see if that helps.


#42

Thanks for trying to help but I’m probably more confused then ever. Sorry I just don’t see why you wouldn’t just click on the lock on the bottom right on the wallet and enter your password - anyways this is where I’m at:

I have PPcoin-QT and ppcoind in my Applications folder. I start PPcoin-QT so it’s running and I open terminal to: cd /applications and then try running: ./ppcoind walletpassphrase ************* 9999999 true

and I get the following message in terminal: -bash: ./ppcoind: Operation not permitted

We want cryptocoins to be mainstream and it’s really hard to set this stuff up -just an observation.


#43

@Lofty, cany you check the file permissions for ppcoind and let me know what they are set at, please?


#44

says I have Read and Write


#45

I just checked what ppcoind is on my machine ( ‘$ ls -la’ ) and it reports back with ‘-rwxr-xr-x@’, so if you’re still having issues, it may be worth trying this:

‘$ sudo chmod 755 ppcoind’ to see if that makes a difference when you run it.


#46

did what you mentioned - i’m seeing ppcoind now as -rwxr-xr-x@

try running ./ppcoind walletpassphrase ************* 9999999 true again in terminal and still get: -bash: ./ppcoind: Operation not permitted

:-\


#47

I just went back and re-read your earlier posts to see if there was anything that I’d missed and something jumped out at me.

The referenced file, ppcoind, needs to live in the same directory that ppcoin-qt and the start.sh script you created to launch enable PoS mining does. In my case, that’s ~/Library/Application Support/ppcoin

From one of your earlier posts, you mentioned that ppcoind was in your Documents directory (presumably ~/Documents). If that’s true, it would explain why you’re running into a problem.

Am I reading your situation correctly?


#48

It was previously like that. I have both now in the /applications folder. How do you create the start.sh? What I did is open text edit - added:

#!/bin/bash echo "make sure you've started ppcoin-qt first." read -s -p "Enter ppcoin wallet passphrase : " passphrase echo "starting ppcoind with stake mining enabled" ./ppcoind walletpassphrase $passphrase 9999999 true

then save. I then right-click on the file and ‘Get Info’ and change and change the extension so it reads ‘start.sh’ when I go to launch the file it just opens Xcode.


#49

You’re actually really close. Instead of double-clicking on it (which will launch your machine’s IDE of choice, in this case, XCode), you’ll need to call it from bash. From the ~/Library/Application Support/Peercoin directory, and with Ppcoin-QT running:

$ ./start.sh

That will launch the script and your prompt should then read:

$ make sure you've started ppcoin-qt first.
$ Enter ppcoin wallet passphrase: 

Enter your wallet passphrase and ENTER. You’ll next see the “starting ppcoind with stake mining enabled” text and then, if all goes well, in about 10 - 20 seconds, if you hover over the lock icon in the lower-left corner of the PPCoin-QT application, you will see that the text has changed to “Wallet is encrypted and currently unlocked for block minting only.”

That’s it – you’ll need to run start.sh anytime you re-start PPCoin-QT, if you want to enable PoS mining, but it’s not that big of a pain.

Oh, and one other thing, I ran into the issue where I kept getting an error when I had to enter my passphrase. It turns out that ppcoind doesn’t like it when you have special characters or spaces in your passphrase, so if you have anything unique in yours, you may want to replace it with something that isn’t a special character or a space.

Let me know how it goes. :slight_smile:


#50

ok Ben,

It’s getting closer but still not there. I was able to correct start.sh and can run it from terminal - I had to change the permission of start.sh so it’s -rwxr-xr-x@

It runs in terminal and I get:

make sure you've started ppcoin-qt first. Enter ppcoin wallet passphrase :

I enter the passphrase and then I get:

starting ppcoind with stake mining enabled error: You must set rpcpassword=<password> in the configuration file: /Library/Application Support/PPCoin/ppcoin.conf If the file does not exist, create it with owner-readable-only file permissions.

I do have ppcoin.conf in the directory above with the following inside:

server=1 rpcuser=randomname rpcpassword=randompassword

I did have ppcoin-qt running and tried hovering over the lock but it’s still saying ‘locked’

That’s where I’m at for now.


#51

Ah, now we’re getting somewhere.

The error you’re seeing is most likely related to extra metadata hidden on the .conf file (it may be listed as a “.conf” file in the directory, but OSX may think it’s actually a “.txt” file, instead). Give this a try, from the directory where the file is:

$ rm ppcoin.conf
$ touch ppcoin.conf
$ nano ppcoin.conf

This will open up the newly created ppcoin.conf file in the Nano text editor. Add this:

server=1
rpcuser=whateverYouWant
rpcpassword=randomPassword

Once you’ve typed that in, type CONTROL + O to write out the file (no need to change the name, just hit ENTER) and then CONTROL + X to exit the editor.

Shut down PPCoin-QT and restart it, just to make sure it picks up your changes and then run your start.sh script.

fingers crossed


#52

ran the instructions brow and everything appeared to work with now errors.

I opened ppcoin-qt so it’s running then opened terminal and went to cd /application where PPcoin-QT / ppoind and short.sh are located.
ppcoin.conf is located in Library/Application Support/PPCoin

I run ./start.sh

[sup]make sure you’ve started ppcoin-qt first.
Enter ppcoin wallet passphrase[/sup]

end the passphrase and get:

starting ppcoind with stake mining enabled error: You must set rpcpassword=<password> in the configuration file: /Library/Application Support/PPCoin/ppcoin.conf If the file does not exist, create it with owner-readable-only file permissions.

I’m showing the permission of ppcoin.conf as -rw-r–r--


#53

Thinking this one over.

I doubt this is the issue, because it appears to be related to the rpcpassword line in the .conf, but, it’s worth a shot add this to the .conf file:

# Listen for RPC connections on this TCP port for PPCoin:
rpcport=9902

Going through my setup, line by line, to see if there’s anything “special”…


#54

Here’s a possible hint, from https://github.com/bitcoin/bitcoin/pull/798

The error message you are seeing may not be worded correctly, based on what’s really going on. If I understand that pull request, what might be happening is ppcoind doesn’t believe that the password you’re using is secure enough, so it throws up a message.

Because this is on your local machine, you should be able to use any arbitrarily complex password, for instance:

rpcpassword=5fx7malkjljkl11Hladd990

#55

keep trying all sorts of things but still can’t get past the following message after running ./start.sh and entering the passphrase. Message I get is:

starting ppcoind with stake mining enabled error: You must set rpcpassword=<password> in the configuration file: ~/~/Library/Application Support/PPCoin/ppcoin.conf If the file does not exist, create it with owner-readable-only file permissions.

What I have in ppcoin.conf is the following:

server=1
rpcuser=ppcoinrpc
rpcpassword=HXt6c9zmw6jqW4jvh3pcHTGb7owrmNLUtaSVGvoT2Sho
# Listen for RPC connections on this TCP port for PPCoin:
rpcport=9902

permission for ppcoin.conf is set to -rw-r–r--@


#56

I think I see it…

~/~/Library/Application Support/PPCoin/ppcoin.conf

Let me see if I can figure out where that’s coming from


#57

Would you mind providing the output that appears in the terminal, when you run this command from the ~/Library/Application Support/PPcoin directory, please?

$ pwd

That will let us confirm the path that you are in. And then:

$ ls -la

To provide a list of all files in the directory, including hidden ones.

If there is anything personal in any of the file names, feel free to obfuscate it, but if you do so, just do it consistently. If you copied that last error directly from the console, and didn’t manually type it into the comment, I’m stumped as to why the script is referencing the home directory twice. Hopefully, being able to see what’s going on in the PPCoin directory will give us some indication.


#58

after running $pwd I get: /Library/Application Support/PPCoin

then after $ ls -la:

drwxr-xr-x 4 ~~~ admin 136 Nov 15 10:03 .
drwxr-xr-x 24 root admin 816 Nov 15 09:58 …
-rw-r–r--@ 1 ~~~ admin 6148 Nov 15 06:25 .DS_Store
-rw-r–r--@ 1 ~~~ staff 154 Nov 15 10:03 ppcoin.conf

I’ve only covered the name of the machine - not even sure if that matters. Ben do you ever sleep? :wink:


#59

I’m a newbie and OSX user and I’m having a very difficult time setting up the POS minting as well.

I’m in [size=7pt]~/Library/Application Support/PPCoin[/size] and when I run ‘[size=7pt]./ppcoind walletpassphrase ************* 9999999 true[/size]’ I get a message “No such file or directory”. When I run[size=7pt] ls -l ppcoind.conf[/size] it says it’s [size=7pt]-rw-r–r--[/size] so I know it’s there… and when I run [size=7pt] ls -l start.sh[/size] it says [size=7pt]-rw-r–r--@[/size]. When I try to run [size=7pt] ./start.sh[/size] it says “Permission denied” and when I try it with sudo it says “command not found”.
I’m so confused… can anyone help?


#60

@yellowech, I’m putting the kids to sleep, but if you will be around later, I’ll be happy to try to help