Use dedicated Queues for each from-to pair

Prevents one Processor's message from halting the entire pipeline.
This commit is contained in:
Luke Parker
2023-09-27 12:20:57 -04:00
parent 269db1c4be
commit 40b7bc59d0
12 changed files with 142 additions and 125 deletions

View File

@@ -48,15 +48,17 @@ pub fn message_challenge(
}
pub fn ack_challenge(
to: Service,
to_key: <Ristretto as Ciphersuite>::G,
from: Service,
from_key: <Ristretto as Ciphersuite>::G,
id: u64,
nonce: <Ristretto as Ciphersuite>::G,
) -> <Ristretto as Ciphersuite>::F {
let mut transcript = RecommendedTranscript::new(b"Serai Message Queue v0.1 Ackowledgement");
transcript.domain_separate(b"metadata");
transcript.append_message(b"to", bincode::serialize(&to).unwrap());
transcript.append_message(b"to_key", to_key.to_bytes());
transcript.append_message(b"from", bincode::serialize(&from).unwrap());
transcript.append_message(b"from_key", from_key.to_bytes());
transcript.domain_separate(b"message");
transcript.append_message(b"id", id.to_le_bytes());
transcript.domain_separate(b"signature");