Skip to main content

Install

logo

Spek Minimal

SpecSize
20GBSSD
2GBRAM

Hal yang diperlukan

  • Git
  • Dokcer >= 20.0
  • Dokcer compose >= 2.0.0)
  • Server harus memiliki port 80 dan 443 terbuka
  • Dompet ETH (Kunci Privat & Mnemonik)

    Saldo ETH (untuk menandatangani transaksi)

    Saldo SARCO (untuk mengikat arkeolog Anda ke kutukan)

  • wss:// URL RPC (Infura, Alchemy, dll.)
  • Nama domain yang menunjuk ke alamat IP server Anda

Jika berjalan di Goerli (chain id = 5), maka Anda akan memerlukan Goerli ETH + Goerli SARCO.

Persiapkan DNS Record

  • Buka pengelolaan domain
  • Tambahkan Catatan DNS.
  • Pilih A.
  • Masukkan nama Anda dan alamat IP publik Anda sebagai nilai.
  • Simpan

Install Dependensi

sudo apt update; sudo apt upgrade
sudo apt-get update && sudo apt install git -y && sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

Buka Port

sudo ufw allow ssh; sudo ufw allow 443/tcp; sudo ufw allow 80/tcp; sudo ufw enable

Clone Repo

git clone https://github.com/sarcophagus-org/quickstart-archaeologist
cd quickstart-archaeologist

Salin .env.sample menjadi .env

cp .env.example .env

Membuat Mnemonik

BACKUP

Buat file kosong peer-id.json

touch peer-id.json

Edit file .env

nano .env

Isi data Anda

  • ↓ ↓ ↓
.env
  1. ETH_PRIVATE_KEY is your Private Key which has ETH/Matic and $SARCO
  2. NOTIFICATION_WEBHOOK_URL is your discord webhook url. You can follow the instructions here to set up a discord webhook url: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
.env
## Key used to encrypt secrets and sign ETH transactions
## The address associated with this key is your archaeologist identifier
ETH_PRIVATE_KEY=ugfhttawfihqwoid132b1231b23

## (optional) multiply gas price estimation by this amount (i.e. 2 means 2x RPC gas price estimate)
## GAS_MULTIPLIER=
NOTIFICATION_WEBHOOK_URL=https://discord.com/api/webhooks/hafkakakjajbasbkadsbaksdjbakfbakfaf

## Domain to use for your archaeologist
## This domain should be pointed with an A record to your server's IP
DOMAIN=my.exampledomain.com

## Comma-separated list of chain ids of each network you want to run your service on.
## Supported Chain IDS:
## 1 = Mainnet
## 5 = Goerli
## 11155111 = Sepolia
## 84531 = Base Goerli
## 80001 = Polygon Mumbai
## example, to run on mainnet, goerli, and sepolia, set:
## CHAIN_IDS="1,5,11155111"
CHAIN_IDS=1,42161,137

## Here, you should define:
## - RPC provider urls.
## - Mnemonics used to derive keypairs to encrypt sarcophagi.
## Generate a new one here - https://iancoleman.io/bip39/ or see README to generate one offline.
## Uncomment and set, for each network chain id you want to run on, your own
## private provider URL (infura, alchemy, etc) and a unique mnemonic for that network.
## ================================================================================================
MAINNET_PROVIDER_URL=wss://eth-mainnet
MAINNET_ENCRYPTION_MNEMONIC=never gonna give you up never gonna let you down

ARBITRUM_PROVIDER_URL==wss://arb-mainnet
ARBITRUM_ENCRYPTION_MNEMONIC=never gonna tell a lie and hurt you

POLYGON_MAINNET_PROVIDER_URL=wss://polygon-mainnet
POLYGON_MAINNET_ENCRYPTION_MNEMONIC=never gonna tell a lie and hurt you

$SARCO Token

  • Untuk mendapatkan $SARCO, Anda dapat menukarkannya di Uniswap
  • Buka https://app.uniswap.org/
  • SC Sarco: 0x7697B462A7c4Ff5F8b55BDBC2F4076c2aF9cF51A

