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

[RIP-20] 12 Words and a number support for android app #87

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ben-abraham
Copy link
Contributor

@ben-abraham ben-abraham commented Apr 5, 2021

This PR closes #86 [Add RIP-20 Support to Android RVN Wallet]
Raven Core blog post: RIP-20 proposal
I decided on the name "Fast-restore key" for the field, but I am open to changing this. I'll happily update all the verbiage and references if there is another name to use.

Implemented:

  • UI elements on paper key activity, after the 12'th word, indicating the value and purpose of the fast-restore key
  • UI elements on restore activity, prompting for the user's fast-restore key, and explaining the purpose. (optional and validated)
  • BRSharedPrefs for tracking known seed timestamp knownSeedTime_RVN
  • Corresponding blockchain initialization code, to get it to start based on the known entered timestamp
  • Constants defining the genesis timestamp and fast sync intervals in case we would like to tweak these later.
  • Added about a dozen checkpoints (spans of 4 block-weeks) to BRPeerManager.c to allow more places that new syncs will be able to use.
  • English translation file entries for UI elements

The primary functionality is fully working and useable currently. A brand new wallet is synced in under 10 minutes now (in emulator.) The time can be brought down more by having additional checkpoints in the header file, perhaps even automatically updated. There are plenty of ways this could be achieved, but for the moment I went with monthly checkpoints.

Remaining:

  • Review
  • Test cases if needed
  • ???

Additional thoughts:

  • Just a few random things I thought about while developing this.
  • Might be a good idea to add some kind of parity check to the code, just to prevent random entry. The UI already prevents codes outside of the current time, but that only goes so far.
  • Another thought was a dialog popup confirming the rough time when restoring from a code. IE: "Your fast-restore key will begin syncing from about mm/dd/yyyy. Does this sound accurate?" or something to that effect, allowing the user to roughly confirm the creation date of the wallet.

Raven Address: RYW4MmiT2jDdZPa499VQiPANZdStxGt8y5

Screenshots:
rip20_all_screenshots

Added BR Shared pref for storing known seed timestamp.
When starting a fresh sync we will accept checkpoints up to the timestamp of the BR Shared pref
Added checkpoints at 4 block-week intervals (roughly one block-month), up to the latest time.
Also removed a few duplicate checkpoints.
Currently no UI for reading out or inputting the code yet.
…, as well as display an FAQ dialog explaining what it does.

Added proper UI validation around the value, erroring if negative or outside of the current week-value
UI is properly fed into BRPrefs, and is functioning correctly.
The largest piece remaining is the displayed value on the output of the fast restore key when creating a new wallet.
…restore key, as well as details on it's purpose.

Adjusted verbiage slightly to instruct leaving the field empty if unknown.
Fixed possible type issues in fast-restore key helper functions.
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.

Add RIP20 support to Android RVN Wallet
1 participant