Commit Graph
132 Commits
Author SHA1 Message Date
Jude Allred 9b40409e86 Narrow PR to only provide structured logs for full_node_rpc_api 2026-02-11 14:09:35 -05:00
Jude Allred 28ad73bb80 PR iterations -- Tidy structured error type.
-- rename structuredError.structuredMessage to message
-- remove the legacy 'message' field from structuredError.data, allow the top level 'error' string to preserve that for us.
-- remove the 'originalError' field from structuredError
-- rename structured_errors to rpc_errors
2026-02-11 13:41:00 -05:00
Jude Allred 8f11d892ff Use structured RPC errors 2026-02-11 13:40:56 -05: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
Patrick MaslanaandGitHub 8e0b04078d checkpoint: into main from release/2.5.7 @ 4c1e3a2204 (#20250)
Source hash: 4c1e3a2204
Remaining commits: 1
2025-11-14 10:29:08 -07: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
Amine Khaldi 5e2b353c4b Merge commit '4c1e3a220472575c79557fb5a72288378ea48c35' into checkpoint/main_from_release_2.5.7_4c1e3a220472575c79557fb5a72288378ea48c35 2025-11-12 15:25:06 +01:00
Arvid NorbergandGitHub 5664516dda Bump chia rs 0.34.0 (#20226)
bump chia_rs to 0.34.0
2025-11-10 17:02:10 -07:00
Almog De PazandGitHub 4c1e3a2204 dont add solver peer (#20234)
* dont add solver peer

* pass solver peer in tests
2025-11-07 17:55:15 -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
Arvid NorbergandGitHub 3da5434382 fix serialization of partial-proofs (#20188)
* fix serialization of partial-proofs (list[uint64]) to bytes, for use as key in dictionary

* improve tests for partial-proof serialization
2025-10-23 08:59:05 -07:00
Arvid NorbergandGitHub 794cce7826 PoS2-prover (#20159)
* bump chia_rs to 0.31.0

* integrate new pos2 API from chia_rs into V2Prover

* fixup test_harvester_api mocking of Prover

* review-comments: rename get_quality() to get_string() on Quality protocol

* reivew comments

* fixup bump chia_rs

* restore quality string to bytes32
2025-10-22 15:40:25 -07:00
Almog De PazandGitHub 6bd9360f5e Farmer solver networking (#20019)
* farmer connects to solver

* default solver peer

* configure solver peer

* solver trusted peers

* minor fixes

* connect to solver cli

* fix and rename fixture

* pr fixes

* load new service config if missing

* fix failling test

* fix test
2025-09-29 09:39:10 -07:00
Amine Khaldi a662d559e2 Merge commit 'ecb54a5874681326b9ba0d0f33e68c8d718c8639' into checkpoint/main_from_release_2.5.6_ecb54a5874681326b9ba0d0f33e68c8d718c8639 2025-08-29 20:46:54 +01:00
ecb54a5874 support previous harvester protocol (#19994)
* support previous harvester protocol

* Update chia/protocols/harvester_protocol.py

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-08-28 12:25:38 -07:00
52cd1086a7 [CHIA-3593] New solver service (#19938)
* add solver service

* lint

* wire service evrywhear

* prover protocol and v2Prover

* format name

* format

* refactor filename

* tests/raise unimplemented

* add get_filename_str to mock

* rename methods

* rename

* refactor

* improve coverage

* test from bytes

* harvester and farmer v2 support

* solver service, api, rpc

* clenup, add config to tests

* pre-commit

* remove mocks from test

* aync solver, fixtures, tests

* naming

* remove redundant farmer message

* solver fixtures and tests

* change quality_string to quality_chain

* fix service tests, cleanup

* name change, fix comments

* lint

* rename to partial proof

* network protocol test, use ThreadPoolExecutor

* naming and types

* check filter for both plot versions

* update network protocol tests

* more pr comments addressed

* fix rename

* fix network formatting error

* change to Assertion errors

* add todo

* remove strength from SolverInfo

* more pr comments, fix test to catch assertion

* revert strength

* test and comments

* rename to partial proof

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-08-22 15:26:09 -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 7a26610e8f less pre-inting for ints (#19853) 2025-07-23 13:18:04 -07:00
Jack NelsonandGitHub a10df3b619 CHIA-3396 Remove Exception Catching from node RPC (#19825)
* remove extra exception catching

* clean up node errors + tests

* forgot to pre-commit

* address using pytest wrong

* clean up error handling

* seperate out pytest tests
2025-07-21 09:16:00 -07:00
Arvid NorbergandGitHub 8a874623ec compute plot filter on the harvester (#19765)
compute plot filter on the harvester instead of passing it in the NewSignagePointHarvester protocol message. With v2 plots the plot filter will differ, so it depends on which plot we find a proof in
2025-06-26 11:16:06 -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
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
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
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
Kyle AltendorfandGitHub fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Kyle AltendorfandGitHub dd01af2c2b use chia_rs directly for pool target (#19332) 2025-03-03 09:34:02 -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
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 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
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 79ba87c32d explicitly check ApiProtocol classes (#18785) 2024-10-30 09:28:05 -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
Felix BruckerandGitHub a617ed5c86 Fix new pool url detection (#18521)
* Fix new pool url detection

* Make flake8 happy

* Make black happy
2024-09-13 11:00:41 -05: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
Amine Khaldi a7044370fb Merge commit 'c0a2db44dc3662c428b0ea93e102e285f15f620d' into checkpoint/main_from_release_2.4.3_c0a2db44dc3662c428b0ea93e102e285f15f620d 2024-07-31 18:15:45 +01:00
Izumi HoshinoandGitHub f6bfc9c867 Fixed missing partial count was incorrectly incremented on solo plotNFT farming (#18346)
* Fixed an issue where missing partial count was incorrectly incremented on solo plotNFT farming

* Updated test
2024-07-31 09:03:57 -07:00
earlandGitHub c0a2db44dc Send harvester version in pool partial header (#18167)
This commit adds just the 'chia-farmer-version' and
'chia-harvester-version' headers and is a reduced version of the
following original commits by Felix Brucker:

    commit 0e51984c06
    Date:   Fri Mar 29 15:59:48 2024 +0700

    Rename header prefix from `x-` to `chia-`

    commit 2bdc4de2f0
    Date:   Wed Mar 27 17:13:42 2024 +0700

    Add test and fix missing version on dummy harvester peer

    commit 15f3feae85
    Date:   Wed Dec 13 22:34:38 2023 +0530

    Add additional partial headers
2024-07-29 13:18:10 -07:00
Arvid NorbergandGitHub fdb87e656c drop deprecated authentication_public_key from pool config (#17959)
* introduce early exit to dedent for-loop

* remove deprecated authentication_public_key from pool-config
2024-05-04 08:22:24 -07:00
Arvid NorbergandGitHub 40a5be3f11 add ability to profile the farmer process (#17953) 2024-05-04 07:44:11 -07:00
Arvid NorbergandGitHub 47fddc54d6 introduce early continue/exit to reduce the indentation level (#17918) 2024-04-26 08:07:02 -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
Amine Khaldi a38d24ebcf Merge commit '320d8815911ca136807bb36493b567ce7e0deee1' into checkpoint/main_from_release_2.2.0_320d8815911ca136807bb36493b567ce7e0deee1 2024-03-01 19:32:13 +01:00
320d881591 Send RewardChainBlockUnfinished to third-party harvesters (#17435)
* Send RewardChainBlockUnfinished to the harvester

- Simplify data pasing in request_signed_values

* Fix instances where the rc_block_unfinished must be sent

* Lint, fix test, generate protocol messages

* Rate Limit Adjustment for RequestSignedValues (#17481)

* Further bump request_signed_values rate limit

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Luna <96448399+DaOneLuna@users.noreply.github.com>
2024-02-14 11:09:58 -08:00