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

  1. Looking for a reliable crypto payment gateway development company ? JPloft is the ideal choice! With a proven track record in creating secure, efficient, and scalable cryptocurrency payment solutions, JPloft helps businesses streamline transactions and embrace the future of digital payments. Trust JPloft to deliver cutting-edge technology that enhances your payment processing experience. Get started with their expert services today!

    ReplyDelete

Post a Comment

Popular posts from this blog

Kafka + WebSockets + Angular: event-driven microservices all the way to the frontend

In the the initial post of the  Event-driven microservices with Kafka series (see here  or  here ), I talked about the advantages of using event-driven communication and Kafka to implement stateful microservices instead of the standard stateless RESTful ones. I also presented the architecture and the source code of a related proof of concept application. In this post, I would like to show how to extend the asynchronous event-driven communication all the way from Kafka to the Web frontend passing through the Java backend. Hence, in the first post of this series, we got rid of HTTP as the communication protocol among microservices in the backend, and now we are also replacing it (with WebSockets) as the communication protocol between the frontend and the backend. Ok, but why would you do that? Because it provides a better experience to the end user!. Using WebSockets you can build legit  real-time user interfaces, the updates are pushed immediately from the s...

A Java dev journey to full-stack: first chapter

The Motivation I am an experienced Java developer and (surprise!) I like Java. I know it is not perfect but it works just fine for me (I enjoy type-safety and I do not consider verbosity a disadvantage, quite the opposite). I also know that some people dislike Java, which is also fine. But recently I decided to step out of my confort zone as developer, my goal isn't to be one of the "cool kids" neither trying to monetize a new skill in the job market. I have a quite practical motivation: I want to be able to build more (different) stuff. That's exactly the same reason why I learnt Android development by myself a couple of years ago. Web applications are ubiquitous, even more than native mobile apps, and thanks to cloud computing, one can easily and inexpensively release their idea/app to the World Wide Web. I already did some Web development in the past, in the bad old days of JSP and JSF, but the process was slow and painful. Nowadays the Web landscape h...

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 View Event Sourcing C o...