The SAFE Network core libraries are written exclusively in Rust and the content below provides a brief explanation of their hierarchy. The code is all open source and for more information please refer to our licensing page.
This library provides a mechanism for peers on P2P networks to communicate securely.
Routing sits on top of quic-p2p. It is our overlay networking and routing layer and forms the brain of the SAFE Network. Its purpose is forming a decentralised Internet and the routing information within it.
Routing is based on an algorithm that extends the Kademlia DHT routing. It uses 32-byte XOR addresses to locate data on the network. It is guaranteed that messages can be routed from any part of the network to any other end - as is proven by the Kademlia paper. Routing works purely on the terms of group consensus. We don’t trust a single entity, only a group decision with eventual consistency. In order to come to this eventual consistency the routing layer uses the consensus mechanism PARSEC.
PARSEC is a Protocol for Asynchronous, Reliable, Secure and Efficient Consensus and is the world's first open source ABFT (Asynchronous Byzantine Fault Tolerance) protocol that can be used in a truly permissionless setting.
This is one of the executable consumers of Routing and will primarily hold SAFE Network Data.
Vaults support multiple data types: Mutable Data and Immutable Data are currently available to developers. The major difference between these two types is the ability to change the data. Both have their own set of properties.
Personas in Vaults handle the different aspects of the network. Data Managers store the data, Client Managers store the users accounts balance, which is currently measured in allowed mutations, and eventually will be changed to Safecoin. Client Managers also store lists of users’ apps and implement the access control rules. There is no requirement to have a registered account to retrieve data and users are always free to send direct read requests to Data Managers.
SAFE Client Libs
The SAFE Client Libraries are a set of libraries providing a way for developers to consume and use the SAFE Network facilities. The libraries communicate with Vaults and build upon the foundation of fundamental network components, such as quic-p2p and Routing, to provide higher-level network abstractions like files and directories. The main Client Libs components are:
Utilities and Helper Libraries
RFCs - Request For Comments
The RFC (Request For Comments) process is intended to provide a consistent and controlled path for new features to enter the network and core libraries, so that all stakeholders can be confident about the direction in which the network is evolving.