* Eliminate rate limits and bans for exempt peer networks
* Add some tests for banning when closing connections
* make sure to pass in parameter to constructor
* change v1 plot phase-out to not affect required iters, and to be quantized to epoch blocks
* disable hard-fork 2 tests until we have a new test cache
* fix rate limits test
* address review comments
* python 3.13 support
* some more
* 3.13 for dep checks
* more 3.13 *confused*
* fixup
* fixup
* update expected signature in 3.13
* fixup _attach/_detach hinting and testing
* ban freethreading
* Fix trailing comma in list
* replace legacy kw_only_dataclass decorator
* Adjust check for python version
* Remove debugging output
* Use reruns for 3.13+Windows flakes only
* re-lock poetry
---------
Co-authored-by: Earle Lowe <e.lowe@chia.net>
Co-authored-by: Matt Hauff <quexington@gmail.com>
* remove unused default_settings in rate limits
* simplify rate_limit_numbers by flattening the structure. just map message type -> rate limits
* review comments
* use monotonic clock in rate limiter
* rename minute -> slot in rate limiter, as the length is a parameter
* mock timer in rate limit test to make them deterministic
* remove unnecessary pytest class
* improve comment in rate_limit_numbers
* fix minor typos in rate_limits.py
* replace test_too_many_messages() with a parametrized test for (almost) all rate-limit cases
* review comments: give better names to test parameters
* review comments
* review comments
* review comments
* review comments
<!-- 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
* 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>
* New wallet sync protocol
* New updates to protocol and initial tests
* Bump new message ids
* Bump protocol version
* Update existing messages
* Implementation of TransactionAddedUpdate
* Improve unit tests
* Update protocol and tests to use previous height
* Testing tweaks
* Remove transaction subscriptions
* Update protocol tests
* Fix request_coin_state test
* Improve test suite, add min_amount, fix bugs
* Update protocol message serialization tests
* Resolve conflicting file
* Remove old hint store code
* Remove transaction added protocol type
* Make height optional for genesis challenge
* Test subscribe after initial state and dedupe ids in that case
* Forcing an empty commit.
* Fix new protocol tests
* Improve performance of clearing subscriptions
* Add more amounts to coin store test
* Lower max items for coin store test
* Fix test coverage, set lower max response items
* Remove add_puzzle_subscriptions and remove_puzzle_subscriptions from protocol
* Update protocol message list test
* Fix valid reply len
* Fix performance issue in query and add error codes
* Add missing message to regression tes
* Add rate limits
* Add test for hint store get_coin_ids_multi
* Increase max puzzle hash batch size and make it a constant
* Use actual params on to_bytes
* Fix test
* Actually check output of no puzzle hash coin state test
* use separate protocol versions for the different services
* Validate protocol version on handshake
* simplify checking protocol version for incoming connections
---------
Co-authored-by: Harold Brenes <h.brenes@chia.net>
* 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