The “Serious” Blockchain Development, Part 2: Plan, System, Setup, and Experiment

Andhika A Sentosa
8 min readDec 29, 2018

--

We’re now in part of second where “The Dark” getting started. It’s alive…. IT’S ALIVE…. This post is the continuation from previous part. The Part 1

So with “The Dark” or this server, we planning about develop and deploying Blockchain Platform, simulating the Blockchain in Local Network, simulating mining progress in that Local Network, and any Blockchain Platform can do in this single server. Note: Principe of blockchain is Decentralize. So for developing in single server it’s possible to use virtualization and Docker.

And also including some experiment involving the infamous “Mining” — the easy “money” maker :)

In this following post, We will explore my steps in setup the server:

  1. Operating System and BIOS Configuration
  2. Initial OS Configuration as Server & Development workstation
  3. Plan for required Software and Environment, and some experiments
  4. Author Notes, Future post plan.

Some PC Hardware thing, some OS thing, some AMD driver thing, some basic Concept, and generalization of my work with some note and explanation…. etc. etc…. yeah Let’s get started.

Operating System Configuration

Alright then, we need to make sure that the BIOS version should be updated for better stability of the hardware. Then start Install the System.

For The OS, I planning for dual-boot Windows 10 and Ubuntu 18.04 LTS.

  • Why Windows? It can’t be denied, Windows has most support for GPU driver (for both Nvidia and AMD) and for that reasons, many of easy cloud-mining apps are mostly working with this system. We will require the Pro / Enterprise / Education edition for Virtualization capability. Windows Server is better choices but licenses price are not.
  • Why GNU/Linux? The Power of GNU/Linux is supreme for blockchain development and the primary force for FOSS, thus blockchain development should be best suited in Linux. Although, it’s also possible use windows as platform for learning and wide-range of compatibility.
  • Why Ubuntu LTS? Distro choices can be varied. for this case, we need distro which can be guaranteed for stability and supported apps, also the GPU Driver which will run officially supported (AMD Linux 18.50 page). Note, development = much learning. Thus, the best distro for development phase is Ubuntu LTS. The alternative is CentOS / RedHat which is great for Operational Phase. And SLED is actually great for both, If knowledge about coding in SUSE were satisfied, it maybe the better choices.
  • Of course, the 64bit / amd64 version. And for ubuntu chose Desktop version. (Xubuntu recommend for light DE)

Plan for Dual-boot, we will using single SSD for both os. Using UEFI boot. Ubuntu is primary boot, and Windows is Secondary.

In Fast way to how to dual-boot it:

  1. Make bootable USB for Windows in UEFI, also in another USB make bootable Ubuntu LTS in ISO image format (I use rufus)
  2. Install Windows first, boot in UEFI mode, make custom install, set the storage half or as desired of available storage (In my case: SSD has 500GB capacity, therefore I use 240 GB).
  3. Then install Ubuntu after, boot in UEFI mode, and install at empty storage available in SSD.
  4. Set BIOS, enable UEFI boot order, set Ubuntu (GRUB boot) as first bootable order.
Example for my system with MSI mobo

Some motherboard can optimize the GPU for mining computational, in my MSI board it possible by enabling 64-bit memory GPU address (Above 4G memory GPU mining). The “PCI Slot 1 Lane Configuration” MSI has “x4+x4+x4+x4" for splitting the PCI slot, but It’s only useful for full rack mining rig configuration.

For overclocking capability, we leave the CPU at stock since still using the stock cooler. Because GPU development is not CPU intensive. And for RAM, using the optimal A-XMP profile (The advertised RAM speed).

After everything completed, we should be able to boot into Ubuntu GRUB boot. and able to switch between OS we want to boot. (The GRUB can be modified with easy using GRUB Customizer using Ubuntu)

Initial OS Configuration for Server & Development workstation

As fresh install OS, the common thing to do is installing the required driver for hardware especially GPU and update the system.

Radeon RX Vega Logo

As end of 2018, For AMD Radeon driver (RX vega):

In Windows, the driver configuration should be like this.

Radeon Adrenaline version 18.9.3
  • Disable crossfire
  • Enable HBCC memory segment (set default, 11786 MB)
  • Chill On (Lower power when idle)
  • This Global Graphics should apply in all RX Vega card.

