Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Gossip ContactInfo messages are incorrectly signed #3191

Closed
mvines opened this issue Mar 8, 2019 · 1 comment · Fixed by #3201
Closed

Gossip ContactInfo messages are incorrectly signed #3191

mvines opened this issue Mar 8, 2019 · 1 comment · Fixed by #3201
Assignees

Comments

@mvines
Copy link
Contributor

mvines commented Mar 8, 2019

Gossip ContactInfo messages are signed with the keypair of the sending node but then verified using the keypair of the node that the ContactInfo actually refers to. This causes gossip to fall down on occasion, see the patch at the end of this description for STR.

From d4bf131a536f91669e460096753cca10b5a8c83f Mon Sep 17 00:00:00 2001
From: Michael Vines <[email protected]>
Date: Thu, 7 Mar 2019 13:05:17 -0800
Subject: [PATCH] discover test

---
 core/src/gossip_service.rs | 2 +-
 tests/local_cluster.rs     | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/core/src/gossip_service.rs b/core/src/gossip_service.rs
index 3e2c824e..ce9bc809 100644
--- a/core/src/gossip_service.rs
+++ b/core/src/gossip_service.rs
@@ -65,7 +65,7 @@ pub fn discover(
     // Wait for the cluster to converge
     let now = Instant::now();
     let mut i = 0;
-    while now.elapsed() < Duration::from_secs(30) {
+    while now.elapsed() < Duration::from_secs(4) {
         let rpc_peers = spy_ref.read().unwrap().rpc_peers();
         if rpc_peers.len() >= num_nodes {
             info!(
diff --git a/tests/local_cluster.rs b/tests/local_cluster.rs
index 842dc6dd..e1d80dca 100644
--- a/tests/local_cluster.rs
+++ b/tests/local_cluster.rs
@@ -109,3 +109,12 @@ fn test_two_unbalanced_stakes() {
 
     drop(cluster);
 }
+
+#[test]
+fn discover_3() {
+    solana_logger::setup();
+    for i in 0..20 {
+        info!("attempt {}", i);
+        LocalCluster::new_with_config(&[100; 3], 1_000_000, &fullnode_config);
+    }
+}
-- 
2.17.2 (Apple Git-113)
@sagar-solana
Copy link
Contributor

Fixed in #3201

brooksprumo pushed a commit to brooksprumo/solana that referenced this issue Oct 16, 2024
* build(deps): bump openssl from 0.10.66 to 0.10.67

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.66 to 0.10.67.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](sfackler/rust-openssl@openssl-v0.10.66...openssl-v0.10.67)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants