Skip to content

Commit

Permalink
link fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzman committed Jan 26, 2024
1 parent 657464a commit e1d99c5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
13 changes: 7 additions & 6 deletions full-service/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,23 @@ fn consensus_backed_full_service(
rocket_config: rocket::Config,
logger: Logger,
) -> Rocket<Build> {

// Create enclave trusted identity.
let config_advisories: Vec<&str> = vec![];
let signature = mc_consensus_enclave_measurement::sigstruct();
let trusted_identity = TrustedIdentity::MrSigner(TrustedMrSignerIdentity::new(
MrSigner::from(signature.mrsigner()),
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
));

log::debug!(logger, "TrustedIdentity: {:?}", trusted_identity);

// Create peer manager.
let peer_manager = config.peers_config.create_peer_manager(trusted_identity, &logger);
let peer_manager = config
.peers_config
.create_peer_manager(trusted_identity, &logger);

// Create network state, transactions fetcher and ledger sync.
let network_state = Arc::new(RwLock::new(PollingNetworkState::new(
Expand Down
16 changes: 7 additions & 9 deletions full-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,13 @@ impl APIConfig {
pub fn get_fog_ingest_identity(&self) -> Option<TrustedIdentity> {
self.fog_ingest_enclave_css.as_ref().map(|signature| {
let config_advisories: Vec<&str> = vec![];
TrustedIdentity::MrSigner(
TrustedMrSignerIdentity::new(
MrSigner::from(signature.mrsigner()),
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
)
)
TrustedIdentity::MrSigner(TrustedMrSignerIdentity::new(
MrSigner::from(signature.mrsigner()),
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
))
})
}

Expand Down
7 changes: 3 additions & 4 deletions full-service/src/service/memo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ where
//
// validating the sender memo includes:
// 1. Is there a sender memo?
// 2. Does the provided sender public address hash to the
// same value as the memo's sender address hash?
// 3. When we recreate the HMAC, does it match the
// HMAC conveyed in the memo?
// 2. Does the provided sender public address hash to the same value as the
// memo's sender address hash?
// 3. When we recreate the HMAC, does it match the HMAC conveyed in the memo?
fn validate_sender_memo(
&self,
txo_id_hex: &str,
Expand Down
12 changes: 7 additions & 5 deletions validator/service/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ fn main() {
let signature = mc_consensus_enclave_measurement::sigstruct();
let trusted_identity = TrustedIdentity::MrSigner(TrustedMrSignerIdentity::new(
MrSigner::from(signature.mrsigner()),
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
signature.product_id(),
signature.version(),
config_advisories,
mc_consensus_enclave_measurement::HARDENING_ADVISORIES,
));

log::debug!(logger, "TrustedIdentity: {:?}", trusted_identity);

// Create peer manager.
let peer_manager = config.peers_config.create_peer_manager(trusted_identity, &logger);
let peer_manager = config
.peers_config
.create_peer_manager(trusted_identity, &logger);

// Create network state, transactions fetcher and ledger sync.
let network_state = Arc::new(RwLock::new(PollingNetworkState::new(
Expand Down

0 comments on commit e1d99c5

Please sign in to comment.