Commit Graph
5861 Commits
Author SHA1 Message Date
Matt Hauff f57dfc02c9 [CHIA-2911] fix test_db_graftroot after chia_rs update (#19668)
fix `test_db_graftroot` after chia_rs update
2025-06-05 09:20:59 -07:00
Amine Khaldi 242ef4f5a1 CHIA-3031 Leverage execute_fetchall in CoinStore's rollback_to_block (#19682)
Leverage execute_fetchall in CoinStore's rollback_to_block.
2025-06-05 09:20:33 -07:00
Kyle Altendorf e8ec51aae1 Improve migration logging. (#19667)
<!-- 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-06-04 20:35:37 -04:00
Amine Khaldi b0242ee94d Merge commit '27bfa7e2a31af5736c84ecadf7954adc18eb086c' into checkpoint/main_from_release_2.5.4_27bfa7e2a31af5736c84ecadf7954adc18eb086c 2025-06-03 22:20:48 +01:00
Matt Hauff f1885d6f92 [CHIA-2947] Actually don't commit puzzle hashes when push=False (#19647)
* Actually dont commit puzzle hashes when push=False

* Fix tests

* Fix tests

* Fix test
2025-06-03 12:32:53 -07:00
Amine Khaldi 4994b4515a CHIA-2979 Simplify test_set_spent (#19655)
Simplify test_set_spent.
2025-06-03 12:31:55 -07:00
Richard Kiss 15a4536a7a The chia.consensus module no longer depends upon chia.wallet. (#19665)
<!-- 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:

This PR removes a dependency that is inappropriate and caused a
dependency loop.
2025-06-03 12:31:30 -07:00
Florin Chirica 1444d22316 Lint. 2025-06-03 16:35:19 +03:00
Florin Chirica 14593f452c Improve migration logging. 2025-06-03 16:17:31 +03:00
StarttoasterandArvid Norberg de15642d55 checkpoint: into main from release/2.5.4 @ 3901126c3d (#19660)
amendment to Dedup patch #19565 (#19569)

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-06-02 10:19:08 -07:00
Almog De Paz b4976902c9 add different foliage coverage to TL new peak (#19634)
* add diffrent foliage covarage

* assert different header hash
2025-06-02 10:46:49 -05:00
Arvid Norberg 2b7a453e38 promote block-creation setting to user-facing (#19545)
* make the mempool block creation more configurable

* update tests to cover both block creation functions
2025-06-02 10:39:04 -05:00
Richard Kiss 5617026604 The chia.protocols module no longer depends upon chia.full_node. (#19661) 2025-06-02 10:38:17 -05:00
Kyle Altendorf f05b76c764 Merge commit 'ae706ad83f32bdb999c829b28e8645fbbae0514b' into catchup/long_lived_datalayer_merkle_blob_from_main_ae706ad83f32bdb999c829b28e8645fbbae0514b 2025-06-02 10:13:39 -04:00
Almog De Paz afd5427ce8 CHIA-2823 move sp broadcast (#19654)
* move sp broadcast

* refactor to avoid double calls

* move up
2025-05-30 09:51:36 -07:00
Amine Khaldi ce8a4c350e Merge commit '3901126c3d4b12cf7567f9ff33081d1ae99f626c' into checkpoint/main_from_release_2.5.4_3901126c3d4b12cf7567f9ff33081d1ae99f626c 2025-05-29 19:43:45 +01:00
Kyle Altendorf 10d957680b Merge commit 'a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd' into catchup/long_lived_datalayer_merkle_blob_from_main_a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd 2025-05-29 13:15:14 -04:00
Richard Kiss a803d18c3b The chia.protocols module no longer depends upon chia.server. (#19636)
<!-- 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?) -->

The modules `chia.protocols` and `chia.server` form a dependency loop.
This change at least removes the direct dependency of `chia.protocols`
on `chia.server`.

### 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-05-29 09:24:29 -07:00
Arvid NorbergandMatthew Howard 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
Amine Khaldi 3e199c1306 CHIA-2963 Avoid recomputing coin record names in rollback_to_block when we have access to them (#19649)
Avoid recomputing coin record names in rollback_to_block when we have access to them.
2025-05-29 09:21:08 -07:00
Amine Khaldi 39fd1b6882 CHIA-2961 Don't return addition coin records in CoinStore's new_block (#19648)
Don't return addition coin records in CoinStore's new_block.
2025-05-29 09:20:57 -07:00
yeahyear f499a15acd chore: fix some typos in comment (#19594)
Signed-off-by: yetyear <flite@outlook.com>
2025-05-27 09:04:35 -07:00
Richard Kiss 1a0eb383dc Remove dependency chia.types so chia.util no longer depends on it (#19633)
* Move chia.util.full_block_utils to chia.full_node.full_block_utils

* chia.util.generator_tools => chia.consensus.generator_tools

* chia.util.vdf_prover => chia.simulator.vdf_prover

* Move 'chia.util.condition_tools' to 'chia.consensus'.
2025-05-27 09:03:23 -07:00
Richard Kiss e4ccb8024f Fix chia.util <= chia.server dependency (#19629)
Move `get_unresolved_peer_infos` and `set_peer_info` from
`chia.util.config` to `chia.server.resolve_peer_info.py` so that
`chia.util` no longer depends upon `chia.server`.
2025-05-23 09:06:11 -05:00
Almog De Paz 434cb8136c dont skip same peak if in unfinished cache (#19626)
* dont skip same peak if in unfinished cache

* lint

* fix same block in test

* lint
2025-05-22 11:30:03 -05:00
Richard Kiss 386787fb51 Move dump_keyring.py to remove dep chia.util => chia.cmds (#19600) 2025-05-22 10:17:54 -05:00
Kyle Altendorf 5d3fd3f5a9 catchup: into long_lived/datalayer_merkle_blob from main @ e81b213b9a (#19614)
Source hash: e81b213b9a
Remaining commits: 0
2025-05-21 09:33:34 -04:00
Florin Chirica 7bd9668d0b Fix delta file to use new format in duplicate hash. (#19582) 2025-05-19 10:10:01 -04:00
Kyle Altendorf 4e0f904cd3 Merge commit 'e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345' into catchup/long_lived_datalayer_merkle_blob_from_main_e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345 2025-05-16 15:59:57 -04:00
Florin ChiricaandKyle Altendorf 476ab8c730 Optimize DL functions for get keys/values. (#19609)
* Optimize DL functions for get keys/values.

* Update chia/data_layer/data_store.py

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

* Address review comment.

* Address review comments.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-05-16 13:45:29 -04:00
Kyle Altendorf e81b213b9a tweak chia dev data sync-time (#19548) 2025-05-16 10:13:14 -04:00
Richard Kiss 6b88ae31a1 More significant digits in block_rate (#19608) 2025-05-16 10:12:41 -04:00
Arvid Norberg 27bfa7e2a3 reject transactions from the mempool, that take too long to validate (#19611) 2025-05-15 16:08:04 -07:00
Kyle Altendorf 213dc5808e catchup: into long_lived/datalayer_merkle_blob from main @ a8a30e3541 (#19584)
Source hash: a8a30e3541
Remaining commits: 0
2025-05-15 11:20:04 -04:00
Kyle Altendorf cb3485bfcf reuse delta reader to avoid reloading data from disk (#19583)
* reuse delta reader to avoid reloading data from disk

* update chia_rs
2025-05-14 13:27:21 -04:00
Florin Chirica b03e7f6b48 Optimize add_missing_files (#19588)
* Separate add missing files into rust and non rust code.

* mypy

* Batch query the DB.
2025-05-13 13:28:24 -04:00
Amine Khaldi 1439d1d485 Merge commit '78ccd6988581a387e943e67e88dea68e471838bf' into checkpoint/main_from_release_2.5.4_78ccd6988581a387e943e67e88dea68e471838bf 2025-05-13 15:49:59 +01:00
Amine Khaldi e66dc62e08 CHIA-2862 Adapt test_check_removals_with_block_creation to cover both block generator creation versions (#19585)
Adapt test_check_removals_with_block_creation to cover both block generator creation versions.
2025-05-13 08:14:23 -04:00
Amine Khaldi 8342362583 Merge commit 'baceeb841754e5079df58257c2b3d1ba25c4d4c0' into checkpoint/main_from_release_2.5.4_baceeb841754e5079df58257c2b3d1ba25c4d4c0 2025-05-12 13:54:37 +01:00
Richard Kiss 20a0d934cb Move ssl_check.py to chia/ssl (#19596) 2025-05-12 08:53:18 -04:00
Richard Kiss 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
Arvid Norberg 1a272368c6 additional test for is_clvm_canonical() (#19595) 2025-05-09 11:38:25 -05:00
Richard Kiss 44643084b0 Move augmented_chain.py and prev_transaction_block.py to chia/consensus (#19587) 2025-05-08 15:11:31 -05:00
Amine Khaldi 02a89cd356 Merge commit '5e0a0df94a261b84b6b940fd661c7be4b49f01a6' into checkpoint/main_from_release_2.5.4_5e0a0df94a261b84b6b940fd661c7be4b49f01a6 2025-05-07 21:35:22 +01:00
Almog De Paz 8df25ca376 CHIA-1655: add test_add_unfinished_block_with_generator_refs (#19570)
<!-- 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-05-07 09:26:32 -05:00
Kyle Altendorf 6936950a4b Merge commit 'a8a30e3541a9074e2e5ca85e7869c90f61448b8b' into catchup/long_lived_datalayer_merkle_blob_from_main_a8a30e3541a9074e2e5ca85e7869c90f61448b8b 2025-05-07 09:46:08 -04:00
Kyle Altendorf 76374b09c2 parallel missing hash collection (#19552)
* parallel missing hash collection

* more

* breakdown

* update chia_rs
2025-05-07 08:38:35 -04:00
Amine Khaldi 5090723479 Merge commit '8ec82c578e3a98462b5a3e5cf5bf8fc5316f1358' into checkpoint/main_from_release_2.5.4_8ec82c578e3a98462b5a3e5cf5bf8fc5316f1358 2025-05-06 21:10:01 +01:00
matt-o-how 8f0e8e4b0b Improve the serialisation of AddressManager (#19467)
<!-- 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:
This PR is an optimisation for the way that AddressManager and
ExtendedPeerInfo are serialized, which happens periodically in a task
called from node_discovery.py

As well as the format of the serialization, the serialization algorithm
itself has had a multitude of speedups, including removing redundant
loops, minimising allocations, and so on.

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

### Current Behavior:

Previously we were serialising ExtendedPeerInfo as a string and
AddressManager as an `@streamable` `.to_bytes()`.
Copying all the data to this class was taking a deal of time.

The serialising function also had a lot of complicated pieces of
redundant code, looping over data multiple times when 1 pass might do.

### New Behavior:

This PR instead serialises AddressManager directly using a bytearray,
and refactors the code to reduce the complexity and number of loops.

More comments have been added in this area of the codebase as well.

### Testing Notes:

This PR includes a new benchmark file for the AddressManager's
serialisation.
Here are my personal results comparing this PR with `main`:

On main: `Average serialize time:   1.544302 seconds`
Sum of my optimisations: `Average serialize time:   0.468669 seconds`

Feel free to run `benchmarks/address_manager_store.py` to see for
yourself.

I have also added in a migration test in
`chia/_tests/core/full_node/test_address_manager.py` which creates an
old serialisation, loads it using the current loading code, then
serialises it using the new serialization, and then loads that.
It is also checked at each step along the way to ensure that the
serialisation has remained good.
<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2025-05-06 11:23:30 -05:00
Arvid Norberg 3901126c3d amendment to Dedup patch #19565 (#19569) 2025-05-05 14:05:55 -05:00