* Deprecated `chia plotters install` command
* Fixed lint errors
* Made it able to recognize plotter executables in venv
* Added install-plotter.sh
* Removed strings for debug
* Added install-plotter.ps1
* Fixed an issue where madmax plotter under venv dir was not recognized by 'chia plotters' command
* Added exec permission to install-plotter.sh
* Fixed issues found in install-plotter.sh
* Fixed lint errors
* Added `-p` option to install.sh/install.ps1
* Fixed lint errors
* Added nice deprecated warning
* Fixed a lint error
* Slightly improved branching
* Made log messages look nice
* Fixed an issue where install.sh/ps1 -p failed if virtual env is not acivated
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
* Deprecated `chia plotters install` command
* Fixed lint errors
* Made it able to recognize plotter executables in venv
* Added install-plotter.sh
* Removed strings for debug
* Added install-plotter.ps1
* Fixed an issue where madmax plotter under venv dir was not recognized by 'chia plotters' command
* Added exec permission to install-plotter.sh
* Fixed issues found in install-plotter.sh
* Fixed lint errors
* Added `-p` option to install.sh/install.ps1
* Fixed lint errors
* Added nice deprecated warning
* Fixed a lint error
* Slightly improved branching
* Made log messages look nice
* Fixed an issue where install.sh/ps1 -p failed if virtual env is not acivated
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/97020https://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
```
* do not compile CL at import time
Similar idea as #13478 but for the `load_serialized_clvm` function.
Fixes#11257 for me
* do not compile ChiaLisp at import time in wallet
* 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
https://github.com/Chia-Network/chia-blockchain/actions/runs/3185807311/jobs/5195866349#step:16:487
```python-traceback
________ ERROR at setup of TestMempoolManager.test_invalid_block_index _________
[gw3] darwin -- Python 3.10.7 /Users/runner/work/chia-blockchain/chia-blockchain/venv/bin/python
venv/lib/python3.10/site-packages/pytest_asyncio/plugin.py:293: in _asyncgen_fixture_wrapper
result = event_loop.run_until_complete(setup())
../../../hostedtoolcache/Python/3.10.7/x64/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
return future.result()
venv/lib/python3.10/site-packages/pytest_asyncio/plugin.py:275: in setup
res = await gen_obj.__anext__()
tests/conftest.py:437: in one_node_one_block
nodes, _, bt = await async_gen.__anext__()
tests/setup_nodes.py:213: in setup_simulators_and_wallets
await create_block_tools_async(
chia/simulator/block_tools.py:2113: in create_block_tools_async
await bt.setup_plots()
chia/simulator/block_tools.py:337: in setup_plots
assert len(self.plot_manager.plots) == len(self.expected_plots)
E AssertionError
---------------------------- Captured stdout setup -----------------------------
create_block_tools_async called 25 times
Found private CA in /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpwl0ved2d, using it to generate TLS certificates
BlockTools daemon port: 46514
------------------------------ Captured log setup ------------------------------
22:37:05 chia.plotting.manager: ERROR _refresh_callback raised: with the traceback: Traceback (most recent call last):
File "/Users/runner/work/chia-blockchain/chia-blockchain/chia/plotting/manager.py", line 194, in _refresh_task
self._refresh_callback(PlotRefreshEvents.batch_processed, batch_result)
File "/Users/runner/work/chia-blockchain/chia-blockchain/chia/simulator/block_tools.py", line 231, in test_callback
assert update_result.duration < 5
AssertionError
```
* 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
* 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.
* Fix secret check for windows/mac (which have more granular checks because of different secret types)
* Make all the workflows use granular secret checks
* Fix whitespace issues
* 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
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
* 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()`
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
```
* 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
* 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