* 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
* provide a skeleton hint protocol for rpc apis
* more
* more self.custom_get_connections = None
* fix RpcApiProtocol.service hinting
* catch up with RpcApiProtocol._state_changed()
* FullNode.server is now non-optional. 'ish
* drop another todo
* custom_get_connections -> get_connections
* just make get_connections() a mandatory method with a helper provided
* lots
* try again
* ._start_with_fingerprint()
* fill out the Service generic parameter in start scripts
* ... instead of pass
* add docstrings to the protocols
* remove no longer needed hasattr/not None checks
* remove outdated comment
* refactor Harvester._is_shutdown to ._shut_down
* create new test.simulator module
to allow other packages to use the simulator without it crashing.
also tiny QOL fixes
* change user mode sim plot filter
Now only plots matching the user set fingerprint are loaded, this decreases the chance of user error.
* fix small oops in configure
* oops
* fix lint
* isort, who dis
* move folder over to chia/simulator
also change mypy settings again
* remove extra bt from as many tests as possible
max speed
* wallet bt tools removal
* fix error & add bt_tools to yield
* final changes
L bozo
* something funky going on
* fix issues
* a couple more fixes
* mypy happy
* damn lint
* Revert "something funky going on"
This reverts commit 1fcc9a34e1.
Having `Test` or `test_` prefixes obviously lets `pytest` think its a
actual test class/method and it
leads to warnings in test logs if it doesn't comply with its rules:
```
/home/runner/work/chia-blockchain/chia-blockchain/tests/plotting/test_plot_manager.py:45:
PytestCollectionWarning: cannot collect test class 'TestDirectory'
because it has a __init__ constructor (from:
plotting/test_plot_manager.py)
```
or
```
/home/runner/work/chia-blockchain/chia-blockchain/tests/plotting/test_plot_manager.py:135:
PytestCollectionWarning: cannot collect test class 'TestEnvironment'
because it has a __init__ constructor (from:
plotting/test_plot_manager.py)
```
* Test plot sync start and disconnect while a sync is in progress
* Drop `Receiver._lock`, instead wait for `Receiver.sync_active` to clear
* Properly stop the sender and plot manager refreshing on disconnect
* Poll faster, drop the log
* Reset `_sync_id` at the very end of `_finalize_sync`
* test: Give `setup_farmer` and `setup_harvester` a separate chia root
* test: Wait for `last_sync_time` in `get_harvesters_{summary}`
To make sure the first sync from the harvester to the farmer is done
before we check plot counts.
* farmer|rpc: Always add `last_sync_time` in `Receiver.to_dict`
This changes the resonse of `get_harvesters` and
`get_harvesters_summary` to always include that field with value
`None`/`null` if the receiver is not yet synced.
* plot_sync: Add sync state to dict in `Receiver.to_dict`
* Add `total_plot_size` to `Receiver.to_dict`
* Refactor sync object assertions
* Access `_current_sync` directly
* Generate `syncing` data outside
* protocols|server: Define new harvester plot refreshing protocol messages
* protocols: Bump `protocol_version` to `0.0.34`
* tests: Introduce `setup_farmer_multi_harvester`
Allows to run a test setup with 1 farmer and mutiple harvesters.
* plotting: Add an initial plot loading indication to `PlotManager`
* plotting|tests: Don't add removed duplicates to `total_result.removed`
`PlotRefreshResult.removed` should only contain plots that were loaded
properly before they were removed. It shouldn't contain e.g. removed
duplicates or invalid plots since those are synced in an extra sync step
and not as diff but as whole list every time.
* harvester: Reset `PlotManager` on shutdown
* plot_sync: Implement plot sync protocol
* farmer|harvester: Integrate and enable plot sync
* tests: Implement tests for the plot sync protocol
* farmer|tests: Drop obsolete harvester caching code
* setup: Add `chia.plot_sync` to packages
* plot_sync: Type hints in `DeltaType`
* plot_sync: Drop parameters in `super()` calls
* plot_sync: Introduce `send_response` helper in `Receiver._process`
* plot_sync: Add some parentheses
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* plot_sync: Additional hint for a `Receiver.process_path_list` parameter
* plot_sync: Force named parameters in `Receiver.process_path_list`
* test: Fix fixtures after rebase
* tests: Fix sorting after rebase
* tests: Return type hint for `plot_sync_setup`
* tests: Rename `WSChiaConnection` and move it in the outer scope
* tests|plot_sync: More type hints
* tests: Rework some delta tests
* tests: Drop a `range` and iterate over the list directly
* tests: Use the proper flags to overwrite
* test: More missing duplicates tests
* tests: Drop `ExpectedResult.reset`
* tests: Reduce some asserts
* tests: Add messages to some `assert False` statements
* tests: Introduce `ErrorSimulation` enum in `test_sync_simulated.py`
* tests: Use `secrects` instead of `Crypto.Random`
* Fixes after rebase
* Import from `typing_extensions` to support python 3.7
* Drop task name to support python 3.7
* Introduce `Sender.syncing`, `Sender.connected` and a log about the task
* Add `tests/plot_sync/config.py`
* Align the multi harvester fixture with what we do in other places
* Update the workflows
Co-authored-by: Kyle Altendorf <sda@fstab.net>