Commit Graph

18 Commits

Author SHA1 Message Date
Kyle Altendorf
3b084a165b
configure isort to add the future annotations import (#13327)
* configure isort to add the future annotations import

* apply the new isort setting

* remove type ignores for new mypy (#13539)

https://pypi.org/project/mypy/0.981/

* another
2022-09-30 03:40:22 -05:00
dustinface
837a4798f6
daemon: Implement system metrics logger based on beta config (#12491) 2022-09-14 12:12:24 -05:00
dustinface
28ad3ec8bc
cmds: Allow --label/-l to be "" to skip the labeling (#13436) 2022-09-13 10:18:57 -05:00
dustinface
70fe981fb3
cmds: Implement chia beta (#12389)
* cmds: Implement `chia beta` for the beta test program

* Unhide and document all `beta` subcommands

* Refactor all subcommands

* Introduce `chia beta configure`

* Introduce `chia beta status`

* Test all `chia beta` commands

* Use a separate file logger for beta logs

* Write the plotting call args to the log file

* Sort potential submissions

* Some refactoring around log file log handler creation

* JSON dump the plotting args
2022-09-12 16:57:31 -05:00
dustinface
1b7c18654e
cmds: Key label support for CLI - chia keys label (#12917) 2022-09-02 17:09:31 -05:00
Amine Khaldi
be10b2e1e2
Merge commit 'c1a9d6c031c206cb5b9792a30fd737f0327560dd' into checkpoint/main_from_release_1.5.1_c1a9d6c031c206cb5b9792a30fd737f0327560dd 2022-08-14 13:31:53 +01:00
dustinface
c1a9d6c031
cmds|daemon: Improve legacy keyring migration enforcement (#12911)
* Use the daemon for partial migration checks if its running

* Make `migrate_legacy_keyring_interactive` async and drop redundant calls

So that we can await it since 

```
asyncio.run(async_update_daemon_migration_completed_if_running())
```

fails because we now here already have an event loop running.

* Drop redundant `unlocks_keyring` decoration

* Update some comments

* Move the `asyncio` import to make LGTM happy
2022-08-11 15:40:46 -05:00
Amine Khaldi
032264c294
Merge commit '922523694a30fc6e39fd686ee820d0ea96f55272' into checkpoint/main_from_release_1.5.1_922523694a30fc6e39fd686ee820d0ea96f55272 2022-08-11 19:55:33 +01:00
dustinface
922523694a
util: Force keyring migration / Deprecate legacy keyring support (#12801)
* util: Force keyring migration / Deprecate legacy keyring support

* Update chia/cmds/keys_funcs.py

Co-authored-by: Jeff <paninaro@gmail.com>

* Update chia/cmds/keys_funcs.py

Co-authored-by: Jeff <paninaro@gmail.com>

Co-authored-by: Jeff <paninaro@gmail.com>
2022-08-08 18:22:27 -05:00
dustinface
aa0e996ac5
util: Drop partially implemented BIP39 passphrase support (#12748) 2022-08-06 09:50:33 -05:00
Jeff
99275e6e37
Support searching derived addresses on testnet. (#11449)
* Support searching derived addresses on testnet.

* Added tests
2022-05-16 13:29:33 -07:00
Jeff
bb57ccffa9
Improve handling of unknown pending balances (likely change from addi… (#10984)
* Improve handling of unknown pending balances (likely change from adding a maker fee).
Minor improvement for fingerprint selection -- enter/return selects the logged-in fingerprint.

* Minor output formatting improvements when showing offer summaries.
Minor wallet key selection improvements.
Added tests for print_offer_summary

* Linter fixes

* isort fix

* Coroutine -> Awaitable

* Removed problematic fee calculation from get_pending_amounts per feedback.
2022-04-05 16:09:00 -07:00
Arvid Norberg
b5d51c38f8
run tests in parallel in CI (#10499) 2022-03-22 15:04:07 -07:00
Jeff
184920a55c
Better management of KeyringWrapper's keys_root_path when using TempKeyring for tests (#10636)
* Better management of KeyringWrapper's keys_root_path when using TempKeyring for tests.

* Move keys_root_path restoration code into `cleanup()`
Added an assert to detect if an unexpected shared KeyringWrapper is injected during a test.

* Conditionally restore keys_root_path for testing
2022-03-11 18:48:45 -08:00
Adam Kelly
70639be906
Ak.convert fixtures (#10612)
* Use bt fixture

* rebase

* Use local_hostname

* flake8

* Remove set_shared_instance

* Remove unneeded comments

* Revert unrelated change

* Add back type signature - rebase issue

* Correct type for _configure_legacy_backend

* See what's going on during CI mypy run

* github workflows

* mypy typing

* Remove legacy Keyring create method

* Start daemon first

* Set chia-blockchain-gui to hash in main

* Fix two test files that were not importing self_hostname

* self_hostname fixture

* Convert all class fixtures to top level functions
2022-03-11 16:26:54 -08:00
Jeff
f2fe1dca62
Support for performing incremental legacy key migration. (#10085)
* CLI support for performing an incremental keyring migration. This handles the case where new keys were created by an older client or the light wallet, and those keys then need to be moved to keyring.yaml.

* Opportunistically perform a silent incremental keyring migration when the GUI unlocks the keyring.

Track when keyring migration occurs so that we don't needlessly attempt on each GUI launch. ~/.chia_keys/.last_legacy_migration will contain the app version that last attempted migration.

* Formatting & linter fixes

* Tests for `chia keys migrate`. Missing a test for incremental migration.

* Additional keyring migration tests

* Formatting updates from black in files unrelated to this branch.

* Revert "Formatting updates from black in files unrelated to this branch."

This reverts commit a85030e8e0ea7406683efd8ae41e224c861e08ff.

* Exit loop if remaining_keys <= 0

* Linter fix? Manually making this change as black doesn't identify any issues locally.

* Linter fix again...
2022-02-04 16:43:51 -08:00
Arvid Norberg
e49b11d486
use pytest.fixture instead of pytest_asyncio.fixture in cmd test (#10040) 2022-01-31 18:48:58 -08:00
Jeff
bb1c16cee5
[CLI] chia keys derive [wallet-address | child-key | search] (#9184)
* Added chia keys derive (wallet-address | child-key) to display derived wallet addresses or public keys

* Support for public key (unhardened) derivation

* Fleshed out the search command. Can perform a substring search on wallet addresses, public, and private keys.
Support for deriving private keys

* Default to unhardened derivation. Added --hardened-derivation option. HD paths denote hardened derivation with a 'h' suffix at each index.

* Added --no-progress to reduce output. Exit code indicates search success/failure. Option name cleanup.

* chia keys derive search can now search for multiple terms

* chia keys derive search can be restricted to searching pubkeys|privkeys|addresses|all

* Allow child-key derivation rooted from an arbitrary HD path

* Search derived keys rooted under an arbitrary HD path

* LGTM fixes

* Remove extra master_sk_to_wallet_sk_unhardened definition

* Cleanup and fixed search output

* Cleanup and comments

* Added tests for `chia keys` commands

* Using @pytest_asyncio.fixture to decorate empty_keyring() as suggested in pytest's output.

* Set asyncio-mode to auto to address pytest warning

* See if tests pass without checking exit status

* Added chia init step to tests that direclty invoke the `cli` function

* Explicitly add --root-path option to tests that run the `cli` function.

* Tests fix

* Re-enable checks against exit_code

* More fine tuning to address CI failures

* Changes to address naming and other feedback

* Updated tests
2022-01-25 20:42:16 -08:00