Captain’s Log 014 – Let’s Git Real!

download.pngI cannot tell you how many times that I have build rippled from scratch making the howto in my last post; Rippled Developer Setup Guide. Also while testing the XRPine I kept thinking about how nice it would be to have the software install automated without using yum. In true CoinTrek tradition, I set out to learn how to make an installer script, and I am using it as a reason to make my first GitHub repository to share with others. Fair warning, it’s a work in progress, but I’m committed to progress! 😉

I decided that I make the tools that I want to use and share those back to the community, and I will be doing it here:

https://github.com/cointrek

cointrek-github.PNG

I want to take some time to emphasize something I feel very strongly about; Learning! We live in a time where everything is at our finger tips. Google, while convenient and vast, has turned our minds into query generators and many have forgone critical thinking. I admit that I am among those that use the Google Machine on a daily basis, but when it comes to solving problems I limit my use of searching for an answer.  True, what you’re trying to do may have been done by others already. Also true that you may not even have to go through the same process. I love automation! There are so many ways to skin a cat, especially with software.  My point is. If you’re a CoinTrekkie, the journey is what matters.  The Learning Journey! That’s part of why I named my blog what it is. I wanted to learn crypto in and out and it’s a trip to be sure!

Here what I’ve learned how to do this week…

Codius

I am aligning my interests with XRP, so I used my skills to create a Research how to and deploy Codius server! I do want to express thanks for tips I received. I put 20 XRP from previous tips given to me toward a new wallet I could use for the server.  I felt a separate wallet would give me peace.

https://codius.cointrek.voyage/version

In my last post I used a Virtual Private Server on purpose.  I could have used it to stand up a validator, but I decided I’d rather set up a Codius Server.  I wanted to be on the bleeding edge of what XRP is capable.  Also, my validator interests are in making my little XRPine the best it can be.

I followed Stefan Thomas’s How To Guide to the letter. And I failed. My codius server didn’t work at all! The guide was pretty exact but there are a couple pitfalls you might find yourself in, so I want to point them out here.

Domain Verification

The guide makes use of a certbot that communicates with an external verification authority.  Domain verification is a process by which a domain owner proves that the host they are using is in their control.

certbot.PNG

These instructions work just fine but with one exception, which is Patience! The internet takes time to filter changes throughout itself. So, when you add a TXT record to your DNS settings for your domain. Wait a minute before you hit ENTER! I’m serious. If you do this too many times you’ll get locked out and have to wait an hour. Actually five failed attempts equate to being locked out. More and you could get shutdown for a week.

I thought of this afterward, one might change their subdomain from xyz.host.com to abc.host.com and get around the lock out, but I didn’t bother.

Host Info

After verification I followed the remaining steps and was able to view the sucess indicator. Here’s what it should appear to be:

success.PNG

Immediately I took my browser to https://codiushosts.com/hosts and searched for my hostname. It wasn’t there. More over I couldn’t figure out why.  Using their Gitter Chat Room, I was able to work out with another community member how to tell what was the issue.

Little did I know that the host info can be seen with the browser.

https://codius.cointrek.voyage/info

In the print out I had:

  • “uri”:”https://local.codius.com:3000″ instead of
  • “uri”:”https://codius.cointrek.voyage”

This ladies and gentleman is why you should be wary of copy and paste! A simple fix, but I made it and my server appeared on the hosts website.

 Along the way I found many resources that are useful on XRPChat.

  • Spreadsheet to compute earnings/profits for running a coidus server; here.
  • A YouTube video I am going to be using to make a smart contract of my own in the future; here!

Moving Forward I am calling every member of the community to contribute in some way.  Lightning struck me and I realized I should be doing it with hardware and software because that’s what I’m good at. I would like to find out if there is support with in the community to incentive this.  I’d like to create a website to serve as a common location for members to point out their work.  A sort of XRP GitHub but broader because not all of us are software junkies.  I’m not a seasoned webdev, so if anybody wants to help or if there’s interest, please write me!

Captain’s Log 012 – XRPine Performance

