Commit Graph

10468 Commits

Author SHA1 Message Date
dustinface
26c2ca29de
tests: Fix flaky RPC related tests in test_nft_bulk_mint.py (#14834)
* `assert spend_bundle is not None`, required after hinting in next commit

* Don't start duplicated RPC servers, use the already started ones

* Wait for wallet sync before minting
2023-03-17 19:34:46 -05:00
dustinface
f5afa47d85
wallet: Disconnect untrusted peers if we find a trusted synced one (#14640)
* Move `request_time` creation into `is_peer_synced`

* Pass in `height: uint32` instead of `header_block: HeaderBlock`

* Disconnect untrusted peers as soon as we have a synced trusted

* Add `test_long_sync_untrusted_break`

* Ignore already disconnected peers
2023-03-17 19:28:39 -05:00
Arvid Norberg
307b5726b3
Test cleanups (#14841)
* remove redundant test cases in test_blockchain.py test_ephemeral_timelock

* reorganize some test cases
2023-03-17 19:28:01 -05:00
William Allen
ee1c7790ae
checkpoint: into main from release/1.7.1 @ 6d09a06037 (#14836)
Source hash: 6d09a06037
Remaining commits: 0
2023-03-17 00:17:49 -05:00
William Allen
090caf0f08
Added chia completion command (#14782)
* adding 'chia completion' command

* fixing lint

* Fixing isort

* Update chia/cmds/completion.py

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

* Update chia/cmds/completion.py

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

* Cleanup completions command

* formatting with black

* Update chia/cmds/completion.py

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

* Update chia/cmds/completion.py

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

* Update chia/cmds/completion.py

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

* Update chia/cmds/completion.py

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

* Update chia/cmds/completion.py

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

* fixup my mistakes

* just ["chia"]

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-03-16 12:50:30 -05:00
Amine Khaldi
dca1a2423d
Merge commit '6d09a060379a0eb77d11abf52ba810c93bd4be5f' into checkpoint/main_from_release_1.7.1_6d09a060379a0eb77d11abf52ba810c93bd4be5f 2023-03-16 18:18:35 +01:00
dustinface
fff3ca44c4
wallet: Handle trade coins in the try block of new_coin_state (#14833) 2023-03-16 11:42:55 -05:00
Sebastjan Trepca
6d09a06037
better handling of offer status and failed txs (#14812)
* better handling of offer status and failed txs

* 5 retries before tx is marked failed

* increase test timeouts

* fixed test

* require only difference vs whole fee

* polish + fee coins kick in only if we're missing fee
2023-03-15 20:50:25 -05:00
William Allen
c21141aa07
checkpoint: into main from release/1.7.1 @ fbfd745b5d (#14832)
Source hash: fbfd745b5d
Remaining commits: 0
2023-03-15 20:50:14 -05:00
dustinface
62ee1c8766
wallet: Don't just subscribe to all coin ids from the DB (#14813) 2023-03-15 17:52:56 -05:00
Amine Khaldi
05fdb8fa6a
Merge commit 'fbfd745b5d918e3f3bfcce9df16793080235ff11' into checkpoint/main_from_release_1.7.1_fbfd745b5d918e3f3bfcce9df16793080235ff11 2023-03-15 20:45:28 +01:00
William Allen
b17e0291c3
checkpoint: into main from release/1.7.1 @ a6f423522b (#14830)
Source hash: a6f423522b
Remaining commits: 1
2023-03-15 14:40:07 -05:00
Amine Khaldi
e30043e1b2
Merge commit 'a6f423522bff6d81d06bc6617caed405d0357aaa' into checkpoint/main_from_release_1.7.1_a6f423522bff6d81d06bc6617caed405d0357aaa 2023-03-15 17:44:01 +01:00
Jeff
fbfd745b5d
Bump chia-blockchain-gui to 91234eedaa3fd515699f4d7e38910b5314306cb4 (#14824)
Includes:
* Emoji and color picker positioning fix (did not work at the bottom) by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1555
* Rifeljm/#328 emoji and color picker wallet view (#1553) by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1560
* increase emoji size on the select key screen by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1573
* fix copying of the didid from the signing dialog by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1574
* Remove empty dialog after all blocking offers are canceled by @ChiaMineJP in https://github.com/Chia-Network/chia-blockchain-gui/pull/1554
* Color and emoticon picker - cosmetic fixes by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1579
* NFT detail navigation buttons to center, validation status to top right by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1576
* Moved wallet connect icon to the right (next to notification and exit icon) by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1577
* Fixed emoticon size inside emoji picker on retina displays by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1578
* increase timeouts when fetching content/metadata by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1580
2023-03-14 21:29:27 -05:00
Sebastjan Trepca
a6f423522b
nft royalty edge cases (#14789)
* nft royalty edge cases

* making tests faster

* Update tests/wallet/nft_wallet/test_nft_1_offers.py

Co-authored-by: Matt Hauff <quexington@gmail.com>

* flake

---------

Co-authored-by: Matt Hauff <quexington@gmail.com>
2023-03-14 20:27:15 -05:00
Zachary Brown
aafe234cd2
Update the README to link to the Chia website (#14801)
Mention and link to the Chia website in the README
2023-03-10 16:45:18 -06:00
Jeff
766c33cd33
Bump chia-blockchain-gui to 078cc5976a991ea5a8b2b261deeb71da994d246c (#14794)
Includes:
* special case for one-sided offers where '0' XCH is allowed by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1522
* show NFT title and preview in offer rows by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1521
* tweak testnet button styling by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1520
* Fixing status icons styling (first page & status header) by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1525
* update profiles settings tab and support naming a DID at creation by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1526
* add default fee of zero to fee estimator by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1538
* First screen - edit wallet name (design fixes) by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1529
* Run existing jest tests in CI by @zsolt-dev in https://github.com/Chia-Network/chia-blockchain-gui/pull/1534
* add default fee to fee estimator by @lipalong in https://github.com/Chia-Network/chia-blockchain-gui/pull/1527
* Do not show version mismatch dialog in development by @zsolt-dev in https://github.com/Chia-Network/chia-blockchain-gui/pull/1535
* Prompt to cancel existing offers by @ChiaMineJP in https://github.com/Chia-Network/chia-blockchain-gui/pull/1512
* Add pre commit git hook for eslint and prettier by @zsolt-dev in https://github.com/Chia-Network/chia-blockchain-gui/pull/1536
* update profile settings width and other small changes by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1537
* disabled counter offer button tooltip by @lipalong in https://github.com/Chia-Network/chia-blockchain-gui/pull/1544
* First screen NEW WALLET => ADD WALLET by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1543
* Emoji and color picker cosmetic fixes by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1542
* Sortable wallets bugfixes (+ saving to prefs instead of localStorage) by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1540
* dark mode support by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1546
* Zero state for wallet key home screen by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1545
* add burn icon by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1547
* Changed the Burn NFT icon to a burning/flame icon by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1532
* added support for reset bypass by @seeden in https://github.com/Chia-Network/chia-blockchain-gui/pull/1549
* Randomizing the color and emoji for existing keys the first time use … by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1531
* Rifeljm/#1128 show please wait when accepting offer wallet not synced by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1533
* Fixed an issue where canceled offer in the cancel prompt dialog did n… by @ChiaMineJP in https://github.com/Chia-Network/chia-blockchain-gui/pull/1550
* fix countering offer flow and allow countering from viewing an offer from a notification by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1548
* minor text/emoji sizing and padding tweaks to the wallet key home screen by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1551

**Full Changelog**: https://github.com/Chia-Network/chia-blockchain-gui/compare/1.8.0-b3...1.8.0-b4
2023-03-09 19:35:19 -06:00
Arvid Norberg
1a66a9b3e3
in mempool, support sqlite without generated columns (#14788) 2023-03-09 19:13:43 -06:00
Arvid Norberg
99ef78029b
disable soft-fork 2 (for now) (#14786)
disable soft-fork 2 (for now) until we properly think-through and settle on how to handle ephemeral coins
2023-03-09 19:13:15 -06:00
Kronus91
95d05b72c4
Stop sending change to a new address (#14422)
* Stop sending change to a new address

* Fix bug

* Add config & unit tests

* Resolve comments

* Refine based on the requirements

* Change config to str

* Disable addr reuse for unit test since the hardcode offer doesn't compatible with it

* Cover offer trade

* Add unit test and RPC support

* Add reuse option for cli

* Enhance unit test

* Fix unit test
2023-03-09 18:32:21 -06:00
Amine Khaldi
7d770c1c1e
Add unit tests for create_bundle_from_mempool (#14700)
* Add unit tests for create_bundle_from_mempool().

* Factor out some shared code into a function.

* Add a variation for sending transactions in reverse order.

* Split some logic into functions.

* Refactor setting up the mempool with coins as well as big cost spend bundle handling.
2023-03-09 14:27:50 -06:00
Kyle Altendorf
c4c165eabd
avoid AttributeError when shutting down plotting (#3954)
* Remove valid # type: ignore

A user ran into an exception on this line that mypy should have caught.  Let's see what it says.

```python-traceback
2021-05-06T07:31:41.595 full_node full_node_server        : ERROR    Exception , exception Stack: Traceback (most recent call last):
  File "chia\server\server.py", line 356, in start_client
  File "aiohttp\client.py", line 763, in _ws_connect
  File "aiohttp\client.py", line 521, in _request
  File "aiohttp\connector.py", line 535, in connect
  File "aiohttp\connector.py", line 892, in _create_connection
  File "aiohttp\connector.py", line 1032, in _create_direct_connection
  File "aiohttp\connector.py", line 969, in _wrap_create_connection
  File "asyncio\base_events.py", line 949, in create_connection
  File "asyncio\selector_events.py", line 473, in sock_connect
concurrent.futures._base.CancelledError

2021-05-06T07:31:45.016 daemon asyncio                    : ERROR    Task exception was never retrieved
future: <Task finished coro=<kill_service() done, defined at chia\daemon\server.py:833> exception=AttributeError("'list' object has no attribute 'pid'")>
Traceback (most recent call last):
  File "chia\daemon\server.py", line 841, in kill_service
  File "chia\daemon\server.py", line 805, in kill_process
AttributeError: 'list' object has no attribute 'pid'
2021-05-06T07:32:09.965 full_node full_node_server        : ERROR    Exception:  <class 'concurrent.futures._base.CancelledError'>, closing connection None. Traceback (most recent call last):
  File "chia\server\server.py", line 531, in api_call
  File "asyncio\tasks.py", line 435, in wait_for
concurrent.futures._base.CancelledError

2021-05-06T07:33:20.573 full_node full_node_server        : ERROR    Exception , exception Stack: Traceback (most recent call last):
  File "chia\server\server.py", line 356, in start_client
  File "aiohttp\client.py", line 763, in _ws_connect
  File "aiohttp\client.py", line 521, in _request
  File "aiohttp\connector.py", line 535, in connect
  File "aiohttp\connector.py", line 892, in _create_connection
  File "aiohttp\connector.py", line 1032, in _create_direct_connection
  File "aiohttp\connector.py", line 969, in _wrap_create_connection
```

* fix plotter service killing

* just make it always be a list of processes for all services

* catch up tests

* Update chia/daemon/server.py
2023-03-09 04:22:38 -06:00
Kyle Altendorf
d84917f5df
hint chia.plotting.create_plots (#14692)
* hint chia.plotting.create_plots

* correct the import

* fixup

* imports

* get final from typing_extensions
2023-03-08 12:57:50 -06:00
dustinface
d752569c34
full_node: Drop cache logs in BlockStore (#14777) 2023-03-08 12:14:21 -06:00
Arvid Norberg
b36a1f9eeb
Cleanup tests (#14776)
* clarify test with unknown condition opcode

* fix bug in mempool_manager test_ephemeral_timelock

* simplify test_blockchain test_ephemeral_timelock by factoring out the with_garbage parameter
2023-03-08 11:32:12 -06:00
Kyle Altendorf
912cd2c760
hint chia.pools.pool_wallet (#14694) 2023-03-08 11:26:24 -06:00
William Allen
0ca21d26ac
Adding md exclusion (#14778) 2023-03-08 11:06:28 -06:00
Matt Hauff
adb3fe8082
Don't create a coin for 0 amount royalty payments (#14769)
* Don't create a coin for 0 amount royalty payments

* Tweak tests

* mypy
2023-03-08 10:59:29 -06:00
Arvid Norberg
4ed31c50d5
Bump chia rs 0.2.4 (#14758)
* fix bug in make_test_conds() test utility

* bump chia_rs to 0.2.4, which preserves assert_seconds_relative 0 in parsing conditions. This allows for the 1.8.0 soft-fork to make the existing time-lock conditions stricter, > instead of >=. This is to match the existing ASSERT_HEIGHT_RELATIVE, which already is >

* fixup separating ENABLE_ASSERT_BEFORE from MEMPOOL_MODE

* Use a low value for SOFT_FORK2_HEIGHT during tests and cover the case before soft-fork2

---------

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
2023-03-07 15:29:54 -06:00
William Allen
ecb8f58a9d
Adding Changed label to dependabot updates (#14765) 2023-03-07 15:11:18 -06:00
Kyle Altendorf
a42bf49050
catch up with mypy 1.1.1 (#14767) 2023-03-07 11:34:07 -06:00
Kyle Altendorf
8430b072e2
update mypy.ini (#14760)
* update mypy.ini

* add a type:ignore
2023-03-07 01:55:29 -06:00
William Allen
47a5e9e914
switching more API calls to gh cli (#14701)
* switching more API calls to gh cli

* removing commented line

* Switch to my branch for debugging

* Adding env to setjobenv

* Fix installers to account for diff in ghcli

* Fix typos

* Fixing var escape for madmax on osx

* Fixing bladebit macos installer

* facepalm centos

* Switching setjobenv action back to main
2023-03-06 18:19:51 -06:00
Kyle Altendorf
e1d232883e
hint most chia.types (#14741)
* hint various chia.types

* hmm

* ints

* test todo
2023-03-06 16:34:22 -06:00
dustinface
40ef694160
server: Drop outdated config update (#14592) 2023-03-06 15:58:40 -06:00
Adam Kelly
e31429c540
Move startup / shutdown logging to INFO (#14546) 2023-03-06 14:01:57 -06:00
Earle Lowe
6e140f24fb
simplify and improve daemon connection handling (#14662)
* simplify daemon connection handling

* Add tests

* return list of service names during removal

* set remove raises KeyError

* Better test type hints

* Add types and code refactor

* fix test typos

* small type adjustments

* test code improvements

* Better error handling for bad json

* handle proper but unexpected JSON values

* Update chia/daemon/server.py

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

* test improvements

* check for empty thing equivalence

* Improved logging for ConnectionReset

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-03-06 12:49:38 -06:00
Kyle Altendorf
e5edbd9b3d
fix DataStore.get_tree_generation() detection of no generations (#14721)
* fix DataStore.get_tree_generation() detection of no generations

* revert unwanted change
2023-03-06 12:17:30 -06:00
Kyle Altendorf
cb3f3561a7
ignore pkg_resources deprecation warning (#14750)
https://github.com/Chia-Network/chia-blockchain/actions/runs/4339058595/jobs/7576307782#step:16:23
2023-03-06 11:55:26 -06:00
Kyle Altendorf
d208359a88
hint build_scripts (#14739) 2023-03-06 11:55:02 -06:00
Kyle Altendorf
2d44e510b6
hint_benchmarks (#14738) 2023-03-06 11:50:44 -06:00
Kyle Altendorf
542522e39d
hint chia.cmds.plotnft, plotnft_funcs (#14737) 2023-03-06 11:42:29 -06:00
Kyle Altendorf
31c25d7e78
hint chia.cmds.keys, keys_funcs (#14735) 2023-03-06 11:37:49 -06:00
Kyle Altendorf
96638628ff
hint chia.cmds.farm_funcs (#14734) 2023-03-06 11:37:21 -06:00
Kyle Altendorf
2c000a45eb
correct Announcement.__str__() to present hex (#14740)
A hash is quite unlikely to be valid UTF-8 data and even if it does decode it seems unlikely to be a useful representation.
2023-03-05 16:00:37 -06:00
Arvid Norberg
131c5ec5bf
parameterize Timelock and compute_assert_height tests (#14729)
* parameterize test_compute_assert_height

* parameterize tests in TestCheckTimelocks
2023-03-04 11:39:47 -06:00
Jeff
a110aa93b5
Bump chia-blockchain-gui to 831f176c73e70e826af6a1952c3abfa10560302b (#14732)
Bump chia-blockchaing-gui to 831f176c73e70e826af6a1952c3abfa10560302b

* NFT gallery allow sensitive_content to be "false" (string) by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1503
* remove exit prompt in wallet mode by @lipalong in https://github.com/Chia-Network/chia-blockchain-gui/pull/1504
* add RPC hook for nft_count_nfts by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1501
* fix showing offer details from a wallet txn row by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1500
* Rifeljm/#240 cat2 removal by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1505
* fix merge conflict by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1506
* bugfix in NFT gallery - disappearing when scrolling to the bottom by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1466
* skip prompt on quit only if in wallet mode and other services aren't running by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1507
* update json5 dependency via an update to babel-loader by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1513
* wallet connect improvements by @seeden in https://github.com/Chia-Network/chia-blockchain-gui/pull/1508
* assorted fixes and simplification by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1517
* temporary workaround to load > 50 NFTs at a time by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1516
* Reverting status icon changes as they caused breakage in the app header by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1518
* Rifeljm/#1480 first screen redesign by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1511
* fix nft selection when creating nft for nft offer notification by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1509
* quick fix to show the New Wallet button when no keys are present by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1519

**Full Changelog**: https://github.com/Chia-Network/chia-blockchain-gui/compare/1.8.0-b2...1.8.0-b3
2023-03-03 20:39:49 -06:00
Chris Marslender
db6bf72af3
Listen on ::0 so we can respond to both ipv4 and ipv6 (#14731)
* Listen on ::0 so we can respond to both ipv4 and ipv6

* Move the initial sleep to the end of the first attempt to load reliable peers, so that if we already have a database, it doesn't take 60 seconds to start responding
2023-03-03 19:59:54 -06:00
dependabot[bot]
69a91d24ef
Bump pyinstaller from 5.6.2 to 5.8.0 (#14707)
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.6.2 to 5.8.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.6.2...v5.8.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 15:14:04 -06:00
Sebastjan Trepca
a38da21ebd
no duplicate offers, handle conflict offers correctly (#14722)
* no duplicate offers, handle conflict offers correctly

* don't sync every offer with a bad spend, only pending ones
2023-03-03 15:13:39 -06:00