Skip to main content

Tangle

caution

Perlu Ubuntu 22.04 atau lebih tinggi

Spek minimal

SpecSize
CPUIntel(R) Core(TM) i7-7700K CPU @ 4.20GHz
RAM32 GB
SSD500 GB
Port30333, 30334 TCP

Install Dependencies

sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler

Open port

sudo ufw allow ssh; sudo ufw allow 30333

Download Binary & Copy ke /usr/bin

mkdir -p $HOME/.tangle
wget -O tangle https://github.com/webb-tools/tangle/releases/download/v0.6.1/tangle-testnet-linux-amd64 && chmod +x tangle
sudo cp tangle /usr/bin/

Create service

edit YourName

Ubah semua YourName ke nama mu

sudo tee /etc/systemd/system/tangle.service > /dev/null << EOF
[Unit]
Description=Tangle Validator Node
After=network-online.target
StartLimitIntervalSec=0
[Service]
User=$USER
Restart=always
RestartSec=3
ExecStart=/usr/bin/tangle \
--base-path $HOME/.tangle/data/validator/YourName \
--name YourName \
--chain tangle-testnet \
--auto-insert-keys \
--node-key-file "/home/YourName/node-key" \
--port 30333 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--no-mdns
[Install]
WantedBy=multi-user.target
EOF

Enable service

sudo systemctl daemon-reload
sudo systemctl enable tangle
sudo systemctl start tangle

Check logs

sudo journalctl -u tangle -f --no-hostname -o cat
  • Contoh Output:
Output
2023-03-22 14:55:51 Tangle Standalone Node
2023-03-22 14:55:51 ✌️ version 0.1.15-54624e3-aarch64-macos
2023-03-22 14:55:51 ❤️ by Webb Technologies Inc., 2017-2023
2023-03-22 14:55:51 📋 Chain specification: Tangle Testnet
2023-03-22 14:55:51 🏷 Node name: cooing-morning-2891
2023-03-22 14:55:51 👤 Role: FULL
2023-03-22 14:55:51 💾 Database: RocksDb at /Users/local/Library/Application Support/tangle-standalone/chains/local_testnet/db/full
2023-03-22 14:55:51 ⛓ Native runtime: tangle-standalone-115 (tangle-standalone-1.tx1.au1)
2023-03-22 14:55:51 Bn254 x5 w3 params
2023-03-22 14:55:51 [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators
2023-03-22 14:55:51 [0] 💸 generated 5 npos targets
2023-03-22 14:55:51 [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators
2023-03-22 14:55:51 [0] 💸 generated 5 npos targets
2023-03-22 14:55:51 [0] 💸 new validator set of size 5 has been processed for era 1
2023-03-22 14:55:52 🔨 Initializing Genesis block/state (state: 0xfd16…aefd, header-hash: 0x7c05…a27d)
2023-03-22 14:55:52 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2023-03-22 14:55:53 Using default protocol ID "sup" because none is configured in the chain specs
2023-03-22 14:55:53 🏷 Local node identity is: 12D3KooWDaeXbqokqvEMqpJsKBvjt9BUz41uP9tzRkYuky1Wat7Z
2023-03-22 14:55:53 💻 Operating system: macos
2023-03-22 14:55:53 💻 CPU architecture: aarch64
2023-03-22 14:55:53 📦 Highest known block at #0
2023-03-22 14:55:53 〽️ Prometheus exporter started at 127.0.0.1:9615
2023-03-22 14:55:53 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-03-22 14:55:53 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-03-22 14:55:53 discovered: 12D3KooWMr4L3Dun4BUyp23HZtLfxoQjR56dDp9eH42Va5X6Hfgi /ip4/192.168.0.125/tcp/30304
2023-03-22 14:55:53 discovered: 12D3KooWNHhcCUsZTdTkADmDJbSK9YjbtscHHA8R4jvrbGwjPVez /ip4/192.168.0.125/tcp/30305
2023-03-22 14:55:53 discovered: 12D3KooWMr4L3Dun4BUyp23HZtLfxoQjR56dDp9eH42Va5X6Hfgi /ip4/192.168.88.12/tcp/30304
2023-03-22 14:55:53 discovered: 12D3KooWNHhcCUsZTdTkADmDJbSK9YjbtscHHA8R4jvrbGwjPVez /ip4/192.168.88.12/tcp/30305
  • Contoh Output kalo dah sync:
Output
2021-06-17 03:07:39 🔍 Discovered new external address for our node: /ip4/10.26.16.1/tcp/30333/ws/p2p/12D3KooWLtXFWf1oGrnxMGmPKPW54xWCHAXHbFh4Eap6KXmxoi9u
2021-06-17 03:07:40 ⚙️ Syncing 218.8 bps, target=#5553764 (17 peers), best: #24034 (0x08af…dcf5), finalized #23552 (0xd4f0…2642),173.5kiB/s ⬆ 12.7kiB/s
2021-06-17 03:07:45 ⚙️ Syncing 214.8 bps, target=#5553765 (20 peers), best: #25108 (0xb272…e800), finalized #25088 (0x94e6…8a9f),134.3kiB/s ⬆ 7.4kiB/s
2021-06-17 03:07:50 ⚙️ Syncing 214.8 bps, target=#5553766 (21 peers), best: #26182 (0xe7a5…01a2), finalized #26112 (0xcc29…b1a9),5.0kiB/s ⬆ 1.1kiB/s
2021-06-17 03:07:55 ⚙️ Syncing 138.4 bps, target=#5553767 (21 peers), best: #26874 (0xcf4b…6553), finalized #26624 (0x9dd9…27f8),18.9kiB/s ⬆ 2.0kiB/s
2021-06-17 03:08:00 ⚙️ Syncing 37.0 bps, target=#5553768 (22 peers), best: #27059 (0x5b73…6fc9), finalized #26624 (0x9dd9…27f8),14.3kiB/s ⬆ 4.4kiB/s

Bond TNT dan setup validator

  • Go to PolkadotJS
  • Create 2 Akun, 1 untuk Stash 1 untuk Controller
  • stash
  • Pilih akun stash & controller, lalu masukan nominal
  • Kembali ke VPS
  • Generate session key
Session Keys
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
  • Copy 0x Output
  • Kembali ke PolkadotJS
  • Klik itu, Set Session Key
  • stash
  • Isi dengan 0x Output yang tadi
  • Lalu validate Validate

Setting identity

  • Ke Polkadot
  • Pilih akun stash mu: Set on-chain Identity
  • Isi semua data yang mau

Telemetry


danger

⚠️ Jika Anda ingin menghapus ⚠️

sudo systemctl stop tangle
sudo systemctl disable tangle
rm -r /usr/bin/tangle
cd $HOME
rm -r .tangle