The stats on the XRPine are in!

Captain’s Log 012 – Supplemental

Starting off. Wow! I had no idea my home project would receive so much support and attention. Thank you to everyone for the kind words, sharing thoughts, and questions. I am truly humbled and I will do my best to answer them. This community is awesome!

 I have been asked by the community to share some resources usage statistics of the XRPine whilst running a validator. The machine has been running solid over two days without a reboot. I have been impressed to say the least that this little XRPine has some fight in it!

Here is how the validator has done since I started it up. If you go and look at other validators you’ll see each with 20+ thousand validations. I’d say around 9-10,000validations in one day isn’t half bad for the XRPine! The validations are however, mostly disagreements. These are validations that did not pass consensus. Also, you’ll notice Monday the 25th had notably less total validations than the day before. The reason there’s only 20 validations on the first day is because I got it working right before the new day rolled over.

To review, the Pine/Rock64 has:

  • An RK3328 Quad-core ARM Cortex A53 64-Bit processor; Datasheet.
  • 4GB of LPDDR3 1600MHz memory. (The LP just means low power)

What sort of statistics would be worth gathering for load analysis? The obvious are CPU usage and Memory usage so I’ll share that information.I shall note that I am operating the validator with [node_size] tiny in the configuration file. I left the XRPine running for a day solid in this configuration before pulling stats. There was one day, I thought I’d try and run the XRPine with [node_size] small in the configuration file, but it was too much for it so I went back to tiny. I had a feeling that would happen, but I wanted to try it out anyway.

The following are methods of collecting usage information and screenshots of what i have:

 Method 1

iostat – You can view the manual page for it here. Will give me average cpu utilization and other statistics. I did mine every 5 seconds randomly.

Command: iostat -m -p sdb 5

Output:

Averages:

  • User: 61.064 %
  • System: 10.648%
  • IOWait: 16.908%
  • Idle: 11.312%

Conclusions: The user percentage indicates that the rippled service, which is all I have running at the user leve, takes up the very bulk of the entire machine’s computing power. Also worth noting, the IOWait time is not so good, but I think it’s not so bad for what the machine is.

To explain, the machine is taking a lot of time to both call up information and write information to SD card that serves as the hard disk. I am going to have to play around with it and try to improve this number. I’d love to try and make this work with a solid state drive attached!

Method 2

htop – Nicer version of “top”. Shows me memory usage and overall CPU usage.

Command: htop

Overall memory usage is reported at 87.0%. I am intrigued because some people have reported that their Virtual Machines with 8GB have memory usage all the way at maximum. Overall CPU utilization at this snapshot was ~190% across 4 cores. However, I’ve seen it up to ~340%. The CPU utilization fluctuates back and forth. I’m closely monitoring the memory usage to determine if it increases to the maximum amount over time.

Conclusions. It works! And there is room for improvement. I am personally surprised the machine isn’t overtaxed and barely running, but these are the numbers I’m getting as of this moment. I recognize I have a lot of work left to do with this project. Some have asked that I share it. For now, since it’s in its infancy I want to continue working on it to improve its performance as best I can before turning it lose. I am happy to take suggestions for things to check from people to help improve it.  For the future, as I make adjustments and improve the performance I intend to write about my progress.

I will be submitting a poll to the community to see what the interest is in using the XRPine and determining how best to release it for others to use. Some of us are technical people and want to tinker like myself, while others may just want something to plug into a router and walk away from.

Second star to the right; Warp 8!

Captain’s Log 011 – Introducing the XRPine

Warp field of focus: Primary & Secondary – Achievement

So I did a thing…

As a part of playing to my strengths I decided to act on my curiosity. Validators. With XRP, all the coins are pre-mined and distributed at the time the public ledger goes live. The technology is still the same; blockchain. Instead of miners there are validators. A number of computers run the “rippled” software server. This software is publically available on GitHub. Anybody can download it and run the software. It’s like mining without getting paid, but you do it because it’s for a good cause.

