Architecture

Intelligent Routing

Freenet’s request routing mechanism plays a crucial role in the efficiency of the network.

It is responsible for deciding which peer to route a request to when attempting to read, create, or modify a contract’s state. The mechanism is designed to select the peer that can complete the request the fastest, which may not always be the peer closest to the contract’s location - the traditional approach for routing in a small-world network, known as greedy routing.

Freenet Transport Protocol (FrTP)

Note: This document is a work in progress and is subject to change, it is currently out-of-sync with the codebase and should be updated to reflect the current state of the codebase once it has stabilized.

Introduction

The Freenet Transport Protocol (FrTP) is a UDP-based system designed to ensure reliable and encrypted message transmission. This document outlines the key elements of FrTP, including connection establishment, message handling, and rate limiting.

P2P Network

Freenet Network Topology

Small-World Network

Freenet is structured as a decentralized peer-to-peer network, based on the idea of a small-world network. This network topology is scalable and efficient, allowing contract state to be found quickly and without any reliance on a central authority.

Small World Network

Freenet Peers

In Freenet, a “peer” is any computer running the Freenet Core software. The peers are organized in a ring-like structure, with each peer assigned a specific numerical value between 0.0 and 1.0, indicating its location in the network’s topology. This location is derived from the peer’s IP address.