Commit Graph
865 Commits
Author SHA1 Message Date
Jude Allred 274c5a8ae4 Tidy rpc_errors.py and remove the (as-yet) unused error codes 2026-02-11 14:22:35 -05:00
Jude Allred 5ad6fbb39a Condense tests 2026-02-11 14:10:30 -05:00
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 c69cb281c4 Test coverage touchups 2026-02-11 13:41:02 -05:00
Jude Allred 05d8276921 Dead code elimination 2026-02-11 13:41:01 -05:00
Jude Allred e128765425 Add code coverage for all RPC errors 2026-02-11 13:41:01 -05:00
Jude Allred 85fc7e329a Add tests entirely for the purpose of increasing code coverage 2026-02-11 13:41:01 -05:00
Jude Allred 8dae5eb20f Update a test funnction name 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 4db6e4e954 Test repair 2026-02-11 13:41:00 -05:00
Jude Allred b196d4f2ab Handle an empty error message edge case 2026-02-11 13:41:00 -05:00
Jude Allred 8f11d892ff Use structured RPC errors 2026-02-11 13:40:56 -05:00
aa770ba5af [LABS-361] MIPS Python Drivers (#18686)
* Initial draft of custody architecture

* Rename CustodyType -> Puzzle

* Rename UnknownCustody -> UnknownPuzzle

* Rename CustodyHint -> PuzzleHint

* Rename CustodyWithRestrictions -> PuzzleWithRestrictions

* Reorganize for clarity

* Add support for identifying and filling in unknown puzzles

* rename custody -> puzzle

* MofN puzzles

* Restriction layer

* Fix PlaceholderPuzzle with MofN restriction

* Add indexing

* Elaborate on potential optimizations

* Light comment improvements

* Add spec namespace

* 3.10 compatibility I think?

* pylint I hate you

* pylint I really hate you

* Add an optimized puzzle for 1ofN

* Coverage ignores

* Add optimization for NofN

* Add support for `PuzzleWithRestrictions` with no MofN

* comments

* Fix members with restrictions inside of MofNs

* pylint

* Rework restrictions

* Use feeder pattern for MofNs as well

* f you pylint

* initial commit

* start work on tests

* fix all but signature in test

* fix test

* black, isort, flake8

* migrate changes to new files / folders

* mypy fixes

* remove unused imports

* add bls_member to deployed_puzzle_hashes

* no memo for BLS Member

* change comments on BLSMember

* chialispp bls_member

* update test comment

* black again

* pylint disable

* add a more minimal test for blsmember

* fix quex comments

* flake8

* Add basic framework for delegated puzzle validators

* code coverage for memo()

* don't reuse variable of different type

* coverage

* pre-commit

* pre-commit

* Fix spend sim import

* Add passkey member puzzle

* Dedup a bit

* Add `Timelock` restriction

* Rename variable

* Add coin announcement restriction

* initial commit

* Add comments per @matt-o-how

* typo

* correct formatting for using secp_verify

* secp256r1 fix

* pretty print lisp

* add to deployed puzzle hashes

* ruff formatted

* Add a restriction to mimic existing vault recovery

* Add a helper method

* initial commit

* fix test

* fix_test_2

* ruff format

* add secp256k1_member to deployed puzzle hashes

* pretty print lisp

* ruff check fix.

* curve_order fix

* ruff format

* Add memo-ization to the restriction

* add assertion for secpr1_member memo in test_secp256r1_member

* add assertion for secpk1_member memo in test_secp256k1_member

* add secpmember solve method

* - specify type for secp_sk in member puzzles

* add SECPK1 and SECPR1 "puzzle assert" members with corresponding tests

* Fix bug and add test coverage to dpuz wrapper enforcement puzzle

* Fix bug and add test coverage to timelock puzzle

* pre-commit

* initial commit

* Add dataclass for SingletonMember in member_puzzles.py

* fix message coin_ids

* rename eve to launcher

* add minimal message condition test

* change message mode to 3F

* use correct message format

* fix test

* cleanup

* fix formatting in singleton_member.clsp

* Add files for test chialisp

* Add a wrapper that forces a message condition with a coin ID commitment

* Add a version of a passkey puzzle that only asserts puzzle hash

* add comments, remove unused code, add customisable singleton info

* initial commit

* fix typo and pprint chialisp

* chialisp pretty print

* Add comment about message

* add bls_with_taproot puzzle and member class

* mypy fixes

* more mypy fixes

* remove breakpoint

* correct name in deployed_puzzle_hashes

* remove mod from name

* only allowed delegated_puzzle as taproot_path

* add test that checks bad taproot is blocked

* ruff fix

* make BLSWithTaproot Member flexible

* address nitpicks

* mypy fixes

* Remove member and restriction implementations

* Import from chia_puzzles_py (and fix tests)

* Remove executable bibt?

* Re-add some of the member and restrictions

* Some kw_only

* More kw_only

* Reviews by @matt-o-how and cursor

* Comments by cursor

* Remove `Force1of2WithRestrictedVariable`

* Bring in some downstream stuff

* Make a heightlock instead of timelock restriction

* comments by cursor

* Test coverage

* Better condition_codes.clib-ing

* comments by @matt-o-how

---------

Co-authored-by: Matthew Howard <m.o.howard97@gmail.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
2026-02-11 10:29:11 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle Lowe
0a818825bc build(deps): bump mypy from 1.18.2 to 1.19.1 (#20363)
* build(deps): bump mypy from 1.18.2 to 1.19.1

Bumps [mypy](https://github.com/python/mypy) from 1.18.2 to 1.19.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.18.2...v1.19.1)

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

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

* mypy 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:32 -08: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
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
Amine Khaldi b175bdf4ee Merge commit '8f8d27aca479cb1456899acf7a4127aa06d4763f' into checkpoint/main_from_release_2.6.0_8f8d27aca479cb1456899acf7a4127aa06d4763f 2026-02-09 11:50:50 +01:00
Arvid NorbergandGitHub 062f6257e1 Blockchain does not have run_generator() (#20433)
Blockchain does not have run_generator(). In this test, these calls are never made, but just here in case something changes
2026-02-05 08:32:36 -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
Arvid NorbergandGitHub 8f8d27aca4 push out testnet11 soft fork activation height by 8 days (40000 blocks) (#20445) 2026-01-28 09:52:56 -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
Matt HauffandGitHub 979cfd1a54 [LABS-307] Extract manual syncing logic out of wallet RPC (#20318)
* Extract manual syncing logic out of wallet RPC

* Fix test

* Inicidental indentation?
2026-01-16 11:17:26 -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 Khaldi e6017089cd Merge commit 'b7b3638fcc281a82296c1ae1df82e7765bd93384' into checkpoint/main_from_release_2.5.8_b7b3638fcc281a82296c1ae1df82e7765bd93384 2026-01-15 16:05:31 +01: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
Matt HauffandGitHub 5ed0eeff54 [LABS-302] Forward send_transaction and cat_spend to create_signed_transaction (#20321)
* Pipe `send_transaction` thru `create_signed_transaction`

* Pipe `cat_spend` thru `create_signed_transaction`

* Add back the wallet checks
2026-01-13 14:31:21 -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
Arvid NorbergandGitHub b7b3638fcc bump chia_rs to 0.35.1 (#20393) 2026-01-09 12:07:51 -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
Almog De PazandGitHub 6b8202cd6a Augmented usage fix (#20361)
* pass augmented into test_utils

* add invariant

* remove redundant check

* check prev is in underlying

* fix check for genesis

* use try_block_recoed

* tests

* use assertion error
2026-01-05 09:36:21 -08:00
Matt HauffandGitHub 6a1b2314f8 [LABS-387] Revert accidental RPC parameter name change (#20362)
Revert accidental RPC parameter name change
2025-12-29 10:40:24 -08:00
Earle LoweandGitHub 5727efb904 Fixes to test_long_sync_untrusted_break (#20327)
* Fixes to test_long_sync_untrusted_break

* Address bugbot comments re ip address string

* Remove commented out debug code

* Apply suggestions from bugbot
2025-12-18 08:48:08 -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
Earle LoweandGitHub 6f5c201fc8 Convert to use rpcclient context to ensure proper teardown cleanup (#20329) 2025-12-15 09:45:26 -08:00
Arvid NorbergandGitHub 4aab40fe05 move test_constants_modified (#20342)
move test_constants_modified from test_simulation.py into conftest.py to avoid circular dependencies. conftest defines the test chains, which are built using the test constants. test_simulation.py uses the test chains
2025-12-10 19:07:29 -08:00
Matt HauffandGitHub 88e9f78bea [LABS-291] Port get_farmed_amount to @marshal (#20187)
Port `get_farmed_amount` to `@marshal`
2025-12-10 09:57:27 -08:00
Matt HauffandGitHub a745d88961 [LABS-249] Port crcat_approve_pending to @marshal (#20116)
* Port `crcat_approve_pending` to `@marshal`

* Forgot `push=True`
2025-12-09 13:15:55 -08:00
Matt HauffandGitHub 47ed91c8ec [LABS-305] Extract signing functionality from wallet RPC to its own library (#20317)
* Extract `verify_signature`

* Extract `sign_message_by_address`

* Extract (most of) `sign_message_by_id`
2025-12-09 11:28:09 -08:00
Matt HauffandGitHub a05a0c57d2 [CHIA-3707] Port create_new_wallet to @marshal (#20087)
* Add the request types

* Add the request types

* some test fixes

* Add the client ports

* Fix tests

* Add cmd support and fix a test

* Missed a couple

* Add test for `CreateNewWallet.__post_init__()`
2025-12-08 09:31:51 -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