Skip to main content

How to mine a cryptocurrency just using a regular computer and a Twitter account

In the previous post I explained the idea behind the Social Ledger blockchain network, a fork from Ethereum which uses a new consensus algorithm called Proof of Social Network Identity (PoSNI).

Ok, even if that does not make much sense to you, what it means is that you can mine (create) the crypto currency used by this new blockchain network (a clone of Ether cryptocurrency) just using a regular (so far just tested on Linux) computer and a Twitter account.

I must tell you that this new cryptocurrency is currently worth zero, but Bitcoin was also worth nothing when it was launched back in 2009, so why not give a try to this since it basically requires just a little of your time?
Also, I believe it would be better if your main motivation was not to make a profit out of this, but to help researching in new solutions which could improve the whole blockchain ecosystem.

So here are the instructions, first the requisites:
- A Linux PC/laptop with connection to the internet and at least 4GB of RAM
- Java 8 VM (or higher) installed on that computer

Installation (or you may just watch this Youtube video):
1.- Download the distribution zip file (currently named social_ledger_1.0.0.0.zip) from dropbox to any directory on your system (for example in your home directory)

2.- Unzip the file, it will create a new directory named "social_ledger":
[user@host ~]$ unzip -q social_ledger_1.0.0.0.zip

I would advise you to verify the file using md5sum command, the output should be the following:
[user@host ~]$ md5sum social_ledger_1.0.0.0.zip
4ff16d40f39860984df806234380c52b  social_ledger_1.0.0.0.zip


3.- Then modify the social_ledger/config/social_ledger.properties file, you need to set the values of the following six properties:

MINE_COINBASE
MINE_EXTRA_DATA
TWITTER_CONSUMER_API_KEY
TWITTER_CONSUMER_API_SECRET
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET 


The value of MINE_COINBASE property is the address were the cryptocurrency will be sent to whenever you get to validate (mine) a block of transactions.
If you don't have one (a standard Ethereum address would work), then you can temporarily put any combination of 40 hexadecimal chars, for example:
0000000000000000000000000000000000000000
or the one which is commented-out in the same social_ledger.properties file.
Later, once the application is up and running, you can use the Social Ledger (based on Ethereum Harmony) Web UI to create your own address (more on that later) and then change the value of the MINE_COINBASE property accordingly.

MINE_EXTRA_DATA value is constructed by prepending "twitter" to your twitter username, for example, for devactionnet Twitter username, the MINE_EXTRA_DATA value would be "twitterdevactionnet".

The value of the other four properties are taken from a Twitter app which you need to create if you do not already own one (it takes a just a couple of minutes).
The detailed instructions to create a Twitter app (including an access token) can be found in this Youtube video.

4.- Start the application by switching to the social_ledger directory and then launching the start.sh script from the command line interface:
[user@host ~]$ cd social_ledger
[user@host social_ledger]$ ./start.sh

5.- After few seconds, you should see the following message:
Server started at http://localhost:8901

Then open http://localhost:8901 on your browser, in order to connect to the Ethereum Harmony Web UI running on your computer, you will see something like this:



From here, I would recommend you to watch the following Youtube video where the whole process is shown, including  creating a new address, then updating the 
social_ledger.properties file in order to use that new address, restart the application to pick up the configuration change and finally start mining.


Comments

Popular posts from this blog

Using Apache Kafka to implement event-driven microservices

When talking about microservices architecture, most people think of a network of stateless services which communicate through HTTP (one may call it RESTful or not, depending on how much of a nitpicker one is).

But there is another way, which may be more suitable depending on the use case at hand.
I am talking about event-driven microservices, where in addition to the classic request-response pattern, services publish messages which represent events (facts) and subscribe to topics (or queues depending on the terminology used) to receive events/messages.

To fully understand and embrace this new software design paradigm is not straight-forward but it is totally worth it (at least looking into it).
There are several interconnected concepts which need to be explored in order to discover the advantages of event-driven design and the evolutionary path which led to it, for example:
Log (including log-structured storage engine and write-ahead log)Materialized ViewEvent SourcingCommand Query Respons…

Shared Ledger Simulator

I have been interested in the shared/distributed ledger technology (a.k.a. block chain, a.k.a. the magic behind cryptocurrencies) for more than a year already but recently I had finally put real time and effort into it.

And since I believe that the best way to understand something is to get your hands dirty, that is what I have done, after I got a grasp of the core principles (or that is what I thought back then), I decided to code my own shared ledger simulator.

Initially, I also considered to look into the main existing code bases (e.g., the source code of the main/official Bitcoin client/miner or Ethereum's) since they are open source, but seeing code like thisput me off... That file is 3229 lines big!!! Plus it is written in C++.
Do not get me wrong, I truly believe Satoshi Nakamoto (i.e., whoever hides behind that name) is a genius and also a great software developer, but he/she/they for sure did not have readability as their main priority.

I also noticed that some other people h…

Vert.x microservices: an (opinionated) application

First of all, sorry for the tautology in the title, a library can be either opinionated or un-opinionated (such as Vert.x is), but an application can only be opinionated.
However, I decided to include "opinionated" to help getting my point across even though is redundant.
The Motivation  I am a big fan of Vert.x and the official documentation is quite good, yet it is not straight-forward to understand how it works and how to use it.
There are a lot of blogs and articles describing Vert.x terminology and its concurrency model.
There are also tons of "Hello World" Vert.x applications on Github, and the rest seem to be just variations of the already typical "Web chat application using Vert.x".
On top of that, many of them are outdated (using AngularJS instead of Angular2+, for example).

The only two exceptions which I found are:
vertx-microservices-workshop: a demo application by the Vert.x development team.
ngrx-realtime-app: proof of concept application focu…