* First pass add 3.14
* Update bitarray
* Update markupsafe
* Update zstd
* Update tach to version with 3.14 support
* Changes for 3.14 related things
* Refactor shutdown handling in sync method
* Ignore unclosed database ResourceWarning
Added a new warning to ignore for unclosed database resources.
* Update pytest.ini to ignore additional warnings
* ignore resourcewarnings about tempdir cleanup
* Minor cleanup for tests running under python 3.14
* Reduce consensus tests for test_ban_for_mismatched_tx_cost_fee
* make sure to close RPC client at end of test
* different idea for TempFile
* oh, no cleanup function
* small fixes for tests detected by 3.14
* update pytest.ini
* ignore sqlite errors during closing in __del__
* add code to ignore deprecatewarnings for loop policy
* Pass in ClientSession to wschiaconnection for proper cleanup
* Some more resource cleanup
* Trying to find unclosed sessions
* One more time needing a close
* wait for harvesters to connect to the farmer
* properly teardown vdf_server using context manager
* Testing cleanup for simulator tests
* Add in a sleep to allow sockets time to cleanup
* Revert "Testing cleanup for simulator tests"
This reverts commit c5a4ef0cc3.
* Revert "properly teardown vdf_server using context manager"
This reverts commit 18b456a7b6.
* Revert "Revert "Testing cleanup for simulator tests""
This reverts commit 8c8efc2e03.
* vdf_server cleanup
* attempt 47 of timelord cleanup
* Some other cleanup fixes in tests
* yet another attempt at timelord shutdown
* Some more adjustments for 3.14
* ignore unclosed socket resource warnings
* some more adjustments and cleanup
* remove commented code
* correct poetry.lock file
* Address some review comments
* fix merge indentation
* fix install script print
* update requests
* fix problems with timelord tests on 3.14
* Make sure to close dummy session on any exception
* Use different cleanup pattern to help with flakes on Windows
* better shutdown handling
* hopefully better awaiting for cleanup
* yet more better timelord cleanup
* some test adjustments
* more time for cleanup
* harvester_api_protocol
* move to apis
* Remove `chia.apis` => `chia.harvester` dependency.
* Remove circular dependencies between `chia.apis` and service modules.
* SolverAPIStub, and add solver to tach.toml.
* Make the stubs (lack of) implementations more consistent.
* Use `stub_metadata_for_type` instead of `class_for_type`.
The only thing ever used from `ApiProtocol` in `WSConnection`
was the metadata field, so let's pass along only that.
* NewSignagePointHarvester2
* remove some stuff
<!-- 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) -->
* 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
* Add support for a static list of peers to always have available in the dns_server
* Add some tests
* Test the hostname to ip resolution for static dns server responses
* Sort imports
* Fix types/lint
* Fix test_db_processing flake
* remove unnecessary continue
* Ensure the parts that used to loop every 2 seconds when the DB is being populated for the first time still loop every 2s
* Update chia/seeder/dns_server.py
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
* Remove redundant check for crawl store
---------
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
* explicitly collect api methods instead of later using getattr
* api as a class itself
* tidy
* fixup
* tidier
* and...
* fixup
* oops
* mm
* hum
* fixup
* monkey patching helper
* ...
* tidy
* back to instances
* fix
* self-patch
* duplicate original request attributes
* Update chia/_tests/wallet/sync/test_wallet_sync.py
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* test that `@metadata.request()` fails on repeated request type
* ...
---------
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* 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
* Add prune old peers functionality for crawler to keep the database size and write times under control
* Add test
* Make starting the crawler loop optional for tests. Test the pruning of old peers
* Fix lint issues
* 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>
* Pass full version in Handshake
* Move chia version conversion into crawler
* Rename to overloaded `chia_short_version` and always return str
* Ensure we extract major.minor.patch from invalid pep440 if available
* 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
* 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>