Sylo Nodes are the building blocks of the decentralized Sylo Networks. They work together to provide connectivity and network resources to users of decentralized applications, like the Sylo Smart Wallet.
The Sylo Node has a few commands. Let's briefly identify them.
Generate a Sylo Node configuration file. You can fill in your configuration values and use the file to start a Sylo Node.
Creates a Sylo Node identity file. NOTE: these files should be kept secure!
Displays the version information for the Sylo Node.
There are several configuration options used by the Sylo Node:
| Name | Description |
|---|---|
--config FILE | Load the Sylo Node configuration from the specified file |
--node-nickname NAME | A nickname used to identify this Sylo Node |
--identity FILE | A file that contains the Sylo Node ID |
--data-directory PATH | A path the Sylo Node can use for storing persistent data |
--pns-uri URI | The Sylo Node will send push notifications using the provided URI |
--reporting-uri URI | Node reports are sent to this URI |
--listen MULTIADDR | The local multiaddr the Sylo Node will listen to |
--public-ip-addr IP_ADDRESS | The nodes' reachable public ip address |
--bootstrap-peer MULTIADDR | Connect to another peer and join an existing Sylo Network |
--rpc-ip-address IP_ADDRESS | Host the management RPC on this local IP address |
--rpc-port PORT | Host the management RPC on this local IP port |
--rpc-user USERNAME | Provide a basic authentication username for accessing the RPC |
--rpc-pw PASSWORD | Provide a basic authentication password for accessing the RPC |
--tls-certificate FILE | A path to a TLS certificate file |
--tls-key FILE | A path to the key associated with the TLS certificate |
--network NAME | Blockchain network to use |
--evm-url URL | URL to the Ethereum virtual machine gateway |
--eth-keystore DIRECTORY | A path to the Ethereum keystore directory |
--eth-address ADDRESS | The Ethereum address to use with this Sylo Node |
--eth-passphrase PASSPHRASE | The passphrase used to unlock the Ethereum address |
--events | Automatically start the incentivised event relay service |
--inbox | Automatically start the free inboxing service |
--relay | Automatically start the free relay service |
--config)You can provide your Sylo Node with a nickname, which is used in various places to identify your Sylo Node instead of using generic text or the long libp2p Peer ID.
--node-nickname)You can provide your Sylo Node with a nickname, which is used in various places to identify your Sylo Node instead of using generic text or the long libp2p Peer ID.
--identity)If you don't provide an identity file, the Sylo Node will generate an ephemeral one each time it starts. This is fine for testing, but you will need a permanent one when you want to join an existing Sylo Network.
If you don't already have an identity file, you can generate one like this:
docker run --rm dn3010/sylo-node generate --output node.id
This file contains a private key for the identity, so you should keep it safe. If this file is lost, the associated identity will be lost.
--data-directory)The Sylo Node stores data for peers and also maintains various stores of its
own. This directory will default to ~/.sylo-node. Note that if you use the
Docker image, this will be inside the Docker container you are running.
--pns-uri)If your Sylo Node is supporting the Sylo Smart Wallet, you can leave this as the default value. If you are running another app on the Sylo Network, you may need to pass the URI to your own push notification server.
--reporting-uri)The Sylo Node will send out periodic reports to this URI. These reports include some simple statistics. By default, these reports are sent to Sylo and used to display Sylo Node information in the Sylo Smart Wallet application. The URI can be changed to another location or reporting can be disabled by passing an empty string.
--listen)This is the local P2P multiaddr that the Sylo Node will listen to. It should be
provided in standard multiaddr format (ex. "/ip4/0.0.0.0/tcp/12345").
--public-ip-addr)This is the public ipv4 address used to reach the node from the Internet
(ex. "54.254.167.218").
--bootstrap-peer)You can specify as many bootstrap peers as you like. A minimum of 3 is recommended. The Sylo Node will connect to these nodes when it starts and use the connections to bootstrap onto the Sylo Network. Other peers can be discovered as needed using the network's peer discover DHT.
Bootstrap peers are provided as special P2P multiaddrs, which provide both an endpoint and a peer-to-peer ID. They look like this:
/ip4/123.45.67.89/tcp/12345/p2p/12D3KooWBDsmZbA3owqjnUU1mmprLvE2ZMTLf7kqSJDvSkvjY4Xh
--events)The parameter tells the Sylo Node to automatically start the event relay service when the node is started. The event relay service is used to pass small events between peers. It is similar to an asynchronous push notification service.
This is a boolean flag parameter and takes no additional arguments.
--inbox)This parameter tells the Sylo Node to provide the inboxing service for peers. The inboxing service is used to store messages received while a peer is offline or unable to accept peer-to-peer relay connections.
This is a boolean flag parameter and takes no additional arguments.
--relay)This parameter tells the Sylo Node to assist other peers with making peer-to-peer connections by acting as a relay.
If the node does not act as a relay, peers connected to this node are likely to appear "offline" to other peers on the network.
This is a boolean flag parameter and takes no additional arguments.
Managing the Sylo Node is performed through an HTTP RPC. The management RPC runs on a different IP/port endpoint than the Sylo Node service. The RPC supports TLS with basic authentication, although users may want to add additional access restrictions.
--rpc-ip-address)This is the local IP address the RPC server will bind to.
--rpc-port)This is the local port the RPC server will bind to.
--rpc-user)A basic authentication username, used to access the RPC.
--rpc-password)A basic authentication password, used to access the RPC.
--tls-certificate)Use this option to provide the path to a TLS certificate. This will cause the RPC to be run on an HTTPS server. If your management RPC is hosted on a public address, you should use HTTPS to protect your authentication data.
--tls-key)If you provided a TLS certificate, you will also need to provide the path to a TLS key.
--network)You can run your Sylo Node on different Rootnet networks. You can specify
rootnet-mainnet here to use the Rootnet mainnet. Or porcini to use the
Rootnet testnet. The Sylo Node will load the corresponding smart contract. There
is also an option to run the node on a ganache deployment, which we provide
via docker hub.
If you are running a different network, you can specify the path to a file containing the smart contract addresses you want to use and those will be loaded instead.
--eth-url)You will need to provide an Ethereum gateway for your Sylo Node to access the Ethereum blockchain. This is only necessary if you wish to provide incentivised services with your Sylo Node.
--eth-keystore)The Ethereum Keystore is a directory where encrypted Ethereum keys can be stored. This can either be an existing store or the location of a new store.
--eth-address)You can specify an address from the Ethereum keystore that should be used when the Sylo Node starts.
--eth-passphrase)You can provide the passphrase to unlock the Ethereum address. This is less secure than entering the passphrase yourself when the Sylo Node starts but is provided as an option for automating startup of the Sylo Node. You should only use this option if access to the machine running the node is securely controlled.
| Name | Description |
|---|---|
SYLO_NODE_ENABLE_PANIC | Setting this to true will disable the panic recovery handlers. Typically this should only be used during development. |
Release version numbers are short and self explanatory.
During development version numbers look like this: v1.0.0-254-g799d7573-dirty.
v1.0.0 - the last tagged commit in the history254 - the number of new commits since the tagg799d7573 - the current commit SHAdirty - added if built with uncommitted local dataBefore you are able to compile the protobuf you need to install the dependencies:
https://grpc.io/docs/protoc-installation/
On Macos:
brew install protobuf
On Linux:
sudo apt-get install -y protobuf-compiler
go install \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
make
To create mocking framework of go-sylo-network-client repository, run:
go install github.com/golang/mock/mockgen
make generate-network-client-mocks
To create mocking framework of internal sources, run:
go install github.com/golang/mock/mockgen
make generate-internal-mocks destination="" source=""
Content type
Image
Digest
sha256:70f894560…
Size
363.3 MB
Last updated
about 2 years ago
docker pull dn3010/sylo-node:v2.0.0-substrate-upgrade