Commit Graph

1022 Commits

Author SHA1 Message Date
Matt Hauff
8e0cabad7e
Add the expected offer ID to some RPCs that take offer blobs (#14366)
* Add the exected offer ID to some RPCs that take offer blobs

* Add ID to client too

* black
2023-01-20 11:58:23 -06:00
Kronus91
35b6738c49
Nft bulk transfer (#14329)
* Add NFT bulk transfer API

* Fix pre-commit

* Improve unit test

* Fix precommit

* Improve unit test

* Fix response json serialization
2023-01-19 13:21:04 -06:00
Matt Hauff
8bb8ae5fea
Add a wallet RPC for converting heights to timestamps (#14357)
* Add a wallet RPC for converting heights to timestamps

* flake8
2023-01-18 13:55:06 -06:00
Sebastjan Trepca
c7eeaa64e6
fix offer cancel balance (#14342) 2023-01-13 18:47:07 -06:00
Arvid Norberg
a5397ec0c3
factor out coin- and PH subscription handling in order to add unit tests (#14222)
* factor out coin- and PH subscription handling in order to add unit tests

* address review comments

* fixup rebase. test_simple_sync_protocol.py
2023-01-05 15:24:58 -06:00
Matt Hauff
4d482f6105
Add a height timestamp for wallet notifications (#14163)
* Add a height timestamp for wallet notifications

* import sqlite3

* lint

* isort

* catch specific error

* Add a test for db backcompat

* Add a test for correct height

* mypy
2023-01-05 10:58:38 -06:00
Adam Kelly
8364166de1
Add MempoolRemoveReason, which represents why we are removing a MempoolItem (#14263)
* Add MempoolRemoveReason, which represents why we are removing a MempoolItem

* Add integration tests for remove_from_pool. Generalize call count tracking in mock Fee Estimator.
2023-01-03 17:08:18 -06:00
Almog De Paz
18c95da752
add local max subscription config (#14188)
* add local max subscription config

* add and use trusted wallet config
tests

* lint

* unused import

* break early

* dont break because we need to iterate for hints

* fix off by one

* lint
2023-01-02 21:38:38 -06:00
Kyle Altendorf
b8068a856d
wait for wallet sync in test_wallet_coinbase_reorg() and test_wallet_tx_reorg() (#14202) 2022-12-22 00:12:50 -06:00
Kyle Altendorf
ccfaca8060
make wallet rpc client wallet id parameters accept int, not str (#14200)
* make wallet rpc client wallet id parameters accept int, not str

* Update chia/cmds/wallet_funcs.py
2022-12-22 00:12:33 -06:00
Kyle Altendorf
cb6c5fc17f
improve adjusted_timeout() to handle floats and None (#14198) 2022-12-21 23:59:36 -06:00
Kyle Altendorf
1d42886721
hint RpcClient.create() return type (#14197) 2022-12-20 14:11:10 -06:00
Earle Lowe
3140c223bd
TechDebt: add get_name to WalletProtocol (#13995)
* add get_name to WalletProtocol

* remove async from did_wallet::get_name

* Return "Standard Wallet" for get_name
2022-12-20 13:26:06 -06:00
Kyle Altendorf
55f5e371b3
Block and transaction processing helpers (#11535)
* Block and transaction processing helpers

* flake8

* more and hints

* More

* separate tests of the simulator from tests using the simulator

* move fixture to conftest

* amounts are uint64

* remove unneeded while loop

* backoff instead of fixed sleep times

* .farm_blocks() only forces tx blocks when needed

* fix test_wallet_create_hit_max_send_amount

* fix test_wallet_tx_reorg

* fix test_address_sliding_window

* rename to farm_blocks_to_wallet

* rename to farm_rewards_to_wallet

* undo changes to protocol endpoints

* reword farm_blocks_to_wallet() loop

* rename process_blocks() to farm_blocks_to_puzzlehash() for now

* timeouts

* debug

* debug

* debug... for 3,7

* fix

* up timeout per block to 2 seconds

* increase transaction processing default timeout

* make debug maybe ok to leave around

* tidy

* intersperse sleeps again for wallet progression

* remove debug code

* review tidy

* cheat on uint64() type

* Update tests/simulation/test_simulator.py

* another import fix

* more fixes

* farm_blocks_to_puzzlehash

* more

* tweak

* fix the two-tx-blocks-instead-of-one dilemma

thanks to almog for figuring this out

* fix

* fixup

* rework since it was still broken on 3.7/3.8...

* oops

* yucky timeout

* more timeout

* cleanup todos

* add balance assertion after reorg before resubmission processing

* Apply suggestions from code review

* rename funds to expected_confirmed_balance

* catchup
2022-12-19 16:40:58 -06:00
Kyle Altendorf
777295b2ad
add system and os dependent timeout adjustments (#13778)
* add system and os dependent timeout adjustments

* Update time_out_assert.py

* add adjusted_timeout() and apply

* Update connection_utils.py
2022-12-15 20:00:00 -06:00
Matt Hauff
ffd02b2f80
Return existing CAT wallet instead of raising (#14101)
* Return existing CAT wallet instead of raising

There's no reason to raise here, all the caller is looking for is an instance of the CATWallet that they're looking for and to create it if it doesn't exist.

* rename create_wallet_for_cat -> get_or_...

* Move wallet created noti inside of function

* remove redundant call
2022-12-13 22:46:16 -06:00
dustinface
8a3ee3f4c0
server: Move api call processing into WSChiaConnection (#14008) 2022-12-09 03:47:46 -06:00
Kyle Altendorf
f41152559f
Add WalletStateManager.get_wallet() to centralize wallet type checking (#14030) 2022-12-08 23:43:42 -06:00
dustinface
80419cb4f0
tests: Use the self_hostname fixture in more places (#14067) 2022-12-08 11:33:40 -06:00
Kyle Altendorf
3e74f542b2
fixup test_did.test_get_info() and .test_update_metadata() (#14061) 2022-12-06 23:21:50 -06:00
Kronus91
1a6967a9ba
Add bulk set NFT DID API (#13720) 2022-12-01 13:29:52 -06:00
Sebastjan Trepca
8bd216bcb7
Improve performance of wallets with many NFTs (#14023) 2022-11-29 14:35:25 -06:00
Kronus91
76ebb08ac8
Fix DID unnecessary wallet deletion (#13925) 2022-11-29 14:22:59 -06:00
Kronus91
13cd8a2ef2
Remove duplicate nft wallet deletion in reorg (#13892)
* Remove duplicate nft wallet deltion in reorg

* Fix unit test

* Fix get latest coin bug

* Add unit test
2022-11-26 20:22:16 -06:00
dustinface
e6f04b3760
isort: Remove all tests.wallet exceptions and sort the related files (#13978) 2022-11-22 15:33:17 -06:00
Kyle Altendorf
caa7e42845
simplify TradeManager.respond_to_offer() return (#13927)
* simplify TradeManager.respond_to_offer() return

* require the exception

* correct to match=

* another failure case
2022-11-21 20:29:35 -06:00
Chris Marslender
c9758cc476
Trigger sync tests for all release types (#13942)
* Trigger sync tests for all release types

* Temporary fix unit test

Co-authored-by: ytx1991 <t.yu@chia.net>
2022-11-17 20:18:56 -06:00
Kronus91
cf944f0260
Return minted NFT ID & Allow transfer NFT with NFT ID (#13928) 2022-11-17 13:51:02 -06:00
Kyle Altendorf
373880dc76
catch up test_complex_nft_offer() with return type change (#13926) 2022-11-16 10:41:49 -06:00
Almog De Paz
ac2203eda8
Refactor test utils for import availability outside of repo (#13880)
* refactor for import availability outside of repo

* refactor for import availability outside of repo

* small revert

* newline

* fix imports

* fix pre-commit issues

* types issort, adapt mypy ignore

* redundant imports

* move files from util to simulator

* run pre_commit

* remove setup_nodes/keyring from isort.cfg

* fix asyncio import
2022-11-15 18:51:05 -06:00
Kyle Altendorf
a531580868
rework around tx records and offer takes (#13603)
* mixed rework around tx records and offer takes

* more

* wait for wallets

* process_transaction_records() -> process_transactions()

* correct to use new bundles= parameter a couple spots

* .process_transaction_records()

* .process_spend_bundles()
2022-11-15 18:42:45 -06:00
Kronus91
3879cea12e
Delete DID wallet after transfer (#13389)
* Delete DID wallet after transfer

* Adjust tests

* Fix merge

* Remove rl_wallet

* Fix tests

* Fix DID bugs

* Add tests

* Add additional spend for DID update

* Fix unit test

* Handle bugged DID

* Cover empty hint case

* Fix unnecessary DID deletion
2022-11-14 11:12:28 -06:00
Kronus91
df519c8a5d
Add did_message_spend API (#13890)
* Add did_message_spend API

* Add get DID info API

* Resolve comments

* Add hints
2022-11-12 14:15:44 -06:00
Kyle Altendorf
46126d47b3
Re-enable the trusted parametrization of test_address_sliding_window() (#10081) 2022-11-11 16:39:49 -06:00
Matt Hauff
a29ab7dbd1
Fix trades between fungible assets <-> fungible assets + nfts (#13825)
* Fix fungible <-> fungible + royalties

* lint
2022-11-10 14:00:33 -06:00
Matt Hauff
ba6a5a3b63
Create royalty payments in fewer coins (#13858)
* Create royalty payments in fewer coins

* flake8

* mypy
2022-11-10 03:04:52 -06:00
Kyle Altendorf
095b9c337e
adjustments for new mypy (#13859)
* adjustments for new mypy

* assert something
2022-11-07 17:38:40 -06:00
Amine Khaldi
5dbc4aaa54
Merge commit '1bfe826e57215066c88dc8e953fc3930aa61a8ae' into checkpoint/main_from_release_1.6.1_1bfe826e57215066c88dc8e953fc3930aa61a8ae 2022-11-04 21:00:58 +01:00
Amine Khaldi
54ce10522b
Merge commit '00aac17996bc0c451133ab45d5f1641f368af959' into checkpoint/main_from_release_1.6.1_00aac17996bc0c451133ab45d5f1641f368af959 2022-11-02 19:07:34 +01:00
arty
787b1c7e8f
Bump for new clvm_tools and clvm_tools_rs versions (#13774)
* Bump for new clvm_tools and clvm_tools_rs versions

* remove no longer needed `type: ignore`

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-11-02 11:18:15 -05:00
Jeff
1bfe826e57
Return the CAT txn instead of the fee txn (if a fee is set) (#13748)
* Return the CAT txn instead of the fee txn (if a fee is set)

* Commenting

* Test cases for cat_spend with and without a fee

* Check that the coin spend is a CAT spend
2022-10-31 23:43:11 -05:00
Almog De Paz
bc57b44884
Rework wallet new peak (#12586)
* validate wp from fork and fix bugs(pr #11826)
move WalletWeighProofHandler to wallet_node
remove code dupelication

* fix init bug
remove bad return path

* lint

* merge fixes
remove redundant ses_cache

* lint

* lint

* fix test

* lint

* shorter methods
check header block
dont set in db if sync failed
use exceptions

* remove redundant code path, we already set the new wp

* exceptions

* dont send wp request if secondary sync is already running

* clean code

* add types

* revert change

* dont disconnect peer

* test bad block response

* lint

* move WP shutdown to _close

* remove redundant task creation, use await

* assert not None

* revert

* fix imports

* lint

* isort

* typo, use log.exception

* remove redundant assert
add log

* lint

* fix pool new peak bug

* lint
2022-10-31 14:18:42 -05:00
Kyle Altendorf
00aac17996
strip input before bech32 decoding (#13759)
this avoids leading and trailing whitespace causing offer processing to fail
2022-10-31 10:45:08 -05:00
Kyle Altendorf
40e1d28b47
Increase job timeout for NFT wallet tests (#13675) (#13744)
(cherry picked from commit fe490d9e04)

Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2022-10-28 16:28:38 -05:00
William Allen
4669be243b
Merge pull request #13702 from Chia-Network/checkpoint/main_from_release_1.6.1_b33eb8d8f41cf5c926e4dd317c0c0e0b36e02fe5
checkpoint: into main from release/1.6.1  @ b33eb8d8f4
2022-10-27 01:45:37 -05:00
Kyle Altendorf
f03df27851
correct test decoration and returns (#13703)
* correct test decoration and returns

* ignore new deprecation warning

* xfail it

(cherry picked from commit 45b5ea39bb)
2022-10-25 17:47:54 -04:00
Kyle Altendorf
45b5ea39bb
correct test decoration and returns (#13703)
* correct test decoration and returns

* ignore new deprecation warning

* xfail it
2022-10-25 16:45:10 -05:00
Amine Khaldi
34328fc265
Merge commit 'b33eb8d8f41cf5c926e4dd317c0c0e0b36e02fe5' into checkpoint/main_from_release_1.6.1_b33eb8d8f41cf5c926e4dd317c0c0e0b36e02fe5 2022-10-25 12:12:32 +01:00
Jack Nelson
e8ff7ea9a4
Coin Selection CLI / RPC Expansion (#13325)
* add max coin amount everywhere

* add excluded amounts to bare minimum

offers really does not need it passed.

* add excluded coin ids

* finish rpc stuff

* finalize commands

add coins command group & expand various coin selection methods

* fix argument processing & clean up code

* fix grammer

* small miss

* Update wallet_rpc_api.py

* fix test

* add combination command

* fix error

* move command group

* add new built in funcs for direct wallet coin searches.

* add get coin rpc

* add last command

* switch to pageable function

* fix args

* expand multi rpc call and tests

+ fix other things

* da lint

* add reverse coin sorting and ability to select coins

* Update wallet_state_manager.py

* fix types

* align with protocol

* fix asserts

* fix imports

* isort

* Update wallet_coin_store.py

* Update wallet_rpc_api.py
2022-10-24 14:03:53 -05:00
Earle Lowe
fe490d9e04
Increase job timeout for NFT wallet tests (#13675) 2022-10-21 16:59:44 -04:00
Kyle Altendorf
f5caa92b03
extend timeout in test_did_attest_after_recovery (#13601)
https://github.com/Chia-Network/chia-blockchain/actions/runs/3185807311/jobs/5195868861#step:16:40
```python-traceback
_____________ TestDIDWallet.test_did_attest_after_recovery[False] ______________
tests/wallet/did_wallet/test_did.py:470: in test_did_attest_after_recovery
    await time_out_assert_not_none(5, full_node_api.full_node.mempool_manager.get_spendbundle, spend_bundle.name())
E   AssertionError: Timed assertion timed out
```
2022-10-20 16:07:54 -04:00
Sebastjan Trepca
b33eb8d8f4
reverted offchain metadata fetched (#13660)
* reverted offchain metadata fetched

* test fix
2022-10-20 15:06:25 -05:00
Harry H
71d33eb86b
feat: enable create_signed_transaction and push_transaction (#13466)
* feat: enable `create_signed_transaction` for CATs and `push_transactions` endpoints

* test: add test cases for create_signed_transaction and push_transactions

* chore: add backwards compatibility

* fix: add `signed_txs` for standard `create_signed_transaction`

* chore: run linter

* feat: accepts `return_single_tx` argument as legacy compat

* fix: improve typing hints

* chore: improve typing

* fix: get rid of `nullcontext` for `python<3.10`

* test: farming more blocks before checking CAT balance

* test: use more robust `farm_transaction` method
2022-10-08 20:54:20 -05:00
Matt Hauff
76a78ed180
Add a try/except for individual coin states (#13371)
* Add a try/except for individual coin states

* black

* Add a retry store

* Only retry for trusted and bug fixes

* lint

* tiny bad merge

* retry for untrusted too

* Only re-raise flaky exceptions in the WSM

* Add unit test

* Update to self.log.exception

* so that's what exception means

* Add an error log for missing peer

* import after merge

* isort

* bad merge
2022-10-06 14:56:40 -05:00
Kronus91
e4d4c8f57d
Fix memos & minter did (#13604)
* Fix memos & minter did

* Fix pre-commit
2022-10-06 14:34:50 -05:00
Matt Hauff
dfe7140bd3
Fix CAT offer aggregation edge case (#13472)
* Fix CAT offer aggregation edge case

* typo

* Fix ring solving for >2 CATs

* Add comment for sort
2022-10-05 11:04:49 -05:00
Matt Hauff
c41d5a9eda
Force a 'resync' if we start to track a singleton that we have already synced (#13591) 2022-10-03 21:04:39 -05:00
dustinface
2aa117b58a
util|rpc: Refactor RpcEnvironment -> WebServer (#13515)
* Move `rpc.rpc_server.RpcEnvironment` -> `util.network.WebServer`

* Improve `WebServer`

* Drop attribute resets

* `black` fix after rebase

* Fix `test_nft_bulk_mint.py`
2022-09-30 17:47:00 -05:00
Matt Hauff
28213628ae
Better proof to singleton mapping (#13458)
* Better proof to singleton mapping

* mypy

* black

* add one for one same values test cases

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-30 17:41:09 -05:00
Kyle Altendorf
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 Altendorf
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
Geoff Walmsley
76ffd4c2df
Mint from DID (#12736)
* mint from did

* fix did puzzle announcements

* clean up params and test

* mypy

* add RPC endpoint

* use rpc client for test

* test create spends in loop

* transfer to target

* fix lineage proof for transfers

* isolate block timing issue in test

* DID lineage proof

* test transfer to targets

* add exclude list to select_coins RPC

* coin json

* move tests to did wallet

* fix typing royalties

* cleanup tests

* DID_HRP to AddressType

* clvm compilation

* improve checks in rpc api

* move mint_from_did to nft wallet

* reduce number of blocks in tests

* forgot to remove mint function from did_wallet.py

* mypy

* validate NFT metadata and edition numbers in test

* fix puzzle announcements, refactor and comments

* make tests work with new RPC server settings

* create puzzle assertions for eve and transfer spends

* rename vars for mint numbering

* rename more edition -> mint variables

* remove DID owner from eve spend

* make coin announcement from did spend

* make transfer from eve spend

* corrections for address options in RPC

* simplify intermediate launchers

* announcments for xch xpend

* re-order announcements for xch spend

* test with fewer blocks

* skip off chain metadata test with IPFS

* add bulk mint puzzle and methods to nft wallet

* add rpc endpoints

* add tests

* don't skip off chain metadata test

* fix default case for xch_coin_list
2022-09-29 11:23:33 -05:00
Kronus91
137e61d68a
Add Signing message APIs (#13491)
* Add sign APIs

* Add sign APIs

* Resolve comment

* Resolve comment & Add CLI

* Fix pre-commit

* Refine

* Fix unit tests

* Resolve comments
2022-09-28 04:26:54 -05:00
dustinface
d78c122505
Drop redundant RPC server instances in DataLayer related RPC tests (#13518) 2022-09-26 11:16:25 -05:00
Matt Hauff
736b83a933
On chain wallet notifications (#13261)
* initial design

* simplify

* curry amount

* add test for notficiation content

* Add some anti-spam to config

* remove comment function

* flake8

* mypy

* shatree

* add_rpcs

* isort

* lgtm

* isort

* golf a bit

* bad merge?

* add sorting and pagination

* Remove MSG_HASH from clvm

* black

* Decrease spam limit

* Add CLI and minor fix

* add newline
2022-09-21 00:53:31 -05:00
Kyle Altendorf
de72a56e1a
farm fewer blocks for wallet offer tests (#13413)
* farm fewer blocks for wallet offer tests

* black

* more explicit about balances

* remove unused imports
2022-09-16 16:01:18 -05:00
Kyle Altendorf
a9cce0f6e0
add final coverage handling (#11778)
* add final coverage handling

* switch to development coverage

* correct url

* only run one directory for now

* only 3.10

* delete windows data for now

* drop the 35% failure point

* recover full test matrix

* Use regular coverage

* Update test.yml

* put coverage reporting into an artifact

* oops

* oopsy

* pytest-cov

* maybe

* maybe help out flakes

* farm the spend bundle...

* some more

* more funds for the did test?

* more...

* report chia/ and tests/ separately

* job_timeout = 45 for core

* tidy and disable diff-cover

* remove job_timeout = 45

* --rcfile=.coveragerc

* Update .github/workflows/test.yml

* revert time and blocks

* assert spend is in mempool, lower times and block count

* remove sleep

* lint

* up timeout

* cat test - farm blocks until spend is included

* add spend check for nft endpoints

* fix nft endpoint test

* remove unused code

* 4

Co-authored-by: almog <almogdepaz@gmail.com>
2022-09-16 14:36:37 -05:00
Arvid Norberg
e4df3f9bf4
make a WalletProtocol, defining the shared API of all wallets (#13437)
* make a WalletProtocol, defining the shared API of all wallets and fix type checking

* add protocol check for DataLayerWallet. remove outdated comment
2022-09-15 20:16:01 -05:00
Amine Khaldi
18ecb326a1
Merge commit '36d44bc2f5b8ef10b0743541478ced85554318f2' into checkpoint/main_from_release_1.6.0_36d44bc2f5b8ef10b0743541478ced85554318f2 2022-09-14 13:07:51 +01:00
Matt Hauff
36d44bc2f5
Hint to the ephemeral coin's innerpuzhash (#13448)
* Hint to the ephemeral coin's innerpuzhash

* update datalayer rpc test reference offer blobs and trade ids

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-13 20:14:01 -05:00
Matt Hauff
2de55aff17
Remove rl wallet (#13429)
* remove all references to RL wallet

* Missed one

* Some new references from main

* Fix is_transaction_confirmed

* mypy

* check for 'confirmed'

* Try again to fix is_transaction_confirmed

* remove from mypy.ini
2022-09-13 17:07:29 -05:00
Kronus91
b081c208e3
Add DID sign message API (#13269)
* Add DID sign message API

* Resolve comments
2022-09-13 16:08:46 -05:00
Sebastjan Trepca
657b654181
Integrating NFT store directly into NFT wallet (#12978)
* test passing on update nft store

* fix tests

* missed await

* fix formatting

* another test fix

* flaky test fix

* test fix

* cleanup

* nft count fix

* pr feedback fixes

* test fix
2022-09-13 10:36:29 -05:00
Almog De Paz
92a84b4726
fix wallet fork test (#13438)
* fix wallet fork test

* fix comment
2022-09-13 10:35:13 -05:00
Mariano Sorgente
d209cd87c2
Lots of blocks are being synced, extend the timeouts (#13430) 2022-09-13 00:50:18 -05:00
Amine Khaldi
08442bcffa
Merge commit 'a3fd118487ff572c1bc3983982a7c49339426d8c' into checkpoint/main_from_release_1.6.0_a3fd118487ff572c1bc3983982a7c49339426d8c 2022-09-09 22:59:03 +01:00
Kyle Altendorf
ae99b987cc
Update test_nft_wallet.py (#13390)
- `__tracebackhide__` provides more clear tracebacks on failure when writing assert-like helpers
- `coroutine` is the name of the type of object you get back after calling an async def
- no need to repeat the timing condition after it has already failed
2022-09-09 13:00:35 -05:00
Mariano Sorgente
87a3e93cc4
Ms.mypy enable (#13320)
* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Enable mypy for a bunch of files

* Update after merge with main

* 99/260 remaining

* Address comments

* Enable more mypy

* Merge conflict mypy file

* More fixes

* pytest.ini and cb-gui

* One more flake8 fix

* Flake8 and tests

* More test fixes

* isort

* Make LGTM happy

* Update chia/full_node/block_store.py

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

* Update chia/full_node/full_node_store.py

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

* Update chia/wallet/util/peer_request_cache.py

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

* Apply all suggestions from PR comments

* Revert cb-gui

* 100 back to 1000, minor tweaks

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-08 12:57:15 -05:00
Arvid Norberg
a3fd118487
instead of fetching every unspent coin from the DB, just to count how many small unspent coins we have, ask the DB to count directly. It's a lot faster (#13361) 2022-09-07 17:10:14 -05:00
Mariano Sorgente
7e626abb3c
The poor CI machine cannot go fast enough (#13347)
* The poor CI machine cannot go fast enough

* Also for data layer

* More increases
2022-09-07 02:43:26 -05:00
William Allen
6fabb96c49
Merge pull request #13312 from Chia-Network/checkpoint/main_from_release_1.6.0_8bc1cc41a5f532765c09c975c515d649ee89ac0e
checkpoint: into main from release/1.6.0  @ 8bc1cc41a5
2022-09-06 15:04:17 -05:00
Mariano Sorgente
8ef4c980b3
Ms.mempool simplify (#13314)
* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Update after merge with main

* Address comments
2022-09-06 12:32:03 -05:00
Kronus91
dda347e09c
Load NFT off-chain metadata on backend (#13018)
* Fix NFT wallet naming

* Resolve comments

* Resolve comment

* Add tests

* Load off-chain metadata & nft_get_nfts pagination

* Fix pre-commit

* Resolve comments

* Resolve comments

* Fix precommit

* Resolve comments

* Resolve comment

* Fix pre-commit

* Fix unit test

* Add tests for pagination

* Resolve comments

* Fix pre-commit

* Resolve comments
2022-09-06 12:31:02 -05:00
Matt Hauff
09933f55c3
Fix complex NFT offer flakiness (#13337) 2022-09-06 11:18:14 -05:00
Almog De Paz
d612567ef2
fix wallet rpc flakes (#13336)
* fix flakes and lower timeouts

* lint
2022-09-06 10:53:22 -05:00
Arvid Norberg
f8e20793ed
now when optimizations have landed, tighten the expected timing for the offer parsing benchmark (#13236) 2022-09-02 17:08:01 -05:00
Amine Khaldi
0f4f2dda57
Merge commit '8bc1cc41a5f532765c09c975c515d649ee89ac0e' into checkpoint/main_from_release_1.6.0_8bc1cc41a5f532765c09c975c515d649ee89ac0e 2022-09-02 18:28:57 +01:00
Kyle Altendorf
f19fc609e5
Merge branch 'main' into checkpoint/main_from_release_1.6.0_12fcaf0e982590efcf26a954c67cd760035d9e6e 2022-08-31 19:02:24 -04:00
Kronus91
9e73d51458
Get minter DID for offer (#13156)
* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test
2022-08-31 15:56:15 -05:00
Sebastjan Trepca
0727f2ed4e
coin interest optimization for trade records (#13044)
* coin interest optimization for trade records

* don't duplicate coin

* added a test

* migration test

* trade record replace test

* mypy fixes

* refactor to use coin_id

* return a set
2022-08-31 15:46:16 -05:00
William Allen
98ef42bf8a
Fix several bugs with untrusted sync, and correct sync status (#13133) (#13232)
* Hopefully fix bug with untrusted sync

* Try removing the cache

* Add cache back, and don't rollback

* Compare to finished_sync_up_to

* Fix plotnfts, and tests

* Async function

* fix wallet blockchain tests

* Fix test, and improve detection of synced

* Correct sync status

* Fix more tests

* Fix more tests

* Fix NFT tests

Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
2022-08-31 11:37:11 -05:00
Dan Perry
8bc1cc41a5
Xch spam (#12878)
* Add mariano54s spam filter changes (original PR is #11894)

* Add new spam_filter tests

* remove get_all_coins method and query db directly in test

* Add test to include case where everything gets filtered, even the first coin

* If filter threshold is <= 1, no need to run the filter

* add test of chia.wallet.wallet_coin_store.get_all_unspent_coins

* Add test case for receiving large coin after sending dust coin

* Add NFT test to spam wallet

* resolve merge conflicts with main

* remove unneeded coin store test

* Add black formatting

* split long comments into multiple lines

* Run black, second try

* Manually add black changes

* Black

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
2022-08-30 17:44:27 -05:00
Amine Khaldi
78a3c9c83a
Merge main into checkpoint/main_from_release_1.6.0_12fcaf0e982590efcf26a954c67cd760035d9e6e 2022-08-30 21:29:45 +01:00
Amine Khaldi
fd471e457f
Reflect the changes from main on atari related code. 2022-08-30 20:31:51 +01:00
Arvid Norberg
1b5f45a7d3
introduce an UncurriedPuzzle class (#13211)
* introduce an UncurriedPuzzle class, containin the mod and args from a puzzle that has already been uncurried. Pass this around to functions that want to access the uncurried puzzle, to avoid uncurrying the same puzzle multiple times.

* use UncurriedPuzzle for get_inner_puzzle()
2022-08-30 11:29:40 -05:00
Amine Khaldi
aacad8fecf
Merge main into checkpoint/main_from_release_1.6.0_12fcaf0e982590efcf26a954c67cd760035d9e6e 2022-08-30 13:25:43 +01:00
Arvid Norberg
38e444340b
Puzzle driver type annotations (#13190)
* annotate CAT outer puzzle driver

* add type annotation to transfer_program_puzzle

* add type annotations to singleton_outer_puzzle

* add type annotations to ownership_outer_puzzle

* add type annotations to metadata_outer_puzzle

* remove unused _asset_id field in puzzle drivers
2022-08-29 19:24:09 -05:00
Arvid Norberg
ee8e737f5f
benchmark for parsing Offer (#13212) 2022-08-29 19:22:58 -05:00
Amine Khaldi
eeb2277955
Merge commit '12fcaf0e982590efcf26a954c67cd760035d9e6e' into checkpoint/main_from_release_1.6.0_12fcaf0e982590efcf26a954c67cd760035d9e6e 2022-08-29 17:45:49 +01:00
Arvid Norberg
6ae4700e46
remove all_puzzle_hashes from wallet puzzle store (#13159) 2022-08-25 19:17:46 -05:00