<!-- 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?) -->
The modules `chia.protocols` and `chia.server` form a dependency loop.
This change at least removes the direct dependency of `chia.protocols`
on `chia.server`.
### Purpose:
<!-- 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) -->
Move `get_unresolved_peer_infos` and `set_peer_info` from
`chia.util.config` to `chia.server.resolve_peer_info.py` so that
`chia.util` no longer depends upon `chia.server`.
* put otherwise unheld tasks into the pit
* and the rest too
* cull less often
* task referencer
* private
* report unexpectedly unreferenced tasks
* also warn for automated catching in tests
* reporting task
* undo some
* fixup for 3.9
* ban asyncio.create_task
* oof
* simplify including using `Task.add_done_callback()` for culling
* Change a bunch of info logs back to warning in crawler, since crawlers are typically run in warning mode, to avoid the info log connection spam
* Ensure that the crawler loop ONLY doesn't start when in tests
* Rename the crawler service to crawler_service_no_loop, so defaults can also be tested WITH a loop
* Test crawler loop modes
* Add message when we received state chaged callback
* Add log to indicate crawling has started and how many peers we're crawling
* Move capabilities underneath Capability
* Split default capabilities for each service
* Make get_capabilities take in node_type
* Remove optionality
* Refactor get_capability_overrides
* bump chia_rs to 0.7.0 and transition using sized ints and sized bytes from chia_rs
* transition StructStream to use the version from chia_rs
* Initial port of ConsensusConstants to Rust
* Revert max cost calculation to use int for now
* Remove SizedBytes, since it was moved to chia_rs
* Remove test_struct_stream, since it was moved to chia_rs
* use [0] * 100 instead of bytes(100)
* restore wallet_rpc_api, and make type hints match JsonDict (Any)
* fixup ConsensusConstants; restore return value of calculate_prefix_bits()
* fixup ConsensusConstants; construct int for intermedate cost values
* fixup ConsensusConstants; construct int for intermedate cost values
* fixup: transition StructStream to use the version from chia_rs
* revert changing type annotations for json dict
---------
Co-authored-by: Rigidity <me@rigidnetwork.com>
* 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
* Cleanup seeder & mypy all files
holy crap mother of all tech debt this was horrid
* Make UDP Protocol class a dataclass & separate out functions.
* add TCP protocol class to DNS server
* Fix mypy types & other cleanup
also fix a couple bugs
* Add seeder and crawler tests
* change log levels
* re add db lock timeout
oops
* add edns & edns tests
* fix repeated shutdown on close signal
* fix binding to use both ipv6 and ipv4
whyyyyyyy
* add ipv6 and ipv4 tests + add ipv4 if windows
* Renaming instances of 'decompresser' to 'decompressor'
* Making 'parallel_decompressors_count' singular
* Using chiapos version that has matching spelling
* Putting the clsp file back where I found it
* fix ver
---------
Co-authored-by: Jack Nelson <j.nelson@chia.net>
* server: Introduce `ApiProtocol`
* genericize (#5)
* `ApiProtocol.api_ready` -> `ApiProtocol.ready()`
* Add `ApiProtocol.log` and give APIs separate loggers
* Fix `CrawlerAPI`
* Drop some unrelated removals
* Fix some of the generic hinting
* Revert some changes in `timelord_api.py`
* Fix `CawlerAPI` readiness
* Fix hinting
* Get some `CrawlerAPI` coverage
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net>
We create new configs in `setup_farmer` and `setup_harvester` and they
contain `localhost` defaults. Replace it here also like we do it in
`BlockTools` to consistently use `127.0.0.1` instead of `localhost` in
tests.
* add local max subscription config
* add and use trusted wallet config
tests
* lint
* unused import
* break early
* dont break because we need to iterate for hints
* fix off by one
* lint