Commit Graph
545 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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle Lowe
452cbf890d build(deps): bump ruff from 0.14.6 to 0.14.13 (#20439)
* build(deps): bump ruff from 0.14.6 to 0.14.13

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.6 to 0.14.13.
- [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.14.6...0.14.13)

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

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

* ruff fixes

---------

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>
2026-02-10 11:01:17 -08:00
Gene HoffmanandGitHub f5b33f4c59 Speed up full node tests on macOS Intel: skip slow long-reorg cases (#20456) 2026-02-02 09:44:35 -08:00
Amine Khaldi 301fa2c143 Merge commit '4e364606227ab2eead3d0fc7a0c8c8030715326c' into checkpoint/main_from_release_2.6.0_4e364606227ab2eead3d0fc7a0c8c8030715326c 2026-01-23 11:14:40 +01:00
Matt HauffandGitHub 4ace81ae17 [LABS-294] Add kw_only to all wallet RPC types (#20324)
Add `kw_only` to all wallet RPC types
2026-01-21 09:48:44 -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 20f86e15d1 CHIA-3866 Prioritize trusted peers in FullNodeAPI's send_transaction (#20401)
Prioritize trusted peers in FullNodeAPI's send_transaction.
2026-01-14 13:43:45 -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 9491c6ee32 CHIA-3856 Use an adapted version of deficit round robin algorithm in TransactionQueue's pop (#20351)
Use an adapted deficit round robin algorithm version in TransactionQueue's pop.
2026-01-12 09:07:14 -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
Amine KhaldiandGitHub 428e26cf5b Explore bringing back v2 plot pool keys support (#20388)
Explore bringing back v2 plot pool keys support.
2026-01-08 09:17:56 -08:00
Amine KhaldiandGitHub 338a13ae3d CHIA-3867 Simplify TransactionQueue's put (#20392)
Simplify TransactionQueue's put.
2026-01-08 09:17:19 -08:00
Earle LoweandGitHub c9487b3aba Add test for code in FullNode that checks DB (#20346)
* Add test for code in FullNode that checks DB

* ok to not cover pass line

* delete all the rows instead of dropping the table
2025-12-15 10:16:36 -08:00
Earle LoweandGitHub 05094c27c9 context manager for BlockTools (#20326)
* context manager for BlockTools

* Missed one usage and fixed up Self import

* Ignore cleanup errors in tempdir cleanup for BlockTools

* Remove debug prints

* Fixed up sync blocktools and use @contextmanager

* Address review comments

* Add return type

* Empty commit for github

* Strange github things

* adjust order of finding ports
2025-12-15 09:49:12 -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
Earle LoweandGitHub 3461286e8d Eliminate rate limits and bans for exempt peer networks (#20345)
* Eliminate rate limits and bans for exempt peer networks

* Add some tests for banning when closing connections

* make sure to pass in parameter to constructor
2025-12-15 09:46:40 -08:00
Arvid NorbergandGitHub 64b2c8d034 update expected_plot_size() to match the latest proof of space format (#20350) 2025-12-15 09:45:49 -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
Amine KhaldiandGitHub 70514c0844 CHIA-3843 Wait for nodes to sync in test_ban_for_mismatched_tx_cost_fee (#20312)
Wait for nodes to sync in test_ban_for_mismatched_tx_cost_fee.
2025-12-03 09:59:52 -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
Arvid NorbergandGitHub b8c0e7712a fix plot filter for v2 plots (#20293) 2025-11-25 11:59:13 -08:00
Arvid NorbergandGitHub 7b3a773683 Test conditions pool reward (#20288)
* make test_conditions.py use the farmer reward, and not the pool reward, for its tests. This prepares this test to work with v2 plots, since they don't support redirecting the pool reward

* fix get_plot_id() for v2 proofs

* fix proof-of-space tests
2025-11-25 11:57:52 -08:00
Matt HauffandGitHub e36c25fe29 Fix flaky data layer test (#20295)
Add a wallet sync check
2025-11-25 11:38:11 -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
Arvid NorbergandGitHub b7723252df v2 plots only support pool contract puzzle hash (#20145) 2025-11-21 09:45:56 -08:00
Arvid NorbergandGitHub 70b182e9c7 [CHIA-3805] reduce use of pool_reward_puzzle_hash feature of BlockTools (#20277)
* reduce use of pool_reward_puzzle_hash feature of BlockTools, since it's not supported by v2 plots

* the BlockTools feature to ask for a specific pool puzzle hash are not supported by v2 proofs. v2 plots only have pool contract puzzle hash
2025-11-21 09:44:53 -08:00
Arvid NorbergandGitHub 8beb3ee8d8 Tweak phase out (#20258)
* hoist calculations out of the loop over all test plots

* tweak phase-out to allow zero-epoch phase-outs, for tests

* review comments

* fix off-by-one in is_v1_phased_out

* review comments
2025-11-21 09:41:48 -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
Arvid NorbergandGitHub 6c8ccd246d don't allow, or harvest, v2 plots before hard fork activation (#20263) 2025-11-18 10:06:56 -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
Matt HauffandGitHub 772f152da2 Add a wait_for_wallet_synced to some flaky tests (#20229)
* Add a `wait_for_wallet_synced` to a flaky test

* Another reported test
2025-11-10 17:01:23 -07: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
rocksloadandGitHub 8c50242410 chore: fix some typos in comments (#20197)
Signed-off-by: rocksload <rocksload@outlook.com>
2025-11-03 09:17:42 -07:00
Matt HauffandGitHub 1202e933a6 [LABS-293] Ensure wallet is synced for RPC TX endpoints (#20190)
* Ensure wallet is synced for RPC tx endpoints

* Address flakes

* more flakes

* More flakes in DL tests
2025-11-03 09:17:06 -07: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
Matt HauffandGitHub 284310d637 [CHIA-3607] Port get_offer_summary to @marshal (#20058)
* Port `get_offer_summary` to `@marshal`

* test coverage
2025-10-31 08:55:36 -07:00