# Networking

The `network` crate implements the P2P transport, discovery, and peer management used by sync and block propagation.

## Core services

* `NetworkService` manages sessions and protocol handlers.
* Discovery maintains a node table and periodically refreshes peers.
* Handshake and session layers enforce protocol compatibility.

## Configuration highlights

`NetworkConfiguration` includes:

* Listen/public addresses and UDP port.
* Bootnodes and reserved nodes.
* Peer limits and handshake limits.
* NAT and discovery settings.
* Throttling and IP filter controls.

## Node typing and tagging

Peers advertise `node_type` tags (archive/full) to bias requests during sync, and the sync layer can choose preferred node types for block retrieval.

## Key source files

* `crates/network/src/lib.rs`
* `crates/network/src/service.rs`
* `crates/network/src/discovery.rs`
* `crates/mazzecore/core/src/sync/message/status.rs`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mazze.io/architecture/networking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
