> For the complete documentation index, see [llms.txt](https://docs.bloxroute.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloxroute.com/core-solutions/blockchain-distribution-network-bdn/mechanism.md).

# Mechanism

The BDN achieves performance gains through a combination of protocol-level optimizations and network-level design choices. Here’s how it works:

#### Compressed Blocks

Rather than forwarding full blocks, the BDN sends a compressed version by referencing transactions using short IDs (SIDs).

* Transactions are indexed and cached across the network.
* Gateways replace full transaction data with 4-byte SIDs when sending blocks.
* Receiving Gateways reconstruct the original block from cached data.

#### Cut-Through Routing

The BDN reduces propagation delay by forwarding block data as it arrives, rather than waiting for the full block to be received and validated.

* Enables real-time streaming of blocks between Relays and Gateways.
* Reduces per-hop delay compared to traditional peer-to-peer networks.

#### Optimized Topology

The BDN avoids the inefficiencies of random p2p connections by using a smart, latency-aware topology.

* Relays are strategically deployed in key regions.
* Gateways connect to Relays based on ping latency and server load.
* Redundant links ensure failover paths in case of disconnection or degradation.

#### Relay Selection Process

When a Gateway starts, it follows a discovery and selection process to optimize its Relay connections.

* Detects its public IP address (auto or user-defined).
* Contacts the Control Plane for a list of suggested Relays.
* Measures latency and selects the lowest-latency Transaction and Block Relay.
* Stores a backup Relay pair for redundancy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bloxroute.com/core-solutions/blockchain-distribution-network-bdn/mechanism.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
