# Running a full node

Testnet Full nodes are currently permissioned, but we typically respond fast to any request for access. Please email us at <validators@fermilabs.xyz> , or raise a ticket on discord, for an API key. The rest of the guide assumes you have a valid API key already.

Fermi Trade aims to allow any user to verify the state and execution of its onchain perpetuals orderbook program - including margin calculation, order matching, settlement logic, interest rate calculation, and honest queue positioning. A user may do so by running a light node, or a full node.

### Hardware requirements

Since continuum is a high throuput chain, running a full node and keeping up with state requires a reasonably well-speced machine. Recommended Machine specs:\
\
**RAM:** >64 GB

**Disc:** > 6 TB

**Bandwidth:** > 300 Mbps

### 1. Download the Full Node Binary

Full node binary is available on request.

### 2. Gossip & Restore state (catch up to present state)

To get your full node up to the current state, you have two options:\
1\. Full replay from genesis - replay all transactions since inception.\
2\. Restore from snapshot - quickly get up to speed on the current state

### Gossip Restore Endpoints

Allows whitelisted IPs to request SledDB data for bootstrapping new nodes.

**GossipReceiver (`gossip_stream.rs`)**

For receiving and processing gossip streams:

```rust
pub struct GossipReceiver {
    explorer: Arc<BlockExplorer>,
}
```

Methods:

* `receive_full_dump(stream)` - Process full dump stream
* `receive_delta_restore(stream)` - Process delta restore stream

#### Endpoints

| Endpoint                    | Method | Description             | Response                               |
| --------------------------- | ------ | ----------------------- | -------------------------------------- |
| `/gossip/status`            | GET    | Discovery endpoint      | JSON with available snapshots, heights |
| `/gossip/snapshot/latest`   | GET    | Get latest snapshot     | Binary (bcs-encoded StoredSnapshot)    |
| `/gossip/full-dump`         | GET    | Stream entire SledDB    | Chunked binary stream                  |
| `/gossip/delta/:from_block` | GET    | Snapshot + blocks since | Chunked binary stream                  |

All endpoints:

* Check IP whitelist before processing
* Return 403 Forbidden if IP not allowed
* Return 503 Service Unavailable if gossip disabled

#### CLI Arguments

```
--gossip-config <PATH>  Path to gossip configuration TOML file
```

***

### Example

Use a whitelisted IP. You can also directly start up you full node with the appropriate gossip flags pointing to the public RPC:

```
fermi-rollup-node \                                                                                         
    --bootstrap-mode gossip-snapshot \                                                                        
    --gossip-peer http://10.0.0.5:8080 \         
```

Test endpoints:

```bash
# Status
curl http://localhost:8080/gossip/status

# Latest snapshot
curl http://localhost:8080/gossip/snapshot/latest -o snapshot.bin

# Full dump (streaming)
curl http://localhost:8080/gossip/full-dump -o dump.bin

# Delta from block 0
curl http://localhost:8080/gossip/delta/0 -o delta.bin
```

1. Test from non-whitelisted IP - should get 403 Forbidden
2. Modify config file - should hot-reload (check logs for "gossip config reloaded successfully")

####


---

# 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-v2.fermilabs.xyz/getting-started/running-a-full-node.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.
