Skip to content

ipfs dag stat should skip downloading raw leaves #8791

@Jorropo

Description

@Jorropo

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

ipfs dag stat Qmfoo

Will download all desandant of Qmfoo. Even raw leaves.
We can skip raw leaves when the dag size or chunk size is included in the parent block (which is the default) because they do not give more information we doesn't already have.

This would speed up ipfs dag stat a lot when used with files using raw leaves.

Security impact

dag stat is used sometime to get the true IPLD size, this is usefull for pinning services, it would be possible to create big raw leaves but with 0 dag sizes in the parent, lying to the true size to the pinning service, and if we don't check the raw leaves we can't know that, so we would need a mode to toggle that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions