How to interact with XEN protocols TESTNET
- Make sure you're connected to Goerli testnet, NOT ethereum mainnet
- do NOT send real ETH to the contract or you will loose your gas fee
Whole process - HOW TO:
https://www.youtube.com/watch?v=Dc72c4NI_go
STEP 1. Install the Goerli testnet network in your Metamask https://youtu.be/nsAuqfAQCag (skip twitter stuff) STEP 2. Go to any goerli faucet and mint goerliETH: https://goerli-faucet.pk910.de/ 1 minute will be enough.
STEP 3: Test it out: https://testnet.Xen.network
contract adress:
https://goerli.etherscan.io/address/0xca41f293A32d25c2216bC4B30f5b0Ab61b6ed2CB
Network settings:
Network Name: PulseChain Testnet
New RPC URL: https://rpc.v2b.testnet.pulsechain.com
Chain ID: 941
Currency Symbol: tPLS
Pulsechain testnet:
Block Explorer:
Pulsechain Faucet:
Pulsechain contract:
Testnet: https://testnet.xen.network/bsc-testnet
Faucet: https://testnet.binance.org/faucet-smart
Enter in the BSC testnet details as follows:
Network Name: BSC Testnet New RPC URL: https://data-seed-prebsc-1-s1.binance.org:8545 ChainID: 97 Symbol: BNB Block Explorer URL: https://testnet.bscscan.com/
Network: Mumbai Testnet
RPC: https://rpc-mumbai.maticvigil.com/
Chain ID: 80001
Symbol: MATIC
Explorer: https://mumbai.polygonscan.com/
Facuet:
Testnet:
SERVER SPECIFICATION I AM USING
My Server is a hosted cloud virtual server. If you want to build your own server then you can but there will be extra requirements. All I list here is valid for hosted servers.
6 vCPU Cores
16 GB RAM
600 GB SSD
32 TB Traffic*Unlimited Incoming
Ubuntu 20.04
All instructions below are based on using Ubuntu. If you are using a different version of Linux then you may need to adjust the commands. All commands that need typing in are in red and you will need to press the enter button after each one.
One point to note is that validation or creation of new blocks isn't possible yet. There will be another version of this chain where people will be allowed to start block production
Putty is required for this as well so please use the instructions above for installing and using Putty.
First thing we need to do is install docker. I am not going to go deeply into what docker is and how to use it as I want to keep this simple but there are plenty of good resources online.
The Docker installation package available in the official Ubuntu repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package. All instructions assume that you have root access. If your user does not then you will need to add ‘sudo’ in front of them.
First, update your existing list of packages:
Next, install a few prerequisite packages which let apt
use packages over HTTPS:
Then add the GPG key for the official Docker repository to your system:
Add the Docker repository to APT sources:
This will also update our package database with the Docker packages from the newly added repo.
Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:
You’ll see output like this, although the version number for Docker may be different:
Output of apt-cache policy docker-ce
Finally, install Docker:
Docker should now be installed, the daemon started, and the process enabled to start on boot. Check x
The output should be similar to the following, showing that the service is active and running:
Full credit for this package goes to Xen Community member bok11. He created this docker package so big thanks to him.
Run
This pulls down the docker package
Run
You will now see the X1 validator start up and begin to sync. Again, this took 18 hours for me so just let it do what it needs to.
You can check the status of the service with systemctl status x1-validator.service and stop it with systemctl stop x1-validator.services. To see the logs, run journalctl -u x1-validator.service -f
Here I list some useful docker commands. Please always do your research before using any of them if you are inexperienced with Docker. Google is a great resource. As of Docker 19, the complete list of available subcommands includes:
Additional notes
You will need to set the number of files Opera can use. This can be done with the command
You can check the number of open files with the command
where the 12298 is the PID of my Opera instance. You will need to change that for the PID of your particular instance. To get your PID run the command top and you will get something similar to below where you can see where I got my PID from.
swap space
It is also useful and advisable to have a swap file activated. A swap file allows Linux to simulate the disk space as RAM. When your system starts running out of RAM, it uses the swap space to and swaps some content of the RAM on to the disk space. This frees up the RAM to serve more important processes. When the RAM is free again, it swaps back the data from the disk. I have 16gb swap space set but you could just as easily use 32gb.
Before you go and start adding swap space, it would be a good idea to check whether you have swap space already available in your system.
If you don’t have a swap space on your system, it should show something like this:
The swapon command won’t show any output.
First thing first, create a file with the size of swap space you want. Let’s say that I want to add 16 GB of swap space to my system. Use the fallocate command to create a file of size 16 GB.
It is recommended to allow only root to read and write to the swap file. You’ll even see warning like “insecure permissions 0644, 0600 suggested” when you try to use this file for swap area.
Do note that the name of the swap file could be anything. If you need multiple swap spaces, you can give it any appropriate name like swap_file_1, swap_file_2 etc. It’s just a file with a predefined size.
Your need to tell the Linux system that this file will be used as swap space. You can do that with mkswap tool.
Now your system knows that the file swapfile can be used as swap space. But it is not done yet. You need to enable the swap file so that your system can start using this file as swap.
Now if you check the swap space, you should see that your Linux system recognizes and uses it as the swap area:
Whatever you have done so far is temporary. Reboot your system and all the changes will disappear.
You can make the changes permanent by adding the newly created swap file to /etc/fstab file.
It’s always a good idea to make a backup before you make any changes to the /etc/fstab file.
Now you can add the following line to the end of /etc/fstab file:
You can do it manually using a command line text editor or you just use the following command:
Now you have everything in place. Your swap file will be used even after you reboot your Linux system.
Install PuTTY from https://www.putty.org.
Open PuTTY on your computer and enter your server’s SSH IP and SSH Port.
Click the Open button to proceed.
Enter your SSH username and password when prompted. The screen won’t show the password but will register what you type. It is best to login with root access if possible.
You are now connected to your server via PuTTY. You can use commands to interact with your server.
It is sometimes useful to install ‘go’ as well if your server does not already have it installed. Mine did but it has been pointed out that other people did not have this.
Search for Go:
sudo apt search golang-go sudo apt search gccgo-go
Install Golang
sudo apt install golang-go
To start the install of Opera you first need to download the required files. Run the below command to do this.
You may get an error that says git command is not available. If you do then you can install it very easily. First update the package index by running
apt update
To install git then run
apt install -y git-all
You then need to go to the go-opera folder. Change directory by typing
cd go-opera
Create the Opera Binary by running:
make opera
Again, if you get an error saying make is not available you can install it by typing
apt install make
Once this is completed you can check it is there by typing the commands
cd build
ls
This will change directory to the build folder and then list everything in that folder.
Move the Opera binary to /usr/local/bin by running
Change directory to /usr/local/bin by running
Copy and paste the following. The easiest way to paste in Linux is just to right click where the cursor is.
Now, if you type tail -f opera.log you will see it is starting to sync. This took about 18 hours on my server but just leave it to do what it needs to do until it is finished.
Configuring your X1 Fastnet Validator Node
USE these instructions for either docker based set up or non-docker