Commit Graph
5861 Commits
Author SHA1 Message Date
Florin Chirica 21aee6829c Optimize add node hashes. 2024-12-04 03:32:13 +02:00
Kyle Altendorf e7d12c7cb1 add root_path parameter to initialize_service_logging() (#18961) 2024-12-03 14:32:34 -07:00
Kyle Altendorf 9dacf09bbf fixup dont_prompt (#18974) 2024-12-03 14:31:17 -07:00
Earle Lowe 7c01e3c483 CHIA-1730: port chia plotnft to @chia_commands framework (#18833)
* chia plotnft CLI improvements

* use CliRpcConnectionError

* add check to show

* fix typo

* Update plotnft CLI to newer framework

* Fix help cut-paste error

* add test using new framework

* some minor fixes

* use click.Choice for pool/local option

* some click options

* Some more plotnft cli tests

* drop test_pool_cmdline from mypy-exclusions

* mypy fixes

* several fixes

* Add leave test

* join tests

* more join tests

* missing await

* Try setting config

* use root_path from NeedsWalletRPC

* linting

* Some cleanup

* Add claim tests

* Improved tests

* refactor some test code

* Add inspect tests

* Skip bad test for now

* Add in change payout tests

* quoting error

* Add test for get_login_link

* Add in a few negative tests for join

* Few more tests

* Experment with clirunner env overrides

* put back chia_root into context dict

* Some cleanup and one more test

* maybe final test

* some updates

* some dedup and reorg of test code

* run trusted and untrusted paramertization

* make reuse puzhash stuff work

* Add in required mock object for test_update_pool_config_new_config

* rearrange code per review comment - limit use of NeedsWalletRPC to chia_command

* Add in plotnft click parsing tests

* added ability to pass in obj to runner invoke

* Add in some more test cases

* fix up create issues with config

* Add in couple more test cases for error conditions

* Minor code cleanup

* Use long options for readability, minor code cleanup

* Use config file for farmer rpc port

* simplify code

* Add testing for prompt cases

* Add mocking for default_root_path

* context cleanup

* temp debugging output

* patch the proper object

* move some wallet fixtures into top level conftest and remove conftest import

* merge to origin/main
2024-12-03 12:33:52 -07:00
Matt Hauff 8dd76e5d1c [CHIA-1731] Add comments about PLR6201 (#18963)
* Add comments about PLR6201

* Change comment

* Change comment
2024-12-03 09:45:57 -07:00
Arvid Norberg df52ee6a57 add in_main_chain=1 to the SQL query, that just asks for heights (#18932)
extend unit test for BlockStore and add in_main_chain=1 to the SQL query, that just asks for heights
2024-12-03 09:21:29 -07:00
Arvid Norberg 98f7f8824c add new configuration option to log the first 6 hex digits of coins (#18893)
add new configuration option to log the first 6 hex digits of all coins added, removed and reorged (off by default)
2024-12-03 08:50:38 -07:00
Kyle Altendorf cf49d9c198 remove implementation from BlockRecordProtocol.is_transaction_block() (#18948) 2024-12-02 14:51:12 -07:00
Kyle Altendorf 3a54c5de53 remove dangling pylint comment reference (#18937) 2024-12-02 14:50:29 -07:00
Kyle Altendorf 3bfb4da50f explicitly set option parameter name based on field name for cmd classes (#18926) 2024-12-02 14:50:17 -07:00
Almog De Paz 61703ce09a fix trusted wallet sync on deep reorg (#18831)
* fix trusted wallet sync on deep reorg

* handle long sync exception case in finish sync

* fix_wallet_sync_test

* fix test_long_sync_wallet

* reconnect only untrusted node in test

* fix long_sync test, update only on finish_sync()

* revert add_blocks_in_batches

* types

* fix  flakey test_long_reorg_nodes_and_wallet
2024-12-02 11:22:55 -07:00
Kyle Altendorf 9d790abd78 Merge commit 'e5bf80e29f60dc507875b4742c50aa3d19364313' into catchup/long_lived_datalayer_merkle_blob_from_main_e5bf80e29f60dc507875b4742c50aa3d19364313 2024-12-02 12:15:35 -05:00
Florin Chirica c8a95748d8 Optimize deepcopy use 2024-11-28 04:40:45 +02:00
Florin Chirica 8b659b6829 Lint. 2024-11-28 03:10:30 +02:00
Florin Chirica d061c4ca73 Optimize DL query. 2024-11-28 03:04:19 +02:00
Kyle Altendorf aeea85f336 Fix DL migration (#18915)
<!-- 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) -->
2024-11-26 17:37:27 -05:00
Kyle Altendorf 8f5c6bf71e Fix DL index (#18933)
<!-- 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) -->
2024-11-26 17:34:14 -05:00
Kyle Altendorf 825cd4c18b Optimize DL benchmark. (#18906)
<!-- 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) -->
2024-11-26 17:34:03 -05:00
Kyle Altendorf 7fe2373b16 show cli defaults by default (#18927) 2024-11-26 11:59:46 -07:00
Arvid Norberg 57048e318f [CHIA-1830] in deep-reorg tests, ensure the resulting coin set is correct (#18925)
in deep-reorg tests, ensure the resulting coin set is correct
2024-11-26 10:49:15 -07:00
Florin Chirica 50b4bf4d0c Fix DL index. 2024-11-25 19:14:38 +02:00
Kyle Altendorf a1b908ee12 Merge branch 'main' into add_rs_merkle_blob 2024-11-25 09:52:41 -05:00
Matt Hauff 9755c46dec [CHIA-1773] Add better reuse_puzhash checking to WalletTestFramework (#18897)
* Add better reuse_puzhash checking to WalletTestFramework

* Do more sophisticated monkeypatching

* Fix `test_did_find_lost_did`

* Add ability to ignore reuse_puzhash enforcement

* Actually fix `test_did_find_lost_did`

* Fix `test_nft_with_did_wallet_creation`

* Fix `test_split_coins`

* Fix `test_did_attest_after_recovery`
2024-11-22 13:05:29 -08:00
Kyle Altendorf 30a83ce791 adjust cmd class help parameters (#18921) 2024-11-22 10:50:55 -08:00
Amine Khaldi cdd3ed24bf CHIA-1849 Evict related BLS cache entries on new peak (#18912)
Evict related BLS cache entries on new peak.
2024-11-22 08:57:33 -07:00
Kyle Altendorf 24e3644a43 skip simulator terminates on signal test for now (#18918) 2024-11-21 15:03:16 -07:00
Kyle Altendorf d1596d4386 enable flake8-tidy-imports (#18913) 2024-11-21 14:57:15 -07:00
Arvid Norberg e17e65707d improve logging of rate limits (#18907)
* improve logging of rate limits

* fix rate limiting of logs
2024-11-21 14:56:59 -07:00
Kyle Altendorf 29da4a3b57 put None at the end in Unions - incoming RUF036 (#18905) 2024-11-21 14:56:39 -07:00
Kyle Altendorf ad8bac359a more use of RpcClient.create_as_context() (#18903) 2024-11-21 14:56:17 -07:00
Arvid Norberg f2ef329cd3 improve sync timeouts by being more conservative the fewer peers we have (#18894) 2024-11-21 14:55:46 -07:00
Kyle Altendorf 19a7d048c0 less set (#18871)
* less set

* change them all...

* hum

* better

* more
2024-11-21 14:55:16 -07:00
Florin Chirica 5ed56c0b5c Disable foreign keys while migrating. 2024-11-21 00:27:16 +02:00
Florin Chirica eda617bd71 Lint. 2024-11-20 22:07:52 +02:00
Florin Chirica 55cae838de Use custom exception. 2024-11-20 22:01:29 +02:00
Florin ChiricaandKyle Altendorf 450297b71c Apply suggestions from code review
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-11-20 21:47:29 +02:00
Kyle Altendorf d3b5fde3b2 flake8 implicit str concat (#18908)
* ISC001

* ISC002

* ISC003 (not)

* fewer comments

* indentation
2024-11-20 12:00:16 -07:00
Kyle Altendorf dd028574bb enable ruff flake8 async (#18899) 2024-11-20 09:00:14 -07:00
Chris MarslenderandArvid Norberg 8d44c61913 Add support for a static list of peers to always have available in the dns_server (#18890)
* Add support for a static list of peers to always have available in the dns_server

* Add some tests

* Test the hostname to ip resolution for static dns server responses

* Sort imports

* Fix types/lint

* Fix test_db_processing flake

* remove unnecessary continue

* Ensure the parts that used to loop every 2 seconds when the DB is being populated for the first time still loop every 2s

* Update chia/seeder/dns_server.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* Remove redundant check for crawl store

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2024-11-20 09:00:02 -07:00
Arvid Norberg 14da93c58c fix the rollback of fork_info when validating a block fails (#18873)
* fix the rollback of fork_info when validating a block fails

* simplify removing peers during short sync
2024-11-20 08:59:01 -07:00
Arvid Norberg 84dc738252 move get_name_puzzle_conditions() into test utils (#18839)
move get_name_puzzle_conditions() into test utils. It's only used by tests
2024-11-20 08:57:12 -07:00
Amine Khaldi d1818faaf8 CHIA-1709 Pass a ValidationState to validate_unfinished_block_header (#18818)
Pass a ValidationState to validate_unfinished_block_header.
2024-11-20 08:57:01 -07:00
Florin Chirica 75dfd81633 Optimize DL benchmark. 2024-11-20 00:17:06 +02:00
Matt Hauff 3bc2fbff35 [CHIA-1696] Show an INCOMING_TX for pool reward claims (#18887)
* Show an `INCOMING_TX` for pool reward claims

* The last thing worked, but not really
2024-11-19 13:22:19 -07:00
Arvid Norberg 1c12526b20 Bump chia rs 0.16.0 (#18878)
* bump chia_rs dependency to 0.16.0

* add placeholder activation height for soft-fork 6
2024-11-19 06:21:47 -07:00
Kyle Altendorf 67533ed6ac Merge commit '748c8cec8e24c0feabc10e8db22284dc3712180f' into catchup/long_lived_datalayer_merkle_blob_from_main_748c8cec8e24c0feabc10e8db22284dc3712180f 2024-11-18 16:56:19 -05:00
Kyle Altendorf 748c8cec8e # TODO: stop dropping tasks on the floor (#18866)
* # TODO: stop dropping tasks on the floor

* Update chia/_tests/core/data_layer/test_data_rpc.py

* no really, stop
2024-11-18 12:32:52 -07:00
Chris Marslender 817427c19f If 0 peers to crawl, sleep before trying to crawl again (#18882)
* If 0 peers to crawl, sleep before trying to crawl again

* Invert the logic to only have one place that we sleep
2024-11-18 12:15:36 -07:00
wjblanke 05cddcc9b9 save tasks for TX processing (#18879)
* save tasks for TX processing

* ruff
2024-11-17 14:51:28 -07:00
Florin Chirica b768f4ce70 Fix test. 2024-11-15 20:03:31 +02:00