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!: apply hashing api to the mmr #4445

Merged

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Aug 11, 2022

Description

Partial fulfillment for #4395:

  • Added hashing API to the MMR by virtue of forcing the hashing type to be D: Digest + DomainDigest instead of only D: Digest at the lower level MMR methods and functions.
  • base_layer/mmr/src/common.rs
  • base_layer/mmr/src/merkle_mountain_range.rs
  • base_layer/mmr/src/merkle_proof.rs
  • base_layer/mmr/src/mutable_mmr.rs

Fixed cucumber function const getTransactionOutputHash = function (output)

Motivation and Context

Domain separated hashing as per the tari_crypto hashing API is needed for the MMR.

How Has This Been Tested?

  • Passed unit tests
  • Passed cucumber tests

@hansieodendaal hansieodendaal force-pushed the ho_hashing_api_mmr branch 2 times, most recently from 4427dab to bdbc854 Compare August 12, 2022 08:59
@hansieodendaal hansieodendaal changed the title [wip] feat!: apply hashing api to the mmr feat!: apply hashing api to the mmr Aug 12, 2022
@hansieodendaal hansieodendaal force-pushed the ho_hashing_api_mmr branch 4 times, most recently from cd04142 to 16da4af Compare August 14, 2022 05:16
aviator-app bot pushed a commit that referenced this pull request Aug 16, 2022
Description
---
 The newly introduced `class Blake256` was used and calculation of output features consensus bytes was consolidated. Some code organization improvements were done.

_**Note:** This change is also present in #4445._

Motivation and Context
---
Recent changes in the source code base required the cucumber test environment to be updated.

How Has This Been Tested?
---
When running locally: `npm test -- --tags "@critical and not @long-running and not @broken" --profile "none"`
```
26 scenarios (26 passed)
373 steps (373 passed)
18m27.251s (executing steps: 18m17.959s)
```
Added hashing API to the MMR by virtue of forcing the hashing type to be
`D: Digest + DomainDigest` instead of only `D: Digest` at the lower level
MMR methods and functions.
@stringhandler stringhandler merged commit d6bab2f into tari-project:development Aug 16, 2022

hash_domain!(
MmrBenchTestHashDomain,
"com.tari.tari_project.base_layer.mmr.bemches",
Copy link
Member

Choose a reason for hiding this comment

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

@hansieodendaal Just noticed a type-o here

Copy link
Member

@sdbondi sdbondi Aug 16, 2022

Choose a reason for hiding this comment

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

Oh nm just a test so it's not a problem :)

@hansieodendaal hansieodendaal deleted the ho_hashing_api_mmr branch August 17, 2022 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants