-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
p2p: make NodeID and NetAddress public #6583
p2p: make NodeID and NetAddress public #6583
Conversation
And the main reason for moving NodeID to the types folder is because we need it exposed because it is a response in the RPC? |
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.
I know we don't want to have a lengthy discussion on this, but can we please just move the necessary types to pkg/p2p
please? pkg
being our external package used by external processes and clients. There is nothing stopping us from doing this now. We shouldn't be moving stuff into types
.
ref: https://github.com/golang-standards/project-layout#pkg
Yes, and also because some of these functions are useful for people attempting to construct config objects. This request grew out of my conversation with @ValarDragon and seemed quite reasonable to me.
I don't really think this is the right form to have a conversation about this, but:
I think it makes sense to break |
I do not think we should proceed with this PR by just moving these the |
Let me think about this a bit more and see if there's a better path forward that preserves the general release timeline without sacrificing the coherence of the API. |
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.
This was one of my fears with not thinking the internal work through thoroughly. Types is already a mess, we have had this discussion countless times, adding more things into and passing the work on to a later date is something I'm not a fan of. pkg/p2p
is a step in the right direction and I would wish to avoid breaking the API twice and aim for once, not already plan for two breaking changes.
Also CHANGELOG!!
Codecov Report
@@ Coverage Diff @@
## master #6583 +/- ##
==========================================
- Coverage 65.99% 61.16% -4.83%
==========================================
Files 234 297 +63
Lines 20269 27974 +7705
==========================================
+ Hits 13376 17111 +3735
- Misses 5825 9141 +3316
- Partials 1068 1722 +654
|
Just to be fair, I think I did think about this pretty thoroughly, and while I mentioned this implication (e.g. putting some things in I think the open question is not "should we keep
I'm also aware that ADR-60 doesn't include anything about breaking up types, which might be an oversight. I think the core issue/questions here are:
Regardless, I think PRs like this are extremely the wrong place to have conversations about this level of scoping and scheduling. |
Why? We can move things into |
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.
approving to unblock upgrade to sdk. Still think we should move to pkg directory
This is a big PR, but I think it has to be. It's split up into two
commits whith the substantive changes in the first commit and more
rote changes in the second that just update references.
This change moves a couple of types out of the
p2p
layer and intothe public types directory. I don't want this to be a referenda on
types
, which I think is a problem we should address later, butbefore 1.0.