918 releases (75 breaking)

0.108.4 Jun 13, 2024
0.107.5 Jun 4, 2024
0.105.3 Mar 28, 2024
0.100.31 Dec 29, 2023
0.25.18 Dec 21, 2020

#11 in #safe-network

Download history 240/week @ 2024-02-26 465/week @ 2024-03-04 3501/week @ 2024-03-18 465/week @ 2024-03-25 517/week @ 2024-04-01 218/week @ 2024-04-08 209/week @ 2024-04-15 433/week @ 2024-04-22 9/week @ 2024-04-29 472/week @ 2024-05-06 176/week @ 2024-05-13 294/week @ 2024-05-20 36/week @ 2024-05-27 1066/week @ 2024-06-03 351/week @ 2024-06-10

1,751 downloads per month
Used in sn_node_rpc_client

GPL-3.0 license

24K SLoC

Safe Network Node (sn_node)


The sn_node directory provides the safenode binary, which is the node implementation for the Safe Network. This directory contains the core logic for node operations, including API definitions, error handling, event management, and data validation.

Table of Contents


Follow the main project's installation guide to set up the safenode binary.


To run the safenode binary, follow the instructions in the main project's usage guide.

Directory Structure

  • src/: Source code files
    • api.rs: API definitions
    • error.rs: Error types and handling
    • event.rs: Event-related logic
    • get_validation.rs: Validation for GET requests
    • put_validation.rs: Validation for PUT requests
    • replication.rs: Data replication logic
    • spends.rs: Logic related to spending tokens or resources
  • tests/: Test files
    • common/mod.rs: Common utilities for tests
    • data_with_churn.rs: Tests related to data with churn
    • sequential_transfers.rs: Tests for sequential data transfers
    • storage_payments.rs: Tests related to storage payments
    • verify_data_location.rs: Tests for verifying data locations


To run tests, navigate to the sn_node directory and execute:

cargo test


Please feel free to clone and modify this project. Pull requests are welcome.

Conventional Commits

We follow the Conventional Commits specification for all commits. Make sure your commit messages adhere to this standard.


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).

Feel free to modify or expand upon this README as needed. Would you like to add or change anything else?


~2M SLoC