Kyle Altendorf
709f14abe9
use the vars for the test parameters too ( #18868 )
2024-11-15 09:03:39 -07:00
Florin Chirica
166a734232
Use deepcopy everywhere.
2024-11-15 05:40:18 +02:00
Florin Chirica
6b543dc380
Try with deepcopy.
2024-11-15 05:36:21 +02:00
Florin Chirica
9aad2f793d
Mypy.
2024-11-15 04:37:03 +02:00
Florin Chirica
404f1c5168
Add merkle blob cache.
2024-11-15 04:31:45 +02:00
Matt Hauff
604fc1feb0
[CHIA-1732] Add Ruff specific linting rules ( #18845 )
...
* Add Ruff specific linting rules
* Further tighten ignore list
* Address comments by @altendky
* One more comment @altendky
2024-11-14 15:58:12 -07:00
Kyle Altendorf
f5235c2b5e
add /get_log_level, /reset_log_level, and /set_log_level to all rpcs ( #18843 )
...
* add `/get_log_level` and `/set_log_level` to all rpcs
* tidy
* for py <3.11
* fixup
* add tests
* a few no covers
* add `RpcClient.reset_log_level()`
* tidy
* fixup
2024-11-14 15:57:18 -07:00
Kyle Altendorf
96a8be8f63
fill in missing rpc client methods ( #18851 )
...
* fill in missing rpc client methods
* no cover
2024-11-14 08:33:42 -07:00
Kyle Altendorf
ed74439d73
check network errors and their .__cause__ for expected error types ( #18849 )
2024-11-14 08:15:56 -07:00
Amine Khaldi
2499e9721f
CHIA-1734 Annotate spend_bundles as a sequence in WalletSpendBundle's aggregate ( #18840 )
...
Annotate spend_bundles as a sequence in WalletSpendBundle's aggregate.
2024-11-14 08:15:06 -07:00
Amine Khaldi
12d1176d77
CHIA-1735 Speedup tx_additions and removed handling in get_header_blocks_in_range ( #18841 )
...
Speedup tx_additions and removed handling in get_header_blocks_in_range.
2024-11-14 08:14:48 -07:00
Amine Khaldi
8d492e638c
CHIA-1727 Clarify the validation state that we calculate for the next block if it's validated ( #18835 )
...
Clarify the validation state that we calculate for the next block if it's validated.
2024-11-14 08:14:29 -07:00
Florin Chirica
094e5cfc26
Lint.
2024-11-14 03:10:51 +02:00
Florin Chirica
c3082076ac
Address comments.
2024-11-14 03:08:13 +02:00
Matt Hauff
ac278351ef
[CHIA-1236] Sort offers in CLI by RELEVANCE ( #18824 )
...
Sort offers in CLI by `RELEVANCE`
2024-11-13 09:53:58 -07:00
Earle Lowe
ecdf4f4997
CHIA-1645: Some daemon start cleanup ( #18809 )
...
* Some daemon start cleanup
* mypy fixes
* Reduce scopy of change
* typo
* Use *=
2024-11-13 09:09:35 -07:00
Amine Khaldi
d9f7108e97
CHIA-1685 Simplify return values for validate_block_body ( #18790 )
...
Simplify return values for validate_block_body.
2024-11-13 09:08:32 -07:00
thesemaphoreslim
075adb251e
Logging changes for feeler connections ( #18784 )
...
* Check if connections are classified as feelers and log connection successes/failures to debug level only. Continue logging warnings/errors as before, just specify if they are associated with feeler connections.
* Reformatted for CI
* Flake8 formatting
* Simplified logging into one-liners where possible.
2024-11-13 09:08:08 -07:00
Florin Chirica and Kyle Altendorf
3745e5222d
Apply suggestions from code review
...
Co-authored-by: Kyle Altendorf <sda@fstab.net >
2024-11-13 03:05:41 +02:00
Matt Hauff and Kyle Altendorf
6c90a76b56
Tighten up ruff ignore list ( #18837 )
...
* Tighten up ruff ignore list
* Okay that fix was indeed unsafe
* enable type-name-incorrect-variance
* enable literal-membership
* enable non-augmented-assignment
* enable useless-return
* enable global-variable-not-assigned
* -
* fixup
* Clean up roff.toml from annotations
* use ignore instead of explicit re-export
* use more descriptive names
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net >
2024-11-12 12:19:31 -07:00
Arvid Norberg
06b2447f6c
[CHIA-1655] simplify pre_validate_blocks_multiprocessing() ( #18836 )
...
simplify pre_validate_blocks_multiprocessing() by making it pre-validated one block at a time. That's how we use it in production code anyway
2024-11-12 08:57:02 -07:00
Arvid Norberg
c4ac6c763e
the mempool thread pool should not set the process name ( #18842 )
2024-11-08 09:56:50 -07:00
Arvid Norberg
80911d475e
[CHIA-1703] ignore ephemeral spends in mempool superset rule ( #18834 )
...
ignore ephemeral spends in mempool superset rule
2024-11-08 08:58:56 -07:00
Amine Khaldi
569a47c84b
CHIA-1717 Handle index error on empty peers with peak in request_validate_wp ( #18830 )
...
Handle index error on empty peers with peak in request_validate_wp.
2024-11-08 08:58:45 -07:00
Kyle Altendorf and Amine Khaldi
ff3cf282c2
explicitly collect api methods instead of later using getattr ( #18800 )
...
* 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 >
2024-11-08 08:58:15 -07:00
Florin Chirica
605ceebdca
Lint.
2024-11-07 05:13:32 +02:00
Florin Chirica
3f0efa14ad
Lint.
2024-11-07 05:10:59 +02:00
Florin Chirica
cef14dbe01
Fix bug.
2024-11-07 05:05:52 +02:00
Arvid Norberg
6ceaec4477
[CHIA-1562] move signature validation into run_block_generator() ( #18812 )
...
* use run_block_generator() directly in block creation, to compute the final cost of the block we're creating. This lets us avoid validating the signature (to save time) and run in mempool mode
* always validate signatures in run_block_generator().
* remove PreValidationResult.validated_signature and instead defer to the inner SpendBundleConditions field
2024-11-06 10:57:03 -07:00
Earle Lowe
c7a7d4e99a
Fix incorrect comment about default hidden puzzle ( #18820 )
2024-11-06 10:49:53 -07:00
Earle Lowe
61cf266e28
CHIA-1697: Add new flag to support recursively scanning and following links ( #18803 )
...
* Add new flag to support recurvely scanning and following links
* black fix
* hardlink_to only in python 3.10+
* Remove unneeded hardlink checks as hardlinks to directories aren't a thing
* Minor update per code review
* use boolean_datacases
* Add new flag to initial-config
2024-11-06 10:24:02 -07:00
Earle Lowe
7dd1324420
Await self_is_synced() ( #18772 )
...
Update full_node_simulator.py
2024-11-06 08:51:38 -07:00
Amine Khaldi
816462d57a
CHIA-1716 Speedup get_header_blocks_in_range w.r.t. blocks with no transactions ( #18829 )
...
Speedup get_header_blocks_in_range w.r.t. blocks with no transactions.
2024-11-06 08:40:47 -07:00
Florin Chirica
3aeffd46e8
Fix test.
2024-11-06 01:15:13 +02:00
Matt Hauff
15079c6a57
Fix pre-commit in chia/rpc/util.py ( #18823 )
2024-11-05 12:50:04 -07:00
Amine Khaldi
da607b2ac5
CHIA-1692 Annotate chia/rpc/util.py ( #18798 )
...
Annotate chia/rpc/util.py.
2024-11-05 08:41:38 -07:00
Amine Khaldi
0d8920a942
CHIA-1684 Move obtain_current_passphrase next to KeyringWrapper ( #18787 )
...
Move obtain_current_passphrase next to KeyringWrapper.
2024-11-05 08:41:11 -07:00
Kyle Altendorf
3f6977fe65
more start_* service starting consistency ( #18775 )
...
* more `start_*` service starting consistency
* fixup
* Update start_full_node.py
2024-11-05 08:40:47 -07:00
Florin Chirica
72e271da6e
Fix tests.
2024-11-05 03:47:26 +02:00
Matt Hauff
2808ee2446
[CHIA-1681] Replace black with Ruff ( #18813 )
...
* Replace black with Ruff
* Change build_network_protocol_files.py
2024-11-04 15:22:18 -07:00
Kyle Altendorf
2b19c289a9
make timeloard launcher fail with a non-zero exit code on windows ( #18814 )
...
* make timeloard launcher fail with a non-zero exit code on windows
* Update timelord_launcher.py
2024-11-04 12:35:05 -07:00
wjblanke
d95a5e7cf6
allow backcompat mode for logging ( #18810 )
...
* allow backcompat mode for logging
* fix stdout
2024-11-04 12:33:40 -07:00
Kyle Altendorf
bef7a5d763
test more services terminate ( #18807 )
...
* test more services terminate
* tidier
* tidier
* pick an available port for the timelord vdf server as well
* skip timelord launcher on windows
* use port 0 for the api port
* Update test_services.py
* no cover
2024-11-04 12:33:31 -07:00
Matt Hauff
73e4a5bbea
[CHIA-1680] Finish replacing flake8 with Ruff ( #18802 )
...
* Apply ruff unsafe fixes
* Manually fix tuples with `as`
* Remove all references to flake8
2024-11-04 08:59:57 -07:00
Kyle Altendorf
40c3ccc4ee
reduce 60 minute timeout for single assert ( #18805 )
2024-11-01 16:09:40 -07:00
Arvid Norberg
12a089f5f4
[CHIA-1638] Pace block requests ( #18729 )
...
* pace block requests to avoid the peer hitting its response rate limit. Prioritize fast peers over slow ones
* fix mypy warning
* simplify making WSChiaConnection usable as a dictionary key
* address review comments
2024-11-01 12:10:01 -07:00
Matt Hauff
0e703e48e0
(Mostly) Replace flake8 with Ruff ( #18801 )
...
* Get flake8 config partially ready
* Mostly remove flake8 config
* Delete arithmetic whitespace ignore
* Delete unused program strings from tests
* Remove unnecessary noqas
* A couple more flake8 warnings
2024-11-01 09:55:16 -07:00
Richard Kiss and Kyle Altendorf
4910323dbc
Replace class_for_type function with a dict ( #18773 )
...
* Pass down `class_for_type` dict instead of global function.
* Simplify
* Update chia/apis.py
Co-authored-by: Kyle Altendorf <sda@fstab.net >
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net >
2024-11-01 09:54:10 -07:00
Matt Hauff
efb7a292ed
[CHIA-1679] Replace Pyupgrade with Ruff ( #18795 )
...
* Replace Pyupgrade with Ruff
* Fix python version
2024-10-31 11:56:14 -07:00
Kyle Altendorf
920b7405f9
less int(somefloatliteral) ( #18796 )
2024-10-30 09:30:53 -07:00