Giter Club home page Giter Club logo

kitabu-chain's Introduction

Kitabu Chain

Prerequisites

Validator Hardware requirements

  • Stable internet connection ($YOUR_IP:30303 should be publicly reachable)
  • 2 CPU ($ nproc)
  • 2 GB available RAM
  • 40 GB Available space

This step assumes you have root access on a Ubuntu (Tested on v22) based host OS

$ apt update
$ apt install chrony curl git unzip
$ curl -fsSL https://get.docker.com | bash

# Docker now ships with docker-compose v2, you can make it available in path by adding the following line to your .bashrc
# export PATH="/usr/libexec/docker/cli-plugins:$PATH"

$ curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose

# If you have a firewall active, add 30303 (both TCP and UDP) to the allow list

Installing the OpenEthereum bin (optional, if you want to create a new keystore)

# This setp is only useful if you want to generate a new keystore with OpenEthereum.
# If you bring your own key or use geth, e.t.c. this step can be skipped
# x64 Linux only
$ wget https://github.com/openethereum/openethereum/releases/download/v3.3.5/openethereum-linux-v3.3.5.zip
$ unzip openethereum*
# assumes /usr/local/bin is in $PATH
$ sudo mv openethereum /usr/local/bin
$ openethereum --version

Validator node setup

1. Clone this repo

$ git clone https://gitlab.com/grassrootseconomics/kitabu-chain.git
$ cd kitabu chain
$ cd openethereum
# all commands after this step will be run in kitabu-chain/openethereum dir

All steps

2. Obtain your private key (optional)

If you have an existing keystore file, rename it to key else create a new one:

$ openethereum account new --base-path=$(pwd)
$ mv keys/ethereum/UTC* ./key
$ rm -rf keys

Save the password you entered in the step above in a password file. After you complete creating the key, note the public address output (format 0x...) somewhere.

3. Setup environmental variables and other configs

$ cp .env.example .env

Edit the .env file:

  • EXT_IP: Your server's external IP (curl ifconfig.me)
  • ACCOUNT: Your private key's public address

Edit docker-compose.yml or kitabu.toml to tweak the Openethereum config as per your own preferences.

4. Start the validator node

$ docker-compose up
#  or...
$ docker-compose up -d

Reverse proxy setup (optional)

The devops folder contains a Caddy config to use as a reverse proxy to further control access to your validator node's API.

with your domain hosting provider:

create two A records, pointing to your server's public IP address:

  • rpc.YOURPUBLICDOMAIN
  • ws.YOURPUBLICDOMAIN

inside the devops folder:

$ cp Caddyfile.copyAndEdit Caddyfile

Edit the Caddyfile file:

  • .YOURPUBLICDOMAIN: the public domain that points to your server.

Bring Caddy up with:

$ docker-compose up -d
#  or...
$ docker-compose up -d

Ethstats client (optional)

The ethstats-client folder contains a the statisics client that publishes to the Kitabu dashboard (https://stats.kitabu.sarafu.network/).

inside the ethstats-client folder:

$ cp .env.copyAndEdit .env

Edit the .env file:

  • YOURARBITRARYINSTANCENAME: your chosen instance name (what you want to call your validator on the dashboard)

Bring the ethstats client up with:

$ docker-compose up -d
#  or...
$ docker-compose up -d

Non Validator full node setup

Change the toml file to:

[parity]
chain = "./kitabu.json"
base_path = "./data"

[footprint]
tracing = "on"
pruning = "archive"

Ensure kitabu.json exists at the path declared above and then run:

openethereum --config=kitabu.toml --bootnodes=enode://4bf5f4d219fbe71e35f34e42b8df898f81a743563d87e52b2c6ea8080c607f7d5a02e8cf4f553a689a0f9ca73d6102721e51cd173351c85f8dae281e356bf5f0@51.15.48.58:30303,enode://3d58cc2d1394c7c75c8118b2c3105dc730ee4c2f3580e8a3042c9db6eafb47c4e47cd8702d2ee4e8d8de180859fedc4041f5078589223e5f74d1206fb1a2edf8@163.172.141.184:30303,enode://b5b5c80c93a96ff61762ed25072aabc02c8db4a19e973d59eefb6f1ad5dd1c5c1a485c97c3d96ec03135025ac717140d4375332cd5253c4ac1ccbe2f3ee571f6@142.93.38.53:30303

kitabu-chain's People

Contributors

christopherreay avatar kamikazechaser avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

christopherreay

kitabu-chain's Issues

RPC Host, clarification

# If running a custom setup i.e. as a system daemon or kubernetes pod, point it to the correct RPC endpoint
RPC_HOST=http://openethereum:8545

does this need to be a publically available address? or is it in the loopback on localhost?

also, what is the intent of the rpc connection?

So Im running the validator and the ethstats-client

They both seem to be running fine.

Is there anything else I am supposed to do?
Maybe this is relevant to #3

Screenshot from 2022-06-29 16-25-45
Screenshot from 2022-06-29 16-25-39

(I stopped the Caddy service because Im not sure what the rpc security profile is for it :) and I dont need the API since I dont know what its for yet :)) tyty

in ethstats-client .env, what should WS_SECRET contain?

in the ethstats-client section of the readme,

there are instructions on how to fill in the ./ethstats-client/.env file

There are two values to compelte: INSTANCE_NAME and WS_SECRET

I have assumed that INSTANCE_NAME can be an arbitrary value?
I have assumed that WS_SECRET can be an arbitrary value, since there is no information about what it should contain.

I have set the two values to be the same thing, as it occurred to me that perhaps that is what the documentation is implying.

So my .env file is

INSTANCE_NAME=dayzee-1
RPC_HOST=http://openethereum:8545
WS_SECRET=dayzee-1
WS_SERVER=wss://stats.kitabu.grassecon.org

what is the correct interpretation of the rules for this value?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.