Commit Graph
376 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 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 8f11d892ff Use structured RPC errors 2026-02-11 13:40:56 -05:00
Amine Khaldi 301fa2c143 Merge commit '4e364606227ab2eead3d0fc7a0c8c8030715326c' into checkpoint/main_from_release_2.6.0_4e364606227ab2eead3d0fc7a0c8c8030715326c 2026-01-23 11:14:40 +01: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
Almog De PazandGitHub 27bfa214ad blocktools double sub epoch summary hash bug (#20399)
fix_double_sub_epoch_summary_hash_bug
2026-01-13 09:49:43 -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
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
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
Arvid NorbergandGitHub 09654aebd0 cache master SK to local SK and pool SK key derivations (#20347)
cache master SK to local SK and pool SK key derivations in BlockTools and plot manager cache. This speeds up some tests
2025-12-12 09:29:38 -08:00
Arvid NorbergandGitHub d8144a94e0 optimize block tools (speed-up: 15x) (#20301)
optimize block tools by generating the block generator (for transaction_data=) up-front, rather than every time we farm a block, until we get a transaction block
2025-12-03 10:28:27 -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
Arvid NorbergandGitHub 9242a5cf4d remove use of pool_reward_puzzle_hash in full_node_simulator (#20294) 2025-11-25 11:59:36 -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
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 5cc6b5d409 improve logging in block_tools, to ease debugging (#20252) 2025-11-14 16:29:29 -06: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
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
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 43c3c63145 [CHIA-3793] after the hard fork, disallow block references (#20218)
* after the hard fork, disallow block references

* disable hard-fork 2 tests until we have a new test cache

* fix rate limits test
2025-11-06 09:36:44 -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 810b9cfc52 fix BlockTools confusion between tx block and block with generators (#20212)
fix BlockTools confusion between transactions block and block with generator. Correctly pass in previous transaction block to PoS calculation
2025-10-31 08:55:50 -07:00
arvidn 0879516c61 minor optimization, skipping v1 plots after they are completely phased-out 2025-10-29 11:28:19 +01:00
Arvid NorbergandGitHub 742a81a79f filelock for test- plots and blocks (#20193)
* introduce file lock for creating the test-plots in tests. This avoids having every process in pytest-xdist create the same plots, clobbering each other

* add lockfile to the test fixtures that generate the test blockchains. These are quite expensive to generate, we don't want every pytest-xdist process to have to do it

* improve error message when the plot manager has an unexpected number of plots, in the simulator

* review comments: use FileLock instead of custom made
2025-10-24 15:54:59 -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
Arvid NorbergandGitHub 85e935ef29 BlockTools issue (#20185)
fix issue in BlockTools where transaction_generator was (incorrectly) used as a proxy for whether the block was a TX block or not. Also improve error messages for plot sizes as well as the minimum plot size for v2 plots on testnet (which also affects our simulations in CI)
2025-10-22 08:52:49 -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
Arvid NorbergandGitHub 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
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
Arvid NorbergandGitHub 74d5c45f55 [CHIA-3654] previous transaction block height in BlockTools (#19962)
previous transaction block height in BlockTools
2025-08-21 08:23:41 -07:00
Arvid NorbergandGitHub 8b49b0641f Block tools indentation (#19957)
improve indentation of get_pospaces_for_challenge()
2025-08-18 09:27:44 -07:00
Arvid NorbergandGitHub 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
Matt HauffandGitHub 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
Richard KissandGitHub 4e6038ba3b Simplify dependencies wrt chia.server (#19895)
Remove some dependencies in `chia.server`.
2025-08-06 12:03:47 -07:00
cac84b5e05 Simplify BlockStore (#19880)
* Simplify `BlockStore`

* Update chia/full_node/block_store.py

Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>

---------

Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>
2025-07-31 20:35:54 -05:00
Kyle AltendorfandGitHub 7a26610e8f less pre-inting for ints (#19853) 2025-07-23 13:18:04 -07:00
Richard KissandGitHub 7cee2b2b61 ruff issues (#19787) 2025-07-14 08:52:42 -05:00
Arvid NorbergandGitHub 3491f1aeae Plot v2 quality string (#19769)
* add shortcuts for bytes32 and G1Element to test_proof_of_space.py to make it a bit easier to read

* introduce calculate_plot_difficulty(), for incrementing plot difficulty over time. Tweak the placeholder cut-over block heights to make it possible to test

* update verify_and_get_quality_string() to support more aspects of v2 plots. update the v2 proof verification stub to take plot difficulty. add plot filter test cases for v2 plots

* move some tests from weight-proof to proof-of-space
2025-07-03 09:21:07 -07:00
a125e7b690 Create CoinStoreProtocol to remove a dependencies on chia.full_node from chia.consensus (#19741)
* `CoinStoreProtocol`

* Remove `.get_all_coins`

* Apply suggestions from code review

Uses `...` instead of values.

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

* Add `.is_empty` to protocol

* Improve test fixture stuff

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-30 16:05:40 -07:00
matt-o-howandGitHub 80d38200a3 Migrate away from clvm imports (#19730)
* migrate casts to wallet util

* reset mempool_check_conditions

* ruff to re-order imports

* reset full_node_rpc_api

* add tests for casts

* ruff and type

* move to util to avoid consensus depending on wallet

* ruff again

* add a deterministic seed for random
2025-06-26 10:18:04 -07:00
Arvid NorbergandGitHub 5d8b3c8ca7 bump chia_rs to 0.26.0 (#19746)
* bump chia_rs to 0.26.0

* review comments

* more review comments

* fix lockfile
2025-06-26 10:17:50 -07:00
Arvid NorbergandGitHub deb1d2e6cd [CHIA-2859] add ConsensusMode in tests to cover the new hard fork (#19716)
* add ConsensusMode in tests to cover the new hard fork

* correctly compute the block cost when the new condition cost rules take effect
2025-06-20 08:50:19 -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
Richard KissandGitHub 4f03890871 chia/full_node/signage_point.py -> chia/consensus/signage_point.py (#19706) 2025-06-12 11:14:27 -07:00