Conversation
* Update versions * Update lockfiles
nick-mobilecoin
left a comment
There was a problem hiding this comment.
This change should probably be based only against master. Currently this PR is trying to both merge 4.1.0 to master as well as bring in this new client.
Mostly nit comments
| // Logging must go to stderr to not interfere with STDOUT | ||
| std::env::set_var("MC_LOG_STDERR", "1"); |
There was a problem hiding this comment.
❓ What is the negative affect this prevents? I commented it out and saw nothing negative.
There was a problem hiding this comment.
Initially I was thinking to make the final log lines be a json blob on stdout, but I ended up not doing that.
I still think it's usually good for tools to send logging to stderr.
| //let mr_signer_verifier = | ||
| // mc_fog_view_enclave_measurement::get_mr_signer_verifier(None); | ||
|
|
||
| let mut verifier = Verifier::default(); | ||
| verifier.debug(DEBUG_ENCLAVE); //.mr_signer(mr_signer_verifier); |
There was a problem hiding this comment.
🔧 Looks like there is some stray debug code here
| //let mr_signer_verifier = | |
| // mc_fog_view_enclave_measurement::get_mr_signer_verifier(None); | |
| let mut verifier = Verifier::default(); | |
| verifier.debug(DEBUG_ENCLAVE); //.mr_signer(mr_signer_verifier); | |
| let mut verifier = Verifier::default(); | |
| verifier.debug(DEBUG_ENCLAVE); |
There was a problem hiding this comment.
yeah we can do this -- honestly it may be better to try to ignore attestation as much as possible here.
|
|
||
| match grpc_client.request(0, 0, vec![]) { | ||
| Ok(resp) => { | ||
| log::info!(logger, "Got response:\n{:?}", resp); |
There was a problem hiding this comment.
🙃 nit
| log::info!(logger, "Got response:\n{:?}", resp); | |
| log::info!(logger, "Got response:\n{resp:?}"); |
| .iter() | ||
| .map(|range| range.end_block - range.start_block + 1) | ||
| .sum(); | ||
| log::info!(logger, "Total missed blocks: {}", total_missed_blocks); |
There was a problem hiding this comment.
🙃
| log::info!(logger, "Total missed blocks: {}", total_missed_blocks); | |
| log::info!(logger, "Total missed blocks: {total_missed_blocks}"); |
| log::info!(logger, "Total missed blocks: {}", total_missed_blocks); | ||
| } | ||
| Err(err) => { | ||
| log::error!(logger, "Got error:\n{}", err); |
There was a problem hiding this comment.
🙃
| log::error!(logger, "Got error:\n{}", err); | |
| log::error!(logger, "Got error:\n{err}"); |
| .build(), | ||
| ); | ||
|
|
||
| log::info!(logger, "Fog view attestation verifier: {:?}", verifier); |
There was a problem hiding this comment.
| log::info!(logger, "Fog view attestation verifier: {:?}", verifier); | |
| log::info!(logger, "Fog view attestation verifier: {verifier:?}"); |
| match grpc_client.request(0, 0, vec![]) { | ||
| Ok(resp) => { |
There was a problem hiding this comment.
💭 This is good enough and seems to be inline with other outputs, but I'm curious who the intended audience is.
The reason is that the resp, while plain text, is not very ergonomic for human scanning as it is one line that is 7000 characters long.
There was a problem hiding this comment.
we can make it debug log instead
I created this client in order to dump summary stats from the fog-view response.
I got the following results:
If I understand right, this means that mc-mainnet fog has never had a missed block event. That is frankly amazing.
TODO: I would like to be able to hit signal fog this way too.