diff --git a/proposals/dedht.md b/proposals/dedht.md new file mode 100644 index 00000000..68305519 --- /dev/null +++ b/proposals/dedht.md @@ -0,0 +1,130 @@ +# DeDHT - a DHT for Filecoin Deals + +Authors: [@alanshaw](https://github.com/alanshaw) + +Initial PR: TBD + + + + + +## Purpose & impact +#### Background & intent +_Describe the desired state of the world after this project? Why does that matter?_ + + + +**Discovery of content providers on the Filecoin network without centralized indexes.** + +There is currently an unsolved problem of knowing which miner is storing which content. If you have a CID, which miner do you retrieve the content from? + +Maintaining a global index of which miner has which content will be difficult (in terms of keeping up to date, it's size, the running costs etc.) and is inherently centralized. + +This project proposes that miners keep an index of the content that they are storing themselves (including of deals made up of batches/aggregations of content) such that they can be asked if content for a CID can be retrieved from them. + +Miners also register themselves on the "DeDHT", a DHT where deals are made with miners that are "closest" to the CID of the content. There is no guarantee that deals are actually made with CIDs that are "close" to the miner's ID but there is incentive to do so if the creator wants the content to be found efficiently by others. + +Leveraging a DHT avoids the need for a centralized index of all the content and allows miners to only have to keep track of the things they have agreed to store. + +Note that a file is made up of many CIDs. The recommendation could be that whole files reside on a single miner, it is just the root CID that is "close" to the miner. The same can apply for directories. + +One issue is aggregations, which will be slower to accumulate because content will need to be aggregated in multiple "buckets" of "close" CIDs. + +On the surface Sybil attacks appear to be a problem. The more places in the DHT your miners are in the more deals they will receive. However if we mandate that participants in this DHT must be active miners registered in the Filecoin blockchain the barrier to entry to becoming a miner should be deterrent enough to prevent this. + +#### Assumptions & hypotheses +_What must be true for this project to matter?_ + + +* Users want to discover which Filecoin miner is storing their data. +* We don't really want to keep a central index of where the CIDs are stored. + +#### User workflow example +_How would a developer or user use this new capability?_ + + +A content owner would calculate the CID for a given file, and then interrogate the DeDHT for the closest miner(s) to that CID. Once a list of miners is received they negotiate one or more deals with them. + +A content consumer would obtain the CID, interrogate the DeDHT for the closest miner(s), and connect to each one in order by "closeness" and query them to see if they are storing the content for the CID. If yes, then they can start retrieval. + +#### Impact +_How would this directly contribute to web3 dev stack product-market fit?_ + + + +Nodes operating on the mainstream IPFS network will be able to bridge any content stored on Filecoin miners without having to maintain a global index or restrict available content to known deals. + +#### Internal leverage +_How much would nailing this project improve our knowledge and ability to execute future projects?_ + + + +#### Confidence +_How sure are we that this impact would be realized? Label from [this scale](https://medium.com/@nimay/inside-product-introduction-to-feature-priority-using-ice-impact-confidence-ease-and-gist-5180434e5b15)_. + + + +Medium-Low + +## Project definition +#### Brief plan of attack + + + +TBD + +#### What does done look like? +_What specific deliverables should completed to consider this project done?_ + +#### What does success look like? +_Success means impact. How will we know we did the right thing?_ + + + +#### Counterpoints & pre-mortem +_Why might this project be lower impact than expected? How could this project fail to complete, or fail to be successful?_ + +#### Alternatives +_How might this project’s intent be realized in other ways (other than this project proposal)? What other potential solutions can address the same need?_ + +#### Dependencies/prerequisites + + +#### Future opportunities + + +## Required resources + +#### Effort estimate + + +#### Roles / skills needed +