๐งชSession Stagenet Single Contributor Node Setup
This guide will walk you through the complete process of setting up, staking, and running a single contributor stagenet Session Node.
Running a stagenet Session Node
You can run the stagenet Session Node software on any device running a supported operating system, but for the purposes of this guide, we'll assume you will be setting up a stagenet Session Node on a remote Ubuntu or Debian server. If you're new to Linux or running servers in general, this is the most straightforward approach. If you're more experienced and would prefer to run your stagenet Session Node on a different operating system, you'll need to modify the syntax of some commands to suit your system of choice.
Running a stagenet Session Node: Requirements
These are the current basic requirements for running a stagenet Session Node. Note that these are generally much less than required for a mainnet node!
Spec | Requirement |
---|---|
Latest stagenet Session Node software | Latest stagenet Session Node |
Server operating system | Ubuntu 20.04+ (latest LTS recommended) or Debian 11+ (latest stable recommended) |
Storage | 2GB or more |
RAM | 2GB |
Connectivity | 100Mb or faster |
Stagenet Session Nodes in a nutshell
A stagenet Session Node starts as a full node on the Oxen stagenet blockchain.
The full node becomes a stagenet Session Node when the owner locks the required amount of SENT (see below) and submits a registration transaction.
Once accepted by the network, the stagenet Session Node starts performing node operations and becomes eligible to earn rewards in the form of test SENT.
Stagenet Session Node functionality
Stagenet Session Nodes:
Monitor the Arbitrum Sepolia test network for new registrations and departures.
Provide signatures required to withdraw rewards via Arbitrum
Monitor other stagenet Session Nodes and vote on their performance
Produce new blocks for the network via Pulse PoS
Receive, store, and forward encrypted Session messages (not active currently)*
Route Lokinet traffic (not active currently)*
Are called into quorums that give them authority over Blink transactions (not active currently)*
*As of July 16, 2024, Stagenet Session Nodes will only run the oxend-stagenet program, and do not currently run the Storage Server or Lokinet programs. As these programs are integrated into future iterations of stagenet and testnet Session Nodes, the functionality and requirements of nodes may change accordingly.
Stagenet Session Node set-up for new users
Step 1: Obtaining a server
Choosing where to set up your stagenet Session Node is the first and most critical decision you will face in setting up and running your node. There are a number of factors to consider. Because you will be locking up test SENT as part of operating your stagenet Session Node, you will want to ensure, at a minimum, that your server meets the technical requirements given above.
Your aim is to provide a stable, reliable server with good network connectivity, so that data can be efficiently routed to and from your node. An underpowered or poorly connected node will have a poor response time and add latency to the network for all users whose traffic passes through it, resulting in a less than optimal experience.
It is possible to run a stagenet Session Node alongside an existing (mainnet) Oxen Service Node without interfering with the mainnet Node. Note that this will modestly increase the VPS requirements and should only be done if the mainnet Node has excess resources.
If your server goes down while staked, your stagenet Session Node could be deregistered from the network and your test SENT locked for 30 days (without receiving rewards).
The simplest and cheapest way to host a server such as a stagenet Session Node is to lease a Virtual Private Server (VPS). There are literally hundreds of options when it comes to VPS providers, but some of the more commonly chosen companies and products are listed below.
The costs referenced in the table below are currently reflective of pricing relevant for an Oxen Service Node, and running a stagenet Session Node will likely be lower cost.
Hosting Provider | Product Name | Cost Per Month ($USD) |
---|---|---|
Netcup | VPS 1000 G8 | 10.50 |
Evolution Host | STARTER | 5.50 |
Online.net | Start-2-S-SSD | 13.99 |
Scaleway | START1-M | 9.33 |
OVH | VPS SSD 2 | 7.61 |
Leaseweb | Virtual Server XL | 34.45 |
Digital Ocean | 4 GB, 2 vCPUs | 24 |
Linode | 4 GB, 2 vCPUs | 20 |
Feral Hosting | Neon Capability | 19.68 |
Trabia | VDS-8G | 38.54 |
Hetzner | EX41-SSD (30 TB) | 39.71 |
Note: We do not endorse any of these providers. This list is merely a selection of some of the popular options at the time of writing. Of course, this popularity comes at the expense of decentralisation. A useful resource in choosing a less common VPS provider is ExoticVM. Another good one is Server Hunter.
In any case, do not just settle on the first provider you encounter. No two are alike. Do your own research and choose a provider that seems professional, reputable and fits your budget.
The better ones will utilise KVM virtualisation technology. In particular, you should steer clear of any VPS which uses OpenVZ. This is an incomplete form of virtualisation that allows VPS capacity to be oversold, and is usually incompatible with the full Session Node software. While it may function for the current stagenet, virtual machines created with it often lack a /dev/tun
device, which effectively prevent it from providing the Lokinet service required for a mainnet Node.
A good VPS provider will also allow you to monitor your machine's resource consumption, seamlessly upgrade to a more powerful server at a later date, remotely reboot the host if it becomes unresponsive, and even recover or rebuild the system using out-of-band access if, for example, a bad configuration change results in lost network access.
When selecting your VPSโ operating system, please choose the latest Ubuntu LTS release or latest Debian stable release (currently 24.04 and 12, respectively) if you want to be able to follow the steps below verbatim.
Step 2: Preparing your server
Every provider has a slightly different way of issuing you access to your new VPS. Most will send an email with the IP address, root username, and a root password to the VPS.
To access your server, you will need an SSH client for your operating system. Because this guide will use Windows to illustrate the setup process, weโll download PuTTY. macOS and Linux users can connect by opening a terminal and typing:
To connect to your VPS, you'll need to paste the provided IP address into the SSH clientโs โHost Name (or IP address)โ input box and click the โOpenโ button. The Port number can usually just be left as 22
.
A terminal window will now appear, prompting you for your log-in details, username (root
) and password, as provided by your VPS provider. When entering your password, characters will not appear in the terminal. This is normal. Hit enter after typing or pasting your password, and you should be logged in to your VPS.
Note: After logging in for the first time, the VPS may prompt you for a new password for the root account. The terminal will require you to enter the new password twice before you can start running commands. If you aren't prompted for a new root password but want to change it anyway, type sudo passwd. Choose something very secure!
2.1: Hot tips for using the console on Windows
Consoles don't quite work like the rest of your computer. Here are some basic tips for navigating your way around the command line!
Don't try copying something by using the usual
Ctrl + C
hotkey! If you want to copy something, do so by highlighting text and then right clicking it and selecting Copy. Pasting works by right clicking a blank area in the console and selecting Paste.If you want to kill a process or stop something from running, press
Ctrl + C
. (This is why you shouldn't try copying something with this hotkey!)You can always check the directory you are in by typing
pwd
, and you can list its contents by typingls
.You can always return to your home directory by typing
cd
and pressing Enter.You can move into a given directory by typing
cd <name>
or move back up one level by typingcd ..
.PuTTY allows you to easily duplicate or restart a session by right clicking the top of the window. Handy if youโre trying to do a few things at once.
2.2: Server preparation continued
Next, update your package lists (the lists that tell your server which software is available for install or upgrade). The following command downloads package lists from their respective package repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
You'll notice a bunch of package lists were downloaded. Once this is complete run the below command to fetch new versions of any packages that came preinstalled on the system.
You'll be prompted to authorise the use of disk space. Type y
and Enter to authorise.
If you are prompted during the upgrade that a new version of any file is available then click the up and down arrows until you are hovering over install the package maintainerโs version
and click Enter.
Alright, good to go. Our server is now set up, up to date, and is not running as root. On to the fun part!
2.3: Firewall configuration
If you are using a firewall then ensure that the following ports are open/reachable
Port 11022 (blockchain syncing)
Port 11025 (stagenet Session Node to stagenet Session Node)
Step 3: Initial repository setup
You only need to do this step the first time you want to set up the Oxen repository; when you've done it once, the repository will automatically update whenever you fetch new system updates.
To add the apt
repository, run the following commands.
This first command installs the public key used to sign the stagenet Session Node packages:
The second command tells apt
where to find the packages.
If your distribution does not have lsb_release
available, you may substitute <DISTRO>
in the following command with the appropriate value to match your operating system. If your VPS is running Ubuntu 24.04 as recommended in this guide, replace <DISTRO>
with noble
.
Other supported distributions include:
bookworm (Debian 12)
bullseye (Debian 11)
noble (Ubuntu 24.04) jammy (Ubuntu 22.04)
focal (Ubuntu 20.04)
We also have repositories for Debian testing (trixie
or testing
) and unstable (sid
or unstable
), and typically support the latest or upcoming Ubuntu non-LTS release. Note, however, that none of these distribution versions are recommended for production stagenet Session Nodes.
Then resync your package repositories with:
Step 4: Getting an Arbitrum Sepolia testnet RPC provider account
You will need to set up an Arbitrum Sepolia RPC provider for your stagenet-oxend to interact with the Arbitrum Sepolia network. This setup will allow your stagenet Session node to communicate with the Arbitrum Sepolia blockchain and to witness and facilitate transactions.
You can use public RPC providers like Infura and Alchemy or set up your own Arbitrum Sepolia full node and connect to that node locally . Whilst Arbitrum has several RPC providers available, getting familiar with these providers will be useful for mainnet where a reliable RPC connection is required for the stability of your node. For testnet the free tier of public providers is currently sufficient to participate.
Arbitrumโs recommendations: https://docs.arbitrum.io/build-decentralized-apps/reference/node-providers#arbitrum-public-rpc-endpoints
Infura: See https://docs.infura.io/api/getting-started and get setup with a Arbitrum Sepolia node through Infura.
Alchemy: See https://docs.alchemy.com/docs/alchemy-quickstart-guide to get setup with an Arbitrum Sepolia node through Alchemy.
For example if you were using Alchemy as an RPC provider your URL would look something like:
Note: The RPC URL here uses a mock API key
Find your RPC URL and copy it for use in the next step.
Step 5: Stagenet Session Node installation and operation
To install the software needed to run a stagenet Session Node, simply install the session-stagenet-node
package:
This will detect your public IP (or allow you to enter it yourself), ask for your Arbitrum Sepolia testnet L2 provider URL, and create the /etc/oxen/stagenet.conf
configuration file with the necessary additional settings to run a stagenet Session Node.
5.1: Interacting with the running oxend-stagenet
oxend-stagenet
So as to not interfere with current mainnet oxend nodes, the stagenet packaging installs its binary under the `oxend-stagenet` command.
If you run the oxend-stagenet
command with an appended command (note that sudo
is not required!), the oxend-stagenet
command forwards this instruction to the running oxend-stagenet
. So, for example, to get the current oxend-stagenet
status you can run you would run:
To see the output log of your node you can run the following command:
This is useful to see if your node is syncing with the blockchain and to see other diagnostic messages that may come up from time to time. (Press Ctrl-C
to stop watching the log).
For a full list of supported commands run:
You can also get basic statistics (such as uptime proof and ping times) on the running daemon from the systemctl status
commands:
Step 6: Stagenet Session Node Registration
6.1: Retrieving your wallet address
You'll need your Ethereum wallet address to register your stagenet Session Node. Navigate to your Ethereum wallet and copy your wallet address.
6.2: Individual Staking
To run a stagenet Session Node as the sole contributor, you'll need:
A fully synchronized, up-to-date Oxen daemon running on your stagenet Session Node
An Ethereum wallet with at least 120 test SENT in it (to meet the staking requirement to register your stagenet Session Node), and sufficient test ETH on the Arbitrum Sepolia network for gas.
If you don't have testnet SENT you can get 240 $SENT from the testnet SENT faucet here
6.3: Preparing your node for registration
Log in (if not already logged in) to the VPS running the stagenet Session Node, then run the following command:
The daemon will output something which looks similar to:
NOTE: This information will be automatically submitted to the stagenet staking website to help with creating the transaction on the Sepolia testnet.
6.4: Registering your Session Node
To register and stake your stagenet Session Node, ensure your Etherem wallet has a balance of at least 120 test SENT as well as sufficient test ETH for gas. If you received test SENT from the faucet, you should have received sufficient test ETH for gas.
Navigate to the Staking Portal and connect your wallet. On the Stake Now page, the node you have prepared registration for will appear above the list of Open Nodes. View the prepared nodeโs details and confirm your registration and stake of 120 SENT.
Step 7: Stagenet Session Node status check
After you've staked to your stagenet Session Node, you can check that stagenet Session Node is running, recognised, and eligible to earn test SENT rewards on the My Stakes page.
Note: It can take a few minutes for your node to become fully registered and appear in the โMy Stakesโ page after submitting the Aribtrum Sepolia transactions
Operating your node
Keeping your binaries up to date
When a new release is available, upgrading is as simple as syncing with the repository:
Then installing updates using:
Note that this will install both updated oxend-stagenet
packages and any available system updates (this is generally a good thing!)
During the upgrade, all instances of oxend-stagenet
will be restarted if they are currently running in order to switch to the updated oxend-stagenet
.
If for some reason you want to install only Oxen package upgrades but not other system package updates, then instead of the sudo apt upgrade
you can use:
Monitoring
Use the My Stakes page to monitor the status of your staked node.
Back-ups
You should immediately make a backup of your Stagenet Session Node's secret keys. This will allow you to migrate your node to a different hardware provider if necessary in the future.
IMPORTANT: These keys should always remain secret and should never be shared with anyone. Sharing these keys can result in the loss of funds or deregistration of your node.
The command to reveal the ed25519 secret keys is:
The command to reveal your BLS secret keys is:
Alternatively, you can use a tool like scp to copy these files off-host for safekeeping.
Restoration
If you backed up your keys and want to restore an unregistered node to use those backed up keys you can use the following commands.
The command to restore an ed25519 key into a file is:
The command to restore BLS key into a file is:
Those commands will create a new key file with the correct formatting called โkey_ed25519โ and โkey_blsโ respectively, if you want to overwrite an existing key file you can pass the โ-- overwriteโ flag as such:
For BLS keys:
You can choose either to overwrite your existing key files in the /var/lib/oxen/stagenet directory using this command or create new key files and swap them out with the existing files, once keys are overwritten or swapped your node can be restarted with the following command:
IMPORTANT: Never remove or replace keys on an active, registered stagenet Session Node!
Unlocking your stake
Stagenet Session Nodes will continually earn test SENT rewards indefinitely until a stake is unlocked or the node becomes deregistered. Functionality to unlock your test SENT stake is not currently enabled as of 16 July, 2024. Once enabled, to unlock your test SENT stake, simply open the Staking Portal and navigate to the My Stakes page. You can then click Unlock for any stake you wish to unlock.
The stagenet Session Node will expire 15 days after the unlock is requested, and your staked test SENT will then become unlocked after expiry.
Deregistrations can be issued at any point during the active lifecycle of a stagenet Session Node, including during the period after requesting an unlock. Deregistration removes your stagenet Session Node from the network, and your stake(s) become locked and unspendable for 30 days from the block in which the stagenet Session Node was deregistered.
Receiving a deregistration after participant(s) have already requested an unlock overrides the 15-day stake unlock time, and sets the unlock time to 30 days.
Running a stagenet Session Node during will be more challenging than running an Oxen Service Node and deregistrations may be more likely. Please stay up to date with changes and ongoing development via Discord.
Conclusion
Well done! Your stagenet Session Node is configured, operational, and will now begin receiving test SENT rewards.
Having trouble? Head to our Discord so that the team can assist you.
Last updated