How To Launch An Arisen Node

in arisen •  5 years ago 

Arisen's core developers are preparing to retire the "arisen" user and the network's current 25 block producers are awaiting the go from our core team to stake 7.5M RSN individually, ultimately equating to 15% of the RSN in circulation. Once this happens block production will go through elected block producers, rather than the "arisen" user. Once this is complete, the network will be completely decentralized. Arisen's network is already running on 25 nodes but in a matter of hours, 21 of those nodes will begin producing blocks. Currently, only the "arisen" user is producing blocks. That means the other 4 nodes will be competing with the other 21 block producers to produce blocks on the network.

Although, 26 is simply not enough. By the end of 2020, our goal is to have at least 1,000 nodes running Arisen's software around the world. In order to reach that goal, we will need people like you to launch nodes. For Arisen to truly take off -- people have to get involved.

In my last post where I announced the public launch of Arisen, I didn't focus much on launching an Arisen node, so below is a tutorial on how you can do so, as well as instructions on how to register as a block producer and ultimately join the Arisen revolution.

Prerequisites

Installing Arisen (On Ubuntu 16.04)

apt-get install git -y
git clone https://github.com/arisenio/arisen.git
cd arisen
./arisen_install.sh
./arisen_build.sh

The Utilities

Once this step is ran, three important utilities will be compiled:

  • aos (blockchain daemon)
  • awallet (blockchain wallet)
  • arisecli (blockchain CLI)

These utilities will be used to launch your Arisen node, connect with other nodes on the network, create & manage your wallets, send transactions and execute commands across the network, as well as deployment and execution of Arisen-based smart contracts.

Using these utilities, I'm going to show you how to do the following:

  • startup aWallet's HTTP server
  • startup aOS & an Arisen blockchain node
  • create a wallet with aWallet
  • generate Arisen keypairs with AriseCLI
  • register an Arisen account with AriseCLI
  • register as a block producer
  • start a block producer node
  • deploy a smart contract
  • create your own cryptocurrency

Startup aWallet's HTTP server

Before starting the aos utility, we have to launch the aWallet HTTP server on port 12518. arisecli expects to communicate with the awallet daemon over this port by default, although when running arisecli commands that require interaction with awallet, you can use the --wallet-url flag to specify a custom URL/port.

aWallet's HTTP server must continuously run, so it makes sense to run within a screen or tmux.

To start aWallet's daemon, run the following:

awallet --http-server-address 127.0.0.1:12518

Exit the screen to make sure the daemon is continuously running.

Startup aOS and the Blockchain Node

Now it's time to startup the blockchain node using the aos utility. The aOS daemon will connect with other nodes on the Arisen network and will begin exchanging data with them. Starting aOS is quite simple and should also be done within a screen or tmux so it can continuously run in the background.

To do so, run the following:

aos --http-server-address 127.0.0.1:12618 --p2p-listen-endpoint 127.0.0.1:6620 --p2p-peer-address greatchain.arisennodes.io:6620 --plugin arisen::producer_plugin --plugin arisen::chain_api_plugin --plugin arisen::http_plugin --plugin arisen::history_api_plugin --plugin arisen::history_plugin --access-control-origin=*

In the above command, you will notice several options that I will explain below:
--http-server-address - Like aWallet, aOS also operates as an HTTP server as well. Although aWallet's API can only be made available locally, while aOS's API can allow for public requests. This flag is used to specify the host and port for aOS's HTTP server. The default port is 12618, referencing the date AriseBank was seized on 01-26-2018.

--p2p-listen-endpoint - This is the host/port of where aOS will listen for connection requests from other nodes. By default, Arisen nodes communicate over port 6620, referencing the "great chain" of Revelation 20:1.

--p2p-peer-address - This option can be used as many times as you have peers you plan on connecting with. In the example above, we use Arisen's genesis node located at greatchain.arisennodes.io.

The other options are Arisen plugins that MUST be enabled for aOS to work properly, as well as the --access-control-origin option, which allows you to run a public API node and control all CORS-based settings.

At this point, Arisen should startup, connect with the genesis node and begin downloading data from the genesis node itself.

You should safely exit the screen so that aos continuously runs. In a future step, we will need to stop aos and restart it with your block producer details, so keep the screen ID handy.

Create Wallet With aWallet

Now you need to create the default wallet on your machine. We can do this via arisecli by running the following command:

arisecli --wallet-url 127.0.0.1:12518 wallet create --to-console

This will reveal a password that will be used to unlock the wallet, considering it locks every 30 seconds by default.

To unlock this wallet, you can run the following command:

arisecli --wallet-url 127.0.0.1:12518 wallet unlock

