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

Hardcode a more recent zero point for wallet birthday #4176

Closed
AaronFeickert opened this issue Jun 8, 2022 · 0 comments
Closed

Hardcode a more recent zero point for wallet birthday #4176

AaronFeickert opened this issue Jun 8, 2022 · 0 comments
Labels
A-security Area - Security related C-proposal Before becoming formal RFCs, new ideas are written up as proposals and discussed in the community

Comments

@AaronFeickert
Copy link
Collaborator

A wallet's birthday is encoded as the number of days since the Unix epoch, with a 2-byte capacity. This will hit its maximum value around the year 2060; however, this is wasteful, since no mainnet blocks have been mined between the epoch and now.

The following are recommended:

  • Set a more recent zero point for the wallet birthday (the date of the eventual genesis block has been suggested)
  • Hardcode this zero point as part of the version definition
  • If (when?) the birthday field reaches its maximum value, you can define a new seed version and hardcode a new zero point
@AaronFeickert AaronFeickert added the C-proposal Before becoming formal RFCs, new ideas are written up as proposals and discussed in the community label Jun 8, 2022
stringhandler pushed a commit that referenced this issue Aug 2, 2022
…#4275)

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.
@hansieodendaal hansieodendaal added the A-security Area - Security related label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-security Area - Security related C-proposal Before becoming formal RFCs, new ideas are written up as proposals and discussed in the community
Projects
None yet
Development

No branches or pull requests

2 participants