-
Notifications
You must be signed in to change notification settings - Fork 9
[ADR] 0001 - Adopt Multiaddr #32
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
baaf824
5dbf590
d54250b
2736e9b
8758154
c09e767
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # ADR-0001: Adopt Multiaddr | ||
|
|
||
| # Adopt Multiaddr for Addressing and Protocol Handling | ||
|
|
||
| * Status: in review | ||
| * Deciders: Pocket Network team | ||
|
bryanchriswhite marked this conversation as resolved.
Outdated
|
||
| * Date: 2023-04-17 | ||
|
|
||
| Technical Story: GitHub discussion [#616: Should we go multiaddr](https://github.com/pokt-network/pocket/discussions/616) | ||
|
|
||
| ## Context and Problem Statement | ||
|
|
||
| In the context of simplifying and consolidating node identity, facing the need for a standardized and extensible address format, we decided to adopt multiaddr and neglect alternative address conventions, to achieve a future-proof and composable addressing scheme, accepting the additional dependency and learning curve, because multiaddr provides a standard solution with many benefits. | ||
|
bryanchriswhite marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Decision Drivers | ||
|
|
||
| * Standardized serialization format | ||
| * Supporting arbitrarily deeply nested protocols | ||
| * Supporting arbitrary protocol values, i.e., extensible | ||
|
bryanchriswhite marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Considered Options | ||
|
|
||
| * Adopting multiaddr | ||
| * Custom address convention | ||
|
|
||
| ## Decision Outcome | ||
|
|
||
| Chosen option: "Adopting multiaddr", because it provides a standardized, extensible, and future-proof solution for addressing nodes. | ||
|
bryanchriswhite marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Positive Consequences | ||
|
|
||
| * Standardized and easily parsable node addresses | ||
| * Extensible and composable address format | ||
| * Future-proof addressing scheme | ||
|
|
||
| ### Negative Consequences | ||
|
|
||
| * Additional dependency on the multiaddr library | ||
| * Learning curve for understanding multiaddr abstraction | ||
|
|
||
| ## Pros and Cons of the Options | ||
|
|
||
| ### Adopting multiaddr | ||
|
|
||
| * Good, because it provides a standardized and extensible address format | ||
| * Good, because it supports arbitrarily deeply nested protocols | ||
| * Good, because it is a widely adopted solution in the p2p ecosystem | ||
| * Bad, because it introduces an additional dependency | ||
| * Bad, because it requires learning a new abstraction | ||
|
|
||
| ### Custom address convention | ||
|
|
||
| * Good, because it doesn't require an additional dependency | ||
| * Bad, because it may lead to a non-standard and less extensible solution | ||
| * Bad, because it requires development and maintenance efforts | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that the ADR is very light, which comes with both pros & cons. Was it an explicit decision to not, for example, provide examples of what a multiaddr or a custom URL looks like? I can steelman both sides of the argument here but wanted to know if it was the intention or just a lack of time?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I think it was more of a matter of structure. Looking at it now, I'm not sure where it would make the most sense to put something like that. I feel like that would be something that I would expect to be covered by references. However, there isn't a great way to consistently be much more specific with a reference other than a link to a page (and maybe a named anchor on the page). I wonder if grouping them all together is the must useful approach. We could consider including an "examples" or "practical application" section in "decision outcome" > "positive(/negative) consequences" and/or each option section. Pos./neg. consequences would provide a place to show (or reference) code and/or diagram(s) like this. Wdyt?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add a section like so with the comments I have in place. I think we should keep it light weight but have a reminder to do this if we choose to. I think if you copy-paste one of your tests in p2p, or link to them, it would be more than sufficient in this ADR. |
||
| ### Links | ||
|
|
||
| * [`go-multiaddr` GitHub repo](https://github.com/multiformats/go-multiaddr) | ||
| * [`multiaddr` specification](https://github.com/multiformats/multiaddr) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