Skip to content

Commit

Permalink
Max/docs gen update (nymtech#5333)
Browse files Browse the repository at this point in the history
* update landing page icons

* new architecture diagram

* force dark theme

* new nyx consolidated page

* epoch page

* overhaul traffic flow + add diagram

* note on dvpn mode

* fix formatting of lists

* remove old todo
  • Loading branch information
mfahampshire authored Jan 14, 2025
1 parent 102cd10 commit 07544d9
Show file tree
Hide file tree
Showing 35 changed files with 1,672 additions and 246 deletions.
12 changes: 8 additions & 4 deletions documentation/docs/components/landing-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import { useTheme } from "@mui/material/styles";
import Image from "next/image";
import Link from "next/link";

import networkDocs from "../public/images/landing/network-docs.png";
import developerDocs from "../public/images/landing/developer-docs.png";
import sdkDocs from "../public/images/landing/sdk-docs.png";
import operatorGuide from "../public/images/landing/operator-guide.png";
// import networkDocs from "../public/images/landing/network-docs.png";
// import developerDocs from "../public/images/landing/developer-docs.png";
// import sdkDocs from "../public/images/landing/sdk-docs.png";
// import operatorGuide from "../public/images/landing/operator-guide.png";
import networkDocs from "../public/images/landing/Vector1.png";
import developerDocs from "../public/images/landing/Vector2.png";
import sdkDocs from "../public/images/landing/Vector3.png";
import operatorGuide from "../public/images/landing/Vector4.png";
export const LandingPage = () => {
const theme = useTheme();
const isTablet = useMediaQuery(theme.breakpoints.up("md"));
Expand Down
12 changes: 5 additions & 7 deletions documentation/docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const config = {
},
{
source: "/docs/nodes/overview.html ",
destination: "/docs/network/architecture/mixnet/nodes",
destination: "/docs/network/architecture/mixnet#nym-nodes",
permanent: true,
basePath: false,
},
Expand Down Expand Up @@ -132,21 +132,19 @@ const config = {
},
{
source: "/docs/nyx/smart-contracts.html",
destination: "/docs/network/architecture/nyx/smart-contracts",
destination: "/docs/network/architecture/nyx#smart-contracts",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/mixnet-contract.html",
destination:
"/docs/network/architecture/nyx/smart-contracts/mixnet-contract",
destination: "/docs/network/architecture/nyx#mixnet-contract",
permanent: true,
basePath: false,
},
{
source: "/docs/nyx/vesting-contract.html",
destination:
"/docs/network/architecture/nyx/smart-contracts/vesting-contract",
destination: "/docs/network/architecture/nyx#vesting-contract",
permanent: true,
basePath: false,
},
Expand Down Expand Up @@ -631,7 +629,7 @@ const config = {
},
{
source: "/docs/network/architecture/nyx/smart-contracts/ecash",
destination: "/docs/network/architecture/nyx/smart-contracts/zknym",
destination: "/docs/network/architecture/nyx#zk-nym-contract",
permanent: true,
basePath: false,
},
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/pages/developers/clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ At present, there are three Nym clients. These are built as standalone binaries
- the SOCKS5 client - most easily accessed via the [Rust SDK](./rust).
- the wasm (webassembly) client - most easily via the [Typescript SDK](./typescript).

> For information about the role that clients play within the Nym system and their role when communicating with the Mixnet, see the [Client network docs](../network/architecture/mixnet/clients).
> For information about the role that clients play within the Nym system and their role when communicating with the Mixnet, see the [Client network docs](../network/architecture/mixnet#nym-clients).
### The websocket client
This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It can be run as a persistent process on a desktop or server machine. You can connect to it with **any language that supports websockets**.
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/pages/developers/nymvpncli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ make
```

## Mnemonic Generation
Create an account at [nymvpn.com](https://nymvpn.com) to obtain your mnemonic.
Head to the mnemonic generator at [https://nym.com/account/create](https://nym.com/account/create) and obtain a mnemonic.

## Start the daemon
```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ npm install @nymproject/sdk-full-fat
The Nyx blockchain is a general-purpose CosmWasm-enabled smart contract platform, and the home of the smart contracts which keep track of the mixnet, amongst others.
Further information about the chain can be found on the [Nyx blockchain explorer](https://nym.explorers.guru/).

Using the [Nym mixnet smart contract clients](../../network/architecture/nyx/smart-contracts), you will be able to query contract states or execute methods when providing a signing key.
Using the [Nym mixnet smart contract clients](../../network/architecture/nyx#smart-contracts), you will be able to query contract states or execute methods when providing a signing key.

*You can learn about our different methods to interact with the chain [here](../chain)*.

Expand Down
6 changes: 4 additions & 2 deletions documentation/docs/pages/network/architecture.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Network Components

Core components:
* A **Mixnet**, which encrypts and mixes Sphinx packet traffic so that it cannot be determined who is communicating with whom. Our mixnet is based on a modified version of the [**Loopix** design](concepts/loopix). This is made up of [Nym nodes](architecture/mixnet/nodes) runnning on servers around the world.
* A **Mixnet**, which mixes Sphinx packet traffic so that it cannot be determined who is communicating with whom. Our mixnet is based on a modified version of the [**Loopix** design](concepts/loopix). This is made up of [Nym nodes](architecture/mixnet/nodes) runnning on servers around the world maintained by a decentralised group of Operators.
* Various [**Nym clients**](architecture/mixnet/clients) which manage sending and receiving Sphinx packets, encrypting/decrypting traffic, and providing [cover traffic](./concepts/cover-traffic) to hide 'real' traffic timing.
* A CosmWasm-enabled blockchain called [**Nyx**](architecture/nyx), the home of the various smart contracts used by the mixnet.
* A CosmWasm-enabled blockchain called [**Nyx**](architecture/nyx), the home of the various smart contracts used by the mixnet. A subset of Nyx Validators run [NymAPI]() TODO LINK instances, taking part in also producing and verifying [zk-nym credentials](cryptography/zk-nym).

![arch_overview](/images/network/arch/overall-arch.png)
52 changes: 45 additions & 7 deletions documentation/docs/pages/network/architecture/mixnet.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
import { Callout } from 'nextra/components'

// TODO REDIRECTS FROM PREVIOUS PAGES TO THESE NEW SUBSECTIONS


# Mixnet Components
The mixnet is made up of nodes running in several different roles:
* **Mix Nodes** provide network security for network content _and_ metadata by performing packet-mixing on traffic travelling through the network.
* **Gateways** act as message storage for clients which may go offline and come back online again, and (once zk-nyms are enabled) check for anonymous proof of access credentials. They represent the first and last hop Mixnet packets travel through when travelling between clients.
* **Services** are applications that communicate with nym clients, listening and sending traffic to the mixnet. This is an umbrella term for a variety of different pieces of code, such as the Network Requester.

> **Clients** are used to connect to and send messages through the Mixnet to other clients, utilising Gateways for ingress and exit. These are however on the 'user' side and not a Mixnet component per se.
## Nym Nodes

<Callout type="info" emoji="ℹ️">

If you want to run a node, the setup and maintenance guides can be found in the [Operator Docs](../../../operators/introduction).

</Callout>

Although a large proportion of the Nym mixnet's functionality is implemented client-side, several key anonymity features rely on the decentralised node network that make up the Mixnet that run in different modes:

* Nym Nodes running in **Mix Node** mode provide network security for network content _and_ metadata by performing packet-mixing on traffic travelling through the network: accepting incoming Sphinx packets from other Nym nodes and, using a variable delay, 'mixing' them with other packets (not forwarding on received packets according to FIFO but instead relying on a randomised delay function).
* Nym Nodes running in **Entry Gateway** mode act as message storage for clients which may go offline and come back online again, and (once zk-nyms are enabled) check for anonymous proof of access credentials. They represent the first hop Mixnet packets travel through when travelling between clients.
* Nym Nodes running in **Exit Gateway** mode act as message storage for clients which may go offline and come back online again, and communicate with the wider internet on behalf of Nym Clients. They represent the last hop Mixnet packets travel through when travelling between clients and/or external services. These can be thought of somewhat analogously to Tor Exit Nodes.
* **Services** are applications that communicate with Nym Clients, listening and sending traffic to the Mixnet.

## Smoosh Status
See the [traffic flow](../traffic) page for detailed information on how traffic moves through the Mixnet as well as the [Loopix](https://arxiv.org/pdf/1703.00536) design paper for overview of the stratified nature of the Mixnet.

## Node Smoosh Status
The various Mixnet components were originally completely separate binaries. They are in the process of being 'smooshed' together into a single `nym-node` binary which runs in different modes for ease of use, as well as to allow for a more developed and responsive Mixnet design, where the role of a node in a given time period is decided and changed automatically based on network conditions (more on this in the future).

Completed:
* The `nym-network-requester` is now part of a `nym-node` running in as an Exit Gateway.
* All nodes are now a `nym-node`. A node's role is defined manually at runtime by the operator.
* The `nym-network-requester` is now part of a `nym-node` running in Exit Gateway mode.

Upcoming:
* Whether a `nym-node` is running as a Gateway or Mix Node will be set based on network conditions, and change epoch to epoch. Currently the role is set manually by the operator and does not change automatically over time. A node will be able to be running in the role of a Mix Node, an Entry Gateway, or an Exit Gateway.

## Nym Clients

<Callout type="info" emoji="ℹ️">
You can read about setting up and using various clients in the [Developer Docs](../../developers/clients).
</Callout>

A large proportion of the Nym Mixnet's functionality is implemented client-side.

Clients perform the following actions on behalf of users:

* Determine network topology - what nodes exist, their public encryption keys and IP, etc.
* Register with a Gateway
* Authenticate with a Gateway
* Receive and decrypt messages from the Gateway
* Create layer-encrypted [Sphinx packets](../cryptography/sphinx)
* Send Sphinx packets with real messages
* Send Sphinx packet [cover traffic](../concepts/cover-traffic) when no real messages are being sent
* Retransmit [un-acknowledged packet sends](../traffic/acks)

> At the moment due to the fact that Nym clients are [message-based](../../developers/concepts/messages), using the Mixnet requires another client on the 'other side' of the mixet to send packets to, unless you're using the `nymvpn` client (part of the NymVPN app) or the `socks5` client, which operates as a SOCKS4,4a, or 5 proxy and is able to utilise the client embedded within the `nym-node`'s Exit Gateway functionality (prev. this functionality was a standalone service, the Network Requester). In the future we wish to remove this point of friction and have all Nym clients construct IP packets instead, easing the integration burden and abstracting away the message-based nature of client communication.

This file was deleted.

22 changes: 0 additions & 22 deletions documentation/docs/pages/network/architecture/mixnet/clients.mdx

This file was deleted.

19 changes: 0 additions & 19 deletions documentation/docs/pages/network/architecture/mixnet/nodes.mdx

This file was deleted.

Loading

0 comments on commit 07544d9

Please sign in to comment.