Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

IPFS protocol for querying block data #6075

Open
@gavofyork

Description

@gavofyork

Substrate should provide an IPFS implementation over its libp2p to allow for querying certain data from chains. A (the?) offchain worker local storage should be able to be given data to store which can be indexed quickly with a Blake2 hash. The hash should be able to be used to query via IPFS (or is it bitswap protocol?) over libp2p in order to retrieve its preimage.

Rough API endpoints:

Two new OCW APIs:

  • publish(data: &[u8], until: BlockNumber) -> [u8; 32]
  • unpublish([u8; 32])

Preimage lookup over libp2p for anything published up until block number until and not since unpublished.

Usecase: it should be possible for any IPFS browser node to locate and retrieve unexpired data published through an OCW pubish call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions