Commit Graph
1095 Commits
Author SHA1 Message Date
Kyle Altendorf fbdb27bef1 managers for services (#16670) 2023-11-16 19:21:12 -06:00
dependabot[bot]andKyle Altendorf e986d1e3ee build(deps-dev): bump mypy from 1.5.1 to 1.7.0 (#16788)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-11-14 12:20:56 -06:00
Arvid Norberg 95e5b97557 Use bls from chia rs (#16715)
* replace blspy imports with chia_rs imports for BLS types

* remove blspy-stubs, since we're dropping the blspy dependency. chia_rs has type stubs already
2023-11-07 09:06:52 -08:00
Arvid Norberg ca85e485e6 transition away from __bytes__ conversion for fixed-size integers (#16701) 2023-10-31 16:57:17 -05:00
Kyle Altendorf aaf081f69d explicit protocol checks against RpcServiceProtocol (#16710) 2023-10-27 12:03:15 -07:00
Kyle Altendorf 90c1441af0 apply pyupgrade --py38-plus --keep-runtime-typing (#14646) 2023-10-24 12:01:23 -05:00
Earle Lowe 05716c1984 Add timeouts and reduce flakes for datalayer (#16621) 2023-10-17 17:12:09 -05:00
Matt 2afa5ce8fe Remove Announcement class from chia-blockchain 2023-10-11 07:56:20 -07:00
Matt Hauff d29acde27a Make the standard wallet return List[TransactionRecord] (#16360) 2023-09-19 15:28:20 -05:00
Matt Hauff 018e812d85 Add extra_conditions to special offer making (#16340) 2023-09-15 21:00:57 -05:00
Matt Hauff efff83e7be Add timelock information to Trades and Transactions (#15915) 2023-09-12 11:28:01 -05:00
Florin ChiricaandKyle Altendorf b81772861f Configure number of stored full files in DL. (#16135)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-09-11 13:41:45 -05:00
Florin ChiricaandKyle Altendorf 8cc32ed213 Delete DL files on unsubscribe. (#16182)
* Delete files on unsubscribe.

* Handle none case.

* Fix test.

v

* typo

* Lint.

* Update chia/data_layer/data_layer.py

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

* Apply suggestions from code review

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

* rewiew comments.

* review

* Update test_data_rpc.py

* Lint.

* Fix conflict.

* Add retain option.

* Fix test.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-09-06 18:48:50 -05:00
Kyle Altendorf 1bbfcfaf89 add new plugins: config allowing for custom headers (#16194)
* add new `plugins:` config allowing for custom headers

* add a test
2023-09-06 17:42:25 -05:00
Kyle Altendorfanddustinface 53ab002502 @dataclass for DataLayer (#16204)
* `@dataclass` for `DataLayer`

* stop hashing `DataLayer`

* conditional shutdowns

* default for `none_bytes`

* separate

* Update chia/data_layer/data_layer.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Revert "separate"

This reverts commit 680d2833e4.

* default `._server`

* non-optional subscription lock

---------

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2023-09-06 13:01:46 -05:00
Kyle Altendorf 353f12d5a3 commonize signal setup (#13568)
* commonize signal setup

* add signal setup for async handlers

* future

* Update misc.py

* catch up

* logging

* missed one

* context manager and waiting for signal handlers to complete

* correct logging

* fixup

* fixup
2023-09-06 13:01:11 -05:00
Kronus91 3a82aacbbe Prevent redundant peer calls in coin_added (#15735)
* Refine coin_added

* Resolve comments

* Fix assert

* Fix pre-commit

* Resolve comments

* Resolve comments

* Resolve comments

* Resolve comment

* Add todo

* Add generic

* resolve comment

* Fix cat

* Resolve comments

* Fix test
2023-08-31 12:42:30 -05:00
Kyle Altendorf 4ba48af7a5 DataLayer fingerprint control (#16132)
* preliminary DataLayer fingerprint control implementation

* add cli and tests

* tidy

* catch up with `@pytest.mark.limit_consensus_modes`

* drop unneeded limit consensus modes

* deal with todos
2023-08-30 13:27:01 -05:00
Matt Hauff 6af4f86171 Add extra_conditions as an option to transaction endpoints (#15911)
Add extra_conditions as an argument to all transaction methods
2023-08-29 13:48:16 -05:00
Kyle Altendorf 39cf13288e tidy the DataLayer._update_confirmation_status() usage pattern (#16094)
tidy the `DataLayer._update_confiration_status() usage pattern
2023-08-23 23:03:25 -05:00
Matt Hauff 000499484d Add the option for arbitrary conditions to make_solution (#15888)
* Add the option for arbitrary conditions to make_solution

* Unknown conditions should come first

* Fix related VC driver bug
2023-08-18 14:04:27 -05:00
Matt Hauff a545e6a8a7 Introduce TXConfig and CoinSelectionConfig (#15666)
* Explore TXConfig

* test fixes

* more test fixs

* more test fixs

* Make TXConfig a CoinSelectionConfig subclass

* Move RPC config loading into decorator

* Fix mempool performance test

* Fix wallet sync test

* Fix streamable

* Forgot send_transaction_multi

* Remove potentially_inside_lock change

* Add .override to config object

* A few fixes from review

* Get create_message_spend working with tx_config.reuse_puzhash

* pylint and rebase fixes

* Add tests for CMD loaders

* Add RPC client and tests for cancel_offers endpoint

* Add some coverage

* Fix did test

* Add DID test coverage

* add tests for TXConfig & CoinSelectionConfig

* Add reuse_puzhash to dl wallet test

* Add reuse puzhash to dl_wallet test

* Add test coverage to wallet sync test

* Add more tests for TXConfig

* Add tests for coin_funcs.py

* Add some wallet_funcs tests

* Bad merge

* Fix bad test

* condense cmd tests

* test coverage ignore

* merge fix

* Undo GUI change

* Remove a couple of unused tx_endpoints

* Changes due to (#15846)

* Merge fixes

* new=True

* Fix the coins tests

* Fix DID tests

* Fix NFT tests

* Fix VC tests

* Fix wallet tests

* Delete now uneccessary tests

* Fix bad change
2023-08-18 14:03:37 -05:00
Amine Khaldi f7f4b4ad56 Merge commit 'f1ad0d29d2de8ae94b02a8c5edf9456e593d125a' into checkpoint/main_from_release_2.0.0_f1ad0d29d2de8ae94b02a8c5edf9456e593d125a 2023-08-17 16:45:53 +01:00
Kyle Altendorf f1ad0d29d2 fix DataLayer deadlock (#15971)
* fix DataLayer deadlock

* less consistent, less diff

* remove comment

* add test for deadlock

* adjust
2023-08-14 20:02:48 -05:00
Matt Hauff 289260c374 Credential Restricted CATs (#15411)
* Allow create_tandem_xch_tx to take a set of announcements

* Create potential announcement in correct arm of create_tandem_xch_tx

* Make does_coin_belong_to_wallet more robust

* Add match_hinted_coin to wallet protocol

* Add CROuterPuzzle

* Add conditions with fee announce.clsp

* Add CRCATWallet

* Add CLI support for CR-CATs

* Fix bug in CATOuterPuzzle

* Add SOFTFORK_HEIGHTS as an exportable variable from conftest

* Allow specifying num of blocks to farm to wallets_prefarm_services

* Add potential subclasses to cat wallet creation

* Integrate CR-CATs into offers

* Address comments by @geoffwalmsley

* Add CRCAT info to get_wallets

* Changes due to (#15846)
2023-08-03 19:36:21 -05:00
Matt Hauff 226c601764 Remove hack_populate'ing secret keys (#15846)
* Remove hack_populate'ing secret keys

* Add an optional version of get_private_key

* test fixes

* remove pool wallet's sign method

* Move sign_transaction to wallet_state_manager

* Add test coverage

* Fix PoolWallet

* Test coverage

* remove e_msg
2023-07-31 11:16:21 -05:00
Kyle Altendorf 5052cc2fd4 limit DataStore.get_pending_root() query (#15607) 2023-07-24 20:02:18 -05:00
Kyle Altendorf 345f096192 limit DataStore.get_tree_root() query (#15604) 2023-07-24 20:02:09 -05:00
Kyle Altendorf 7fe09a3b12 recursive query for DataStore.get_terminal_node_for_seed() (#15602)
* recursive query for `DataStore.get_terminal_node_for_seed()`

* only select needed columns

* recover matching node selection

* no more limit

* limit

* ignore

* fixup
2023-07-24 20:01:15 -05:00
Kyle Altendorf 5f8881ee66 limit DataStore._insert_ancestor_table() query (#15606) 2023-07-24 20:01:05 -05:00
Kyle Altendorf 839a2a7f13 limit DataStore.tree_id_exists() query (#15608) 2023-07-24 20:00:58 -05:00
Kyle Altendorf d3698b2873 limit DataStore.get_node_type() query (#15609) 2023-07-24 20:00:48 -05:00
Kyle Altendorf 02d1d609fc limit DataStore.get_node() query (#15611) 2023-07-24 20:00:40 -05:00
Kyle Altendorf 9a08be7b0b cleanup basic asyncio.CancelledError uses for 3.8 (#15801) 2023-07-24 20:00:14 -05:00
Matt Hauff 217e81f478 Move some puzzles out of chia.wallet.puzzles (#15822) 2023-07-24 10:39:16 -05:00
Earle LoweandKyle Altendorf a4471bfa8a pass DataLayer root and generation instead of requerying (#15613)
* Cache root changes in insert_batch loop

* Reduce selects for root and generation

* remove sql logging, extracted to https://github.com/Chia-Network/chia-blockchain/pull/15690

* remove optimization extracted to https://github.com/Chia-Network/chia-blockchain/pull/15691

* remove optimization extracted to https://github.com/Chia-Network/chia-blockchain/pull/15728

* Delete test_batch_speed.py

benchmark provided in another already merged pr

* add `Root.to_row()`

* shift optimization to `DataStore.get_keys_values_dict()`

* rename to `intermediate_root`

* less tuple returning

* Revert "shift optimization to `DataStore.get_keys_values_dict()`"

This reverts commit b12ae08e3b.

* add `test_data_store.test_insert_batch_reference_and_side()`

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-07-19 13:47:17 -05:00
Kyle Altendorf aa3e1563e8 avoid DataLayer insert ancestors precheck (#15728)
* avoid DataLayer insert ancestors precheck

* remove original change

* update

* no cover `:[`
2023-07-17 15:37:27 -05:00
Matt Hauff 80c07a7476 Remove references to old offer mod (#15694)
* Remove references to old offer mod

* Add guards in RPC against parsing old offers

* Fix benchmark test

* test coverage
2023-07-17 15:02:04 -05:00
Kyle Altendorf 9aae96df08 avoid DataLayer insert precheck (#15691)
* avoid DataLayer insert precheck

* just check the string...

* Update test_data_store.py

* Update data_store.py

* no cover `:[`
2023-07-17 13:15:41 -05:00
Kyle Altendorf ca34240b43 add sql logging config for DataLayer (#15690)
* add sql logging config for DataLayer

* add test

* data_sql.log
2023-07-17 13:15:22 -05:00
Kyle Altendorf f66b521067 Add DataLayer clear pending roots interfaces (#15516)
* add clear pending roots cli and rpc

* add tests

* drop extracted changes

* remove extracted change

* tidy

* add --yes

* handle todo

* more todo
2023-06-29 20:49:54 -05:00
dustinfaceandKyle Altendorf 49140b2b3c server: Introduce ApiProtocol (#15466)
* server: Introduce `ApiProtocol`

* genericize (#5)

* `ApiProtocol.api_ready` -> `ApiProtocol.ready()`

* Add `ApiProtocol.log` and give APIs separate loggers

* Fix `CrawlerAPI`

* Drop some unrelated removals

* Fix some of the generic hinting

* Revert some changes in `timelord_api.py`

* Fix `CawlerAPI` readiness

* Fix hinting

* Get some `CrawlerAPI` coverage

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-06-13 20:12:25 -05:00
Matt Hauff 79bf694800 Add **kwargs to all generate_signed_transaction definitions (#15240)
* Add **kwargs to all generate_signed_transaction definitions

* Add support for VC wallet too

* attempt to hint kwargs

* Import TypedDict from typing_extensions instead

* Fix tail driver call to generate_signed_transaction
2023-06-13 17:24:17 -05:00
Earle Lowe c55be8e163 Check all peers when subscribing/tracking to new DL singleton (#15427) 2023-06-05 11:26:56 -05:00
dustinface 6efc97a96a data_layer: Avoid redundant coin state fetching (#15212)
* Always pass the height into `new_launcher_spend`

* Drop `new_launcher_spend`
2023-05-08 20:48:58 -05:00
dustinface 994aa24e44 wallet: Give Payment.memos a default value (#15172) 2023-05-03 00:30:53 -05:00
Kyle Altendorf 322c54f6e3 rework class protocol check pattern (#15134) 2023-04-27 09:56:37 -05:00
dustinface aa40fa7f21 wallet: Drop AmountWithPuzzlehHash, use Payment instead (#15019) 2023-04-27 09:52:27 -05:00
Earle Lowe 75caa352a7 New S3 plugin endpoints for add_store_id and remove_store_id (#15030)
* add_store_id and remove_store_id endpoints

* handle bucket info during add/remove

* Updated add and remove store id endpoints

* fix typo
2023-04-19 14:22:54 -05:00
Earle Lowe 7f0c338a27 Add timestamp and formatting to S3 plugin log (#15083)
* add date/time to log output

* minor comment fix

* configurable log_level
2023-04-19 14:03:37 -05:00