Commit Graph
5861 Commits
Author SHA1 Message Date
Florin Chirica 77b0965d90 Add batch autoinsert. 2024-09-05 18:20:50 +03:00
Amine Khaldi 4d225bed35 CHIA-1291 Switch mempool TX prevalidation to the Rust version (#18557)
Switch mempool TX prevalidation to the Rust version.
2024-09-05 22:17:23 +08:00
Arvid Norberg 094f0dd1e3 add test targets just for pre-generating the test chains (#18525) 2024-09-05 05:53:16 +08:00
wjblanke 7adde3d5b4 Fix BrokenProcessPool error for Windows installer blueboxing (#18546)
* switch to threads from multiprocessing since we drop the gil anyway

* lint
2024-09-05 05:52:51 +08:00
Amine Khaldi a3c59ad91a CHIA-1247 Use blockchain_constants to ensure hard fork behavior in test_fill_rate_block_validation (#18534)
Use blockchain_constants to ensure hard fork behavior in test_fill_rate_block_validation.
2024-09-04 23:47:53 +08:00
Matt HauffandAmine Khaldi bd021a126b [CHIA-1164] Port test_nft_wallet.py to WalletTestFramework (#18530)
* Port `test_nft_wallet_creation_automatically`

* Port `test_nft_wallet_rpc_creation_and_list`

* Port `test_nft_wallet_rpc_update_metadata`

* Port `test_nft_with_did_wallet_creation`

* Port `test_nft_rpc_mint`

* Port `test_nft_transfer_nft_with_did`

* Port `test_update_metadata_for_nft_did`

* Port `test_update_metadata_for_nft_did`

* Port `test_nft_bulk_set_did`

* Port `test_nft_transfer_nft_with_did`

* Port `test_nft_set_did`

* Port `test_set_nft_status`

* Port `test_nft_sign_message`

* Remove DEFAULT_TX_CONFIG

* Remove unnecessary WalletStateTransitions

* Swap out id variables with aliases

* Whoops

* Remove unused function

* Slightly clearer ResponseFailureError match in test_nft_wallet_rpc_creation_and_list.

* Fix a typo.

* Fix a typo in test_nft_bulk_transfer.

* Clarify the coinbase coins case in get_minter_did.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-09-04 23:45:11 +08:00
Rigidity 2fd02d53d1 Remove the coin amount from state layer solution (#18500)
* Remove the coin amount from state layer solution

* Remove unused imports
2024-09-04 23:44:51 +08:00
Matt Hauff c1d9a05ec7 [CHIA-1218] Raise on too much decimal precision in CLI (#18538)
* Raise on too much decimal precision in CLI

* Fix broken test
2024-09-04 01:27:13 +08:00
Matt Hauff 9ebd6a2d77 [CHIA-1234] Add bech32m options to some key functions (#18540)
Add bech32m options to some key functions
2024-09-04 01:26:59 +08:00
Arvid Norberg d69c840352 comment out test code that's not executed (#18547) 2024-09-03 23:22:52 +08:00
Arvid Norberg ab8ea7eb3c update long-reorg tests along with the reorg test chains (#18517)
update long-reorg tests along with the reorg test chains, to make the fork point be at a height > 0
2024-09-03 23:21:51 +08:00
Arvid Norberg c1a8771825 Bump chia rs 0.13.0 (#18543)
* bump chia_rs to 0.13.0

* update ConsensusConstants. It no longer has the unused fields
2024-09-03 23:19:54 +08:00
Matt Hauff 2b3999dded [CHIA-1220] Fix confusing amount-related CLI help messages (#18539)
Fix confusing amount-related CLI help messages
2024-08-30 21:39:15 +08:00
Amine Khaldi 8129b41473 CHIA-210 Introduce WalletSpendBundle and use it across code related to wallets (#18264)
Introduce WalletSpendBundle and use it across code related to wallets.
2024-08-30 21:36:26 +08:00
yakuhito 169a2d9f85 Fix request_fee_estimates (#18482)
fix request_fee_estimates
2024-08-28 22:27:34 +08:00
Matt Hauff c11db3f523 [CHIA-1129] Extract coin splitting logic from CLI -> RPC (#18480)
* Extract coin splitting logic from CLI -> RPC

* from typing extensions instead of typing

* Fix CLI test

* fix <3.10 compatibility

* Add tests

* pylint ignore
2024-08-28 22:27:16 +08:00
Florin Chirica 480725e560 Lint. 2024-08-28 04:20:31 +03:00
Florin Chirica d5e114c480 Lint. 2024-08-28 04:13:34 +03:00
Florin Chirica 146e4a35f5 Add cache. 2024-08-28 03:48:24 +03:00
Amine Khaldi 9610e2750d CHIA-1198 Add an end to end test for mempool bundle fill rate and the resulting block validation (#18509)
Add an end to end test for mempool bundle fill rate and the resulting block validation.
2024-08-28 00:00:00 +08:00
Amine Khaldi 7b18217ff5 CHIA-1214 Simplify Mempool::size() (#18526)
Simplify Mempool::size().
2024-08-27 23:59:37 +08:00
Arvid Norberg d5c36e38ac BlockchainInterface cleanups (#18522)
* use ... in BlockInfo protocol

* move prev_block_hash() from BlockchainInterface into BlockRecordsProtocol to transition find_fork_point_in_chain() and lookup_fork_chain() to use the more narrow protocol to lookup the chain

* the WalletBlockchain doesn't need to implement the full BlockchainInterface, but just BlockRecordsProtocol

* remove unused GeneratorBlockCacheInterface and BlockDict

* add unit test for BlockCache
2024-08-27 23:58:19 +08:00
Almog De Paz 483ec60771 fix long sync cache (#18514)
* fix long sync cache

* fix reorg test us add batch

* fix add_block and test

* lint

* ignore 0 height
2024-08-26 20:48:39 +08:00
Arvid Norberg d1844b6b15 CHIA-1101: update BlockGenerator type (#18508)
change the type of ref_list to List[bytes] instead of List[SerializedProgram]. Also, avoid passing the block generator twice to the worker process for validation
2024-08-23 01:08:27 +08:00
Arvid Norberg 700a67344b BlockchainInterface as a protocol (#18486)
* turn BlockchainInterface into a proper Protocol, to allow mypy to check it

* split out a subset of BlockchainInterface into BlockRecordsInterface

* separate BlockCache into the (simple) production use case and the (complex) test use case of mocking a blockchain object
2024-08-23 01:02:43 +08:00
Arvid Norberg 387c70ac8e pre_validate_blocks_multiprocessing Warm up the cache once per batch (#18484)
factor out warming up the cache from the inner loop. We don't need to do it for every block
2024-08-22 02:05:18 +08:00
Kyle Altendorf 5376d9e6ae maybe re-enable wallet ignore block validation autouse fixture (#18215) 2024-08-22 02:03:07 +08:00
Arvid Norberg 49a8aab5f0 get_puzzle_and_solution_for_coin() (#18434)
use the new, higher level, version of get_puzzle_and_solution_for_coin() from chia_rs. Also, pass along the ConsensusConstants passed in to get_name_puzzle_conditions(), get_puzzle_and_solution_for_coin(), get_spends_for_block() and mempool_check_time_locks()
2024-08-20 09:23:32 -07:00
Matt Hauff 63027f5068 Source offer confirmed height from original coin state (#18494) 2024-08-19 09:32:06 -07:00
Matt Hauff 64003a63f5 [CHIA-1067] Integrate coin selection with action scopes (#18424)
* Add TXConfig to action scopes

* Fix DID test

* Fix CR-CAT method

* Fix NFT offer test

* Utilize streamable for WalletSideEffects serialization

* Integrate coin selection with action scopes

* Fix action scope test

* Fix DID test

* Fix NFT tests

* Fix NFT tests
2024-08-19 09:02:36 -07:00
Kyle Altendorf dda307a677 add c_profile fixture 2024-08-16 12:29:58 -04:00
Kyle Altendorf 90c37a84e4 ignore astuple mypy complaint 2024-08-16 12:28:35 -04:00
matt-o-how 0a76e22489 Replace get_flags_for_height_and_constants() with Rust version (#18435)
* replace get_flags_for_height_and_constants with rust version

* remove unused imports

* isort
2024-08-17 00:26:17 +08:00
Florin Chirica 6094e0863f Lint. 2024-08-16 19:00:50 +03:00
Kyle Altendorf 96cb0a0ba4 Merge branch 'main' into fc.merkle_blob 2024-08-16 11:10:20 -04:00
Florin Chirica 827e86f137 Apply Kyle's change. 2024-08-16 17:56:01 +03:00
Florin Chirica d1a2092a1a Go with lower limits. 2024-08-16 05:23:23 +03:00
Gene Hoffman bd022b0c9b Timelord logging: Updated peak to hex from bytestring (#18467)
* Timelord logging: Updated peak to hex from bytestring

* Use bytes.hex instead of unsupported .hex

* Use .hex the right way and remember Earle is almost always right
2024-08-15 09:08:10 -07:00
Matt Hauff 126a8a2d83 [CHIA-1115] Optimize create_coins_with_amounts a bit (#18470)
* Optimize `create_coins_with_amounts` a bit

* Just generate new for each conflicting amount
2024-08-15 09:07:49 -07:00
Arvid Norberg 7596d71f8e bump chia_rs to 0.12.0 (#18473)
* bump chia_rs to 0.12.0

* ENABLE_MESSAGE_CONDITIONS has been removed and is enabled unconditionally

* update the name of Spend -> SpendConditions
2024-08-15 09:07:35 -07:00
Florin Chirica 5b764026c3 Add upsert. 2024-08-15 03:47:19 +03:00
Kyle Altendorf 7d88089e8f more bytes32.from_hexstr() (#18446) 2024-08-14 15:05:41 -07:00
Matt Hauff 6f72c9aa5f [CHIA-1068] Utilize streamable for WalletSideEffects serialization (#18415)
Utilize streamable for WalletSideEffects serialization
2024-08-14 15:05:17 -07:00
Kyle Altendorf 11123f85f7 refine streamable field typing to avoid an ignore (#18445)
* refine streamable field typing to avoid an ignore

* try again

* tidy

* maybe more

* overload

* non-overload

* typing_extensions
2024-08-14 15:04:49 -07:00
Amine Khaldi 18134d68b5 CHIA-1122 Simplify validate_block_body (#18468)
Simplify validate_block_body.
2024-08-14 15:04:27 -07:00
Matt Hauff 2c79776971 Deduplicate keychain code a bit (#18471) 2024-08-14 15:03:56 -07:00
matt-o-how b1893c7f8d Rename Spend to SpendConditions (#18438)
* initial commit

* more test fixes

* avoid using try except

* black

* isort tests

* fix line endings

* only support current version of chia_rs
2024-08-14 09:25:49 -07:00
Matt HauffandAmine Khaldi 723636b471 [CHIA-1092] Port test_cat_wallet.py to WalletTestFramework (#18439)
* temp

* Port `test_cat_creation`

* Port `test_cat_creation_unique_lineage_store`

* Delete `...reuse_address` test

* Port `test_get_wallet_for_asset_id`

* Port `test_cat_doesnt_see_eve`

* Port `test_cat_max_amount_send`

* Port `test_cat_hint`

* Port `test_cat_change_detection`

* Name test amount and fees in test_cat_creation.

* Use set_remainder for first test

* Match the ValueError we're expecting in test_cat_max_amount_send.

* Comment.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-08-14 09:25:01 -07:00
Arvid Norberg da01437b00 CHIA-1087: log the rate at which blocks are added during long sync (#18442)
log the rate at which blocks are added during long sync
2024-08-14 09:24:47 -07:00
Kyle Altendorf 5df8e81134 wait for it (#18459) 2024-08-14 09:24:03 -07:00