There are very few people running a ripple validator in the world as opposed to those mining for a sliver of Bitcoin these days. Anybody can verify this looking at the validator list on Ripple’s website; here. Naturally, I wanted to be involved. I found @WiesteWind’s article for setting up a validator on a Virtual Private Server (VPS). He did a great job telling one how to set up a validator using a docker image but I didn’t want to pay for a VPS. That left me with my rig at home and, honestly, I mine with it so I didn’t want the thing to be overtaxed with tasks.

I was short on machines to operate one of these things. Combined with my aversion to spending loads of money or subscribing to services I thought about other options. Necessity is the mother of all innovation. I did, however, have a little nugget of hardware lying around known as a Raspberry Pi 3. The lights in my head were going off. Why don’t I make this little guy run a validator.

To the google machine! I went and looked on the interwebs to see if anybody had set this up for a Raspberry Pi already. I found a thread on XRP chat that indicated otherwise. There had been attempts by some community members to give this a whirl but there was no success. You can read this thread here. I looked around. Trying to find if others had found success but I came up empty. I was encouraged, however, because David Schwartz, @JoelKatz, himself wrote in on the chat forum that running a validator on a Raspberry Pi 3 should be possible.

So, I set out to make it happen. Immediately I hit some walls. There are instructions for building the rippled software online and I was following it. The Raspberry Pi 3 only has 1GB of RAM and there are only 32-Bit Operating Systems for it. Finding a 64-bit OS for a Pi is possible but at the moment, very difficult to deploy. I figured I’d try it out anyway wit ha 32-bit OS. After waiting half a day for boost to build on the platform I got excited, copied the rippled software to the machine and proceeded to build that. No sooner than executing the command. Halted! The rippled software only builds on a 64-bit machine. There went my plan.

Many days of research later, I came across a suitable single board computer that had larger amounts of RAM, was physically similar in size to a Raspberry Pi 3, and most importantly had a 64-bit operating system too! And the best part is the machine didn’t cost an arm and a leg, since it was close to the price of a Pi. I found the Pine 64 website that sold the Rock64 computer. The highlights are the machine had 4GB of RAM and has a 64-bit processor to run with a 64-bit OS that was easily available. Nice! So, I bought one and patiently waited.

Here are the specs:

If you want to check out the board, you can find it here.

Repeating my previous progress I built boost, download the rippled software, and this time I was able to build it. Turns out that was half the battle. From there, I had to turn the executable program into a linux service and create myself some keys. I might write another post in the future with all the nitty gritty details, but the point is I was able to complete them and configure the software to operate sucessfully.

All rippled servers acting as validators have a public key to identify it. You configure your validator by generating one with the key generator tool that ripple also makes available. However, that is still not the entire solution. If you set your validator loose at the point then it is considered unverified. The validator is still validating transactions on the public ledger but other verified validators might not use it for consensus. I went through a process to have it validated. Ripple requires that you prove the machine running the validator is in your control by requiring your public domain be signed against your public facing validator key. Mine is as of yet, unverified but is currently under consideration. I generated the appropriate key signatures and submitted an online form to Ripple.

Until then, my validator remains unverified but is still chugging away at transactions. Here’s my validator online:

I remember watching the film Armageddon. Yes, the one where an asteroid is about to impact earth and a team of deep water oil drillers led by Bruce Willis goes into space to blow it up. I love that movie just because it’s fun to watch. When the big asteroid is found, the discoverer gives it a name. So, I want to give my creation a name as well. I call this the XRPine! And, for the record, my wife is not a life sucking bitch named dotty. She is an amazing woman equal to any man that can write a line a code!

In lieu of the XRPine I am also revealing my new domain name. I had to get one to get my validator verified:

cointrek.voyage

The domain simply points to my blog. I thought voyage was a good ending to the dot because it fit so well. CoinTrek is inspired by Star Trek and we’re all on a voyage anyway so I took it!

That’s not all. I asked a good friend of mine help me make up a case for the XRPine with a 3d printer. I thought the new XRP logo was fitting and of course blue made the most sense. I am grateful to him for his help.

