ZeroCopyZeroCopy
SWQoSLocal agent

Configuration

Configure the agent's local listeners, IPC CPU use, logging and optional pinned metros

Pass --config /etc/zerocopy/agent.toml when starting the agent. Restart the service after changing the file.

Example

/etc/zerocopy/agent.toml
# Optional: restrict the agent to these metros.
# upstreams = ["fra.sol.zerocopy.sh:443", "ams.sol.zerocopy.sh:443"]

[listen]
http = "127.0.0.1:8080"
quic = "127.0.0.1:4433"
ipc = "/run/zerocopy/agent.sock"
ipc_busy_poll = true

[log]
level = "info,rustls=error"
format = "text"

upstreams is a top-level key. In TOML, a key written after a [table] header belongs to that table, so keep upstreams above [listen].

Options

OptionValuePurpose
upstreamsArray of "host:port" stringsOptional pinned metros; omit for automatic metro selection
listen.httpIP address and portLocal HTTP and JSON-RPC; defaults to 127.0.0.1:8080
listen.quicIP address and portLocal QUIC; defaults to 127.0.0.1:4433
listen.ipcUnix socket pathSet an explicit path, or "" to disable IPC
listen.ipc_busy_pollBooleanDefaults to true; see Busy polling
log.levelLog filterDefaults to info,rustls=error
log.formattext or jsonDefaults to text

The agent rejects unknown options and values of the wrong type.

Listeners

Keep HTTP and QUIC on loopback. They do not authenticate local callers: anyone who can reach them can submit transactions and incur charges on your account. Both listeners take an IP address and port.

IPC socket

Set ipc to a path in a directory the agent can write. The service example creates /run/zerocopy; the agent does not create the directory itself.

The socket has mode 0660. Give client accounts access through the zerocopy group as described in installation. Keep the path shorter than 108 bytes.

For multiple agents on one host, give each a different socket path, HTTP port and QUIC port.

Busy polling

SettingBehaviorTradeoff
true (default)Polls continuously while any IPC client is connectedUses one CPU core, even when the client is idle
falseSleeps when idle and wakes on submissionsLower idle CPU use, with latency when waking after quiet periods

With no IPC client connected, both modes sleep. This option does not affect HTTP or QUIC. You can use systemd's CPUAffinity= to keep the agent off your application's CPU cores. Custom IPC clients must implement doorbells in either mode.

Logging

Logs go to standard output. Use info, warn, debug or a filter such as info,rustls=error for level. The RUST_LOG environment variable overrides this setting. An invalid filter prevents startup.

Use format = "json" for one JSON object per line. Some log lines contain a site= code instead of a descriptive message; include those lines unchanged when reporting a problem on Discord.

Pinned metros

Leave upstreams unset for automatic metro selection. Set it only when you want the agent to use a fixed list:

Pin two metros
upstreams = ["fra.sol.zerocopy.sh:443", "ams.sol.zerocopy.sh:443"]

Each entry must be a metro's host under sol.zerocopy.sh with a port. IP addresses and the bare name sol.zerocopy.sh are not valid entries. See metro selection and failover before pinning.