Commit Graph
5861 Commits
Author SHA1 Message Date
13b75e8a39 Add Python 3.12 support (#14423)
* start adding python 3.12 support

* add missing comma

* include 3.12

* allow 3.12 in install.sh

* Bump chia wheels for python 3.12

* bump chiabip158

* Use datetime.timezone.UTC

* Update create_ssl.py

* UTC->utc

* Use datetime.timezone.utc

* bump chiavdf

---------

Co-authored-by: Earle Lowe <e.lowe@chia.net>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2024-03-08 19:00:02 -08:00
Kronus91 59e7cd8e26 Delete unconfirmed Clawback TX (#16454)
* Delete unconfirmed Clawback TX

* Fix coverage
2024-03-08 18:59:30 -08:00
Chris MarslenderandKyle Altendorf 26d5a253af Move get_network_info endpoint to the base rpc server class (#17662)
* Add get_network_info endpoint to the base rpc_server class, remove dupe implementations from wallet/full_node
Enables also getting network info from other RPC servers (crawler, etc)

* Add get_network_info test to full_node

* Remove unused var

* Update tests/core/test_full_node_rpc.py

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

* Use context manager for client

* Add success: true to the assertion to be complete

* Remove the **

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-03-07 16:19:26 -06:00
Kyle Altendorf 57193aec94 watchdog==4.0.0 (#17666) 2024-03-07 12:31:14 -08:00
Matt Hauff cbcc80a486 Port test_nft_wallet.py::test_nft_wallet_creation_and_transfer to WalletTestFramework (#17651)
* Use WalletTestFramework for test_cat_wallet::test_cat_spend

* Fix trade test

* Fix RPC test

* Port tests/wallet/nft_wallet/test_nft_wallet.py::test_nft_wallet_creation_and_transfer to WalletTestFramework

* Get new tx records from add_pending_transactions

* couple more test files
2024-03-06 10:07:25 -08:00
Amine Khaldi 7dc8b66c00 Merge commit 'b5ab1dd243812dd5296235f2683ed82ce69fdd52' into checkpoint/main_from_release_2.2.1_b5ab1dd243812dd5296235f2683ed82ce69fdd52 2024-03-05 20:08:05 +01:00
Matt Hauff 18f4e74cb2 Use WalletTestFramework for test_cat_wallet::test_cat_spend (#17630)
* Use WalletTestFramework for test_cat_wallet::test_cat_spend

* Fix trade test

* Fix RPC test
2024-03-05 10:54:34 -08:00
Matt Hauff 536a96241d Various test flakiness fixes (#17650) 2024-03-05 10:53:48 -08:00
Amine Khaldi 0c0cda5e9f Merge commit 'f499f9dd67a5e88458b722ebe29f2b809655a748' into checkpoint/main_from_release_2.2.0_f499f9dd67a5e88458b722ebe29f2b809655a748 2024-03-04 15:24:08 +01:00
Amine Khaldi a38d24ebcf Merge commit '320d8815911ca136807bb36493b567ce7e0deee1' into checkpoint/main_from_release_2.2.0_320d8815911ca136807bb36493b567ce7e0deee1 2024-03-01 19:32:13 +01:00
Amine Khaldi 5d8a917448 Merge commit 'd3d0f1b9810309c81881718e44edda27d4a62d24' into checkpoint/main_from_release_2.2.0_d3d0f1b9810309c81881718e44edda27d4a62d24 2024-03-01 11:45:02 +01:00
Earle Lowe b5ab1dd243 Update code to find packaged plotters in _internal directory (#17617) 2024-02-29 10:35:13 -08:00
Kyle Altendorf 151d3555e0 use QueuedAsyncPool for DataLayer.periodically_manage_data() subscription handling (#17550)
* preliminary `AsyncPool`

* touchup

* use `AsyncPool` for `DataLayer.periodically_manage_data()` subscription handling

* fix

* tweak

* more

* test worker exception logging

* ignore

* add `QueuedAsyncPool`

* use `QueuedAsyncPool`

* fix

* cleanup

* tidy

* fixup

* fixup

(cherry picked from commit 484f34044d)

* Update data_layer.py

* fixup test coverage
2024-02-27 15:42:19 -08:00
Florin ChiricaandKyle Altendorf 368fecc17e DL multiple batch updates. (#17414)
* DL multiple batch updates.

* Lint.

* Lint.

* Add RPCs.

* Lint

* Lint

* Lint

* Add test.

* Lint.

* Add publish pending root option.

* Improve test.

* Fix cmd.

* Lint.

* Fix test

* Revert

* Add test.

* More tests.

* Improve test.

* Apply suggestions from code review

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

* Lint.

* Test.

* Latest local root.

* Change publish to submit.

* More submit instead of publish.

* Coverage.

* Lint.

* Improve coverage.

* Lint.

* Lint.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-02-23 09:56:00 -08:00
Adam KellyandAmine Khaldi cc5a5a9308 Remove unused parameter (#17598)
* Remove unused parameter

* Unroll some test cruft

* ('preserve tuple',)

* isort

* update test

* Update the Wallet RPC Api call in is_transaction_confirmed, and remove the no longer used user_wallet_id param.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-02-23 09:55:38 -08:00
Kyle Altendorf 1855f99cce cleaner cli output for rpc client fetch errors (#17460)
* cleaner rpc client fetch errors

* remove incorrect json'ing in test and adjust runtime

* init

* drop `use_ssl=` parameter

* more

* more

* Revert "more"

This reverts commit cce36d5012.

* Revert "more"

This reverts commit 318929d5ae.

* again

* tweak

* update existing tests

* undo...

* back-compat

* test no consummption

* tidy
2024-02-23 09:55:07 -08:00
b2df28e3cb Extract RPC push logic into @tx_endpoint wrapper (#17544)
* Don't autopush transactions by default anywhere

* Remove ignore_max_send_amount

* Use TXConfig instead of pending_transactions for coin exclusion in spend_clawback_coins

* Unify transaction pushing into a single method

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount

* Return offer transactions from create_offer_for_ids

* Return transaction list from CATWallet.create_new_cat_wallet

* Add a marshaller for RPC APIs

* Missed an instance in a newer test

* Missed an instance in a newer test

* Rename bad variable names I guess????

* Fix DL wallet transaction generation

* Add RPCEndpoint comment

* Address comments by @altendky

* Just go back to Streamable for requests

* Just go back to Streamable for requests

* Take suggestion from altendky

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

* Terrible suggestion by @altendky

* Inadvertent changes

* Formatting

* Add path for raises in endpoints

* pylint

* We're aiming for WalletRpcApi at the moment and we plan to extend this eventually.

* Import WalletRpcApi only when type checking.

* Sure sure Mr. Pylint..

* Add backwards compatibility code

* Better comment

* variable referenced before assignment

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-02-22 23:17:18 -08:00
Chris Marslender 1cce93e39f Set unique peer filenames when swapping to/from testnets (#17592)
Set unique peer filenames when swapping to testnet
2024-02-21 13:10:12 -08:00
Arvid Norberg eb543fd888 transition FullBlock and BlockRecord to rust (#17525)
* use rust version of FullBlock and UnfinishedBlock

* use rust type for BlockRecord
2024-02-20 13:11:31 -08:00
Arvid Norberg 036313fc7e remove support for migrating peers from legacy file format (#17517) 2024-02-20 13:11:00 -08:00
Kyle Altendorf b827f57924 clvm_tools==0.4.8 (#17575)
* `clvm_tools==0.4.8`

* remove type ignores
2024-02-20 09:31:28 -08:00
StartToaster d9f5f3ec3f checkpoint: into main from release/2.2.0 @ 654d327729 (#17558)
Source hash: 654d327729
Remaining commits: 5
2024-02-16 10:17:23 -08:00
Kyle Altendorf 1a71a77f62 remove config todo comment from a long time ago (#17566) 2024-02-16 10:17:00 -08:00
Arvid Norberg a9ee02bd8e optimize validate_removals() (#17560)
* transition validate_removals() to use the fast function to compute a merkle tree root

* add type annotations to test_merkle_set.py

* add tests for validate_removals() and validate_additions(), just the case of including all items
2024-02-16 10:16:50 -08:00
Kyle Altendorf 821910b1b3 avoid datalayer manage data loop delay for self subscriptions (#17536) 2024-02-16 10:16:23 -08:00
Sebastjan Trepca b5146462eb Hint support for SpendSim (#17490)
* added support for hints

* test + mypy fix

* black fix and typo

* test coverage
2024-02-15 13:16:27 -08:00
Chris Marslender f499f9dd67 Add testnet11 constants to config if missing when configuring to run on testnet (#17568)
* If missing, add testnet11 constants to config file

* Run isort

* Be specific about which parts are missing when updating config

* Run black
2024-02-15 13:15:31 -08:00
Earle Lowe 063f55cb0f Handle when xch_target_address in config doesn't decode correctly (#17523)
* Handle when xch_target_address in config doesn't decode correctly in delete key flow

* change helper function name

* lint fix
2024-02-15 09:40:59 -08:00
Geoff Walmsley 11455eef33 Fix DID update metadata bug #17412 (#17527)
* Fix DID update metadata bug #17412

* coverage
2024-02-15 09:40:49 -08:00
Arvid Norberg 362414c226 remove old unhashable special case in Streamable (#17561)
remove old unhashable special case in Streamable. This simplifies the streamable implementation
2024-02-15 09:40:30 -08:00
Amine Khaldi 60248497e4 Merge commit '654d32772931851ba2814b13c705518c27b850a7' into checkpoint/main_from_release_2.2.0_654d32772931851ba2814b13c705518c27b850a7 2024-02-14 20:14:24 +01:00
Amine Khaldi 0c5b4284bb Introduce satisfies_hint to check objects against type hints, use it in from_kwargs and fix all the incorrect and missing cases (#17375)
Introduce satisfies_hint to check objects against type hints, use it in from_kwargs and fix all the incorrect and missing cases.
2024-02-14 11:13:43 -08:00
320d881591 Send RewardChainBlockUnfinished to third-party harvesters (#17435)
* Send RewardChainBlockUnfinished to the harvester

- Simplify data pasing in request_signed_values

* Fix instances where the rc_block_unfinished must be sent

* Lint, fix test, generate protocol messages

* Rate Limit Adjustment for RequestSignedValues (#17481)

* Further bump request_signed_values rate limit

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Luna <96448399+DaOneLuna@users.noreply.github.com>
2024-02-14 11:09:58 -08:00
Earle Lowe d3d0f1b981 Use Datalayer banning logic for HTTP download failures (#17515)
* use server_missed_file when http download fails

* Add test that we ban servers on http download failure
2024-02-14 11:09:46 -08:00
Amine Khaldi 0ac4c7b08f Augment match_clawback_puzzle to accept both types of programs (#17519)
Augment match_clawback_puzzle to accept both programs and serialized programs for inner puzzle and solution.
2024-02-14 11:09:38 -08:00
Amine Khaldi 63213f80a5 Add indices on used and hardened for derivation_paths, sort the others and remove a redundant one (#17532)
Add indices on used and hardened for derivation_paths, sort the others and remove a redundant one.
2024-02-14 11:09:28 -08:00
Amine Khaldi 06e3caca6d Remove no longer needed index_for_puzzle_hash_and_wallet (#17541)
Remove no longer needed index_for_puzzle_hash_and_wallet.
2024-02-14 11:09:09 -08:00
Florin ChiricaandKyle Altendorf fa220629ec DL RPC pagination. (#17347)
* DL RPC pagination.

* Lint.

* Lint.

* Add RPCs.

* Lint.

* Lint.

* Add test.

* Lint.

* Add root_hash.

* Coverage.

* Fix bug.

* Update chia/cmds/data.py

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

* Dedupe.

* Lint.

* Add reference dict to test.

* Fix test.

* Fix test.

* Fix test.

* Fix test.

* Lint.

* Fix test

* Lint

* Remove short option.

* Add test.

* Lint.

* Update tests/core/data_layer/test_data_rpc.py

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-02-14 11:08:20 -08:00
Amine Khaldi 71166f18c8 Augment match_dl_singleton to accept both types of puzzles (#17520)
Augment match_dl_singleton to accept both types of puzzles.

This allows us to use serialized programs without the need to convert them into programs.
2024-02-12 10:05:09 -08:00
Amine Khaldi 48586364e0 Speedup WalletTransactionStore's add_transaction_record (#17528)
Speedup WalletTransactionStore's add_transaction_record.
2024-02-12 10:04:51 -08:00
Amine Khaldi e47f531ff2 Remove redundant index on primary key in key_val_store (#17534)
Remove redundant index on primary key in key_val_store.
2024-02-12 10:04:17 -08:00
Amine Khaldi 07aa94ebf7 Add missing index on transaction_record's trade_id for get_transactions_by_trade_id, sort the others and remove a redundant one (#17535)
Add missing index on transaction_record's trade_id for get_transactions_by_trade_id, sort the others and remove a redundant one.
2024-02-12 10:02:33 -08:00
Earle Lowe 59cbb96c56 use click.Path for make_offer command filename (#17538)
use click.Path for make_offer command
2024-02-10 13:18:52 -08:00
Amine Khaldi 5dca50c259 Remove redundant index on primary key in trade_records (#17531)
Remove redundant index on primary key in trade_records.
2024-02-10 13:18:23 -08:00
Amine Khaldi a07058cad1 Fix a typo in primary key creation in SpendSim's block_data (#17533)
Fix a typo in primary key creation in SpendSim's block_data.
2024-02-10 13:17:51 -08:00
Amine Khaldi 8fcff28898 Speedup WalletTransactionStore's _get_new_tx_records_from_old (#17529)
Speedup WalletTransactionStore's _get_new_tx_records_from_old.
2024-02-09 13:39:17 -08:00
Amine Khaldi 9be97306d2 Merge commit '35ab75309e901ad57e54b6256923f831c577d215' into checkpoint/main_from_release_2.2.0_35ab75309e901ad57e54b6256923f831c577d215 2024-02-09 20:52:23 +01:00
StartToaster 11b41944cf checkpoint: into main from release/2.2.0 @ cbf3d7f252 (#17498)
Source hash: cbf3d7f252
Remaining commits: 1
2024-02-09 11:51:50 -08:00
Arvid Norberg fe89b5b782 undo some unnecessary int type casts (#17521)
* undo redundant type-casts from slots, SubEpochSummary and SubEpochData

* undo redundant type-casts from proof-of-space, reward chain and foliage types

* undo redundant type-casts from VDFInfo, VDFProof and ClassgroupElement

* remove unnecessary type annotation
2024-02-08 15:29:33 -08:00
Matt HauffandAmine Khaldi 76bb49c4fd Return TXs from CATWallet and Offer creation (#17506)
* Don't autopush transactions by default anywhere

* Remove ignore_max_send_amount

* Use TXConfig instead of pending_transactions for coin exclusion in spend_clawback_coins

* Unify transaction pushing into a single method

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount

* Return offer transactions from create_offer_for_ids

* Return transaction list from CATWallet.create_new_cat_wallet

* Missed an instance in a newer test

* Missed an instance in a newer test

* Simplify processing some transaction records.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-02-08 09:04:49 -08:00