| Crates.io | sn_protocol |
| lib.rs | sn_protocol |
| version | 0.17.15 |
| created_at | 2023-06-04 22:49:21.171545+00 |
| updated_at | 2024-11-12 19:01:11.994754+00 |
| description | Safe Network Protocol |
| homepage | https://maidsafe.net |
| repository | https://github.com/maidsafe/safe_network |
| max_upload_size | |
| id | 882585 |
| size | 112,883 |
The sn_protocol directory contains the core protocol logic for the Safe Network. It includes various modules that handle different aspects of the protocol, such as error handling, messages, and storage.
The error.rs file contains the definitions for various errors that can occur within the protocol.
ChunkNotFound(ChunkAddress): Indicates that a chunk was not found.
Result::Err(Error::ChunkNotFound(chunk_address))ChunkNotStored(XorName): Indicates that a chunk was not stored.
Result::Err(Error::ChunkNotStored(xor_name))RegisterNotFound(Box<RegisterAddress>): Indicates that a register was not found.
Result::Err(Error::RegisterNotFound(register_address))SpendNotFound(SpendAddress): Indicates that a spend was not found.
Result::Err(Error::SpendNotFound(cash_note_address))DoubleSpendAttempt(Box<SignedSpend>, Box<SignedSpend>): Indicates a double spend attempt.
Result::Err(Error::DoubleSpendAttempt(spend1, spend2))The messages module contains different types of messages that can be sent or received within the protocol.
Cmd::ReplicateNetworkAddress from the holder.holder: NetworkAddress: Holder of the replication keys.keys: Vec<NetworkAddress>: Keys of the copy that shall be replicated.Query::GetStoreCostaddress: NetworkAddress: The address where the record will be stored.QueryResponse::GetStoreCoststore_cost: Result<Token>: The cost of storing the record.payment_address: PublicAddress: The address to pay the store cost to.CmdResponse::ReplicateResult<()>: The result of the replication command.The storage module handles the storage aspects of the protocol.
ChunkAddress: Address of a chunk in the network.SpendAddress: Address of a CashNote's Spend in the network.Header: Header information for storage items.The safenode_proto directory contains the Protocol Buffers definitions for the Safe Network.
req_resp_types.proto: Definitions for request and response types.safenode.proto: Main Protocol Buffers definitions for the Safe Network.