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!: update key parsing #5900

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

SWvheerden
Copy link
Collaborator

Description

Updates key parsing to differentiate between canonical- and reduction-based use cases. Makes several updates to account for EpochTime changes. Updates genesis data.

Motivation and Context

An update to tari-crypto differentiates secret key parsing between cases that should use canonical byte arrays, and those that use random byte arrays requiring modular wide reduction.

This PR makes corresponding changes to account for this.

It also makes several updates required since the tari_utilities release used here also makes breaking EpochTime changes that can't be cleanly done separately.

How Has This Been Tested?

Existing tests pass. Uses of parsed secret keys have been manually inspected for correctness.

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

Assert that secret keys and scalars instantiated from byte arrays use the appropriate approach: parsing from canonical byte arrays, or modular wide reduction from uniform byte arrays.

Confirm that EpochTime changes reflect the intended logic, especially relating to timestamp and difficulty handling.

BREAKING CHANGE: This modifies how secret keys and scalars are constructed and is therefore a breaking change.

@ghpbot-tari-project ghpbot-tari-project added the CR-too_long Changes Requested - Your PR is too long label Nov 2, 2023
@SWvheerden
Copy link
Collaborator Author

This is a replacement PR for : #5636

It now includes the official tari_crypto release tag 0.19.0 instead of github main branch

@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 Nov 2, 2023
@SWvheerden SWvheerden changed the title Scalar byte array feat!: update key parsing Nov 2, 2023
Copy link

github-actions bot commented Nov 2, 2023

Test Results (CI)

1 245 tests   1 245 ✔️  9m 33s ⏱️
     39 suites         0 💤
       1 files           0

Results for commit fb73123.

Copy link

github-actions bot commented Nov 2, 2023

Test Results (Integration tests)

  2 files  11 suites   16m 52s ⏱️
34 tests 33 ✔️ 0 💤 1
35 runs  34 ✔️ 0 💤 1

For more details on these failures, see this check.

Results for commit fb73123.

@SWvheerden SWvheerden merged commit 59d7ceb into tari-project:development Nov 2, 2023
12 of 13 checks passed
@SWvheerden SWvheerden deleted the scalar-byte-array branch November 2, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR-too_long Changes Requested - Your PR is too long P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants