Decentr is an intuitive Web3 blockchain/metaverse browser and custom blockchain that securely stores user browsing data as part of a user’s Decentr ID (DecID).
decentrd keys add
decentrd keys add --recover
decentrd keys list
decentrd keys delete
decentrd keys export
decentrd keys import .backup
decentrd q bank balances $(decentrd keys show -a)
sudo journalctl -u decentrd -f --no-hostname -o cat
sudo systemctl start decentrd
sudo systemctl stop decentrd
sudo systemctl restart decentrd
sudo systemctl status decentrd
sudo systemctl daemon-reload
sudo systemctl enable decentrd
sudo systemctl disable decentrd
decentrd status 2>&1 | jq .SyncInfo
echo $(decentrd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.decentr/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
curl -sS http://localhost:657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
decentrd tx staking create-validator \
--amount=000000udec \
--moniker="" \
--pubkey=$(decentrd tendermint show-validator) \
--identity="" \
--details="" \
--website="" \
--security-contact= \
--chain-id=mainnet-3 \
--commission-rate=0. \
--commission-max-rate=0.20 \
--commission-max-change-rate=0. \
--min-self-delegation=1 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"
decentrd tx staking edit-validator \
--new-moniker="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec" -ydecentrd tx staking edit-validator \
--identity="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--details="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--details="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--identity="" \
--details="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--identity="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--details="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--details="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--identity="" \
--details="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--commission-rate=0. \
--chain-id=mainnet-3 \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"decentrd tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--security-contact= \
--chain-id=mainnet-3 \
--commission-rate=0. \
--from= \
--gas-adjustment="1.4" \
--fees="5000udec"
decentrd status 2>&1 | jq .ValidatorInfo
decentrd q staking validator $(decentrd keys show --bech val -a)
decentrd q slashing signing-info $(decentrd tendermint show-validator)
decentrd tx slashing unjail --broadcast-mode=block --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
[[ $(decentrd q staking validator $(decentrd keys show --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(decentrd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
decentrd q slashing signing-info $(decentrd tendermint show-validator)
decentrd tx distribution withdraw-all-rewards --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx distribution withdraw-rewards $(decentrd keys show --bech val -a) --commission --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx staking delegate $(decentrd keys show --bech val -a) 000000udec --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx staking redelegate $(decentrd keys show --bech val -a) 000000udec --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx staking delegate 000000udec --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx staking unbond $(decentrd keys show --bech val -a) 000000udec --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd tx bank send 000000udec --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
decentrd query gov proposal
decentrd tx gov vote --from --chain-id mainnet-3 --gas-adjustment="1.4" --fees="5000udec"
CUSTOM_PORT=
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.decentr/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"% " $HOME/.decentr/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.decentr/config/config.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.decentr/config/config.toml
decentrd tendermint unsafe-reset-all --home $HOME/.decentr --keep-addr-book
sudo systemctl stop decentrd && \
sudo systemctl disable decentrd && \
rm /etc/systemd/system/decentrd.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf .decentr && \
rm -rf $(which decentrd)
wget -O $HOME/.decentr/config/genesis.json "https://snap.kynraze.com/decentr/genesis.json"
wget -O $HOME/.decentr/config/addrbook.json "https://snap.kynraze.com/decentr/addrbook.json"
PEERS=
sed -i -e "s|^persistent_peers *=.*|persistent_peers = "$PEERS"|" $HOME/.decentr/config/config.toml
wget -O auto-decentr.sh https://raw.githubusercontent.com/kynraze/service/main/mainnet/decentr/install-auto.sh && chmod +x auto-decentr.sh && ./auto-decentr.sh
wget -O snapshot-
decentr.sh
https://raw.githubusercontent.com/kynraze/service/main/mainnet/decentr/install-snapshot.sh&& chmod +x snapshot-
decentr.sh && ./snapshot-
decentr.sh
DECENTR
_NODENAME="
"
echo "export
DECENTR_NODENAME=$DECENTR_NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export
DECENTR_CHAIN_ID=mainnet-3" >> $HOME/.bash_profile
source $HOME/.bash_profile
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
ver="
1.20"
cd $HOME
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"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go version
git clone https://github.com/Decentr-net/decentr.git cd decentr git checkout v1.6.4 make install
decentrd version
--long
CUSTOM_PORT=
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%"
$HOME/.decentr/config/config.tomlsed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%
"
$HOME/.decentr/config/app.toml
decentrd config chain-id $DECENTR_CHAIN_ID decentrd config keyring-backend file decentrd config node tcp://localhost:657
decentrd init $DECENTR_NODENAME
--chain-id
$DECENTR_CHAIN_ID
wget -O $HOME/.decentr/config/genesis.json "https://snap.kynraze.com/decentr/genesis.json"
wget -O $HOME/.decentr/config/addrbook.json "https://snap.kynraze.com/decentr/addrbook.json"
PEERS="
"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/
.decentr/config/config.tomlsed -i -e "s|^seeds *=.*|seeds = \"
\"|" $HOME/
.decentr/config/config.toml
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/
.decentr/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/
.decentr/config/app.tomlsed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/
.decentr/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/
.decentr/config/app.toml
sudo tee /etc/systemd/system/
decentrd.service > /dev/null << EOF
[Unit]
Description=
decentrdAfter=network-online.target
[Service]
User=$USER
ExecStart=$(which
decentrd)start --home $HOME/
.decentrRestart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
curl -o - -L
https://snap.kynraze.com/decentr/snapshot-latest.tar.lz4| lz4 -c -d - | tar -x -C $HOME/
.decentr
sudo systemctl daemon-reload
sudo systemctl enable
decentrdsudo systemctl restart
decentrdsudo journalctl -fu
decentrd-o cat
# Update & install lz4(Required)
sudo apt install snapd lz4 -y
# Reset Chain Data
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.decentr/config/config.toml
sudo systemctl stop decentrd
cp $HOME/.decentr/data/priv_validator_state.json $HOME/.decentr/priv_validator_state.json.backup
rm -rf $HOME/.decentr/data
# Download Data Snapshot
curl -o - -L https://snap.kynraze.com/decentr/snapshot-latest.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.decentr
mv $HOME/.decentr/priv_validator_state.json.backup $HOME/.decentr/data/priv_validator_state.json
# Restart
sudo systemctl restart decentrd
sudo journalctl -fu decentrd -o cat
systemctl stop decentrd
decentrd tendermint unsafe-reset-all --home $HOME/.decentr --keep-addr-book
STATE_SYNC_RPC=""
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height) \
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 2000)) \
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $SYNC_BLOCK_HEIGHT $SYNC_BLOCK_HASH
PEERS=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.decentr/config/config.toml
sed -i.bak -e "s|^enable *=.*|enable = true|" $HOME/.decentr/config/config.toml
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
$HOME/.decentr/config/config.toml
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
$HOME/.decentr/config/config.toml
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
$HOME/.decentr/config/config.toml
systemctl restart decentrd && journalctl -fu decentrd -o cat