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

Mixnet: Sphinx packet builder for mix clients #47

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

youngjoon-lee
Copy link
Contributor

@youngjoon-lee youngjoon-lee commented Jan 11, 2024

This is the 3rd PR of the series of Mixnet specification.

This PR covers https://www.notion.so/Mixnet-Specification-807b624444a54a4b88afa1cc80e100c2?pvs=4#df9f03a808134ae19c085ca40b82161c and its all sub-sections.

In shorts, this PR defines the way how mix clients (Nomos nodes) use the Sphinx library (defined in PR #46) to construct packets for real and cover traffic.

Previously in our v0 Rust implementation, we've used Nym's Sphinx-wrapper implementation: https://github.com/nymtech/nym/tree/v1.1.22/common/nymsphinx, instead of implementing our own. But now, we have more understandings of Sphinx, and I found that their wrapper implementation is very verbose and not easy to modify if we want.
I think it's not very complicated to have our own Sphinx-wrapper as defined in this PR.

Like PR #46, I've tried to use the same term and structure as Nym's just in case, even if some parts are not clean in perspective of engineering.

mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
mixnet/packet.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@danielSanchezQ danielSanchezQ left a comment

Choose a reason for hiding this comment

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

Superb code quality!!

@youngjoon-lee
Copy link
Contributor Author

@danielSanchezQ I just modified this PR to use the pysphinx that we published to pypi:
ed0a4bc. Thanks a lot for your help. Since there have not been many changes since you approved, I'm merging this PR.

@youngjoon-lee youngjoon-lee merged commit 78d02e8 into mixnet-sphinx-packet Jan 15, 2024
1 check passed
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.

None yet

2 participants