UBI, Centralization Of Power and How to Start Your Own Private NEO Blockchain On Linux Using Command Line Only

Hadar Rottenberg
DaBlock

--

Recently, while working on a crypto UBI project, I started my own private chain of NEO. Originally built with Microsoft technology, as expected, it has some quirks if you are a hardcore Linux guy like me. So it seems like a good opportunity to combine a technical guide with a discussion about UBI. If you are just interested in the technical part you can jump ahead.

UBI — Universal Basic Income is the idea that unconditionally everyone should get a livable sum of money. The question that arises is: who’s going to fund it? Well the answer is simple: we just print money.

Can we do that? Just print money out of thin air? Well Bitcoin and other cryptocurrencies are proof that we can create money out of thin air and it can be worth billions. The problem with Bitcoin is that it doesn’t solve the concentration of power problem. You can argue whether Bitcoin’s control is truly decentralized (Follow the debate between Dan Larimer and Vitalik Buterin http://bytemaster.github.io/article/2015/01/09/How-to-Measure-the-Decentralization-of-Bitcoin/) but you can’t argue the fact that 1000 Bitcoin addresses control around 40% of all bitcoins. It seems that Bitcoin distribution follows the regular economy wealth distribution.

In the maximalist’s view it’s not a problem since one Bitcoin can be divided into a hundred million Satoshis, so people will start trading in Satoshis. But do YOU or I as a citizen really want that? We all know that money===power, and some of us start to understand that trickle down economics is a fantasy. Apple and others sitting on hundreds of billions of dollars — a highly inflationary currency — and they still don’t spend it. Now why should Bitcoin holders be any different?

We need a different currency, one that is distributed from the bottom up, one where the masses hold most of it and not just 1%.

In the case of Bitcoin we are in luck, since we can conjure up our own cryptocurrency with its own unique rules, rules that can be trusted just like we trust any other crypocurrency, a trust based on mathematical proofs, only this time the rules will serve us — the majority.

If you enjoyed this article please don’t forget to clap, once, twice… fifty? So others can enjoy it too!

At DaBlock we are promoting sustainable and cooperative token economies.
If you are interested in better token economies please join us on our
telegram channel or contact us

Now to the technical part.

The problem with NEO private blockchain on linux is that in order to transfer the initial 100M NEOs you have to use neo-gui wallet, which is Windows only. In the last days the commands to do it via command line client were added to the neo-cli master branch, but as it happens version 2.7.5 has a bug preventing transactions from propagating to the blockchain. So we will need to use neo-cli 2.7.4 to run the blockchain nodes and version 2.7.5 to then perform the transaction to transfer the initial 100M NEOs.

  1. Start by installing prerequisites
sudo apt-get install libleveldb-dev sqlite3 libsqlite3-dev libunwind8-dev

Install .NET core, don’t forget to choose the correct distribution

2. Clone and build version 2.7.4

git clone https://github.com/neo-project/neo-cli.git
git checkout v2.7.4 -b v2.7.4
cd neo-cli
dotnet restore
dotnet publish -c Release

3. Create 4 copies of neo-cli; each copy is a node required to reach consensus

cp neo-cli/bin/Release/netcoreapp2.0/publish/ neo1
cp neo-cli/bin/Release/netcoreapp2.0/publish/ neo2
cp neo-cli/bin/Release/netcoreapp2.0/publish/ neo3
cp neo-cli/bin/Release/netcoreapp2.0/publish/ neo4

4. Create 4 wallets, copy the public key shown after you create each wallet, we’ll need it later.

cd neo1
dotnet neo-cli.dll
create wallet1.json
****
create wallet2.json
****
create wallet3.json
****
create wallet4.json
****
cp wallet2.json ../neo2
cp wallet3.json ../neo3
cp wallet4.json ../neo4

5. Modify config.json for each node (neo1-neo4) and give different ports. I simply change the first digit, for example from 10333, 10332, 10334 for node one to 20333, 20332, 20334 for node 2.

6. Modify protocol.json to match the keys of the wallets you created in step 4, and the p2p port you gave each node in his config.json.

7. Run each node to start consensus. I use the following script (don’t forget to install “expect” if you want to use it. You need to run this for neo1-neo4 and modify the wallet name. I opened 4 terminals for that but you can also use the “screen” utility.

8. Now to claim the NEO and GAS we need to use the master branch of the neo-cli.

git checkout master
cd neo-cli
dotnet restore
dotnet publish -c Release
cp neo-cli/bin/Release/netcoreapp2.0/publish/ neo-2.7.5
cp neo1/protocol.json neo-2.7.5
cd neo-2.7.5
dotnet neo-cli.dll

9. Now while in the cli command line, import the multisig address holding all the initial neo. Perform this for all 4 wallets (pubkey# are again the keys from step 4).

open ../neo#/wallet#.json
****
import multisigaddress 3 pubkey1 pubkey2 pubkey3 pubkey4

10. Send the NEO to an address. You can use one of your wallet’s addresses, let’s say wallet1.

open ../neo1/wallet1.json
****
list address
#address of wallet 1
#address of multisig
send neo <address1> 1000
#JSON output

11. Sign the json output with two more wallets.

open ../neo2/wallet2.json
****
sign <paste json output>
#copy the new json output
open ../neo3/wallet3.json
****
sign <paste second json output>
#copy third json output
#broadcast the signed transaction
relay <paste third json output>
#wait for next block
list asset
#you should see 99999000 neos

12. Claim gas

#wait some time
#open the wallet you transfered the neo to.
open ../neo1/wallet1.json
****
show gas
claim gas
<json output>
#repeat the signing and relay process with 2 other wallets

13. Feel free to come by our telegram channel if you need help

At DaBlock we are promoting sustainable and cooperative token economies.
If you are interested in better token economies please join us on our
telegram channel or contact us

--

--

Hadar Rottenberg
DaBlock

Monetary reformist and researcher. Advocates revolutionary thinking. Working on cooperative sustainable crypto economies. working at https://gooddollar.org