# Does Ipfs pull complete block when we do \`ipfs refs -r \<CID\>\` or \`ipfs object stat \<CID\>\`

**URL:** <https://discuss.ipfs.tech/t/does-ipfs-pull-complete-block-when-we-do-ipfs-refs-r-cid-or-ipfs-object-stat-cid/7604>\
**Category:** Uncategorized\
**Created:** [April 1, 2020, 12:23pm UTC](https://discuss.ipfs.tech/t/does-ipfs-pull-complete-block-when-we-do-ipfs-refs-r-cid-or-ipfs-object-stat-cid/7604 "2020-04-01T12:23:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avatar-lavventura](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/avatar-lavventura/32/2890_2.png) [@avatar-lavventura](https://discuss.ipfs.tech/u/avatar-lavventura)\
**Post date:** [April 1, 2020, 12:23pm UTC](https://discuss.ipfs.tech/t/does-ipfs-pull-complete-block-when-we-do-ipfs-refs-r-cid-or-ipfs-object-stat-cid/7604/1 "2020-04-01T12:23:00Z")

</div>

Let’s assume I have only the parent-hash and `ipfs --offline refs -r <CID>` returns `False` for it.

Now I want to only obtains its hashes that are returned from `ipfs refs -r <CID>`.

As I know when we apply `ipfs ls <CID>` it pulls the complete data files/blocks from the network.

Instead when we apply `ipfs refs -r <CID>` does it still still pull the complete data files from the network on only small amount of data such as few kilobytes in order to figure out its `refs`?

---

<div class="post-metadata">

**Author:** ![postables](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/postables/32/2729_2.png) [@postables](https://discuss.ipfs.tech/u/postables)\
**Post date:** [April 1, 2020, 8:38pm UTC](https://discuss.ipfs.tech/t/does-ipfs-pull-complete-block-when-we-do-ipfs-refs-r-cid-or-ipfs-object-stat-cid/7604/2 "2020-04-01T20:38:29Z")

</div>

If you do `ipfs refs -r` then yes, you will need to pull all blocks to get their links. MerkleDag objects roughy look like

```auto
// An IPFS MerkleDAG Link
message IPLDLink {
    // multihash of the target object
    bytes hash = 1;
    // utf string name. should be unique per object
    string name = 2;
    // cumulative size of target object
    uint64 size = 3;
}
  
// An IPFS MerkleDAG Node
message IPLDNode {
    // refs to other objects
    repeated IPLDLink links = 2;
    // opaque user data
    bytes data = 1;
}

```

IF you run `ipfs object stat` then I believe you just need to fetch the first block, but I’m not entirely certain

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [April 1, 2020, 10:09pm UTC](https://discuss.ipfs.tech/t/does-ipfs-pull-complete-block-when-we-do-ipfs-refs-r-cid-or-ipfs-object-stat-cid/7604/3 "2020-04-01T22:09:14Z")

</div>

> [@avatar-lavventura](#):
>
> As I know when we apply `ipfs ls <CID>` it pulls the complete data files/blocks from the network.

If you use `ipfs ls --resolve-type=false --size=false` it will not pull the data.
