Skip to content

Commit

Permalink
Make test lab use OpCert & KES secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Sep 23, 2022
1 parent b833d52 commit 0b5298d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs
Expand Up @@ -23,6 +23,8 @@ pub struct PoolNode {
pub db_path: PathBuf,
pub socket_path: PathBuf,
pool_env_path: PathBuf,
pub kes_secret_key_path: PathBuf,
pub operational_certificate_path: PathBuf,
}

impl PoolNode {
Expand Down Expand Up @@ -139,6 +141,12 @@ impl Devnet {
.artifacts_dir
.join(format!("node-pool{}/ipc/node.sock", n)),
pool_env_path: self.artifacts_dir.join(format!("node-pool{}/pool.env", n)),
kes_secret_key_path: self
.artifacts_dir
.join(format!("node-pool{}/shelley/kes.skey", n)),
operational_certificate_path: self
.artifacts_dir
.join(format!("node-pool{}/shelley/node.cert", n)),
})
.collect::<Vec<_>>();

Expand Down Expand Up @@ -248,6 +256,10 @@ mod tests {
db_path: PathBuf::from(r"test/path/node-pool1/db"),
socket_path: PathBuf::from(r"test/path/node-pool1/ipc/node.sock"),
pool_env_path: PathBuf::from(r"test/path/node-pool1/pool.env"),
kes_secret_key_path: PathBuf::from(r"test/path/node-pool1/shelley/kes.skey"),
operational_certificate_path: PathBuf::from(
r"test/path/node-pool1/shelley/node.cert"
),
},],
},
devnet.topology()
Expand Down
10 changes: 9 additions & 1 deletion mithril-test-lab/mithril-end-to-end/src/mithril/signer.rs
Expand Up @@ -26,7 +26,7 @@ impl Signer {
let data_stores_path = format!("./stores/signer-{}", party_id);
let env = HashMap::from([
("NETWORK", "devnet"),
("PARTY_ID", &party_id),
("PARTY_ID", &party_id), // TODO: Should be removed once the signer certification is fully deployed
("RUN_INTERVAL", "800"),
("AGGREGATOR_ENDPOINT", &aggregator_endpoint),
("DB_DIRECTORY", pool_node.db_path.to_str().unwrap()),
Expand All @@ -37,6 +37,14 @@ impl Signer {
pool_node.socket_path.to_str().unwrap(),
),
("CARDANO_CLI_PATH", cardano_cli_path.to_str().unwrap()),
(
"KES_SECRET_KEY_PATH",
pool_node.kes_secret_key_path.to_str().unwrap(),
),
(
"OPERATIONAL_CERTIFICATE_PATH",
pool_node.operational_certificate_path.to_str().unwrap(),
),
]);
let args = vec!["-vvv"];

Expand Down

0 comments on commit 0b5298d

Please sign in to comment.