* daemon: Iterate over a copy of `websockets`
Currently when it fails to send the response to one websocket it skips
the next websocket in list becaue we remove from the list while
iterating.
* util: Iterate over a copy of `peers_with_peak`
Currently when a peer is closed it skips the check for the next peer in
the list becaue we remove from the list while iterating.
* Remove _set_state_changed_callback from harvester_api.py as its never actually called
In rpc/rpc_server.py:318, what is actually called is rpc_server.rpc_api.service._set_state_changed_callback, so the version of this in harvester.py is what is actually used
* Remove duplicate initial value for state_changed_callback in init
* _state_changed -> state_changed so it can be called from harvester_api as well
* Add farming info state_changed event from harvester
* Add time to farming_info event
* Add [pre_]validation_time to block event
* Remove unused set_state_changed_callback on full_node_api. This is actually called on full_node_rpc_api.service
* Remove unused set_state_changed_callback on crawler_api. This is actually called on crawler_rpc_api.service (crawler)
* Remove unused set_state_changed_callback on farmer_api. This is actually called on farmer_rpc_api.service (farmer), not the api itself
* Add state changed event for submitting a partial
* Lint fixes
* Set `in_transaction` for `set_finished_sync_up_to`
* Call `clean_block_records` based on `in_transaction`
* Don't pop wallets in `reorg_rollback`, do it after it was commited
* Add comments and fix a coin subscription bug
* Updated rollback test
* simplify test
* expand test
Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
* Implement `test_cat_creation_unique_lineage_store()`
Make sure creating CAT wallets leads to unique lineage stores.
* Fix `CATLineageStore` creation in `create_new_cat_wallet`
We currently create the `CATLineageStore` before the new asset id exists
which leads to all CATs created by `create_new_cat_wallet` using the
same lineage store table:
`lineage_proofs_0000000000000000000000000000000000000000`.
* Create `CATLineageStore` in `generate_issuance_bundle`
* isort: Fix `streamable.py` and `test_streamable.py`
* mypy: Drop `streamable.py` and `test_streamable.py` form exclusion
And fix all the mypy issues.
* Fix `pylint`
* Introduce `ParseFunctionType` and `StreamFunctionType`
* Use `object` instead of `Type[Any]` for `is_type_*` functions
* Some `Any` -> `object`
* Use `typing.overload` for `recurse_jsonify`
* Move some comments
* Drop `Union`, use `Literal` properly
* Explicitly ignore the return of `f_type.parse`
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Merge two `recurse_jsonify` overloads
* Typing for the base definition of `recurse_jsonify`
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* plotting|tests: Extend the lifetime of plot data cache entries
* plotting|tests: Add `prover` and `farmer_public_key` to the cache
* plotting: Missing type hints in `Cache` and `CacheEntry`
* setup: Bump `chiapos` to 1.0.10
* plotting: Move cache classes into `chia.plotting.cache`
* plotting: Introduce `CacheEntry.from_disk_prover`
* Make `Cache` a dataclass
* `staticmethod` -> `classmethod`
* Store cache data as `bytes` in `DiskCache`
* streamable: Merge `strictdataclass` into `Streamable` class
* tests: Test not supported streamable types
* streamable: Reorder decorators
* streamable: Simplify streamable decorator and force correct usage/syntax
* streamable: Just move some stuff around in the file
* streamable: Improve syntax error messages
* mypy: Drop `type_checking.py` and `test_type_checking.py` from exclusion
* streamable: Use cached fields instead of `__annotations__`
This is now possible after merging `__post_init__` into `Streamable`
* Introduce `DefinitionError` as `StreamableError`
* `/t` -> ` `
* more work on test blockchain
* Optimize test_blockchain.py
* Fix weight proof bug
* Rename variable
* first rc_sub_slot hash bug
* New plots
* try with a new ID
* Run without cache
* Address test blocks and plots preparation.
* Update constant in test_compact_protocol().
* Update this constant too.
* Revert accidental altering of the gui submodule in ae7e3295f280a591e76c4dffdea75fb74ea5de6f.
* Fix benchmark test
* Revert mozilla-ca change
* Rebase on main
Co-authored-by: almog <almogdepaz@gmail.com>
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* Fix the case of claiming a large number of coins with a fee from a pool wallet
* Revert change to unrelated test
* Set PoolWallet.DEFAULT_MAX_CLAIM_SPENDS to 300
* A few review improvements
* 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>
* Set keychain_proxy to None in await_closed() to support reinitialization.
* Added `shutting_down` param to _await_closed() to control whether the keychain_proxy is closed.