-
Notifications
You must be signed in to change notification settings - Fork 3
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] Use user home directory for wallet path #59
Conversation
Release/2.0.1
Release/2.0.2
* use userhome for default path ~ * bump ver * expand path on init and use as _path
# Conflicts: # src/wallet.rs
* add PasswordError and bound to python * formatter * add `from bittensor_wallet.errors import PasswordError` * return encrypted password, remove debug * [fix] Use user home directory for wallet path (#59) * Updates local -> environment vars in changelog * closes GH #51 (#56) * [fix] Use userhome for default wallet path ~ (#57) * use userhome for default path ~ * bump ver * expand path on init and use as _path --------- Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: Cameron Fairchild <[email protected]> * Fix ruff (#62) * add rustup to CI (#63) * add rustup to CI * make rustup accept all * add to path * Update CHANGELOG.MD * Update CHANGELOG.MD --------- Co-authored-by: Roman <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: Cameron Fairchild <[email protected]>
* add PasswordError and bound to python * formatter * add `from bittensor_wallet.errors import PasswordError` * return encrypted password, remove debug * [fix] Use user home directory for wallet path (#59) * Updates local -> environment vars in changelog * closes GH #51 (#56) * [fix] Use userhome for default wallet path ~ (#57) * use userhome for default path ~ * bump ver * expand path on init and use as _path --------- Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: Cameron Fairchild <[email protected]> * Fix ruff (#62) * add rustup to CI (#63) * add rustup to CI * make rustup accept all * add to path * Update CHANGELOG.MD * Update CHANGELOG.MD * fix changelog * bump ver * bump cargo toml ver * Update CHANGELOG.MD --------- Co-authored-by: Roman <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]>
I am having a problem that I think is related to this commit. Subnet 11, using this version, is failing to start with the following:
Note the If I set the environment variable BT_WALLET_PATH then it works. |
I was able to use the latest version bittensor-wallet 2.1.1. In [1]: from bittensor_wallet import Wallet
In [2]: w = Wallet()
In [3]: w.create()
IMPORTANT: Store this mnemonic in a secure (preferable offline place), as anyone who has possession of this mnemonic can use it to regenerate the key and access your tokens.
The mnemonic to the new coldkey is: material birth crush tray awake session remove quit earth broom novel staff
You can use the mnemonic to recreate the key with `btcli` in case it gets lost.
Enter your password:
Retype your password:
Encrypting...
IMPORTANT: Store this mnemonic in a secure (preferable offline place), as anyone who has possession of this mnemonic can use it to regenerate the key and access your tokens.
The mnemonic to the new hotkey is: frag*** thi** combi** square pledge reopen gas nothing margin conduct tape square
You can use the mnemonic to recreate the key with `btcli` in case it gets lost.
Out[3]: name: 'default', hotkey: 'default', path: '~/.bittensor/wallets/'
In [4]: w.coldkey_file
Out[4]: Keyfile (Py(0x14360bce0) encrypted, /Users/roman/.bittensor/wallets/default/coldkey)>
In [5]: w.hotkey_file
Out[5]: keyfile (decrypted, /Users/roman/.bittensor/wallets/default/hotkeys/default)>
In [6]: w.coldkeypub_file
Out[6]: keyfile (decrypted, /Users/roman/.bittensor/wallets/default/coldkeypub.txt)> Please provide more context to help me understand what I missed. |
Thanks so much for the reply! I encountered this while working on subnet 11, which was upgraded yesterday. This is happening in the Validator class, roughly here: https://github.com/impel-intelligence/dippy-bittensor-subnet/blob/main/neurons/validator.py#L228. I think it's related to the Config method vs WalletConfig, specifically where the Config method prepends the ~ (https://github.com/opentensor/btwallet/blob/main/src/config.rs#L42). In terms of reproducibility:
If the code from SN11 isn't correct let me know and I'll reach out to them. Thanks! |
For sure. Anytime you can ask any questions. Pls feel free to do it. And, I got you. Yep, I found this bug and fixed it in this PR #67 This fix will be available in the next release. In [1]: from bittensor_wallet import Wallet
In [2]: w = Wallet()
In [3]: w.config()
Out[3]: Config(name: 'default', path: '~/.bittensor/wallets/', hotkey: 'default') |
Looks great, thanks again! |
* add PasswordError and bound to python * formatter * add `from bittensor_wallet.errors import PasswordError` * return encrypted password, remove debug * [fix] Use user home directory for wallet path (#59) * Updates local -> environment vars in changelog * closes GH #51 (#56) * [fix] Use userhome for default wallet path ~ (#57) * use userhome for default path ~ * bump ver * expand path on init and use as _path --------- Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: Cameron Fairchild <[email protected]> * Fix ruff (#62) * add rustup to CI (#63) * add rustup to CI * make rustup accept all * add to path * Update CHANGELOG.MD * Update CHANGELOG.MD * fix changelog * bump ver * bump cargo toml ver * Update CHANGELOG.MD --------- Co-authored-by: Roman <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]>
No description provided.