Skip to main content

Testnet Guide ๐Ÿงช

Drosera operates on the Holesky testnet. This guide will walk through the steps to get your Operator node onboarded into Drosera's Testnet.

It is recommended a new ECDSA keypair is generated for the Operator node and is funded with testnet ETH. You can obtain testnet ETH from the following Holesky Testnet Faucets:

  1. Download and install the latest release of the Drosera Operator Node by following the instructions in the Installation guide.
  2. Download and install the latest release of the Drosera Delegation Client. The Delegation client is used to automatically opt your Operator node into Traps.
cd ~
curl -LO https://github.com/drosera-network/releases/releases/download/v1.0.2/drosera-delegation-client-v1.0.2-x86_64-unknown-linux-gnu.tar.gz
tar -xvf drosera-delegation-client-v1.0.2-x86_64-unknown-linux-gnu.tar.gz

More information on the Delegation Client can be found in the Delegation Client section.

  1. Configure the Operator node by following the instructions in the Run the Node guide. Testnet Operators will need to use an RPC endpoint for a Holesky Ethereum node.
  2. Register your Operator node by following the instructions in the Register guide.
  3. Start the Operator node by running the following command:
drosera-operator node --eth-rpc-url <rpc-url> --eth-private-key <private-key> --network-public-address <public-address>
  1. Start the Delegation Client by running the following command:
./drosera-delegation-client --eth-rpc-url <eth-rpc-url> --eth-private-key <eth-private-key> --delegation-server-url https://delegation-server.testnet.drosera.io

Note: The same private key used for the Operator node must be used for the Delegation Client. The Delegation Client will automatically opt your Operator node into Traps.

  1. That's it! Your Operator node is now onboarded into Drosera's Testnet. You can monitor the execution of Traps by checking the logs of the Operator node.

Delegation Clientโ€‹

The Delegation Client is a tool used to automatically opt your Operator node into Traps. The Delegation Client is a separate application from the Operator node and requires the same private key used for the Operator node.

It works by querying Drosera's Delegation server which delegates traps to registered Operators as they are created. It is a convenience service that is only used in the testnet environment because it is expected for Operators to manually opt into Traps in a mainnet environment that is based on real value incentives.

Configuraitonโ€‹

The Delegation Client can be configured using CLI arguments, a toml config file, or with environment variables. A combination of either can also be used. The order of precedence is as follows:

  • Command line arguments
  • TOML configuration file ./drosera.toml
  • Environment variables / .env file

CLI Argumentsโ€‹

ArgumentDefaultDescription
--eth-rpc-urlThe Ethereum node used for RPC calls and sending transactions
--eth-chain-idderived from eth rpcThe Ethereum chain id
--eth-private-keyThe private key used to sign transactions
--drosera-addressderived from eth rpcThe address of the main Drosera proxy contract to interact with
--delegation-server-urlThe URL of the delegation server to connect to
--block-polling-interval-ms1000The number of milliseconds to wait between polling for new blocks
--log-levelinfoThe log level for the Operator Node
--log-formatfullThe log format for the Operator Node
--log-outputstdoutThe log output for the Operator Node
-vThe verbosity level to use for instrumentation. -v = warn, -vv = info, -vvv = debug, -vvvv = trace
--otel-export-endpoint""The OpenTelemetry Collector endpoint to send metrics and trace data too
--otel-export-metadata{}The OpenTelemetry Collector metadata to send with metrics and trace data. e.g. Authorization Headers
--network-listen-address0.0.0.0The network interface to bind the HTTP server to. Server is only used for liveness checks
--network-http-port32324The port to bind the HTTP server to (server used for liveness checks /liveness)
--helpDisplay the help menu
--versionDisplay the version of the Delegation Client

TOML Configurationโ€‹

The Drosera Delegation Client can be configured using a TOML configuration file. The configuration file should be named drosera.toml and placed in the root directory of the Delegation Client. The configuration file should be formatted as follows:

Note: Update the toml with your own values. This is an example configuration.

drosera_address = 0xea08f7d533C2b9A62F40D5326214f39a8E3A32F8
block_polling_interval_ms = 1000
delegation_server_url = "https://delegation-server.testnet.drosera.io"

[eth]
private_key = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
chain_id = 17000
rpc_url = http://localhost:8545

[network]
listen_address = 0.0.0.0
http_port = 32324

[instrumentation]
log_level = "info"
log_format = "full"
log_out = "stdout"
otel_export_endpoint = ""
otel_export_metadata = {}

Environment Variablesโ€‹

Example configuration:

export DRO-DROSERA_ADDRESS=0x
export DRO-BLOCK_POLLING_INTERVAL_MS=1000
export DRO-ETH-RPC_URL=
export DRO-ETH-CHAIN_ID=17000
export DRO-ETH-PRIVATE_KEY=0x
export DRO-NETWORK-HTTP_PORT=32324
export DRO-INSTRUMENTATION-LOG_LEVELL=info