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: correct a missing conversion between AddressBook cert hash hex-string-as-bytes and actual SHA2-384 hash bytes for Node entries. #16659

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

jsync-swirlds
Copy link
Member

@jsync-swirlds jsync-swirlds commented Nov 18, 2024

  • When migrating from an AddressBook to the Nodes, convert from hex string to hash bits
  • When generating an AddressBook from the Nodes, convert from hash bits to hex string
  • Fix the one unit test that assumed both were arbitrary bytes.
  • Fix the one HAPI test that interacts with the 101/102 file generation.

* When migrating from an `AddressBook` to the `Node`s, convert form hex string to hash bits
* When generating an `AddressBook` from the `Node`s, convert from hash bits to hex string
* Fix the one unit test that assumed both were arbitrary bytes.
* Fix the one HAPI test that interacts with the `101`/`102` file generation.

Signed-off-by: Joseph Sinclair <[email protected]>
@jsync-swirlds jsync-swirlds added the Dynamic Address Book All issues related to dynamic address book label Nov 18, 2024
@jsync-swirlds jsync-swirlds added this to the v0.56 milestone Nov 18, 2024
@jsync-swirlds jsync-swirlds self-assigned this Nov 18, 2024
@jsync-swirlds jsync-swirlds changed the title Fix for small byte to byte conversion issue. fix: correct a missing conversion between AddressBook cert hash hex-string-as-bytes and actual SHA2-384 hash bytes for Node entries. Nov 18, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 58.35%. Comparing base (4a9dfb7) to head (fd7c4cb).
Report is 1 commits behind head on release/0.56.

Files with missing lines Patch % Lines
...app/service/file/impl/schemas/V0490FileSchema.java 0.00% 4 Missing ⚠️
...app/workflows/handle/steps/NodeMetadataHelper.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##             release/0.56   #16659      +/-   ##
==================================================
- Coverage           58.35%   58.35%   -0.01%     
  Complexity          20000    20000              
==================================================
  Files                2738     2738              
  Lines              100489   100491       +2     
  Branches            10378    10378              
==================================================
  Hits                58643    58643              
- Misses              38214    38216       +2     
  Partials             3632     3632              
Files with missing lines Coverage Δ
...ddressbook/impl/schemas/V053AddressBookSchema.java 94.39% <100.00%> (ø)
...app/workflows/handle/steps/NodeMetadataHelper.java 1.75% <0.00%> (ø)
...app/service/file/impl/schemas/V0490FileSchema.java 47.41% <0.00%> (-0.26%) ⬇️

Impacted file tree graph

---- 🚨 Try these New Features:

Copy link

codacy-production bot commented Nov 19, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 37.50%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4a9dfb7) 100306 62138 61.95%
Head commit (fd7c4cb) 100308 (+2) 62138 (+0) 61.95% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#16659) 8 3 37.50%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@jsync-swirlds jsync-swirlds marked this pull request as ready for review November 19, 2024 01:17
@jsync-swirlds jsync-swirlds requested review from a team as code owners November 19, 2024 01:17
@jsync-swirlds jsync-swirlds requested a review from kimbor November 19, 2024 01:17
mhess-swl
mhess-swl previously approved these changes Nov 19, 2024
@mhess-swl
Copy link
Member

Just curious, why are the changes to V056AddressBookSchema.java (and its test) not in this branch?

@jsync-swirlds
Copy link
Member Author

jsync-swirlds commented Nov 19, 2024

Just curious, why are the changes to V056AddressBookSchema.java (and its test) not in this branch?

Those files do not exist on the release/0.56 branch. Not sure why, just encountered that during the cherry pick.

Copy link

github-actions bot commented Nov 19, 2024

Node: HAPI Test (Restart) Results

7 tests   2 ✅  3m 8s ⏱️
8 suites  0 💤
9 files    5 ❌
1 errors

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

Results for commit fd7c4cb.

♻️ This comment has been updated with latest results.

Copy link
Member

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @jsync-swirlds

Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM, tyvm @jsync-swirlds and @Neeharika-Sompalli 🙏

Copy link
Contributor

@netopyr netopyr left a comment

Choose a reason for hiding this comment

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

@Neeharika-Sompalli Neeharika-Sompalli merged commit 9068bfc into release/0.56 Nov 19, 2024
48 of 49 checks passed
@Neeharika-Sompalli Neeharika-Sompalli deleted the cherry-pick-16647-to-0.56 branch November 19, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dynamic Address Book All issues related to dynamic address book
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

7 participants