Commit Graph
5861 Commits
Author SHA1 Message Date
Amine Khaldi 23ad9619e3 CHIA-3736 Avoid recomputing skipped transaction ID in create_bundle_from_mempool_items (#20055)
Avoid recomputing skipped transaction ID in create_bundle_from_mempool_items.
2025-09-11 08:54:51 -07:00
Arvid Norberg c1d15dfda3 Simplify rate limit numbers (#19991)
* remove unused default_settings in rate limits

* simplify rate_limit_numbers by flattening the structure. just map message type -> rate limits

* review comments
2025-09-11 08:54:17 -07:00
Amine Khaldi 698b2dd751 CHIA-3704 Optimize peak post processing by using transaction IDs instead of NewPeakItem elements (#19985)
Optimize peak post processing by using transaction IDs instead of NewPeakItem elements.
2025-09-11 08:53:31 -07:00
Matt Hauff 326b1084ce [CHIA-3729] Fix clvm streamable type analysis (#20031)
* Use fully recursive JSON logic for compound clvm streamable types

* Accomodate rust types

* Accomodate dicts

* Broaden function to handle type[object] instead of type[Streamable] (with a little mypy workaround)

* Whoops, delete that

* Small bug

* Okay a complete rework

* Delete some now unused stuff

* Some edge cases
2025-09-10 12:31:00 -07:00
Amine Khaldi 81a0a957d9 CHIA-3731 Cover peak post processing w.r.t. added transactions as a result of retrying potential transactions (#20044)
Cover with a test peak processing w.r.t. added transactions as a result of retrying PendingTXCache items.
2025-09-10 12:30:42 -07:00
Kyle Altendorf 0396922f57 difficulty -> strength (#20045) 2025-09-09 12:50:16 -07:00
Arvid Norberg d62a61da37 [CHIA-3701] Check plots v2 (#19982)
* support v2 plots in check-plots

* review comments
2025-09-09 09:06:02 -07:00
Kyle Altendorf b872728304 add another case to test_get_rate_limits_to_use() (#20004) 2025-09-09 09:05:26 -07:00
Kyle Altendorf 7e98baa814 Merge commit 'ebf8105fc12c351888069ba399be6cf998f680e0' into catchup/long_lived_datalayer_merkle_blob_from_main_ebf8105fc12c351888069ba399be6cf998f680e0 2025-09-05 15:06:31 -04:00
Amine Khaldi 9d1a7b9959 CHIA-3706 Cover new peak returning added transactions as a result of retrying potential transactions (#20002)
Add a test to cover new peak returning added transactions as a result of retrying potential transactions.
2025-09-05 11:05:01 -07:00
Arvid Norberg f17dedd5be bump chia_rs dependency (#20023) 2025-09-05 06:31:21 -07:00
Arvid NorbergandAmine Khaldi f2d92811a9 remove unnecessary NPCResult in mempool_manager (#20022)
* remove unnecessary NPCResult in mempool_manager

* review comment

* Update chia/full_node/mempool_manager.py

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

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-09-05 06:30:25 -07:00
Arvid Norberg 6df066fa0c fix incorrect assert in create_block_generator2() (#20015) 2025-09-04 08:08:11 -07:00
Amine Khaldi cd792f5468 CHIA-3708 Annotate test_rate_limits.py (#20005)
Annotate test_rate_limits.py.
2025-09-03 13:49:53 -07:00
Patrick Maslana a6cde00424 checkpoint: into main from release/2.5.6 @ ecb54a5874 (#20012)
Source hash: ecb54a5874
Remaining commits: 1

In addition to changes in the network protocol and its generated files,
between the original and this checkpoint, here are the introduced code
changes in order to get back to a working state:

```diff
diff --git a/chia/_tests/harvester/test_harvester_api.py b/chia/_tests/harvester/test_harvester_api.py
index 479adb69e1..5c9e6d59ba 100644
--- a/chia/_tests/harvester/test_harvester_api.py
+++ b/chia/_tests/harvester/test_harvester_api.py
@@ -51,7 +51,7 @@ async def harvester_environment(
 
 def signage_point_from_block(
     block: FullBlock, constants: ConsensusConstants
-) -> harvester_protocol.NewSignagePointHarvester:
+) -> harvester_protocol.NewSignagePointHarvester2:
     sp_index = block.reward_chain_block.signage_point_index
     challenge_hash = block.reward_chain_block.pos_ss_cc_challenge_hash
     sp_hash = (
@@ -59,7 +59,7 @@ def signage_point_from_block(
         if block.reward_chain_block.reward_chain_sp_vdf
         else challenge_hash
     )
-    return harvester_protocol.NewSignagePointHarvester(
+    return harvester_protocol.NewSignagePointHarvester2(
         challenge_hash=challenge_hash,
         difficulty=uint64(constants.DIFFICULTY_STARTING),
         sub_slot_iters=uint64(constants.SUB_SLOT_ITERS_STARTING),
@@ -75,7 +75,7 @@ def create_test_setup(
     harvester_environment: HarvesterTestEnvironment,
     default_400_blocks: list[FullBlock],
     blockchain_constants: ConsensusConstants,
-) -> tuple[HarvesterTestEnvironment, harvester_protocol.NewSignagePointHarvester, MagicMock]:
+) -> tuple[HarvesterTestEnvironment, harvester_protocol.NewSignagePointHarvester2, MagicMock]:
     env = harvester_environment
     block = default_400_blocks[2]
     new_challenge = signage_point_from_block(block, blockchain_constants)
@@ -128,7 +128,7 @@ async def test_new_signage_point_harvester_pool_difficulty(
         sub_slot_iters=uint64(67108864),
     )
 
-    new_challenge = harvester_protocol.NewSignagePointHarvester(
+    new_challenge = harvester_protocol.NewSignagePointHarvester2(
         challenge_hash=new_challenge.challenge_hash,
         difficulty=new_challenge.difficulty,
         sub_slot_iters=new_challenge.sub_slot_iters,
diff --git a/chia/harvester/harvester_api.py b/chia/harvester/harvester_api.py
index 0ff578c74a..54fc6e159f 100644
--- a/chia/harvester/harvester_api.py
+++ b/chia/harvester/harvester_api.py
@@ -53,7 +53,7 @@ class HarvesterAPI:
     def ready(self) -> bool:
         return True
 
-    def _plot_passes_filter(self, plot_info: PlotInfo, challenge: harvester_protocol.NewSignagePointHarvester) -> bool:
+    def _plot_passes_filter(self, plot_info: PlotInfo, challenge: harvester_protocol.NewSignagePointHarvester2) -> bool:
         filter_prefix_bits = calculate_prefix_bits(
             self.harvester.constants,
             challenge.peak_height,
```
2025-09-03 12:18:25 -07:00
Almog De Paz 37e5b1c367 [CHIA-3673] Start solver with farmer (#20017)
* remove redundant comment

* add solver to farmer group
2025-09-03 09:25:41 -07:00
Arvid Norberg 3519265e36 [CHIA-3717] improve logging of NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH (#20016)
improve logging of NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH
2025-09-03 09:25:28 -07:00
Arvid Norberg e4961d9ddf [CHIA-3654] [CHIA-3537] [CHIA-3673] stub chiapos2 API (#19969)
* stub chiapos2 API

* update block tools to support v2 plots when generating chains, as well as using the solve_proof() stub in the solver

* review comments
2025-09-03 09:24:44 -07:00
Arvid Norberg 29c25fb188 Rate limits cleanup (#19990)
* use monotonic clock in rate limiter

* rename minute -> slot in rate limiter, as the length is a parameter

* mock timer in rate limit test to make them deterministic

* remove unnecessary pytest class

* improve comment in rate_limit_numbers

* fix minor typos in rate_limits.py

* replace test_too_many_messages() with a parametrized test for (almost) all rate-limit cases

* review comments: give better names to test parameters

* review comments

* review comments

* review comments

* review comments
2025-09-02 12:13:04 -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
Arvid NorbergandAmine Khaldi 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
Patrick Maslana bec867e837 checkpoint: into main from release/2.5.5 @ 6821c48d88 (#19993)
Source hash: 6821c48d88
Remaining commits: 1
2025-08-27 14:45:42 -07:00
Patrick Maslana fb05d179bb [CHIA-3703] Add Enum support to streamable (#19983)
This PR adds support for `Enum`s to the streamable framework.

In order to support an `Enum` in your streamable class you must decorate
it with the `streamable_enum` decorator and specify a proxy streamable
object to use for serializing the enum's values. Once you've done this,
the object can be used in a streamble object.
2025-08-26 16:32:23 -07:00
Amine Khaldi 94b8bdf717 Merge commit '6821c48d881547d4c97da9b766b77b68631efa85' into checkpoint/main_from_release_2.5.5_6821c48d881547d4c97da9b766b77b68631efa85 2025-08-26 19:39:18 +01:00
Patrick Maslana 2708a7e280 checkpoint: into main from release/2.5.5 @ b1cc0a5b84 (#19955)
Source hash: b1cc0a5b84
Remaining commits: 1
2025-08-26 11:22:53 -07:00
Arvid Norberg 4d2d27192e [CHIA-3659] ignore unreasonably small v2 plots (#19984)
just like we ignore unreasonably small v1 plots, ignore unreasonably small v2 plots
2025-08-26 11:21:37 -07:00
Arvid Norberg fcc0415e39 [CHIA-3701] cleanup check_plots (#19981)
* use monotonic clock to time check_plots operations

* move exception block up to save a level of indentation

* fix call to validate_proof()
2025-08-26 11:20:54 -07:00
Matt 0f1d690246 Add a test for invalid enum value 2025-08-26 10:37:20 -07:00
Matt 4623d0d792 Comments by @altendky 2025-08-26 10:16:12 -07:00
Almog De PazandArvid Norberg 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
Matt f3e85301c2 stop converting 2025-08-21 15:30:28 -07:00
Matt f2cb6b138b use EnumMeta for python < 3.11 2025-08-21 15:15:28 -07:00
Matt 4b55b7f2d4 make sure to convert to enum on parse 2025-08-21 15:12:29 -07:00
Matt 9af0b7c97c Add Enum support to streamable 2025-08-21 15:03:35 -07:00
Arvid Norberg 74d5c45f55 [CHIA-3654] previous transaction block height in BlockTools (#19962)
previous transaction block height in BlockTools
2025-08-21 08:23:41 -07:00
Matt Hauff ecb514868f [CHIA-3601] Port spend_clawback_coins to @marshal (#19965)
* Port `spend_clawback_coins` to `@marshal`

* fix tests

* fix test again

* how do I keep missing these?
2025-08-20 12:33:03 -07:00
Matt Hauff 11696e4b50 [CHIA-3600] Port send_transaction to @marshal (#19960)
* Port `send_transaction`

* Have I mentioned this framework is suboptimal?

* Fix tests
2025-08-19 09:24:36 -07:00
Matt Hauff 8463909e8f [CHIA-3598] Port easy wallet endpoints to @marshal (#19941)
* Port `get_transaction_count`

* Port `get_next_address`

* Port `delete_unconfirmed_transactions`

* Port `get_current_derivation_index`

* Really disliking this framework FYI

* Port `extend_derivation_index`

* Fix the mock

* Port `delete_notifications`

* Fix the test check

* Store, not RPC

* Port `verify_signature`

* Port `sign_message_by_address`

* Fix tests

* Port `sign_message_by_id`

* fix tests

* fix test

* test coverage

* comments by @altendky
2025-08-18 09:28:21 -07:00
Arvid Norberg bcdc0c6f8b CHIA-3520 CHIA-3656 CHIA-3665 Calculate iterations v2 (#19956)
* add v2 support to calculate_iterations_quality() and update the corresponding test

* update  _expected_plot_size() for v2 plots

* address review comments
2025-08-18 09:27:58 -07:00
Arvid Norberg 8b49b0641f Block tools indentation (#19957)
improve indentation of get_pospaces_for_challenge()
2025-08-18 09:27:44 -07:00
Arvid Norberg 18fd65d13b pass along plot format version from ProverProtocol into ProofOfSpace (#19930)
pass along plot format version from ProverProtocol into ProofOfSpace objects
2025-08-14 12:31:07 -07:00
Kyle Altendorf 45d8ecd9d4 less needy debug info (#19954) 2025-08-14 12:30:52 -07:00
Amine Khaldi a3a3b01899 Merge commit 'b1cc0a5b84a9c517ad55da2ce87e5378dcdccb32' into checkpoint/main_from_release_2.5.5_b1cc0a5b84a9c517ad55da2ce87e5378dcdccb32 2025-08-13 19:48:09 +01:00
Arvid Norberg 12948b8376 fix validate_rpcs. Run RPC compute heavy jobs in a thread pool (#19922) 2025-08-13 09:24:31 -07:00
Arvid Norberg df45f393a2 odd v2 plot k-sizes are not valid (#19933) 2025-08-13 09:24:13 -07:00
Matt Hauff 71e1c7c452 [CHIA-3599] Port get_transaction_memo to @marshal (#19940)
* Port `get_transaction_memo` to `@marshal`

* comment requested by @altendky
2025-08-13 09:24:00 -07:00
Arvid Norberg 81c1025eeb Bump chia rs 0.29 (#19953)
### Purpose:

Bump the chia_rs dependency and adjust interactions according to changes
to its API. Specifically,
https://github.com/Chia-Network/chia_rs/pull/1213 .

`validate_clvm_and_signature()` takes flags instead of height.
`SpendConditions` has a `fingerprint` field.
2025-08-13 09:22:11 -07:00
Starttoaster ae2243e0a1 checkpoint: into main from release/2.5.5 @ 5200310a24 (#19925)
CHIA-3484 Handle items that spend an older ff version when newer lineage exists (#19865)

Handle items that spend an older ff version when newer lineage exists.
2025-08-13 09:21:10 -07:00
Matt Hauff 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
Matt HauffandKyle Altendorf 0a0293f81a [CHIA-3297] Port get_transaction(s) to @marshal (#19775)
* Port `get_transaction(s)`

* simplify class

* undo simplification

* Delete __eq__ and add test coverage

* Less dunder access

* small change

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-08-11 12:34:37 -07:00