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

Complete (working) code to verify an Android app user phone number through SMS

Update from Thursday September 14th 2017: 
The very same day I posted this (the day before yesterday), I realized that it looked like Google had just made it effectively obsolete


I thought that at least I could claim that I chose a very demanded functionality to blog about, since Google decided to add a new API to provide this very same service.
Even the names are quite similar, I called it "SMS Verifier" and they call it "SMS Retriever".
But after looking into this new Google Services API, I found out that it requires to use a paid third-party service such as Twilio... very disappointing!
So my original post (which follows below) is still relevant after all, since it allows you to verify the user's phone number for free.

Original post: Tuesday September 12th 2017
It was about time for me to give back to the open source community, so I have just pushed the complete (working) code to verify the user's phone number from within an Android app to Github.

When I goo…

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…

You can finally DISLIKE a tweet (and make it count)

(If you don't feel like reading you can watch this video instead)

How many times have you wished there was a "dislike" button in Twitter? (and probably also in any other social network, but I will focus on Twitter in this post).

And I am not referring to this dislike button which is not what you want, since it is just a way to tell Twitter (and no one else) that you would not like to see similar tweets on your feed in the future.

So until Twitter decides to add this highly demanded feature (i.e., a real dislike button), I have come up with a way to dislike a tweet and make it count, so you can share your dislikenesswith everybody and your dislikes can be aggregated with other Twitter users' dislikes.

All you need to do in order to dislike a tweet is to use the hashtag #dislike or just #dlfor short, when replying to the tweet which you dislike. That's it, so simple!

For example, this is the image of a tweet which has two dislikes:

But it would be very annoying if you ha…