Commit Graph

3005 Commits

Author SHA1 Message Date
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
Adam Kelly
5cbc415589
Preserve correct MempoolItem block height when rebuilding mempool (#13951) 2022-11-21 16:28:48 -06:00
dustinface
5f706cea27
isort: Remove all tests.core exceptions and sort the related files (#13962) 2022-11-19 11:18:44 -06:00
Jack Nelson
5a74cb3581
Fix wallet fingerprint cli tests (#13958) 2022-11-18 18:30:43 -06:00
Jack Nelson
fb72a2558d
Add --fingerprint option to chia keys show (#13909)
* add fingerprint option to keys func

* rename func

* add fingerprint to cli tests

* Update tests/core/cmds/test_keys.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-11-18 10:51:02 -06:00
dustinface
78e367665b
Introduce sync_store.Peak (#13615) 2022-11-18 10:44:13 -06:00
dustinface
2e2c297a80
util: Remove legacy keyring support (#13398) 2022-11-18 10:33:18 -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
Arvid Norberg
27cbd08229
Factor out member functions of ProofOfSpace to be free functions (#13930) 2022-11-17 13:46:22 -06:00
Almog De Paz
f85bc15d4b
setup services refactor (#13905)
* always return service

* adjust setup_simulators_and_wallets

* adjust setup_simulators_and_wallets

* refactor setup_simulators_and_wallets
add setup_simulators_and_wallets_service

* revert unneeded change

* fix broken fixtures

* lint, fix data_rpc init_wallet_and_node

* fix two_wallet_nodes fixture

* fix two_nodes_sim_and_wallets_services fixture

* fix one_wallet_node_and_rpc fixture

* lint
2022-11-16 20:40:03 -06:00
dustinface
5c861db42f
Make WSChiaConnection a dataclass (#13906)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-11-16 13:38:28 -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
dustinface
8e2e51a8c8
Add optional outbound parameter to get_connections (#13879) 2022-11-15 17:40:16 -06:00
Earle Lowe
f30f0b3512
Call close callback for already closed connections (#13727)
* always call close callback

* Some further explorations

* some more explorations

* Add delay while connections are closed in test

* Add a delay to make sure connections drain

* Update chia/server/server.py

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

* Update tests/connection_utils.py

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

* use log_exceptions context manager

* set close flag correctly

* Added callback type and other changes

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-11-15 16:23:06 -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
dustinface
2706f5995b
server: Enable and fix mypy in ws_connection.py (#13878)
* server: Enable and fix `mypy` in `ws_connection.py`

* Apply suggestions from code review

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

* Tweak error message

* Tweak formatting

* Make `WSChiaConnection.close_callback` optional

* Tweak assert message

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

* Don't provide a default for `close_callback`

* Adjust assertion

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-11-12 14:18:11 -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
dustinface
50d148eadd
Cleanup WSChiaConnection imports/usage (#13868) 2022-11-08 10:10:59 -06:00
Kyle Altendorf
095b9c337e
adjustments for new mypy (#13859)
* adjustments for new mypy

* assert something
2022-11-07 17:38:40 -06:00
Kyle Altendorf
8ff73e961a
add LimitedSemaphore (#13642)
* treat Semaphore._waiters as length zero when it is None

We access the `._waiters` private attribute of the Python asyncio
`Semaphore` class.  This was changed in Python 3.10.8 (and other versions)
to be initialized to `None` instead of an empty deque.  Our existing
unconditional length checks failed on the new `None` default.  This seems
to block syncing.

https://github.com/python/cpython/pull/97020

https://github.com/python/cpython/compare/v3.10.7..v3.10.8#diff-0fee1befb15023abc0dad2623effa93a304946796929f6cb445d11a57821e737

Reported traceback:
```python-traceback
2022-10-12T20:03:59.367 full_node full_node_server : INFO Connected with full_node {'host': '65.34.144.6', 'port': 8444}
2022-10-12T20:03:59.370 full_node full_node_server : ERROR Exception: object of type 'NoneType' has no len(), {'host': '65.34.144.6', 'port': 8444}. Traceback (most recent call last):
File "/home/summa/chia-blockchain/chia/server/server.py", line 598, in wrapped_coroutine
result = await coroutine
File "/home/summa/chia-blockchain/chia/full_node/full_node_api.py", line 114, in new_peak
waiter_count = len(self.full_node.new_peak_sem._waiters)
TypeError: object of type 'NoneType' has no len()

2022-10-12T20:03:59.371 full_node full_node_server : ERROR Exception: object of type 'NoneType' has no len() <class 'TypeError'>, closing connection {'host': '65.34.144.6', 'port': 8444}. Traceback (most recent call last):
File "/home/summa/chia-blockchain/chia/server/server.py", line 608, in api_call
response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=timeout)
File "/usr/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
return await fut
File "/home/summa/chia-blockchain/chia/server/server.py", line 605, in wrapped_coroutine
raise e
File "/home/summa/chia-blockchain/chia/server/server.py", line 598, in wrapped_coroutine
result = await coroutine
File "/home/summa/chia-blockchain/chia/full_node/full_node_api.py", line 114, in new_peak
waiter_count = len(self.full_node.new_peak_sem._waiters)
TypeError: object of type 'NoneType' has no len()

2022-10-12T20:03:59.487 full_node full_node_server : INFO Connection closed: 65.34.144.6, node id: 506fe4c05ce6b72bb707471842e552307c7a547aa9ba981175db5c08fa3e47e6
```

* add LimitedSemaphore
2022-11-06 11:38:25 -06:00
Jeff
7b781cbf12
add_private_key now returns the fingerprint of the added key (#13814)
* add_private_key now returns the fingerprint of the added key
Updated tests

* Addressed feedback

* Update tests/core/daemon/test_daemon.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-11-05 17:49:29 -05:00
Amine Khaldi
5dbc4aaa54
Merge commit '1bfe826e57215066c88dc8e953fc3930aa61a8ae' into checkpoint/main_from_release_1.6.1_1bfe826e57215066c88dc8e953fc3930aa61a8ae 2022-11-04 21:00:58 +01:00
Kyle Altendorf
806499cb3f
add task_instrumentation fixture (#13176)
* add task_instrumentation fixture

* fixup

* Update conftest.py
2022-11-03 23:14:21 -05:00
Amine Khaldi
b502f24357
Merge commit 'bfc35b796f16fe1af6ff322fc602b47ea016dffb' into checkpoint/main_from_release_1.6.1_bfc35b796f16fe1af6ff322fc602b47ea016dffb 2022-11-03 14:21:51 +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
Kyle Altendorf
3870414e47
Bump datalayer tests to 60 minute timeout :[ (#13790)
https://github.com/Chia-Network/chia-blockchain/actions/runs/3371261657/usage
2022-11-01 15:44:49 -05:00
Amine Khaldi
73acfc7409
Don't hold removals twice in mempool items as they're already part of the underlying spend bundle. (#13694) 2022-11-01 15:41:23 -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
Arvid Norberg
bfc35b796f
improve handling of unfinished block messages (#13777) 2022-10-31 22:41: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
Florin Chirica
ed55423db6
Add atari get sync status RPC. (#13440)
* Add atari get sync status RPC.

* Try to fix test.

* Try to fix test.

* Some fixes.

* Update tests/core/data_layer/test_data_rpc.py

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-10-28 15:05:03 -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
Earle Lowe
738238f698
Minor Simulation CI test adjustments (#13612)
* Some simulation test CI hackery

* let me try this

* try this

* yet more attempts

* sigh

* some more attempts

* Adjusting test yaml

* directory != dir

* run a bunch of dups

* experiments

* correct len check

* minor simplifications

* undo test.yaml changes

* Use temp keyring and cleanup temp dirs

* Simplfied get_full_chia_simulator

* move empty_keyring fixture to conftest

* Update tests/simulation/test_start_simulator.py

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

* Update tests/simulation/test_start_simulator.py

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-10-26 20:26:05 -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
bae4e0c5ce
refactor @api_request decorator and family to use a single decorator (#13565)
* more explicit and complete handling of api decorator data

* fix

* .message_class

* actually, those are different types...

* tweak

* simplify

* learn that functools.wraps copies random attributes

* hack the ~planet~ `@api_request` decorator

* R not T

* more future

* implementation detail renames
2022-10-20 16:10:23 -04:00
Kyle Altendorf
7abc062d0d
test service shutdown response to signals (#13576)
* minimal fixup for daemon signal handling regression

* test daemon shutdown response to signals

* positional

* test datalayer shutdown response to signals

* one parametrized test for the services

* colocate the daemon test

* drop sig

* add sendable_termination_signals

* oops, it was SIGTERM

* wait for the daemon
2022-10-20 16:08:49 -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
Kyle Altendorf
4a54e49e10
process_transaction_records() -> process_transactions() (#13629)
* process_transaction_records() -> process_transactions()

* split to process_transaction_records()/_spend_bundles()/_coin_spends()

* expand tests to have multiple transactions etc per repeat

* back to .process_transaction_records() for calls

* one line function defs
2022-10-19 17:42:20 -05:00
Karlkim Suwanmongkol
a3c4c2367a
chia keys show --json (display all keys as json) (#13637)
* chia keys show --json (display all keys as json)

* black (linting) chia keys show --json (display all keys as json)

* output a root object containing the keys array

* support key with empty label

* add test_show_json and test_show_mnemonic_json to test_keys

* chia keys show --json -- do not format json output

* tests/core/cmds/test_keys.py -- result.output.find(<value>) != -1

* tests/core/cmds/test_keys.py -- result.output.find(<value>) != -1 -- black

* Pass root_path in show_all_keys and fix tests

Co-authored-by: Jeff Cruikshank <jeff@chia.net>
2022-10-19 17:41:03 -05:00
Adam Kelly
73e9d15cf7
Fee estimation. (#13645) 2022-10-18 09:12:22 -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
eb6aeb6405
Fix a breaking change in get_puzzle_and_solution RPC (#13519) 2022-10-06 11:05:23 -05:00
dustinface
7a5d9579ef
server: More use of ChiaServer.get_connections (#13573)
* Drop `get_full_node_connections` -> use `get_connections`

* Drop `connection_by_type`

I think the housekeeping required to have it isn't worth it since we
don't handle huge numbers of connections and `get_connections` should be
less enough overhead. Im open for complains though.
2022-10-05 11:21:38 -05:00
dustinface
aed8c61969
full_node: Set defaults in SyncStore (#13607) 2022-10-05 11:07:09 -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
Kyle Altendorf
5b39550f73
convert datalayer to DBWrapper2 (#13582)
* convert datalayer to DBWrapper2 (all write)

* more read, less write

* remove unneeded connection managers

* and...  close it

* data store now creates its own wrapper

* Drop unused hint DataLayer.batch_update_db_wrapper

* require named arguments for most of `DBWrapper2.create()`
2022-10-03 17:50:12 -05:00
Kyle Altendorf
a5ea7fb572
add missing future annotations import (#13583) 2022-10-01 13:25:09 -05:00
Kyle Altendorf
9e1811a331
remove unused variable from conftest (#13575) 2022-09-30 17:50:01 -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
Kyle Altendorf
0f7d022108
add test_miniupnpc_imports_successfully() (#13535)
* add test_miniupnpc_imports_successfully()

* Update test_upnp.py

* Update test_upnp.py
2022-09-30 17:46:10 -05:00
Kyle Altendorf
61b497a701
add a transactional reader as DBWrapper2.reader() (#13468)
* add a transactional reader as `DBWrapper2.reader()`

* contextlib.AbstractAsyncContextManager

* try a minimal test

* rework test to allow the read to finish so the write can finish the commit after that

* pylint disable

* WAL!!!

* more tests

* if TYPE_CHECKING for typing variable assignments

* future

* cover some more test cases
2022-09-30 17:41:33 -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
5fe03a0697
minor comment typo, hinting, and fixture cleanup (#13554)
* extractions

from https://github.com/Chia-Network/chia-blockchain/pull/13479

* oops
2022-09-29 14:53:43 -05:00
Kyle Altendorf
d06b6b0a57
test classes in global scope for hinting (#13544) 2022-09-29 12:14:57 -05:00
dustinface
345698aebd
server: Create ssl contexts earlier + store them instead of all paths (#13512) 2022-09-29 12:14:20 -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
Kyle Altendorf
a20ee08fce
only compile clvm for developers (#13478)
* only compile clvm for developers

* retain existing behavior for backwards compatibility

* tests/check_clvm.py becomes tools/manage_clvm.py check (and add build subcommand)

* trigger recompilation in pytest runs
2022-09-27 11:21:54 -05:00
Kyle Altendorf
8436e6a17a
Confirm equality of client and server RPC routes (#11765)
* Confirm equality of client and server RPC routes

* Update rpc.py

* hints

* Update rpc.py

* Update mypy.ini

* Update rpc_server.py

* Update tests/util/rpc.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-09-26 11:18:46 -05:00
Kyle Altendorf
8ed283a821
make DBWrapper2 handle more connection setup (#13510)
* make DBWrapper2 handle more connection setup

* fixup

* make create_connection() both await'able and async with'able

* recover logging
2022-09-26 11:17:20 -05:00
dustinface
d78c122505
Drop redundant RPC server instances in DataLayer related RPC tests (#13518) 2022-09-26 11:16:25 -05:00
Kyle Altendorf
682b39ab56
Update test_data_rpc.py (#13506)
https://github.com/Chia-Network/chia-blockchain/actions/runs/3105624081/jobs/5031501276#step:16:1151
```python-traceback
____________________________ test_get_owned_stores _____________________________
[gw0] darwin -- Python 3.9.14 /Users/runner/work/chia-blockchain/chia-blockchain/venv/bin/python
tests/core/data_layer/test_data_rpc.py:609: in test_get_owned_stores
    await time_out_assert(2, check_mempool_spend_count, True, full_node_api, 1)
E   AssertionError: Timed assertion timed out after 2 seconds: expected True, got False
```
2022-09-23 17:32:55 -05:00
Kyle Altendorf
6788bdd0ff
increase datalayer test timeout to 40 minutes (#13505) 2022-09-23 17:32:32 -05:00
dustinface
0df4d8cbe4
setup|plotting: chiapos==1.0.11 + drop invalid cache entries (#13502)
* Bump `chiapos` to `1.0.11`

* Drop invalid cache entries
2022-09-23 17:30:30 -05:00
Kyle Altendorf
1dbf575a3e
RpcApiProtocol and RpcServiceProtocol (#11522)
* provide a skeleton hint protocol for rpc apis

* more

* more self.custom_get_connections = None

* fix RpcApiProtocol.service hinting

* catch up with RpcApiProtocol._state_changed()

* FullNode.server is now non-optional.  'ish

* drop another todo

* custom_get_connections -> get_connections

* just make get_connections() a mandatory method with a helper provided

* lots

* try again

* ._start_with_fingerprint()

* fill out the Service generic parameter in start scripts

* ... instead of pass

* add docstrings to the protocols

* remove no longer needed hasattr/not None checks

* remove outdated comment

* refactor Harvester._is_shutdown to ._shut_down
2022-09-21 22:49:01 -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
Almog De Paz
e8c11d74da
up synced timout to 20 on node/wallet setup (#13425) 2022-09-16 16:33:32 -05:00
dustinface
82e729a97d
pools: Make PoolWallet a dataclass (#13426)
* Drop unused `PoolWallet.singleton_list` definition

* Make `PoolWallet` a `dataclass`

* Drop the `ignore`, use `cast(PoolWallet, None)`
2022-09-16 16:01:47 -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
dustinface
fe6358bd65
util: Remove the assigned label if a key gets removed (#13461) 2022-09-15 20:17:31 -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
a822c21469
Merge commit '96dfdfdd044f0c5c72252d6a23884b9871239703' into checkpoint/main_from_release_1.6.0_96dfdfdd044f0c5c72252d6a23884b9871239703 2022-09-14 21:53:45 +01:00
Kyle Altendorf
96dfdfdd04
fix unique error after cancelling offer (#13454)
* fix unique error after cancelling offer

* remove unwanted commented test

* add back the original

* tidy tests
2022-09-14 15:52:27 -05:00
dustinface
837a4798f6
daemon: Implement system metrics logger based on beta config (#12491) 2022-09-14 12:12:24 -05:00
Jeff
746b1c25f0
Add running_services command to list all running services (#13298)
* Extend `is_running` command to support checking multiple/all services

* Strip whitespace around service names.
Added tests for is_running()

* mypy

* Added `running_services` command to list all running services
Refactored `is_running` in terms of a common `is_service_running` fn
Added tests for the new/updated functions

* mypy

* Update chia/daemon/server.py

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

* Update chia/daemon/server.py

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

* Removed option to specify specific services to query.
Addressed PR feedback.

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-14 12:11:20 -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
dustinface
28ad3ec8bc
cmds: Allow --label/-l to be "" to skip the labeling (#13436) 2022-09-13 10:18:57 -05:00
Mariano Sorgente
d209cd87c2
Lots of blocks are being synced, extend the timeouts (#13430) 2022-09-13 00:50:18 -05:00
dustinface
70fe981fb3
cmds: Implement chia beta (#12389)
* cmds: Implement `chia beta` for the beta test program

* Unhide and document all `beta` subcommands

* Refactor all subcommands

* Introduce `chia beta configure`

* Introduce `chia beta status`

* Test all `chia beta` commands

* Use a separate file logger for beta logs

* Write the plotting call args to the log file

* Sort potential submissions

* Some refactoring around log file log handler creation

* JSON dump the plotting args
2022-09-12 16:57:31 -05:00
Kyle Altendorf
789ee4f415
Add .clvm.hex pre-commit check (#12050)
* Add .clvm.hex pre-commit check

* report all results

* stuff

* maybe pass

* add todo

* explicitly define suffixes

* check for (and remove) extra hex and hash files

* remove garbage failure hex and hash files

* provide runner scripts

* matrix pre-commit checks

* maybe now

* more cross platform

* move it

* oops

* shell:

* maybe

* more configurable

* explicitly specify powershell

* tidy

* remove other stuff

* tidy

* remove existing pytest clvm hex etc checker

* add a trailing newline to decompress_block_spends.clvm.hex.sha256tree

* Update activated.ps1

* git config --global core.autocrlf false

* Update pre-commit.yml

* only check `chia/`

* typing_extensions

* typing_extensions

* removing unused typing import

* move top_level out of the rglob

* catchup dl clvm hex files

* Revert "catchup dl clvm hex files"

This reverts commit cd3d4f70b8.

* now
2022-09-12 16:08:55 -05:00
Mariano Sorgente
80529a3337
Ms.no hang (#13378)
* Black/mypy

* Unused dep

* try again without fixes

* hangs

* Unused import

* Comments

* unused import

* Revert for approval

* Revert completely

* Update tests/core/test_farmer_harvester_rpc.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-12 10:28:19 -05:00
Kyle Altendorf
47f2a9d317
fixup 2022-09-10 15:17:42 -04:00
Kyle Altendorf
3427f33b53
Merge commit '792c3113f195385283192c6042e464cebbfbecb3' into checkpoint/main_from_release_1.6.0_792c3113f195385283192c6042e464cebbfbecb3 2022-09-10 14:56:27 -04:00
Amine Khaldi
08442bcffa
Merge commit 'a3fd118487ff572c1bc3983982a7c49339426d8c' into checkpoint/main_from_release_1.6.0_a3fd118487ff572c1bc3983982a7c49339426d8c 2022-09-09 22:59:03 +01:00
Mariano Sorgente
1a49355120
Wait for sync after making wallet (#13385) 2022-09-09 14:26:04 -05: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
Amine Khaldi
1f2559869d
Merge commit '4deaa28aebe675158ddbd9f324793d8b28ec0bbc' into checkpoint/main_from_release_1.6.0_4deaa28aebe675158ddbd9f324793d8b28ec0bbc 2022-09-09 15:20:02 +01: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
Almog De Paz
792c3113f1
Improve test data rpc release (#13382)
* check spends and singletons before farming blocks

* up the timeouts
2022-09-08 10:26:17 -05:00
Kyle Altendorf
8db1943cde
fix datalayer upsert test flakes (#13353) (#13372)
(cherry picked from commit 9b9868d3ef)
2022-09-07 22:46:20 -05:00
Mariano Sorgente
8fe1327f7f
Fix race condition with reorged txs (#13366) 2022-09-07 22:25:34 -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
Kyle Altendorf
9b9868d3ef
fix datalayer upsert test flakes (#13353) 2022-09-07 16:09:20 -05:00
Kyle Altendorf
47b7f2dc38
Replace localhost with 127.0.0.1 for tests (#13324) (#13341)
* Replace localhost with 127.0.0.1 in block tools config

* also make self_hostname fixture be 127.0.0.1

* Move config rewrite inside `automated_testing` conditional

(cherry picked from commit ec056f59b3)
2022-09-07 03:24:20 -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
Arvid Norberg
98adae20f2
use get_puzzle_and_solution_for_coin() from chia_rs (#13315) 2022-09-07 02:41:40 -05:00
Kyle Altendorf
157aa93c48
Merge commit '48a9e53610086d7128304b6e2183c3a2083c6356' into checkpoint/main_from_release_1.6.0_48a9e53610086d7128304b6e2183c3a2083c6356 2022-09-06 17:29:46 -04: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
Kyle Altendorf
740211b460
data layer - wait for creation tx (#13240) (#13335)
(cherry picked from commit 8b1a27b5eb)
2022-09-06 10:52:44 -05:00
Kyle Altendorf
ec056f59b3
Replace localhost with 127.0.0.1 for tests (#13324)
* Replace localhost with 127.0.0.1 in block tools config

* also make self_hostname fixture be 127.0.0.1

* Move config rewrite inside `automated_testing` conditional
2022-09-06 10:51:05 -05:00
Arvid Norberg
0d78058daa
optimize get_block_store (#13263)
* optimize the block_store for the get_puzzle_and_solution_for_coin to not parse the full block. We just need the block generator and generator regs.

* optimize analyze-block

* address review comments
2022-09-03 01:34:05 -05:00
dustinface
1b7c18654e
cmds: Key label support for CLI - chia keys label (#12917) 2022-09-02 17:09:31 -05:00
Almog De Paz
a8b54f9b67
fix flakey test (#12925)
* fix flakey test

* unused import

* testing flakeyness

* fix and test 200 times

* use mock to avoid running _sync

* lint

* remove unused import
2022-09-02 17:09:04 -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
Arvid Norberg
98c44fdd15
add benchmark for get_puzzle_and_solution_for_coin (#13301) 2022-09-02 15:28:08 -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
Amine Khaldi
5737aad8e7
Merge commit 'a16e4cae52684c7814f1cf56d79ef0ec5161f057' into checkpoint/main_from_release_1.6.0_a16e4cae52684c7814f1cf56d79ef0ec5161f057 2022-09-02 16:37:19 +01:00
Kyle Altendorf
4deaa28aeb
set data layer test timeout to 30 minutes (#13270) 2022-09-01 19:04:27 -05:00
Kyle Altendorf
06dc0daa58
Merge commit '8051a91fa2e9ad944289f0fee9e4c8997bb380ec' into checkpoint/main_from_release_1.6.0_8051a91fa2e9ad944289f0fee9e4c8997bb380ec 2022-09-01 01:16:00 -04: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
Kyle Altendorf
e8969da3a2
unfix the test bug, we will get it later with the associated data changes 2022-08-30 22:24:17 -04:00
Kyle Altendorf
8b1a27b5eb
data layer - wait for creation tx (#13240) 2022-08-30 20:47:27 -05:00
Kyle Altendorf
48a9e53610
correct subscription ip to ipv4 localhost (#13243) 2022-08-30 20:47:13 -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
d7d7bbc164
Apparently yaml.safe_dump() can't handle uint16 port (in the wallet_peer port section of data_layer's config). Propagate the port type and make this one explicitly int. 2022-08-30 23:26:07 +01:00
Amine Khaldi
98237e6227
Reflect the changes from main on atari related code. 2022-08-30 22:35:57 +01:00
Arvid Norberg
163552b8d9
Implement generator_for_single_coin() in python instead of clvm and apply quex' optimization to only computing the puzzle hash if the parent and amount matches (#13237) 2022-08-30 16:30:34 -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
Richard Kiss
18c40d6269
Calculate puzzle hashes directly, as an optimization. (#13034) 2022-08-30 14:25:42 -05: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
Kyle Altendorf
a16e4cae52
correct port reference in data layer test (#13193)
* Update test_data_rpc.py

* catch up hashes with fix
2022-08-30 03:00:19 -05: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
dustinface
9bf55c0397
util: Implement key label support for Keychain and KeychainServer (#12883)
* util: Implement key name support for `Keychain` and `KeychainServer`

* Re-raise if adding the key fails

* Call `G1Element.get_fingerprint` only once
2022-08-29 17:07:14 -05:00
Arvid Norberg
497679e97d
implement a more efficient Program.uncurry() (#13204) 2022-08-29 15:25:24 -05:00
Kyle Altendorf
8051a91fa2
core.data_layer parallel = True (#13197) 2022-08-29 15:01:48 -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
Matt Hauff
f57991a51e
add royalty calculation method and RPC (#13129)
* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* add royalty calculation method and RPC

* flake8

* Fix the CLI for royalties

* royalty_pts -> royalty_percentage

* minor test fix
2022-08-25 19:17:34 -05:00
dustinface
fed2ba630e
util: Implement key label support for FileKeyring and KeyringWrapper (#12843)
* util: Implement key label support for `FileKeyring` and `KeyringWrapper`

* Restrict trailing/leading whitespaces in the label

* Bump `MAX_LABEL_LENGTH` to 65

* Additional label tests

* Drop duplicated `KeychainFingerprintNotFound` definition
2022-08-25 19:12:47 -05:00
Amine Khaldi
49adc5baae
Merge commit '0d2e9531f8cdc884e73a3e28904bcfb94289438d' into checkpoint/long_lived_atari_from_release_1.5.1_0d2e9531f8cdc884e73a3e28904bcfb94289438d 2022-08-25 19:19:17 +01:00
Amine Khaldi
1ec1124bdd
Fixup. 2022-08-25 15:13:43 +01:00
Amine Khaldi
f11e0e3106
Reflect the change on datalayer related code. 2022-08-25 14:48:35 +01:00
Amine Khaldi
b0629994f1
Merge commit '87e1ade8bc6bb0f00121af8505a7270d04d81a53' into checkpoint/long_lived_atari_from_release_1.5.1_87e1ade8bc6bb0f00121af8505a7270d04d81a53 2022-08-25 12:46:33 +01:00
Amine Khaldi
685607385d
Merge commit 'af60a81c92cba51c650ad9a2fd2bf653efcbaf0e' into checkpoint/long_lived_atari_from_release_1.5.1_af60a81c92cba51c650ad9a2fd2bf653efcbaf0e 2022-08-25 11:35:43 +01:00
Arvid Norberg
5cd9bbbc14
Revert "now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one" (#13145)
This reverts commit 2d9672c4e7.
2022-08-25 02:05:16 -05:00
Arvid Norberg
7617bfdfba
When adding coins to the wallet, lookup the coin records in bulk, rather than one at a time (#13142) 2022-08-25 02:04:18 -05:00
Mariano Sorgente
dc5c44accd
Fix several bugs with untrusted sync, and correct sync status (#13133)
* 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
2022-08-24 15:29:51 -05:00
Kyle Altendorf
d9ee8b9363
Merge pull request #13079 from Chia-Network/atari-cancel_offer_rpc
atari - cancel offer rpc
2022-08-24 15:42:40 -04:00
Amine Khaldi
bced7008f9
Merge commit 'c1a9d6c031c206cb5b9792a30fd737f0327560dd' into checkpoint/long_lived_atari_from_release_1.5.1_c1a9d6c031c206cb5b9792a30fd737f0327560dd 2022-08-24 19:35:12 +01:00
Amine Khaldi
4306815d23
Merge commit 'a041576c12c23b03d665c9ade775ee3f2bfc32a5' into checkpoint/long_lived_atari_from_release_1.5.1_a041576c12c23b03d665c9ade775ee3f2bfc32a5 2022-08-24 19:06:48 +01:00
Amine Khaldi
2e1505469e
Merge commit 'e311bf4bd4679f97f41f407fecfe0cc0ca94497b' into checkpoint/long_lived_atari_from_release_1.5.1_e311bf4bd4679f97f41f407fecfe0cc0ca94497b 2022-08-24 12:12:40 +01:00
Amine Khaldi
8ec9bda5c7
Merge commit '922523694a30fc6e39fd686ee820d0ea96f55272' into checkpoint/long_lived_atari_from_release_1.5.1_922523694a30fc6e39fd686ee820d0ea96f55272 2022-08-24 11:59:19 +01:00
Amine Khaldi
ca7523d904
Merge commit '51e8c8b60efbcd0d0a6d3d4f1494ca0fdd673c87' into checkpoint/long_lived_atari_from_release_1.5.1_51e8c8b60efbcd0d0a6d3d4f1494ca0fdd673c87 2022-08-24 11:37:30 +01:00
Arvid Norberg
2276284c8e
now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one (#13116) 2022-08-24 01:36:25 -05:00
Matt Hauff
5a967e5166
Generalize NFT offers (#12945)
* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix
2022-08-24 01:18:56 -05:00
dustinface
62642b3b15
util: Introduce get_key/get_keys in Keychain + KeychainServer (#12830) 2022-08-24 01:18:34 -05:00
Kyle Altendorf
ef389b2b37
bump data layer test timeout to 55 2022-08-23 18:49:10 -04:00
Amine Khaldi
b63aa1c87f
Merge commit 'e314040d8d1034668f2563f0c2aeea6a39fd553c' into checkpoint/long_lived_atari_from_main_e314040d8d1034668f2563f0c2aeea6a39fd553c 2022-08-23 20:38:03 +01:00
Kyle Altendorf
f2d6a158fa
roll back pending roots on cancellation (but broken) 2022-08-23 15:09:17 -04:00
Amine Khaldi
5440cc61bb
Merge commit '105f02993f943f758b8f3276b94c9d0781006877' into checkpoint/long_lived_atari_from_main_105f02993f943f758b8f3276b94c9d0781006877 2022-08-23 13:59:19 +01:00
Amine Khaldi
2db8ad4f0c
Update test to reflect the recent change in ReorgProtocol. 2022-08-23 11:38:47 +01:00
dustinface
b020c03b15
tests: Simplify test_daemon.py (#12772)
* Drop `TestDaemon` class

* Refactor response checks in `test_daemon.py`

* Make `test_mnemonic` and `test_fingerprint` global

I want to use them in some other tests in the parameterization.

* Create the daemon connection in the fixture, yield it with the keychain

* Use `KeyData` for the global key data
2022-08-22 22:22:21 -05:00
Arvid Norberg
4959331cd1
Disable some tests (#13089)
* disable the merkle_root regression test. It's expensive and we're already convinced there are no discrepancies between the old and the new implementation

* disable the exhaustive full block parser test
2022-08-22 22:19:57 -05:00
Amine Khaldi
6ee7162f8c
Merge commit '8ec6fe9b92dba860d369c1c6ef2c935837b6fa1b' into checkpoint/long_lived_atari_from_main_8ec6fe9b92dba860d369c1c6ef2c935837b6fa1b 2022-08-22 23:01:15 +01:00
Amine Khaldi
0921fa2d10
Merge commit '2fa9f768ea998952a57011bee6d1143b51c2276d' into checkpoint/long_lived_atari_from_main_2fa9f768ea998952a57011bee6d1143b51c2276d 2022-08-22 22:56:37 +01:00
Kyle Altendorf
4e5bd52d04
renames 2022-08-22 16:32:07 -04:00
Amine Khaldi
8e65ceebc2
Merge commit '0dd5391f40df3414180d2df716fe1d9c2d02767f' into checkpoint/long_lived_atari_from_main_0dd5391f40df3414180d2df716fe1d9c2d02767f 2022-08-22 19:50:04 +01:00
Amine Khaldi
a118cc367c
Merge commit 'f562d965353c4af2b067fda8a8c975f61b1a0c83' into checkpoint/long_lived_atari_from_main_f562d965353c4af2b067fda8a8c975f61b1a0c83 2022-08-22 19:38:42 +01:00
Amine Khaldi
c42340f14f
Merge commit '39ef58ef612b46b9c4c0d4f9d01bb46b4bd28518' into checkpoint/long_lived_atari_from_main_39ef58ef612b46b9c4c0d4f9d01bb46b4bd28518 2022-08-22 19:33:04 +01:00
Amine Khaldi
0807df5b04
Merge commit '44b2568cd64556009d679d25523041220729324b' into checkpoint/long_lived_atari_from_main_44b2568cd64556009d679d25523041220729324b 2022-08-22 19:20:09 +01:00
dustinface
9d5d76d611
util: Introduce KeyData and _get_pk_and_entropy -> _get_key_data (#12752)
* util: Introduce `KeyData` and `_get_pk_and_entropy` -> `_get_key_data`

* Fix typos

* `include_secrets=False` in `delete_key_by_fingerprint`

* Use a variable for the mnemonic string in `KeyDataSecrets.__post_init__`
2022-08-22 11:24:31 -05:00
Kyle Altendorf
4bbcbc3439
Merge branch 'long_lived/atari' into atari-cancel_offer_rpc 2022-08-22 12:21:36 -04:00
Kyle Altendorf
0178f345b1
Merge pull request #13081 from Chia-Network/atari-transactions_for_offers
atari - transactions for offers
2022-08-22 12:18:19 -04:00
Kyle Altendorf
8b2e712c74
fixup 2022-08-22 12:13:06 -04:00
Kyle Altendorf
2fbfe49605
Merge branch 'long_lived/atari' into atari-cancel_offer_rpc 2022-08-22 12:11:45 -04:00