Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions monad-consensus-state/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ where
},
PublishToFullNodes {
epoch: Epoch,
round: Round,
message: Verified<ST, Validated<ConsensusMessage<ST, SCT, EPT>>>,
},
/// Schedule a timeout event for `round` to be emitted in `duration`
Expand Down Expand Up @@ -137,6 +138,7 @@ where
cmds.push(ConsensusCommand::EnterRound(epoch, round));
cmds.push(ConsensusCommand::PublishToFullNodes {
epoch,
round: high_certificate.round(),
message: ConsensusMessage {
version,
message: ProtocolMessage::AdvanceRound(AdvanceRoundMessage {
Expand Down
13 changes: 11 additions & 2 deletions monad-executor-glue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ pub enum RouterCommand<ST: CertificateSignatureRecoverable, OM> {
message: OM,
priority: UdpPriority,
},
// Primary publishing embeds epoch as group_id in chunk header. Secondary
// publishing embeds round as group_id in chunk header, as rebroadcasting
// periods are defined in rounds
PublishToFullNodes {
epoch: Epoch, // Epoch gets embedded into the raptorcast message
epoch: Epoch,
round: Round,
message: OM,
},
AddEpochValidatorSet {
Expand Down Expand Up @@ -103,9 +107,14 @@ impl<ST: CertificateSignatureRecoverable, OM> Debug for RouterCommand<ST, OM> {
.field("target", target)
.field("priority", priority)
.finish(),
Self::PublishToFullNodes { epoch, message: _ } => f
Self::PublishToFullNodes {
epoch,
round,
message: _,
} => f
.debug_struct("PublishToFullNodes")
.field("epoch", epoch)
.field("round", round)
.finish(),
Self::AddEpochValidatorSet {
epoch,
Expand Down
7 changes: 4 additions & 3 deletions monad-raptorcast/benches/encode_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ use monad_crypto::certificate_signature::{CertificateSignature, CertificateSigna
use monad_dataplane::udp::DEFAULT_SEGMENT_SIZE;
use monad_raptorcast::{
packet,
udp::GroupId,
util::{BuildTarget, EpochValidators, Redundancy},
};
use monad_secp::SecpSignature;
use monad_testutil::signing::get_key;
use monad_types::{NodeId, Stake};
use monad_types::{Epoch, NodeId, Stake};

const NUM_NODES: usize = 100;

Expand Down Expand Up @@ -63,8 +64,8 @@ pub fn bench_build_messages(c: &mut Criterion, name: &str, message_size: usize,
DEFAULT_SEGMENT_SIZE, // segment_size
message.clone(),
Redundancy::from_u8(2),
0, // epoch_no
0, // unix_ts_ms
GroupId::Primary(Epoch(0)), // epoch_no
0, // unix_ts_ms
build_target.clone(),
&known_addrs,
);
Expand Down
12 changes: 6 additions & 6 deletions monad-raptorcast/benches/raptor_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ use monad_dataplane::udp::DEFAULT_SEGMENT_SIZE;
use monad_raptor::ManagedDecoder;
use monad_raptorcast::{
packet::build_messages,
udp::{parse_message, MAX_REDUNDANCY, SIGNATURE_CACHE_SIZE},
udp::{parse_message, GroupId, MAX_REDUNDANCY, SIGNATURE_CACHE_SIZE},
util::{BuildTarget, EpochValidators, Redundancy},
};
use monad_secp::{KeyPair, SecpSignature};
use monad_types::{NodeId, Stake};
use monad_types::{Epoch, NodeId, Stake};

#[allow(clippy::useless_vec)]
pub fn criterion_benchmark(c: &mut Criterion) {
Expand Down Expand Up @@ -71,8 +71,8 @@ pub fn criterion_benchmark(c: &mut Criterion) {
DEFAULT_SEGMENT_SIZE, // segment_size
message.clone(),
Redundancy::from_u8(2),
0, // epoch_no
0, // unix_ts_ms
GroupId::Primary(Epoch(0)), // epoch_no
0, // unix_ts_ms
BuildTarget::Raptorcast(epoch_validators),
&known_addresses,
);
Expand Down Expand Up @@ -112,8 +112,8 @@ pub fn criterion_benchmark(c: &mut Criterion) {
DEFAULT_SEGMENT_SIZE, // segment_size
message.clone(),
Redundancy::from_u8(2),
0, // epoch_no
0, // unix_ts_ms
GroupId::Primary(Epoch(0)), // epoch_no
0, // unix_ts_ms
BuildTarget::Raptorcast(epoch_validators),
&known_addresses,
)
Expand Down
Loading
Loading