MacOS Guide

From Gridcoin
(Redirected from OS X Guide)
Jump to: navigation, search
Grc_universe_logo.png
Mint Decentralised Consensus
Launch Date October 16, 2013
Developed by Rob Halford
Ticker GRC
Plural Gridcoins
Subunit mGRC =0.001
Lowest Unit 0.00000001 = 1 Halford
Operating System Windows, Linux, MacOS
Algorithm Proof-of-Research;

Proof-of-Stake and Proof-of-BOINC hybrid

Current Version 3.7.13.0-Leisure
Release Date June 2, 2018
Blocktime Every 90 seconds
Reward PoS + PoR

App Download

If you are not comfortable compiling your own app from source code, try downloading the Gridcoin DMG installation file hosted on Git Hub. The DMGs are updated automatically with each new revision of gridcoin, so you can find the latest DMG installation files here:

Gridcoin App Download

When the DMG installation file is finished downloading, look in the downloads folder, click on the DMG file and it will open. Then drag the App inside of it, into your Applications folder. Before opening your App insure that you have read the following....

Caveat~ Because you are choosing to download and use an App not found on the App Store, ensure that your system preferences/Security & Privacy/General/ Allow Apps downloaded from: "App Store and identified developers" is selected, or else the Gridcoin app will not run and you will get an error message.

Now that you have the Gridcoin Wallet App, you will need to configure it. The guide for doing this is located here:

Configuration

If you are still having issues getting your App to run, there is a trouble shooting guide here:

Trouble Shooting

The Wallet needs upgrading periodically. The guide for manually upgrading is located here:

Upgrading

Compilation With Homebrew

For building Gridcoin on any OS X operating system, you must have either Xcode tools or Xcode Command Line Tools installed. You can install Xcode tools from the App Store application, or you can install the smaller Command Line Tools for compiling Gridcoin here:

xcode-select --install

This will open an authorization pop up window to install command line tools. Say yes.

The easiest and best way to compile Gridcoin on MacOS is to use the community supported Git-Jiro Homebrew tap.

If you don't have Homebrew installed you can get it from here: Homebrew

Caveat~ Homebrew may not play nicely with other package managers like MacPorts and Fink, so depending on your system, you may have to move or remove them for Homebrew to work in it's default directory.

After installing Homebrew, run these two commands:

   brew update
   brew doctor

Terminal should now say, "Your system is ready to brew".

Jiro's formula will install all dependencies needed to compile and run the Gridcoin Wallet.

1. Tap the Git-Jiro/jiro repository with this command:

   brew tap git-jiro/jiro

2. Install gridcoin with this command:

   brew install gridcoin

(This can take as long as ten minutes to compile on your first go, because Terminal has to download everything. Just be patient, and the Terminal will tell you when it is complete.)

3. Open Finder and navigate to the /usr/local/Cellar/gridcoin folder. There you will see the Gridcoinresearch App. Drag the App to your Applications folder and you are done.

Caveat~ The "/usr/local/Cellar/gridcoin" is a hidden folder. You must make it visible either by Terminal command, shortcut, or application script widget. In MacOS Sierra Apple added a Finder keyboard shortcut that makes it possible to quickly show all the hidden files and folders. You just need to do the following:
Hold down CMD-Shift & . (dot)--All the hidden files will become visible--Hold down CMD-Shift & . (dot) a second time to hide the files again.

Now that you have the Gridcoin Wallet App, you will need to configure it. The Configuration guide for doing this is located immediately below.

Compiling with Auto Tools

The commands in this guide should be executed in a Terminal application. The built-in one is located in /Applications/Utilities/Terminal.app.

Preparation:

Install the MacOS command line tools:

   xcode-select --install

When the popup appears, click Install.

Then install Homebrew as instructed above.

Install Dependencies:

   brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config qt

If you want to build the disk image with make deploy (.dmg optional), you need the RSVG dependency. (to install RSVG)

   brew install librsvg	

To Build Gridcoin:

Clone the Gridcoin source code and cd into Gridcoin-Research directory with:

   git clone https://github.com/gridcoin/Gridcoin-Research
   cd /Gridcoin-Research

"make clean" cleans out previous builds!!!!!! Do this between versions!

   make clean

Configure and build the GUI Wallet with:

   ./autogen.sh && ./configure && make 

When compile is complete, the app is readily visible in the main Gridcoin-Research folder just under the doc file folder. Place the app anyplace you care to run it and enjoy.

It is recommended to build and run the unit tests:

   make check

You can also create a .dmg that contains the optional app bundle:

   make deploy 	

