Skip to content

Conversation

@kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Apr 25, 2022

  • Adds options for user to input remaining entropy bits before calculating the 12th/24th word of a new mnemonic.
  • Coin flips for supplying the entropy.
  • Select word to use the most significant bits as additional entropy.
  • "Finalize with zeros" to match the current implementation as well as most(?) external validation tools.
  • Adds "Final Word Calc" screen showing the bit-level construction of the remaining entropy plus the checksum bits for 12- or 24-word seeds.

Requires #196 to be merged first.

Should be targeted for v0.5.1 or greater.

Props to @brandonblack for doing the initial work to get this feature started.

@newtonick newtonick added this to the 0.5.1 milestone Apr 25, 2022
@kdmukai kdmukai changed the base branch from main to dev May 3, 2022 13:04
@newtonick
Copy link
Collaborator

pytest failed

tests/test_mnemonic_generation.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

mnemonic = ['crawl', 'focus', 'rescue', 'cable', 'view', 'pledge', ...], wordlist_language_code = 'en'

    def calculate_checksum(mnemonic: list, wordlist_language_code: str) -> List[str]:
        """ Provide 12- or 24-word mnemonic, returns complete mnemonic w/checksum as a list """
        if len(mnemonic) not in [12, 24]:
>           raise Exception("Pass in a 12- or 24-word mnemonic")
E           Exception: Pass in a 12- or 24-word mnemonic

src/seedsigner/helpers/mnemonic_generation.py:14: Exception

@newtonick
Copy link
Collaborator

Feature works perfectly for me during testing on local device. I also verified against https://bitcoiner.guide/seed/ and got the same 12/24 words.

@SeedSigner
Copy link
Owner

Does the pytest failure mean that the test needs to be revised to accommodate this feature's new changes, or that changes may beed to be made to the feature's code so the test completes properly?

@kdmukai
Copy link
Contributor Author

kdmukai commented Jun 15, 2022

Merged latest changes from dev and fixed test case bug on mnemonic_generation. Now all tests are passing.

@newtonick
Copy link
Collaborator

LGTM

Reviewed code and tested without any issues

@newtonick newtonick merged commit 53f3cda into SeedSigner:dev Jun 16, 2022
@newtonick newtonick mentioned this pull request Jun 16, 2022
@kdmukai kdmukai deleted the final_word_v2 branch September 2, 2024 13:45
FreeOnlineUser pushed a commit to FreeOnlineUser/seedsigner that referenced this pull request Dec 20, 2025
Updated "Final Word" calculation flow
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.

3 participants