> For the complete documentation index, see [llms.txt](https://firehose.streamingfast.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firehose.streamingfast.io/references/cli-reference/merger.md).

# Merger

This page documents the configuration flags for the Merger component. For architectural concepts and how the Merger works, see [Merger Architecture](/firehose/architecture/components/merger.md).

## Starting the Merger

```bash
firecore start merger [flags]
```

## Core Configuration

| Flag                        | Description                              | Default  |
| --------------------------- | ---------------------------------------- | -------- |
| `--merger-grpc-listen-addr` | gRPC listening address for health checks | `:10012` |

## Storage Configuration

The Merger uses the common storage flags:

| Flag                               | Description                         | Default                                   |
| ---------------------------------- | ----------------------------------- | ----------------------------------------- |
| `--common-one-block-store-url`     | One-block files storage URL (input) | `file://{data-dir}/storage/one-blocks`    |
| `--common-merged-blocks-store-url` | Merged blocks storage URL (output)  | `file://{data-dir}/storage/merged-blocks` |
| `--common-forked-blocks-store-url` | Forked blocks storage URL           | `file://{data-dir}/storage/forked-blocks` |

## Timing Configuration

| Flag                                  | Description                         | Default |
| ------------------------------------- | ----------------------------------- | ------- |
| `--merger-time-between-store-lookups` | Polling interval for source store   | `1s`    |
| `--merger-time-between-store-pruning` | Interval between pruning operations | `1m0s`  |

## Pruning Configuration

| Flag                                 | Description                           | Default |
| ------------------------------------ | ------------------------------------- | ------- |
| `--merger-prune-forked-blocks-after` | Blocks to retain before pruning forks | `50000` |
| `--merger-delete-threads`            | Parallel threads for file deletion    | `8`     |

{% hint style="warning" %}
The pruning distance should be set large enough to handle chain reorganizations. The default of 50,000 blocks is conservative and suitable for most chains.
{% endhint %}

## Execution Control

| Flag                  | Description                      | Default |
| --------------------- | -------------------------------- | ------- |
| `--merger-stop-block` | Stop after merging to this block | (none)  |

## Health Check

The Merger exposes a gRPC health check endpoint:

```bash
grpcurl -plaintext localhost:10012 grpc.health.v1.Health/Check
```

The Merger always reports `SERVING` status when running - it doesn't have dynamic readiness conditions like other components.

## Example Usage

### Basic Local Setup

```bash
firecore start merger \
  --merger-grpc-listen-addr=":10012"
```

### With Cloud Storage

```bash
firecore start merger \
  --merger-grpc-listen-addr=":10012" \
  --common-one-block-store-url="s3://my-bucket/one-blocks" \
  --common-merged-blocks-store-url="s3://my-bucket/merged-blocks" \
  --common-forked-blocks-store-url="s3://my-bucket/forked-blocks"
```

### Processing to a Specific Block

```bash
firecore start merger \
  --merger-grpc-listen-addr=":10012" \
  --merger-stop-block=1000000
```


---

# 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://firehose.streamingfast.io/references/cli-reference/merger.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.
