by quantadev · 1y ago · 0 comments
About IFPS hashing... I'm a very experienced IFPS developer myself (2 years of it). I always argued the 'variable hash algorithm' aspect of IPFS was just an unnecessary complexity and that SHA256 should've been hard-coded into the whole thing. As per usual, the IPFS team went with the more complex approach, just like they did when they over-engineered ATProto in the same way by the SAME developer.
But the main reason Nostr cannot fit into IPFS is slightly more nuanced than the actual hash algo. Fiatjaf made the decision NOT to take the hash of the FINAL JSON object itself, and so no matter what hash algo he had used, it was never going to cleanly fit into IPFS without each Nostr message being 'wrapped' with some IPFS wrapper, necessarily resulting in an DIFFERENT hash. So there's two different layers to the incompatableness.
EDIT: Going deeper into the weeds: If social media messages are shorter than 256K (the default chunker size of IPFS) I think you can end up getting a SHA256 directly out of it, so there WAS the potential to use IPFS with Nostr in that way, except for the fact that Fiatjaf didn't hash the FINAL JSON, but hashed parts of it.
I remember Jeromy and his boss Cake who pretended to interview me for a job once, which cratered when I refused to do the "coding challenge" purely out of the principle of the thing. lol.