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

fix(horizon_sync): check for leftover unpruned outputs #5704

Merged

Conversation

mrnaveira
Copy link
Contributor

Description

Add a new check after UTXO sync, to ensure that the peer did not send any leftover unpruned outputs

Motivation and Context

On UTXO horizon sync, we only validate rangeproofs when receiving a specific type of output from the peer, assuming that that type will always be the last element of the stream, we then validate the rangeproofs of all unpruned outputs.

But a malicious peer may send more unpruned outputs afterwards, bypassing the rangeproof validation. We need a check at the end of the stream to ensure that the peer did not send any leftover unpruned outputs.

How Has This Been Tested?

Tests pass

What process can a PR reviewer use to test or verify this change?

Code review

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@github-actions
Copy link

Test Results (CI)

1 196 tests   1 196 ✔️  8m 49s ⏱️
     37 suites         0 💤
       1 files           0

Results for commit 0a54d80.

@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 Aug 31, 2023
@github-actions
Copy link

Test Results (Integration tests)

27 tests   27 ✔️  14m 10s ⏱️
11 suites    0 💤
  2 files      0

Results for commit 0a54d80.

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Aug 31, 2023
@SWvheerden SWvheerden merged commit dc5cfce into tari-project:development Aug 31, 2023
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