Run a Node
The below are instructions for setting up and running on the public Lilypad testnet, including adding a node, obtaining necessary funds, installing required software, and ensuring security measures.
Network information and testnet tokens
The testnet has a base currency of ETH, as well as a utility token called LP. LP is used for both paying for jobs and staking nodes. To add a node to the testnet, follow these steps:
MetaMask
We recommend using MetaMask with custom settings to make things easier. Once you have it installed and setup, here are the settings you should use:
Network name: Lilypad v3 Milky Way testnet
New RPC URL: http://testnet.lilypad.tech:8545
Chain ID: 1337
Currency symbol: ETH
Block explorer URL: (leave blank)
Fund your wallet with ETH and LP
To obtain testnet ETH and LP, go to the Lilypad faucet and enter your ETH address.
The faucet will give you both ETH (to pay for gas) and LP (to stake and pay for jobs).
Prerequisites
Linux (latest Ubuntu LTS recommended)
Nvidia GPU
Nvidia drivers
Docker
Nvidia docker drivers
Install Bacalhau
Bacalhau is a peer-to-peer network of nodes that enables decentralized communication between computers. The network consists of two types of nodes, which can communicate with each other.
To install Bacalhau, run the following in your terminal:
Install Lilypad
With Go toolchain
Via official released binaries
Write env file
You will need to create an environment file for your node. /app/lilypad/resource-provider-gpu.env
should contain:
This is the key where you will get paid in LP tokens for jobs run on the network.
You must not reuse your compute node key as a client, even for testing: this will result in failed jobs and will negatively impact your compute node since the wallet address is how nodes are identified on the network.
Install systemd unit for Bacalhau
systemd is a system and service manager for Linux operating systems. systemd operates as a central point of control for various aspects of system management, offering features like parallelization of service startup, dependency-based service management, process supervision, and more.
To install systemd, open /etc/systemd/system/bacalhau.service
in your preferred editor:
Hint: sudo editor /etc/systemd/system/bacalhau.service
Install systemd unit for GPU provider
Open /etc/systemd/system/lilypad-resource-provider.service
in your preferred editor.
Hint: sudo editor /etc/systemd/system/lilypad-resource-provider.service
Check that they are running with systemctl status as usual, and debug with journalctl if needed.
For example: sudo journalctl -uf lilypad-resource-provider
will give you the live output from your Lilypad node. You should see your resource provider start accepting jobs on the network in the logs.
Please report issues on Bacalhau #lilypad-general Slack.
Security
If you want to allowlist only certain modules (e.g. Stable Diffusion modules), so that you can control exactly what code runs on your nodes (which you can audit to ensure that they are secure and will have no negative impact on your nodes), you can do that by setting an environment variable OFFER_MODULES
in the GPU provider to a comma separated list of module names, e.g. sdxl:v0.9-lilypad1,stable-diffusion:v0.0.1
Visit the Lilypad GitHub for a full list of available modules.
Last updated