Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid Norberg 9ab42fb4d2 update constant testnet overrides for timelord (#19783) 2025-07-07 09:14:25 -07:00
Arvid Norberg 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
Arvid Norberg 0864c34d5b [CHIA-3205] unify test constants on the ones used by BlockTools (#19768)
unify test constants on the ones used by BlockTools
2025-07-02 14:19:04 -07:00
Richard KissandKyle Altendorf 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
Kyle Altendorf 47d5ce851e nft wallet job timeout reduced to 25 minutes (#19694)
https://github.com/Chia-Network/chia-blockchain/actions/runs/15542276957/usage
2025-06-27 13:54:21 -07:00
Matt Hauff f782fa8341 [CHIA-1315] Port (wallet) DataLayer endpoints to @marshal (#19689)
* Port `create_new_dl`

* Forgot default_raise

* Port `dl_track_new`

* Port `dl_stop_tracking`

* Port `dl_latest_singleton`

* Port `dl_singletons_by_root`

* fix test

* Port `dl_update_root`

* Port `dl_update_multiple`

* fix tests

* Port `dl_history`

* Port `dl_owned_singletons`

* Port `dl_get_mirrors`

* Make `Mirror` streamable (and fix test)

* Port `dl_new_mirror`

* push=True

* Port `dl_delete_mirror`

* Port `dl_verify_proof`

* Fix test

* fix import
2025-06-27 11:29:24 -07:00
Arvid Norberg 9d8c170b1a Fix plot size override (#19771)
* fix testnet11 plot size override as the constant has changed name

* correct overrides when starting the harvester as well

* update
2025-06-27 11:29:07 -07:00
Amine Khaldi 777884f3b7 CHIA-3250 Unify fork peak and reward coins handling between ForkInfo's include_spends and include_block (#19766)
Unify fork peak and reward coins handling between ForkInfo's include_spends and include_block.
2025-06-26 23:33:05 -07:00
Amine Khaldi 91e4c16d25 CHIA-3207 Pass coin IDs from Blockchain's _reconsider_peak to CoinStore's new_block to avoid recomputing them (#19749)
Pass coin IDs from Blockchain's _reconsider_peak to CoinStore's new_block to avoid recomputing them.
2025-06-26 16:29:25 -07:00
Arvid Norberg 8a874623ec compute plot filter on the harvester (#19765)
compute plot filter on the harvester instead of passing it in the NewSignagePointHarvester protocol message. With v2 plots the plot filter will differ, so it depends on which plot we find a proof in
2025-06-26 11:16:06 -07:00
Arvid Norberg 224fb82383 require block generators to use canonical CLVM serialization after 3.0-hard fork (#19714) 2025-06-26 10:18:37 -07:00
matt-o-how 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 Norberg 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
Amine Khaldi 257ba70f89 CHIA-3217 Simplify SpendSim's farm_block (#19760)
Simplify SpendSim's farm_block.
2025-06-26 10:17:12 -07:00
Kyle Altendorf 565c06fafd more more memoryview (#19763) 2025-06-26 10:16:40 -07:00
Kyle Altendorf 25e240f456 log the route when an RPC API server handler fails (#19718) 2025-06-25 10:47:28 -07:00
Matt HauffandAmine Khaldi 60e4f85515 [CHIA-1314] Port pooling RPC endpoints to @marshal decorator (#19683)
* Port `pw_join_pool`

* fix tests

* fix moar tests

* Port `pw_self_pool`

* Fix test

* Port `pw_absorb_rewards`

* Port `pw_status`

* Simplifications.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-06-25 09:47:03 -07:00
Kyle Altendorf 6e7fcf38d7 drop universal mypy ignore missing imports (#19750)
* drop universal mypy ignore missing imports

* delete nor comment out

* ignore our use of the private `_overlapped`

* type...

* on same line. go me
2025-06-25 09:46:40 -07:00
Kyle Altendorf f5fe748c19 less response failure error consumption (#19282) 2025-06-24 11:04:56 -07:00
Matt HauffandKyle Altendorf 760a65fd0b [CHIA-1313] Port NFT RPCs to @marshal decorator (#19617)
* Port `nft_mint_nft`

* Fix tests

* More test fixes

* Port `nft_count_nfts`

* Port `nft_list_nfts`

* Fix tests

* Port `nft_set_nft_did`

* Fix tests

* Port `nft_set_did_bulk`

* Port `nft_transfer_bulk`

* Port `nft_get_by_did`

* Port `nft_get_wallet_did`

* fix tests

* Fix one more test

* Okay actually fix the test

* Port `nft_get_wallets_with_dids`

* Port `nft_set_nft_status`

* Port `nft_transfer_nft`

* Use kwargs

* Forgot default raise

* Port `nft_get_info`

* Port `nft_add_uri`

* d

* Port `nft_calculate_royalties`

* Fix tests

* Port `nft_mint_bulk`

* Add test coverage for cmd line offering CAT by asset ID

* Add test coverage for a more complex offer take

* Add test coverage for `NFTCalculateRoyalties.__post_init__()

* test coverage generally

* Actually dont commit puzzle hashes when push=False

* Inadvertent test breakage

* Fix tests

* Fix tests

* Fix test

* Fix hopefully one more test

* Comments by @altendky

* small improvement @altendky

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

* small improvement @altendky

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-24 11:04:37 -07:00
Kyle Altendorf 668548cd33 Merge commit 'da20e4145fb6279d6880fd998b62456237e2f700' into catchup/long_lived_datalayer_merkle_blob_from_main_da20e4145fb6279d6880fd998b62456237e2f700 2025-06-23 22:03:50 -04:00
Amine Khaldi 83a85b8942 CHIA-3173 Leverage CoinStore's new_block in SpendSim's farm_block instead of custom coin store manipulation (#19729)
Leverage CoinStore's new_block in SpendSim's farm_block instead of custom coin store manipulation.
2025-06-23 09:11:01 -07:00
Amine Khaldi 6969867017 CHIA-3179 Optimize rolled back state construction in _reconsider_peak (#19734)
Optimize rolled back state construction in _reconsider_peak.
2025-06-23 09:10:42 -07:00
Arvid Norberg 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
Matt Hauff 0a084139b0 [CHIA-3158] Add dicts to streamable (#19719)
* Add dicts to streamable

* Make sure serialization is detemrinistic

* one more irrelevant test

* whoops fix bug and catch it with test

* Revert "Make sure serialization is detemrinistic"

This reverts commit 1c8f37743a.

* Dont allow duplicate dict keys

* optimize
2025-06-20 08:50:04 -07:00
Richard Kiss 3e30f67405 Refactor BlockHeightMap Creation to Decouple It from Blockchain (#19711)
Create `BlockHeightMap` outside of `Blockchain` so `chia.consensus`
doesn't have to depend on a specific storage mechanism.
2025-06-17 11:53:26 -07:00
Kyle Altendorf 7c25640c3e remove 'or descriptor' from chia --passphrase-file help (#19722) 2025-06-17 11:52:33 -07:00
Richard Kiss 14db91db6d Extract time lock validation and move to chia.consensus. (#19707)
Move `mempool_check_time_locks` to `chia.consensus` and rename to `check_time_locks`.
2025-06-16 14:33:26 -07:00
Amine Khaldi 93e8a60ad4 CHIA-3107 Simplify test_basic_coin_store (#19709)
Simplify test_basic_coin_store.
2025-06-16 14:32:50 -07:00
Amine Khaldi 635f4d1031 CHIA-3113 Simplify test_num_unspent (#19710)
Simplify test_num_unspent.
2025-06-16 14:32:16 -07:00
Kyle Altendorf 32ca9c0804 by service not layer (#19715)
* by service not layer

* monkey patch fixup
2025-06-16 14:31:51 -07:00
Richard Kiss 4f03890871 chia/full_node/signage_point.py -> chia/consensus/signage_point.py (#19706) 2025-06-12 11:14:27 -07:00
Richard Kiss cbfd5a53a2 Move chia.consensus.fee_estimate_store to chia.full_node (#19705)
The `chia.protocols` module no longer depends upon `chia.full_node`
2025-06-12 11:13:53 -07:00
Amine Khaldi ab61a0dc86 CHIA-3050 Extract _add_coin_records out of CoinStore and simplify it (#19686)
Turn CoinStore's _add_coin_records into a freeform add_coin_records_to_db.
2025-06-12 11:13:31 -07:00
Kyle Altendorf 8a8443787f redact daemon websocket message logging (#19697)
* redact daemon websocket message logging

* add tests

* casefold the trigger as well

* redact mnemonic too
2025-06-12 11:13:10 -07:00
Kyle Altendorf f054d339a1 unignore some ruff s rules (#19703) 2025-06-12 11:12:54 -07:00
Kyle Altendorf 8e2545fba6 add chia dev data sync-time --prefer-db-kv-blob-length (#19693) 2025-06-11 16:22:45 -04:00
Kyle Altendorf 36d8e2fd62 properly seed intra-sync persistent delta reader cache on new sync (#19702) 2025-06-11 14:09:04 -04:00
Amine Khaldi ceb635679c CHIA-3086 Simplify test_rollback (#19696)
Simplify test_rollback.
2025-06-11 08:39:00 -07:00
Matt HauffandKyle Altendorf 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
Almog De PazandArvid Norberg 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
Kyle Altendorf 53b2f90f44 rename to DataStore.prefer_db_kv_blob_length (#19692) 2025-06-09 15:39:18 -04:00
Florin Chirica d9098d6e20 Optimize add missing files (#19630)
* Optimize add missing files.

* Update poetry.lock

* Update poetry.lock

* Update pyproject.toml

* Redo lock file.

* Lint.

* Fix test.

* Checkpoint.

* Change reference.

* Change branch.

* Fix lock file.
2025-06-09 15:23:01 -04:00
earl 0464d69308 Also log the VDF field being compacted (#19663) 2025-06-07 19:55:15 -07:00
Kyle Altendorf 8c96c1a2e3 changeable key/value in-db blob size limit (#19669)
* changeable key/value in-db blob size limit

* tests

* test_get_keys_both_disk_and_db

* test_get_keys_values_both_disk_and_db

* fixup schema, like moving the index from the blob to the hash
2025-06-06 16:23:01 -04:00
Almog De Paz 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
Richard Kiss 3a0efbd463 fix(full_node): use f-string for log message when adding blocks (#19681)
Fix a typo I introduced in prior PR.
2025-06-05 15:06:44 -07:00
Kyle Altendorf f44d748df3 Merge commit '082f0592d879ff6e784e4ad9d4f7a9f0442206ca' into catchup/long_lived_datalayer_merkle_blob_from_main_082f0592d879ff6e784e4ad9d4f7a9f0442206ca 2025-06-05 14:16:55 -04:00
StarttoasterandArvid Norberg 082f0592d8 checkpoint: into main from release/2.5.4 @ 27bfa7e2a3 (#19680)
reject transactions from the mempool, that take too long to validate (#19611)

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-06-05 09:21:46 -07:00
Amine Khaldi cc00bf55bd CHIA-2989 Insert DB values in CoinStore's new_block without creating coin records for them (#19662)
Insert DB values in CoinStore's new_block without creating coin records for them.
2025-06-05 09:21:13 -07:00