Skip to content

Commit 57452a5

Browse files
committed
wip: DO MOT MERGE - skip KES signature in publisher
1 parent 142b703 commit 57452a5

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

internal/mithril-dmq/src/model/builder.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::sync::Arc;
1+
use std::{sync::Arc, vec};
22

33
use anyhow::{Context, anyhow};
44
use blake2::{Blake2b, Digest, digest::consts::U64};
@@ -65,16 +65,18 @@ impl DmqMessageBuilder {
6565
let block_number = (*block_number)
6666
.try_into()
6767
.with_context(|| "Failed to convert block number to u32")?;
68-
let (kes_signature, operational_certificate) = self
68+
/* let (kes_signature, operational_certificate) = self
6969
.kes_signer
7070
.sign(message_bytes, block_number)
7171
.with_context(|| "Failed to KES sign message while building DMQ message")?;
72+
// TODO: fix the computation of the KES period which is not done correctly in the pallas chain observer
7273
let kes_period = self
7374
.chain_observer
7475
.get_current_kes_period(&operational_certificate)
7576
.await
7677
.with_context(|| "Failed to get KES period while building DMQ message")?
77-
.unwrap_or_default();
78+
.unwrap_or_default()
79+
- operational_certificate.start_kes_period as u32;
7880
let mut dmq_message = DmqMsg {
7981
msg_id: vec![],
8082
msg_body: message_bytes.to_vec(),
@@ -83,6 +85,16 @@ impl DmqMessageBuilder {
8385
kes_signature: kes_signature.to_bytes_vec()?,
8486
operational_certificate: operational_certificate.to_bytes_vec()?,
8587
kes_period,
88+
}; */
89+
let kes_period = 0;
90+
let mut dmq_message = DmqMsg {
91+
msg_id: vec![],
92+
msg_body: message_bytes.to_vec(),
93+
block_number,
94+
ttl: self.ttl_blocks,
95+
kes_signature: vec![],
96+
operational_certificate: vec![],
97+
kes_period,
8698
};
8799
dmq_message.msg_id = compute_msg_id(&dmq_message);
88100

mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Aggregator {
133133
let dmq_node_socket_path = aggregator_config
134134
.work_dir
135135
.join(format!("dmq-aggregator-{}.socket", aggregator_config.index));
136-
if true {
136+
if false {
137137
env.insert(
138138
"DMQ_NODE_SOCKET_PATH",
139139
dmq_node_socket_path.to_str().unwrap(),

0 commit comments

Comments
 (0)