Commit Graph
871 Commits
Author SHA1 Message Date
Jude Allred a75e591f7e Use RpcError.simple everywhere we can 2026-02-11 13:41:01 -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 abe4bb3b21 Add a missing structured error in a location introduced during rebase 2026-02-11 13:41:00 -05:00
Jude Allred 8f11d892ff Use structured RPC errors 2026-02-11 13:40:56 -05:00
Arvid NorbergandGitHub 507a2b858d update the fast FullBlock parser (#20458)
* update the fast FullBlock parser (that just skips fields) to support the new serialization of RewardChainBlock

* add test and shard the test, to enable it running in parallel

* disable expensive tests on MacOS Intel

* document some aspects of the full_blocks_utils test
2026-02-10 11:00:57 -08:00
Almog De PazandGitHub 4e36460622 get_flags, fix pre_sp_tx_block, test CHIA-3861 (#20400)
* get_flags, fix pre_sp_tx_block, test

* genesis case for get_flags

* block height for flags below fork
2026-01-15 09:37:48 -08:00
Amine KhaldiandGitHub de04bacd67 Cherry-pick CHIA-3866 Prioritize trusted peers in FullNodeAPI's send_transaction (#20407)
PR #20401.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Implements peer-aware transaction submission with prioritization and
proper back-pressure handling.
> 
> - Change `send_transaction` to `send_transaction(request, peer, *,
test=False)` with `peer_required=True` in API metadata
> - Prioritize trusted peers when enqueueing; include `peer_id` in queue
put; catch `TransactionQueueFull` and return `TransactionAck` with
FAILED and "Transaction queue full"
> - Update stubs and numerous tests/helpers to pass a `WSChiaConnection`
peer (e.g., use `add_dummy_connection[_wsc]`/`connect_and_get_peer`);
adjust helper signatures to accept `peer`
> - Add test to verify correct `TransactionAck` when a peer's
transaction queue is full
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ba926a6ae7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-01-15 09:37:18 -08:00
Amine KhaldiandGitHub 04b9d010b7 Cherry-pick CHIA-3856 Use an adapted version of deficit round robin algorithm in TransactionQueue's pop (#20396)
Use an adapted deficit round robin algorithm version in TransactionQueue's pop.
2026-01-13 09:50:18 -08:00
Amine KhaldiandGitHub 000e2a74d9 Cherry-pick CHIA-3867 Simplify TransactionQueue's put (#20392) (#20395)
CHIA-3867 Simplify TransactionQueue's put (#20392)

Simplify TransactionQueue's put.
2026-01-09 12:05:50 -08:00
Earle LoweandGitHub b6c777ec3b Add context handler features to MempoolManager (#20343)
* Add context handler features to MempoolManager

* No need to manually shut_down mempoolmanager

* Fix up issues with ordering in full node

* Fix dumb programmer issues

* Fix up some bugbot issues

* Move timing to inside context manager

* fix wrong indent
2025-12-15 09:48:34 -08:00
Arvid NorbergandGitHub aefefb416e bump WEIGHT_PROOF_RECENT_BLOCKS for tests (#20348)
* increase WEIGHT_PROOF_RECENT_BLOCKS in the test constants, to make it more robust

* improve error message when WEIGHT_PROOF_RECENT_BLOCKS is too small

* fix test_wallet_blockchain.py

* fix test_wallet_node.py

* fix test_wallet_sync.py
2025-12-15 09:47:08 -08:00
Amine KhaldiandGitHub 811ecc9b22 CHIA-3810 In TransactionQueue, prioritize peer queue transactions by fee per cost (#20282)
In TransactionQueue, prioritize peer queue transactions by fee per cost.
2025-12-05 09:43:14 -08:00
Amine KhaldiandGitHub 1e0bc4d153 CHIA-3844 Advertise requested mempool transactions instead of sending them (#20314)
Advertise requested mempool transactions instead of sending them.
2025-12-04 09:38:16 -08:00
Arvid NorbergandGitHub 426590feaf bump chia_rs and update uses of RewardChainBlock and SubEpochSummary (#20304) 2025-12-03 10:27:55 -08:00
Arvid NorbergandGitHub dcd296975d relax PoS validation in weight proofs (#20298)
* relax proof-of-space validation in weight proofs. make it height agnostic

* fix typo in block_tools logging. hoist calculations out of the block_tools PoS loop

* make the plot-filter schedule safe in proof-of-space validation as part of weight proofs

* review comments
2025-12-02 10:15:28 -08:00
8315f62ae6 Import check_time_locks() and CoinRecord (#19848)
* initial commit

* fix int to bool map

* another int bool map

* cast error to Err class

* cast to Err in a couple other places

* remaining couple

* ruff

* inline coinstore bool

* typing fixes

* import directly from rust and remove legacy file

* fix lingering ref to coinrecord

* another outdated import

* ruff

* typping fix

* minor simplifications

* Fix test

* fix import merge

* address comments

* undo coin_store change

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Matt <quexington@gmail.com>
2025-11-26 12:48:42 -08:00
Zachary BrownandGitHub 8b7d1d67b6 checkpoint: into main from release/2.5.7 @ 54bdf378c7 (#20286)
Source hash: 54bdf378c7
Remaining commits: 0
2025-11-24 15:36:04 -08:00
Amine KhaldiandGitHub cbd7a5c875 CHIA-3817 Make TransactionQueue's put synchronous (#20292)
Make TransactionQueue's put synchronous.
2025-11-24 15:11:34 -08:00
Amine Khaldi 328276ce80 Merge commit '54bdf378c7a2a60b45b8d8523dd7b10920f029b8' into checkpoint/main_from_release_2.5.7_54bdf378c7a2a60b45b8d8523dd7b10920f029b8 2025-11-21 11:39:07 +01: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
Amine KhaldiandGitHub c3d9dbcf28 CHIA-3802 Simplify tx_request_and_timeout and make it iterate over a dynamic list of peers with transactions (#20257)
Simplify tx_request_and_timeout and make it iterate over a dynamic list of peers with transactions.
2025-11-18 09:54:58 -08:00
Amine KhaldiandGitHub 8f5a7e0a0d CHIA-3799 It's not reasonable to advertise a new transaction with zero cost (#20231)
It's not reasonable to advertise a new transaction with zero cost.
2025-11-15 10:53:30 -08:00
Arvid NorbergandGitHub 38d2d9f2d0 make sure to pass in the correct previous transaction block height (#20237)
* make sure to pass in the correct previous transaction block height to get_flags_for_height_and_constants()

* review comments
2025-11-14 16:29:51 -06:00
Almog De PazandGitHub ab53414e2a fix tx block refrences in blocktools (#20239)
* fix tx block refrences in blocktools

* fix patch in test

* use pre_sp_block_height fix load_block_list

* rename

* fix params

* remove redundant param
2025-11-12 11:45:44 -07:00
Arvid NorbergandGitHub 54bdf378c7 introduce test_create_block_generator_custom_spend() (#20240)
introduce test_create_block_generator_custom_spend() test for the mempool_manager
2025-11-12 09:49:06 -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
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
Amine Khaldi b03caafc49 Merge commit '5522ab551f9a6c1c40352bbd32150d67dea48920' into checkpoint/main_from_release_2.5.7_5522ab551f9a6c1c40352bbd32150d67dea48920 2025-11-10 19:30:02 +01:00
Almog De PazandGitHub 54e915b723 prev_tx_before_sp (#20235)
* prev_tx_before_sp

* update wp to avoid crash

* fix genesis test

* comment

* comments, var names

* check to throw correct error
2025-11-10 11:14:04 -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
Almog De PazandGitHub 5522ab551f fix get_fee_estimate assertion (#20211)
fix get_fee_estimate
2025-10-30 16:04:23 -07:00
Amine Khaldi bae4615a57 Make sure the fee and cost specified in a NewTransaction match the ones from validating its spend bundle. 2025-10-29 11:47:25 +01:00
Amine KhaldiandGitHub a332befda6 CHIA-3788 Simplify tx_request_and_timeout by converting it from a closure into a FullNode class method (#20186)
Simplify tx_request_and_timeout by converting it from a closure into a FullNode class member.
2025-10-23 09:55:28 -07:00
Amine KhaldiandGitHub 480a060f24 CHIA-3779 Make sure the costs and fees match when a peer notifies us of a new transaction that we saw already (#20140) 2025-10-17 07:20:54 -07:00
Amine KhaldiandGitHub e129562e53 CHIA-2515 Simplify MempoolItem by constructing SpendBundle on demand from its components (#20123)
Simplify MempoolItem by constructing SpendBundle on demand from its components.
2025-10-06 18:30:13 -07:00
Amine KhaldiandGitHub 2b6ff08687 CHIA-3768 Optimize constructing removal names in new_peak's slow path (#20113)
Optimize constructing removal names in new_peak's slow path.
2025-09-29 09:39:47 -07:00
Amine KhaldiandGitHub f7b7c66d2b CHIA-3758 Avoid recomputing mempool removals' transaction IDs in FullNode's broadcast_removed_tx (#20097)
Avoid recomputing mempool removals' transaction IDs in FullNode's broadcast_removed_tx.
2025-09-24 09:21:36 -07:00
Amine KhaldiandGitHub eca97fa4c4 CHIA-3746 Simplify can_replace (#20086)
Simplify can_replace.
2025-09-22 10:28:20 -07:00
Amine KhaldiandGitHub cfeeae1f9c CHIA-3737 Simplify BundleCoinSpend's tracking of fast forward spends (#20069)
Simplify BundleCoinSpend's tracking of fast forward spends.
2025-09-19 07:11:38 -07:00
Arvid NorbergandGitHub 73cb54789b [CHIA-3712] simplify add_transaction() (#20063)
* simpliy add_transaction() and replace literals with the CONSENSUS_ERROR_BAN_SECONDS constant

* fix tests and review comments

* review comments
2025-09-16 10:15:37 -07:00
Almog De PazandGitHub dbd67001f7 fix sp lookup at genesis (#20057)
* fix genesis sp lookup

* fix test

* lint
2025-09-16 08:10:47 -07:00
Amine KhaldiandGitHub 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
Amine KhaldiandGitHub 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
Arvid NorbergandGitHub f17dedd5be bump chia_rs dependency (#20023) 2025-09-05 06:31:21 -07:00
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 NorbergandGitHub 6df066fa0c fix incorrect assert in create_block_generator2() (#20015) 2025-09-04 08:08:11 -07:00
Arvid NorbergandGitHub 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
Amine Khaldi 94b8bdf717 Merge commit '6821c48d881547d4c97da9b766b77b68631efa85' into checkpoint/main_from_release_2.5.5_6821c48d881547d4c97da9b766b77b68631efa85 2025-08-26 19:39:18 +01:00
Patrick MaslanaandGitHub 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
Kyle AltendorfandGitHub 45d8ecd9d4 less needy debug info (#19954) 2025-08-14 12:30:52 -07:00