IMG-0154.jpeg

Check this case out my YouTube channel

This creation is still in its earliest stage, but my intent is to make these available to the community so those who want to run a validator with a minimal footprint may do so. Parts of this are specific to the person deploying the validator; the keys to the validator are secret and so is a domain name. Therefore I cannot make one fully configured since I would know the keys! That part of configuration must be done alone.

One can still run an unverified validator so a domain name is not totally necessary. I’m glad to be able to give something back to this wonderful group of people. If anybody has comments or suggestions please let me know. If there is interest within the community for others to run one of these little guys I’d be interested in setting them up for folks; time permitting of course.

I look forward to seeing how this thing works out. As I continue to tinker with it I’m sure I’ll be learning more and make further improvements. I encourage others to learn and find ways to advance the community at large. This technology would not live without a fervent following.

As always, second star to the right; Warp 8!

Reference:

  • https://medium.com/@WietseWind/how-to-run-a-ripple-validator-digitalocean-7e5fca1c3d77
  • https://www.pine64.org/

Captain’s Log 008 – Mindless vs Mindful Mining

Secondary Warp Field – Achievement

imageHas anyone bothered to take a look at the price of graphics cards lately? An Nvidia GTX 1070 is over $500! I have even seen them as high as $800 at the beginning of 2018. All the GPUs have been snapped up by, well, people like me! I have no shame. From my perspective. Earning passive income has been a small obsession of mine for a while. Some people manage this in the form of collecting royalties from a published book. I know there are folks that do this renting out their houses, but I decided to do it with cryptocurrency. There are many way to earn cryptocurrency, but in this case mining. In this post, I’ll take you on my journey building a mining rig, I’ll share with you some resources and I’ll tell you why I decided to build instead of renting hash power.

Like most people Googling “How to Mine Bitcoin”, I was nuts about the rage of making massive amounts of money! I stumbled across NiceHash [1] and quickly learned that the Nvidia GTX 1060 6GB graphics card in my day to day gaming rig would bring me in roughly $0.50-1.0 USD a day. Wow! That’s pretty awesome. All I had to do was let this thing run and in come the dollar signs. I saw this work over a month earning my first, call it, $50 worth of BTC. Logically I wanted to find a way to do this faster with more hash power and earn more. Here’s a nice graphic of the NiceHash concept. You’re not actually mining. You’re selling hashpower to renters whom in turn mine with your rig and pay for it in Bitcoin.

Image result for nicehash

Even before GPU prices hit all time highs, a GTX 1070 was still pretty expensive; around $3-400. Enter the NiceHash marketplace to order hash power. I had worked it out! Yes! I thought I could actually put in, say $50 in BTC to NiceHash, make an order for hashpower to go mine Ethereum. Then make enough from that to sell the ETH for BTC and end up with more than what I had put in. Mindlessly hoping I’d mine for less and make more. Translated I thought the cycle would repeat endlessly. Great idea if the markets are heading in your direction. Great idea if the difficulty of whatever you’re mining holds steady forever… Great idea if… So, you get the point. I actually tried this and failed. Not to say this is impossible. Mining or buying crypto in the hopes that it will one day increase in price is the mantra of a HODLER.

Here’s why I failed and you might too. The reason is fees and a poor understanding of how I’d actually make money. I spent a lot of time thinking about why I failed to make more money back than I put in, so like a good engineer I made a spreadsheet and went to the math. NiceHash charges a fee to place an order and you pay an amount in BTC per unit of hash per day. Check out my calculator here if you want! The calculator disregards the fees but you’ll get the idea. Usage is pretty simple. Put in the price of bitcoin and the marketplace rate of whatever algorithm on NiceHash you want to use. Then adjust the hashpower limit and amount you want to spend until the duration in hours or days matches what you want. Lastly, use another mining calculator online to determine if what you’re going to mine will net you more than what you paid in BTC. I’ve used whattomine [2] to do this. Remember to ignore electrical cost because as a renter of hashpower you don’t have it.

