diff --git a/README.md b/README.md index b8ce643d37299205f655287a677d3e7ba6b150e5..c8b52bd188169c918ff385f963d504708ee02a0d 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,70 @@ # cellframe-node -Cellframe Blockchain node +Cellframe Node -[Cellframe Wiki](https://wiki.cellframe.net) +[Cellframe Node usage Wiki](https://wiki.cellframe.net/index.php/Node_usage) -## Build: +## Build from sources: -* The project uses CMake. To generate a Makefile run in the project root directory: +### Prerequsites: + +To successfully complete of the build, you must have following prerequisites preinstalled (packages are named as in Debian GNU/Linux 10 "buster", please found the corresponding packages for your distribution): + +* libjson-c-dev +* libsqlite3-dev +* libmemcached-dev +* libev-dev +* libmagic-dev +* libcurl4-openssl-dev | libcurl4-nss-dev | libcurl4-gnutls-dev ( depricated modules, soon will be removed) +* libldb-dev +* libtalloc-dev +* libtevent-dev + +### Prepare system +Comamnd to install them all with build tools +``` +sudo apt-get install build-essential cmake cpack dpkg-dev libjson-c-dev libsqlite3-dev libmemcached-dev libev-dev libmagic-dev libcurl4-gnutls-dev libldb-dev libtalloc-dev libtevent-dev +``` + +### Get all sources + +This command fetch sources from gitlab and build them. ``` + git clone https://gitlab.demlabs.net/cellframe/cellframe-node.git + cd cellframe-node git submodule init - git submodule update --remote - cmake -S . -B build && make -C build + git submodule update ``` -* Or if you don't clone the project yet: + +### Build sources +Get into directory with cellframe-node and do ``` - git clone --recursive <repo> - cmake -S . -B build && make -C build + mkdir build + cd build + cmake ../ + make -j 8 ``` +Thats produce everything in build/ subdirectory. -## How to install: +## Install package -### Debian and Ubuntu: +### Prepare for installation (Debian/Ubuntu) +To prepare node for installation we need to produce pacakge. Or - do ```sudo make install``` from build directory, then get config template from ```dist/share/configs``` and produce proper one in ```/opt/celllframe-node/etc``` +Anyway we suggest you to produce the package with command ```cpack``` from the build directory. -* Create file /etc/apt/sources.list.d/demlabs.list with one line below: +#### Install from local package +If you downloaded or build from sources a debian pacakge, like ```cellframe-node_2.11-4-buster_amd64.deb``` you need to install it with ```dpkg``` command. Example: +``` +dpkg -i -plow ./cellframe-node_2.11-4-buster_amd64.deb +``` +#### Install from DemLabs official public repository + +* Create file /etc/apt/sources.list.d/demlabs.list with one line below for Debian 10: ``` - deb https://debian.pub.demlabs.net/ stretch main non-free + deb https://debian.pub.demlabs.net/ buster main ``` -* For Ubuntu 18.04 (Bionic): +* For Ubuntu 18 (Bionic): ``` - deb https://debian.pub.demlabs.net/ bionic main universe multiverse + deb https://debian.pub.demlabs.net/ bionic main universe ``` * Then download public signature and install it: ``` @@ -40,16 +77,51 @@ Cellframe Blockchain node apt-get install cellframe-node ``` -### Prerequsites: +During installation it asks some questions -To successfully complete of the build, you must have following prerequisites preinstalled (packages are named as in Debian GNU/Linux 10 "buster", please found the corresponding packages for your distribution): +#### Debian package questions +All this could be changed after in configs -* libjson-c-dev -* libsqlite3-dev -* libmemcached-dev (for libdap-server-core submodule) -* libev-dev (for libdap-server-core submodule) -* libmagic-dev (for libdap-server submodule) -* libcurl4-openssl-dev | libcurl4-nss-dev | libcurl4-gnutls-dev (for libdap-server submodule) -* libldb-dev -* libtalloc-dev -* libtevent-dev + +* Auto online +If true, the node goes online after he starts and then try to keep this state automaticaly + +* Debug mode +If true - produce more log output in files. Suggested to set ```true``` until the testing period + +* Debug stream headers +Dump stream headers in logs, set it ```true``` only if you want to get more debug information about stream packages passing through. Suggested ```false``` for almost everybody + +* Accept connections +Enable/disable listening network address. Set ```false``` if you don't want to accept network connections to your node + +* Server address +Network address used for listentning. Set ```0.0.0.0``` if you want to listen all network interfaces on your computer + +* Server port (optional, usualy don't ask) +Server port, 8079 by default but sometimes better to set it to ```80``` or ```443``` to masquarade service as web service. + +* Kelvin-testnet: Enable network +Set ```true``` if you want to connect your node with ```kelvin-testnet``` + +* Kelvin-testnet: Node type (role) +Select node type (or node role) from suggested list with short descriptions. By default suggested to select ```full``` + + +## How to run + +### Debian/Ubuntu +If the node is installed in your system you need only to check it if its runned on your system +``` + sudo service cellframe-node status +``` +And if its not runned - start it. Start after reboot should be automaticaly executed. +``` + sudo service cellframe-node start +``` + +To stop it use the next command: +``` + sudo service cellframe-node start +``` + diff --git a/prod_build/linux/debian/essentials/templates b/prod_build/linux/debian/essentials/templates index 2734042ed1262e201c20fbff23a8dfc6a0bcfc3e..ff19033fd01d5e075044b386c6c6cce85cb7be3a 100755 --- a/prod_build/linux/debian/essentials/templates +++ b/prod_build/linux/debian/essentials/templates @@ -50,8 +50,8 @@ Template: cellframe-node/kelvin_testnet_node_type Type: select Default: full Choices: full, light, master, archive, root -Description: Kelvin Testnet: Node type - Select node type:. +Description: Kelvin Testnet: Node role + Select node role:. Light - syncronize only local wallets full - sync all its cell master - allow to store values in chains and take comission, sync all shards that will need to be synced