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: rewind bug causing SMT to be broken #6172

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Feb 27, 2024

Description

Fixes rewind bug in the SMT
Makes SMT instructions more strict.
Updates logs to give a clearer indication as to what happens

@SWvheerden SWvheerden requested a review from a team as a code owner February 27, 2024 16:44
@ghpbot-tari-project ghpbot-tari-project added the CR-insufficient_context Your PRs commit messages don't provide enough context to justify accepting the change. label Feb 27, 2024
Copy link

github-actions bot commented Feb 27, 2024

Test Results (CI)

    3 files    117 suites   42m 0s ⏱️
1 259 tests 1 259 ✅ 0 💤 0 ❌
3 769 runs  3 769 ✅ 0 💤 0 ❌

Results for commit eb88735.

♻️ 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 Feb 27, 2024
Copy link

github-actions bot commented Feb 27, 2024

Test Results (Integration tests)

12 tests  +12   12 ✅ +12   1m 2s ⏱️ + 1m 2s
 2 suites + 2    0 💤 ± 0 
 2 files   + 2    0 ❌ ± 0 
 1 errors

For more details on these parsing errors, see this check.

Results for commit eb88735. ± Comparison against base commit c6f2b8d.

♻️ This comment has been updated with latest results.

@SWvheerden SWvheerden changed the title chore: update logs feat: make SMT changes more strict validating every instruction Feb 28, 2024
hansieodendaal
hansieodendaal previously approved these changes Feb 28, 2024
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 P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Feb 28, 2024
@SWvheerden SWvheerden changed the title feat: make SMT changes more strict validating every instruction fix: rewind bug causing SMT to be broken Feb 29, 2024
@ghpbot-tari-project ghpbot-tari-project added the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Feb 29, 2024
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

Comment on lines +1021 to +1029
let smt_node = ValueHash::try_from(input.smt_hash(utxo_mined_info.mined_height).as_slice())?;
if let Err(e) = output_smt.insert(smt_key, smt_node) {
error!(
target: LOG_TARGET,
"Output commitment({}) already in SMT",
input.commitment()?.to_hex(),
);
return Err(e.into());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch!

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Mar 1, 2024
@SWvheerden SWvheerden merged commit 4cb61a3 into tari-project:development Mar 1, 2024
13 of 16 checks passed
SWvheerden pushed a commit that referenced this pull request Mar 1, 2024
Description
---
Fixed cucumber network environment

Motivation and Context
---
The cucumber environment uses a single runtime environment and the
network should be set prior to use.
Fixes cucumber test failures introduced by #6170.

How Has This Been Tested?
---
Applicable cucumber pass

What process can a PR reviewer use to test or verify this change?
---
Verify that `Scenario: Clear out mempool` passes
**Note:** #6172 also introduced other cucumber errors

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

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

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
@SWvheerden SWvheerden deleted the sw_update_logs branch March 5, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR-insufficient_context Your PRs commit messages don't provide enough context to justify accepting the change. P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants