Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 breakingEpochTime
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.