Commit Graph
14659 Commits
Author SHA1 Message Date
Kyle AltendorfandGitHub 9e1811a331 remove unused variable from conftest (#13575) 2022-09-30 17:50:01 -05:00
Kyle AltendorfandGitHub 0b3201635d minimal fixup for daemon signal handling regression (#13570) 2022-09-30 17:49:42 -05:00
dustinfaceandGitHub 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 HoshinoandGitHub 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 AltendorfandGitHub 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
dustinfaceandGitHub 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 AltendorfandGitHub 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
dustinfaceandGitHub c3ebc62246 server: Drop some ChiaServer attributes (#13513)
* Drop unused `ChiaServer.tasks`

* Drop unused `ChiaServer._tasks`
2022-09-30 17:41:51 -05:00
Kyle AltendorfandGitHub 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
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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 AltendorfandGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 AltendorfandGitHub 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
dustinfaceandGitHub 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 AltendorfandGitHub d06b6b0a57 test classes in global scope for hinting (#13544) 2022-09-29 12:14:57 -05:00
dustinfaceandGitHub 345698aebd server: Create ssl contexts earlier + store them instead of all paths (#13512) 2022-09-29 12:14:20 -05:00
Jack NelsonandGitHub 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 AltendorfandGitHub 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 KissandGitHub 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 WalmsleyandGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 HoffmanandGitHub 1224ef924f Use codespell to catch some typos (#13557) 2022-09-28 04:27:34 -05:00
Kronus91andGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 botandGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 AltendorfandGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 MarslenderandGitHub 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
1.6.1-b2
2022-09-26 18:35:33 -05:00
Kyle AltendorfandGitHub 4bcbcdbbe4 remove type ignores for new mypy (#13539)
https://pypi.org/project/mypy/0.981/
2022-09-26 16:54:19 -05:00
Kyle AltendorfandGitHub 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
1.6.1-b1
2022-09-26 11:19:33 -05:00
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 AltendorfandGitHub 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
Kyle AltendorfandGitHub 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
Kyle AltendorfandGitHub 3342a2a6a2 less _ for used variables (#13536) 2022-09-26 11:16:57 -05:00
dustinfaceandGitHub d78c122505 Drop redundant RPC server instances in DataLayer related RPC tests (#13518) 2022-09-26 11:16:25 -05:00
JeffandGitHub 4b597511e0 Bump chia-blockchain-gui to ce9d64b2ef741788688343e4b140caa1c58b4860 (#13534)
Includes:
* Fixes for console errors as well as a bunch of code cleanup
* Nacho NFTs (dev-only feature)
* Graph fixes
* CAT tooltip positioning fix in Manage Tokens drawer
* Bumped Electron to 20.1.3
* Fixed incorrect display of assets when viewing offer created by self
* Fixed viewing NFTs with malformed offchain-metadata
* Renamed "Data Layer" to "DataLayer"
* Initial support for plotting with Bladebit 2
* Added Bladebit 2 support for --no-t1-direct and --no-t2-direct
* NFT changes to support other media types (video/audio/other)
* NFT minter is shown in the offer viewer
2022-09-26 11:14:10 -05:00
Izumi HoshinoandGitHub e40772a0bf Added support for --no-t1-direct and --no-t2-direct (#13526) 2022-09-26 09:20:40 -05:00
Kyle AltendorfandGitHub 4d04dc8589 drop dropped stats (#13524)
plug a "leak"

thanks to @roseiliend for pointing this out in https://github.com/Chia-Network/chia-blockchain/pull/10570
2022-09-26 09:20:02 -05:00
Kyle AltendorfandGitHub a1b452b084 Remove unreleased section from changelog (#13495) 2022-09-23 19:43:34 -05:00
Kyle AltendorfandGitHub fcd8190cdb Update 1.6.0 Modified changelog section to Changed for consistency (#13493) 2022-09-23 19:43:19 -05:00
Florin ChiricaandGitHub 89dc1ae11e Add root hash to CLI. (#13306)
* Add root hash to CLI.

* Explicitly throw exception if we don't find root hash.

* Throw inside RPC only.
2022-09-23 19:43:04 -05:00
Izumi HoshinoandGitHub a2b6a9b5f3 Cmj.bladebit (#11187)
* Making source code cleaner

* Cleaned up `install_plotter.py`

* Now `$CHIA_ROOT/plotters/bladebit` is searched first then bundled bladebit

* Fixed a lint error

* WIP: Implement bladebit update/checkout feature

* Enable to specify git branch/tag/commit on bladebit installation

* Modify arguments display order

* Added `chia plotters version` command

* Fixed lint errors

* Fixed lint error 2

* Implemented `chia plotters bladebit2` and handling for its options

* Fixed typo

* Fixed a lint error

* Added comment

* Added missing plotter arguments

* Fixed LGTM warning

* Fixed wrong typing

* Fixed a lint error

* Fixed an issue where `None` was evaluated as an empty string

* Support bladebit2 plotting from web request

* Updated response of `get_plotters` API for upcoming `bladebit2`

* Fixed bladebit2 argument handling

* Modified progress dict

* Added --no-cpu-affinity option to bladebit1

* Fixed a minor error

* Fixed an error where `chia plotters version` failed

* Fixed an issue where building bladebit2 failed

* Fixed an issue where bladebit2 stopped working if `--cache` option was set

* Updated branch for bladebit2

* Fixed an issue where plotting with madmax/bladebit failed for Python < 3.8 on Windows

* Now `chia plotters install madmax|bladebit2` should work on RedHat like OSes

* Fixed a wrong yum package name

* Added yum packages required for Bladebit2

* Changed the way to update bladebit

* Implemented option handling for madmax as well as bladebit

* Fixed a lint error

* Fixed a minor issue

* Fixed LGTM warning

* Applied changes for bladebit 2.0.0-alpha-2

* Fixed a lint error

* Trying to fix windows pre-commit error

* Fixed isort error
2022-09-23 19:42:37 -05:00
dustinfaceandGitHub 77932fcc11 util: Refactor select_port to not load the config (#13514)
* util: Refactor `select_port` to not load the config

* Fix `prefer_ipv6` config lookup

* Use `str2bool`
2022-09-23 17:47:26 -05:00
Kyle AltendorfandGitHub a72edd486d minimal api switch to get_type_hints() (#13507) 2022-09-23 17:33:11 -05:00