Nockchain
Instal Dependensi
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
Buka Port
sudo ufw allow ssh; sudo ufw allow 3005; sudo ufw allow 3006; sudo ufw enable
Clone
git clone https://github.com/zorp-corp/nockchain
cd nockchain
cp .env_example .env
Instalasi Hoonc
make install-hoonc
Build
make build
Instalasi Nockchain Wallet
make install-nockchain-wallet
Instalasi Nockchain
make install-nockchain
Set Key
nockchain-wallet keygen
CADANGKAN
Salin setiap kunci dari hasil output, PubKey Privkey Seed Phrase
- Backup sebagai file
keys.export
nockchain-wallet export-keys
- edit
MINING_PUBKEY
in.env
file
nano .env
Buat Service
note
If you want to run multiple service skip this and go to Run Multi
- Edit
PUB_KEY
dengan Public Key milikmu sendiri
sudo tee /etc/systemd/system/nock.service > /dev/null << EOF
[Unit]
Description=Nockchain Mining
After=network-online.target
StartLimitIntervalSec=0
[Service]
User=$USER
Restart=always
RestartSec=3
Environment=RUST_LOG=info,nockchain=trace,debug,nockchain_libp2p_io=info,libp2p=info,libp2p_quic=info
Environment=MINIMAL_LOG_FORMAT=true
ExecStart=$(which nockchain) \
--mine \
--mining-pubkey="PUB_KEY"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable nock
sudo systemctl restart nock
Cek log
sudo journalctl -u nock -f --no-hostname -o cat
RUN Multi
wget -O nock.sh https://learn.megumii.xyz/nock.sh; chmod +x nock.sh; ./nock.sh
Troubleshoot
For error like this
sudo sysctl -w vm.overcommit_memory=1