This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
IPFS protocol for querying block data #6075
Labels
J0-enhancement
An additional feature request.
Milestone
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 sinceunpublished
.Usecase: it should be possible for any IPFS browser node to locate and retrieve unexpired data published through an OCW
pubish
call.The text was updated successfully, but these errors were encountered: