ennucore
7d6bb9ebf9
|
5 years ago | |
---|---|---|
src | 5 years ago | |
.gitignore | 5 years ago | |
Cargo.lock | 5 years ago | |
Cargo.toml | 5 years ago | |
README.md | 5 years ago | |
README.pdf | 5 years ago | |
scheme.fzz | 5 years ago |
README.md
IronForest
IronForest (IF) is a decentralized P2P network.
IronForest hardware network has two types of devices: digital (IronForest Digital Device, IFDD) and analog (IronForest Digital Device, IFAD)
IronForest tonnels
Devices communicate through tonnels. Tonnel is a list of IF nodes' IDs: $ T(a_1, a_n)=[a_1, a_2, ,..., , a_n] $, where $a_i$ is an id. Short tonnel ($s(T)$) is one of the $min_tonnels$ shortest paths (by time) between two nodes. Each IF node $X$ has its own list of short tonnels $X.TT$ ($\forall , T \in X.TT,, X\in T$). It is obvious, that if $T(a_1, a_n)_p=A$ and $T(a_1, a_n)q=B$ , then $T(A, B)=T(a_1,a_n){p:q}$. Therefore, if node $X$ has ID of node $Y$ somewhere in its list of tonnels, it knows a tonnel to $Y$.
graph TD;
A --- E --- F --- B;
A---G---B;
E---Z---F;
Here [A, G, B], [A, E, F, B], [A, E, Z, F, B] are tonnels from A to B, but the last one will not probably be short tonnel, because it will highly likely take more time for a packet to reach the $B$ node by this path.
Node $N$ is known to node $B$ if node $B$ has node $N$ in its list of tonnels: $kn(N, B)=\exists T \in N.TT,:,B\in T$.
On low-level, a also tonnel has its frequency $T.F$: IFADs retranslate signals on all frequencies from $F_2 \cup {F_1}$ and IFDDs set one of their transmitters to the $T.F$ frequency.
Building a tonnel
How does node $A$ build a tonnel to an unknown node $B$?
$A$ sends a multicast message to the network. This message consists of type (tonnel request), destination $m.d=B$ and path (list) $m.P$ ($P_0=[A]$) and tonnel (empty for now). When another node $N$ receives message of this type, it appends its id to the path ($m.P+=[N]$) and resends this message either nobody if $N$ is a part of too much tonnels (this number is equal to the number of $F2$ radio modules on the IFDD board) either to all available nodes if node $B$ is not a known node to $N$ (if $!kn(N, B) = \nexists T \in N.TT: B\in T$) and message has no tonnel parameter either only to some nodes. Let's see the second variant more detailed.
So, node $N$ receives a message $m$. If message has not empty tonnel parameter $m.T$, then $N$ remembers tonnel T, sends message to the next node in the tonnel ($m.T_{k+1}, k: m.T_k = N$). If node $B$($m.d$) is known to $N$ ($kn(N, B)$), then:
- $N$ checks if number of tonnels to $B$ is enough: $TT_2={T \in N.TT: B \in T},,,|TT_2|>= tonnel_num$, if not, then message is resent through all paths
- $N$ sends message $m$ to $tonnel_num$ of $TT_2$ ($TT_{2,[1:tonnel_num]}$)
$M=[m_1, ,...,,m_{tonnel_num}]$ is a list of first $tonnel_num$ messages that reached B
When message $m_i \in M$ with updated path reaches $B$, $B$ remembers reversed of $m_i.P$ as the tonnel from $B$ to $A$: $T(A, B)=m.P$. $B$ decides frequency $T.F$ of tonnel (for hardware network). It sends a message with this frequency. to $A$ as multicast message using this tonnel. $A$ receives this tonnel and remembers it. Now $kn(A, B) \and kn(B, A)$.
IronForest Hardware Network
There are two types of IFHN devices: analog devices (IFAD) and digital (IFDD). The analog devices are very cheap, because they are just a electronic circuits with analog components. They just re-translate all the signals instantly, without any delay. Digital devices are more complicated. They decode messages and then resend them with filtering and processing. Digital devices provide spam protection and logic.
IronForest hardware0 network has two frequencies: one (F1) for multicast and a frequency range (F2) for tonnels.
IronForest analog device (IFAD) description
IFADs work as retranslators. Analog devices receive the signal, amplify it and send it further. They do not react on signals weaker then some threshold. But the output strength of the signal is lower then it was when it was send by the previous device. Therefore, a packet will not go far only through IFADs. This also solves the problem of signals circulating through analog network being amplified every time.
IronForest digital device (IFDD) description
IFDD can be connected to another device or to another network, and it will use available network for overlay.
IFDD have radio transmitters: one for $F_1$ frequency and several transmitters for $F_2$ messages. Transmitters of the second type can be set to any frequency of the $F_2$ range using varicond/varicap.
Digital device receives signal, amplifies it and demodulates. Then signal is processed by a micro-controller (MC):
- MC checks validity
- Spam protection (PoW, for example) is done
- If this is an $F2$ signal, check if it needs resending by this IFDD, resend by radio and overlays if needed
- If this is an $F1$ signal, process it and resend by radio and overlays
IFDD's MC has a list of known tonnels. If it is clear that the destination of a packet is a known node (known as a part of a tonnel), IFDD will not send packet to all available nodes, it will send it just like through a usual tonnel to this known node.
Calculating network speed and price for square kilometer
todo