Commit Graph
318 Commits
Author SHA1 Message Date
Matt HauffandGitHub 4ace81ae17 [LABS-294] Add kw_only to all wallet RPC types (#20324)
Add `kw_only` to all wallet RPC types
2026-01-21 09:48:44 -08:00
Matt HauffandGitHub 2b3c11e170 [CHIA-3610] Port cancel_offer(s) to @marshal (#20066)
* Port `cancel_offer` to `@marshal`

* Port `cancel_offers` to `@marshal`

* forgot `push=True`
2025-11-25 10:57:19 -08:00
Matt HauffandGitHub 5ffb3618a3 [CHIA-3609] Port get_offer(s) to @marshal (#20062)
* Port `get_offer` to `@marshal`

* Port `get_all_offers` to `@marshal`
2025-11-21 09:45:26 -08:00
Matt HauffandGitHub 40db4635a8 [LABS-245] Enable PEP604 Ruff rules (#20269)
* Enable PEP604 Ruff rules

* Fix harcoded signature in test

* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00
Matt HauffandGitHub 74ec8a44d4 [CHIA-3608] Port take_offer to @marshal (#20061)
* Port `take_offer` to `@marshal`

* `TransactionEndpointRequest` misses
2025-11-06 09:35:24 -07:00
Matt HauffandGitHub 284310d637 [CHIA-3607] Port get_offer_summary to @marshal (#20058)
* Port `get_offer_summary` to `@marshal`

* test coverage
2025-10-31 08:55:36 -07:00
Matt HauffandGitHub 0a26924688 [CHIA-3606] Port create_offer_for_ids to @marshal (#20056)
* Port `create_offer_for_ids` to `@marshal`

* Self from typing_extensions

* Fix support for "" in PuzzleInfo/Solver
2025-10-21 11:00:37 -07:00
Kyle Altendorf fb8de7a1b3 Merge commit 'dac837e79961fa5ce9611d5531d789211031c465' into catchup/long_lived_datalayer_merkle_blob_from_main_dac837e79961fa5ce9611d5531d789211031c465 2025-07-11 22:35:57 -04:00
Matt HauffandGitHub f782fa8341 [CHIA-1315] Port (wallet) DataLayer endpoints to @marshal (#19689)
* Port `create_new_dl`

* Forgot default_raise

* Port `dl_track_new`

* Port `dl_stop_tracking`

* Port `dl_latest_singleton`

* Port `dl_singletons_by_root`

* fix test

* Port `dl_update_root`

* Port `dl_update_multiple`

* fix tests

* Port `dl_history`

* Port `dl_owned_singletons`

* Port `dl_get_mirrors`

* Make `Mirror` streamable (and fix test)

* Port `dl_new_mirror`

* push=True

* Port `dl_delete_mirror`

* Port `dl_verify_proof`

* Fix test

* fix import
2025-06-27 11:29:24 -07:00
Kyle Altendorf 668548cd33 Merge commit 'da20e4145fb6279d6880fd998b62456237e2f700' into catchup/long_lived_datalayer_merkle_blob_from_main_da20e4145fb6279d6880fd998b62456237e2f700 2025-06-23 22:03:50 -04:00
Kyle AltendorfandGitHub 32ca9c0804 by service not layer (#19715)
* by service not layer

* monkey patch fixup
2025-06-16 14:31:51 -07:00
Kyle Altendorf 10d957680b Merge commit 'a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd' into catchup/long_lived_datalayer_merkle_blob_from_main_a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd 2025-05-29 13:15:14 -04:00
Richard KissandGitHub a803d18c3b The chia.protocols module no longer depends upon chia.server. (#19636)
<!-- 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?) -->

The modules `chia.protocols` and `chia.server` form a dependency loop.
This change at least removes the direct dependency of `chia.protocols`
on `chia.server`.

### 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) -->
2025-05-29 09:24:29 -07:00
Kyle AltendorfandGitHub ed4c5bfaca store merkle, key, and value blobs in files (#19528)
* store merkle, key, and value blobs in files

* update expected columns

* fixup tests

* more

* cleanup disk

* better wrapped path identification

* todos for potential filesystem locking

* suppress not precheck

* handle not-present new path configuration entries

* log exception

* replace hard coded 32

* three layers of directories for bytes paths
2025-04-25 11:56:59 -04:00
Kyle AltendorfandGitHub 96d5c9f2fa DL Config cache size. (#19476)
<!-- 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) -->
2025-04-24 09:38:34 -04:00
Kyle Altendorf 779dd43f72 Merge commit 'c97f0a1777d455d9a1d26a028362425e634ee066' into catchup/long_lived_datalayer_merkle_blob_from_main_c97f0a1777d455d9a1d26a028362425e634ee066 2025-04-17 19:46:57 -04:00
Kyle AltendorfandGitHub c97f0a1777 add chia dev data sync-time for doing datalayer sync time tests (#19437)
* add `chia dev data sync-time` for doing datalayer sync time tests

* add chia stop -d all at the end

* less subprocessing

* remove dead log file code

* add subcommand help messages

* correct for 3.9 support

* allow for days of timing

* format done message

* more info

* fixup

* fixup

* stuff

* more try finally

* add minutes

* add `--working-path`
2025-04-17 16:21:38 -05:00
Florin Chirica 08496cb453 DL Config cache size. 2025-04-07 23:52:20 +03:00
Kyle Altendorf 7a6e9b3d12 Merge commit '329ce24c89e29f8c7f0d4a8bb4d04fc2b0438d95' into catchup/long_lived_datalayer_merkle_blob_from_main_329ce24c89e29f8c7f0d4a8bb4d04fc2b0438d95 2025-03-04 16:43:20 -05:00
Kyle AltendorfandGitHub d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08:00
Kyle AltendorfandGitHub 1567fa3df6 use chia_rs proof of inclusion for datalayer (#19327) 2025-02-27 14:19:38 -05:00
Kyle AltendorfandGitHub c09d63ccb0 extract sibling hash and side methods as functions (#19324) 2025-02-26 10:52:21 -05:00
Kyle AltendorfandGitHub 5c68281a81 more datalayer rust transition prep (#19306)
* more datalayer rust transition prep

* tidy
2025-02-26 07:57:50 -05:00
Kyle Altendorf b54c22faf0 Merge commit 'e446d6b726a03f6d917083b4d039abfec503e54e' into catchup/long_lived_datalayer_merkle_blob_from_main_e446d6b726a03f6d917083b4d039abfec503e54e 2025-02-25 11:30:14 -05:00
Kyle AltendorfandGitHub e446d6b726 use chia_rs directly for sized ints (#19303)
* use chia_rs directly for sized ints

* Update data_layer_rpc_api.py
2025-02-24 14:33:09 -08:00
Kyle Altendorf b000714e26 Merge commit '084599bf2b51dbc7beef983d88e44724c24b7698' into catchup/long_lived_datalayer_merkle_blob_from_main_084599bf2b51dbc7beef983d88e44724c24b7698 2025-02-03 10:54:45 -05:00
Matt HauffandGitHub 5e0d6a4463 [CHIA-2192] Add singleton records to action scopes (#19138)
* Add singleton_records to action scopes

* Extract SingletonRecord to its own file

* Fix test_lifecycle

* Fix wallet action scope test mock
2025-01-27 08:19:54 -07:00
Kyle Altendorf 1cad89f47c Merge commit '2b1aef889b4412d9637d77ae238ed5f64f44f674' into catchup/long_lived_datalayer_merkle_blob_from_main_2b1aef889b4412d9637d77ae238ed5f64f44f674 2025-01-03 12:41:10 -05:00
Kyle AltendorfandGitHub 1ffa73e99e task referencer (#18914)
* put otherwise unheld tasks into the pit

* and the rest too

* cull less often

* task referencer

* private

* report unexpectedly unreferenced tasks

* also warn for automated catching in tests

* reporting task

* undo some

* fixup for 3.9

* ban asyncio.create_task

* oof

* simplify including using `Task.add_done_callback()` for culling
2025-01-02 10:13:51 -07:00
Kyle Altendorf 823f18643f Merge commit 'ccd6f13e6cc2f4c7a0a150a1e26117c50fcfbe82' into catchup/long_lived_datalayer_merkle_blob_from_main_ccd6f13e6cc2f4c7a0a150a1e26117c50fcfbe82 2024-12-18 11:57:02 -05:00
Earle LoweandGitHub beff6e2aed CHIA-2022: Fix problems with startup timing and the Datalayer processing loop (#19014)
Catch some more exceptions when getting owned stores in DL loop
2024-12-12 09:51:50 -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
6c90a76b56 Tighten up ruff ignore list (#18837)
* Tighten up ruff ignore list

* Okay that fix was indeed unsafe

* enable type-name-incorrect-variance

* enable literal-membership

* enable non-augmented-assignment

* enable useless-return

* enable global-variable-not-assigned

* -

* fixup

* Clean up roff.toml from annotations

* use ignore instead of explicit re-export

* use more descriptive names

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-11-12 12:19:31 -07:00
Matt HauffandGitHub 2808ee2446 [CHIA-1681] Replace black with Ruff (#18813)
* Replace black with Ruff

* Change build_network_protocol_files.py
2024-11-04 15:22:18 -07:00
Florin Chirica 7765bbd504 Lint. 2024-10-29 06:01:22 +02:00
Florin ChiricaandGitHub 81083b2176 Merge branch 'long_lived/datalayer_merkle_blob' into fc.dl_integration 2024-10-29 05:20:52 +02:00
Florin Chirica de52d3899e Migrate old DB. 2024-10-25 17:57:41 +03:00
Kyle AltendorfandGitHub 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 27b36c9a4c Fix more tests. 2024-10-22 04:41:32 +03:00
Kyle AltendorfandGitHub 9c8557a1f8 Remove Python 3.8 support and update source to 3.9 standards (#18687)
* manual python 3.8 removals

* poetry

* pyupgrade

* black

* isort

* manually tidy imports

* work around shadowed type

* catch up build network protocol files for pyupgrade changes

* placate pylint

* re-enable 20.04

* placate flake8
2024-10-16 14:21:15 -07:00
Florin ChiricaandGitHub 743c455ed2 Merge branch 'long_lived/datalayer_merkle_blob' into fc.dl_integration 2024-10-16 03:56:51 +03:00
Florin Chirica 89721b68b3 Checkpoint fix tests. 2024-10-02 04:29:37 +03:00
Earle LoweandGitHub 7759619b58 [CHIA-1427]: Limit full file creation when processing subscription generations (#18612)
* Some logging and some code to limit full file generation based on the max number of full files allowed

* Don't write out full files that aren't needed

* Black fixes

* Adjust the full file during error conditions

* No need for try
2024-09-30 09:33:08 -07:00
Matt HauffandGitHub bffb7b11c3 [CHIA-1307] Port key management RPCs to @marshal decorator (#18593)
* Port `log_in` to decorator

* Port `get_logged_in_fingerprint` to decorator

* Port `get_public_keys` to decorator

* Port `get_private_key` to decorator

* Port `get_mnemonic` to decorator

* Port `add_key` to decorator

* Port `delete_key` to decorator

* Port `check_delete_key` to decorator

* Port `delete_all_keys` to decorator

* Bad copypasta
2024-09-24 15:08:09 -07:00
Amine Khaldi a712409bbc Merge commit 'd1464da947f04554e8680009539b80723c65cef7' into checkpoint/main_from_release_2.4.3_d1464da947f04554e8680009539b80723c65cef7 2024-08-08 17:05:23 +01:00
Earle LoweandGitHub d1464da947 CHIA-783: Stop auto-subscribing to local stores (#18166)
* less auto-subscribing

* Make sure to include owned stores in the managed data loop

* Rearrange flaky test

* trying out flaky and increase timeout

* Test adjustments

* Change to not actually subscribing to owned stores

* Fix up typo

* More test adjustments

* return error when unsubscribing from not-subscribed store

* Add flaky

* flaky is optional dependency

* Increase timeout testing

* Ignore errors in getting owned stores during data loop

* Undo changes to test code

* Need to self-subscribe in unsub tests

* Add tests for auto_subscribe_to_local_stores

* Add negative test and remove flaky

* Linting

* Some test adjustments

* Linting fixes

* updates per PR comments
2024-08-07 11:54:45 -07:00
74b14cee2a [CHIA-299] DL separate DAT files in folders by store id (#17688)
* DL separate files by folder.

* Checkpoint.

* Lint.

* Fix http download args.

* Refactor.

* Fix bug.

* Syntax error.

* Fix bug.

* Lint.

* Add test.

* Add S3 change too.

* Lint.

* Fix bug.

* Fix merge conflict properly.

* Merge conflict.

* Merge conflict.

* Lint.

* Fix bug.

* Fix test post merge.

* Lint.

* Try to fix windows test.

* Coverage.

* Lint.

* Lint.

* Lint.

* Checkpoint have enable config option.

* Lint.

* Lint.

* Fix some tests.

* Fix test.

* Try to fix windows.

* Apply suggestions from code review

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

* Update test_data_store.py

* Address some comments.

* Try with new syntax.

* Refactor.

* Lint.

* Lint.

* Try with overload.

* Lint.

* use ClientTimeout for timeout

* change timeout to ClientTimeout

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2024-08-01 16:38:49 -07:00
Earle LoweandGitHub 65e888f245 CHIA-590: Add in connect timeout to DL http download (#18339)
* Add in connect timeout to DL http download

* Update mock function

* Consolidate to using aiohttp.ClientTimeout

* Revert "Consolidate to using aiohttp.ClientTimeout"

This reverts commit db3e77c101.

* Consolidate to using aiohttp.ClientTimeout

* Fix up default value with proper use of default_factory
2024-07-24 10:32:42 -07:00
Kyle AltendorfandGitHub cf7b54966e root hash, does None mean empty or unspecified? (#18244)
* mark some cases where a none root hash means unspecified, not empty

* propagate, hint for help tracking, etc

* cp

* enum trick

* tidy

* tidy

* fixup
2024-07-11 13:44:36 -07:00
c25eeb08f7 [CHIA-504] Add support for external signers (PLEASE SQUASH) (#18199)
* Repin hsms

* Add to sdist only allowed list

* Signer protocol tweaks

* Convert wallet RPC client to deserialized types

* Introduce @tx_out_cmd decorator

* Make execute_signing_instructions RPC

* Add transport layer support

* Add signer commands

* Rework wallet execute_signing_instructions

* Inadvertent merge changes

* Fix signer command tests

* Try a different approach: recursive flattening

* Bump hsms

* Add comments

* Test coverage

* Coverage ignores

* Remove inadvertent time traveler

* Bring in lost time traveler

* pylint

* Attempt to make qr test less flaky

* Actually test coverage ignore

* Small refactor for test coverage

* transport -> translation

* missed one

* transport -> translation

* Fix asdict error

* coverage

* Forgoe rotation testing for now

* Test coverage

* jsonify_unsigned_txs -> full_jsonify

* Move a class

* Add better type checking to framework

* explicitly state kwargs on _CommandParsingStage

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

* Address comments by @altendky

* Consolidate add_private_key and add_public_key

* Consolidate get_key_for_fingerprint and get_public_key_for_fingerprint

* Test fix

* Merge fix

* Bad merge

* Bad merge

* oops

* pylint

* Tweak keychain_proxy.get_key_for_fingerprint

* Fix wallet RPC test?

* pragma: no cover

* Redesign clvm_streamable

* Fix test imports

* black

* fix one more test

* Address comments by @altendky

* Test coverage

* bytes32

* Better CLI mnemonic check

* Use functools.partial

* Rename full jsonify to chip 29

* whoops missed a couple

* Better CLI mnemonic check

* black

* pylint

* Missed one

* black

* Farm at least one block

* Revert last change and fix 0 block farming

* black

* bad merge

* Merge fix

* Inadvertent changes

* Inadvertent changes

* Syncronize with quex.tx_out_decorator2

* These are no longer dictionaries.

* Use new clvm_streamable pattern

* Fix offer endpoint

* Add @tx_out_cmd decorator

* Bump ecdsa version

* Fix @marshal util to return proper transactions

* Add get_public_key

* port `chia wallet send` to @tx_out_cmd

* merge fix of puzzle hash derivation

* Port `chia wallet coins` to @tx_out_cmd

* Port chia wallet clawback to @tx_out_cmd

* Port `chia wallet take/cancel_offer` to @tx_out_cmd

* Port `chia wallet did ...` to @tx_out_cmd

* Port `chia wallet nft ...` to @tx_out_cmd

* Port `chia wallet notifications send` to @tx_out_cmd

* Port `chia wallet vcs ...` to @tx_out_cmd

* Port `chia dao ...` to @tx_out_cmd

* Exclude data layer and plotnft functions

* [no ci]

* Address comments by @AmineKhaldi

* Fix rpc util

* add test for BSTLSigningInstructions

* [UNDO] d9c6f54398

* [UNDO] 7fc1d2adfd

* [UNDO] 23c9ee8549

* [UNDO] aacc9f0228

* [UNDO] 548465403b

* Undo unintentional changes

* Stuff that's not part of this

* More stuff that doesn't belong

* One last thing that doesn't belong

* Unintentional change

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-06-26 09:21:33 -07:00