Commit Graph
5861 Commits
Author SHA1 Message Date
Kyle Altendorf e60f7f0c1a explicitly check RpcApiProtocol classes (#18786) 2024-10-30 09:29:02 -07:00
Kyle Altendorf 79ba87c32d explicitly check ApiProtocol classes (#18785) 2024-10-30 09:28:05 -07:00
Matt Hauff 8f0cd0eab8 [CHIA-1673] Comment out a manual ._finish_sync() call (#18783)
* Delete a manual `._finish_sync()` call

* Add comment
2024-10-30 09:25:52 -07:00
Kyle Altendorf 9e85af6047 remove prompt_yes_no() (#18755) 2024-10-30 09:25:27 -07:00
Matt Hauff bea1447adb [CHIA-1672] Add parsing for JSON formatted spend bundles in /push_tx (#18764)
Add parsing for JSON formatted spendbundles in `/push_tx`
2024-10-30 11:17:32 -05:00
Florin Chirica c77fa7b3a4 Fix test. 2024-10-30 02:44:36 +02:00
Florin Chirica 11e1c623bb Lint. 2024-10-30 02:28:44 +02:00
Matt Hauff e1db6cb452 Replace Isort with Ruff (#18789)
Replace isort with Ruff
2024-10-29 12:47:40 -07:00
Richard Kiss f126023591 Don't import a wallet file from util. (#18742)
* Don't import a `wallet` file from `util`.

* coverage
2024-10-29 09:31:25 -07:00
Amine Khaldi 11eba04e28 CHIA-1628 Annotate test_network.py (#18693)
Annotate test_network.py.
2024-10-29 09:31:13 -07:00
Florin Chirica 7765bbd504 Lint. 2024-10-29 06:01:22 +02:00
Florin Chirica 81083b2176 Merge branch 'long_lived/datalayer_merkle_blob' into fc.dl_integration 2024-10-29 05:20:52 +02:00
Kyle Altendorf e19839efc4 Merge branch 'main' into add_rs_merkle_blob 2024-10-28 16:51:11 -04:00
Kyle Altendorf 6dee78ad63 correct wallet rpc api for get spendable coins with specified excluded coins (#18768)
correct wallet rpc api for get spendable coins with specified excludied coins
2024-10-28 13:28:05 -07:00
Amine Khaldi cfab9eb2b3 CHIA-1674 Remove no longer needed get_symmetric_key (#18770)
Remove no longer needed get_symmetric_key.
2024-10-28 10:31:34 -07:00
Amine Khaldi 03a41ac486 CHIA-1668 Move validate_block_merkle_roots next to validate_block_body (#18757)
Move validate_block_merkle_roots next to validate_block_body.
2024-10-28 10:31:24 -07:00
Matt Hauff 6084112d48 [CHIA-1553] Replace pylint with ruff (#18759)
* Replace pylint with ruff

* poetry

* remove pylint

* Address comments by @altendky

* Undo formatting

* actually undo formatting
2024-10-25 15:55:37 -07:00
wjblanke 0354e6e1d3 Keep track of all long sync task references (#18769)
* keep track of all long sync task references

* List

* flake8

* flake8

* shorten comments... ooof indents

* comment
2024-10-25 14:55:33 -07:00
Kyle Altendorf e2c63db676 remove unnecessary use of .__members__ on ConditionOpcode iteration (#18767) 2024-10-25 12:02:26 -07:00
Arvid Norberg 2df931bf87 [CHIA-1566] pipeline block validation in sync_from_fork_point() (#18703)
* make pre_validate_multi_processing() return futures, rather than the awaited and joined results from the thread jobs. This is crucial to allow the validaion jobs to run concurrently with the database interaction in the main thread

* Split up the add_block_batch() function into 3 parts, preparing them to be pipelined in long-sync

* pass AugmentedBlockchain into pre_validate_multiprocessing() and prevalidate_blocks(), to support the augmented blockchain to outlive a single batch

* pipeline pre-validation in sync_from_forkpoint()

* optimize the common case of _reconsider_peak(), to avoid one database lookup

* address review comments

* rename filter_blocks() -> skip_blocks(). It's is only relevant at the start of the sync, add comment and assert
2024-10-25 08:38:23 -07:00
Florin Chirica de52d3899e Migrate old DB. 2024-10-25 17:57:41 +03:00
Amine Khaldi 36d7c0146a CHIA-1669 Simplify tx_additions and tx_removals in validate_block_merkle_roots (#18758)
Simplify tx_additions and tx_removals in validate_block_merkle_roots.
2024-10-24 11:52:56 -07:00
Kyle Altendorf 030ffddf35 add vpa virtual project package (#18754) 2024-10-24 11:52:32 -07:00
Amine Khaldi f4ff9d621e CHIA-1664 Deduplicate cancel_task_safe (#18745)
Deduplicate cancel_task_safe.
2024-10-24 11:52:22 -07:00
Kyle Altendorf 2588600d1c more lowercase types such as in comments (#18737) 2024-10-24 11:52:10 -07:00
Kyle Altendorf 127b83cb8b Merge branch 'long_lived/datalayer_merkle_blob' into add_rs_merkle_blob 2024-10-23 14:10:39 -04:00
Kyle Altendorf 9eefca78fa catchup: into long_lived/datalayer_merkle_blob from main @ 8c72d22edf (#18756)
Source hash: 8c72d22edf
Remaining commits: 0
2024-10-23 13:53:03 -04:00
Kyle Altendorf c23b284126 use signed integers for keys and values (#18753) 2024-10-23 13:13:13 -04:00
Kyle Altendorf 5bba8852b8 pyupgrade 2024-10-23 10:17:55 -04:00
Kyle Altendorf bd69aace4f Merge commit '8c72d22edf0257e53ece9af54801ccc348472933' into catchup/long_lived_datalayer_merkle_blob_from_main_8c72d22edf0257e53ece9af54801ccc348472933 2024-10-23 10:14:34 -04:00
Arvid Norberg 8c72d22edf move add_blocks_in_batches() out of tests (#18750)
move add_blocks_in_batches() out of tests, since the node simulator depends on it
2024-10-23 08:50:08 -05:00
Kyle Altendorf b2b17991e0 more rust 2024-10-22 19:54:42 -04:00
Arvid Norberg 6bbcd2d065 tests as its own subproject (#18698)
extend virtual_project_analysis to treat all files under chia/_tests as its own subproject. Since the tests depend on the production code,this will prevent production code from depending on tests
2024-10-22 12:16:12 -07:00
Amine Khaldi 4f00f639fc CHIA-1565 Pass a ValidationState to validate_finished_header_block (#18712)
Pass a ValidationState to validate_finished_header_block.
2024-10-22 12:15:26 -07:00
Arvid Norberg 45b08d60e3 Additions removals (#18741)
* use additions_and_removals() in the request_block_header() full node API. This is slightly faster, and untangles it from the function used for consensus

* use additions_and_removals() instead of get_name_puzzle_conditions() in run_one_block(). We've already validated the block, we just need to recompute the additions and removals
2024-10-22 12:15:07 -07:00
Almog De Paz a80d779fe6 refactor full_node add_block (#18584)
* refactor

* minor fixes

* fix_tests

* add finish sync to add_blocks_in_batches

* add_blocks_in_batches updates wallets

* test fixes

* fix condition in add_block

* add known block to cache

* restore comment

* remove init file from log dir

* fix failed reorg test

* revert known block info change

* assert height in cat test

* wait for wallet height in nft test

* assert sync all height for all wallets

* test_cat_creation assert height

* rename vars

* assert height in process states
2024-10-22 12:14:18 -07:00
Arvid Norberg f15d0047a2 Move spend_sim.py into tests (#18743)
* move spend_sim into tests

* use run_block_generator2() instead of get_name_puzzle_conditions() in CostLogger. It's only used to compute the cost of a spend bundle, in tests.
2024-10-22 12:08:40 -07:00
Amine Khaldi 690338ef39 CHIA-1663 Simplify duplicate output validation in validate_block_body (#18744)
Simplify duplicate output validation in validate_block_body.
2024-10-22 12:07:52 -07:00
Kyle Altendorf 3b6f547d45 bytes zeros (#18475)
* `ZERO_32`

* `bytes(\d+)\(\[0\] \* \1\)`

* `bytes(\d+)\(b"\\(x00|0)" \* \1\)`

* `bytes(\d+)\(b"0" \* \1\)`

* Revert "`bytes(\d+)\(b"0" \* \1\)`"

This reverts commit 2d629dcb0a.
2024-10-22 12:07:07 -07:00
Florin Chirica 19a8f35bad Lint. 2024-10-22 04:44:21 +03:00
Florin Chirica 27b36c9a4c Fix more tests. 2024-10-22 04:41:32 +03:00
Florin Chirica de6d13159e Lint. 2024-10-21 19:25:10 +03:00
Florin Chirica 3220d62ede Lint. 2024-10-21 19:20:46 +03:00
Florin Chirica e3b93d9ae8 Fix code after merge conflict. 2024-10-21 19:16:40 +03:00
Florin Chirica bc048007ca Fix test. 2024-10-21 19:04:21 +03:00
Kyle Altendorf 8fa5f40426 Merge branch 'long_lived/datalayer_merkle_blob' into add_rs_merkle_blob 2024-10-21 11:58:43 -04:00
Florin Chirica 63a58da829 Merge branch 'long_lived/datalayer_merkle_blob' into fc.dl_integration 2024-10-21 18:57:19 +03:00
Kyle Altendorf 8f28d409d9 remove node .index attributes (#18733)
* quick removal of node `.index` attributes

* dedupe

* fixup
2024-10-21 11:55:25 -04:00
Amine Khaldi 6c2c13a2d0 CHIA-1626 Move some modules to the utils virtual project (#18692)
Move some modules to the utils virtual project.
2024-10-18 10:40:49 -07:00
Arvid Norberg bbe507744b [CHIA-1561] validate UnfinishedBlocks and signature in thread pool (#18730)
validate UnfinishedBlocks and signature in the blockchain thread pool. Previously we validate unfinished block signatures in the main thread, because the BLSCache used to be single-threaded
2024-10-18 09:15:16 -07:00