Завершённые
October 22, 2021

Zeitgeist | 0.3.X

⠀Zeitgeist is an evolving network that will change and adapt over time. It uses prediction markets based futarchy to determine its direction and policy.


Content


Information about the project

To the content

Description

⠀Zeitgeist is not only building a platform, but also an ecosystem for prediction markets. Team is creating a community where participants can have a voice in how the protocol changes over time. This is enabled particularly by a set of primitives built for a court system, and leverages a robust on-chain upgradable governance system. Researchers will be able to propose new ideas, traders can discuss and request new markets, developers can build on the open protocol, and entrepreneurs have the freedom to create their application that targets a niche vertical market.

Testnet phases

⠀The phase is still unknown, the «Zeitgeist node v0.2.0» testnet has just begun.

Rewards

⠀Yes, we plan to reward node operators. We will definitely have some form of rewards for collators and we are discussing additional options. A set of node operators who have run a node during the previous months will be the first one eligble to be collators. We will announce some more detailed information in the near future.

Server requirements

To the content

⠀Announced (VPS/VDS/DS):
Ryzen 5 3600 (6C/12T), 16 GB RAM, SSD

⠀Our experience (VPS/VDS/DS):
6 CPU, 16 GB RAM, 400 GB SSD

⠀Suitable servers:


Launching

To the content

⠀Each subsection is a separate type of installation, you have to select one of them.

Linux (manual)

For beginners

⠀Update packages

sudo apt update && sudo apt upgrade -y

⠀Install dependencies

sudo apt install wget jq build-essential pkg-config libssl-dev -y

⠀Create a user

sudo useradd -M zeitgeist
sudo usermod zeitgeist -s /sbin/nologin

⠀Create a folder for a node

sudo mkdir -p /services/zeitgeist/bin /services/zeitgeist/battery_station

⠀Download appropriate files

cd; \
zeitgeist_version=`wget -qO- https://api.github.com/repos/zeitgeistpm/zeitgeist/releases/latest | jq -r ".tag_name"`; \
wget -qO /services/zeitgeist/bin/zeitgeist "https://github.com/zeitgeistpm/zeitgeist/releases/download/${zeitgeist_version}/zeitgeist_parachain"; \
wget -qO /services/zeitgeist/battery_station/battery-station-relay.json "https://raw.githubusercontent.com/zeitgeistpm/polkadot/battery-station-relay/node/service/res/battery-station-relay.json"; \
chmod +x /services/zeitgeist/bin/zeitgeist; \
cp /services/zeitgeist/bin/zeitgeist /usr/bin/

⠀Assign the folder owner

sudo chown -R zeitgeist:zeitgeist /services/zeitgeist

⠀Come up with a name for a node, run a command and enter a name, thereby adding it to the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n zeitgeist_moniker

⠀Open used ports

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/ports_opening.sh) 30333 9933 9944 30334 9934 9945

⠀Create a service file

sudo tee <<EOF >/dev/null /etc/systemd/system/zeitgeistd.service
[Unit]
Description=Zeitgeist node
After=network.target
Requires=network.target

[Service]
User=zeitgeist
Group=zeitgeist
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
ExecStart=/services/zeitgeist/bin/zeitgeist \\
    --base-path /services/zeitgeist/battery_station \\
    --chain battery_station \\
    --name "$zeitgeist_moniker" \\
    --parachain-id 2050 \\
    --port 30333 \\
    --rpc-port 9933 \\
    --ws-port 9944 \\
    --rpc-external \\
    --ws-external \\
    --rpc-cors all \\
    --pruning archive \\
    -- \\
    --port 30334 \\
    --rpc-port 9934 \\
    --ws-port 9945

[Install]
WantedBy=multi-user.target
EOF

⠀Run the service file

sudo systemctl daemon-reload
sudo systemctl enable zeitgeistd
sudo systemctl restart zeitgeistd

⠀Add a command to view the log of a node in the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n zeitgeist_log -v "sudo journalctl -f -n 100 -u zeitgeistd" -a

Save the file in a safe place (the command displays the path)

echo /services/zeitgeist/battery_station/chains/battery_station_mainnet/network/secret_ed25519

Docker

For lovers of beauty

⠀Install Docker

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/docker.sh)

⠀Create a folder for a node

mkdir $HOME/zeitgeist

⠀Download appropriate files

zeitgeist_version=`wget -qO- https://api.github.com/repos/zeitgeistpm/zeitgeist/releases/latest | jq -r ".tag_name"`; \
wget -qO $HOME/zeitgeist/battery-station-relay.json "https://github.com/zeitgeistpm/zeitgeist/releases/download/${zeitgeist_version}/battery-station-relay.json"

⠀Come up with a name for a node, run a command and enter a name, thereby adding it to the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n zeitgeist_moniker

⠀Open used ports

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/ports_opening.sh) 30333 9933 9944 30334 9934 9945

⠀Add a command to view the log of a node in the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n zeitgeist_log -v "docker logs zeitgeist_node -fn 100" -a

If you participated in earlier stages of the project

⠀Go to the «Recovery» section.

If you run this node for the first time

⠀Run container

docker run -dit \
    -v $HOME/.zeitgeist:/zeitgeist/data \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    --name zeitgeist_node \
    --restart always \
    -p 30333:30333 \
    -p 9933:9933 \
    -p 9944:9944 \
    zeitgeistpm/zeitgeist-node-parachain:latest \
    --base-path /zeitgeist/data \
    --chain battery_station \
    --name "$zeitgeist_moniker" \
    --pruning archive

