Commit Graph
14659 Commits
Author SHA1 Message Date
Kyle AltendorfandGitHub 71a8ac2e69 Get get_args() and get_origin() from typing_extensions (#11571)
* Get get_args() and get_origin() from typing_extensions

* Update streamable.py

* cleanup
2022-05-19 10:59:21 -07:00
Kyle AltendorfandGitHub 6082e929c9 Remove unneeded uint64() intermediate in CAT wallet (#11575) 2022-05-19 10:58:45 -07:00
Matt HauffandAmine Khaldi 79ddd63ac8 fix documentation 2022-05-19 15:48:40 +01:00
Matt HauffandAmine Khaldi 67d49c265f Add support for multiple of the same CAT in aggregate offers 2022-05-19 15:48:39 +01:00
Amine Khaldi 6b70a303c3 Apply Quexington's suggested type annotation. 2022-05-19 15:45:02 +01:00
Florin ChiricaandGitHub f251b40743 Fix bug. 2022-05-19 17:24:06 +03:00
xdustinface 3ee55045fd Merge remote-tracking branch 'chia/main' into pr-main-dids-catchup 2022-05-19 13:02:56 +02:00
Amine Khaldi 4e16f426a9 Move col definition up a bit to account for prior uses. 2022-05-19 11:22:52 +01:00
Matt HauffandAmine Khaldi f2138ac2bf Forgot to update rpc test 2022-05-19 11:12:18 +01:00
Matt HauffandAmine Khaldi c8a4f6e617 Better autodetection of drivers on offer creation 2022-05-19 11:09:43 +01:00
Matt HauffandAmine Khaldi 251a94fc92 Include drivers in offer summary 2022-05-19 11:09:43 +01:00
Matt HauffandAmine Khaldi 3a67499ec6 More linting 2022-05-19 11:09:42 +01:00
Matt HauffandAmine Khaldi 90ed42d5d8 isort and flake8 2022-05-19 11:08:04 +01:00
Matt HauffandAmine Khaldi 9c9514d8cc Minor fixes 2022-05-19 11:08:04 +01:00
Matt HauffandAmine Khaldi e09098a7cf Add comments explaining the changes 2022-05-19 11:08:03 +01:00
Matt HauffandAmine Khaldi 049e5049f1 Remove some CAT specific stuff from tm 2022-05-19 11:08:03 +01:00
Matt HauffandAmine Khaldi 2d8d5c785d add test coverage for driver dict in RPC 2022-05-19 11:08:02 +01:00
Matt HauffandAmine Khaldi 20aa9b3476 pivot from string to clvm for dict entries 2022-05-19 11:01:35 +01:00
Matt HauffandAmine Khaldi ca57b578f5 Move outer_puzzles.py 2022-05-19 11:01:35 +01:00
Matt HauffandAmine Khaldi 1334862938 Fix offer RPC again 2022-05-19 10:58:27 +01:00
Matt HauffandAmine Khaldi d1c7c7823b Update trade manager with new generalizations 2022-05-19 10:58:25 +01:00
Matt HauffandAmine Khaldi feaf21ba5b Further generalize the Offer drivers 2022-05-19 10:58:23 +01:00
Matt HauffandAmine Khaldi 39b23987f3 isort 2022-05-19 10:58:22 +01:00
Matt HauffandAmine Khaldi c9f4eeadb1 Fix offer RPC 2022-05-19 10:58:20 +01:00
Matt HauffandAmine Khaldi 79e88675a6 Remove CAT dependencies from trade_manager 2022-05-19 10:58:18 +01:00
Matt HauffandAmine Khaldi 3b59b25460 Generalize the Offer class to more than CATs 2022-05-19 10:58:17 +01:00
Geoff WalmsleyandGitHub ded3fc832b Merge pull request #11554 from Chia-Network/cat_aggregate_offer_fix
Add support for multiple of the same CAT in aggregate offers
2022-05-19 11:27:43 +12:00
Matt Hauff aaf41ef46b fix documentation 2022-05-18 14:15:35 -07:00
Matt Hauff 00cf5b6eaf Add support for multiple of the same CAT in aggregate offers 2022-05-18 14:09:38 -07:00
dustinfaceandGitHub e481b36dc9 tests: Split up and improve test_wallet_rpc.py (#11552)
This breaks up the one big test into 

```
test_send_transaction
test_create_signed_transaction
test_create_signed_transaction_with_coin_announcement
test_create_signed_transaction_with_puzzle_announcement
test_send_transaction_multi
test_get_transactions
test_get_transaction_count
test_cat_endpoints
test_offer_endpoints
test_key_and_address_endpoints
```

Note that there is still much more room for improvements. Also the 
following tests can still be split up more:

```
test_get_transactions
test_cat_endpoints
test_offer_endpoints
test_key_and_address_endpoints
```
2022-05-18 12:09:52 -07:00
Florin Chirica 5727536676 Fix bugs. 2022-05-18 18:38:34 +02:00
Arvid NorbergandGitHub afae2ad5fe make recurse_jsonify() work directly on types (#11537)
* make recurse_jsonify() work directly on types, circumventing the dataclasses.asdict() step. This enables simpler integration of non dataclasses into the Streamable and JSON protocols

* add benchmark for Streamable.to_json_dict()
2022-05-18 09:15:03 -07:00
Kyle AltendorfandGitHub ffc2a42331 disable pytest-monitor by default (#11507)
* disable pytest-monitor by default

* take 2
2022-05-18 09:13:19 -07:00
Kyle AltendorfandGitHub cb5470b806 hints and strict type checking for test_wallet (#11541)
* hints and strict type checking for test_wallet

* fixup

* flip flop
2022-05-18 09:12:39 -07:00
Mariano SorgenteandGitHub 31ed32628f Optimize code to not perform useless subgroup checks (#11546)
* Optimize code to not perform useless subgroup checks

* Revert less important optimizations
2022-05-18 09:09:56 -07:00
matt-o-how 7b95379ef1 ownership layer fixes 2022-05-18 16:03:22 +01:00
geoffwalmsley 70efa9efca nft for xch offers adding and removing coins correctly 2022-05-18 21:07:38 +12:00
matt-o-how da474207ed transfer program fixes and test added 2022-05-17 13:59:20 +01:00
JeffandGitHub 99275e6e37 Support searching derived addresses on testnet. (#11449)
* Support searching derived addresses on testnet.

* Added tests
2022-05-16 13:29:33 -07:00
JeffandGitHub 34e2dde8db Keep daemon websocket alive during keyring unlock (#11371)
* When prompting to unlock the keyring during daemon launch, it's possible
that the daemon websocket connection will timeout before the user has
entered their passphrase. We can't quickly detect that the connection
has timed-out, so instead we now reconnect after collecting the
passphrase, unlock the keyring, and then close the old connection.

* mypy fix

* Switch to using asyncio.loop.run_in_executor to collect the passphrase on its own thread.

* Use a new ThreadPoolExecutor configured with 1 worker thread.
2022-05-16 13:29:10 -07:00
Arvid NorbergandGitHub 51fc5f6e88 remove the cache from CoinStore. It appears the cost of maintaining the cache outweighs the gains. (#11540) 2022-05-16 13:28:42 -07:00
Kyle AltendorfandGitHub c1124d7450 rebuild workflows (#11543) 2022-05-16 13:28:19 -07:00
Sebastjan TrepcaandGitHub 5128d5092d Merge pull request #11538 from trepca/nft0_metadata_bug
updating metadata with multiple uris fix
2022-05-16 21:10:41 +02:00
ecada58d36 Coin Selection Refactor With CAT Coin Selection Refactor (#9975)
* add exact match and best exact match algorithms

* optimize algorithm further

this might be good.

* lint

* fix bad logic

* add final algorithms

* delete lint

* oops

* Update coin_selection.py

* simplify and fix knapsack algoritm

* simplify code and correct logic

* make it way better.

* clarify comments and check for edge cases.

* add comments and stuff

* improve coin selection

addressed comments
Thanks!

* add coin_selection rpc tests.

* clean up and add new unit tests

* undo test changes

* add extra test cases

* move coin_selection to its own function and switch to it for cat and main wallet.

* add cat tests

* lint

* make function align with standards

also removed test

* make test better

* add proper types

* Improve code clarity

* wallet: fix coin selection bugs

* wallet: add an assert just in case

* tests: add some sleeps to reduce flakiness

* Isort

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

* fix bad merge

* lint

* fix tests

* address aforementioned changes.

* remove wallet test

* isort

* more tests and fixes

* lint

* rename to amount for coin selection rpc

* fix incase we have no smaller coins

* fix tests + lint

* re add asserts

* oops

missed me.

* lint

* fix test

* Squashed commit of the following:

commit 34a2235de5
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Apr 13 10:09:42 2022 -0400

    clarify comment

commit adbf7f4f94
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Tue Apr 12 20:27:05 2022 -0400

    linty lint

commit 5ebc1ac9fd
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Tue Apr 12 20:17:19 2022 -0400

    add failure test and final changes

commit 7e5a21b4c2
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Tue Apr 12 19:35:18 2022 -0400

    add descriptions and slim down code

commit 31c95b916d
Merge: d7b91295b d9b0ef5f3
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Mon Apr 11 10:12:05 2022 -0400

    Merge branch 'jack-cat-coinselection' into jn_coinselection_dust

commit d7b91295b5
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Sun Apr 10 20:31:09 2022 -0400

    lint

commit 30dc7c0ab4
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Sun Apr 10 20:25:52 2022 -0400

    fix tests

commit 6c8c2e4874
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Thu Mar 31 15:06:00 2022 -0400

    remove duplicate code.

commit 9f79b6f304
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Thu Mar 31 15:01:10 2022 -0400

    address more concerns

commit 67c1b3929f
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Thu Mar 31 12:59:05 2022 -0400

    fix logic error

commit 2d19a53245
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Thu Mar 31 11:47:52 2022 -0400

    simplify and de duplicate code

commit 6ab1cc79bb
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 21:34:50 2022 -0400

    add function and select individual coin

commit 582c17aa8d
Merge: ce2165942 618fbaeba
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 21:14:37 2022 -0400

    Merge branch 'jack-cat-coinselection' into jn_coinselection_dust

commit ce21659429
Merge: 16aabb3fd 6daba28db
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 20:53:21 2022 -0400

    Merge branch 'jack-cat-coinselection' into jn_coinselection_dust

commit 16aabb3fd5
Merge: 0b9fc2845 2286fe426
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 20:49:02 2022 -0400

    Merge branch 'jack-cat-coinselection' into jn_coinselection_dust

commit 0b9fc28455
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 20:38:12 2022 -0400

    lint

commit 62e74c72f4
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 20:34:22 2022 -0400

    fix logic and tests

commit e738f44320
Author: Jack Nelson <jack@jacknelson.xyz>
Date:   Wed Mar 30 18:52:05 2022 -0400

    deal with dust and add tests

* make sure that we do not use any dust

* minor change

* address concerns

* adjust comments

* adjust comment

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-16 10:42:46 -07:00
Kyle AltendorfandGitHub f9226fb60d rename test files that are missing test_ prefix (#10712)
* rename test files that are missing test_ prefix

* update mypy and isort excludes

* skip test_get_host_addr6() in GitHub Actions under macOS

* rebuild workflows
2022-05-16 09:51:00 -07:00
Mariano SorgenteandGitHub 56e6e68eb3 Uses the new from_bytes_unchecked method in blspy, to improve perfo… (#11463)
* Uses the new `from_bytes_unchecked` method in blspy, to improve performance

* Update test

* Fix merge conflict

* Use from_bytes_unchecked in post_init and from_json

* More uniform code
2022-05-16 09:49:50 -07:00
matt-o-how 6b3c170d33 new versions of chialisp written and compiling - time to write tests 2022-05-16 15:13:52 +01:00
Florin ChiricaandGitHub e87ab3e4ff Merge branch 'long_lived/atari' into fc.new_server 2022-05-16 14:20:56 +03:00
Sebastjan 4a38631611 updating metadata with multiple uris fix 2022-05-16 10:58:00 +02:00
geoffwalmsley abc85f07b1 offers for nfts to/from xch and cats 2022-05-16 16:01:03 +12:00