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

refactor: proper use of setupNat #1740

Merged
merged 2 commits into from
May 17, 2023
Merged

refactor: proper use of setupNat #1740

merged 2 commits into from
May 17, 2023

Conversation

Ivansete-status
Copy link
Collaborator

Description

This PR is aimed to give a better structure to the setupNat proc usage, plus update the reference to nim-eth submodule.
The update of nim-eth submodule is important to break the confutils dependency, and therefore, allow the generation of the waku dynamic library, as intended in: #1730

Notice that I had to use rlpx_connected_peers instead of connected_peers in wakunode1.nim due to the update of the vendor/nim-eth, which not only adds the dependency-break with 'confutils' but also includes another changes.

Notice that I had to adapt to use 'rlpx_connected_peers' instead
of 'connected_peers' in 'wakunode1.nim' because due to the update
of the 'vendor/nim-eth', which adds the dependency-break with
'confutils' but also includes another changes.

Aside note: we cannot have 'confutils' dependency in 'nim-eth' because
that will prevent the generation of any waku dynamic library.
Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :)

Port(uint16(conf.udpPort) + conf.portsShift))
if natRes.isErr():
error "Error in setupNat", error = natRes.error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are calling quit() in the wakubridge, but not here - should the reaction be consistent accross apps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree indeed. However, this is consistent within the chat2bridge.nim itself. I think it is better if we raise a separate PR for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpavlin - Next week I will create a separate PR for adding consistency in the parameters checks for all the apps.

p1.isNil
p2.isNil == false
p3.isNil == false
p1.isErr()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other cases it is xplicitly checking against true - should we be consistent and do it here as well?

Copy link
Member

@vpavlin vpavlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments, but in general LGTM

@Ivansete-status Ivansete-status merged commit 665484c into master May 17, 2023
@Ivansete-status Ivansete-status deleted the refactor-setupnat branch May 17, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants