-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support dag-jose codec by default #8364
Comments
@oed: thanks for opening. The usecase makes sense. This is hitting on bigger questions on how 3rd party plugins are supported (onboarded, maintained, offboarding). I know there have been some conversations about this, but we need to track that down and get decisions made. I haven't engaged much here myself so don't have a timeline on this yet, but we'll provide an update on where we're at by end of next week. |
+1 to @BigLep's comment that some story work is needed on what it means to have a plugin be contributed, what it would mean for something to be bundled or become default, etc. Here are some technical questions I suspect will be asked, because they could be relevant to estimating impact on release processes and maintainability:
These are in addition to the other questions that are likely relevant (e.g. relating to the human side of ownership and maintenance, or relating to ecosystem usage pull size, etc). I'm identifying these as some of the more objective, technical, and thus hopefully easy-to-answer, metrics I can think of :) |
Here as my attempts to answer those questions:
Measuring the binary size seems to be the most tricky part, so I'm going to post these notes with that still as a todo. I think the best way to do this will be to literally build the plugin and look at the file size of go-ipfs built with and without it. (The real-world-relevance number is how much larger the total binary gets -- so measuring the package alone is an underestimate, and measuring the package and its transitives alone is an overestimate because many dependencies will already be in go-ipfs. There exist tools like |
We would definitely be willing to look at the binary impact of this. If anyone has pointers for the best way to go about it that would be helpful ofc! Afaict About the spec: yeah we've been using js-dag-jose which implements the spec in production for quite some time. I don't expect the spec to change. |
I'm not actually deeply familiar with this myself -- but I think https://github.com/ipfs/go-ipfs/blob/4e132af3ef11d4d1690a0e5b9e3639526eb742f6/docs/plugins.md#preloaded-plugins contains some description of how to get something built? Then just good ol' (I think that how big the thing is if built as a golang plugin (concretely: |
Okay, couple updates:
.
.
As a result of that last item that's an upstream need, I don't quite have working code to push into a PR right now. But I imagine it's close and I can hand this off to someone to finish together with that last bit of glue. |
I come with notes from a meeting that included myself, @BigLep, @aschmahmann, @Stebalien , @momack2 , @jbenet , @rvagg , and @willscott . There has been a great deal of deliberation about this, because while we want to accept all the enhancements and features into go-ipfs that we reasonably can, we have to balance this against maintainability and stability. In addition to merely technical concerns, there are also social concerns, in that we should have some care regarding what we communicate and commit to by how we connect the things, and what we suggest by making something available by default. Ultimately, our collective inclination is that yes, we will try to get dag-jose bundled into go-ipfs and available by default. We feel that bundling this codec will be net valuable because of our overall high confidence in the implementors; becase of our faith that the work will be maintained; because the burden it adds in a mechanical sense (e.g. binary size) is fairly minimal; because the code is relatively simple and we do not think it is likely to represent an operational hazard; and we've been convinced that enough value will be provided to enough users to make the trade overall worth it. This is not a choice made lightly, and it's also not one we're entirely thrilled about. There was a heavy expression of desire in the meeting to move towards some form of codec pluggability based on technology such as e.g. WASM, which would allow hot-loading of codecs (and, provide a form of sandboxing), and thus remove many reasons to deliberate about a process and conditions for codec inclusion at all. However, we ultimately had to realize that we don't have that technology in place today; and the dag-jose codec proposal is sufficiently well-developed and has sufficiently immediate need that it would not be reasonable to make it hold up until such hot-loading technology is in place. It should be noted that we've done some very cursory review of the codec code, but with an aim of ensuring it won't destabilize go-ipfs, and little further. Specifically, we check for basic rules of engagement such as: the code does not reach out to the network; the code does not execute system processes; the code does not use the unsafe package; the code does not spawn goroutines unreasonably; the code does not have unreasonably large transitive dependencies that would unduly expand the surface area that go-ipfs is exposed to and may need to audit; etc. We do not review the code for logical correctness, fitness for purpose, cryptographic security, performance, etc. We assume that the developers and maintainers of the codec have done this work to their own satisfaction, and our bundling of it does not represent any especial or additional certification effort. Belatedly finding major issues in any of these areas could result in dropping the plugin from go-ipfs. As to how exactly we expect to implement the relationship:
Note that we are expecting that the codec will be maintained. We have not decided in advance on an exact policy for how go-ipfs will respond in the event that the codec falls out of maintenance, but if it becomes difficult to make new go-ipfs releases which pull in updates of other libraries that would also affect the codec, then it is possible that we would be forced to drop the codec plugin if the situation can not be resolved in reasonable time. Next steps:
|
I've made a draft PR which shows how the plugin wiring can be done: #8399 (It just contains some example code and highlights where the changes need to appear -- the best way to carry it forward is probably for someone from the ceramic team to grab that diff and iterate on it in their own PR to add dag-jose, and do any of the testing needed in go-ipfs in the same PR, etc. I'll close that draft PR when we get there. (Don't worry about trying to maintain attribution on that diff; it's not interesting enough :))) |
Hi @oed: no pressure from PL on this, but wanted to see how this is going on your end so we plan accordingly. |
Hi @BigLep, I've been looking into the integration and made some progress. I've been traveling this week and will resume this activity once I'm back this weekend. I "think" I'm close to completion but will post questions should I get stuck at any point. |
Hi @smrz2001 : just curious how the integration is going. Again, no pressure here, but let us know if you have any questions. |
Hey @BigLep, I can finally say that I am a couple of days away from a fully ready PR 😁 The PR is up as a draft while I finalize the unit tests. I'm also testing my branch against @rvagg's new Some quick history/context for everyone monitoring this thread: There are now no handwired node assemblers and only small, surgical changes over generated code. The handwired assemblers were (at least for me) a nightmare to debug, and also (IMHO) somewhat fragile in general. Having said that, the prior version of the code was a great starting point thanks to Alex, and done before codegen was available. |
Checklist
Description
With ipld-prime merged (🎉) into go-ipfs we (Ceramic team) are currently working on creating a plugin that adds support for dag-jose to go-ipfs. However, the plugin approach has several disadvantages. The main one being that a secondary binary needs to be distributed and used by everyone that wants to support dag-jose. Another is that it's unclear how the plugin would work with various different versions of ipfs (maybe someone could provide clarity around this?).
To mitigate the issues with adding dag-jose using a plugin support could be added for it in go-ipfs directly. Created this ticket to gauge support for this from the ipfs maintainers.
DAG-JOSE adoption:
Several projects are already looking to use dag-jose and it really is the easiest integration point between the Decentralized Identifier (DID) community and IPFS.
Implementations:
Maintenance:
The go-dag-jose code is very minimal and the overhead in go-ipfs should be negligible. As for the go-dag-jose package itself, it was created by @alexjg, but the Ceramic team is happy to take over maintenance work. Repo can be transfered to ceramicnetwork or ipld github orgs, whatever makes the most sense.
If a go ahead is given we would be happy to contribute the integration to the go-ipfs code base!
The text was updated successfully, but these errors were encountered: