Re:Open Bazaar – decentralized Bitcoin marketplace
by orf on Saturday July 22, 2017 @07:41PM
(#14830067)
This looks incredibly interesting, thank you! I have one question: how do you handle updates using IPFS? Say a seller updates the price of item X, then a user places an order while the seller is offline based on the older price (which is presumably cached in IPFS still)?
[ Parent
| on HN ]
Re:Open Bazaar – decentralized Bitcoin marketplace
by cpacia on Sunday July 23, 2017 @01:04AM
(#14830981)
All the store data is kept inside a directory, the hash of which is mapped to your peer ID using IPNS. This enables all store data to be downloaded and authenticated using the peer ID.
Any change to the contents of your directory causes the root hash to change and the IPNS mapping is republished.
Mappings a numbered so when looking up a store via it's ID nodes will always use the most recent mapping they can find.
Republishing the IPNS root breaks the caching that accumulated on the root, but all objects inside the directory that haven't changed retain their caching.
Re:Open Bazaar – decentralized Bitcoin marketplace
by SamPatt on Saturday July 22, 2017 @07:50PM
(#14830088)
I'm not one of the developers, who would be able to answer this definitively (you can join our slack if you like to ask). But I believe it's accomplished by using IPNS for some of the calls instead of IPFS, to ensure that the data is up to date.
It does mean that one of the benefits of using IPFS - the seeding of data - only works when there aren't frequent changes to a store. The idea is setting a store up and being able to go offline for a few days while others seed, then when you come back online and make changes, the new changes need to get re-seeded again.