Then for example, place the app to your applications folder and open with:

   open -a /Users/YOUR NAME HERE/Desktop/testnet.app

Gridcoin Configuration

Step One Because you are choosing to download and use an App not found on the App Store, ensure that your system preferences/Security & Privacy/General/ Allow Apps downloaded from: "App Store and identified developers" is selected, or else the Gridcoin app will not run and you will get an error message.

Step Two Open the App, say yes to “Allow Connections” and wait for a popup to enter your Boinc email address.

Step Three Prior to being able to stake or transfer Gridcoin to and from the Gridcoin client you need to fully sync the Gridcoin client to the latest block on the blockchain (green tick under connections indicates a fully synced wallet). It can take days to fully sync like this, but you can speed this process up by manually downloading the Blockchain Snapshot.zip file.
You can then unzip the file and overwrite it's contained files into the "/Users/your name here/Library/Application/Support/GridcoinResearch" directory.

Caveat~ The "/Users/your name here/Library/Application/Support/GridcoinResearch" is a hidden folder. You must make it visible either by Terminal command, shortcut, or application script widget. In MacOS Sierra Apple added a Finder keyboard shortcut that makes it possible to quickly show all the hidden files and folders. You just need to do the following:
Hold down CMD-Shift-. (dot)--All the hidden files will become visible--Hold down CMD-Shift-. (dot) a second time to hide the files again.

Note: The snapshot will not fully sync your client, but will bring you up to 80-90% sync, which will save you a lot of time. Allow your client to manually sync after the snapshot has been implemented, this will take up to several hours. If you are unable to acquire connections to the Gridcoin network, attempt the following:
Restart the wallet.
Investigate whether or not your ISP is blocking the P2P traffic.
Verify that your computer time is synced to your configured time server.
Verify you're running the latest version of the Gridcoin client, as there are frequent updates. Notices of updates are posted regularly above and on Reddit/Twitter/IRC.

Step Four Obtain a small amount (100-200) of GRC. You can buy GRC on an exchange, for USD at https://c-cex.com or by using fiat, BTC, or another altcoin, or you can get a loan from an existing miner/researcher, for example by asking on the forum Stater Coins For Beginners. You can join the IRC chat and ask for some starter coins. Also, you can get a starter package from uscore.net or sip from the faucets at Gridcoin Switzerland Faucet and Gridcoinstats Faucet.

It takes about 24-48 hours to get into the blockchain, and about 16 hours after deposit for incoming GRC to "mature". So keep your App open during this time so that it can download the block chain. Keep your wallet fully unlocked for now. When your coins mature, check for your beacon status by going to the help menu/Debug window/console in you Gridcoin App and send out an "execute beaconstatus" command to see if your beacon is in the Neural Network. If it is not there, perform an "execute advertisebeacon" command. A small transaction will then automatically (0.00011 GRC) leave your wallet. This is your "beacon", which means your wallet can now receive and send Gridcoins.

Step Five Go to Your Account page of each BOINC project or account manager that you work on and join the Gridcoin team. This is necessary so that Gridcoin can verify the work you do for BOINC projects. This can be verified by looking at the Boinc Manager Team window; it will say "Gridcoin". It will take approximately 24 hours for the wallet to receive your team status from Boinc.

Step Six You should now decide to mine solo, in a pool, or investor mode and can learn more about these options on the Gridcoin Home Page. The basic setup steps above will provide you with the default Solo mining option.

If you are having any issues, look in the Trouble Shooting section.

More detailed general operational information can be found at Gridcoin Getting Started.

Trouble Shooting

If you’ve followed all steps and you still aren’t receiving GRC, you can try the following things:

Check that your wallet contains a few coins at least for 16 hours.

Check that you have waited for at least 48 hours to let the BOINC statistics populate.

Check that your wallet is synchronized to the network and updated to the latest version.

Make sure you are in team Gridcoin in all BOINC projects that you wish to be rewarded with Gridcoin.

Quit your wallet app, then reopen it, and check to see if the issue persists. This alone works many times.

Check to make sure that if your wallet has been encrypted, it is fully unlocked, and a "beacon" has been sent.

Make sure at least one project has RAC > 100, which means your Recent Average Credit within BOINC system is at least 100.

In the Gridcoin Wallet, open Help -> Debug Window -> Console. Enter ‘getstakinginfo’. If your wallet has entered the blockchain, you will see ‘staking: true’. If you don’t see this, then your wallet has not been processed by the blockchain.

Enter ‘list cpids’ in the debug console. This will show a list of projects that your CPID is attached to and your RAC. If “CPID Valid” is false, then either you have not joined the Gridcoin team, the BOINC project is not whitelisted, your RAC is too low, or your CPID has not otherwise been connected with your wallet.

