How to become a witness Serey

Y
ytyeasin

Hello friends, I hope everyone is well. Today I will show you how to set up Serey witness. With this, you can easily set up Serey Witness without any basic knowledge of coding. So let's get started.

Serey Witness Server Minimum Requirements

  • CPU: Dual-core @ 2GHz or higher per core
  • Memory: 8GB (16GB to be future-proof)
  • Storage: 200GB+ drive

Let's Begin Installation

Serey Node requires Docker CE to run.

curl -s https://get.docker.com | bash

Using Docker Image

which docker

Create witness_node_data_dir

cd /opt/

mkdir witness_node_data_dir

sudo chmod 777 witness_node_data_dir

ls

cd witness_node_data_dir

Create config.ini file

nano config.ini

# Endpoint for P2P node to listen on
p2p-endpoint = 0.0.0.0:2001

# Maxmimum number of incoming connections on P2P endpoint
# p2p-max-connections =

# P2P nodes to connect to on startup (may specify multiple times)
seed-node = 78.47.204.112:2001
seed-node = 78.47.204.95:2001

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
checkpoint = [4928468, "0e6def80204937838282116233a5026c009c9f1b"]

# Location of the shared memory file. Defaults to data_dir/blockchain
# shared-file-dir =

# Size of the shared memory file. Default: 1G
shared-file-size = 16G

# Endpoint for websocket RPC to listen on
rpc-endpoint = 0.0.0.0:8090

# Endpoint for TLS websocket RPC to listen on
# rpc-tls-endpoint =

# Endpoint to forward write API calls to for a read node
# read-forward-rpc =

# The TLS certificate file for this server
# server-pem =

# Password for this certificate
# server-pem-password =

# API user specification, may be specified multiple times
# api-user =

# Set an API to be publicly available, may be specified multiple times
# public-api = database_api login_api account_by_key_api
public-api = database_api login_api account_by_key_api network_broadcast_api tag_api follow_api

# Plugin(s) to enable, may be specified multiple times
# enable-plugin = witness account_history account_by_key
enable-plugin = witness account_history account_by_key tags follow

# Maximum age of head block when broadcasting tx via API
max-block-age = 200

# Flush shared memory file to disk this many blocks
flush = 100000

# Whether to print backtrace on SIGSEGV
backtrace = yes

# Defines a range of accounts to track as a json pair ["from","to"] [from,to] Can be specified multiple times
# track-account-range =

# Defines a list of operations which will be explicitly logged.
# history-whitelist-ops =

# Defines a list of operations which will be explicitly ignored.
# history-blacklist-ops =

# Disables automatic account history trimming
history-disable-pruning = 0

# Track account statistics by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
account-stats-bucket-size = [60,3600,21600,86400,604800,2592000]

# How far back in time to track history for each bucker size, measured in the number of buckets (default: 100)
account-stats-history-per-bucket = 100

# Which accounts to track the statistics of. Empty list tracks all accounts.
account-stats-tracked-accounts = []

# Track blockchain statistics by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
chain-stats-bucket-size = [60,3600,21600,86400,604800,2592000]

# How far back in time to track history for each bucket size, measured in the number of buckets (default: 100)
chain-stats-history-per-bucket = 100

# Database edits to apply on startup (may specify multiple times)
# edit-script =

# RPC endpoint of a trusted validating node (required)
# trusted-node =

# Set the maximum size of cached feed for an account
follow-max-feed-size = 500

# Block time (in epoch seconds) when to start calculating feeds
follow-start-feeds = 0

# Defines a range of accounts to private messages to/from as a json pair ["from","to"] [from,to)
# pm-account-range =

# Enable block production, even if the chain is stale.
# enable-stale-production = false

# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = false

# name of witness controlled by this node (e.g. initwitness )
#witness = "initminer"

# WIF PRIVATE KEY to be used by one or more witnesses or miners
#private-key =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error

# declare an appender named "p2p" that writes messages to p2p.log
[log.file_appender.p2p]
# filename=logs/p2p/p2p.log
# filename can be absolute or relative to this config file

# route any messages logged to the default logger to the "stderr" logger we
# declared above, if they are info level are higher
[logger.default]
level=debug
appenders=stderr

# route messages sent to the "p2p" logger to the p2p appender declared above
[logger.p2p]
level=error
appenders=p2p

just copy the code and paste, Ctrl + o to save then Ctrl + X to back it.

Get Docker Image from Serey Repository.

sudo docker run --rm -it -p 8090:8090 -p 2001:2001 -v /opt/witness_node_data_dir:/opt/witness_node_data_dir sereyio/sereyd:latest /opt/steemd -d /opt/witness_node_data_dir

after it run for 4 or 5 seconds, press CTRL + C to quit. Now you will see 2 folders created.

Remove blockchain folder

Run docker command again to run and sync full node from Serey.

sudo docker run --rm -it -p 8090:8090 -p 2001:2001 -v /opt/witness_node_data_dir:/opt/witness_node_data_dir sereyio/sereyd:latest /opt/steemd -d /opt/witness_node_data_dir

keep your eyes on the logs, it will error as below.

Now press Ctrl+c to stop the node, let's go back to nano config.ini

nano config.ini

Add # tag checkpoint as below picture.

Ctrl + o to save then Ctrl + X to back it. And run docker command again to run and sync full node from Serey.

sudo docker run --rm -it -p 8090:8090 -p 2001:2001 -v /opt/witness_node_data_dir:/opt/witness_node_data_dir sereyio/sereyd:latest /opt/steemd -d /opt/witness_node_data_dir

Now, let's wait till it's fully synced node. If you see this it means you have sync full node to machine already.

Open the Serey wallet app and log in to your account.

Let's go to "Setting" and click on the show key button to get your private active key.

Now show your active key using your master/owner key. Don't worry! The key in the example is not a valid key.

Copy your active private key.

Let’s go back to nano config.ini

nano config.ini

Add your witness name = “Your witness name” And add your private active key = "private key"

Don't forget to untag the " Witness " and " Private-key " fields.

Ctrl + o to save then Ctrl + X to back it. And run the docker command again.

 

Now Open the Serey wallet again, Let's go to the "Serey witness" and click on the Become Witness.

It will have a pop-up to confirm become a witness now.

Now you have become a witness in the Serey node already.

Now let's vote for yourself.

Now you can check from " serey.io/sereyexplorer "

Congratulations You have become a Serey witness

Comments