Commit Graph

9854 Commits

Author SHA1 Message Date
Amine Khaldi
8ab0975bd5
Fix sending 100 items with the highest fee per cost in request_mempool_transactions. (#13617) 2022-10-19 01:46:00 -05:00
William Allen
6b2140a84d
Merge pull request #13654 from Chia-Network/checkpoint/main_from_release_1.6.1_73e9d15cf7621ddcd58fd371bce623a8a22a7126
checkpoint: into main from release/1.6.1  @ 73e9d15cf7
2022-10-18 20:01:04 -05:00
Adam Kelly
4dfa87c31b
Fix math error in pass/fail percentage calculation (#13653) 2022-10-18 19:59:52 -05:00
Amine Khaldi
23aa951fcf
Merge commit '73e9d15cf7621ddcd58fd371bce623a8a22a7126' into checkpoint/main_from_release_1.6.1_73e9d15cf7621ddcd58fd371bce623a8a22a7126 2022-10-18 19:54:23 +01:00
William Allen
d2e4454d9b
Merge pull request #13649 from Chia-Network/checkpoint/main_from_release_1.6.1_da3b2c374901097c545cda276cad3ebf687e4bbd
checkpoint: into main from release/1.6.1  @ da3b2c3749
2022-10-18 13:50:43 -05:00
Jeff
d469bc7486
Paninaro.bump gui fe08ae6760b8ab4878e98cdff8f13e3b9e6578cf (#13651)
* Deprecate `chia plotters install` command (#13584) (#13643)

* 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>

* Bump blspy from 1.0.15 to 1.0.16 (#13552)

Bumps [blspy](https://github.com/Chia-Network/bls-signatures) from 1.0.15 to 1.0.16.
- [Release notes](https://github.com/Chia-Network/bls-signatures/releases)
- [Commits](https://github.com/Chia-Network/bls-signatures/compare/1.0.15...1.0.16)

---
updated-dependencies:
- dependency-name: blspy
  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>

* Bump dnslib from 0.9.17 to 0.9.22 (#13599)

Bumps [dnslib](https://github.com/paulc/dnslib) from 0.9.17 to 0.9.22.
- [Release notes](https://github.com/paulc/dnslib/releases)
- [Commits](https://github.com/paulc/dnslib/commits/0.9.22)

---
updated-dependencies:
- dependency-name: dnslib
  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>

* Bump clvm-tools-rs from 0.1.19 to 0.1.24 (#13626)

Bumps [clvm-tools-rs](https://github.com/Chia-Network/clvm_tools_rs) from 0.1.19 to 0.1.24.
- [Release notes](https://github.com/Chia-Network/clvm_tools_rs/releases)
- [Commits](https://github.com/Chia-Network/clvm_tools_rs/compare/0.1.19...0.1.24)

---
updated-dependencies:
- dependency-name: clvm-tools-rs
  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>

* Bump chia-blockchain-gui to fe08ae6760b8ab4878e98cdff8f13e3b9e6578cf

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William Allen <wallentx@users.noreply.github.com>
2022-10-18 11:02:47 -05:00
Amine Khaldi
0288855fa9
Merge commit 'da3b2c374901097c545cda276cad3ebf687e4bbd' into checkpoint/main_from_release_1.6.1_da3b2c374901097c545cda276cad3ebf687e4bbd 2022-10-18 15:27:51 +01:00
William Allen
bc71221a44
Merge pull request #13648 from Chia-Network/checkpoint/main_from_release_1.6.1_0e9346452121e9c92aa396564f2d3265d4016267
checkpoint: into main from release/1.6.1  @ 0e93464521
2022-10-18 09:27:26 -05:00
Adam Kelly
73e9d15cf7
Fee estimation. (#13645) 2022-10-18 09:12:22 -05:00
Amine Khaldi
4e545e5722
Merge commit '0e9346452121e9c92aa396564f2d3265d4016267' into checkpoint/main_from_release_1.6.1_0e9346452121e9c92aa396564f2d3265d4016267 2022-10-18 12:01:14 +01:00
dependabot[bot]
370ef67935
Bump clvm-tools-rs from 0.1.19 to 0.1.24 (#13626)
Bumps [clvm-tools-rs](https://github.com/Chia-Network/clvm_tools_rs) from 0.1.19 to 0.1.24.
- [Release notes](https://github.com/Chia-Network/clvm_tools_rs/releases)
- [Commits](https://github.com/Chia-Network/clvm_tools_rs/compare/0.1.19...0.1.24)

---
updated-dependencies:
- dependency-name: clvm-tools-rs
  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-10-18 01:40:21 -05:00
dependabot[bot]
b2231e4ba5
Bump dnslib from 0.9.17 to 0.9.22 (#13599)
Bumps [dnslib](https://github.com/paulc/dnslib) from 0.9.17 to 0.9.22.
- [Release notes](https://github.com/paulc/dnslib/releases)
- [Commits](https://github.com/paulc/dnslib/commits/0.9.22)

---
updated-dependencies:
- dependency-name: dnslib
  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-10-18 01:39:36 -05:00
dependabot[bot]
34d80462e5
Bump blspy from 1.0.15 to 1.0.16 (#13552)
Bumps [blspy](https://github.com/Chia-Network/bls-signatures) from 1.0.15 to 1.0.16.
- [Release notes](https://github.com/Chia-Network/bls-signatures/releases)
- [Commits](https://github.com/Chia-Network/bls-signatures/compare/1.0.15...1.0.16)

---
updated-dependencies:
- dependency-name: blspy
  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-10-18 01:39:15 -05:00
Earle Lowe
da3b2c3749
Set the type correctly for click (#13644) 2022-10-17 18:58:18 -05:00
Amine Khaldi
d73e979720
Deprecate chia plotters install command (#13584) (#13643)
* 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>
2022-10-17 14:29:02 -05:00
Izumi Hoshino
0e93464521
Deprecate chia plotters install command (#13584)
* 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
2022-10-17 12:35:58 -05:00
Kyle Altendorf
b4ac518c43
treat Semaphore._waiters as length zero when it is None (#13638)
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/97020

https://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
```
2022-10-17 11:36:47 -05:00
Louis Bettens
5ee4c398bf
do not compile ChiaLisp at import time (#13609)
* 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
2022-10-13 11:32:51 -07:00
Harry H
71d33eb86b
feat: enable create_signed_transaction and push_transaction (#13466)
* 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
2022-10-08 20:54:20 -05:00
Icer
23f87d5fef
Fix typo in wallet: puzzle (#13621) 2022-10-08 02:59:16 -05:00
Samet
32f5fa3d55
logo-fix (#13610) 2022-10-07 15:51:31 -05:00
dustinface
aa98cda444
full_node: Drop unused ultra priority lock (#13619) 2022-10-07 15:16:48 -05:00
Kyle Altendorf
8fad789346
extend allowed duration in block tools update callback (#13602)
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
```
2022-10-07 13:22:18 -05:00
Matt Hauff
76a78ed180
Add a try/except for individual coin states (#13371)
* 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
2022-10-06 14:56:40 -05:00
Kronus91
e4d4c8f57d
Fix memos & minter did (#13604)
* Fix memos & minter did

* Fix pre-commit
2022-10-06 14:34:50 -05:00
Matt Hauff
eb6aeb6405
Fix a breaking change in get_puzzle_and_solution RPC (#13519) 2022-10-06 11:05:23 -05:00
Amine Khaldi
2b2a1e8646
Fix marking the successfully added spend bundles to the reinitialized mempool (the non optimized case) as seen when a new peak is available. (#13613) 2022-10-05 18:17:00 -05:00
dustinface
7a5d9579ef
server: More use of ChiaServer.get_connections (#13573)
* 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.
2022-10-05 11:21:38 -05:00
dustinface
aed8c61969
full_node: Set defaults in SyncStore (#13607) 2022-10-05 11:07:09 -05:00
Jack Nelson
320fafa197
add bitfield option (#13585) 2022-10-05 11:05:41 -05:00
Kyle Altendorf
5b3a8725ba
use @asynccontextmanager for chia.cmds.get_client() (#13580) 2022-10-05 11:05:29 -05:00
Matt Hauff
dfe7140bd3
Fix CAT offer aggregation edge case (#13472)
* Fix CAT offer aggregation edge case

* typo

* Fix ring solving for >2 CATs

* Add comment for sort
2022-10-05 11:04:49 -05:00
Chris Marslender
440b70a152
Fix secret check (#13597)
* 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
2022-10-04 17:11:21 -05:00
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