decentralized-internet

Greetings my fellow CypherTroopers!

While it may have been a bumpy road as of late, I have some very exciting news. I have been a part of the Cypherium community since 2018. As a developer myself I understood the ambitious goals laid out in the whitepaper and instantly became excited at what societal and economic change a technology like Cypherium could bring.

Over the past several years, like many of you, I have gotten to know the Cypherium team well and was recently asked to become a technology ambassador for the project! My first initiative has been to get access to the testnet so I can provide the Cypherium community with all of the technical resources they need to get started using the Cypherium blockchain, the CPH token, and the Digital Currency Interoperability Framework (DCIF).

This article will be the first of many tutorials, video guides, and AMA’s to better educate the community on Cypherium. Cypherium has an entire coding language at its disposal, so the possibilities for what to create are endless. But to start, I will of course be focusing on the rudimentary basics of the blockchain over both RPC / console:

  1. Setting up the testnet on linux
  2. Creating an account
  3. How to send coins
  4. Checking balance
  5. Starting a miner
  6. Check miner status
  7. Stop the miner
  8. Exit the terminal

Setting up the testnet on linux:

The first step is to clone the github repo for testnet

git clone https://github.com/cypherium/cypherTestBin.git
cd cypherTestBin

Install openssl

sudo apt-get install openssl
sudo apt-get install libssl-dev

In order for everything to function correctly the machine you run this on must have a public IP address. Also you will need to open port 18004, 6000, 9090 TCP and UDP.

Start the cypher daemon as a sudo user.

sudo ./start.sh 1

Using the 1 will show you the cypher terminal. If you would like to run the daemon in the background simply start like this.

sudo ./start.sh 1

Using the 1 will show you the cypher terminal. If you would like to run the daemon in the background simply start like this. Note: this requires you to use RPC to communicate with the node via curl.

sudo ./start.sh 0

After starting the node you should now be in the terminal view. Here we can enter some commands. Let us check the tx block first.

cph.txBlockNumber

Create account

When you first start a node there will be no account associated with it yet. To create a new one using the command below replacing with the password you would like it to be encrypted with. For example personal.newAccount("password")

personal.newAccount(<password>)

Now that you have created an account you can view them with the below command.

personal.listAccounts

Sending coins

Next we can send using this command. First generate a tx with a from address, to address, and amount. Then send passing in the tx you created with the from account password.

var tx = {
from: "0x391694e7e0b0cce554cb130d723a9d27458f9298", 
to: "0xafa3f8684e54059998bc3a7b0d2b0da075154d66", 
value: 0x64
}
personal.sendTransaction(tx, "passphrase")

Then once we have sent the coins you can check the balance using this command.

cph.getBalance("0x391694e7e0b0cce554cb130d723a9d27458f9298")

Starting a miner

To start a miner which will turn your node into a committee member you need to use an address you created. miner.start(number, address, password) number is the amount of threads to use.

miner.start(4,"0x391694e7e0b0cce554cb130d723a9d27458f9298", "password")

To check the status of the miner you can use this command.

miner.status()

To stop the miner enter this command.

miner.stop()

To gracefully exit the terminal simply type.

exit

This gives you a basic run down and guide on how to start a node and interact with it. In the future I will be creating some videos as well to go along with these guides. Stay tuned for more updates where I explain how to create smart contracts both converted from Ethereum and created with Java. Also on how to utilize the RPC commands instead of using the terminal.

You’ve successfully subscribed to Decentralized Internet
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Your link has expired
Success! Check your email for magic link to sign-in.