Skip to content

Commit

Permalink
Merge branch 'develop' into feat/stackerdb-rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcnelson authored Sep 1, 2023
2 parents 20eec10 + 7c107dc commit a5cd26e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 29 deletions.
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ members = [
"stx-genesis",
"libstackerdb",
"testnet/stacks-node"]

# Use a bit more than default optimization for
# dev builds to speed up test execution
[profile.dev]
opt-level = 1

# Use release-level optimization for dependencies
# This slows down "first" builds on development environments,
# but won't impact subsequent builds.
[profile.dev.package."*"]
opt-level = 3

[profile.release]
debug = true
3 changes: 0 additions & 3 deletions clarity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ developer-mode = []
slog_json = ["stacks_common/slog_json"]
testing = []

[profile.dev.package.regex]
opt-level = 2

[target.'cfg(all(target_arch = "x86_64", not(target_env = "msvc")))'.dependencies]
sha2-asm = "0.5.3"

14 changes: 0 additions & 14 deletions stackslib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ resolver = "2"
edition = "2021"
rust-version = "1.61"

[profile.release]
debug = true

[lib]
name = "blockstack_lib"
path = "src/lib.rs"
Expand Down Expand Up @@ -111,17 +108,6 @@ monitoring_prom = ["prometheus"]
slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json"]
testing = []

# Use a bit more than default optimization for
# dev builds to speed up test execution
[profile.dev]
opt-level = 1

# Use release-level optimization for dependencies
# This slows down "first" builds on development environments,
# but won't impact subsequent builds.
[profile.dev.package."*"]
opt-level = 3

[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies]
sha2 = { version = "0.10", features = ["asm"] }

Expand Down
2 changes: 1 addition & 1 deletion stackslib/src/net/neighbors/comms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ impl ToNeighborKey for NeighborKey {
impl ToNeighborKey for NeighborAddress {
fn to_neighbor_key(&self, network: &PeerNetwork) -> NeighborKey {
// NOTE: PartialEq and Hash for NeighborKey ignore the low bits of peer version
// and ignore network ID, and the CovnersationP2P ensures that we never even connect
// and ignore network ID, and the ConversationP2P ensures that we never even connect
// to a node with the wrong network ID or wrong peer version bits anyway, so
// it's safe to use the local node's copies of this data to construct a
// NeighborKey for the purposes of later disconnecting from it.
Expand Down
10 changes: 0 additions & 10 deletions stackslib/src/net/neighbors/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ impl PeerDBNeighborWalk {
}

impl NeighborWalkDB for PeerDBNeighborWalk {
/// implements get_fresh_random_neighbors
fn get_fresh_random_neighbors(
&self,
network: &PeerNetwork,
Expand Down Expand Up @@ -283,7 +282,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(neighbors)
}

/// implements lookup_stale_neighbors
fn lookup_stale_neighbors(
&self,
network: &PeerNetwork,
Expand Down Expand Up @@ -336,7 +334,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok((resolved, to_resolve))
}

/// implements add_or_schedule_replace_neighbor
fn add_or_schedule_replace_neighbor(
&self,
network: &mut PeerNetwork,
Expand Down Expand Up @@ -397,7 +394,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok((true, neighbor_from_handshake))
}

/// implements get_initial_walk_neighbors
fn get_initial_walk_neighbors(
&self,
network: &PeerNetwork,
Expand All @@ -419,7 +415,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(allowed_peers)
}

/// implements check_neighbor_denied
fn check_neighbor_denied(
&self,
network: &PeerNetwork,
Expand All @@ -442,7 +437,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(())
}

/// implements replace_neighbors
fn replace_neighbors(
&self,
network: &mut PeerNetwork,
Expand Down Expand Up @@ -483,7 +477,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(())
}

/// implements neighbor_from_handshake
fn neighbor_from_handshake(
&self,
network: &PeerNetwork,
Expand All @@ -499,7 +492,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
.map(|(neighbor, _)| neighbor)
}

/// implements save_neighbor_from_handshake
fn save_neighbor_from_handshake(
&self,
network: &mut PeerNetwork,
Expand All @@ -519,7 +511,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(neighbor_from_handshake)
}

/// implements update_neighbor
fn update_neighbor(
&self,
network: &mut PeerNetwork,
Expand All @@ -540,7 +531,6 @@ impl NeighborWalkDB for PeerDBNeighborWalk {
Ok(cur_neighbor)
}

/// implements get_asn_count
fn get_asn_count(&self, network: &PeerNetwork, asn: u32) -> u64 {
PeerDB::asn_count(network.peerdb_conn(), asn).unwrap_or(1)
}
Expand Down
1 change: 0 additions & 1 deletion stackslib/src/net/stackerdb/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ impl<NC: NeighborComms> StackerDBSync<NC> {
.collect();

schedule.sort_by(|item_1, item_2| item_1.1.len().cmp(&item_2.1.len()));
schedule.reverse();
test_debug!(
"{:?}: Will push up to {} chunks for {}",
network.get_local_peer(),
Expand Down

0 comments on commit a5cd26e

Please sign in to comment.