Commit Graph

1352 Commits

Author SHA1 Message Date
Kronus91
3c81911b37
Optimize NFT coin_added (#16227)
* Optimize NFT coin_added

* Resolve comments

* Resolve comment

* Resolve comments
2023-09-06 17:28:32 -05:00
Kronus91
3f09054548
Optimize CAT coin_added (#16226)
* Optimize CAT coin_added

* Remove TODO
2023-09-06 17:28:00 -05:00
dustinface
cd1d22d29b
wallet: Fix and improve untrusted race caching (#16239) 2023-09-06 13:00:25 -05:00
dustinface
4ee7fe27be
wallet: Refactor new_peak in WalletStateManager and PoolWallet (#16262) 2023-09-06 12:59:55 -05:00
Kronus91
3a82aacbbe
Prevent redundant peer calls in coin_added (#15735)
* Refine coin_added

* Resolve comments

* Fix assert

* Fix pre-commit

* Resolve comments

* Resolve comments

* Resolve comments

* Resolve comment

* Add todo

* Add generic

* resolve comment

* Fix cat

* Resolve comments

* Fix test
2023-08-31 12:42:30 -05:00
Matt Hauff
6af4f86171
Add extra_conditions as an option to transaction endpoints (#15911)
Add extra_conditions as an argument to all transaction methods
2023-08-29 13:48:16 -05:00
dustinface
2e18f904dd
wallet: Fix comment in WalletNode.validate_received_state_from_peer (#16037) 2023-08-24 12:38:05 -05:00
Matt Hauff
9a50b48f93
Make sure reuse_puzhash works for nft1 offers (#16116) 2023-08-21 17:31:44 -05:00
Matt Hauff
d08eaa67d0
Fix VC mypy issues (#16117) 2023-08-18 15:35:23 -05:00
Matt Hauff
000499484d
Add the option for arbitrary conditions to make_solution (#15888)
* Add the option for arbitrary conditions to make_solution

* Unknown conditions should come first

* Fix related VC driver bug
2023-08-18 14:04:27 -05:00
Matt Hauff
a545e6a8a7
Introduce TXConfig and CoinSelectionConfig (#15666)
* Explore TXConfig

* test fixes

* more test fixs

* more test fixs

* Make TXConfig a CoinSelectionConfig subclass

* Move RPC config loading into decorator

* Fix mempool performance test

* Fix wallet sync test

* Fix streamable

* Forgot send_transaction_multi

* Remove potentially_inside_lock change

* Add .override to config object

* A few fixes from review

* Get create_message_spend working with tx_config.reuse_puzhash

* pylint and rebase fixes

* Add tests for CMD loaders

* Add RPC client and tests for cancel_offers endpoint

* Add some coverage

* Fix did test

* Add DID test coverage

* add tests for TXConfig & CoinSelectionConfig

* Add reuse_puzhash to dl wallet test

* Add reuse puzhash to dl_wallet test

* Add test coverage to wallet sync test

* Add more tests for TXConfig

* Add tests for coin_funcs.py

* Add some wallet_funcs tests

* Bad merge

* Fix bad test

* condense cmd tests

* test coverage ignore

* merge fix

* Undo GUI change

* Remove a couple of unused tx_endpoints

* Changes due to (#15846)

* Merge fixes

* new=True

* Fix the coins tests

* Fix DID tests

* Fix NFT tests

* Fix VC tests

* Fix wallet tests

* Delete now uneccessary tests

* Fix bad change
2023-08-18 14:03:37 -05:00
Kyle Altendorf
a3236b9df9
Update conditions.py (#16082) 2023-08-18 14:03:05 -05:00
Kyle Altendorf
441d706681
remove cls parameter hinting from conditions classes (#16080)
* Update conditions.py

https://github.com/Chia-Network/chia-blockchain/pull/15883#discussion_r1296356524

* black
2023-08-18 14:02:22 -05:00
Matt Hauff
a111f2537c
Add self revocation path to VC wallet (#16051)
* Add self revocation path to VC wallet

* add test coverage

* actually test coverage
2023-08-17 12:52:30 -05:00
Matt Hauff
e72e155391
Don't raise on duplicate VC proof insertion (#16077) 2023-08-17 12:51:20 -05:00
Matt Hauff
a6839d233d
Add ergonomic condition classes (#15883)
* Add ergonomic condition drivers

* whoops

* Add UnknownCondition

* Test coverage for Announcement classes

* Add coverage for exceptions

* More test coverage

* Add JSON parsing

* Add timelock parsing logic

* Add test coverage

* Test coverage again

* Add a .to_program() on ConditionValidTimes

* remove **kwargs: Any

* address comments by @altendky

* coverage comment

* Use sets instead of indices

* Address comments by @arvidn
2023-08-16 15:25:31 -05:00
Matt Hauff
12bde8c5ee
Remove pointless outgoing TX for CR-CAT claim (#16010)
* Remove pointless outgoing TX for CR-CAT claim

* coverage
2023-08-15 12:23:01 -05:00
Amine Khaldi
54290f812a
Merge commit '17659b80396c3e87fa60415a6ff3fcc2983c0b52' into checkpoint/main_from_release_2.0.0_17659b80396c3e87fa60415a6ff3fcc2983c0b52 2023-08-15 12:09:03 +01:00
Kronus91
17659b8039
Fix clawback sender resync issue (#15853)
* Fix clawback sender resync issue

* enhance unit test

* Fix CI

* Add comment

* Fix unit test & revert changes

* Remove prints

* Resolve comments

* Resolve comments

* Remove check
2023-08-09 10:09:41 -05:00
Matt Hauff
5ee19ea053
Simplify get_max_send_amount for XCH and CATs (#15859)
* Simplify get_max_send_amount for XCH and CATs

* Update crcat wallet
2023-08-08 20:38:29 -05:00
YeungTing
3cc5ef83f9
Update nft_wallet.py (#15968)
fix issue reuse_puzhash for new NFT
2023-08-08 20:33:49 -05:00
Matt Hauff
289260c374
Credential Restricted CATs (#15411)
* Allow create_tandem_xch_tx to take a set of announcements

* Create potential announcement in correct arm of create_tandem_xch_tx

* Make does_coin_belong_to_wallet more robust

* Add match_hinted_coin to wallet protocol

* Add CROuterPuzzle

* Add conditions with fee announce.clsp

* Add CRCATWallet

* Add CLI support for CR-CATs

* Fix bug in CATOuterPuzzle

* Add SOFTFORK_HEIGHTS as an exportable variable from conftest

* Allow specifying num of blocks to farm to wallets_prefarm_services

* Add potential subclasses to cat wallet creation

* Integrate CR-CATs into offers

* Address comments by @geoffwalmsley

* Add CRCAT info to get_wallets

* Changes due to (#15846)
2023-08-03 19:36:21 -05:00
Matt Hauff
fe9b4aa318
Add condition opcodes for agg sigs to condition_codes.clib (#15889)
* Add condition opcodes for agg sigs to condition_codes.clib

* Add comment about hard fork

* pylint
2023-08-03 03:05:37 -05:00
Matt Hauff
226c601764
Remove hack_populate'ing secret keys (#15846)
* Remove hack_populate'ing secret keys

* Add an optional version of get_private_key

* test fixes

* remove pool wallet's sign method

* Move sign_transaction to wallet_state_manager

* Add test coverage

* Fix PoolWallet

* Test coverage

* remove e_msg
2023-07-31 11:16:21 -05:00
Arvid Norberg
57d1974ef3
fix flake8 warnings (#15897) 2023-07-31 09:46:49 -05:00
Amine Khaldi
39dc201564
Arvid's fix flake8 warnings (PR #15897) (#15900)
fix flake8 warnings

Co-authored-by: arvidn <arvid@libtorrent.org>
2023-07-30 22:10:16 -05:00
Amine Khaldi
0043d4bc16
Merge commit '643b3e9b727f2ce689c834096a3a8281014b7aef' into checkpoint/main_from_release_2.0.0_643b3e9b727f2ce689c834096a3a8281014b7aef 2023-07-28 20:49:25 +01:00
Kronus91
9022a101cf
Add force option for spend_clawback_coin (#15832) 2023-07-27 12:31:31 -05:00
Matt Hauff
12514717e3
Remove some old chialisp files (#15824)
* Remove some old chialisp files

* Fix mypy-exclusions.txt
2023-07-25 12:09:50 -05:00
Kronus91
643b3e9b72
Skip clawback incoming txs while deleting the unconfirmed txs (#15826)
* Remove CAT1 UX guards (#15812)

* Skip clawback incoming txs

* Add unit test

* Prevent delete clawback tx

---------

Co-authored-by: Matt Hauff <quexington@gmail.com>
2023-07-25 01:53:35 -05:00
Matt Hauff
f3fb5652c7
Change include_standard_libraries for CLVM compilation default to True (#15852) 2023-07-25 01:44:50 -05:00
Matt Hauff
217e81f478
Move some puzzles out of chia.wallet.puzzles (#15822) 2023-07-24 10:39:16 -05:00
Matt Hauff
53502518c9
Dedup offer cancellation logic (#15804)
* Dedup offer cancellation logic

* Forgot continue

* cancel_pending_offer -> cancel_pending_offers

* Fix broken NFT test

* Fix typo

* Remove writer

* Change dl cancellation test (more efficient)

* Add a bit of coverage

* Address comment by @trepca
2023-07-24 10:38:49 -05:00
Matt Hauff
b565f606c8
Add uncurried args to debug_spend_bundle (#15813)
* Add uncurried args to debug_spend_bundle

* Add <curried puzzle> designator

* simplify control flow
2023-07-21 23:34:41 -05:00
Amine Khaldi
de05016ce0
New aggregate signature conditions (#15769)
* New aggregate signature conditions.

* compute domain strings on the fly (but cache them) (#2)

* Addendum to Arvid's idea.

* Fix a typo.

* more test coverage (#3)

* Fix a typo.

* Refactor final message creation logic into make_aggsig_final_message.

* Cover make_aggsig_final_message exception cases.

* Refactor processing spends' agg sig lists in pkm_pairs.

* Construct a Coin out of a Spend and use it in make_aggsig_final_message.

* Adopt Richard's dictionary trick to simplify make_aggsig_final_message.

* Leverage make_aggsig_final_message in WalletTool's sign_transaction.

---------

Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>
2023-07-20 15:29:10 -05:00
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