306 releases (49 breaking)

new 0.82.6 Mar 31, 2023
0.81.0 Mar 27, 2023
0.72.23 Dec 26, 2022
0.71.0 Sep 19, 2022
0.25.18 Dec 21, 2020

#359 in Network programming

Download history 267/week @ 2022-12-09 400/week @ 2022-12-16 84/week @ 2022-12-23 50/week @ 2022-12-30 25/week @ 2023-01-06 63/week @ 2023-01-13 169/week @ 2023-01-20 393/week @ 2023-01-27 865/week @ 2023-02-03 541/week @ 2023-02-10 881/week @ 2023-02-17 320/week @ 2023-02-24 175/week @ 2023-03-03 124/week @ 2023-03-10 67/week @ 2023-03-17 316/week @ 2023-03-24

744 downloads per month

GPL-3.0 license

24K SLoC


The Safe Network Node Implementation.


OpenTelemetry Protocol (OTLP)

OTLP allows for inspecting and visualizing log spans.

By specifying the otlp feature for the sn_node binary, logs will be sent to an OTLP endpoint. This endpoint can be configured by environment variables. (See opentelemetry.io/docs/... for more information.)

export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" # Already the default
export RUST_LOG=sn_node=info # This filters the output for stdout/files, not OTLP
export RUST_LOG_OTLP=sn_node=trace # This filters what is sent to OTLP endpoint 
cargo run --release --bin sn_node --features otlp -- --first --local-addr=

Before running the node, an OTLP endpoint should be available. An example of an OTLP-supporting endpoint is Jaeger, which can be launched with Docker like this (see documentation):

docker run -d --name jaeger \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 14250:14250 \
  -p 14268:14268 \
  -p 14269:14269 \
  -p 9411:9411 \

In the web interface of Jaeger (http://localhost:16686) one can filter several things, e.g. the tag service.instance.id=<PID>, where PID is the process ID of the node. The service name is sn_node.


This Safe Network repository is licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).

Linking exception

safe_network is licensed under GPLv3 with linking exception. This means you can link to and use the library from any program, proprietary or open source; paid or gratis. However, if you modify safe_network, you must distribute the source to your modified version under the terms of the GPLv3.

See the LICENSE file for more details.


Want to contribute? Great 🎉

There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!

For instructions on how to contribute, see our Guide to contributing.


~1.5M SLoC