Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Merged
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c10eff1
Update links to the proper releases page
marioevz Mar 11, 2022
6adfc6f
Merge pull request #248 from marioevz/patch-1
CarlBeek Mar 16, 2022
a76f187
bump the versions on all the packages!
CarlBeek Mar 16, 2022
e84e942
resolves version conflicts
CarlBeek Mar 16, 2022
925960f
unify function sigs to make click happy
CarlBeek Mar 16, 2022
fd74dfd
revert click to 7.1.2 again
CarlBeek Mar 21, 2022
78ae263
try upgrade circleCI to >python3.8 and probably break everything
CarlBeek Mar 21, 2022
7ce367f
revert zipp version becuase i over-used find-and-replace 🤦
CarlBeek Mar 21, 2022
e82b3e3
Updates windows server version to edge
CarlBeek Mar 21, 2022
e829e94
update pyenv python versions for arm
CarlBeek Mar 21, 2022
c10e0e4
update sundry python version references
CarlBeek Mar 21, 2022
d2ed768
upgrade windows machince reasources
CarlBeek Mar 21, 2022
c59c518
Add in missing python version stuffies
CarlBeek Mar 21, 2022
712002c
revert to old windows version
CarlBeek Mar 21, 2022
ec1b641
installes python 3.10 for windows
CarlBeek Mar 21, 2022
513d281
use python 3.10.2 for linux amd64
CarlBeek Mar 21, 2022
76b7b3c
update to current ubuntu images
CarlBeek Mar 21, 2022
07ed5a2
allow pyenv to skip version warning
CarlBeek Mar 21, 2022
72c8a0f
lock ubuntu version
CarlBeek Mar 21, 2022
d5cd39a
force install using pyenv
CarlBeek Mar 21, 2022
3f97a0e
try 3.10.3 for ubuntu again
CarlBeek Mar 21, 2022
e91a27d
revert to 3.10.2 for ubuntu again
CarlBeek Mar 21, 2022
cd52e9d
Merge pull request #249 from ethereum/version_bump
CarlBeek Mar 25, 2022
fb5ffe6
Allow 4-character abbreviations of mnemonic words
yorickdowne Feb 5, 2022
5953f30
abbreviation tweaks
CarlBeek Mar 24, 2022
567ae36
Adds abbreviation tests
CarlBeek Mar 24, 2022
bbeeb1f
Fix lint; revert new-mnemonic text change
yorickdowne Mar 24, 2022
202a620
Adds tests for existing mnemonic abbreviated words
CarlBeek Mar 28, 2022
885826c
Adds abbriavted words to new-mnemonics
CarlBeek Mar 28, 2022
0d3440e
Adds check that multiple mnemonic languages aren't detected
CarlBeek Mar 28, 2022
c97cfc3
Merge pull request #242 from yorickdowne/abbreviations
CarlBeek Mar 28, 2022
5e343d4
version bump -> v2.1
CarlBeek Mar 28, 2022
9edea63
Kick venv cache version
hwwhww Mar 29, 2022
a55514b
Merge pull request #253 from ethereum/kick-ci-cache
CarlBeek Mar 29, 2022
1bc54e0
Merge pull request #251 from ethereum/version_bump
CarlBeek Mar 29, 2022
3be3723
Actually shortens words for abbrviated mnemonic test vectors
CarlBeek Mar 29, 2022
fce407c
Merge pull request #254 from ethereum/fix_abbreviated_test
hwwhww Mar 29, 2022
e35ed2c
Re-implement Clarifies when abbreviated words are used
CarlBeek Mar 29, 2022
dc6fa0c
Merge pull request #256 from ethereum/clarify_abbreviations
hwwhww Mar 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions staking_deposit/key_handling/key_derivation/mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ def reconstruct_mnemonic(mnemonic: str, words_path: str) -> Optional[str]:
reconstructed_mnemonic = None
for language in languages:
try:
word_list = abbreviate_words(_get_word_list(language, words_path))
mnemonic_list = abbreviate_words(mnemonic.lower().split(' '))
if len(mnemonic_list) not in range(12, 25, 3):
abbrev_word_list = abbreviate_words(_get_word_list(language, words_path))
abbrev_mnemonic_list = abbreviate_words(mnemonic.lower().split(' '))
if len(abbrev_mnemonic_list) not in range(12, 25, 3):
return None
word_indices = [_word_to_index(word_list, word) for word in mnemonic_list]
word_indices = [_word_to_index(abbrev_word_list, word) for word in abbrev_mnemonic_list]
mnemonic_int = _uint11_array_to_uint(word_indices)
checksum_length = len(mnemonic_list) // 3
checksum_length = len(abbrev_mnemonic_list) // 3
checksum = mnemonic_int & 2**checksum_length - 1
entropy = (mnemonic_int - checksum) >> checksum_length
entropy_bits = entropy.to_bytes(checksum_length * 4, 'big')
Expand Down