fix: move MixPubKeyBook into libp2p_mix and bump libp2p pin past deletion - #7
Merged
Merged
Conversation
chaitanyaprem
force-pushed
the
chore/move-mix-pub-key-book-rebase
branch
2 times, most recently
from
May 8, 2026 04:56
290e011 to
c8e5999
Compare
…tion
Three follow-ups to the original mix extraction:
1. Move `MixPubKeyBook` from libp2p/peerstore into libp2p_mix/pool.
The type is mix-specific (Curve25519 keys per peer), only used
by libp2p_mix's own pool, and shouldn't bleed into core libp2p.
The peer-store extension mechanism makes this trivial:
`ref object of PeerBook[Curve25519Key]` defined locally is
indistinguishable from the previous version at the call site.
2. Drop the stale `{.public.}` pragma from method overrides in
entry/exit/reply_connection.nim. Upstream nim-libp2p removed the
marker pragma; our overrides referenced it without an importing
module that defined it.
3. Bump the libp2p git pin to the master commit that merges
vacp2p/nim-libp2p#2378 (mix-extraction PR). With our local
definition in libp2p_mix/pool, this avoids ambiguous identifier
errors against the registered libp2p. The newer libp2p pulls in
a git-pinned boringssl dep that nimble's default SAT solver
can't resolve, so CI now runs `nimble --solver:legacy setup`.
Drop both the legacy flag and the git pin once a release
including #2378 is tagged.
This re-lands the work originally merged as #5 — that PR was
mistakenly merged into the (already-merged) PR #4 stacked branch
instead of master, so the changes never reached master.
chaitanyaprem
force-pushed
the
chore/move-mix-pub-key-book-rebase
branch
from
May 8, 2026 05:00
c8e5999 to
161ebb6
Compare
Collaborator
Author
|
merging eventhough CI fails. KadDHT.new won't compile due to Opt[T] generic resolution at libp2p builders.nim:503. This is a libp2p master regression introduced between the deletion-PR's base commit and current master. Nim 2.0.16 hits it; the example job (Nim 2.2.6) passed, suggesting Nim 2.2.6 may be fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-lands the work that was originally merged as #5. That PR was mistakenly merged into PR #4's stacked branch after PR #4 had already been merged into master, so the changes never reached master.
Three follow-ups to the original mix extraction:
MixPubKeyBookintolibp2p_mix/pool— it's a mix-specific peer-store extension (Curve25519 keys per peer), shouldn't live in core libp2p. The peer-store generic mechanism (ref object of PeerBook[Curve25519Key]) makes the local definition behave identically at the call site.{.public.}pragma from method overrides inentry/exit/reply_connection.nim— upstream nim-libp2p removed the marker pragma.7e72c0d6d— the master commit that merges chore: extract mix to logos-co/nim-libp2p-mix vacp2p/nim-libp2p#2378 (mix-extraction PR). Required so the registered libp2p no longer shipsMixPubKeyBook, avoiding ambiguous-identifier errors against our local definition.Once nim-libp2p tags a release including #2378, swap the pin for
libp2p >= <new-version>.Test plan
🤖 Generated with Claude Code