Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Remove proofchain from all messages and send only when necessary #2523

Merged
merged 7 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ qp2p = "~0.11.9"
rand = "~0.7.3"
rand_chacha = "~0.2.2"
resource_proof = "0.8.0"
sn_messaging = "27.0.0"
sn_messaging = "28.0.0"
sn_data_types = "~0.18.3"
thiserror = "1.0.23"
tokio = "1.3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/agreement/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ impl DkgCommand {
} => {
let variant = Variant::DkgMessage { dkg_key, message };
let message =
RoutingMsg::single_src(node, DstLocation::DirectAndUnrouted, variant, None)?;
RoutingMsg::single_src(node, DstLocation::DirectAndUnrouted, variant, key)?;

Ok(Command::send_message_to_nodes(
recipients.clone(),
Expand Down Expand Up @@ -550,7 +550,7 @@ impl DkgCommand {
non_participants,
};
let message =
RoutingMsg::single_src(node, DstLocation::DirectAndUnrouted, variant, None)?;
RoutingMsg::single_src(node, DstLocation::DirectAndUnrouted, variant, key)?;

Ok(Command::send_message_to_nodes(
recipients.clone(),
Expand Down
5 changes: 2 additions & 3 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use bytes::Bytes;
use ed25519_dalek::Keypair;
use hex_fmt::HexFmt;
pub use qp2p::{RecvStream, SendStream};
use secured_linked_list::SecuredLinkedList;
use sn_messaging::{client::ClientMsg, DstLocation, EndUser, SrcLocation};
use std::{
collections::BTreeSet,
Expand Down Expand Up @@ -67,8 +66,8 @@ pub enum Event {
dst: DstLocation,
/// The proof if the message was set to be aggregated at source.
proof: Option<Proof>,
/// The proof chain for the message, if any.
proof_chain: Option<SecuredLinkedList>,
/// The Sender's Section PK.
section_pk: bls::PublicKey,
},
/// A new peer joined our section.
MemberJoined {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub const RECOMMENDED_SECTION_SIZE: usize = 2 * ELDER_SIZE;
/// Number of elders per section.
pub const ELDER_SIZE: usize = 7;

/// Supermajority of a given group (i.e. > 2/3)
/// SuperMajority of a given group (i.e. > 2/3)
#[inline]
pub(crate) const fn supermajority(group_size: usize) -> usize {
1 + group_size * 2 / 3
Expand Down