Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid Norberg 78ccd69885 use monotonic clock when timing functions in harvester (#19567) 2025-05-05 08:44:44 -05:00
Arvid Norberg baceeb8417 improve logging and timing around block validation (#19566) 2025-05-02 09:59:37 -07:00
Earle Lowe 0fb511b2f6 Enable Keccak for 2.5.4 (#19563)
* Backport enabling Keccak by default for wallet

* Keep ENABLE_KECCAK when not using mempool_mode
2025-05-02 09:59:23 -07:00
Arvid Norberg 5e0a0df94a Improve dedup (#19565)
* improve dedup

* address review comments
2025-05-02 09:58:46 -07:00
Amine Khaldi 8ec82c578e Optimize mempool's removals checking (#19560)
Optimize mempool's removals checking.
2025-05-01 12:15:15 -07:00
Arvid Norberg b4ad4cf8d6 back-port improved logging of timing in block validation (#19546) 2025-05-01 10:05:55 -07:00
Arvid NorbergandAlmog De Paz 6ab2a4b7c5 fix tl node peak sync (#19389) (#19445)
* fix tl node peak sync

* revert pytest change

* add weight check, rearrange cases

* comments, logs

* logs

* fix condition

Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
2025-05-01 10:05:26 -07:00
Arvid Norberg 2dedd07056 log if computing cost fails during block creation (#19523) 2025-05-01 10:05:07 -07:00
Kyle Altendorf 75758c9263 remove DataStore.process_merkle_blob_queries() (#19544)
remove `DataStore.process_merkle_blob_queries()
2025-04-29 07:46:23 -04:00
Amine Khaldi 774d8fb447 CHIA-2593 Add a unit test to cover an aspect of singleton fast forward dynamics (#19537)
Add a unit test to cover an aspect of singleton fast forward dynamics.
2025-04-28 12:23:20 -07:00
Earle Lowe 7f20df6214 Add some checks when trying to join the same pool already joined (#18822)
* Add some checks when trying to join the same pool already joined

* Add test to test the specific cli case

* Remove line added during debugging

* Add test

* misc updates

* remove cli test

* final tests for joining same pool again

* Update check from code review

* update test framework

* Use click.ClickException for error

* Add check for wallet synced up front as the first thing checked for joining a pool

* Add test for unsynced RPC call
2025-04-28 12:22:51 -07:00
Kyle Altendorf 7969c6de4a delta reader (#19540)
* use delta reader

* fixup
2025-04-28 12:36:56 -04:00
Kyle Altendorf 4a65e3a6b0 move tx processing queue entry classes (#19536) 2025-04-25 13:15:18 -05:00
Kyle Altendorf 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
Arvid NorbergandKyle Altendorf 7d24a96ab7 log how long it took to call peak_post_processing_2() (#19538)
* log how long it took to call peak_post_processing_2() if block validation as a whole took a surprisingly long time

* log timing for Mempool.new_peak()

* Update chia/full_node/mempool_manager.py

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-04-25 13:14:29 -05:00
Arvid Norberg 198b757f33 log an error if we fail to compute the block cost (#19524)
log an error if we fail to compute the block cost, instead of just asserting
2025-04-25 13:14:06 -05:00
Kyle Altendorf 161dc43c9a force use of index for MAX(generation) (#19491)
* force use of index for `MAX(generation)`

* links
2025-04-25 13:34:13 -04:00
Kyle Altendorf ed4c5bfaca store merkle, key, and value blobs in files (#19528)
* store merkle, key, and value blobs in files

* update expected columns

* fixup tests

* more

* cleanup disk

* better wrapped path identification

* todos for potential filesystem locking

* suppress not precheck

* handle not-present new path configuration entries

* log exception

* replace hard coded 32

* three layers of directories for bytes paths
2025-04-25 11:56:59 -04:00
Almog De Paz d10e665dbd use index when fetching SP (#19527)
* use index when fetching SP

* lint

* refactor redudant code

* refactor

* comment
2025-04-24 10:24:56 -05:00
Amine Khaldi 6824b11ba0 CHIA-2743 Synchronous block generator creation (#19505)
Synchronous block generator creation.
2025-04-24 10:24:42 -05:00
Kyle Altendorf 96d5c9f2fa DL Config cache size. (#19476)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->

### Purpose:

<!-- Does this PR introduce a breaking change? -->

### Current Behavior:

### New Behavior:

<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->

### Testing Notes:

<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2025-04-24 09:38:34 -04:00
Earle Lowe a1e695e896 Allow DIDs from other wallets with NIL recovery lists (#19469)
* Somewhat hacky workaounds for DIDs from other wallets

* cannot use set as not hashable

* Add a couple tests

* Change DIDCoinData to use bytes instead of bytes32

* Remove some unused code

* Remove some more unused code

* Make the alternate recovery did spendable I think

* Use Optional[bytes32] for DIDCoinData to show the list should be 32 bytes or nothing (where nothing is the NIL program)

* Replace specific test with parameterization of other tests to get more testing of the Alternate DIDs

* Empty commit for github

* minor formatting change

* No need to cast to bytes since as_atom returns bytes
2025-04-23 09:28:48 -05:00
Amine Khaldi 4d027d03e4 CHIA-2776 Simplify DB checks in invariant_check_mempool (#19526)
Simplify DB checks in invariant_check_mempool.
2025-04-21 14:05:24 -05:00
Kyle Altendorf fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Arvid Norberg 88d3fefa69 validate block generator created by the debug RPC (#19519)
* validate block generator created by the debug RPC

* address missing test coverage

* more logging. Don't limit block cost by cost header in test RPC
2025-04-21 10:21:49 -05:00
Amine Khaldi 2396fcad43 CHIA-2749 Annotate test_full_node_rpc.py (#19511)
Annotate test_full_node_rpc.py.
2025-04-21 10:21:33 -05:00
Kyle Altendorf 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 Altendorf 779dd43f72 Merge commit 'c97f0a1777d455d9a1d26a028362425e634ee066' into catchup/long_lived_datalayer_merkle_blob_from_main_c97f0a1777d455d9a1d26a028362425e634ee066 2025-04-17 19:46:57 -04:00
Kyle Altendorf c97f0a1777 add chia dev data sync-time for doing datalayer sync time tests (#19437)
* add `chia dev data sync-time` for doing datalayer sync time tests

* add chia stop -d all at the end

* less subprocessing

* remove dead log file code

* add subcommand help messages

* correct for 3.9 support

* allow for days of timing

* format done message

* more info

* fixup

* fixup

* stuff

* more try finally

* add minutes

* add `--working-path`
2025-04-17 16:21:38 -05:00
Freddie Coleman 2dfc257c59 Set AGG_SIG_ME_ADDITIONAL_DATA in config.yaml for simulator (#18566)
set AGG_SIG_ME_ADDITIONAL_DATA in config.yaml for simulator
2025-04-17 11:07:23 -05:00
Kyle Altendorf 8c8768feb4 Merge commit '2449e0c06d7b6d32dbbe1515a76f853d907ae69e' into catchup/long_lived_datalayer_merkle_blob_from_main_2449e0c06d7b6d32dbbe1515a76f853d907ae69e 2025-04-17 11:19:59 -04:00
Kyle Altendorf 2449e0c06d fixup colliding -o options on chia dev gh test (#19316) 2025-04-17 09:48:53 -05:00
Kyle Altendorf 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
Arvid Norberg d0f64c6cbc Refactor BlockTools (#19492)
* simplify BlockTools by making include_transactions=True independent from transaction_data

* improve error message in validate_coins()

* we don't know if a block will become a transaction block, we we can't mutate state as if spends will make it in until once it's confirmed

* factor out NewBlockGenerator creation into a function

* remove unused variable

* use latest version of test-cache

* extend timeout

* fix coverage

* extend sync timeout
2025-04-16 11:25:52 -05:00
Matt Hauff 9bc5741924 [CHIA-1162] Port test_nft_bulk_mint.py to WalletTestFramework (#19442)
* Port `test_nft_mint_from_did`

* Port `test_nft_mint_from_did_rpc`

* Collapse a test into a parametrization

* Ruff cleanup

* Port `test_nft_mint_from_did_multiple_xch`

* Port `test_nft_mint_from_xch`

* Port `test_nft_mint_from_xch_rpc`

* Port `test_nft_mint_from_xch_multiple_xch`

* Remove unnecessary DID code from XCH mint tests

* Collapse multiple tests into parametrization

* Collapse multiple tests into parametrization (and test fixes!)

* Collapse multiple tests into parametrization
2025-04-16 11:25:14 -05:00
racerole 631215624c chore: fix some comments (#19293)
chore: fix comment

Signed-off-by: racerole <jiangyifeng@outlook.com>
2025-04-16 10:07:08 -05:00
Kyle Altendorf 9d05308dfa Merge commit '485d8889032600937571a47b2d41bf01670023d4' into catchup/long_lived_datalayer_merkle_blob_from_main_485d8889032600937571a47b2d41bf01670023d4 2025-04-16 10:04:34 -04:00
Matt HauffandAmine Khaldi 485d888903 [CHIA-1161] Migrate test_nft_1_offers.py to WalletTestFramework (#19413)
* Port `test_nft_offer_sell_nft`

* Port `test_nft_offer_request_nft`

* Port `test_nft_offer_sell_did_to_did`

* Port `test_nft_offer_sell_nft_for_cat`

* Port `test_nft_offer_request_nft_for_cat`

* Port `test_nft_offer_sell_cancel`

* Delete duplicate test

* Port `test_complex_nft_offer`

* Delete unused fixtures

* Parametrization fixes

* rebase fix

* Use OfferSummary.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-04-15 14:39:10 -05:00
Kyle Altendorf 921afcee14 Revert "add CHIA_DATA_LAYER_STOP_AFTER_GENERATION env var for timing tests (#19417)" (#19462)
Revert "add `CHIA_DATA_LAYER_STOP_AFTER_GENERATION` env var for timing tests …"

This reverts commit 27d43831a9.
2025-04-15 13:53:06 -05:00
Matt HauffandAmine Khaldi 6087fc53ec [CHIA-2271] Migrate test_dl_offers.py to WalletTestFramework (#19425)
* refactor puzzle hash requests

* puzhashes into action scopes

* test coverage

* more test coverage

* Add streamable versions of classes

* prep for merge

* Bad merge

* Port `test_dl_offers`

* Port `test_dl_offer_cancellation`

* Port `test_multiple_dl_offers`

* Revert accidental change.

* Minor improvements.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2025-04-15 13:35:07 -05:00
Florin Chirica 711d9b1f5f Address review comment. 2025-04-15 18:45:28 +03:00
Amine Khaldi 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
dependabot[bot]andEarle Lowe 31a8715919 build(deps): bump ruff from 0.9.6 to 0.11.4 (#19482)
* build(deps): bump ruff from 0.9.6 to 0.11.4

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

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.11.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* ruff fixes

* ruff fixes

* ruff fixes

* Address review suggestions

---------

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>
2025-04-14 16:09:07 -05:00
timesince 09f48746de chore: fix some comments (#19493)
Signed-off-by: timesince <seekseat@icloud.com>
2025-04-11 09:23:21 -07:00
Almog De Paz 4af1bee731 test declare_proof_of_space (#19362)
* add tests

* lint

* fix get_blocks for test

* lint

* fix flakey test

* increase timeout

* fix test

* lint
2025-04-11 09:20:04 -07:00
Amine Khaldi 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
Rigidity 3118c1802e CHIA-2685: Enable keccak softfork in the wallet (#19481)
Enable keccak softfork in the wallet
2025-04-09 11:22:09 -07:00
Arvid Norberg f241889b41 [CHIA-2541] validate more of cached test chains (#19463) 2025-04-09 07:48:40 -07:00
Florin Chirica cea5130cef Lint. 2025-04-08 22:45:51 +03:00
Florin Chirica 65992db2db Avoid deepcopy. 2025-04-08 22:40:19 +03:00