DROSERA NETWORK
DROSERA TESTNET IS LIVE
Drosera Introduction
Drosera is a passionate team of developers and researchers who are dedicated to building trustless and decentralized infrastructure for detecting exploits and mitigating financial loss. Drosera is an automation protocol that simplifies the process of creating monitoring systems for decentralized applications. It provides a framework for creating and executing automated responses to events on the Ethereum network, enabling developers to create more robust and secure applications. Learn More
Pre-installation
System Requirements
Recommended System Requirements:
- 2 CPU Cores
- 20GB Storage
- 4GB RAM
- 10Mbps Internet
How to Get Your own Private RPC
1. Installing Dependencies & Environments
1.1 First Method: 1-Click Installer
curl -fsSL https://raw.githubusercontent.com/jprsyt5/Drosera-Network/refs/heads/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.shDO NOT FOLLOW THE STEPS BELOW IF YOU CHOSE THE FIRST METHOD
If you used the 1-click installer, once the command runs successfully and you see the success message, you can skip the rest of this section and jump straight to Opt-in Trap directly.
1.2 Second Method: Manual Install
First, update and upgrade your system by running the following commands:
sudo apt-get update && sudo apt-get upgrade -yThen install the required dependencies:
sudo apt install curl ufw iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -yInstall the Drosera CLI:
curl -L https://app.drosera.io/install | bash
source /root/.bashrc
droseraupInstall the Foundry CLI:
curl -L https://foundry.paradigm.xyz | bash
source /root/.bashrc
foundryupInstall Bun:
curl -fsSL https://bun.sh/install | bash2. Configuring Drosera CLI & Deploy Trap
Create a new folder and move into it:
mkdir Drosera-Network && cd Drosera-NetworkAdd your GitHub email and username. Make sure to replace Github_Email and Github_Username with your actual GitHub account details before running this command:
git config --global user.email "Github_Email"
git config --global user.name "Github_Username"Download the trap configuration template:
forge init -t drosera-network/trap-foundry-templateSet up Bun:
curl -fsSL https://bun.sh/install | bash
source /root/.bashrc
bun installBuild the project:
forge buildDeploy your Trap:
DROSERA_PRIVATE_KEY=xxx drosera apply
Click the image to zoom
You can check if the trap was successfully deployed by going to app.drosera.io, connecting the wallet you used in this tutorial, and clicking the Traps Owned button.
3. Operator Setup
3.1 Whitelist Operator
Make sure you're in the same directory as your drosera.toml file, then run:
nano drosera.tomlAdd the highlighted lines to the bottom of your drosera.toml. Also, replace YOUR_OWN_HOLESKY_RPC with your own RPC:
ethereum_rpc = "YOUR_OWN_HOLESKY_RPC"
drosera_rpc = "https://seed-node.testnet.drosera.io"
eth_chain_id = 17000
drosera_address = "0xea08f7d533C2b9A62F40D5326214f39a8E3A32F8"
[traps]
[traps.mytrap]
path = "out/HelloWorldTrap.sol/HelloWorldTrap.json"
response_contract = "0xdA890040Af0533D98B9F5f8FE3537720ABf83B0C"
response_function = "helloworld(string)"
cooldown_period_blocks = 33
min_number_of_operators = 1
max_number_of_operators = 2
block_sample_size = 10
private = true
whitelist = ["Operator_Address"]
private_trap = trueReplace Operator_Address with your EVM wallet Address. To save your changes, press: CTRL + O, then Enter, then CTRL + X.
Now update the trap configuration by running:
DROSERA_PRIVATE_KEY=xxx drosera apply3.2 Installing Operator CLI
Move back to the home directory:
cd ~Download and extract the Operator CLI:
curl -LO https://github.com/drosera-network/releases/releases/download/v1.16.2/drosera-operator-v1.16.2-x86_64-unknown-linux-gnu.tar.gz && tar -xvf drosera-operator-v1.16.2-x86_64-unknown-linux-gnu.tar.gzTest the CLI to make sure it’s working:
./drosera-operator --versionMove the binary to your global path:
sudo cp drosera-operator /usr/binCheck again to confirm it’s still working:
drosera-operator3.3 Registering Operator
Replace PV_KEY with your Drosera EVM private key, we use the same wallet as our trap wallet. Then replace YOUR_OWN_HOLESKY_RPC with your own private RPC.
drosera-operator register --eth-rpc-url YOUR_OWN_HOLESKY_RPC --eth-private-key PV_KEY3.4 Configuring Port
Enable the firewall and allow the necessary ports:
# Enable firewall
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw enable
# Allow Drosera ports
sudo ufw allow 31313/tcp
sudo ufw allow 31314/tcp3.5 Configuring SystemD service
Find your server's IPv4. To get your server’s IPv4 address, run:
curl ifconfig.me -4Now create the SystemD service. Before running the command below, make sure to replace:
YOUR_OWN_HOLESKY_RPCwith your own RPC URL.PV_KEYwith your private keyVPS_IPwith your server’s IPv4 address
sudo tee /etc/systemd/system/drosera.service > /dev/null <<EOF
[Unit]
Description=drosera node service
After=network-online.target
[Service]
User=$USER
Restart=always
RestartSec=15
LimitNOFILE=65535
ExecStart=$(which drosera-operator) node --db-file-path $HOME/.drosera.db --network-p2p-port 31313 --server-port 31314 \
--eth-rpc-url YOUR_OWN_HOLESKY_RPC \
--eth-backup-rpc-url https://1rpc.io/holesky \
--drosera-address 0xea08f7d533C2b9A62F40D5326214f39a8E3A32F8 \
--eth-private-key PV_KEY \
--listen-address 0.0.0.0 \
--network-external-p2p-address VPS_IP \
--disable-dnr-confirmation true
[Install]
WantedBy=multi-user.target
EOFReload the systemd daemon, enable and start the Drosera service:
sudo systemctl daemon-reload
sudo systemctl enable drosera
sudo systemctl start droseraOptional Command
sudo systemctl stop drosera #Stop Drosera Service
sudo systemctl restart drosera #Restart Drosera Service3.6 Opt-in Trap
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
3.7 Check Node Liveness
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
