Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support Hypercore/IPFS #1064

Closed
aartaka opened this issue Dec 7, 2020 · 5 comments
Closed

Feature request: Support Hypercore/IPFS #1064

aartaka opened this issue Dec 7, 2020 · 5 comments
Labels
feature Feature requests. nx-extension Related to Nyxt extensions.

Comments

@aartaka
Copy link
Contributor

aartaka commented Dec 7, 2020

Now that Beaker got 1.0 release, it seems that Hypercore protocol (a decentralized content publishing system with non-erasable hash-checked history) can be a good thing to support in a browser. Given that we're trying to replace Emacs, we can do a good job of creating an environment for decentralized publishing, comparable to Beaker's built-in editor.

However, implementing this protocol and accompanying handlers doesn't sound as a thing to add to Nyxt core. It rather sounds like independent extension on top of what Nyxt provides.

Implementation problem: list of valid schemes is hard-coded in valid-url-p and one cannot alter it. An author of the extension for Hypercore will need to add hyper:// scheme to the valid schemes list, but won't be able to do so. Should we make it global/*browser*-based?

@Ambrevar
Copy link
Member

Ambrevar commented Dec 9, 2020

Beaker is built on top of Electron, so I assume it's leveraging WebEngine for
the rendering. (I haven't looked more than that, really, so please correct me
if I'm wrong!)

Hypercore looks very cool. Also very similar to IPFS. Any idea about the
differences between the two?

I don't have a strong opinion about making this an extension or integrating it
into the core. Can you expand on why you'd rather keep it out?

About valid-url-p: no problem in moving this to a BROWSER class slot. Good catch!

@aartaka
Copy link
Contributor Author

aartaka commented Dec 9, 2020

Beaker is built on top of Electron, so I assume it's leveraging WebEngine for
the rendering. (I haven't looked more than that, really, so please correct me
if I'm wrong!)

It is using WebEngine, you're right.

Hypercore looks very cool. Also very similar to IPFS. Any idea about the
differences between the two?

Hmmmm. I'm not sure -- they look similar conceptually, so it's only an implementation and particular hashing algorithms that differ, probably.

One thing that I noticed is that IPFS computes the hash of the data, and stores it in a global hash table indexed by this exact hash. Hypercore uses sequential structure that doesn't rely on hashes. So, potentially, IPFS may have difficulties with hash collisions in the future, while Hypercore will not have these. However, I haven't looked that deep into the these, so my reasoning can be flawed.

I don't have a strong opinion about making this an extension or integrating it
into the core. Can you expand on why you'd rather keep it out?

There are two strategies for implementing it -- requiring a JS library dependency or writing our own Hypercore client. Whatever strategy we use, it will take some space in the source tree (and possibly introduce optional dependencies!), distracting the potential code reader from the core of Nyxt.

@aartaka aartaka changed the title Feature request: Support Hypercore protocol Feature request: Support Hypercore/IPFS Dec 9, 2020
@jmercouris
Copy link
Member

I believe this should be an extension.

@Ambrevar Ambrevar added the feature Feature requests. label Mar 24, 2021
@defaultxr
Copy link
Contributor

defaultxr commented Jan 26, 2022

One thing that I noticed is that IPFS computes the hash of the data, and stores it in a global hash table indexed by this exact hash. Hypercore uses sequential structure that doesn't rely on hashes. So, potentially, IPFS may have difficulties with hash collisions in the future, while Hypercore will not have these.

IPFS doesn't require just one specific hashing algorithm, it actually uses what's called multihash which is basically a string that includes the hash algorithm along with the hash itself, so in theory if collisions were a problem with one type of hash, it would just be a matter of using a different type for the item you're trying to refer to. Since the hash algorithm is specified with every IPFS CID (content identifier) collisions are basically no longer a problem.

@Ambrevar Ambrevar mentioned this issue Sep 23, 2022
22 tasks
@jmercouris
Copy link
Member

Again, probably an extension. :-D

@aadcg aadcg added the nx-extension Related to Nyxt extensions. label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests. nx-extension Related to Nyxt extensions.
Development

Successfully merging a pull request may close this issue.

5 participants