Save the file in a safe place (the command displays the path)

docker cp zeitgeist_node:/zeitgeist/data/chains/battery_station_mainnet/network/secret_ed25519 $HOME/secret_ed25519; \
echo $HOME/secret_ed25519

Logs

To the content

⠀Run the Log

zeitgeist_log

⠀Healthy log is below

⠀Open Explorer, type node name and check that your node is exists. If there is more than 1000 node, your node wont be visible due to limit, but it still counts.


Recovery

To the content

Preparing

Particularly recommended for those who participated in the earlier stages

⠀If there is an old node and the secret_ed25519 file has not yet been saved, then save it (the command will start searching for the file on the server)

find / -name secret_ed25519

Linux

Run the node

⠀Upload saved file in the pre-step secret_ed25519 into the folder/services/zeitgeist/

⠀Set permition to the file

chmod +x /services/zeitgeist/secret_ed25519

⠀Change service file

sudo tee <<EOF >/dev/null /etc/systemd/system/zeitgeistd.service
[Unit]
Description=Zeitgeist node
After=network.target
Requires=network.target

[Service]
User=zeitgeist
Group=zeitgeist
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
ExecStart=/services/zeitgeist/bin/zeitgeist \\
    --base-path /services/zeitgeist/battery_station \\
    --node-key-file /services/zeitgeist/secret_ed25519 \\
    --chain battery_station \\
    --name "$zeitgeist_moniker" \\
    --parachain-id 2050 \\
    --port 30333 \\
    --rpc-port 9933 \\
    --ws-port 9944 \\
    --rpc-external \\
    --ws-external \\
    --rpc-cors all \\
    --pruning archive \\
    -- \\
    --port 30334 \\
    --rpc-port 9934 \\
    --ws-port 9945

[Install]
WantedBy=multi-user.target
EOF

⠀Restart the service file

sudo systemctl daemon-reload
sudo systemctl enable zeitgeistd
sudo systemctl restart zeitgeistd

⠀Make sure the node is using the recovered ID (lowest value)

journalctl -u zeitgeistd.service | grep "node id"

Docker

⠀⠀Upload saved file in the pre-step secret_ed25519 into the folder

echo $HOME/.zeitgeist/

⠀Run container

docker run -dit \
    -v $HOME/.zeitgeist:/zeitgeist/data \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    --name zeitgeist_node \
    --restart always \
    -p 30333:30333 \
    -p 9933:9933 \
    -p 9944:9944 \
    zeitgeistpm/zeitgeist-node-parachain:latest \
    --base-path /zeitgeist/data \
    --node-key-file /zeitgeist/data/secret_ed25519 \
    --chain battery_station \
    --name "$zeitgeist_moniker" \
    --pruning archive

⠀Make sure the node is using the recovered ID (lowest value)

docker logs zeitgeist_node | grep "node id"

Update

To the content

Linux

⠀Stop a service file

systemctl stop zeitgeistd

⠀Download the latest version of binary

cd; \
zeitgeist_version=`wget -qO- https://api.github.com/repos/zeitgeistpm/zeitgeist/releases/latest | jq -r ".tag_name"`; \
wget -qO /services/zeitgeist/bin/zeitgeist "https://github.com/zeitgeistpm/zeitgeist/releases/download/${zeitgeist_version}/zeitgeist_parachain"; \
wget -qO /services/zeitgeist/battery_station/battery-station-relay.json "https://raw.githubusercontent.com/zeitgeistpm/polkadot/battery-station-relay/node/service/res/battery-station-relay.json"; \
chmod +x /services/zeitgeist/bin/zeitgeist; \
cp /services/zeitgeist/bin/zeitgeist /usr/bin/

⠀Give permission to execute it

sudo chown -R zeitgeist:zeitgeist /services/zeitgeist

⠀Restart the service file

systemctl restart zeitgeistd

⠀Check the logs

zeitgeist_log 

Docker

⠀Update an image

docker pull zeitgeistpm/zeitgeist-node-parachain:latest

⠀Stop the node

docker stop zeitgeist_node

⠀Delete the node

docker rm zeitgeist_node

⠀Run a new container

docker run -dit \
    --name zeitgeist_node \
    --restart always \
    -p 30333:30333 \
    -p 9933:9933 \
    -p 9944:9944 \
    -v $HOME/zeitgeist/secret_ed25519:/zeitgeist/data/secret_ed25519 \
    zeitgeistpm/zeitgeist-node-parachain:latest \
    --base-path /zeitgeist/data \
    --node-key-file /zeitgeist/data/secret_ed25519 \
    --chain battery_station \
    --name "$zeitgeist_moniker" \
    --pruning archive

Useful commands

To the content

⠀Available variables (remove echo while using)

echo $zeitgeist_moniker

⠀To view the node's log

zeitgeist_log
sudo journalctl -f -n 100 -u zeitgeistd
docker logs zeitgeist_node -fn 100

⠀To find out node ID (lowest value)

journalctl -u zeitgeistd.service | grep "node id"
docker logs zeitgeist_node | grep "node id"

⠀To restart the node

sudo systemctl restart zeitgeistd
docker restart zeitgeist_node

Useful links

To the content

Official WebSite | Official Telegram group

Russian-speaking Telegram channel | Discord General | Discord Seer | Twitter

GitHub | Official documentation | Explorer | Blog


Acknowledgments

To the content

Let’s Node! Team — studying the project, writing the article, maintaining the Russian-speaking community

Express your gratitude