rfc-index/waku/informational/30/adaptive-nodes.md

118 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2024-01-25 09:20:36 +00:00
---
slug: 30
title: 30/ADAPTIVE-NODES
name: Adaptive nodes
status: draft
editor: Oskar Thorén <oskarth@titanproxy.com>
contributors:
---
This is an informational spec that show cases the concept of adaptive nodes.
## Node types - a continuum
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
We can look at node types as a continuum,
from more restricted to less restricted, fewer resources to more resources.
2024-01-25 09:20:36 +00:00
![Node types - a continuum](./images/adaptive_node_continuum2.png)
2024-01-25 09:20:36 +00:00
### Possible limitations
2024-01-25 09:20:36 +00:00
- Connectivity: Not publicly connectable vs static IP and DNS
- Connectivity: Mostly offline to mostly online to always online
- Resources: Storage, CPU, Memory, Bandwidth
### Accessibility and motivation
2024-01-25 09:20:36 +00:00
Some examples:
- Opening browser window: costs nothing, but contribute nothing
- Desktop: download, leave in background, contribute somewhat
- Cluster: expensive, upkeep, but can contribute a lot
2024-09-13 14:51:09 +00:00
These are also illustrative,
so a node in a browser in certain environment might contribute similarly to Desktop.
2024-01-25 09:20:36 +00:00
### Adaptive nodes
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
We call these nodes *adaptive nodes* to highlights different modes of contributing,
such as:
2024-01-25 09:20:36 +00:00
- Only leeching from the network
- Relaying messages for one or more topics
- Providing services for lighter nodes such as lightpush and filter
- Storing historical messages to various degrees
- Ensuring relay network can't be spammed with RLN
### Planned incentives
2024-01-25 09:20:36 +00:00
Incentives to run a node is currently planned around:
- SWAP for accounting and settlement of services provided
- RLN RELAY for spam protection
- Other incentivization schemes are likely to follow and is an area of active research
## Node protocol selection
2024-01-25 09:20:36 +00:00
Each node can choose which protocols to support, depending on its resources and goals.
![Protocol selection](./images/adaptive_node_protocol_selection2.png)
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
In the case of protocols like [11/WAKU2-RELAY](../../standards/core/11/relay.md)
etc (12, 13, 19, 21) these correspond to Libp2p protocols.
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
However, other protocols like 16/WAKU2-RPC
(local HTTP JSON-RPC), 25/LIBP2P-DNS-DISCOVERY,
Discovery v5 (DevP2P) or interfacing with distributed storage,
are running on different network stacks.
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
This is in addition to protocols that specify payloads, such as 14/WAKU2-MESSAGE,
26/WAKU2-PAYLOAD, or application specific ones.
As well as specs that act more as recommendations,
such as 23/WAKU2-TOPICS or 27/WAKU2-PEERS.
2024-01-25 09:20:36 +00:00
## Waku network visualization
2024-01-25 09:20:36 +00:00
We can better visualize the network with some illustrative examples.
### Topology and topics
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
The first one shows an example topology with different PubSub topics
for the relay protocol.
2024-01-25 09:20:36 +00:00
![Waku Network visualization](./images/adaptive_node_network_topology_protocols2.png)
2024-01-25 09:20:36 +00:00
### Legend
2024-01-25 09:20:36 +00:00
![Waku Network visualization legend](./images/adaptive_node_network_topology_protocols_legend.png)
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
The dotted box shows what content topics (application-specific)
a node is interested in.
2024-01-25 09:20:36 +00:00
A node that is purely providing a service to the network might not care.
2024-09-13 14:51:09 +00:00
In this example, we see support for toy chat,
a topic in Waku v1 (Status chat), WalletConnect, and SuperRare community.
2024-01-25 09:20:36 +00:00
### Auxiliary network
2024-01-25 09:20:36 +00:00
This is a separate component with its own topology.
2024-09-13 14:51:09 +00:00
Behavior and interaction with other protocols specified in Vac RFCs,
e.g. 25/LIBP2P-DNS-DISCOVERY, 15/WAKU-BRIDGE, etc.
2024-01-25 09:20:36 +00:00
### Node Cross Section
2024-01-25 09:20:36 +00:00
2024-09-13 14:51:09 +00:00
This one shows a cross-section of nodes in different dimensions and
shows how the connections look different for different protocols.
2024-01-25 09:20:36 +00:00
![Node Cross Section](./images/adaptive_node_cross_section2.png)
2024-01-25 09:20:36 +00:00
## Copyright
2024-01-25 09:20:36 +00:00
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
## References
- [11/WAKU2-RELAY](../../standards/core/11/relay.md)