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

noise: use Noise Extension to negotiate the muxer during the handshake #1813

Merged
merged 5 commits into from
Oct 25, 2022

Conversation

julian88110
Copy link
Contributor

@julian88110 julian88110 commented Oct 7, 2022

Muxer negotiation using early data of Noise handshake.
This is the Noise implementation of issue #1789

@marten-seemann
Copy link
Contributor

@julian88110 Could you rebase (git rebase) this PR on top of the current master? Looks like there are still commits from your earlier TLS change in the commit history here.

p2p/security/noise/session.go Outdated Show resolved Hide resolved
p2p/security/noise/session.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
@marten-seemann marten-seemann changed the title Early Muxer selection over Noise handshake noise: use Noise Extension to negotiate the muxer during the handshake Oct 8, 2022
@julian88110 julian88110 marked this pull request as ready for review October 11, 2022 21:40
@julian88110 julian88110 self-assigned this Oct 11, 2022
julian88110 added a commit that referenced this pull request Oct 11, 2022
@julian88110 julian88110 reopened this Oct 12, 2022
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Show resolved Hide resolved
p2p/security/noise/transport.go Show resolved Hide resolved
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

This is looking really good. Just a few nits!

p2p/security/noise/transport.go Outdated Show resolved Hide resolved
p2p/security/noise/transport.go Outdated Show resolved Hide resolved
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Code LGTM.

Something seems to be wrong with the Protobuf though. This PR adds a single entry to the Noise extension. This shouldn't lead to a 537 LOC change in the generated .pb.go file.

@julian88110
Copy link
Contributor Author

This might be related to proto buf compiler version difference, I used the latest protbuf 21.8 and protoc-gen-gogo/1.3.2_2/ to compile the protobuf file, I do notice it changed a lot of the generated file content, even the imported modules are different, indicating a significant code generation change.

@marten-seemann
Copy link
Contributor

This might be related to proto buf compiler version difference, I used the latest protbuf 21.8 and protoc-gen-gogo/1.3.2_2/ to compile the protobuf file, I do notice it changed a lot of the generated file content, even the imported modules are different, indicating a significant code generation change.

I'm not opposed to switching to a different protobuf compiler, but we should be intentional about it, and consistent across the code base. We should also use (Unified) CI to check that all of our .pb.go files are up to date.

I've recompiled the Protobuf here, so this PR can make progress.

@julian88110
Copy link
Contributor Author

This might be related to proto buf compiler version difference, I used the latest protbuf 21.8 and protoc-gen-gogo/1.3.2_2/ to compile the protobuf file, I do notice it changed a lot of the generated file content, even the imported modules are different, indicating a significant code generation change.

I'm not opposed to switching to a different protobuf compiler, but we should be intentional about it, and consistent across the code base. We should also use (Unified) CI to check that all of our .pb.go files are up to date.

I've recompiled the Protobuf here, so this PR can make progress.

Thanks Marten.
Agreed, that was why I asked for the protobuf compiler versions some time ago. Instead of tracking it off record, We should have something like a tool chain config file or dev-env setup config to specify our tool chains and their versions.

@julian88110 julian88110 merged commit 7465a50 into master Oct 25, 2022
@julian88110 julian88110 deleted the noise-mux-sel branch October 25, 2022 17:11
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.

2 participants