Commit Graph
81 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
6050235bdb [CHIA-3043] Add (hopefully) non-controversial ruff rules (#19684)
* Add (hopefully) non-controversial ruff rules

* mypy-exclusions.txt

* PIE

* Fix pre-commit?

* PYI

* RSE

* S + ignores

* Whitespace fix

* Re-add build-init-files.py

* Add comment about security ignores

* Update mypy-exclusions.txt

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

* Fix the executable status of build-init-files.py

* Set executable bit for tools/run_block.py and readd shebang

* Fix new errors

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-11 08:36:08 -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 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
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
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
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
Florin ChiricaandGitHub a168093c91 Improve input for DL CLI add_missing_files. (#17060) 2023-12-19 12:04:11 -06:00
Zachary BrownandGitHub ddadd8c664 Change -h to -k for --key flag for datalayer get_value cli command (#16843)
Change -h to -k for key flag for get_value cli command
2023-11-16 09:40:17 -07:00
Kyle AltendorfandGitHub ee09892f06 rename chia data add_missing_files -f/--foldername to -d/--directory (#16383) 2023-09-25 19:17:41 -05: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
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 7f7bce8677 help= not short_help= (#15076)
* help= not short_help=

* oops

* more

* more
2023-05-03 00:29:13 -05: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
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
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
Kyle AltendorfandGitHub bbd032e1c9 embrace click 8 (#13559)
* click==8.1.3, black==22.8.0

* black

* click option creator hinting

* ignores for to-be-resolved issue

* remove unused import
2022-09-29 11:24:36 -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
Earle LoweandGitHub fb50257586 Add default of 0 for amount with add_mirror cli (#13373) 2022-09-08 10:16:55 -05:00
Florin ChiricaandGitHub 7420850896 Use coin_id for delete_mirror. (#13264) 2022-08-31 19:19:11 -05:00
Florin ChiricaandGitHub 93354f7ed0 DL Fix add_mirror amount -h. (#13221) 2022-08-30 20:47:43 -05:00
Florin ChiricaandGitHub 6272033abb Change override to overwrite atari add_missing_files. (#13224) 2022-08-30 02:59:13 -05:00
Kyle Altendorf 7e9d391f40 Merge branch 'long_lived/atari' into atari-drop_dead_fingerprint_options 2022-08-25 12:03:01 -04:00
Kyle AltendorfandGitHub 8f6364c47a Merge pull request #13161 from Chia-Network/fc.add_atari_help
Add atari CLI help.
2022-08-25 12:01:06 -04:00
Kyle Altendorf 31dc01ba47 atari - drop dead fingerprint options 2022-08-25 09:45:43 -04:00
Florin Chirica 4db0293474 Lint. 2022-08-25 16:27:32 +03:00
176788547e Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 16:00:03 +03:00
48d5dc4e66 Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 15:59:34 +03:00
21be2da260 Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 15:58:31 +03:00
00da0b58c0 Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 15:57:22 +03:00
20550fd008 Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 15:57:12 +03:00
2a856b9b3a Update chia/cmds/data.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-08-25 15:56:58 +03:00
Florin Chirica 94b901c4b1 Add atari CLI. 2022-08-25 15:17:08 +03:00
Florin Chirica 2d3985e8d7 Add atari CLI help. 2022-08-25 14:21:56 +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 46c8e62d7d Checkpoint. 2022-08-04 18:27:44 +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