Skip to content
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

feat: do validation after adding utxos and txs #6114

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

SWvheerden
Copy link
Collaborator

Description

Trigger a validation task after recovery of outputs

Motivation and Context

During testing, new outputs are added slower than validation and an edge case occurs where outputs will only be validated after a new block is added again.

@SWvheerden SWvheerden requested a review from a team as a code owner January 31, 2024 16:22
Copy link

github-actions bot commented Jan 31, 2024

Test Results (CI)

1 268 tests   1 268 ✅  18m 0s ⏱️
   39 suites      0 💤
    1 files        0 ❌

Results for commit d88658e.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Jan 31, 2024
Copy link

github-actions bot commented Jan 31, 2024

Test Results (Integration tests)

29 tests  +29   29 ✅ +29   11m 49s ⏱️ + 11m 49s
11 suites +11    0 💤 ± 0 
 2 files   + 2    0 ❌ ± 0 

Results for commit d88658e. ± Comparison against base commit b6b80f6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better place to add this would be here if num_outputs_recovered>0?

            match self.get_next_peer() {
                Some(peer) => match self.attempt_sync(peer.clone()).await {
                    Ok((num_outputs_recovered, final_height, final_amount, elapsed)) => {
                        debug!(target: LOG_TARGET, "Scanned to height #{}", final_height);
                        self.finalize(num_outputs_recovered, final_height, final_amount, elapsed)?;
                        return Ok(());
                    },
                    Err(e) => {
                        warn!(
                            target: LOG_TARGET,
                            "Failed to scan UTXO's from base node {}: {}", peer, e
                        );
                        self.publish_event(UtxoScannerEvent::ScanningRoundFailed {
                            num_retries: self.num_retries,
                            retry_limit: self.retry_limit,
                            error: e.to_string(),
                        });
                        continue;
                    },
                },

I also see there are some failing unit tests.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Feb 1, 2024
@SWvheerden SWvheerden merged commit 7d886e6 into tari-project:development Feb 1, 2024
13 of 14 checks passed
@SWvheerden SWvheerden deleted the sw_validate_on_add branch February 2, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants