Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 178 additions & 101 deletions Empower Chain/Manuel kurulum+port.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,120 +2,143 @@

<h1 align="center"> Empower Chain </h1>

> Topluluk kanalları: - [Sohbet](https://t.me/corenodechat) - [Empower Discord](https://discord.gg/Zs3GMUhg)

<h1 align="center"> Donanım </h1>

```sh
# Sistem
4 CPU
8 RAM
200 SSD
```

<h1 align="center"> Güncelleme </h1>
* [Topluluk kanalımız](https://t.me/corenodechat)<br>
* [Empower Website](https://empower.eco)<br>
* [EmpowerChain Website](https://empowerchain.io)<br>
* [Blockchain Explorer](https://empower.explorers.guru/)<br>
* [Doküman](https://docs.empowerchain.io)<br>
* [Discord](https://discord.gg/Zs3GMUhg)<br>
* [Görevler ve Ödüller](https://docs.empowerchain.io/testnet/tasks-and-rewards)

## Sistem Gereksinimleri.
| Bileşenler | Minimum Gereksinimler |
| ------------ | ------------ |
| CPU | 4 |
| RAM | 8 GB |
| Storage | 250 GB SSD |
```
sudo apt update && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
# kütüphane kurulumu
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
```

<h1 align="center"> Go kurulumu </h1>

```sh
sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.20.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH

# go version 1.20 olmak zorunda yoksa hata alırsınız
go version
### Moniker ve Cüzdan adınızı giriniz. (sonra tek kod olarak yapıstırınız)
```
# install go, if needed
cd $HOME
! [ -x "$(command -v go)" ] && {
VER="1.20.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
}
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin

# set vars ( WALLET VE MONİKER KISMINI DEĞİŞTİRİNİZ )
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export EMPOWER_CHAIN_ID="circulus-1"" >> $HOME/.bash_profile
echo "export EMPOWER_PORT="16"" >> $HOME/.bash_profile
source $HOME/.bash_profile

<h1 align="center"> Binary </h1>

```sh
# download binary
cd $HOME
rm -rf empowerchain

git clone https://github.com/EmpowerPlastic/empowerchain

cd empowerchain
git checkout v1.0.0-rc1
cd chain

make install
```

<h1 align="center"> Genesis, addrbook ve servis (port ayarlaması var isteyen değiştirsin 35 ayarlı)</h1>

```sh
# Orjinal dökümasyonda genesis URL'ler yok, manuel ekliyorum:
curl -Ls https://ss-t.empower.nodestake.top/genesis.json > $HOME/.empowerchain/config/genesis.json

curl -Ls https://ss-t.empower.nodestake.top/addrbook.json > $HOME/.empowerchain/config/addrbook.json

# Port Atama (izmir ayarladım isteyen 35 değiştirsin)
echo "export EMPOWERCHAİN_PORT="35"" >> $HOME/.bash_profile
source $HOME/.bash_profile

# Port app.toml ayarlaması
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}317\"%;
s%^address = \":8080\"%address = \":${EMPOWERCHAİN_PORT}080\"%;
s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}090\"%;
s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}091\"%;
s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}545\"%;
s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${EMPOWERCHAİN_PORT}546\"%" $HOME/.empowerchain/config/app.toml

# Ports config.toml ayarlaması
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${EMPOWERCHAİN_PORT}658\"%;
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}657\"%;
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${EMPOWERCHAİN_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${EMPOWERCHAİN_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${EMPOWERCHAİN_PORT}660\"%" $HOME/.empowerchain/config/config.toml
```
# config and init app işlemini yapalım
```
# config and init app
empowerd config node tcp://localhost:${EMPOWER_PORT}657
empowerd config keyring-backend os
empowerd config chain-id circulus-1
empowerd config keyring-backend test
empowerd config node tcp://localhost:${EMPOWERCHAİN_PORT}057
empowerd init $MONIKER --chain-id circulus-1
```
```
# Servis dosyası:
empowerd init "test" --chain-id circulus-1

# download genesis and addrbook
wget -O $HOME/.empowerchain/config/genesis.json https://testnet-files.itrocket.net/empower/genesis.json
wget -O $HOME/.empowerchain/config/addrbook.json https://testnet-files.itrocket.net/empower/addrbook.json

# set seeds and peers
SEEDS="c597ec01e412d6e0f62c6f5501224b7fb8393912@empower-testnet-seed.itrocket.net:16656"
PEERS="c413d3d16e250ddbd8f8d495204b2de46ef36b63@empower-testnet-peer.itrocket.net:16656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.empowerchain/config/config.toml

# set custom ports in app.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${EMPOWER_PORT}317\"%;
s%^address = \":8080\"%address = \":${EMPOWER_PORT}080\"%;
s%^address = \"localhost:9090\"%address = \"0.0.0.0:${EMPOWER_PORT}090\"%;
s%^address = \"localhost:9091\"%address = \"0.0.0.0:${EMPOWER_PORT}091\"%;
s%^address = \"localhost:8545\"%address = \"0.0.0.0:${EMPOWER_PORT}545\"%;
s%^ws-address = \"localhost:8546\"%ws-address = \"0.0.0.0:${EMPOWER_PORT}546\"%" $HOME/.empowerchain/config/app.toml

# set custom ports in config.toml file
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${EMPOWER_PORT}658\"%;
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${EMPOWER_PORT}657\"%;
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${EMPOWER_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${EMPOWER_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${EMPOWER_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${EMPOWER_PORT}660\"%" $HOME/.empowerchain/config/config.toml

# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"nothing\"/" $HOME/.empowerchain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.empowerchain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.empowerchain/config/app.toml

# set minimum gas price, enable prometheus and disable indexing
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.0umpwr"/g' $HOME/.empowerchain/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.empowerchain/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.empowerchain/config/config.toml

# create service file
sudo tee /etc/systemd/system/empowerd.service > /dev/null <<EOF
[Unit]
Description=empowerd Daemon
Description=Empower node
After=network-online.target
[Service]
User=$USER
ExecStart=/root/go/bin/empowerd start
Restart=always
RestartSec=3
WorkingDirectory=$HOME/.empowerchain
ExecStart=$(which empowerd) start --home $HOME/.empowerchain
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```
```
# Resetleme ve başlatma

# reset and download snapshot
empowerd tendermint unsafe-reset-all --home $HOME/.empowerchain
if curl -s --head curl https://testnet-files.itrocket.net/empower/snap_empower.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://testnet-files.itrocket.net/empower/snap_empower.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.empowerchain
else
echo no have snap
fi

# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable empowerd
sudo systemctl restart empowerd
# Log Kontrol
journalctl -u empowerd -f -o cat
sudo systemctl restart empowerd && sudo journalctl -u empowerd -f -o cat
```

<h1 align="center"> Cüzdan oluşturma </h1>

```sh
# cüzdan-adı değiştirin.
### Cüzdan olusturma yada import etme
```
empowerd keys add cüzdan-adı
```
```sh
empowerd keys add cüzdan-adı --recover (import etmek için)
### import
```
empowerd keys add cüzdan-adı --recover
```
### Cüzdan sorgulama
```
empowerd keys list
```


### Senkronize olmayı bekleyin ardından validatör oluşturun (not: faucetin bir kaç gün içinde açılacağı söylendi)
```
empowerd tx staking create-validator \
Expand All @@ -133,17 +156,71 @@ empowerd tx staking create-validator \
--chain-id circulus-1
--y
```
## Restart node
### Restart node
```
sudo systemctl restart empowerd
```
## Log Kontrol
### Log Kontrol
```
journalctl -u empowerd -f -o cat
```
# Sadece port değiştirmek isteyenler
### Edit validator
```
empowerd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "comolokko" \
--from $WALLET \
--chain-id circulus-1 \
--gas auto --gas-adjustment 1.5 \
-y
```
### Silme komutları
```
sudo systemctl stop empowerd
sudo systemctl disable empowerd
sudo rm -rf /etc/systemd/system/empowerd.service
sudo rm $(which empowerd)
sudo rm -rf $HOME/.empowerchain
sed -i "/EMPOWER_/d" $HOME/.bash_profile
```

### Odülleri talep et
```
empowerd tx distribution withdraw-all-rewards --from $WALLET --chain-id circulus-1 --gas auto --gas-adjustment 1.5
```
### Odülleri ve komisyonları talep et validator
```
empowerd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id circulus-1 --gas auto --gas-adjustment 1.5 -y
```
### Ne kadar mangır var
```
empowerd query bank balances $WALLET_ADDRESS
```
### Kendine delege et ( $(empowerd keys show $WALLET --bech val -a) kendi valoperınızı kod çağırır valoper yazmıcaz cüzdna yazıcaz sadece )
```
empowerd tx staking delegate $(empowerd keys show $WALLET --bech val -a) 1000000umpwr --from $WALLET --chain-id circulus-1 --gas auto --gas-adjustment 1.5 -y
```
### Düz Delegate ( kendinize edicekseniz valoper yazıcanız yada baskasına edicekseniz onu tabi cüzdanda yazılcak )
```
empowerd tx staking delegate <TO_VALOPER_ADDRESS> 1000000umpwr --from $WALLET --chain-id circulus-1 --gas auto --gas-adjustment 1.5 -y
```
### Bi fakirden baska fakire redelege
```
empowerd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000umpwr --from $WALLET --chain-id circulus-1 --gas auto --gas-adjustment 1.5 -y
```
$ Unbond tüm malları geri çek
```
empowerd tx staking unbond $(empowerd keys show $WALLET --bech val -a) 1000000umpwr --from $WALLET --chain-id circulus-1 --gas auto --gas-adjustment 1.5 -y
```
### Baskasına coin yollama
```
empowerd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000umpwr --gas auto --gas-adjustment 1.5 -y
```
## Sadece port değiştirmek isteyenler

# Port Atama (izmir ayarladım isteyen 35 değiştirsin)
### Port Atama (izmir ayarladım isteyen 35 değiştirsin)
```
echo "export EMPOWERCHAİN_PORT="35"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Expand All @@ -152,22 +229,22 @@ source $HOME/.bash_profile
systemctl stop empowerd
```
```
# Port app.toml ayarlaması
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}317\"%;
s%^address = \":8080\"%address = \":${EMPOWERCHAİN_PORT}080\"%;
s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}090\"%;
s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}091\"%;
s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${EMPOWERCHAİN_PORT}545\"%;
s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${EMPOWERCHAİN_PORT}546\"%" $HOME/.empowerchain/config/app.toml
# set custom ports in app.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${EMPOWER_PORT}317\"%;
s%^address = \":8080\"%address = \":${EMPOWER_PORT}080\"%;
s%^address = \"localhost:9090\"%address = \"0.0.0.0:${EMPOWER_PORT}090\"%;
s%^address = \"localhost:9091\"%address = \"0.0.0.0:${EMPOWER_PORT}091\"%;
s%^address = \"localhost:8545\"%address = \"0.0.0.0:${EMPOWER_PORT}545\"%;
s%^ws-address = \"localhost:8546\"%ws-address = \"0.0.0.0:${EMPOWER_PORT}546\"%" $HOME/.empowerchain/config/app.toml
```
```
# Ports config.toml ayarlaması
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${EMPOWERCHAİN_PORT}658\"%;
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}657\"%;
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${EMPOWERCHAİN_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${EMPOWERCHAİN_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${EMPOWERCHAİN_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${EMPOWERCHAİN_PORT}660\"%" $HOME/.empowerchain/config/config.toml
# set custom ports in config.toml file
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${EMPOWER_PORT}658\"%;
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${EMPOWER_PORT}657\"%;
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${EMPOWER_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${EMPOWER_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${EMPOWER_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${EMPOWER_PORT}660\"%" $HOME/.empowerchain/config/config.toml
```
```
sudo systemctl daemon-reload
Expand Down
18 changes: 18 additions & 0 deletions Opside/Tasıma.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,21 @@ opside-chain/show-beaconChain-log.sh
```
opside-chain/show-validator-log.sh
```

## OLMADI MI? speciel teknik...

v3 kuruyoruz bizden menemonic isteyecek menemoniclerimizi girip denedik ama aynı pubkeyi vermediyse. v3 menemonic istediğinde menemoniclerin ilk 4 harfini yazaıyoruz hata vericek amaçta bu hata verip cüzdan eklememesi FATAL görücez . çok güzel :D alttaki kodu yazıp durduralım.
```
cd
cd testnet-auto-install-v3
opside-chain/stop-all.sh
```
### v2 deyken aldığım yedek dosyalarını validator dosyalarını sunucumuza yukleyelim ardından başlatalım.
```
cd
testnet-auto-install-v3/opside-chain/start-geth.sh
testnet-auto-install-v3/opside-chain/start-beaconChain.sh
testnet-auto-install-v3/opside-chain/start-validator.sh
```

### NOT: daha sonra control panelinden 8 ze sona zaten 1 çıkıyor basıp çıkan pubkeyin bizim yedekteki dosya ile aynı pubkey olduğundan emin olalım. ve ardından validator loglarımıza bakalım deposit bakiye yukleme beklenıor gibi değilde normal loglar gelmeye baslıyacaktır. uzun zaman alıyor site üzerinde düzelmesi validator logları duzgunse sorun yok.