Enter ‘list rsa’ in the debug console (Help -> Debug Window -> Console). If everything is working, then below “Payment Window: 14” you should see a list of CPID, Magnitude, Payment Magnitude, Daily Paid/Owed, and others. If nothing appears below Payment Window, then your CPID (from BOINC) has not been incorporated into the Blockchain.

Enter ‘execute beaconstatus’ to see if your beacon is in the Neural Network.

If you are still having issues, visit the MacOS Forum or our Gridcoin Slack channel for help for help.

Upgrading

The App upgrade has to be accomplished manually at this time by either of two methods.

DMG Method: Simply download the updated DMG as instructed above, open it and drag the App into your Applications folder after having closed the active wallet first. Confirm the overwrite, reopen the wallet and you are done.

Compilation Method: Close the active wallet and delete it from your Applications folder. This only deletes the App, but all of your files in the hidden "/Users/your name here/Library/Application/Support/GridcoinResearch" folder are safe and will not be deleted.

Then go to the hidden folder "/usr/local/Cellar/gridcoin" and delete any previous compiles from this folder, because Terminal will not overwrite anything left in this folder using the above instructions.

Next, simply recompile using this command:

brew install gridcoin

NOTE: Jiro's formula will update brew for you and take care of other housekeeping items.

Optional:

If you do not wish to delete your previous compiles from the "/usr/local/Cellar/gridcoin" folder, you can use this command to put the App into it's own version specific folder inside of the "/usr/local/Cellar/gridcoin" folder:

brew update gridcoin

Known Issues

1. Homebrew may not play nicely with other package managers like MacPorts and Fink, so depending on your system, you may have to move or remove them for Homebrew to work in it's default directory.

Using Testnet

After gaining some experience with Gridcoin, you may wish to test pre-production versions of the wallet. Gridcoin needs testers, so feel free to participate in helping to make Gridcoin better. This is an advanced guide on how to set-up and run testnet specifically on MacOS. You can communicate and collaborate with other testnet users on the Gridcoin Dev channel of Slack, so you should install it now if you have not done so already. You will need to post your Boinc email on one of our forums with a request to be invited to join the Gridcoin Slack channel. Once joining, you should also join the Slack #testnet channel.

Don't use same application for prod and testnet. Use two different compiled applications (testnet and production) in two different directory locations of your choice. Never run the testnet app in production. The production application should always be master release and testnet is from the latest developement or staging branch commit as directed on Slack #development channel.

To run testnet alone:

Compile the the testnet app using the method located at: MacOS Build

Then using Terminal, go to the directory Gridcoin-Research was installed in, and open the unix executable file with these commands:

./src/qt/gridcoinresearch -printtoconsole -debug=true -testnet (If you used the "make" command to compile.)

If you used the "make deploy" commond option to make an app, use this command to open the the app in testate mode:

open -a /the/path/to/your/app/gridcoinresearch.app --args -testnet (Clicking on the App normally, will not open testnet mode)

This will automatically create the /Users/your_name_here/Library/Application/Support/GridcoinResearch/testnet directory and all required files in it. As the wallet opens, put your Boinc email into the prompt if desired. Then make sure the wallet says "Gridcoin Wallet [testnet]" at the top to make sure it will download testnet blocks. You need to ask @brod on Slck to send you a testnet block.data bootstrap file to actually start syncing the wallet.

The block file is small and it presently takes about two hours to sync up. In the testnet directory located under "~Library/Application Support/gridcoinresearch" open the gridcoinresearch.conf file and remove the default lines and replace with:

testnet=1
cpumining=true
email=place your bionic email address here.
addnode=test.grcpool.com
addnode=147.229.194.58
addnode=testnet.grcnode.co.uk
addnode=testnet.dihelix.com
addnode=ormgas.com
org=your Slack handle name here.

After the wallet is synced-up, ask someone on Slack Dev channel to give you some testnet coins. Wait for the coins to arrive, then "execute advertisebeacon" in the wallet console to make a new beacon. Then ask "brod" (on Slack Dev channel) to add your cpid to the testnet superblock.

To run testnet simultaneously with production wallet on same computer:

You can run both testnet and production GridcoinResearch applications simultaneously on the same computer if you wish and they will not conflict, because they use different ports, directories, wallets, and blockchain files. To run production wallet, you just click and open the GrodcoinResearch.App normally along side the testnet version.

While using testnet, you can expect ERRORS. This is normal, and part of the testing process. Share your findings with others on Slack Developement channel to help work out the bugs.

~Happy testing.