SUPERALGOS GOVERNANCE

Alex White Proof of Value, February 2024

Network server bug fixes and enhancements

Alex White
Superalgos | Algorithmic Trading

--

Photo by Gabriel Meinert on Unsplash

Network server bug fix

The network server had a bug which caused an ever increasing number of websockets to be connected and never cleared or disconnected. This bug has now been resolved and websocket connections are cleared correctly when closed or terminated.

Network server enhancements

A new CLI interface has been created for the network server the command node network help will display a list of available commands and examples of how to use them, see below.

Superalgos$ node network help

USAGE:
node network [options]

OPTIONS:
--network-signing-account text
A specific P2P network signing account to start using. This overrides the
default "P2P-Network-Node-1"

--include-local-networks true/false
Do you want to include all local networks nodes?

--exclude-localhost true/false
Do you want to exclude all localhost and 127.#.#.# nodes?

--only-me true/false
Do you want to limit the network to only your network nodes?

--users text
Repeat for each username you want to connect to

EXAMPLES:

############################################################
# To specify a network node on your profile called
# Local-Network-Node
############################################################
node network --network-signing-account Local-Network-Node

############################################################
# To limit the network connections to only my network nodes,
# in order for this to work you will need at least 2 network
# nodes setup
############################################################
node network --onlyMe

############################################################
# To exclude all local networks from the connection pool set
# the --include-local-networks to false. This is useful as
# many users will use localhost or a 192 style address when
# testing their own network setup and this will create
# multiple connections self referencing connections.
############################################################
node network --include-local-networks false

############################################################
# To create a network pool with a friend or some specfic
# users then add as many --users <USER> options as you need.
# This will limit the network connection pool to only these
# user networks.
############################################################
node network --users <USER1> --users <USER2>

############################################################
# The options --users and --include-local-networks can also
# be combined so you do not create duplicate local network
# connections. Providing these users are not on your local
# network
############################################################
node network --users <USER1> --users <USER2> --include-local-networks false


Options:
--version Show version number [boolean]
--include-local-networks To exclude all local networks from the
connection pool set the
--include-local-networks to false. This is
useful as many users will use localhost or a
192 style address when testing their own
network setup and this will create multiple
connections self referencing connections.
[boolean]
--exclude-localhost To exclude all localhosts from the connection
pool set the --exclude-localhost to true. This
is useful as many users will use localhost or a
127 style address when testing their own
network setup and this will create multiple
connections self referencing connections.
[boolean]
--only-me To limit the network connections to only my
network nodes, in order for this to work you
will need at least 2 network nodes setup
[boolean]
--users To create a network pool with a friend or some
specfic users then add as many --users <USER>
options as you need. This will limit the
network connection pool to only these user
networks. [array]
--network-signing-account To specify a network node on your profile
called Local-Network-Node [string]
-h, --help Show help [boolean]

A simple useful example of this would be starting the network node for a network node named My-Local-Network. The default set in the Environment.js file is to start the P2P-Network-Node-1 until now you would have had to edit the js file, now you can use run node network --network-signing-account My-Local-Network and it will automatically choose the correct node.

A couple more examples:

You could be during testing a setup and you only want to be able to connect to one of your own network nodes, in this scenario you can just run node network --only-me and the network will ignore all the other user profiles.

You could be testing or just running a network with a couple of friends, so here you can just supply them as users to the command node network --users My-Friend-1 --users My-Friend-2 now the network will only include those 2 user profiles.

--

--