Commit Graph
150 Commits
Author SHA1 Message Date
Matt HauffandGitHub 40db4635a8 [LABS-245] Enable PEP604 Ruff rules (#20269)
* Enable PEP604 Ruff rules

* Fix harcoded signature in test

* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00
Earle LoweandGitHub e57358aea6 CHIA-2102 - Set minimum to TLSv1.3 (#19079)
* Set minimum to TLSv1.3

* Update daemon specific option

* Remove deprecation warning
2025-10-22 11:47:41 -07:00
Matt HauffandGitHub a803dc0fa6 [CHIA-3633] August 2025 pass of Ruff linting rules (#19929)
* Enable Ruff `PLR1704` (`redefined-argument-from-local`)

* Enable Ruff `PLR5501` (`collapsible-else-if`)

* Enable Ruff `PLW2901` (`redefined-loop-name`)

* bad change

* Enable Ruff `RUF043` (`pytest-raises-ambiguous-pattern`)

* Enable Ruff `RUF046` (`unnecessary-cast-to-int`)

* Enable Ruff `RUF052` (`used-dummy-variable`)

* Remove unused ignore `UP006`

* One mis-signaled regex

* Comments by @altendky

* bad change, my bad
2025-08-11 14:39:12 -07:00
Kyle AltendorfandGitHub 8a8443787f redact daemon websocket message logging (#19697)
* redact daemon websocket message logging

* add tests

* casefold the trigger as well

* redact mnemonic too
2025-06-12 11:13:10 -07:00
Richard KissandGitHub 15a4536a7a The chia.consensus module no longer depends upon chia.wallet. (#19665)
<!-- 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?) -->

### Purpose:

This PR removes a dependency that is inappropriate and caused a
dependency loop.
2025-06-03 12:31:30 -07:00
Kyle AltendorfandGitHub e446d6b726 use chia_rs directly for sized ints (#19303)
* use chia_rs directly for sized ints

* Update data_layer_rpc_api.py
2025-02-24 14:33:09 -08:00
Kyle AltendorfandGitHub 1ffa73e99e task referencer (#18914)
* 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
2025-01-02 10:13:51 -07:00
Earle LoweandGitHub 8a56aa1bd4 ignore errors in daemon plotter process cleanup (#19025)
ignore errors in general cleanup
2024-12-18 12:01:41 -07:00
Kyle AltendorfandGitHub e7d12c7cb1 add root_path parameter to initialize_service_logging() (#18961) 2024-12-03 14:32:34 -07:00
Kyle AltendorfandGitHub dd028574bb enable ruff flake8 async (#18899) 2024-11-20 09:00:14 -07:00
Kyle AltendorfandGitHub 748c8cec8e # TODO: stop dropping tasks on the floor (#18866)
* # TODO: stop dropping tasks on the floor

* Update chia/_tests/core/data_layer/test_data_rpc.py

* no really, stop
2024-11-18 12:32:52 -07:00
Matt HauffandGitHub 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
Earle LoweandGitHub 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
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
Matt HauffandGitHub 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
Amine KhaldiandGitHub f4ff9d621e CHIA-1664 Deduplicate cancel_task_safe (#18745)
Deduplicate cancel_task_safe.
2024-10-24 11:52:22 -07:00
Kyle AltendorfandGitHub 9c8557a1f8 Remove Python 3.8 support and update source to 3.9 standards (#18687)
* manual python 3.8 removals

* poetry

* pyupgrade

* black

* isort

* manually tidy imports

* work around shadowed type

* catch up build network protocol files for pyupgrade changes

* placate pylint

* re-enable 20.04

* placate flake8
2024-10-16 14:21:15 -07:00
Earle LoweandGitHub 7b777e7db7 Resolve problems on Windows running the sub processes when in editable mode (#18379)
* use shutil.which() to find chia executable in a cross platform way

* mypy fixes

* add simple test for launch_start_daemon

* test adjustments
2024-08-01 16:40:44 -07:00
Kyle AltendorfandGitHub 3061cd83d7 remove some pylint ignores (#18140) 2024-06-18 14:24:30 -05:00
Matt HauffandGitHub 3637bd33c6 Delete chia.util.misc (#18170)
* Move VersionedBlob to chia.util.streamable

* Move format_bytes to chia.cmds.cmds_util

* Move format_minutes to chia.cmds.cmds_util

* Move prompt_yes_no to chia.cmds.cmds_util

* Move get_list_or_len to from chia.plot_sync.receiver

* Move validate_directory_writable to chia.cmds.cmds_util

* Move *termination_signals to test_services

* Move UInt*Range to chia.util.streamable

* Create chia.util.batches

* Create chia.server.signal_handlers

* Create chia._tests.util.split_managers

* Move ValuedEvent to chia.types.transaction_queue_entry

* Move available_logical_cores to chia.util.cpu

* Move caller_file_and_line to chia._tests.util.misc

* Move satisfies_hint to chia._tests.wallet.test_singleton_lifecycle_fast
2024-06-18 08:27:17 -05:00
Chris MarslenderandGitHub e88d2e4b41 Add genesis challenge to get_network_info rpcs (#18000) 2024-05-09 17:07:17 -07:00
Matt HauffandGitHub aefe7fdf28 Observer Mode (#17792)
* Observer Mode

* Address comments by @altendky

* Change RPC default and fix test coverage

* Add test coverage for rpc marshaller

* Fix @marshal util to return proper transactions
2024-05-07 13:39:25 -07:00
Felix BruckerandGitHub d09b61b72d Pass full version in Handshake (#15679)
* 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
2024-03-27 10:40:47 -07:00
Chris MarslenderandGitHub 71ced4c783 Add get_network_info to daemon (#17717)
* its also useful to have network info available from the daemon, vs having to ask whichever service(s) happen to be up

* Add test for get_network_info on daemon

* Fix precommit
2024-03-18 08:40:06 -07:00
Earle LoweandGitHub 48e4039e58 Update black to 24.1.1 and update source as needed (#17499)
* Update source to black 24 spec

* update black to 24.1.1

* update pylint to ignore multiple-statements

* update test file

* black updates

* format updates

* Update test_network_protocol_files.py

* Update test_network_protocol_files.py
2024-03-13 11:08:19 -07:00
Earle LoweandGitHub 5d3eb6cc43 Daemon: use msg queue and specific task for handling status messages (#17411)
* Add msg queue for status messages

* Add some tests for keyring status messages

* Address some comments
2024-02-01 22:57:09 -08:00
Amine KhaldiandGitHub f085e94dec Import BetaMetricsLogger only when needed (#17240)
Import BetaMetricsLogger only when needed.
2024-01-08 10:39:28 -06:00
Arvid NorbergandGitHub 95e5b97557 Use bls from chia rs (#16715)
* replace blspy imports with chia_rs imports for BLS types

* remove blspy-stubs, since we're dropping the blspy dependency. chia_rs has type stubs already
2023-11-07 09:06:52 -08:00
Kyle AltendorfandGitHub ffe20da303 fixup pylint confusion (#16716) 2023-11-03 11:35:37 -05:00
Don KackmanandGitHub 975af7494b [ADDED] Allow the daemon to use TLS v1.2 via config flag (#16747) 2023-11-01 11:53:58 -05:00
Amine KhaldiandGitHub c2fbd6ecf1 Make pylint ignore bare-except in this particular case, just like we do with flake8 (#16714) 2023-10-27 14:29:47 -07:00
Kyle AltendorfandGitHub fc0eda6178 refactor WebSocketServer.ping_task() to loop (#15408) 2023-10-27 12:03:48 -07:00
Kyle AltendorfandGitHub 90c1441af0 apply pyupgrade --py38-plus --keep-runtime-typing (#14646) 2023-10-24 12:01:23 -05:00
Earle LoweandGitHub 5ea14326c9 Refactor daemon simulation test (#16081) 2023-10-04 12:16:13 -05:00
Izumi HoshinoandGitHub 4278760924 Bladebit Hybrid disk mode (#16208) 2023-09-12 13:54:04 -05:00
Kyle AltendorfandGitHub 1c5b469c5b more ws message type awareness in the deamon (#15797) 2023-09-07 14:05:57 -05:00
William AllenandGitHub b475ad86f5 checkpoint: into main from release/2.0.1 @ 27ccd9a86d (#16266)
Source hash: 27ccd9a86d
Remaining commits: 1
2023-09-06 13:35:04 -05:00
Kyle AltendorfandGitHub 353f12d5a3 commonize signal setup (#13568)
* 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
2023-09-06 13:01:11 -05:00
Earle LoweandGitHub 27ccd9a86d Fix issue with GUI and chia plotters when making compressed plots (#16232)
* don't pass in no-direct-downloads on false

* Remove no-direct-downloads

* Remove no-direct-downloads
2023-09-05 15:46:11 -05:00
Izumi HoshinoandGitHub 914505f945 Fixed an issue where chiapos recognized t2 as required option (#16020) 2023-08-14 11:20:56 -05:00
Earle LoweandGitHub 231bc4638d Use 'Completed writing plot' as the magic final words for cudaplot (#16011) 2023-08-10 21:06:01 -05:00
b772ac91db Added cuda and plot compression support for bladebit 3 (#15774)
* Added cuda and plot compression support for bladebit 3

* Update chia/plotters/bladebit.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* Update chia/plotters/bladebit.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* Fixed issues

* Fixed lint error

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2023-07-18 12:33:42 -05:00
Izumi HoshinoandGitHub dd1fbeb040 Added get_keys_for_plot daemon server API (#15772)
* Added `get_keys_for_plot` daemon server API

* Fixed isort error

* Added assertion code

* Added tests

* Fixed flake8 error

* Applied review suggestion

* Added test cases for daemon client

* Renamed `get_keys_for_plot` -> `get_keys_for_plotting`
2023-07-18 12:26:48 -05:00
JeffandGitHub e4312344d0 add get_wallet_addresses RPC for deriving wallet addresses (#15668)
* add get_wallet_addresses RPC for deriving wallet addresses

* tests for get_wallet_addresses

* linter fix

* fix tests

* use datacases

* update monkeypatched function based on feedback
2023-07-05 18:04:17 -05:00
JeffandGitHub fa6f3f67d0 support calling daemon commands from chia rpc CLI (#15584)
* add daemon as a callable service

* re-adding "get_routes" command

* added a test for get_routes

* linter fix

* reformatted with black

* addressed PR feedback
2023-06-28 18:38:53 -05:00
Kyle AltendorfandGitHub 8f34146654 add Command protocol for daemon (#15592)
* add Command protocol for daemon

* remove get routes for now

* oops
2023-06-23 12:58:14 -05:00
Earle LoweandGitHub 46a244ae09 daemon plotter RPC tests (#15291)
* daemon plotter RPC tests

* remove debug cruft

* Add stop_plotting test

* Add stop_plotting test

* Fix up test

* Remove specific test_mode and adjust tests

* Fix madmax test and add a couple minor tests

* cleanup unused code

* Updates based on code suggestions
2023-06-13 17:27:48 -05:00
Kyle AltendorfandGitHub 70a8874ba5 copy connection set to iterate while pinging (#15407) 2023-05-31 11:34:30 -05:00
Earle LoweandGitHub e7d858ef65 Remove unused function from daemon service (#15209)
Daemon doesn't use this function
2023-05-08 20:48:44 -05:00
dustinfaceandGitHub 3e76f78e37 daemon: Fix removal while iterating over connections set (#14887) 2023-03-25 00:28:25 -05:00