Commit Graph

10447 Commits

Author SHA1 Message Date
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
Arvid Norberg
9e8dae67b2
Bump chia_rs to 0.2.3. and ASSERT_MY_BIRTH_* (#14720)
* bump chia_rs to version 0.2.3

* add new error codes for assert_my_birth_*

* add new condition codes for ASSERT_MY_BIRTH_*

* add logic for ASSERT_MY_BIRTH_* conditions
2023-03-03 15:12:37 -06:00
Earle Lowe
2d721ec8bb
Quick fix to some hostname problems (#14725) 2023-03-03 15:05:02 -06:00
Arvid Norberg
c7301693e1
sqlite-backed mempool (#14657)
* implement Mempool using an in-memory sqlite database

* remove_from_pool with empty list is a no-op

* the order is not important in get_coin_records_by_puzzle_hash() or get_block_spends()

* use format string in log statement

* make MempoolItem not streamable, to improve performance of creating objects
2023-03-03 15:04:21 -06:00
Arvid Norberg
3f78f51211
fixup ephemeral coin test in test_mempool (#14719)
* user shorter names for constants in test_mempool.py

* fix typo in test_ephemeral_timelock in mempool test. The conditions should only be applied to the ephemeral coin, not the coin creating it
2023-03-02 05:16:35 -06:00
dependabot[bot]
5669dcebd6
Bump typing-extensions from 4.4.0 to 4.5.0 (#14710)
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/python/typing_extensions/releases)
- [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/python/typing_extensions/compare/4.4.0...4.5.0)

---
updated-dependencies:
- dependency-name: typing-extensions
  dependency-type: direct:production
  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-01 18:09:51 -06:00
dependabot[bot]
dd14419c43
Bump dnspython from 2.2.1 to 2.3.0 (#14580)
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/master/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: direct:production
  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-01 18:09:30 -06:00
Kyle Altendorf
f162f07984
anyio is needed as a standard dependency for the simulator (#14661)
anyio==3.6.2 is a regular dependency
2023-03-01 18:08:51 -06:00
Adam Kelly
341ecd6f9e
Fix Pool Wallet check for invalid state (#14711) 2023-03-01 14:20:44 -06:00
Arvid Norberg
8618ef0f52
Soft fork2 tests (#14712)
* use shorter names in test-ephemeral-coin test parameters

* use shorter names in TestConditions to make the test easier to read

* user shorter names in test_blockchain test_ephemeral_timelock, to make the test easier to read

* extend test_ephemeral_timelock to cover soft-fork 2

* extend test_conditions to cover soft-fork 2
2023-03-01 14:19:55 -06:00
Kyle Altendorf
f29eb44ffc
update mypy.ini (#14706) 2023-02-28 16:59:33 -06:00
Zachary Brown
c8149c4b28
Refine help text for chia peer -a (#14563)
* update help text for chia peer -a

* further chia peer -a language refinement
2023-02-28 14:26:03 -06:00
dependabot[bot]
c8a459d524
Bump aiofiles from 22.1.0 to 23.1.0 (#14578)
Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 22.1.0 to 23.1.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](https://github.com/Tinche/aiofiles/compare/v22.1.0...v23.1.0)

---
updated-dependencies:
- dependency-name: aiofiles
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 13:12:11 -06:00
Kronus91
4accec4108
Extend did_find_lost_did API (#14673)
* Add NFT bulk transfer API

* Fix pre-commit

* Improve unit test

* Fix precommit

* Improve unit test

* Fix response json serialization

* Fix bulk API missing transaction

* Remove print

* Add get_transaction_memo API

* Add unit test for XCH

* Cover received coins

* Add parameter override

* Check old wallet

* Add address brute force

* Fix log
2023-02-28 13:11:28 -06:00
dependabot[bot]
cae628ccf7
Bump setproctitle from 1.2.3 to 1.3.2 (#13920)
* Bump setproctitle from 1.2.3 to 1.3.2

Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.2.3 to 1.3.2.
- [Release notes](https://github.com/dvarrazzo/py-setproctitle/releases)
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/commits)

---
updated-dependencies:
- dependency-name: setproctitle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* setproctitle has type hints now

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-02-28 12:26:50 -06:00
dependabot[bot]
c682a1b6b2
Bump aiohttp from 3.8.3 to 3.8.4 (#14576)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.3 to 3.8.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.8.3...v3.8.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 12:25:58 -06:00
dependabot[bot]
68dd799868
Bump filelock from 3.8.0 to 3.9.0 (#14577)
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.8.0...3.9.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  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-02-28 12:25:29 -06:00
dustinface
fe321ea488
daemon: Fix server shutdown / wait for it (#14674)
* Create the shutdown event inside `WebSocketServer.__init__`

* Rename `WebSocketServer.start` to `run` and make it a contextmanager
2023-02-28 11:43:24 -06:00
Kyle Altendorf
3a5c1a5bd5
hint chia.harvester.harvester, harvester_api (#14690)
* hint chia.harvester.harvester

* hint chia.harvester.harvester_api
2023-02-28 11:42:58 -06:00
Kyle Altendorf
0ed70fd534
hint chia.plotting.check_plots (#14691)
* hint chia.plotting.check_plots

* use the hints
2023-02-28 11:42:39 -06:00
Kyle Altendorf
c29dc05d8b
hint chia.pools.pool_config (#14693) 2023-02-28 11:42:20 -06:00
Kyle Altendorf
377e95319a
hint chia.protocols.pool_protocol (#14695) 2023-02-28 11:42:00 -06:00