Commit Graph

1317 Commits

Author SHA1 Message Date
Matt Hauff
80c07a7476
Remove references to old offer mod (#15694)
* Remove references to old offer mod

* Add guards in RPC against parsing old offers

* Fix benchmark test

* test coverage
2023-07-17 15:02:04 -05:00
Matt Hauff
ac4c2ca2ee
Fix flaky CAT test (#15759)
* Fix flaky CAT test

* Update test_transaction_store test
2023-07-17 13:16:51 -05:00
dustinface
3253718324
wallet: Convert coin ids in _add_coin_states to bytes32 (#15556) 2023-07-13 15:41:32 -05:00
Matt Hauff
58e6081465
Add DIDWallet.get_coin() to simplify DID wallet (#15730)
* Add DIDWallet.get_coin() to simplify DID wallet

* set not list

* Test coverage
2023-07-12 11:10:03 -05:00
Kronus91
40a347f1a7
Clawback resync (#15496)
* Double check coin state

* Fix coverage

* Resolve comments

* Fix unit test

* Fix redundant tx

* Add unit test

* Fix unit test

* refine unit test

* Remove duplicate test

* Fix test on Windows

* Fix clawback memo

* Fix revert

* Improve clawback test

* Remove pragma

* Resolve comments

* Revert clawback test fix

* Add comment for tx confirmed

* Resolve comments

* Remove unrelated change

* Resolve comments

* Fix coverage
2023-07-11 13:31:53 -05:00
Arvid Norberg
1e534d0281
pass consensus constants into get_name_puzzle_conditions(). (#15736)
pass consensus constants into get_name_puzzle_conditions(). This is required for tests that use alternate constants, such as fork activation heights
2023-07-11 09:52:49 -05:00
Arvid Norberg
39bcc233b1
remove ROM bootstrap generator2, as we're not making this transition (#15676) 2023-07-07 18:08:39 -05:00
Matt Hauff
424c51072d
Fix hint parsing for CATs and DIDs (#15259)
* Fix hint parsing for CATs and DIDs

* Handle not hinted coins

* Fix compute_coin_hints condition checking

* don't try to sync non-singleton children of singleton

* coverage ignores

* rename function

* Make function do what it says

* wallet: Some suggestions from #15274 for #15259 (#15547)

* wallet: Some suggestions from #15274 for #15259

* Return a dict with the coin id as key

* Drop `compute_hint_for_coin`, Test `compute_spend_hints_and_additions`

---------

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2023-06-30 13:42:09 -05:00
Matt Hauff
a449a2feae
Handle VC syncing exceptions better (#15627)
* Handle VC syncing exceptions better

* coverage

* Return
2023-06-30 13:41:58 -05:00
Matt Hauff
35540012d7
Minor improvements to SpendBundle.debug() + test (#15636)
Minor improvements to debug_spend_bundle
2023-06-29 08:37:09 -05:00
dustinface
7b2f481d31
wallet: Deduplicate coin states from peers (#15598) 2023-06-23 12:59:26 -05:00
Arvid Norberg
3d94d3a7ff
2.0 updates (#15580)
* add names for new error codes (from chia_rs)

* add constant for SOFTFORK condition opcode

* add chialisp constant for SOFTFORK condition
2023-06-22 07:08:34 -05:00
William Allen
0af77f6a21
checkpoint: into main from release/1.8.2 @ 33fa3f47de (#15564)
Source hash: 33fa3f47de
Remaining commits: 5
2023-06-20 16:32:28 -05:00
dustinface
a72142a305
mypy: Fix issues introduced by 1.4.0 release (#15562) 2023-06-20 14:46:10 -05:00
Amine Khaldi
7b90192e96
Merge commit '33fa3f47deb29cb7d55463914bce16f6ad774b86' into checkpoint/main_from_release_1.8.2_33fa3f47deb29cb7d55463914bce16f6ad774b86 2023-06-20 19:58:30 +01:00
Amine Khaldi
31b9ec466f
Merge commit 'd97889660ce0e28c29ffbec0c497455bd36b59f0' into checkpoint/main_from_release_1.8.2_d97889660ce0e28c29ffbec0c497455bd36b59f0 2023-06-20 15:54:14 +01:00
dustinface
508087251c
util: Some tweaks to StructStream and sized ints (#15090)
* Only define `StructStream` members, don't give them defaults

* `MAXIMUM_EXCLUSIVE` -> `MAXIMUM`

* Make `MINIMUM` and `MAXIMUM` instances of the underlying class

* Make the `StructStream` members `ClassVar`s

* More explicit and consistent `MINIMUM` and `MAXIMUM` assignments

* Comment about instantiation

* Use `MAXIMUM`
2023-06-16 09:32:17 -05:00
William Allen
893fadd994
checkpoint: into main from release/1.8.2 @ 82c9ed953d (#15525)
Source hash: 82c9ed953d
Remaining commits: 4
2023-06-15 15:17:47 -05:00
dustinface
1765971426
rpc: Fix and test WalletRpcApi.get_coin_records_by_names (#15509) 2023-06-15 09:46:31 -05:00
Amine Khaldi
5dbc00d12e
Merge commit '82c9ed953d8b76936c3005c21831234eba155c8e' into checkpoint/main_from_release_1.8.2_82c9ed953d8b76936c3005c21831234eba155c8e 2023-06-14 22:35:27 +01:00
Kronus91
33fa3f47de
Add CLI for Clawback (#15483)
* Add CLI for Clawback

* Fix coverage & Disable auto claim

* Display Clawback TX in CLI

* Fix coverage

* Fix get transaction amount
2023-06-14 13:51:38 -05:00
Kronus91
d97889660c
Add filters for get_transaction_count API (#15502)
Add filters for get_transaction_count
2023-06-14 07:51:59 -05:00
dustinface
49140b2b3c
server: Introduce ApiProtocol (#15466)
* server: Introduce `ApiProtocol`

* genericize (#5)

* `ApiProtocol.api_ready` -> `ApiProtocol.ready()`

* Add `ApiProtocol.log` and give APIs separate loggers

* Fix `CrawlerAPI`

* Drop some unrelated removals

* Fix some of the generic hinting

* Revert some changes in `timelord_api.py`

* Fix `CawlerAPI` readiness

* Fix hinting

* Get some `CrawlerAPI` coverage

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-06-13 20:12:25 -05:00
Matt Hauff
79bf694800
Add **kwargs to all generate_signed_transaction definitions (#15240)
* Add **kwargs to all generate_signed_transaction definitions

* Add support for VC wallet too

* attempt to hint kwargs

* Import TypedDict from typing_extensions instead

* Fix tail driver call to generate_signed_transaction
2023-06-13 17:24:17 -05:00
Matt Hauff
9b465a08c6
Only subscribe to inner wallet puzzle hashes (#14356)
* Only subscribe to inner wallet puzzle hashes

* Add a store for unacknowledge CAT coin states

* Add additions and removals to dummy TX

* whoops

* Add interested coin IDs when saving trade

* black

* One test was not hinting, make it use push_transaction RPC instead

* restructure and comment a block

* Change asset ID to blob and add index

* Add get all puzzle hashes by wallet id

* Separate unacknowledged state getter and deletion

* Remove peer_id from CAT states table

* lint

* fix forwards compat tests

* isort

* Subscribe to the change children of CATs

* Hint to change

* undo unintentional changes

* Change cat test

* fix test_cat_spend test memo check

* provide save_trade parameter

* Address comments by @xdustinface

* Fix memos assertion again

* hint in test cat creation

* Missing save_trade call

* time out assert

* Hint in RPC test

* Fix wallet resync function

* Fix DB bug, add test coverage

* pass offer to save_trade

* add reorg rollback to unacknowledged states

* Add some unit tests
2023-06-13 12:51:16 -05:00
Matt Hauff
cf15c0fcb9
rename exclude_coin_* -> excluded_coin_* for consistency (#15460)
* exclude -> excluded

* Add a bit of test coverage

* fix bad change

* Add test coverage

* Add a little more test coverage
2023-06-09 16:35:53 -05:00
dustinface
5e0b8bb1ec
util: Drop chia.util.chunks and use chia.util.to_batches instead (#15418) 2023-06-09 16:35:31 -05:00
Matt Hauff
2441035afc
Add reorg rollback to retry store (#15303)
add reorg rollback to retry store
2023-06-09 16:35:11 -05:00
Kronus91
82c9ed953d
Clawback fixes (#15475)
Fix Clawback known issues
2023-06-09 12:15:40 -05:00
dustinface
05b5265234
wallet: Fix clawback hex files (#15477) 2023-06-09 11:06:07 -05:00
dustinface
a93a85e639
wallet: Hint wallet.py (#15362) 2023-06-09 05:11:23 -05:00
William Allen
591e59a6cc
checkpoint: into main from release/1.8.2 @ f0071358bf (#15451)
Source hash: f0071358bf
Remaining commits: 2
2023-06-08 20:17:20 -05:00
Matt Hauff
8e5441c208
Repin clvm_tools_rs==0.1.34 (#15455)
* Repin clvm_tools_rs

* Update hex files to have newlines
2023-06-07 14:08:17 -05:00
Amine Khaldi
c8ee474583
Merge commit 'f0071358bf9a226af8adb2ad12105b3e3d015515' into checkpoint/main_from_release_1.8.2_f0071358bf9a226af8adb2ad12105b3e3d015515 2023-06-07 15:20:23 +01:00
Matt Hauff
0bd6a8ac3b
Move CAT_MOD from cat_loader -> cat_utils (#15459)
Move CAT_MOD from chia.wallet.puzzles.cat_loader -> chia.wallet.cat_wallet.cat_utils
2023-06-06 19:13:11 -05:00
dustinface
bddcc8f3a8
wallet: Fix missing hint in GenesisById.generate_issuance_bundle (#15424)
* wallet: Fix missing hint in `GenesisById.generate_issuance_bundle`

* Call `get_tree_hash` only once
2023-06-06 12:39:56 -05:00
dustinface
b2cbea84d9
wallet: Hint puzzle_utils.py (#15422) 2023-06-06 12:39:15 -05:00
William Allen
349f87facf
checkpoint: into main from release/1.8.2 @ ef68bf76c1 (#15431)
Source hash: ef68bf76c1
Remaining commits: 0
2023-06-05 11:23:15 -05:00
Kronus91
f0071358bf
Clawback Integration (#14348)
* Clawback integration draft

* Add unit test

* Clawback rework

* Fix unit test

* Fix coin type

* Add tx fee & bulk clawback

* Add manual claim

* Add get_clawback_coins API

* Fix unit test

* Fix unit test

* Resolve comments

* Fix unit test

* remove erroneous comment from p2_1_of_n.clvm

* Resolve comments

* use full puzzle instead of hash in augmented_condition.clvm

* Fix pre-commit

* Add set auto claim api

* Resolve comments

* Fix precommit

* Add get auto claim config api

* Fix pre-commit

* Fix mypy and unit tests

* Switch to reuse coin store solution

* Fix unit tests

* Fix pylint

* Resolve comments

* Fix rename

* Revert puzzle_decorator_type since circular import

* Resolve comments

* Add new coin_type & metadata to coin_records

* Remove unrelated changes

* Fix pre-commit

* Remove unrelated changes

* Fix pre-commit

* Add get_coin_records_between

* Fix field data type

* Resolve comments

* Fix unit test

* Remove unrelated changes

* Remove unrelated changes

* Improve unit tests

* Resolve comments

* Fix clvm hex

* Fix unit tests

* Fix API router

* Update rpc client

* Fix pre-commit

* Remove unrelated changes

* Fix set/get auto claim

* Force populate secret key for clawback

* optimizations

* added clawback puzzle hashes

* update drivers and add lifecycle tests

* Fix driver Program types

* avoid redundant uncurry in clawback

* simplify deserialize_coin_metadata()

* run clawback puzzles with a lower cost limit

* Update chia/wallet/wallet_state_manager.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* Add tx records for Clawback

* Add clawback coin id

* Add type filter for get_transactions

* Modify clawback tx types

* Resolve comments

* Resolve comments

* Fix unit tests

* Resolve comments

* Improve unit test

* Use merkle tree class

* Resolve comments

* Resolve comments

* Fix curry tree hash

* Improve coverage

* Improve coverage

* Fix unit test

* Fix test

* Improve coverage

* Fix pre-commit

* Resolve comments

* Handle invalid clawback metadata

* Fix unit tests

* Improve coverage

* Handle empty byte issue

* Forward memo

* Fix unit test

* Resolve comments

* Rework Clawback TX management

* Add confirmed filter

* Resolve comments

* Fix unit test

* Fix pre-commit

* Improve coverage

* Fix unit test

* Handle missing auto_claim config

* Fix pre-commit

* Revert tx confirmed change

* Drop unused `deserialize_coin_metadata`

* Parse clawback metadata in `WalletCoinRecord.parsed_metadata`

* Use `WalletCoinRecord.parsed_metadata`

* Avoid querying low amount coins with the `amount_range` parameter

* Drop unused `to_puzhash`

* Drop `print("Ping")`

* Drop outdated assert

* Resolve comments

* Fix coverage

---------

Co-authored-by: geoffwalmsley <geoffwalmsley@gmail.com>
Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
Co-authored-by: arvidn <arvid@libtorrent.org>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2023-06-05 10:53:34 -05:00
Matt Hauff
5dd204a001
Fix .get_next_from_coin_spend on VerifiedCredential and test new puzhashes (#15423)
Fix .get_next_from_coin_spend on VCWallet and test new puzhashes
2023-06-02 17:54:04 -05:00
Amine Khaldi
88f2121791
Merge commit 'ef68bf76c1c72302a198888780a19698684b6666' into checkpoint/main_from_release_1.8.2_ef68bf76c1c72302a198888780a19698684b6666 2023-06-01 20:34:41 +01:00
dustinface
93af781b4e
wallet: Drop unused conditions helper/parameter (#15421) 2023-06-01 14:27:35 -05:00
Kronus91
ef68bf76c1
Add confirmed filter for get_transactions (#15374)
* Add confirmed filter

* resolve comment
2023-06-01 11:53:59 -05:00
Matt Hauff
1fa1f52c11
Use spendable instead of confirmed balance for offers (#15352) 2023-05-24 16:51:07 -05:00
dustinface
1141f1cdbd
wallet: Refactor WalletStateManager.get_keys (#15361)
* wallet: Refactor `WalletStateManager.get_keys`

* Test `WalletStateManager.get_private_key`
2023-05-24 16:49:36 -05:00
Adam Kelly
7f591890af
Give a type to tuple representing peak (height and block hash) of peer (#14853)
* Give a type to  tuple representing peak (height and block hash) of peer

* Update chia/wallet/wallet_node.py

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-05-23 19:53:32 -05:00
Adam Kelly
337cb312e1
Typecheck chia/wallet/secret_key_store.py (#14945)
* Typecheck chia/wallet/secret_key_store.py

* typecheck secret_key_store.py

---------

Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-05-23 19:53:01 -05:00
dustinface
92e10951b2
pools: Drop PoolWallet.get_next_interesting_coin (#15273) 2023-05-23 14:27:43 -05:00
Kronus91
c45875d517
Add notification for VC (#15353)
* Add notification for VC

* Resolve comment
2023-05-22 17:38:12 -05:00
dustinface
1777ecc2e8
server: Store Version objects instead of str in WSChiaConnection (#15330)
* server: Store `Version` objects instead of `str` in `WSChiaConnection`

* Test connection versions
2023-05-19 13:45:00 -05:00