This will ask you to enter the wallet unlock password that was generated when creating the initial wallet.

Generate Arisen Keypairs With AriseCLI

Now that you have created a wallet for storing your private keys, it's time to generate those keypairs.

We can do this easily with arisecli by running the following command:

arisecli create key --to-console

Since each account on the Arisen network requires two permission levels (owner & active), you will need to run the above command twice, to generate a keypair for each permission level.

KEEP THESE KEYS IN A SAFE PLACE AND DO NOT LOSE THEM

Now you need to import the private keys from both keypairs into aWallet. You can do so by running the following commands:

arisecli --wallet-url 127.0.0.1:12518 wallet import --private-key <owner-private-key>
arisecli --wallet-url 127.0.0.1:12518 wallet import --private-key <active-private-key>

Creating An Account With AriseCLI

Now that aWallet can sign transactions with these keys, you will need to create an account and associate it with the keys we just generated and imported in the previous step. This assumes that you already have an Arisen account, considering the fact that an account can only be created by another account.

NOTE: If you do not have an account, in our network launch post, you will see that we are readying the release of Arisen's signup service on January 8th, 2020. In the meantime, you can ask a community leader in Arisen's Telegram Channel to create an account for you. All they will need is the username you would like to reserve, along with the public keys that you generated in the previous step.

DO NOT SEND YOUR PRIVATE KEYS TO ANYONE. ONLY YOUR PUBLIC KEYS. ARISEN PUBLIC KEYS ALWAYS START WITH "RSN"

If you would like to create an account with arisecli, you can do so by running the following command:

arisecli system new account <existing-account-username> <new-account-username> <owner-public-key> <active-public-key> --buy-ram '1000000.0000 RSN' --stake-net '1000000.0000 RSN' --stake-cpu '1000000.0000 RSN'

NOTE: Obviously I staked a ton of RSN above for RAM, NET and CPU resources but when you create an account, you could simply use 1 RSN for each, instead of 100,000 RSN.

Register As A Block Producer

Now that you have created an account, you can register yourself as a block producer and become a block producing candidate on the network. The top 21 vote-getters via Arisen's 24/7 election system are elected to produce blocks. Because of the constantly changing election system, block producers could change at a moment's notice. This keeps block producers honest and forces them to agree with the needs of those who elected them in the first place, because block producers have the authority to do much more than just produce blocks. Collectively, block producers vote on network improvements, community proposals and more. It's important that the network has a solid governance and the DPOS algorithm most certainly provides that.

To register as a block producer, you will need to generate a new keypair by running the following command:

arisecli create key --to-console

This is because a block producer cannot sign transactions with their owner or active keys. It requires a special permission level that will require an entirely new keypair.

You will then need to import the private key associated with the above generated keypair, into aWallet, by running the following command:

arisecli --wallet-url 127.0.0.1:12518 wallet import --private-key <producer-private-key>

Now you can register as a block producer by running the following command:

arisecli system regproducer <username> <producer-public-key>

Start A Block Producer Node

Now you need to find the aos process and terminate it so that i can be restarted. Go back to the screen that was previously running aos and restart it with the following command:

aos --producer-name <your-username> --private-key '['producer-public-key', 'producer-private-key']' --http-server-address 127.0.0.1:12618 --p2p-listen-endpoint 127.0.0.1:6620 --p2p-peer-address greatchain.arisennodes.io:6620 --plugin arisen::producer_plugin --plugin arisen::chain_api_plugin --plugin arisen::http_plugin --plugin arisen::history_api_plugin --plugin arisen::history_plugin --access-control-origin=* --hard-replay-blockchain

Now your node will begin producing blocks, as long as you're one of the top 21 most-voted on block producer candidates.

Create Your Own Cryptocurrency

Creating a token on the Arisen network is easy. You can create a token by running the following commands:

arisecli push action arisen.token create '["your-username", "amount symbol"]' -p arisen.token

For example, I could issue 1000 LIFE coins by running:

arisecli push action arisen.token create '["jared", "1000.0000 LIFE"]' -p arisen.token

Then you will have to issue the coins to a specific account (it can be the account that created them).

arisecli push action arisen.token issue '["username-to-issue-to", "amount symbol", "memo"]' -p <your-username>

You have successfully created your own cryptocurrency.

Conclusion

Arisen is a powerful blockchain software, built to enable the creation of decentralized applications of all kinds and it's only going to get better with our 1.1.0 release. This is just a small preview of what you can accomplish with Arisen 1.0.0. Our goal for now is to grow the network and bring on as many network participants as possible and we're going to get there with your help.

Don't forget to stop by the Peeps Dev Telegram channel to speak with our developers, if you have any technical questions about launching your node.

-- Jared

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!