For efficiency, It is better to set RX Vega to Undervolt state, where GPU is operated in lower voltage than standard configured state. Also as mentioned, Windows version has more feature to control the GPU. Thus giving better hardware optimization in specified application.

Radeon Adrenaline version 18.9.3

In windows the configuration is at Global Wattman. Set to manual mode, and set power limit to -15% to -20% (Increase for stability, lower for less power).

Otherwise, in Adrenaline 2019 (version 18.12.3 and newer), you can set to manual then Auto Undervolting configuration. But Note, some of my tested cloud-mining software are unable use the new driver.

For GNU/Linux, Linux kernel has AMDGPU which the Open-source version of Radeon Driver which already embedded into kernel itself. In this version of Ububtu 18.04.1 LTS based on kernel 4.15, has older of AMDGPU driver. Thus, updating the AMDGPU via amd.com driver is recommended to ensure the latest version is used. We will use the amdgpu open-variant because we using the Radeon RX variant. (Note: The amdgpu-pro is only for Radeon Pro variant, installing wrong variant will broke the Ubuntu booting)

For system to be able remotely controlled and also server capable, we need to setup OS as hoster of SSH (command-line) server and VNC (remote desktop) server.

In enterprise environment, access point to this server should be configured by administrator and set for secure connection (ex. Local VPN, Authorised SSH keys, X.509 certificate for VNC, or Port Knocking) remote development.

For local server and self-hosting server, we need to set DDNS for server can be discovered in internet and SSH & VNC setup for remote connection. If your ISP support IPv6, you can directly connect to your system via your local IPv6 without DDNS as long as SSH / VNC services are running and firewall allow connection in.

Many provider offer DDNS services. For this post, I use No-IP as example of DDNS services that I’m using. The quick step I can tell is as following: (You can search detailed step in their website, ex: No-IP)

  1. Register account for DDNS services (Free version is enough)
  2. Add host domain name
  3. Download provider DUC (Dynamic Update Client)
  4. Setup DUC in your Operating System.
  5. Set DUC to automatic run when PC turn on (Optional).
  6. Done. Now you can connect your system via open configured-Port.

Using this server also allow you to hosting webserver, VM server, game server and etc.

Plan for required Software and Environment, and some experiments

For development, we planning about develop and deploying smart contact, simulating the Blockchain in Local Network, simulating mining progress in that Local Network, and any Blockchain Platform can do. The Plan is using a Blockchain framework:

  • Solidity (Ethereum network) , as primary focus, The smart-contract based blockchain network, (Open-source) both Private and public purposes.
  • Hyperledger, The enterprise private blockchain network.
  • Stellar, The quick “Lightning speed” transaction, capable using smart-contract.
  • Neo. The Chinese backed blockchain network, like Ethereum, but more focused in enterprise network.

I need to search and read more about the Framework environment and if it’s fits with what we will develop in. Therefore, I will discuss more in next post (Post 3), and for now we will just experimenting with this server as mining node and also can be as web-server.

And For early experiment, I planning to giving the server to do mining progress as cloud-mining or full-Node mining where on this phase is the main objective for this server as mining node who execute the smart contact — the builder of blockchain ledger. This means, fully operate the GPU POOWERRRR..

Many cloud-mining software with their dedicated mining pool for collect and share hashing power across mining pool. For example in Windows we can use: Minergate or Wineth

Minergate screenshoot
WinEth miner

You can find more about the setup and configuration in their following website.

For Ubuntu, thing getting more complicated. there some software supporting the Linux and require to do advanced configuration (involving terminal and scripting. The Minergate is one that support Linux, but with limitation. The dual-GPU configuration worsen the effort to make this works.(need more research. More additional info will add in this post.)

Author Notes & Future Work

From what I’ve got from research and reading, the concept of Blockchain (of course), Cloud computing, virtualization and docker is pretty much the environment needed for be able developing Smart contract Ethereum. And for building the local network, the server(s) required GPU computational (Mostly) and network for Decentralized application in multiple server.

In future post, I’ll share my knowledge in blockchain and my plan to build concept for an approach for building the blockchain application. And perhaps, the possibility as an active researcher in blockchain technology.

Thank you for reading.

Sorry for my potato englisch…. Any responds are welcome :)

--

--

Andhika A Sentosa

IT Infrastructure, Linux Enthusiast, Have Dream expanding Blockchain.