diff --git a/Cargo.toml b/Cargo.toml index 11432ec1eb..d09658f2ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ qp2p = "~0.11.3" rand = "~0.7.3" rand_chacha = "~0.2.2" resource_proof = "0.8.0" -sn_messaging = "~12.0.0" +sn_messaging = "~13.0.0" sn_data_types = "~0.18.0" thiserror = "1.0.23" tokio = "1.3.0" diff --git a/src/delivery_group.rs b/src/delivery_group.rs index 5871ccd329..7892a8ed1b 100644 --- a/src/delivery_group.rs +++ b/src/delivery_group.rs @@ -154,29 +154,6 @@ fn get_peer<'a>(name: &XorName, section: &'a Section, network: &'a Network) -> O .or_else(|| network.get_elder(name)) } -// Returns the set of peers that are responsible for collecting signatures to verify a message; -// this may contain us or only other nodes. -pub fn signature_targets(dst: &DstLocation, our_elders: I) -> Vec -where - I: IntoIterator, -{ - let dst_name = match dst { - DstLocation::Node(name) => *name, - DstLocation::Section(name) => *name, - DstLocation::EndUser(_) | DstLocation::Direct => { - error!("Invalid destination for signature targets: {:?}", dst); - return vec![]; - } - }; - - let mut list: Vec<_> = our_elders - .into_iter() - .sorted_by(|lhs, rhs| dst_name.cmp_distance(lhs.name(), rhs.name())) - .collect(); - list.truncate(cmp::min(list.len(), ELDER_SIZE)); - list -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/routing/core.rs b/src/routing/core.rs index 0f9ec0bfeb..1423e94e72 100644 --- a/src/routing/core.rs +++ b/src/routing/core.rs @@ -2091,16 +2091,6 @@ impl Core { proof_chain, None, )? - } else if itinerary.aggregate_at_src() { - let proof_chain = - self.create_proof_chain(&itinerary.dst, additional_proof_chain_key)?; - let proposal = - self.create_accumulate_at_src_proposal(itinerary.dst, variant, proof_chain); - let recipients = delivery_group::signature_targets( - &itinerary.dst, - self.section.elders_info().peers().copied(), - ); - return self.send_proposal(&recipients, proposal); } else { Message::single_src(&self.node, itinerary.dst, variant, None, None)? }; @@ -2201,38 +2191,6 @@ impl Core { commands } - fn create_accumulate_at_src_proposal( - &self, - dst: DstLocation, - variant: Variant, - proof_chain: SectionChain, - ) -> Proposal { - let dst_key = if let Some(name) = dst.name() { - *self.section_key_by_name(&name) - } else { - // NOTE: `dst` is `Direct`. We use this when we want the message to accumulate at the - // destination and also be handled only there. We only do this if the recipient is in - // our section, so it's OK to use our latest key as the `dst_key`. - *self.section.chain().last_key() - }; - - let message = PlainMessage { - src: self.section.prefix().name(), - dst, - dst_key, - variant, - }; - - let proposal = Proposal::AccumulateAtSrc { - message: Box::new(message), - proof_chain, - }; - - trace!("Create {:?}", proposal); - - proposal - } - fn create_proof_chain( &self, dst: &DstLocation,