Commit Graph
262 Commits
Author SHA1 Message Date
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
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 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
Arvid NorbergandGitHub b7723252df v2 plots only support pool contract puzzle hash (#20145) 2025-11-21 09:45:56 -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 6c8ccd246d don't allow, or harvest, v2 plots before hard fork activation (#20263) 2025-11-18 10:06:56 -08: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
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
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
arvidn 5492f82db7 remove remnants of the pos2 stubs 2025-10-28 15:01:00 +01:00
Matt HauffandGitHub 657b637544 [LABS-151] Replace NIL with Program.NIL (#20189)
Replace `NIL` with `Program.NIL`
2025-10-24 11:24:28 -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
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 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 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 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 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
Arvid NorbergandGitHub df45f393a2 odd v2 plot k-sizes are not valid (#19933) 2025-08-13 09:24:13 -07:00
33a02129b3 use per-puzzle cost to estimate DEDUP savings (#19811)
* use per-puzzle cost to estimate DEDUP savings, rather than rerunning puzzles

* restore SpendBundleAddInfo to have an optional cost. remove unused max_cost parameter from get_deduplication_info()

* restore call to make_test_conds() taking cost as int

* update test_dedup_by_fee() and fix big in make_bundle_spends_map_and_fee()

* review comments

* review comments

* Addendum to use per-puzzle cost to estimate DEDUP savings (#19816)

Addendum to use per-puzzle cost to estimate DEDUP savings.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-07-31 11:36:07 -07:00
Richard KissandGitHub ddc5a73d2d Update to ruff 0.12.4 (#19852)
Upgrade `ruff` to 0.12.4.
2025-07-21 08:52:39 -07:00
matt-o-howandGitHub 9f8ba79ac8 Use chia_rs in API instead of clvm (#19803)
* initial commit

* fix precommit errors

* test passing

* ruff

* remove SpendInfo and mempool_check_conditions

* no need to call it _rust now

* fix mempool test

* fix precommit errors

* fix test generator tools

* add comment about impending chia_rs fix
2025-07-15 08:34:45 -07: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
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
6050235bdb [CHIA-3043] Add (hopefully) non-controversial ruff rules (#19684)
* Add (hopefully) non-controversial ruff rules

* mypy-exclusions.txt

* PIE

* Fix pre-commit?

* PYI

* RSE

* S + ignores

* Whitespace fix

* Re-add build-init-files.py

* Add comment about security ignores

* Update mypy-exclusions.txt

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

* Fix the executable status of build-init-files.py

* Set executable bit for tools/run_block.py and readd shebang

* Fix new errors

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-11 08:36:08 -07:00
9289a05f12 New pos format (#19616)
* bump chia_rs

* update db_graftroot test

* refactor new pos format

* fix merge

* fix import

* fix missing param in test

* merge fixes/review fixes

* test prev_tx_block

* ermove double line

* # TODO: todo_v2_plots

* fix conftests monkeypatch

* fix spelling

* remove redundant merge code

* move prev_tx test

* add not impemented test to proof of space v2

* merge duplication fix

* fix typo, raise dont assert

* bump protocol, phase out test

* integer math

* add overflow case to test

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-06-10 11:27:17 -07:00
Almog De PazandGitHub a50f2c3c8e Bump chia rs >=0.25, <0.26 (#19685)
* bump_chia_rs

* update to use size()

* lint

* remove redundant imports
2025-06-05 15:07:08 -07:00
c0410e97ec Bump chia rs >=0.24, <0.25 (#19615)
* bump chia_rs

* update db_graftroot test

* update SerializedProgram and Program use, to accommodate new chia_rs interface

* review comments

* review comments

---------

Co-authored-by: Matthew Howard <m.o.howard97@gmail.com>
2025-05-29 09:24:08 -07:00
Richard KissandGitHub c800e06ac4 Remove the dependency of chia.consensus on the module chia.types (#19590)
* Move `chia/types/spend_bundle.py` to wallet.

* Move `compute_additions` functions into wallet.

* Move `chia/types/eligible_coin_spends.py` to `chia/full_node`.
2025-05-09 13:56:01 -05:00
Kyle AltendorfandGitHub 4a65e3a6b0 move tx processing queue entry classes (#19536) 2025-04-25 13:15:18 -05:00
Kyle AltendorfandGitHub a90f04ff48 move chia.types.aliases to chia.server.aliases (#19535)
* move `chia.types.aliases` to `chia.server.aliases`

* touchup
2025-04-25 13:15:04 -05:00
Amine KhaldiandGitHub 6824b11ba0 CHIA-2743 Synchronous block generator creation (#19505)
Synchronous block generator creation.
2025-04-24 10:24:42 -05:00
Kyle AltendorfandGitHub fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Kyle AltendorfandGitHub 1911044e97 use chia_rs directly for more types (#19475)
* use chia_rs directly for more types

* more more

* undo submodule change...
2025-04-18 11:45:44 -05:00
Kyle AltendorfandGitHub 39c4c5fefc chia rs 0 22 0 (#19508)
* update chia_rs to 0.22.0

* remove use of `.SOFT_FORK6_HEIGHT`

* remove use of `ENABLE_KECCAK`

* remove `"SOFT_FORK6_HEIGHT"` literals

* delete more
2025-04-17 09:17:17 -05:00
Amine KhaldiandGitHub db51f43a94 CHIA-2734 Build a new bundle coin spends map as we process fast forward spends (#19498)
Build a new bundle coin spends map as we process fast forward spends instead of updating a copy of the original.
2025-04-15 10:16:43 -05:00
timesinceandGitHub 09f48746de chore: fix some comments (#19493)
Signed-off-by: timesince <seekseat@icloud.com>
2025-04-11 09:23:21 -07:00
Amine KhaldiandGitHub d4aacea796 CHIA-2604 Separate identical spend deduplication and singleton fast forward into their own classes (#19439)
Separate identical spend deduplication and singleton fast forward into their own classes.
2025-04-10 06:22:03 -07:00
RigidityandGitHub 3118c1802e CHIA-2685: Enable keccak softfork in the wallet (#19481)
Enable keccak softfork in the wallet
2025-04-09 11:22:09 -07:00
Kyle AltendorfandGitHub 46aa20a1ce use chia_rs directly for spend bundle conditions (#19470) 2025-04-07 10:25:05 -07:00
Kyle AltendorfandGitHub bdcac366df use chia_rs directly for slots (#19468) 2025-04-04 07:35:06 -05:00
Arvid NorbergandGitHub 7aa76bc116 [CHIA-2540] Compute block cost (#19397)
* predict exact block cost, instead of re-running the generator

* fixup workflow for test-bundles

* fixup

* review comments
2025-04-02 09:37:45 -05:00
Amine KhaldiandGitHub e91335eff4 CHIA-2570 Adapt to requiring the same amount across singleton fast forward versions (#19398)
Adapt to requiring the same amount across singleton fast forward versions.
2025-03-19 19:30:45 -07:00
Arvid NorbergandGitHub 9147629b78 NewBlockGenerator as an extension of BlockGenerator (#19390) 2025-03-19 11:37:16 -07:00
Arvid NorbergandGitHub 6358bab4c3 [CHIA-2383] improve FF mempool eviction (#19355)
* evict FF spends from the mempool if they become invalid with a new peak

* optimize fast-forward rebase in mempool new_peak()

* clean up tests, also test reversing spent coins in new_peak()

* extend mempool invariant check in tests

* fix typo in comment
2025-03-07 17:44:40 -06:00