Register

Register on-chain

Jika ingin run di 2 chain, maka perlu register 1 by 1.

COMPOSE_PROFILES=register NETWORK=mainnet docker compose run register
  • Y, Enter
  • Kemudian masukkan jumlah (disarankan: DiggingFee 100 - 500, CurseFee 300, dan FreeBond 1000)
Ouput
=========================================================================================================

ARCHAEOLOGIST PROFILE:

FIELD VALUE
exists true
maximumRewrapInterval 200 days (17280000s)
maximumResurrectionTime Dec 30 2023 (1703953499)
peerId sarcophagus.example.xyz:12D3KooWRkyaFVBDFaaf3D5piG1YRJjCMSgBMj9Si4xjFDaRqjSCX
minimumDiggingFeePerSecond 0.000153712226361799 SARCO (~ 400.00/month)
freeBond 1000.0SARCO
cursedBond 0 SARCO
curseFee 300.0 SARCO
address 0x897015991ABC646a69EC8701B8459aA806aCf70a

=========================================================================================================

Memulai Node

COMPOSE_PROFILES=service NETWORK=all docker compose up -d

Perintah Berguna

  • Periksa log Layanan Arkeolog
docker logs -f quickstart-archaeologist-archaeologist-1
  • Periksa log Acme Companion
docker logs -f quickstart-archaeologist-acme-companion-1
  • Periksa log Nginx
docker logs -f nginx-proxy
  • Memperbarui layanan
cd ~/quickstart-archaeologist
git pull
COMPOSE_PROFILES=service NETWORK=all docker compose stop
COMPOSE_PROFILES=service NETWORK=all docker compose pull
COMPOSE_PROFILES=service NETWORK=all docker compose up -d
  • Memulai ulang layanan
COMPOSE_PROFILES=service NETWORK=all docker compose stop
COMPOSE_PROFILES=service NETWORK=all docker compose up -d
  • Jika Anda mengubah domain setelah mendaftar
NETWORK=all docker compose exec -it archaeologist sh
cli update -u -n mainnet
exit
  • Memperbarui Digging Fee
NETWORK=all docker compose exec -it archaeologist sh
cli update -d 300 -n mainnet
exit

300 dapat diubah menjadi jumlah yang lain

  • Memperbarui Free Bond
NETWORK=all docker compose exec -it archaeologist sh
cli update -f 100 -n mainnet
exit

100 dapat diubah menjadi jumlah yang lain

Cek Profil

  • Check Profile
NETWORK=all docker compose exec -it archaeologist sh
cli view -p -n mainnet
exit
  • Claim Rewards
NETWORK=all docker compose exec -it archaeologist sh
cli claim -n mainnet
exit
  • Withdraw Free Bond
NETWORK=all docker compose exec -it archaeologist sh
cli free-bond -w 10 -n mainnet
exit

10 bisa dubah berapapun

  • any other
NETWORK=all docker compose exec -it archaeologist sh
cli help -n mainnet
exit

Mengatasi Masalah

  • Domain Record

Domain Anda harus memiliki catatan A yang menunjuk ke alamat IP server di mana layanan arkeolog dijalankan. https://www.nslookup.io/website-to-ip-lookup Gunakan alat ini untuk memastikan bahwa domain Anda sudah benar-benar diarahkan.

  • Uji Koneksi Websocket

https://www.piesocket.com/websocket-tester Uji apakah Arkeolog Anda dapat membuka koneksi websocket dengan memasukkan alamat websocket Anda dalam format ini:

wss://<domain>/p2p/<libp2p peerID>

Untuk mendapatkan domain dan peerID Anda, jalankan: Cek Profil


danger

⚠️ Jika Anda ingin menghapus ⚠️

cd ~/quickstart-archaeologist
COMPOSE_PROFILES=service docker compose down -v
docker rmi jwilder/nginx-proxy nginxproxy/acme-companion ghcr.io/sarcophagus-org/sarcophagus-v2-archaeologist-service