network: disable libp2p message signing#203
Merged
jking-aus merged 2 commits intosigp:unstablefrom Mar 21, 2025
Merged
Conversation
Member
|
@nkryuchkov Thank you for opening this PR. Should we also change the validation to this https://docs.rs/libp2p-gossipsub/latest/libp2p_gossipsub/enum.ValidationMode.html#variant.Anonymous? |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR disables libp2p message signing to address unexpected signature errors by configuring the gossipsub behaviour to use anonymous message authenticity rather than signing messages.
- Replace MessageAuthenticity::Signed with MessageAuthenticity::Anonymous
- Update gossipsub configuration in the network component
Comments suppressed due to low confidence (1)
anchor/network/src/network.rs:364
- [nitpick] Since 'local_keypair' is no longer used with the new anonymous configuration, consider removing the cloning or the variable itself if it isn’t required elsewhere.
- gossipsub::Behaviour::new(MessageAuthenticity::Signed(local_keypair.clone()), config)
Contributor
Author
I agree. Although |
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.
Issue Addressed
SSV node rejects messages from Anchor on libp2p level with the
unexpected signatureerror:Proposed Changes
Disable message signing on the libp2p level by setting
MessageAuthenticitytoAnonymousAdditional Info
SSV node disables signing on the libp2p level because its messages have a payload with signature: https://github.com/ssvlabs/ssv/blob/v2.2.0/network/topics/pubsub.go#L138
This allows choosing a signing scheme that's appropriate in terms of resource consumption.