<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by PNZ on Medium]]></title>
        <description><![CDATA[Stories by PNZ on Medium]]></description>
        <link>https://medium.com/@0xPNZ?source=rss-6441f24cf232------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XUlodmYdo3rwtnQR-UvtgQ.png</url>
            <title>Stories by PNZ on Medium</title>
            <link>https://medium.com/@0xPNZ?source=rss-6441f24cf232------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 13:20:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xPNZ/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[DARKfi testnet]]></title>
            <link>https://medium.com/@0xPNZ/darkfi-testnet-253851b377c7?source=rss-6441f24cf232------2</link>
            <guid isPermaLink="false">https://medium.com/p/253851b377c7</guid>
            <category><![CDATA[darkfi]]></category>
            <dc:creator><![CDATA[PNZ]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 20:40:26 GMT</pubDate>
            <atom:updated>2023-03-19T20:41:36.208Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a preview story for my dear friend</p><pre>sudo adduser YOURUSERNAME;<br>sudo adduser YOURUSERNAME sudo;<br>groups YOURUSERNAME</pre><p>Install RUST and Cargo in one step</p><pre>curl --proto &#39;=https&#39; --tlsv1.2 -sSf https://sh.rustup.rs | sh;</pre><p>type 1 for the default installation and then reload the shell without logging out-in (it is necessary for letting the shell to find the “cargo” command)</p><pre>source ~/.bashrc</pre><p>I had some problem with the dependencies installed on my node, so I just overkilled it installing quite everything a blockchain node can need.</p><pre>sudo apt-get update;<br>sudo apt-get install git make curl nano jq gcc pkg-config libmpg123-dev -y;<br>sudo apt-get install build-essential checkinstall zlib1g-dev -y;<br>sudo apt-get install binfmt-support clang-14 cmake-data dh-elpa-helper icu-devtools lib32gcc-s1 lib32stdc++6 libarchive13 libc6-i386 libclang-14-dev libclang-common-14-dev libclang-cpp14 libclang1-14 libffi-dev libgc1 libicu-dev libjsoncpp25 libllvm14 libncurses-dev libobjc-11-dev libobjc4 libpfm4 librhash0 libtinfo-dev libxml2-dev libz3-4 libz3-dev llvm-14 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools python3-pygments -y;<br>sudo apt-get install clang-14-doc cmake-doc ninja-build cmake-format lrzip icu-doc ncurses-doc libssl-doc llvm-14-doc python-pygments-doc ttf-bitstream-vera -y;<br>git clone https://github.com/darkrenaissance/darkfi</pre><p>Let’s target rust:</p><pre>rustup target add wasm32-unknown-unknown --toolchain stable</pre><p>and now, make time!</p><pre>cd darkfi;<br>git pull &amp;&amp; git checkout v0.4.1;<br>make BINS=drk</pre><p>Now, it’s make time:</p><pre>make darkfid drk<br>OR<br>make BINS=drk</pre><p>Let’s run once darkfid in order to let the process to create the config file:</p><pre>./darkfid</pre><p>The config file will be created in &quot;~/.config/darkfi/darkfid_config.toml&quot;; so review it and run again the process.</p><p>The most important thing to change in the file is the “ Password for the wallet database”, but prob in testnet you don’t care.</p><p>The best way to have the node running is to have a service file that manage the process in background, so let’s create it:</p><pre>sudo nano /etc/systemd/system/darkfi.service</pre><p>In this service file, change YOURUSER with your username</p><pre>[Unit]<br>Description=DarkFi Node<br>After=network.target<br><br>[Service]<br>Type=simple<br>User=YOURUSER<br>WorkingDirectory=/home/YOURUSER/darkfi/<br>ExecStart=/home/YOURUSER/darkfi/darkfid<br>Restart=always<br>RestartSec=10<br><br>[Install]<br>WantedBy=multi-user.target./darkfid</pre><pre>sudo systemctl enable darkfi.service;<br>sudo systemctl restart darkfi.service</pre><p>Now, our node will run in background.</p><p>Check if it everything ok with:</p><pre>sudo systemctl status darkfi</pre><p>You should have never moved from darkfi directory, so we can initialize the wallet with the command:</p><pre>./drk wallet --initialize;<br>./drk wallet --keygen</pre><p>The last command will show your address. If you don’t take note of it, you can recall it with:</p><pre>./drk wallet --address</pre><p>Now, the wallet need to scan the blockchain that your node bootstrapped to check if your address has some unspent founds.</p><p>You’ll do this with this command.</p><pre>./drk scan</pre><p>and then to subscribe to new blocks</p><pre>./drk subscribe</pre><p>Some times the blockchain is so fast, that you’ll get an error that the blockchain synced has not been fully scanned, so combining the two commans would also be good:</p><pre>./drk scan &amp;&amp; ./drk subscribe</pre><p>I like to do this in a tmux instance. If you need to install and run just use:</p><pre>sudo apt-get update<br>sudo apt-get install tmux<br>tmux</pre><p>the simple tmux command will open a second shell in the same path where you are, so you should be in the same darkfi folder.</p><p>Just remeber that you hide a tmux shell with the “ctrl+b” &amp; “d” key combination.</p><p>To get back in the tmux shell, just use the command</p><pre>tmux attach</pre><p>So, now we have a service that is running our node, and a tmux instance that is syncyng our wallet.</p><p>It’s time to airdrop us some funds an</p><pre>./drk airdrop 42</pre><p>Note that currently there is an airdrop limit of 100 testnet coins.</p><p>If your wallet is syncing with the subscribe command, you can check your wallet balance with:</p><pre>./drk wallet --balance</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*BStYe1FxeByp2GiPSHvQiQ.png" /><figcaption>result of the balance argument, after the airdrop</figcaption></figure><p>Now let’s play with our node doing some nice stuffs. If your is a small node, it can suffer a little, so don’t expect the output to be istant:</p><pre>./drk token generate-mint;<br>./drk token list</pre><pre>./drk alias add WCKD {TOKEN1}</pre><p>Now let’s mint some token to ourself:</p><pre>./drk wallet --address;<br>./drk token mint WCKD 42.69 {YOUR_ADDRESS} &gt; mint_tx;<br>./drk broadcast &lt; mint_tx</pre><p>Now our balance will be different for sure (as soon as our txs are broadcasted)</p><pre>./drk wallet --balance</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*DPzhK7ZGR6ApHhvDtFvT2A.png" /><figcaption>result of the balance argument. after the mint of new token</figcaption></figure><p>Now it’s time to add the “DARK” alias to the main testnet token:</p><pre>./drk alias add DARK 12ea8e3KVuBhmSnr29iV34Zd2RsD1MEeGk9xJhcipUqx</pre><p>and to make a payment:</p><p>This will really remember the #bitcoin payments, since the whole balance will be sent, one part to making the payment and another part back to you.</p><pre>./drk transfer 27 DARK HnMjgiWuXsiTHf54RufvVTDCJaCBcGmn1kjJMN495Zx7 &gt; payment_tx;<br>./drk broadcast &lt; payment_tx</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=253851b377c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time to update our SPACES subnet validator!]]></title>
            <link>https://medium.com/@0xPNZ/time-to-update-our-spaces-subnet-validator-787b60d70a8f?source=rss-6441f24cf232------2</link>
            <guid isPermaLink="false">https://medium.com/p/787b60d70a8f</guid>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[validator-node]]></category>
            <category><![CDATA[fuji]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[space]]></category>
            <dc:creator><![CDATA[PNZ]]></dc:creator>
            <pubDate>Fri, 11 Feb 2022 11:32:05 GMT</pubDate>
            <atom:updated>2022-03-02T15:17:02.185Z</atom:updated>
            <content:encoded><![CDATA[<p>So, the time has come!</p><p><a href="https://github.com/ava-labs/spacesvm/releases"><em>A new version of SPACES VM has just been released</em></a><em>, and we have to face how to update our Validator (on the primary network and the subnet)!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*a69k9Rf2EplmSlmrM1zp4w.png" /></figure><p>According to Linux netiquette, we have to update our system:</p><pre>sudo apt-get update &amp;&amp; sudo apt-get full-upgrade -y</pre><p>First, we need to update our Primary Network Validator (avalanchego); <a href="https://medium.com/@0xPNZ/set-up-a-validator-node-on-the-avalanche-fuji-testnet-2e0b5c6bccbb">We have installed it via the official installer script,</a> so updating our Primary Validator would be a piece of cake!</p><p>We want to check the version installed last time, so copy-paste this <strong>info.getNodeVersion</strong><a href="https://docs.avax.network/build/avalanchego-apis/info#infogetnodeversion">​</a> API:</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;info.getNodeVersion&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/info</pre><p><em>(tip: for adding code in Medium, just highlight and press [ctrl]+[alt]+6)</em></p><p>the result will be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*sKwbrmG0EQIrMQMye4Fbkw.png" /></figure><p>look for the “platform” information: 1.7.4! Nice; we need to upgrade since it is mandatory to have the 1.7.5 for SPACES ≥ 0.0.2</p><p>If you have installed your node <a href="https://medium.com/@0xPNZ/set-up-a-validator-node-on-the-avalanche-fuji-testnet-2e0b5c6bccbb">via the official installer script</a>, all you need to do is to run the command:</p><pre>./avalanchego-installer.sh</pre><p>Yes, only this one! It will stop the validator service, upgrade everything and restart the service! Soooo smooth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*IDmNHDcmhg7CMW8t" /></figure><p>SUPER! Our Validator is upgraded to the latest version (it will tell us too)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*SF9CuHVxbsdstk2dW1uJcg.png" /></figure><p>Let’s check that the config file has not been replaced and that we are still on the Fuji TestNet (do you remember the <strong>info.getNetworkName API?</strong>)</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;info.getNetworkName&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/info</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*8xSnkDhxmqu6yY8SyNme9Q.png" /></figure><p>Nice!</p><p>We have now to update the SPACES VM (if you see any conflict between the plugin and the node, it is expected, let’s finish all the steps).</p><p>Move to the spacesvm folder, update it via git and build SpacesVM:</p><pre>cd spacesvm;<br>git fetch --all &amp;&amp; git checkout &amp;&amp; git pull;<br>./scripts/build.sh</pre><p>The script will create a new binary that must be moved in the node-plugin folder (<a href="https://medium.com/@0xPNZ/validating-the-spaces-subnet-on-the-avalanche-fuji-testnet-f33f747e5ddf">like the first time</a>):</p><pre>mv ./spacesvm/build/sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm ./avalanche-node/plugins/;</pre><p>Now the node will be in peace with its subnet, and everything will work smoothly;</p><p>For carefulness, let’s restart our node and check what is inside:</p><pre>sudo systemctl restart avalanchego.service;<br>sudo journalctl -u avalanchego -f</pre><p>Excellent; it will bootstrapping what it missed, becoming healthy again.</p><p>Do you remember how to check it? Just call the <strong>health.health API</strong>:</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;health.health&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/health</pre><p>and look for the</p><pre>&quot;healthy&quot;:true</pre><p>condition at the end of the string;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*gvpY5tDEVZHRCxn-rK2rQg.png" /></figure><p><strong>We did it!</strong></p><p>We are back online, healthy, and with the last <em>Primary </em>and <em>Subnet Validator version</em>!</p><p><a href="https://twitter.com/0xPNZ">See you on Twitter!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jm7lxj7GwqXMouHM" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787b60d70a8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Validating the “SPACES” subnet on the Avalanche Fuji TestNet]]></title>
            <link>https://medium.com/@0xPNZ/validating-the-spaces-subnet-on-the-avalanche-fuji-testnet-f33f747e5ddf?source=rss-6441f24cf232------2</link>
            <guid isPermaLink="false">https://medium.com/p/f33f747e5ddf</guid>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[space]]></category>
            <category><![CDATA[avax]]></category>
            <dc:creator><![CDATA[PNZ]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 16:00:05 GMT</pubDate>
            <atom:updated>2022-02-15T16:54:41.204Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@0xPNZ/set-up-a-validator-node-on-the-avalanche-fuji-testnet-2e0b5c6bccbb">With the previous article, </a>we have settled up an <strong>Avalanche Fuji TestNet validator; </strong>now it’s time to add a subnet to our validator!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0HPVknQZkEhbG0Q1qru7w.png" /></figure><p>I’ll start with the SPACES subnet, so let’s do it:</p><p>All the formal instructions are <a href="https://github.com/ava-labs/spacesvm#running-the-vm">here</a>;</p><p>On my VPS, being a fresh one, I needed to install some basic dependencies like <em>GCC</em>, before all, so:</p><pre>sudo apt-get install build-essential -y</pre><p>Now we can download and build the SpacesVM</p><pre>git clone <a href="https://github.com/ava-labs/spacesvm.git">https://github.com/ava-labs/spacesvm.git</a>;<br>cd spacesvm;<br>./scripts/build.sh</pre><p>Running the above commands will generate a binary and save it as:</p><p>~/spacesvm/build/sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm</p><p>We need to move that binary in the <em>plugins </em>directory of the node; (the name of the binary is always the same). So my command was:</p><pre>mv ./spacesvm/build/sqja3uK17MJxfC7AN8nGadBw9JK5BcrsNwNynsqP5Gih8M5Bm ./avalanche-node/plugins/;</pre><p>This is because the <em>plugins </em>directory is in the <em>avalanche-node</em> folder;</p><p>Now, we need to tell our node that the SPACES subnet is in whitelist: we’ll do it via config file:</p><pre>sudo nano ~/.avalanchego/configs/node.json</pre><p>This is an example of a proper config file settled with a dynamic-public-ip:</p><pre>{<br>  &quot;dynamic-public-ip&quot;: &quot;opendns&quot;,<br>  &quot;http-host&quot;: &quot;&quot;,<br>  &quot;network-id&quot;:&quot;fuji&quot;,<br>  &quot;health-check-frequency&quot;:&quot;2s&quot;,<br>  &quot;log-display-level&quot;:&quot;INFO&quot;,<br>  &quot;log-level&quot;:&quot;INFO&quot;,<br>  &quot;whitelisted-subnets&quot;:&quot;Ai42MkKqk8yjXFCpoHXw7rdTWSHiKEMqh5h8gbxwjgkCUfkrk&quot;<br>}</pre><p>Exit from <em>nano, </em>saving the file as usual ([ctrl]+[x]…), and restart the node:</p><pre>sudo systemctl daemon-reload<br>sudo systemctl restart avalanchego.service</pre><p>as known from the <a href="https://medium.com/@0xPNZ/set-up-a-validator-node-on-the-avalanche-fuji-testnet-2e0b5c6bccbb">previous article</a>, we can question the node via</p><pre>sudo journalctl -u avalanchego -f</pre><p>So, my node is bootstrapping the C Chain and the 2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD Chain (the Spaces one) correctly 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OU-RQZfl3Ol7ZYC5ZOJh2Q.png" /></figure><p>Once everything is ok, you’ll be able to see your NodeID <a href="https://testnet.avascan.info/staking/validators?subnet=Ai42MkKqk8yjXFCpoHXw7rdTWSHiKEMqh5h8gbxwjgkCUfkrk">in the validators list of the SPACES subnet</a>;</p><p>Don’t forget that the SPACES subnet is a permissioned network right now; <a href="https://docs.google.com/forms/d/e/1FAIpQLSdIY5y2UtwaD5xDi-EoUjugPJLgmUQoTjCd9l3KhtH-cIw-5Q/viewform">so you need to apply once your node is entirely bootstrapped</a> (everyone will be approved)</p><p>Welcome to the party, frens!</p><p><a href="https://twitter.com/0xPNZ">See you on Twitter!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*Hkdq8XpAt9BlZvtepJbURQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f33f747e5ddf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set up a validator node on the Avalanche Fuji TestNet]]></title>
            <link>https://medium.com/@0xPNZ/set-up-a-validator-node-on-the-avalanche-fuji-testnet-2e0b5c6bccbb?source=rss-6441f24cf232------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e0b5c6bccbb</guid>
            <category><![CDATA[avax]]></category>
            <category><![CDATA[testnet]]></category>
            <category><![CDATA[fuji]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[validator]]></category>
            <dc:creator><![CDATA[PNZ]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 15:22:16 GMT</pubDate>
            <atom:updated>2025-03-27T11:14:35.470Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a step-by-step guide to run a validator on the Fuji Testnet using the Avalanche.go installer script.</em></p><p>You can use this article also for the MainNet; just don’t set the TestNet parameter in the config file, and you are ready to go 😉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HfLf4KiINyaD1PqHBqIaqg.jpeg" /></figure><p><em>When I succeed in doing a setup, I use to note the proper steps down in order to save the workflow; this time, I want to make it public, to receive suggestions and to help others to find the easy path </em>🎩</p><p>Mine configuration is a fresh new VPS with 8 vCPU, 30GB RAM, 800 GB SDD (not NVMe), using Ubuntu 20.04. It should be an exemplary configuration for the MainNet too;</p><p>First of all, start with an update, as usual, and install some dependencies (one command per line):</p><pre>sudo apt-get update;<br>sudo apt-get full-upgrade -y</pre><pre>sudo apt-get install snapd -y;<br>sudo snap install go --classic</pre><p><em>(tip: for adding code in Medium, just highlight and press [ctrl]+[alt]+6)</em></p><p>To make your machine secure, install fail2ban and config it, activating the SSH jail and changing the jail time (10min is too low for modern brute force algo):</p><pre>sudo apt-get install fail2ban -y<br><br>#edit the database purge time:<br>sudo nano /etc/fail2ban/fail2ban.conf<br>  dbpurgeage = 86400000<br><br>#Edit a config file that monitors SSH logins:<br>#(you should use the .local to don&#39;t screw the original .conf file but...)<br>sudo nano /etc/fail2ban/jail.conf<br><br>#find and edit the time in jail:<br>  bantime  = 86400000<br>  findtime  = 86400000<br><br>#find the sshd part or add it at the end of the file<br>#in the most recent version, it is present but needs to be integrated / activated:<br>  [sshd]<br>  enabled = true<br>  port = &lt;22 or your random port number&gt;<br>  filter = sshd<br>  logpath = /var/log/auth.log<br>  # whitelisted IP addresses<br>  ignoreip = &lt;list of whitelisted IP address, your local daily laptop/pc&gt;<br>  <br>#save and close the files<br>sudo systemctl restart fail2ban<br><br>#check if the jail is active:<br>sudo cat /var/log/fail2ban.log</pre><p>In case you want to create a new superuser:</p><pre>sudo adduser YOURUSERNAME;<br>sudo adduser YOURUSERNAME sudo;<br>groups YOURUSERNAME<br>#last command should return the group &quot;sudo&quot;; you are ok!</pre><p>Disable the root user (locking it; are you not using the root user as default, right?!?)</p><pre>sudo passwd -l root<br>#(use the argument -u to re-activate)!</pre><p>And, in case you are using a Ubuntu Desktop version, remove LibreOffice; we won’t need it</p><pre>sudo apt-get remove --purge libreoffice*<br>sudo apt-get autoclean<br>sudo apt-get autoremove</pre><p>Now, its time to download the Avalanchego installer file (the full instructions are ➔ <a href="https://docs.avax.network/build/tutorials/nodes-and-staking/set-up-node-with-installer/">here</a>)</p><pre>wget -nd -m https://github.com/ava-labs/builders-hub/blob/master/scripts/avalanchego-installer.sh</pre><p>make the file executable:</p><pre>chmod 755 avalanchego-installer.sh</pre><p>and launch the installer:</p><pre>./avalanchego-installer.sh</pre><p>Choose [1] if you are in a residential network or [2] if in a cloud provider during the installation process.</p><p><strong>The installer makes the AvalancheGo running as a service, so it is very reliable;</strong></p><p>Just check if everything is ok running:</p><pre>systemctl status avalanchego.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*wgj4M3YxEKC2zy-NP4KLUw.png" /><figcaption>This is what you want to see! The process is Active (running).</figcaption></figure><p><em>Now you have a full node running on the MainNet!</em> 🚀</p><p>Sometimes I had troubles with OpenDNS to resolve my IP address; In this case, you see a warning message in the process’ status, and you can change the service via the config file. For our purpose, <strong>we need to switch to the Fuji TestNet too</strong>, so let’s edit the config file of the node:</p><pre>sudo nano ~/.avalanchego/configs/node.json</pre><p>adding the network argument in the file (don’t forget to add a comma to the previous string, if present)</p><pre>&quot;network-id&quot;: &quot;fuji&quot;</pre><p>So, now, my config file looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*_BWqSOdI7oIUlfVlIaaARA.png" /></figure><p>It is an elementary config file, but it works.</p><p>If you want to change the OpenDns service, you can choose ifconfigco or ifconfigmetoo;</p><p>Another way to obtain this is to edit the <em>avalanchego.service</em> and then add the network argument to the <em>ExecStart </em>line, but the official discord does not suggest it;</p><p>So now reload the daemon and the service:</p><pre>sudo systemctl daemon-reload<br>sudo systemctl restart avalanchego.service</pre><p>Here we are! The node will start bootstrapping the Fuji TestNet and running as a service; so we can interact with the node having it running in the background; (spoiler: the complete bootstrap will take a few days)</p><blockquote>Follow these steps only if you are confident with the firewall management of your server:</blockquote><blockquote>Don’t forget to open the <strong>9651 TCP </strong>port on your router, having your machine under a static IP.</blockquote><blockquote>This will enable the 9651 TCP port on your local firewall:</blockquote><pre># By default, deny all incoming and outgoing traffic<br>sudo ufw default deny incoming<br>sudo ufw default allow outgoing<br>sudo ufw allow 9651/tcp<br># Enable firewall<br>sudo ufw enable</pre><p>Let’s check if the node is attached to the correct network (copy-paste all the following code and press [Enter])</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;info.getNetworkName&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/info</pre><p>The result of the <strong>info.getNetworkName API </strong>will be something like this:</p><pre>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;networkName&quot;:&quot;fuji&quot;},&quot;id&quot;:1}</pre><p>So, <strong>we are on the Fuji</strong>! Good job!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*EFrI7EhRKdfMTfUM.jpg" /></figure><p>You can check what the node is doing by the command (press [ctrl]+[c] to exit):</p><pre>sudo journalctl -u avalanchego -f</pre><p>Once our node is fully bootstrapped, we’ll need its ID to start staking on it; so copy-paste this (<strong>info.getNodeID API</strong>):</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;info.getNodeID&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/info</pre><p>to have a string like this:</p><pre>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;nodeID&quot;:&quot;NodeID-3sDdKynAv3269ttm8U5qP8bKii3wi6aMn&quot;},&quot;id&quot;:1}</pre><p>Do you see your <strong>Node-ID</strong>? It one will be used to begin validating; write it down, it will be useful later;</p><p>Remember! Make the Tx to start the validating period once your validator is fully healthy. It is to don’t lose uptime; Probably we don’t care a lot in a TestNet, but <strong>we do in a MainNet</strong>! How do you know that? Easy, Avalanche has an API for everything! This is the <strong>health.health API</strong>:</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;health.health&quot;<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/health</pre><p>The output can be not so easy to read if not well-formatted, but the last part is the more important to care:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*JExaRb1IawNu_opkd3XOfQ.png" /></figure><p>“healthy”:false = do not start validating</p><p>“healthy”:true = your node is perfect, and you can start validating!</p><p>Reading all the error messages carefully, in my case, I can see that the problem here is that the <em>“primary subnet has not finished bootstrapping”</em>.</p><p>So, here we are!</p><p>Once the node is healthy, we’ll need to activate it, starting the validation period!</p><p>To have our node active on the network, you must perform a Tx on the P-Chain from your very own Avax wallet. Be sure to access the official website: <a href="https://wallet.avax.network/">https://wallet.avax.network/</a></p><p>(<a href="https://shop.ledger.com/products/ledger-nano-s?r=cfa3">using a ledger nano </a>for a TestNet is overkill but, for the MainNet, it is a must!)</p><p>In the wallet, you have to:</p><ol><li>deposit some FUJI AVAX from <a href="https://faucet.avax-test.network/">the faucet</a>;</li><li>cross 1 FUJI AVAX from X-Chain to P-Chian</li><li>In the <em>Earn </em>section, choose <strong><em>Add Validator</em></strong></li><li>Indicate the NodeID of your validator</li><li>Set the <em>Staking End Date</em> and the <em>Stake Amount</em> (max for me)</li><li><em>Confirm </em>and <em>Submit</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LLfVYKRLOQsL5LKEJEaFhw.png" /></figure><p>So, we are all set! The validator will take some time to be accepted in the network;</p><p><strong>Now we have a perfect Avalanche Fuji TestNet validator running and validating!</strong></p><p><a href="https://testnet.avascan.info/">If you want to check your validator, you can use the Avascan.info tool; it can connect to the Fuji TestNet too</a>; I love it! Just paste your node id!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*Oz59z5WO4yu8z2AV5Ux3xA.png" /></figure><p>Then, we can start validating a subnet too, like SPACES, but <a href="https://medium.com/@0xPNZ/validating-the-spaces-subnet-on-the-avalanche-fuji-testnet-f33f747e5ddf">it is another medium.</a></p><p><a href="https://twitter.com/0xPNZ">See you on Twitter!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/0*S_Ik6TBMP0LJa3ZV.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e0b5c6bccbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>