Commit Graph
14659 Commits
Author SHA1 Message Date
Amine Khaldi 5090723479 Merge commit '8ec82c578e3a98462b5a3e5cf5bf8fc5316f1358' into checkpoint/main_from_release_2.5.4_8ec82c578e3a98462b5a3e5cf5bf8fc5316f1358 2025-05-06 21:10:01 +01:00
Chris MarslenderandGitHub a8a30e3541 checkpoint: into main from release/2.5.4 @ b4ad4cf8d6 (#19575)
Source hash: b4ad4cf8d6
Remaining commits: 7
2025-05-06 14:48:46 -05:00
Amine Khaldi e4069e606c Merge commit 'b4ad4cf8d6883a99bb7bcbd1eb7792b5839d4061' into checkpoint/main_from_release_2.5.4_b4ad4cf8d6883a99bb7bcbd1eb7792b5839d4061 2025-05-06 20:30:20 +01:00
Chris MarslenderandGitHub 9f14c5dfff checkpoint: into main from release/2.5.4 @ 6ab2a4b7c5 (#19574)
Source hash: 6ab2a4b7c5
Remaining commits: 8
2025-05-06 14:05:59 -05:00
Amine Khaldi 4aa2982df1 Merge commit '6ab2a4b7c5a48fdd3c2ac551afa91d89cceae3ba' into checkpoint/main_from_release_2.5.4_6ab2a4b7c5a48fdd3c2ac551afa91d89cceae3ba 2025-05-06 17:42:41 +01:00
matt-o-howandGitHub 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
Chris MarslenderandGitHub 7020ba7ac8 checkpoint: into main from release/2.5.4 @ 2dedd07056 (#19573)
Source hash: 2dedd07056
Remaining commits: 9
2025-05-06 11:23:02 -05:00
Amine Khaldi 6c5a469cf8 Merge commit '2dedd070567bc51a99184f9018d23aa9f44b75ed' into checkpoint/main_from_release_2.5.4_2dedd070567bc51a99184f9018d23aa9f44b75ed 2025-05-05 22:01:41 +01:00
591713acb8 checkpoint: into main from release/2.5.4 @ ab533b451e (#19571)
Fix double slashes in s3 urls (#19443) (#19562)

(cherry picked from commit b7f029e3f5)

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
2025-05-05 12:59:16 -07:00
Arvid NorbergandGitHub 3901126c3d amendment to Dedup patch #19565 (#19569) 2.5.4-rc1 2025-05-05 14:05:55 -05:00
wjblankeandGitHub a36d994da7 Update GUI for 254 (#19572)
### Purpose:

Update GUI for 254

### Current Behavior:

Old GUI

### New Behavior:

New GUI

### Testing Notes:

None
2025-05-05 14:05:43 -05:00
Amine Khaldi 94aa996c5e Merge commit 'ab533b451ed0d3f0a7c12e2b4186ae2cb4180ddb' into checkpoint/main_from_release_2.5.4_ab533b451ed0d3f0a7c12e2b4186ae2cb4180ddb 2025-05-05 17:17:28 +01:00
a129fbe619 checkpoint: into main from release/2.5.4 @ 685ff9514d (#19564)
release 2 5 4 windows build (#19561)

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-05-05 06:45:17 -07:00
Arvid NorbergandGitHub 78ccd69885 use monotonic clock when timing functions in harvester (#19567) 2025-05-05 08:44:44 -05:00
Arvid NorbergandGitHub baceeb8417 improve logging and timing around block validation (#19566) 2025-05-02 09:59:37 -07:00
Earle LoweandGitHub 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 NorbergandGitHub 5e0a0df94a Improve dedup (#19565)
* improve dedup

* address review comments
2025-05-02 09:58:46 -07:00
Amine KhaldiandGitHub 8ec82c578e Optimize mempool's removals checking (#19560)
Optimize mempool's removals checking.
2025-05-01 12:15:15 -07:00
Arvid NorbergandGitHub b4ad4cf8d6 back-port improved logging of timing in block validation (#19546) 2025-05-01 10:05:55 -07:00
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 NorbergandGitHub 2dedd07056 log if computing cost fails during block creation (#19523) 2025-05-01 10:05:07 -07:00
Amine Khaldi d5f0557599 Merge commit '685ff9514ddb2f96e1bb47d2c79544b0d1801e24' into checkpoint/main_from_release_2.5.4_685ff9514ddb2f96e1bb47d2c79544b0d1801e24 2025-05-01 15:03:36 +01:00
ab533b451e Fix double slashes in s3 urls (#19443) (#19562)
(cherry picked from commit b7f029e3f5)

Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
2025-04-30 10:19:14 -07:00
Kyle AltendorfandGitHub 685ff9514d release 2 5 4 windows build (#19561) 2025-04-30 07:53:28 -07:00
Kyle AltendorfandGitHub 75758c9263 remove DataStore.process_merkle_blob_queries() (#19544)
remove `DataStore.process_merkle_blob_queries()
2025-04-29 07:46:23 -04:00
Amine KhaldiandGitHub 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 LoweandGitHub 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 AltendorfandGitHub 7969c6de4a delta reader (#19540)
* use delta reader

* fixup
2025-04-28 12:36:56 -04: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
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 NorbergandGitHub 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 AltendorfandGitHub 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 AltendorfandGitHub 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 PazandGitHub 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 KhaldiandGitHub 6824b11ba0 CHIA-2743 Synchronous block generator creation (#19505)
Synchronous block generator creation.
2025-04-24 10:24:42 -05:00
Kyle AltendorfandGitHub 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 LoweandGitHub 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
Kyle AltendorfandGitHub b426dbdc01 update chia_rs datalayer again (#19525)
<!-- 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-22 11:33:25 -04:00
Kyle Altendorf d33a97df8e again 2025-04-22 10:42:30 -04:00
Amine KhaldiandGitHub 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 AltendorfandGitHub fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Arvid NorbergandGitHub 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 KhaldiandGitHub 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 48a07f9de1 update chia_rs datalayer again 2025-04-21 10:10:34 -04: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 a5334b0d47 catchup: into long_lived/datalayer_merkle_blob from main @ c97f0a1777 (#19517)
Source hash: c97f0a1777
Remaining commits: 0
2025-04-17 22:56:32 -04: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 AltendorfandGitHub 7c699f32a7 catchup: into long_lived/datalayer_merkle_blob from main @ 2449e0c06d (#19512)
Source hash: 2449e0c06d
Remaining commits: 0
2025-04-17 19:46:32 -04:00
Kyle AltendorfandGitHub 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