-
Notifications
You must be signed in to change notification settings - Fork 1
feat(rust/hermes-ipfs): ipfs persistent keypair #694
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
Merged
Merged
Conversation
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
…r support This adds a method to that allows creating an IPFS node builder with an existing keypair instead of generating a new one. This enables stable peer IDs across restarts when keypairs are loaded from disk. The method wraps and follows the same
Add method to HermesIpfsBuilder that configures Gossipsub with mesh parameters suitable for 2-3 node test networks: - mesh_n_low: 1 (minimum peers) - mesh_n: 2 (target peers) - mesh_n_high: 3 (maximum peers) - mesh_outbound_min: 1 Default Gossipsub configuration expects mesh_n=6 peers, which doesn't work in small test environments. This method provides an alternative to for testing scenarios. Use via environment variable HERMES_P2P_TEST_MODE=true to enable small mesh configuration automatically.
Contributor
📚 Docs PreviewThe docs for this PR can be previewed at the following URL: https://docs.dev.projectcatalyst.io/libs/feat/hermes-ipfs-persistent-keypair |
Contributor
|
✅ Test Report | |
rafal-ch
approved these changes
Dec 10, 2025
Contributor
rafal-ch
left a comment
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.
LGTM 👍
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.
Add
with_keypair()Method toHermesIpfsBuilderfor Persistent Keypair SupportSummary
This PR adds a
with_keypair()method toHermesIpfsBuilderthat enables creating an IPFSnode builder with an existing keypair instead of auto-generating a new one. This is
essential for supporting persistent peer identities across node restarts.
Motivation
Currently,
hermes-ipfsonly exposesHermesIpfsBuilder::new(), which auto-generates a newkeypair on each instantiation. While the underlying
rust_ipfs::IpfsBuildersupportscreating builders with existing keypairs via
IpfsBuilder::with_keypair(), thisfunctionality was not exposed through the
hermes-ipfsAPI.Without this capability, applications cannot:
Changes
Added
HermesIpfsBuilder::with_keypair()methodconnexa::builder::IntoKeypair(includinglibp2p::identity::Keypair)IpfsBuilder::with_keypair()methodUsage Example