Commit Graph

9721 Commits

Author SHA1 Message Date
Izumi Hoshino
9fa965bab2
Minimized a chance where sudo prompts users for password (#13219)
* Minimized a chance where `sudo xxx install ...` is executed and prompts users for password

* Fixed install issue on Ubuntu/Debian

* (Retry) Fixed install issue on Ubuntu/Debian

* Fixed an issue where `install.sh` exits unexpectedly on Ubuntu/Debian

* Added `set +e` and `set -e` to find_xxx functions

* Improve code structure

* Fixed an issue where `install.sh` fails if Python < 3.7 is already installed

* Added `-s` option and overwhaul entire construction

* `-d` and `-s` can be both specified at once
2022-10-04 11:19:15 -05:00
Jeff
d5f9aa1143
Bump chia-blockchain-gui to 17129c5154 (#13593)
Includes:
NFT content/metadata caching and associated user settings
Key labeling follow-up fixes #1025
replaced is_running with running_services
when all services running used poolingInterval 10seconds otherwise 1sec
fixed text color for wallet state chip
Spacescan.io offer sharing for token/NFT offers (#1035)
Fix #1041 error when content-type encoding is iso-8859-1
2022-10-04 09:55:02 -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
305875d0d4
use Logger.warning() instead of the deprecated Logger.warn() (#13588)
https://github.com/Chia-Network/chia-blockchain/actions/runs/3173913911/jobs/5170075702
```python-traceback
Traceback (most recent call last):
  File "/Users/runner/work/chia-blockchain/chia-blockchain/chia/server/node_discovery.py", line 299, in _connect_to_peers
    await self._query_dns(dns_address)
  File "/Users/runner/work/chia-blockchain/chia-blockchain/chia/server/node_discovery.py", line 237, in _query_dns
    self.log.warn(f"querying DNS introducer failed: {e}")
  File "/Users/runner/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/logging/__init__.py", line 1492, in warn
    warnings.warn("The 'warn' method is deprecated, "
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
```
2022-10-03 14:45:18 -05:00
Kyle Altendorf
3e9aebe3ce
loop.run_until_complete() -> asyncio.run() (#13581) 2022-10-03 14:44:53 -05:00
dustinface
9dad485771
daemon: Use WebServer (#13571) 2022-10-03 14:44:05 -05:00
dustinface
8cdb431064
data_layer: Use WebServer in DataLayerServer (#13546)
* Don't wait on shutdown inside `start`

* `stop` -> `close`

* Use `WebServer`
2022-10-03 14:43:30 -05:00
dustinface
31f31296a7
server: Use WebServer in ChiaServer (#13545)
* server: Use `WebServer`

* Fix `yaml.representer.RepresenterError: ('cannot represent an object', 49405)`
2022-10-03 14:43:04 -05:00
Kyle Altendorf
a5ea7fb572
add missing future annotations import (#13583) 2022-10-01 13:25:09 -05:00
dustinface
35acbabf80
server: Use get_extra_info to get the ssl_object (#13578) 2022-09-30 17:50:46 -05:00
dustinface
3464debedb
cmds: ctx.exit -> raise click.ClickException (#13577)
`ctx.exit` expects an `int` only.
2022-09-30 17:50:19 -05:00
Kyle Altendorf
9e1811a331
remove unused variable from conftest (#13575) 2022-09-30 17:50:01 -05:00
Kyle Altendorf
0b3201635d
minimal fixup for daemon signal handling regression (#13570) 2022-09-30 17:49:42 -05:00
dustinface
c837711bd0
util: Set log levels per handler / Fix the log level in beta mode (#13569)
* util: Set log levels per handler / Fix the log level in beta mode

Prior to this PR the log level from the beta config (`DEBUG`) wasn't 
used. So the beta mode still was depending on the config level of the 
service being `DEBUG`.

This PR refactors the logging setup a bit to make it even possible to 
set a specific log level for each handler which is what we need to make 
the `beta.log` level independent from the normal `debug.log` level.

* Add the error to the log

* Compare to `DEBUG`

* Log the handler also
2022-09-30 17:49:29 -05:00
Izumi Hoshino
42e67f049e
Prevent a crash that happens when config["harvester"]["plot_directories"] is not a list (#13551) 2022-09-30 17:49:07 -05:00
Kyle Altendorf
2fc65e1178
more explicit and complete handling of api decorator data (#13542)
* 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
2022-09-30 17:47:56 -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
dustinface
c3ebc62246
server: Drop some ChiaServer attributes (#13513)
* Drop unused `ChiaServer.tasks`

* Drop unused `ChiaServer._tasks`
2022-09-30 17:41:51 -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
dependabot[bot]
939b129f9f
Bump aiohttp from 3.8.1 to 3.8.3 (#13561)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.1 to 3.8.3.
- [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.1...v3.8.3)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 03:40:51 -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
dependabot[bot]
333e836f44
Bump github/codeql-action from 1 to 2 (#11320)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 03:39:28 -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
dustinface
ec059e9a4f
harvester: Some log updates (#13508)
* Log the number of cache entries and the time it took to parse them

* Log `started` and `done` as `INFO` and `batch_processed` as `DEBUG`

* Log the plot found message with `DEBUG` level

* Some additional debug logs in `new_signage_point_harvester`
2022-09-29 14:53:06 -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
Jack Nelson
671c52d606
format path properly depending on os in simulator block-tools (#13564)
* format path properly depending on os

* fix logic issue

* fix dir again
2022-09-29 12:12:23 -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
Richard Kiss
42406f9e96
Recompress generators (#13376)
* Add `start`. Speed start-up. Format better.

* Add `--call` argument to invoke other python code.
2022-09-29 11:24:07 -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
dependabot[bot]
88cf629737
Bump colorlog from 6.6.0 to 6.7.0 (#13556)
Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v6.6.0...v6.7.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-28 04:28:07 -05:00
Gene Hoffman
1224ef924f
Use codespell to catch some typos (#13557) 2022-09-28 04:27:34 -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
dependabot[bot]
5001c9030d
Bump dnspython from 2.2.0 to 2.2.1 (#13553)
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.2.0 to 2.2.1.
- [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.0...v2.2.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 17:23:53 -05:00
dependabot[bot]
d79e897173
Bump filelock from 3.7.1 to 3.8.0 (#13520)
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.7.1 to 3.8.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.7.1...3.8.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 16:55:01 -05:00
dependabot[bot]
4c2a8d0e84
Bump aiofiles from 0.7.0 to 22.1.0 (#13340)
Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.7.0 to 22.1.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](https://github.com/Tinche/aiofiles/compare/v0.7.0...v22.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 15:49:42 -05:00
Snyk bot
5edb904469
fix: upgrade n from 8.0.2 to 8.2.0 (#13020)
Snyk has created this PR to upgrade n from 8.0.2 to 8.2.0.

See this package in npm:
https://www.npmjs.com/package/n

See this project in Snyk:
https://app.snyk.io/org/chia-network/project/d2e8d7b7-1a67-4252-b184-958f24c9e0b2?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-09-27 12:35:23 -05:00
dependabot[bot]
86362db99c
Bump chiavdf from 1.0.6 to 1.0.7 (#12499)
Bumps [chiavdf](https://github.com/Chia-Network/chiavdf) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/Chia-Network/chiavdf/releases)
- [Commits](https://github.com/Chia-Network/chiavdf/compare/1.0.6...1.0.7)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 12:33:55 -05:00
dependabot[bot]
da89f49281
Bump concurrent-log-handler from 0.9.19 to 0.9.20 (#12248)
Bumps [concurrent-log-handler](https://github.com/Preston-Landers/concurrent-log-handler) from 0.9.19 to 0.9.20.
- [Release notes](https://github.com/Preston-Landers/concurrent-log-handler/releases)
- [Changelog](https://github.com/Preston-Landers/concurrent-log-handler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.19...0.9.20)

---
updated-dependencies:
- dependency-name: concurrent-log-handler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 12:33:18 -05:00
dependabot[bot]
2d105f05d2
Bump parse-url and lerna in /build_scripts/npm_windows (#13499)
Bumps [parse-url](https://github.com/IonicaBizau/parse-url) to 8.1.0 and updates ancestor dependency [lerna](https://github.com/lerna/lerna/tree/HEAD/core/lerna). These dependencies need to be updated together.


Updates `parse-url` from 7.0.2 to 8.1.0
- [Release notes](https://github.com/IonicaBizau/parse-url/releases)
- [Commits](https://github.com/IonicaBizau/parse-url/compare/7.0.2...8.1.0)

Updates `lerna` from 5.4.2 to 5.5.2
- [Release notes](https://github.com/lerna/lerna/releases)
- [Changelog](https://github.com/lerna/lerna/blob/main/core/lerna/CHANGELOG.md)
- [Commits](https://github.com/lerna/lerna/commits/v5.5.2/core/lerna)

---
updated-dependencies:
- dependency-name: parse-url
  dependency-type: indirect
- dependency-name: lerna
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 12:23:10 -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
dependabot[bot]
b06bf0ff48
Bump parse-url and lerna in /build_scripts/npm_macos (#13498)
Bumps [parse-url](https://github.com/IonicaBizau/parse-url) to 8.1.0 and updates ancestor dependency [lerna](https://github.com/lerna/lerna/tree/HEAD/core/lerna). These dependencies need to be updated together.


Updates `parse-url` from 7.0.2 to 8.1.0
- [Release notes](https://github.com/IonicaBizau/parse-url/releases)
- [Commits](https://github.com/IonicaBizau/parse-url/compare/7.0.2...8.1.0)

Updates `lerna` from 5.4.3 to 5.5.2
- [Release notes](https://github.com/lerna/lerna/releases)
- [Changelog](https://github.com/lerna/lerna/blob/main/core/lerna/CHANGELOG.md)
- [Commits](https://github.com/lerna/lerna/commits/v5.5.2/core/lerna)

---
updated-dependencies:
- dependency-name: parse-url
  dependency-type: indirect
- dependency-name: lerna
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 02:27:11 -05:00
Chris Marslender
be4ada9b24
Add Bladebit prerelease to prerelease mac builds (#13540)
* Add bladebit for pre-release mac builds. Update pyinstaller to include bladebit if the file exists

* Make plotter inclusion conditional based on if they are present for the build or not

* temp: always get pre-release bladebit plotter for testing

* Only include bladebit on pre-release
2022-09-26 18:35:33 -05:00
Kyle Altendorf
4bcbcdbbe4
remove type ignores for new mypy (#13539)
https://pypi.org/project/mypy/0.981/
2022-09-26 16:54:19 -05:00
Kyle Altendorf
81837a9e1c
Refactor away from post init for UPnP (#11837)
* Refactor away from post init for UPnP

* refactor UPnP to not be reusable

* update upnp in datalayer too

* add if_needed parameter to UPnP.shutdown()

* simpler

* be more lenient about startup failures, like before

* too many ways for UPnP to fail right now, revert to a smaller refactor approach instead of fixing them all up
2022-09-26 11:19:33 -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
23ff56579a
parse api method hints earlier, and less, using get_type_hints() (#13509)
* parse api method hints earlier, and less, using get_type_hints()

* exploring (last)

* cleanup

* tidy comment

* be descriptive
2022-09-26 11:17:44 -05:00