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: add more recent zero point for wallet birthday (see issue #4176) #4275

Conversation

jorgeantonio21
Copy link
Contributor

Description
--- Add logic to tackle issue #4176, which aims at improving birthday representation for Cipher Seed generation.

Motivation and Context
--- The goal of this PR is to resolve issue #4176. The current version is supposed to allow a more recent genesis for wallet birthdays (it actually depends on the genesis block of the Tari network, we wish to work with). Moreover, it updates the version. Moreover, if the birthday does not fit within the u16 type range, we update to a new version.

How Has This Been Tested?
--- Add simple tests to check if logic is correct.

@jorgeantonio21 jorgeantonio21 marked this pull request as ready for review July 7, 2022 21:20
@aviator-app aviator-app bot added the mq-failed label Jul 7, 2022
@jorgeantonio21
Copy link
Contributor Author

We introduce a Birthday type which encapsulates the logic to deal with a zero point in time, and updates this zero point in time
every 2^16 days. This is needed in order to have a well defined birthday for perpetuity.

The current implementation relies on the genesis block of a chosen network. At the moment, we default to the Dibbler test-net, however this should be updated when the main-net is released.

One can argue that this functionality is not at all required, and we should instead hardcode an initial zero point in time, and update it to the mainnet, at launch time.

@jorgeantonio21 jorgeantonio21 force-pushed the ja-harcode-more-recent-zero-point-for-wallet-birthday branch from 3e8b0e4 to ab3999a Compare July 11, 2022 12:16
@stringhandler stringhandler merged commit 815c478 into tari-project:development Aug 2, 2022
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

2 participants