Commit Graph
192 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
Matt HauffandGitHub fcdb8e4925 Manual fixes for upcoming Ruff pyupgrade push (#20213)
* Manual fixes

* Revert back to variable in type expression

* Fix streamable to handle UnionType
2025-11-03 09:16:42 -07: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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Kyle Altendorf
4857c6f5a8 build(deps): bump mypy from 1.15.0 to 1.17.0 (#19821)
* build(deps): bump mypy from 1.15.0 to 1.17.0

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* handle mypy commentary

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-08-01 09:17:06 -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
6050235bdb [CHIA-3043] Add (hopefully) non-controversial ruff rules (#19684)
* Add (hopefully) non-controversial ruff rules

* mypy-exclusions.txt

* PIE

* Fix pre-commit?

* PYI

* RSE

* S + ignores

* Whitespace fix

* Re-add build-init-files.py

* Add comment about security ignores

* Update mypy-exclusions.txt

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Fix the executable status of build-init-files.py

* Set executable bit for tools/run_block.py and readd shebang

* Fix new errors

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-11 08:36:08 -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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Kyle Altendorf
bc99c7a283 build(deps): bump mypy from 1.14.1 to 1.15.0 (#19319)
* build(deps): bump mypy from 1.14.1 to 1.15.0

Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.15.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* adjust accordingly

* remove another

* and windows

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-02-28 09:32:34 -08: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
Matt HauffandGitHub 6084112d48 [CHIA-1553] Replace pylint with ruff (#18759)
* Replace pylint with ruff

* poetry

* remove pylint

* Address comments by @altendky

* Undo formatting

* actually undo formatting
2024-10-25 15:55:37 -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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle Lowe
2ef2d4185d build(deps): bump aiohttp from 3.9.5 to 3.10.2 (#18440)
* build(deps): bump aiohttp from 3.9.5 to 3.10.2

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.5 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.5...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updates for new aiohttp

* Try increasing a timeout

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2024-09-13 11:00:22 -05: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
Matt HauffandGitHub 6a5d84d17d [CHIA-1024] Fix wallet observer mode log in while non-observer keys are present (#18361)
Fix wallet observer mode log in while non-observer keys are present
2024-07-29 13:17:47 -07:00
Matt HauffandGitHub a83f59bf2b Fix backwards compatibility for add_private_key (#18237)
* Fix backwards compatibility for `add_private_key`

* Another backwards compatibility fix
2024-06-24 15:26:46 -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
Kyle AltendorfandGitHub b5a58e4998 enable ssl_context deprecation warning and fix it (#17127)
* enable ssl_context deprecation warning and fix it

* one case

* a few more

* yup

* one more
2024-01-02 17:07:31 -08: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
Amine Khaldi a91f90b36b Merge commit '27ccd9a86dab07f665820e1ed2e6a6e76c059c72' into checkpoint/main_from_release_2.0.1_27ccd9a86dab07f665820e1ed2e6a6e76c059c72 2023-09-06 17:23:35 +01: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
JeffandGitHub c85baab9f6 Add get_public_key and get_public_keys daemon RPCs (#16156) 2023-08-28 10:18:38 -05:00