Commit Graph
255 Commits
Author SHA1 Message Date
Matt HauffandGitHub baf8bd05c0 [LABS-311] Extract track_new_launcher_id from dl_track_new (#20320)
* Add optional creation to `get_dl_wallet`

* Extract `track_new_launcher_id` from `dl_track_new`
2026-01-09 12:04:29 -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 590be179fc [LABS-161] Add a method for creating outgoing transactions (#20209)
* Add a method for creating outgoing transactions

* Fix some oversights wrt wallet_id
2025-10-31 08:56:15 -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
Kyle Altendorf 7e98baa814 Merge commit 'ebf8105fc12c351888069ba399be6cf998f680e0' into catchup/long_lived_datalayer_merkle_blob_from_main_ebf8105fc12c351888069ba399be6cf998f680e0 2025-09-05 15:06:31 -04:00
Matt HauffandGitHub a803dc0fa6 [CHIA-3633] August 2025 pass of Ruff linting rules (#19929)
* Enable Ruff `PLR1704` (`redefined-argument-from-local`)

* Enable Ruff `PLR5501` (`collapsible-else-if`)

* Enable Ruff `PLW2901` (`redefined-loop-name`)

* bad change

* Enable Ruff `RUF043` (`pytest-raises-ambiguous-pattern`)

* Enable Ruff `RUF046` (`unnecessary-cast-to-int`)

* Enable Ruff `RUF052` (`used-dummy-variable`)

* Remove unused ignore `UP006`

* One mis-signaled regex

* Comments by @altendky

* bad change, my bad
2025-08-11 14:39:12 -07:00
Matt HauffandGitHub e8e060b533 [CHIA-3419] Remove TransactionRecord.*_json_dict_convenience (#19860)
* Change `TransactionRecord` to use dict instead of list of tuples for memos

* Update streamable and fix tests

* Update test to accidentally fixed memos generation

* Remove `TransactionRecord.*_json_dict_convenience`

* Fix test

* Use AddressType library in WSM method

* Use AddressType library in transaction_store method
2025-08-05 13:10:52 -07:00
Kyle Altendorf 70c3bdbe87 Merge commit 'cac84b5e057a074da6a72e2a8bbcc70ec0a09668' into catchup/long_lived_datalayer_merkle_blob_from_main_cac84b5e057a074da6a72e2a8bbcc70ec0a09668 2025-08-01 11:59:07 -04:00
Kyle AltendorfandGitHub 7a26610e8f less pre-inting for ints (#19853) 2025-07-23 13:18:04 -07:00
Matt HauffandGitHub 55165b1163 [CHIA-3418] Change TransactionRecord to use dict instead of list of tuples for memos (#19846)
* Change `TransactionRecord` to use dict instead of list of tuples for memos

* Update streamable and fix tests

* Update test to accidentally fixed memos generation
2025-07-23 13:17:41 -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 10d957680b Merge commit 'a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd' into catchup/long_lived_datalayer_merkle_blob_from_main_a803d18c3b6a84d1d36adb0c5f1786dfe36aa3dd 2025-05-29 13:15:14 -04:00
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
Kyle Altendorf 4e0f904cd3 Merge commit 'e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345' into catchup/long_lived_datalayer_merkle_blob_from_main_e81b213b9a7bb2a46539d2ef5ed1ed1cd9271345 2025-05-16 15:59:57 -04:00
Richard KissandGitHub c800e06ac4 Remove the dependency of chia.consensus on the module chia.types (#19590)
* Move `chia/types/spend_bundle.py` to wallet.

* Move `compute_additions` functions into wallet.

* Move `chia/types/eligible_coin_spends.py` to `chia/full_node`.
2025-05-09 13:56:01 -05: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
Kyle AltendorfandGitHub fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Kyle Altendorf db8fe40934 Merge commit '07ccc77676ad2f3b7dcd19e8a6fd269dea235bba' into catchup/long_lived_datalayer_merkle_blob_from_main_07ccc77676ad2f3b7dcd19e8a6fd269dea235bba 2025-04-07 11:16:32 -04:00
Matt HauffandGitHub a6a5a35c7d [CHIA-1251] Add puzzle hash generation to action scopes (#19283)
* (squash) Add puzzle hash generation to action scopes

* Add comment for unused/last_index
2025-04-03 15:34:07 -05: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 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
Matt 22b0df5631 Add generate_signed_transaction to WalletProtocol 2025-02-07 15:34:07 -08:00
Matt dd6eef201d Fix the other create_tandem_xch_txs 2025-02-03 08:11:35 -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 7c4b4277a4 Standardize the Wallet API for generate_signed_transaction 2025-01-29 12:42:26 -08:00
Matt HauffandGitHub c99492cc19 [CHIA-773] Swap out Payment for CreateCoin (#19144)
* Swap out `Payment` for `CreateCoin`

* Fix mypy-exclusions

* tweak
2025-01-27 08:22:29 -07: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 4d5f168ef5 make ProofOfInclusion.root_hash a method, from a property 2025-01-24 09:50:18 -05:00
matt-o-howandGitHub 8bb8a1b730 Migrate puzzles away from load_clvm to import from chia_puzzles_py (#19055)
* add dependency for chia_puzzles_py

* migrate cat and dao wallets to new repo

* migrate did wallet

* more migration and deduplication

* change singleton launcher hash import in rpc

* stop importing singleton launcher from nft_puzzles in nft_wallet

* remove SINGLETON_LAUNCHER_PUZZLE import from nft_puzzles

* remove unused import

* ruff check and fix

* use graftroot dl offers from chia_puzzles_py

* get rid of more non explicit exports

* remove circular dependency

* ruff check

* migrate py files in puzzles to use chia_puzzles_py

* fix import

* fix more imports

* migrate clawback wallet and fix typo (requires version update of chia_puzzles_py)

* delete puzzles and separate nft puzzles from puzzle_utils

* use 0.19.1 version of chia_puzzles_py

* more nft puzzle detangling

* use latest chia_puzzles_py and migrate pools

* ruff fixes

* delete pool puzzles folder

* remove load_clvm from test_singleton and test_singleton_lifecycle_fast

* mypy fixes

* ruff fixes

* remove manage_clvm check precommit hook

* update version

* update chia_puzzles dependency to 0.19.4

* remove full_node puzzles

* remove test for condition codes

* change generator type to SerializedProgram

* remove remaining load_clvms that can be factored out

* delete consensus puzzles

* fix test_singleton_lifecycle_fast

* cast debug_spend_bundle coin name to bytes32

* ruff debug_spend_bundle

* update chia-puzzles and fix typo

* fix line endings

* fix typo in ROM_BOOTSTRAP_GENERATOR references

* remove bytes32 cast from debug_spend_bundle

* update chia-puzzles-py dependency to version 0.20.1 and refactor ACS_TRANSFER_PROGRAM initialization

* remove unused puzzle files

* singleton_top_layer exports hashs now which are imported from chia_puzzles

* remove .get_tree_hash() in favor of importing the hash

* remaining hash imports

* regenerate poetry.lock and pyproject.toml from main

* import singleton launcher hash from explicit export

* import SINGLETON_LAUNCHER_HASH from chia.wallet.singleton in test_pool_rpc.py

* import SINGLETON_MOD_HASH from chia.wallet.puzzles.singleton_top_layer in test_pool_puzzles_lifecycle.py

* poetry lock --no-update post-rebase

* re-regenerate lock file --no-update

* fix rebased block_tools
2025-01-17 09:58:16 -07:00
Matt HauffandGitHub 604fc1feb0 [CHIA-1732] Add Ruff specific linting rules (#18845)
* Add Ruff specific linting rules

* Further tighten ignore list

* Address comments by @altendky

* One more comment @altendky
2024-11-14 15:58:12 -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
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
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
Amine KhaldiandGitHub 40e0df2c25 CHIA-1472 Augment get_mirror_info to accept both types of programs (#18637)
Augment get_mirror_info to accept both types of programs.

This allows us to use serialized programs without the need to convert them into programs.
2024-10-03 08:28:07 -07:00
Amine KhaldiandGitHub 8129b41473 CHIA-210 Introduce WalletSpendBundle and use it across code related to wallets (#18264)
Introduce WalletSpendBundle and use it across code related to wallets.
2024-08-30 21:36:26 +08:00
Matt HauffandGitHub 64003a63f5 [CHIA-1067] Integrate coin selection with action scopes (#18424)
* Add TXConfig to action scopes

* Fix DID test

* Fix CR-CAT method

* Fix NFT offer test

* Utilize streamable for WalletSideEffects serialization

* Integrate coin selection with action scopes

* Fix action scope test

* Fix DID test

* Fix NFT tests

* Fix NFT tests
2024-08-19 09:02:36 -07:00
Matt HauffandGitHub 5761229f1b Remove unused (kinda) functionality (#18408) 2024-08-07 15:03:30 -07:00
Matt HauffandGitHub 8bc332f95e [CHIA-1037] Add TXConfig to action scopes (#18406)
* Add TXConfig to action scopes

* Fix DID test

* Fix CR-CAT method

* Fix NFT offer test
2024-08-07 11:27:13 -07:00
Matt HauffandGitHub 055588914e [CHIA-714] Add usage of action scope throughout wallet codebase (#18128)
* Add the concept of 'action scopes'

* Add `WalletActionScope`

* Fix CATWallet pending_change calculation

* Add action_scope: WalletActionScope to all tx endpoints

* Add usage of action scope throughout wallet codebase

* Add the concept of 'action scopes'

* pylint and test coverage

* add try/finally

* add try/except

* Undo giving a variable a name

* Fix CRCAT test

* Fix trade tests

* Fix cat test

* Fix miscellaneous test

* Fix miscellaneous test

* Fix miscellaneous test

* pylint

* Add auto claim test coverage

* Take advantage of extra_spends

* Fix tests

* test fixes

* pylint
2024-07-17 12:17:16 -07:00
Matt HauffandGitHub 4ffb6dfa6f [CHIA-713] Add action_scope: WalletActionScope to all tx endpoints (#18127)
* Add the concept of 'action scopes'

* Add `WalletActionScope`

* Fix CATWallet pending_change calculation

* Add action_scope: WalletActionScope to all tx endpoints

* Add the concept of 'action scopes'

* pylint and test coverage

* add try/finally

* add try/except

* Undo giving a variable a name

* Fix CRCAT test

* Fix trade tests

* Fix cat test

* Fix miscellaneous test

* Fix miscellaneous test

* Fix miscellaneous test

* Add auto claim test coverage
2024-07-16 11:06:01 -07:00
Arvid NorbergandGitHub 956894dbd0 use rust version of SpendBundle (#17430) 2024-07-08 09:47:28 -07:00
Matt HauffandGitHub 44c6b44c46 [CHIA-302] Handle reorgs in data layer wallet (#17992)
* Handle reorgs in data layer wallet

* Update WalletNode.reset_sync_db

* Fix test

* Make new tables easily forwards compatible

* Use singleton_records table instead of launcher_confirmations

* Only select launcher_id
2024-05-15 09:52:34 -05:00
Matt HauffandGitHub aefe7fdf28 Observer Mode (#17792)
* Observer Mode

* Address comments by @altendky

* Change RPC default and fix test coverage

* Add test coverage for rpc marshaller

* Fix @marshal util to return proper transactions
2024-05-07 13:39:25 -07:00
Earle LoweandGitHub 48e4039e58 Update black to 24.1.1 and update source as needed (#17499)
* Update source to black 24 spec

* update black to 24.1.1

* update pylint to ignore multiple-statements

* update test file

* black updates

* format updates

* Update test_network_protocol_files.py

* Update test_network_protocol_files.py
2024-03-13 11:08:19 -07:00
Amine KhaldiandGitHub 71166f18c8 Augment match_dl_singleton to accept both types of puzzles (#17520)
Augment match_dl_singleton to accept both types of puzzles.

This allows us to use serialized programs without the need to convert them into programs.
2024-02-12 10:05:09 -08:00
76bb49c4fd Return TXs from CATWallet and Offer creation (#17506)
* Don't autopush transactions by default anywhere

* Remove ignore_max_send_amount

* Use TXConfig instead of pending_transactions for coin exclusion in spend_clawback_coins

* Unify transaction pushing into a single method

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount

* Return offer transactions from create_offer_for_ids

* Return transaction list from CATWallet.create_new_cat_wallet

* Missed an instance in a newer test

* Missed an instance in a newer test

* Simplify processing some transaction records.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-02-08 09:04:49 -08:00