> ## Documentation Index
> Fetch the complete documentation index at: https://rexrex.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inspect Block Ancestry

> Walk parent hashes from a starting block.

Use `chain ancestry` to walk backward from a starting block through parent hashes.

## Command

```sh theme={null}
rex chain ancestry \
  --block latest \
  --depth 20
```

`--depth` is the maximum number of rows to print, including the starting block.

## Example Output

```text theme={null}
CHAIN ANCESTRY

Start:  latest
Depth:  3
Blocks: 3

      NUMBER HASH                                                               PARENT                                                             TIMESTAMP      TXS
         128 0xabc...                                                          0xdef...                                                          1724300000        2
         127 0xdef...                                                          0x123...                                                          1724299990        0
         126 0x123...                                                          0x456...                                                          1724299980        1
```

## When It Stops Early

The command stops before `--depth` when:

* it reaches genesis
* a parent block cannot be found by hash

This command reads the node's current block view. It does not compare against a previous snapshot, so it does not by itself prove that a reorg happened.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.