Keep in mind, this calculator doesn’t account for two things. The first is the fee that NiceHash charges and what I call “slippage”. Slipple is a term I coined referring to the percent of hashpower that either gets rejected by the pool or somehow doesn’t earn you anything. Keyword is somehow. After I made this sheet I learned that there would have to be a perfect storm of market pricing for both the price of the coin and what hashpower is selling for on NiceHash. There are some advantages to this system. If you want a lot of hashpower quickly, then this solution is great. I used it once to mine some siacoin early on and ended up with a boat load of it, which I then used to toy around with.

After all this I decided it was worth getting my own rig and to quit trying to play the “will mining X using rented hashpower make me money?” game. I wanted to build a mining rig but wasn’t quite sure how to do it. After searching for a resource I came across one of the best run blogs and resources for individuals wanting to get into hobby mining, and that is www.1stminingrig.com [3]. The fellow that runs the blog goes by the name Ciprian V, and it is obvious that he actually cares about helping others get in on the action. He is very knowledgeable and gives good advice. I credit his blog with arming me with the knowledge I needed to build my rig. I have built a number of computers in the past, but when it comes to a specialty computer there are extra steps to follow, specifically in the realm of BIOS settings. I saved up a few bucks and settled on a parts list, which I’ve shared below. Personally, I like to use PCPartpicker [4] because it help make sure your parts are compatible.

Here is my build: https://pcpartpicker.com/list/tRCr7W

Rationale for part selection:

  • CPU – You do not need a powerful processor.
  • RAM – Max of 4GB. Barebones memory for Windows to run.
  • Mother Board – Get one with the most PCIe slots you can.
  • Hard Drive – Anything will do. Cheapest SSD you can find.
  • Power Supply – PSU – Two 750 or 850 Watt supplies daisy chained together.
  • Accessories:
    • Risers. Get good ones! – Here’s an example.
    • Multipower Supply Adapter – Here’s an example.
    • External power button. – Here’s an example.
  • GPU – What you get is really up to you or your bank account XD.

For me, I wanted to get the most efficient and the most versatile GPU. I evaluated my NVIDIA and AMD options, and honed in on my choice. While the AMD RX 580 and 480 GPUs are descent for mining, I already had an NVIDIA 1060 6GB in my gaming rig so I knew that I wanted to try and stick with NVIDIA if I could. I was looking to build a 6 GPU mining rig and my first inclination was go get a 6 1080Ti’s. Except those things were going for over $1000 at the time and my budget was about $2000 for GPUs. I kept scaling my choices back and ultimately realized that I could get 4 GPUs at best, and I was eyeing the GTX 1070 and 1080 models. I ran the numbers for hash power and decided I’d be better off with the 1070s.

For performance metrics I went off of Ciprian’s 1stminingrig site. He really has done a ton of leg work getting these numbers together.

Fair warning about profitability. Do not base your entire research off of NiceHash’s profitability calculator. The thing really is a wild guess. True the calculator uses past data, but the markets are so volatile that you have to ask yourself. Is the past going to be any reflection of the future? Probably not.

To tell you why I chose the GTX 1070 over a 1080 was because of the confluence versatility combined with efficiency requirement. You may check profitability of a 1080 vs a 1070 and determine that you may be able to make more income with a 1080 much more readily than a 1070, but you may overlook one important fact. NVIDIA has outfitted the GTX 1700 with GDDR5 and the GTX 1080 with GDDR5X (5X) memory. 5X memory actually hinders the 1080 such that you are really limiting yourself to being the best at mining the Equihash and Lyra2REv2 algorithms. Ethereum, or Ethash, on a 1080 is problematic. A 1070 is better at Ethash mining than a 1080, and per watt more efficient at Equihash than a 1080 too.

