Skip to content

Commit

Permalink
Merge de8616d into 97420df
Browse files Browse the repository at this point in the history
  • Loading branch information
rnistuk committed Mar 17, 2020
2 parents 97420df + de8616d commit d918de4
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 19 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
[![Build Status](https://travis-ci.com/bluzelle/curium.svg?branch=devel)](https://travis-ci.com/bluzelle/curium) [![Coverage Status](https://coveralls.io/repos/github/bluzelle/curium/badge.svg?branch=devel)](https://coveralls.io/github/bluzelle/curium?branch=devel)

<a href="https://bluzelle.com/"><img src='https://raw.githubusercontent.com/bluzelle/api/master/source/images/Bluzelle%20-%20Logo%20-%20Big%20-%20Colour.png' alt="Bluzelle" style="width: 100%"/></a>

The Bluzelle Curium Application
===============================

The decentralized database for Web 3.0. Bluzelle uses blockchain and
EdgeComputing for greater performance and security.

Bluzelle Curium REST Service
------------------------------
If all you need is the Light-client Daemon (LCD) REST server:
[Building the Curium REST Service](./docs/rest/buildrest.md)


Bluzelle Curium Multi-Validator Zone Installation
-------------------------------------------------

Expand Down
68 changes: 68 additions & 0 deletions docs/rest/buildrest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[Back](../../README.md)
***

Starting the Light-client Daemon (Local REST Server)
====================================================

>If required, please refer to the [OS Setup for Curium](./docs/setup/os.md) and
[Development Environment Setup](./docs/setup/devenv.md) documents for
instructions on how to set up your OS and Golang development environment.


1. In a terminal, change to the Curium project working directory

cd ~/go/src/github.com/bluzelle/curium

2. Use make to build and install the blzd and blzcli executables

make mainnet

3. Ensure Bluzelle CLI works by executing the binary, you should
be able to execute the app from your home directory:

cd
blzcli
The output of the Bluzelle CLI will be:

Bluzelle CRUD Client
Usage:
blzcli [command]

Available Commands:
status Query remote node for status
config Create or query an application CLI configuration file
query Querying subcommands
tx Transactions subcommands
rest-server Start LCD (light-client daemon), a local REST server
keys Add or view local private keys
version Print the app version
help Help about any command
Flags:
--chain-id string Chain ID of tendermint node
-e, --encoding string Binary encoding (hex|b64|btc) (default "hex")
-h, --help help for blzcli
--home string directory for config and data (default "/Users/rnistuk/.blzcli")
-o, --output string Output format (text|json) (default "text")
--trace print out full stack trace on errors

Use "blzcli [command] --help" for more information about a command.

4. Start the Light-client Daemon (LCD) on the command line using thes
rest-server command with the "--node" argument to specify the IP address of
a Curium node in the zone to connect to

blzcli rest-server --node <host>:<port>

if the node is not specified the default value of "tcp://localhost:26657"
will be used.

5. You will now be able to interact with the connected zone via the REST
interface provided by the LCD.

[Back](../../README.md)
2 changes: 1 addition & 1 deletion docs/setup/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Build the Curium Project
make mainnet

3. Ensure Bluzelle CLI and daemon work by executing the binaries, you should
be able to execute the apps from your users directory:
be able to execute the apps from your home directory:

cd
blzcli
Expand Down
5 changes: 5 additions & 0 deletions docs/setup/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
Deploy the Initial Node
=======================

>NOTE: If you wish to simply deploy a node, validating or non-validating, to an
*existing* zone please skip ahead to the [Deploy Additional Nodes](./deployaddl.md)
document.
***

1. Before initializing a node, remove the previous node config folders from
your home folder, if they exist

Expand Down
49 changes: 31 additions & 18 deletions docs/setup/deployaddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Deploy Additional Nodes

blzd init <moniker> --chain-id <chain-id for the zone> 2>&1 | jq .node_id

Use a new moniker string, but use the same chain-id as used in the initial
node
use a new moniker string, but use the chain-id used by the existing nodes to
identify the zone that this node will connect to

blzd init curium01 --chain-id bluzelle 2>&1 | jq .node_id
Expand All @@ -30,17 +30,21 @@ Deploy Additional Nodes

There is no need to edit the genesis file, ".blzd/config/genesis.json", as
it will be replaced with the genesis file created for the initial node in
this zone.
this zone. If this node will be joining an existing zone, you will need to
obtain the genesis file from a node that is already participaing in the
zone (see below).

4. Set the client configuration
4. Set the client configuration, remember to use the chain id of the zone that
this node will be joining

blzcli config chain-id bluzelle
blzcli config chain-id <zone chain-id>
blzcli config output json
blzcli config indent true
blzcli config trust-node true

5. Edit ".blzd/config/config/config.toml" to add the first node’s address to
the comma separated list of persistent_peers:
5. Edit ".blzd/config/config/config.toml" to add the address of a node that is
already a member of the zone that this node will be joining to the comma
separated list of persistent_peers:

# Comma separated list of nodes to keep persistent connections to
persistent_peers = "6ccd<..>cc9c@<nodeip>:26656"
Expand All @@ -61,7 +65,8 @@ Deploy Additional Nodes
Remember that *every* node should have *at least* this minimum. Feel free
to set it higher if you wish.

7. Create the key that will be used to label the validator on this node
7. *Optional - Validating Nodes Only*
Create the key that will be used to label the validator on this node

blzcli keys add vuser

Expand All @@ -85,7 +90,10 @@ Deploy Additional Nodes

note the address and mnemonic phrase values.

8. Return to the first node server and distribute tokens from the genesis
8. *Optional - Validating Nodes Only*
If this node is joining an existing zone, obtain tokens from an existing
node.
Or, return to the first node server and distribute tokens from the genesis
validator to the address of the validator on the new node

blzcli tx send <src delegator address> <dest delegator address> \
Expand All @@ -104,13 +112,17 @@ Deploy Additional Nodes
tokens from the validator on the first node the the validator on the second
node on the blockchain.

9. Before the node can be started it must copy the genesis.json file from the
first node. Return to the new node server and use the secure copy command
scp, to copy the genesis file from the first node.
9. Before the node can be started its' blockchain must be seeded with a
genesis.json file from a node already participating in the zone. If the
node is joining an existing zone, request the the genesis.json file from
the owner of the zone and copy it to the "~/.blzd/config/" directory.

If you are the owner of the zone, use the secure copy command "scp", to
copy the genesis file from the first node.

scp ubuntu@<host>:~/.blzd/config/genesis.json ~/.blzd/config/
scp <user>@<host>:~/.blzd/config/genesis.json ~/.blzd/config/

10. Start the Bluzelle daemon as a background task on the new node
10. Start the Bluzelle daemon

blzd start
Expand All @@ -121,10 +133,11 @@ Deploy Additional Nodes
and then retry the start command.

11. When the new node catches up to the rest of the zone, the account that we
have named vuser will have 10E15 ubnt tokens, and it can be turned into a
validator node, allowed to participate in validating additions to the
blockchain.
11. Optional - Validating Nodes Only
When the new node catches up to the rest of the zone, the account that we
have named vuser will have ubnt tokens given to it by another node in the
zone, and it can be turned into a validator node, allowed to participate
in validating additions to the blockchain.

blzcli tx staking create-validator \
--amount=1000000000ubnt \
Expand Down

0 comments on commit d918de4

Please sign in to comment.