Commit Graph
108 Commits
Author SHA1 Message Date
Arvid NorbergandGitHub 426590feaf bump chia_rs and update uses of RewardChainBlock and SubEpochSummary (#20304) 2025-12-03 10:27:55 -08:00
Arvid NorbergandGitHub 8d4cbab782 make timelord/test_new_peak.py a bit more robust (#20271)
* make timelord/test_new_peak.py a bit more robust

* review comments
2025-11-21 13:27:57 -08:00
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
Richard KissandGitHub ec35492946 Api stubs (#19979)
* 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
2025-11-12 09:06:12 -07:00
Arvid NorbergandGitHub ece6de2af5 [CHIA-3795] change v1 plot phase-out (#20216)
* 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
2025-11-06 09:36:29 -07:00
dennyandGitHub d159689f27 fix typo for Timelord._check_for_new_sp comments, we get next 10 sp (#20160)
fix typo for Timelord._check_for_new_sp comments, currently we get next 10 sp
2025-10-17 11:09:37 -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
Richard KissandGitHub 4e6038ba3b Simplify dependencies wrt chia.server (#19895)
Remove some dependencies in `chia.server`.
2025-08-06 12:03:47 -07:00
Kyle AltendorfandGitHub 32ca9c0804 by service not layer (#19715)
* by service not layer

* monkey patch fixup
2025-06-16 14:31:51 -07:00
9289a05f12 New pos format (#19616)
* bump chia_rs

* update db_graftroot test

* refactor new pos format

* fix merge

* fix import

* fix missing param in test

* merge fixes/review fixes

* test prev_tx_block

* ermove double line

* # TODO: todo_v2_plots

* fix conftests monkeypatch

* fix spelling

* remove redundant merge code

* move prev_tx test

* add not impemented test to proof of space v2

* merge duplication fix

* fix typo, raise dont assert

* bump protocol, phase out test

* integer math

* add overflow case to test

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-06-10 11:27:17 -07:00
earlandGitHub 0464d69308 Also log the VDF field being compacted (#19663) 2025-06-07 19:55:15 -07:00
Almog De PazandGitHub a50f2c3c8e Bump chia rs >=0.25, <0.26 (#19685)
* bump_chia_rs

* update to use size()

* lint

* remove redundant imports
2025-06-05 15:07:08 -07:00
Richard KissandGitHub a803d18c3b The chia.protocols module no longer depends upon chia.server. (#19636)
<!-- 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) -->
2025-05-29 09:24:29 -07:00
c0410e97ec Bump chia rs >=0.24, <0.25 (#19615)
* bump chia_rs

* update db_graftroot test

* update SerializedProgram and Program use, to accommodate new chia_rs interface

* review comments

* review comments

---------

Co-authored-by: Matthew Howard <m.o.howard97@gmail.com>
2025-05-29 09:24:08 -07:00
Almog De PazandGitHub 434cb8136c dont skip same peak if in unfinished cache (#19626)
* dont skip same peak if in unfinished cache

* lint

* fix same block in test

* lint
2025-05-22 11:30:03 -05:00
Kyle AltendorfandGitHub 1911044e97 use chia_rs directly for more types (#19475)
* use chia_rs directly for more types

* more more

* undo submodule change...
2025-04-18 11:45:44 -05:00
Kyle AltendorfandGitHub bdcac366df use chia_rs directly for slots (#19468) 2025-04-04 07:35:06 -05:00
Almog De PazandGitHub 4dc7893bee fix tl node peak sync (#19389)
* fix tl node peak sync

* revert pytest change

* add weight check, rearrange cases

* comments, logs

* logs

* fix condition
2025-03-17 09:50:28 -07:00
Kyle AltendorfandGitHub c57dea6512 use chia_rs directly for reward chain block (#19336) 2025-03-04 09:04:38 -08:00
Kyle AltendorfandGitHub d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle LoweEarle LoweKyle Altendorf
d7e2358a32 build(deps): bump ruff from 0.8.5 to 0.9.6 (#19260)
* build(deps): bump ruff from 0.8.5 to 0.9.6

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.5 to 0.9.6.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.8.5...0.9.6)

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

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

* Update source to ruff 0.9.6

* Apply suggestions from code review

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

---------

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>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-02-27 09:53: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 30c4ef2689 use chia_rs directly for consensus constants (#19301) 2025-02-21 10:03:17 -08:00
Florin ChiricaandGitHub 59b263bf65 Deprecate n-weso. (#19253) 2025-02-11 11:08:59 -07:00
Arvid NorbergandGitHub 95c82997a3 name threads in ThreadPoolExecutor (#19250) 2025-02-11 06:27:01 -07:00
Almog De PazandGitHub 1819a9f5ac clean overflow blocks moved to unfinished block cache on reset chain (#19106)
* clean overflow blocks moved to unfinished on reset chain

* refactor

* fix typo
2025-01-13 09:16:41 -07:00
07480964ca Fix TL log spam. (#19032)
* Debug TL log spam.

* Update chia/timelord/timelord.py

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

* Add log.exception.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-01-07 09:15:47 -07: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
Kyle AltendorfandGitHub e7d12c7cb1 add root_path parameter to initialize_service_logging() (#18961) 2024-12-03 14:32:34 -07:00
Kyle AltendorfandGitHub d3b5fde3b2 flake8 implicit str concat (#18908)
* ISC001

* ISC002

* ISC003 (not)

* fewer comments

* indentation
2024-11-20 12:00:16 -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
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
Kyle AltendorfandGitHub 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
Kyle AltendorfandGitHub 79ba87c32d explicitly check ApiProtocol classes (#18785) 2024-10-30 09:28:05 -07:00
William Blanke 658d3562a9 fix bluebox 2024-10-16 18:12:37 -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
thesemaphoreslimandGitHub 1b4b8e8df5 Fixed logging for fast bluebox timelord and added Visual Studio (.vs)… (#18558)
* Fixed logging for fast bluebox timelord and added Visual Studio (.vs) to gitignore.

* Make black CI check happy

* Ran through another "black" reformat to pass CI
2024-09-15 13:59:32 -07:00
wjblankeandGitHub 7adde3d5b4 Fix BrokenProcessPool error for Windows installer blueboxing (#18546)
* switch to threads from multiprocessing since we drop the gil anyway

* lint
2024-09-05 05:52:51 +08:00
Gene HoffmanandGitHub bd022b0c9b Timelord logging: Updated peak to hex from bytestring (#18467)
* Timelord logging: Updated peak to hex from bytestring

* Use bytes.hex instead of unsupported .hex

* Use .hex the right way and remember Earle is almost always right
2024-08-15 09:08:10 -07:00
1c1e030e1e refactor new_peak_timelord (#16881)
* refactor new_peak_timelord

* fix test

* improve test assertions

* lint

* return after skipping peak

* improve comments

* limit condition to a diff of one block

* remove log

* refactor test

* better conditions
consider overflows as well

* pre commit

* test with overflow

* add test for EOS case

* lint

* comment

* prefer lower iterations peaks

* test full node receiving same weight lower iterations

* lint

* fix reorg test, lint

* fix block tools bug

* use signage point param in test

* use signage point param for overflows as well

* remove unused case

* fix block_tools condition

* lint

* lint

* Add check for peak not none in test

---------

Co-authored-by: Earle Lowe <e.lowe@chia.net>
2024-07-29 11:23:39 -07:00
Florin ChiricaandGitHub 9b5053b732 [CHIA-884] Fix timelord log spam. (#18267) 2024-07-05 09:49:29 -07: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
Kyle AltendorfandGitHub 73a7cb4687 CHIA-420 remove ignore for pkg_resources deprecation warning (#17933)
* remove ignore for `pkg_resources` deprecation warning

* replace pkg_resources usages

* fixup

* fixup

* fixup

* a couple

* imports

* cleanup

* maybe
2024-05-15 09:52:22 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Kyle Altendorf
db5f1e5dcc build(deps-dev): bump types-setuptools from 69.1.0.20240217 to 69.1.0.20240310 (#17692)
* build(deps-dev): bump types-setuptools

Bumps [types-setuptools](https://github.com/python/typeshed) from 69.1.0.20240217 to 69.1.0.20240310.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* handle no-package case in `find_vdf_client()`

* more

---------

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>
2024-03-19 09:13:37 -07:00
Arvid NorbergandGitHub fe89b5b782 undo some unnecessary int type casts (#17521)
* undo redundant type-casts from slots, SubEpochSummary and SubEpochData

* undo redundant type-casts from proof-of-space, reward chain and foliage types

* undo redundant type-casts from VDFInfo, VDFProof and ClassgroupElement

* remove unnecessary type annotation
2024-02-08 15:29:33 -08:00
Florin ChiricaandGitHub 221dab4f8a Improve timelord skip peak logic. (#17302) 2024-01-31 17:28:36 -08:00
Arvid NorbergandGitHub c6d5f7fa1e use rust types for slots, SubEpochSummary and SubEpochData (#17298)
* use rust types for slots, SubEpochSummary and SubEpochData

* use rust type for EndOfSubSlotBundle

* use rust types for SubEpochChallengeSegment, SubEpochSegments and SubSlotData
2024-01-16 11:04:49 -06:00
Arvid NorbergandGitHub 51808b4ef7 Rust proof-of-space, reward chain and foliage types (#17218)
* use rust type for ProofOfSpace

* use rust types for Foliage

* use rust types for reward chain blocks
2024-01-10 15:42:31 -06:00
Arvid NorbergandGitHub 92499b64a2 use rust types for VDFInfo, VDFProof and ClassgroupElement (#17102)
* use rust types for VDFInfo, VDFProof and ClassgroupElement. Since these types aren't dataclasses, the dataclass.replace() is changed to method replace()

* add test for recursive_replace()

* add comment in recursive_replace() hack
2024-01-04 10:54:21 -08:00
Kyle AltendorfandGitHub fab8b21332 asyncio.create_subprocess_shell() -> asyncio.create_subprocess_exec() (#16944) 2023-11-28 14:42:36 -06:00