The specific GPU I chose was the EVGA GTX 1070 SC Black Edition, Model#08G-P4-5173-KR. I wanted to be able to mine the most algorithms I could since as a hobby miner I wanted the ability to randomly mine that new up and coming coin at will. Of course, my mining rig’s primary purpose would be t reach return on investment and beyond, but I definately devote a little hashpower time to other cryptos. For instance, I heard about Ravencoin a while back. Dropped everything I was doing for a few days to go mine 1000RVN. No idea if that will ever become anything, but I figured why not? Plus it’s insane fun. Not knowing is what makes things interesting!

Building a rig is fun. There will be challenges. Do your homework! I will share one bit of very good advice. Take your time and don’t be in a rush. I destroyed a motherboard and a CPU because I was excited and rushed to build my rig. A mistake that cost me a couple hundred dollars in components. My rig is unique because I built the frame myself out of wood. Can you believe that people sell these things online for $100+?!? I build mine with $15 worth of wood and a few extra screws lying around my home. I made use of this 1stminingrig guide to help me through it. Although, fair warning, I don’t care how many BIOS articles you read get ready to play with it. 😉

Here is what I ended up with. No, I wasn’t going for good looking. Just functional hardware.

I’ve pictured my rig’s case with and without hardware installed. The case is simply a shelf backed with a piece of plywood. I secured all the components with ether velcro or screws strategically placed to hold things down to the wood.

A lot of people use MSI Afterburner but I happen to be using EVGA Precision. Both software allow you to do the same thing, which is tune the GPU’s core and memory clock speeds as well as voltages. I have used it to set all of my GPUs to +150/+500Mhz core and memory clock speeds, respectively. The EVGA 1070 SC Black Edition is already clock around 1784Mhz with its boost clock, and the additional settings bring it up to about 2000 Mhz stable. Believe me, these settings can take some patience and tweaking to get to a setting that doesn’t render the GPU dead afer 5 minutes of mining.

Here are some benchmarks I’ve collected for my rig with baseline settings by algorithm:

  • Neoscrypt – 3.308568 MH/s
  • Lyra2REv2 154.264 MH/s
  • DaggerHashimoto – 104.052 MH/s
  • Equihash – 1,061.98 H/s

With the +150/+500 clock settings by algorithm:

  • Neoscrypt – 3.6545344 MH/s
  • Lyra2REv2 166.396 MH/s
  • DaggerHashimoto – 121.196 MH/s
  • Equihash – 1,360.408 H/s

Here’s the increase in percentage I got for my hours of playing around with settings!

  • Neoscrypt – +10.45%
  • Lyra2REv2 +7.86%
  • DaggerHashimoto – +16.47%
  • Equihash – +28.1%

As you can see, the payoff is small for some algorithms and larger for others. Just learning how to play with GPU settings makes the venture worthwhile!

As of today, I have made about 27% of my initial GPU investment back. That’s $500 out of $1800 I spent on GPUs. Around last December I got my hands on 4 GTX 1070s for about $435 a piece. I intend to make the rest of the full amount back. I’d like to get another two GPUs and increase the rate at which I’m earning, even if it does prolong my return on investment. As of writing, the GPU I bought original is retailing for $550 at NewEgg’s website. That’s still a lot more than I’d rather pay. Hopefully with the slump in the market the prices will continue to drop.

I intend to continue the achievement warp field focus with additional ways to go about earning cryptocurrency. I think mining is the most stereotypical way of doing so, and I want to shed light on others. That is one purpose of CoinTrek, teach cryptocurrency achievement to others, support Ripple, and tackle the hard topics just like  Star Trek has and continues to do! I have removed my gauge from the sidebar. Since I’m not solely about earning a single Bitcoin anymore, I felt having it there was a moot point.

If you feel like helping me out on my journey, or you found this article useful. I would happily take a donation. Ripple and Ethereum are my cryptos of choice and those addresses can be found in the right sidebar.

ETH: 0xe85810d64a28c6ffc2351368beace84992a01e09
BTC: 3JQKyiMReYXHkGb48PvdJgd6wjBsBBKD78

As always. Second Star to the Right!

References:

  1. www.nicehash.com
  2. www.wahttomine.com
  3. www.1stminingrig.com
  4. www.pcpartpicker.com