Commit Graph
79 Commits
Author SHA1 Message Date
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
Kyle AltendorfandGitHub 32ca9c0804 by service not layer (#19715)
* by service not layer

* monkey patch fixup
2025-06-16 14:31:51 -07:00
Kyle AltendorfandGitHub d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08: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 AltendorfandGitHub 91971aebb9 avoid a traceback on failure (#19121) 2025-01-10 14:27:02 -07:00
Kyle AltendorfandGitHub 9c60a48de3 less DEFAULT_ROOT_PATH for get_any_service_client() (#19049) 2024-12-17 10:27:41 -07:00
Matt HauffandGitHub 73e4a5bbea [CHIA-1680] Finish replacing flake8 with Ruff (#18802)
* Apply ruff unsafe fixes

* Manually fix tuples with `as`

* Remove all references to flake8
2024-11-04 08:59:57 -07: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
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
Jack NelsonandGitHub a447734728 Refactor CLI by adding add new click types for fees, amounts, addresses and bytes32 (#15718) 2024-06-24 16:52:40 -07:00
80880bfa71 DL Multistore batch update. (#17806)
* Multistore batch update.

* Lint

* Lint.

* Add test.

* Update data_layer_rpc_api.py

* Read from 'transactions' instead of 'tx_records'

* Fix test.

* Improve coverage.

* Submit all pending roots.

* Lint.

* Revert debug change.

* Add fee.

* Fix fee test.

* Update chia/cmds/data_funcs.py

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

* Address review comments.

* Lint.

* Refactor RPC.

* Apply suggestions from code review

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

* Improve coverage

* Lint

* Update data_layer_rpc_api.py

---------

Co-authored-by: Matt <quexington@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-04-26 08:05:30 -07:00
Kyle AltendorfandGitHub 2eb3633bcb json.dumps(indent=2) (#17714) 2024-03-18 10:26:13 -07:00
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
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
63417e765a Add support for generating and verifying DataLayer Proofs of Inclusions (#16845)
* initial implementaion of get_proof and verify_proof for datalayer

* Add wallet RPC and stop using offer blobs

* Don't require DL wallet to validate DL proof

* Convert to dl_verify_proof to free function

* More updates to DL proofs get/verify

* More updates to DL proofs get/verify

* More updates to DL proofs get/verify

* remove some unused verification functions

* oops deleted some important things

* fix type

* Add tests for DL proofs

* WIP using streamable classes for RPC

* Tests pass with new serializable classes

* use clvm tree hash calls instead of magic numbers and std_hash

* expanded tests to include more ways to call the same thing

* minor tests updates from feedback

* add in CLI tests

* Add separate create_multiple_keys_option

* Add helper and fixup key option

* Update tests/core/data_layer/test_data_rpc.py

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

* Add layer of indirection for the proof response

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-02-05 08:35:28 -08:00
9071480b4e Add --verbose option to data create_data_store and limit default output to the store id (#16110)
* Cleanup create_data_store.

* Use indent.

* Typo.

* Lint.

* Call tests with verbose.

* add back in fingerprint from cross-merge stuff

---------

Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-09-06 18:56:29 -05:00
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 AltendorfandGitHub 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
Florin ChiricaandGitHub 0e5f9eceea Print JSON for all DL commands. (#16119)
* Print JSON for all DL commands.

* Lint.

* Sort keys.
2023-08-24 02:30:02 -05:00
Jack NelsonandGitHub 3eb23f60da Cleanup CLI RPC connection error handling (#15704)
* remove none from async generator and add a custom error type

* remove client check from data funcs

* remove client check from farm funcs

* remove client check from peer, show and netspace funcs

* remove none check from sim funcs

* change the wallet code in cmds util to use the new error type

* update plotnft_funcs with new error

* remove none checks from coin and wallet funcs

* cleanup logic a tad
2023-07-10 15:41:51 -05:00
Kyle AltendorfandGitHub 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
Kyle AltendorfandGitHub 2e9647e32a extract wallet specific behavior from get any service client (#15086)
* extract wallet behavior from get_any_service_client()

* another

* style
2023-04-24 12:50:40 -06:00
433a414496 Add plugin_info and healthz endpoints to s3 plugin service, add chia data plugins check cli (#15028)
* Add plugin_id and healthz endpoints to s3 plugin service

* Add `chia data plugins check` cli

* plugin_id -> plugin_info

* updates based on reviews

* Use gather to run the lookups

* Update chia/data_layer/data_layer.py

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

* Fix typo

* short_help -> help

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-04-18 18:45:35 -05:00
Kyle AltendorfandGitHub 91a717b5f3 add hinting around get_any_service_client() (#14681) 2023-02-27 23:49:47 -06:00
Amine KhaldiandGitHub 8fd9940d59 Ignore unused config value in the DataLayer CLI commands (#14584)
Ignore unused config value in the DataLayer CLI commands.
2023-02-16 14:02:44 -06:00
ed55423db6 Add atari get sync status RPC. (#13440)
* Add atari get sync status RPC.

* Try to fix test.

* Try to fix test.

* Some fixes.

* 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>
2022-10-28 15:05:03 -05:00
Jack NelsonandGitHub 769d9e2e2f Clean up data layer code to use the standard cli client (#13586)
* add datalayer rpc  to async generator

* change datalayer to use proper generator

* fix fee

* lint
2022-10-19 17:02:05 -05:00
Kyle AltendorfandGitHub 5b3a8725ba use @asynccontextmanager for chia.cmds.get_client() (#13580) 2022-10-05 11:05:29 -05:00
Kyle AltendorfandGitHub 3b084a165b configure isort to add the future annotations import (#13327)
* configure isort to add the future annotations import

* apply the new isort setting

* remove type ignores for new mypy (#13539)

https://pypi.org/project/mypy/0.981/

* another
2022-09-30 03:40:22 -05:00
Florin ChiricaandGitHub 89dc1ae11e Add root hash to CLI. (#13306)
* Add root hash to CLI.

* Explicitly throw exception if we don't find root hash.

* Throw inside RPC only.
2022-09-23 19:43:04 -05:00
Kyle AltendorfandGitHub 168e413122 fill_missing_services=True for data cli (#13388) 2022-09-08 15:35:37 -05:00
Florin ChiricaandGitHub 762cdbd0d4 Add output for all CLI commands. (#13247) 2022-08-31 11:34:11 -05:00
Florin ChiricaandGitHub 6272033abb Change override to overwrite atari add_missing_files. (#13224) 2022-08-30 02:59:13 -05:00
Florin Chirica 94b901c4b1 Add atari CLI. 2022-08-25 15:17:08 +03:00
Florin Chirica 715e7b7165 Fix some linting. 2022-08-10 01:30:46 +02:00
Florin Chirica 6eea126067 Rename store_id to coin_id. 2022-08-09 21:34:53 +02:00
Florin Chirica 933c9a11a9 Checkpoint. 2022-08-09 21:24:54 +02:00
Florin Chirica 4f7fe15054 Merge branch 'long_lived/atari' into fc.atari_discovery 2022-08-04 16:31:52 +02:00
Kyle AltendorfandGitHub b93f2ea8e7 Merge pull request #12603 from Chia-Network/fc.get_keys 2022-08-02 01:35:58 -04:00
Florin Chirica 925927dde9 Merge branch 'long_lived/atari' into fc.atari_banning 2022-08-01 19:29:23 +02:00
Kyle Altendorf 86ae361a2f apply isort to atari 2022-07-31 21:10:56 -07:00
Florin Chirica cb42f7f205 Add remove_subscription and fix bug. 2022-07-28 18:47:15 +03:00
Florin Chirica 19755de413 Initial commit get keys. 2022-07-26 16:14:45 +03:00
Florin ChiricaandGitHub cc712f9f42 Merge branch 'long_lived/atari' into fc.new_server 2022-06-10 13:17:05 +03:00
Kyle Altendorf 9f60d453f2 correct changelist hinting to be a list of dicts 2022-06-09 15:07:22 -04:00
Florin Chirica 42e2cc722d First attempt subscribe to URLs. 2022-06-08 20:25:09 +03:00
Florin Chirica 840fd6a0bb Add --foldername option. 2022-05-24 14:24:56 +02:00
Florin Chirica a9db93553e Restore files option. 2022-05-11 21:59:11 +03:00
Florin Chirica 718fc429b3 Fix type checking. 2022-03-31 19:40:57 +03:00
almog 246f21ddad add get_root_history to cli
add paths in rpc_api
2022-02-18 16:44:39 +02:00