* replace blspy imports with chia_rs imports for BLS types
* remove blspy-stubs, since we're dropping the blspy dependency. chia_rs has type stubs already
* commonize signal setup
* add signal setup for async handlers
* future
* Update misc.py
* catch up
* logging
* missed one
* context manager and waiting for signal handlers to complete
* correct logging
* fixup
* fixup
* add get_wallet_addresses RPC for deriving wallet addresses
* tests for get_wallet_addresses
* linter fix
* fix tests
* use datacases
* update monkeypatched function based on feedback
* add daemon as a callable service
* re-adding "get_routes" command
* added a test for get_routes
* linter fix
* reformatted with black
* addressed PR feedback
* daemon plotter RPC tests
* remove debug cruft
* Add stop_plotting test
* Add stop_plotting test
* Fix up test
* Remove specific test_mode and adjust tests
* Fix madmax test and add a couple minor tests
* cleanup unused code
* Updates based on code suggestions
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:
As is this would not close the daemon if a BaseException were raised.
For example `KeyboardInterrupt` or `asyncio.CancelledError` (on 3.8+).
<!-- Does this PR introduce a breaking change? -->
### Current Behavior:
### New Behavior:
<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:
<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
* Remove valid # type: ignore
A user ran into an exception on this line that mypy should have caught. Let's see what it says.
```python-traceback
2021-05-06T07:31:41.595 full_node full_node_server : ERROR Exception , exception Stack: Traceback (most recent call last):
File "chia\server\server.py", line 356, in start_client
File "aiohttp\client.py", line 763, in _ws_connect
File "aiohttp\client.py", line 521, in _request
File "aiohttp\connector.py", line 535, in connect
File "aiohttp\connector.py", line 892, in _create_connection
File "aiohttp\connector.py", line 1032, in _create_direct_connection
File "aiohttp\connector.py", line 969, in _wrap_create_connection
File "asyncio\base_events.py", line 949, in create_connection
File "asyncio\selector_events.py", line 473, in sock_connect
concurrent.futures._base.CancelledError
2021-05-06T07:31:45.016 daemon asyncio : ERROR Task exception was never retrieved
future: <Task finished coro=<kill_service() done, defined at chia\daemon\server.py:833> exception=AttributeError("'list' object has no attribute 'pid'")>
Traceback (most recent call last):
File "chia\daemon\server.py", line 841, in kill_service
File "chia\daemon\server.py", line 805, in kill_process
AttributeError: 'list' object has no attribute 'pid'
2021-05-06T07:32:09.965 full_node full_node_server : ERROR Exception: <class 'concurrent.futures._base.CancelledError'>, closing connection None. Traceback (most recent call last):
File "chia\server\server.py", line 531, in api_call
File "asyncio\tasks.py", line 435, in wait_for
concurrent.futures._base.CancelledError
2021-05-06T07:33:20.573 full_node full_node_server : ERROR Exception , exception Stack: Traceback (most recent call last):
File "chia\server\server.py", line 356, in start_client
File "aiohttp\client.py", line 763, in _ws_connect
File "aiohttp\client.py", line 521, in _request
File "aiohttp\connector.py", line 535, in connect
File "aiohttp\connector.py", line 892, in _create_connection
File "aiohttp\connector.py", line 1032, in _create_direct_connection
File "aiohttp\connector.py", line 969, in _wrap_create_connection
```
* fix plotter service killing
* just make it always be a list of processes for all services
* catch up tests
* Update chia/daemon/server.py
* simplify daemon connection handling
* Add tests
* return list of service names during removal
* set remove raises KeyError
* Better test type hints
* Add types and code refactor
* fix test typos
* small type adjustments
* test code improvements
* Better error handling for bad json
* handle proper but unexpected JSON values
* Update chia/daemon/server.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* test improvements
* check for empty thing equivalence
* Improved logging for ConnectionReset
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* make daemon heartbeat configurable and increase default
* Fix up daemon rpc test
* Fix dumb error with parameters
* Restore formatting
* Various updates from feedback
* Update tests/core/test_daemon_rpc.py
use config value for heartbeat
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* black fixes
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* 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
* Making source code cleaner
* Cleaned up `install_plotter.py`
* Now `$CHIA_ROOT/plotters/bladebit` is searched first then bundled bladebit
* Fixed a lint error
* WIP: Implement bladebit update/checkout feature
* Enable to specify git branch/tag/commit on bladebit installation
* Modify arguments display order
* Added `chia plotters version` command
* Fixed lint errors
* Fixed lint error 2
* Implemented `chia plotters bladebit2` and handling for its options
* Fixed typo
* Fixed a lint error
* Added comment
* Added missing plotter arguments
* Fixed LGTM warning
* Fixed wrong typing
* Fixed a lint error
* Fixed an issue where `None` was evaluated as an empty string
* Support bladebit2 plotting from web request
* Updated response of `get_plotters` API for upcoming `bladebit2`
* Fixed bladebit2 argument handling
* Modified progress dict
* Added --no-cpu-affinity option to bladebit1
* Fixed a minor error
* Fixed an error where `chia plotters version` failed
* Fixed an issue where building bladebit2 failed
* Fixed an issue where bladebit2 stopped working if `--cache` option was set
* Updated branch for bladebit2
* Fixed an issue where plotting with madmax/bladebit failed for Python < 3.8 on Windows
* Now `chia plotters install madmax|bladebit2` should work on RedHat like OSes
* Fixed a wrong yum package name
* Added yum packages required for Bladebit2
* Changed the way to update bladebit
* Implemented option handling for madmax as well as bladebit
* Fixed a lint error
* Fixed a minor issue
* Fixed LGTM warning
* Applied changes for bladebit 2.0.0-alpha-2
* Fixed a lint error
* Trying to fix windows pre-commit error
* Fixed isort error