8000 Incorporate missed blocks into calculation for highest processed block count by samdealy · Pull Request #2858 · mobilecoinfoundation/mobilecoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Incorporate missed blocks into calculation for highest processed block count #2858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions fog/view/enclave/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mod e_tx_out_store;
mod oblivious_utils;
mod types;

use crate::types::get_block_data;
use alloc::vec::Vec;
use e_tx_out_store::{ETxOutStore, StorageDataSize, StorageMetaSize};
use mc_attest_core::{IasNonce, Quote, QuoteNonce, Report, TargetInfo, VerificationReport};
Expand All @@ -34,7 +35,7 @@ use mc_fog_view_enclave_api::{
use mc_oblivious_traits::ORAMStorageCreator;
use mc_sgx_compat::sync::Mutex;
use mc_sgx_report_cache_api::{ReportableEnclave, Result as ReportableEnclaveResult};
use types::{BlockData, CommonShardData, DecryptedMultiViewStoreQueryResponse, LastKnownData};
use types::{CommonShardData, DecryptedMultiViewStoreQueryResponse, LastKnownData};

pub struct ViewEnclave<OSC>
where
Expand Down Expand Up @@ -323,17 +324,17 @@ where
result.last_known_block_cumulative_txo_count =
last_known_data.last_known_block_cumulative_txo_count;

let block_data = BlockData::from(responses.as_mut_slice());
result.highest_processed_block_count = block_data.highest_processed_block_count;
result.highest_processed_block_signature_timestamp =
block_data.highest_processed_block_signature_timestamp;

let shared_data: CommonShardData = CommonShardData::from(responses.as_slice());
result.missed_block_ranges = shared_data.missed_block_ranges;
result.rng_records = shared_data.rng_records;
result.decommissioned_ingest_invocations = shared_data.decommissioned_ingest_invocations;
result.next_start_from_user_event_id = shared_data.next_start_from_user_event_id;

let block_data = get_block_data(responses.as_mut_slice(), &result.missed_block_ranges);
result.highest_processed_block_count = block_data.highest_processed_block_count;
result.highest_processed_block_signature_timestamp =
block_data.highest_processed_block_signature_timestamp;

result.tx_out_search_results =
Self::get_collated_tx_out_search_results(client_query_request, &responses)?;

Expand Down
Loading
0