Skip to content

8.1. Python Simulation

ermoluk edited this page Jul 5, 2025 · 2 revisions

To validate the FreeFlow architecture and concepts, we developed a Python-based simulation of a decentralized mesh network. This simulation models key features such as dynamic clustering, Bridge Nodes, Proof‑of‑Contact (PoC) credit accumulation, and resilience under failure scenarios.

The simulation provides a visual and analytical environment for testing FreeFlow in conditions similar to real-world network disruptions.

Key Capabilities:

Dynamic clustering: Nodes autonomously organize into clusters based on proximity and connectivity.

Bridge Nodes: Special nodes that interconnect clusters and enable journal synchronization.

Proof‑of‑Contact: Credits are awarded to nodes for relaying and storing data.

Failure Scenarios: Randomized node and cluster failures test the resilience of the network.

Metrics Tracking: The simulation calculates average latency, percentage of offline nodes, and PoC efficiency.

Tools and Technologies:

• Python 3.10+

• Matplotlib for network visualization and animation

• Numpy for numerical computations

• Custom networking logic for node interactions

The results demonstrate that even under high node churn and targeted bridge node failures, FreeFlow maintains partial connectivity and journal consistency across clusters. This confirms the feasibility of the protocol as a foundation for a censorship-resistant and resilient mesh network.

Clone this wiki locally