Commit Graph
898 Commits
Author SHA1 Message Date
Kyle Altendorf f5fe748c19 less response failure error consumption (#19282) 2025-06-24 11:04:56 -07:00
Matt HauffandKyle Altendorf 760a65fd0b [CHIA-1313] Port NFT RPCs to @marshal decorator (#19617)
* Port `nft_mint_nft`

* Fix tests

* More test fixes

* Port `nft_count_nfts`

* Port `nft_list_nfts`

* Fix tests

* Port `nft_set_nft_did`

* Fix tests

* Port `nft_set_did_bulk`

* Port `nft_transfer_bulk`

* Port `nft_get_by_did`

* Port `nft_get_wallet_did`

* fix tests

* Fix one more test

* Okay actually fix the test

* Port `nft_get_wallets_with_dids`

* Port `nft_set_nft_status`

* Port `nft_transfer_nft`

* Use kwargs

* Forgot default raise

* Port `nft_get_info`

* Port `nft_add_uri`

* d

* Port `nft_calculate_royalties`

* Fix tests

* Port `nft_mint_bulk`

* Add test coverage for cmd line offering CAT by asset ID

* Add test coverage for a more complex offer take

* Add test coverage for `NFTCalculateRoyalties.__post_init__()

* test coverage generally

* Actually dont commit puzzle hashes when push=False

* Inadvertent test breakage

* Fix tests

* Fix tests

* Fix test

* Fix hopefully one more test

* Comments by @altendky

* small improvement @altendky

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

* small improvement @altendky

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-24 11:04:37 -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 Altendorf 7c25640c3e remove 'or descriptor' from chia --passphrase-file help (#19722) 2025-06-17 11:52:33 -07:00
Kyle Altendorf 32ca9c0804 by service not layer (#19715)
* by service not layer

* monkey patch fixup
2025-06-16 14:31:51 -07:00
Kyle Altendorf f054d339a1 unignore some ruff s rules (#19703) 2025-06-12 11:12:54 -07:00
Kyle Altendorf 8e2545fba6 add chia dev data sync-time --prefer-db-kv-blob-length (#19693) 2025-06-11 16:22:45 -04:00
Matt HauffandKyle Altendorf 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
Almog De Paz a50f2c3c8e Bump chia rs >=0.25, <0.26 (#19685)
* bump_chia_rs

* update to use size()

* lint

* remove redundant imports
2025-06-05 15:07:08 -07:00
Kyle Altendorf f44d748df3 Merge commit '082f0592d879ff6e784e4ad9d4f7a9f0442206ca' into catchup/long_lived_datalayer_merkle_blob_from_main_082f0592d879ff6e784e4ad9d4f7a9f0442206ca 2025-06-05 14:16:55 -04:00
Richard Kiss 15a4536a7a The chia.consensus module no longer depends upon chia.wallet. (#19665)
<!-- 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:

This PR removes a dependency that is inappropriate and caused a
dependency loop.
2025-06-03 12:31:30 -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 Kiss 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
Arvid NorbergandMatthew Howard c0410e97ec Bump chia rs >=0.24, <0.25 (#19615)
* bump chia_rs

* update db_graftroot test

* update SerializedProgram and Program use, to accommodate new chia_rs interface

* review comments

* review comments

---------

Co-authored-by: Matthew Howard <m.o.howard97@gmail.com>
2025-05-29 09:24:08 -07:00
Richard Kiss e4ccb8024f Fix chia.util <= chia.server dependency (#19629)
Move `get_unresolved_peer_infos` and `set_peer_info` from
`chia.util.config` to `chia.server.resolve_peer_info.py` so that
`chia.util` no longer depends upon `chia.server`.
2025-05-23 09:06:11 -05:00
Richard Kiss 386787fb51 Move dump_keyring.py to remove dep chia.util => chia.cmds (#19600) 2025-05-22 10:17:54 -05:00
Kyle Altendorf 4e0f904cd3 Merge commit 'e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345' into catchup/long_lived_datalayer_merkle_blob_from_main_e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345 2025-05-16 15:59:57 -04:00
Kyle Altendorf e81b213b9a tweak chia dev data sync-time (#19548) 2025-05-16 10:13:14 -04:00
Richard Kiss 20a0d934cb Move ssl_check.py to chia/ssl (#19596) 2025-05-12 08:53:18 -04:00
Kyle Altendorf 6936950a4b Merge commit 'a8a30e3541a9074e2e5ca85e7869c90f61448b8b' into catchup/long_lived_datalayer_merkle_blob_from_main_a8a30e3541a9074e2e5ca85e7869c90f61448b8b 2025-05-07 09:46:08 -04:00
Earle Lowe 7f20df6214 Add some checks when trying to join the same pool already joined (#18822)
* Add some checks when trying to join the same pool already joined

* Add test to test the specific cli case

* Remove line added during debugging

* Add test

* misc updates

* remove cli test

* final tests for joining same pool again

* Update check from code review

* update test framework

* Use click.ClickException for error

* Add check for wallet synced up front as the first thing checked for joining a pool

* Add test for unsynced RPC call
2025-04-28 12:22:51 -07:00
Kyle Altendorf 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 Altendorf fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Kyle Altendorf 1911044e97 use chia_rs directly for more types (#19475)
* use chia_rs directly for more types

* more more

* undo submodule change...
2025-04-18 11:45:44 -05:00
Kyle Altendorf 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
Freddie Coleman 2dfc257c59 Set AGG_SIG_ME_ADDITIONAL_DATA in config.yaml for simulator (#18566)
set AGG_SIG_ME_ADDITIONAL_DATA in config.yaml for simulator
2025-04-17 11:07:23 -05:00
Kyle Altendorf 2449e0c06d fixup colliding -o options on chia dev gh test (#19316) 2025-04-17 09:48:53 -05:00
Kyle Altendorf 39c4c5fefc chia rs 0 22 0 (#19508)
* update chia_rs to 0.22.0

* remove use of `.SOFT_FORK6_HEIGHT`

* remove use of `ENABLE_KECCAK`

* remove `"SOFT_FORK6_HEIGHT"` literals

* delete more
2025-04-17 09:17:17 -05:00
Kyle Altendorf 99448387ad add the keys root path to ChiaCliContext (#19420)
* add the keys root path to `ChiaCliContext`

* tidy
2025-03-24 14:41:06 -07:00
Kyle Altendorf 26fcbe70e6 subdirectory for chia dev commands (#19418)
* move `chia dev` to its own subdirectory

* rename `dev.py` to `main.py`

* fixup

* more
2025-03-21 14:31:13 -07:00
Kyle Altendorf bbb65220f1 simplify chia command key root path handling (#19419) 2025-03-21 14:30:10 -07:00
RigidityandArvid Norberg a194dd60e9 CHIA-2378: Add CLI commands to import, export, and benchmark the mempool (#19271)
* Add CLI commands to import and export the mempool, and benchmark block creation

* Unused import

* Remove old RPC

* Fix mypy

* Address some comments

* use create_block_generator()

* Ruff

* Address comments

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2025-03-18 17:09:02 -07:00
Earle Lowe 92f922ea50 some cleanup of exception handling (#19304)
* some cleanup of exception handling

* typo
2025-03-10 10:39:52 -07:00
Kyle Altendorf d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08:00
dependabot[bot]andKyle Altendorf bc99c7a283 build(deps): bump mypy from 1.14.1 to 1.15.0 (#19319)
* build(deps): bump mypy from 1.14.1 to 1.15.0

Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.15.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* adjust accordingly

* remove another

* and windows

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-02-28 09:32:34 -08:00
d7e2358a32 build(deps): bump ruff from 0.8.5 to 0.9.6 (#19260)
* build(deps): bump ruff from 0.8.5 to 0.9.6

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.5 to 0.9.6.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.8.5...0.9.6)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update source to ruff 0.9.6

* Apply suggestions from code review

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-02-27 09:53:34 -08:00
Kyle Altendorf 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
Matt Hauff ccfa35cab8 [CHIA-2369] Legacy-ify DAOs (#19266)
Legacy-ify DAOs
2025-02-20 11:05:30 -07:00
Matt Hauff 2d53b46a4b [CHIA-2264] Add config constant support to chia db validate (#19182)
Add config constant support to `chia db validate`
2025-01-28 08:39:27 -07:00
Kyle Altendorf 91971aebb9 avoid a traceback on failure (#19121) 2025-01-10 14:27:02 -07:00
Kyle Altendorf 49354dc8f7 fix gh command setup (#19073) 2024-12-19 17:20:01 -07:00
Kyle Altendorf b6b4ea1c73 add chia dev gh test for launching configured test runs (#18922)
* add chia dev gh test for launching configured test runs

* empty again

* better

* use the actual authenticated username

* more output

* helpful errors for invalid --only value

* tidy short help

* add at least an invalid --only test case

* prepare a long help

* add gh api runner helper

* use the commit hash for the temporary branch

* and uuid too

* fix up os selection

* add `--remote`

* load a url for a specified `--ref` as well

* both helps

* show defaults in `--help`

* help touchup

* Revert "show defaults in `--help`"

This reverts commit 5d7f4868e0.

* r

* add an actual dispatch test skeleton

* do not conflict check `tmp/**`

* assert a bit more about the resulting run

* oops

* skip the test for now

* pre-commit
2024-12-19 11:32:56 -07:00
Kyle Altendorf 9a0b5728c5 use a class for the chia cli context data (#18919)
* use a class for the chia cli context data

* actually assign to the context properly...

* handle the not-present case

* catch up

* tidy

* more

* stuff

* ...

* more real

* expected address prefix
2024-12-19 10:44:48 -07:00
Kyle Altendorf 45465b4865 move some non-framework items out of chia.cmds.cmd_classes (#19047)
* move some non-framework items out of `chia.cmds.cmd_classes`

* move the other new stuff too
2024-12-17 14:14:13 -07:00
Matt HauffandKyle Altendorf 61207d2435 [CHIA-1348] Port chia wallet coin commands to @chia_command framework (#18641)
* Extract TransactionsIn/Out

* Create a helper for coin selection arguments

* Port `chia wallet coins list`

* Unused item

* Add TransactionEndpoint

* Port `chia wallet coins combine`

* Port `chia wallet coins split`

* Delete test_coins.py

* Add test for TXConfig helpers

* Add test for TransactionEndpoint mixin

* Forgot to delete old split command

* test coverage

* coverage ignores

* Link old framework with new

* fix command tests

* fix signer test

* coverage ignores

* pre-commit

* Move tests back to rpc file

* Move coin functions back to their own file

* Move split above combine in rpc tests

* Stop duplicate name definitions

* new puzzle hashes allowed

* Address comments by @altendky

* more comments by @altendky

* Update chia/cmds/cmd_classes.py

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

* another comment by @altendky

* this one is the fault of @altendky

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-12-17 10:44:33 -07:00
Kyle Altendorf 9c60a48de3 less DEFAULT_ROOT_PATH for get_any_service_client() (#19049) 2024-12-17 10:27:41 -07:00
Kyle Altendorf 78afe07f28 first pass at using @chia_command without a group (#19040)
* first pass at using `@chia_command` without a group

* less slots
2024-12-13 11:49:16 -07:00
Kyle Altendorf bc5ad74c99 more less default root path (#19031)
* more less default root path

* hmm
2024-12-13 11:39:55 -07:00
Matt Hauff be0a77db7d [CHIA-1316] Port VC Endpoints to @marshal decorator (#18970)
* Port `vc_mint`

* Port `vc_spend`

* Port `vc_revoke`

* Port `vc_get`

* Port `vc_get_list`

* Port `vc_add_proofs`

* Port `vc_get_proofs_for_root`

* address comments by @altendky
2024-12-12 09:01:29 -07:00
Amine Khaldi 68f230a729 Merge commit 'f9b7ddcfcf50b8a0cf7a39a9c9f5f53214702319' into checkpoint/main_from_release_2.5.0_f9b7ddcfcf50b8a0cf7a39a9c9f5f53214702319 2024-12-06 17:48:45 +01:00