Commit Graph
14659 Commits
Author SHA1 Message Date
Kyle AltendorfandGitHub e8262e945f coverage use [run] source_pkgs= instead of source= (#14164)
This avoids some collisions in some coverage reports between files in `chia/` and `tests/`.  Minimal example in https://github.com/altendky/example001 and "real" trouble observed in https://github.com/Chia-Network/chia-blockchain/pull/14141/files.
2023-01-06 16:59:41 -06:00
Kyle AltendorfandGitHub 7caab0af58 Remove the rest of uvloop (#14191)
* Remove the rest of uvloop

The extra was removed at https://github.com/Chia-Network/chia-blockchain/commit/cc062976ea7e030b7222d53885c3ed913155e1f8, should have removed the rest of the code too.

* isort
2023-01-06 16:59:28 -06:00
Kyle AltendorfandGitHub 22507d7ade psutil==5.9.4 (#14216)
for abi3 wheels for python 3.11 support

extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2023-01-06 16:56:26 -06:00
Kyle AltendorfandGitHub d6088c1e1c watchdog==2.2.0 (#14217)
for python 3.11 wheels

extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2023-01-06 16:56:15 -06:00
Kyle AltendorfandGitHub e223fa18e7 chiabip158==1.2 (#14218)
for python 3.11 wheels. https://github.com/Chia-Network/chiabip158/compare/1.1...1.2

extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2023-01-06 16:56:00 -06:00
Kyle AltendorfandGitHub 8ef43dcb30 make PR template headings actual markdown headings (#14240) 2023-01-06 16:55:40 -06:00
Kyle AltendorfandGitHub 69b38bea73 @functools.wraps() for the API request decorators (#14234)
Without this the representation of the resulting methods look like `<function api_request.<locals>.inner.<locals>.wrapper at 0x7ff7ff655990>`.  With, they are identifiable as to the method they wrap such as `<function FullNodeAPI.request_peers at 0x7fcc85d0d990>`.
2023-01-06 16:55:26 -06:00
Kyle AltendorfandGitHub e0fc98661f include windows coverage (#13587)
* try out proposed windows coverage combining fix

* Add [paths]

* diagnostics

* more complete paths section

* --only core.cmds

* Update test.yml

* Update test.yml

* --debug=pathmap

* ini-form

* Remove [paths]

* remove some debug

* remove --only core/cmds

* Update setup.py

* coverage[toml]==7.0.0b1

* coverage[toml]~=7.0
2023-01-06 16:55:07 -06:00
Kyle AltendorfandGitHub 6cbf6f3c63 Use Chia-Network/actions/check-commit-signing (#13923)
* Use Chia-Network/actions/check-commit-signing

* @add_check_commit_signing

* use @main

* move check commit signing to a dedicated workflow

* Update check-commit-signing.yml
2023-01-06 16:54:11 -06:00
Adam KellyandGitHub b71eaa0a8e Call method to process transactions added to mempool in Fee Estimator (#14290) 2023-01-06 14:18:52 -06:00
Chida82andGitHub 5fd468df15 Add proxy support to Data Layer download client (#14281)
* add proxy

* fix format document

* format document

* fix whitespace

* fix end of file
2023-01-06 14:18:36 -06:00
Jack NelsonandGitHub 1796206f25 Fix fee and unit amounts when coin splitting or viewing coins (#14172)
* fix fee ammt

* remove unit type

* fix fee calc

* Revert "Merge commit '30b9173eb205db5476b72bba8ef61dd2c3d34645' into checkpoint/main_from_release_1.6.2_30b9173eb205db5476b72bba8ef61dd2c3d34645"

This reverts commit 9884a729ac, reversing
changes made to 39d733599d.

* clear up cli args

* Update coins.py

* fix lint

* add seperate error for only 1 coin with combine.
2023-01-06 12:05:17 -06:00
Adam KellyandGitHub 53a3661555 Check if a SpendBundle was included in a block BEFORE removing it from the Mempool (#14293) 2023-01-06 12:01:14 -06:00
Adam KellyandGitHub 00480ccd1b Remove conflicting TXs before adding SpendBundle to Mempool in add_spend_bundle (#14292) 2023-01-06 12:00:54 -06:00
Adam KellyandGitHub 8e764eb05e Fix computation of moving averages (#14288) 2023-01-06 11:59:30 -06:00
Adam KellyandGitHub 2d54068456 Tune Fee Estimator parameter so that lowest suggested fee rate is 5 Mojo per CLVM cost (#14286) 2023-01-06 11:59:01 -06:00
Adam KellyandGitHub b9bef03714 If self.last_mempool_info is not yet set, return an empty FeeMempoolInfo, rather than None (#14282)
* If self.last_mempool_info is not yet set, return an empty FeeMempoolInfo, rather than None

* Initialize last_mempool_info early
2023-01-06 11:57:36 -06:00
Adam KellyandGitHub 1ecdb40c13 Use better check that we are on mainnet when deciding to use default Chia DNS server (#14254)
Use a better check for if we are on mainnet when using the default chia dns introducer
2023-01-06 11:56:14 -06:00
0a0c8920ff Add a daemon heartbeat setting to config.yaml (#13886)
* make daemon heartbeat configurable and increase default

* Fix up daemon rpc test

* Fix dumb error with parameters

* Restore formatting

* Various updates from feedback

* Update tests/core/test_daemon_rpc.py

use config value for heartbeat

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* black fixes

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-01-06 11:55:20 -06:00
Arvid NorbergandGitHub c74689dbbe bump chia_rs dependency to the latest version (#14289) 2023-01-06 11:45:11 -06:00
dustinfaceandGitHub 4c94f5f415 wallet: Drop duplicate puzzle hashes assert (#14287)
While #14187 fixes duplicated entries in new DBs, existing DBs still 
contain them and will trigger this assert so lets remove it again.
2023-01-05 20:19:36 -06:00
dustinfaceandGitHub c9b34bcc3e wallet: Some simplifications in WalletNode.long_sync (#14185)
* Simplify puzzle hash subscribing

* Simplify coin id subscribing

* Use the result of `chunks` in the loop definition

* Calculate the duration in place

* Filter before split to chunks and update the already checked at the end

* Adjust empty set check
2023-01-05 19:54:47 -06:00
Adam KellyandGitHub 820493ffa8 Add new_block_height to FeeEstimatorInterface (#14277)
* Add new_block_height to FeeEstimatorInterface

* Fancy-up create_test_block_record, rename test

* Integrate new interface method
2023-01-05 15:34:53 -06:00
Kyle AltendorfandGitHub e1c986435a return failure if mempool manager has no peak (#14274)
* ignore spend bundle if mempool manager has no peak

* return a failure status
2023-01-05 15:25:46 -06:00
Kyle AltendorfandGitHub 92c2bd5b49 use config.get("trusted_peers", {}) for wallet (#14273) 2023-01-05 15:25:25 -06:00
Arvid NorbergandGitHub a5397ec0c3 factor out coin- and PH subscription handling in order to add unit tests (#14222)
* factor out coin- and PH subscription handling in order to add unit tests

* address review comments

* fixup rebase. test_simple_sync_protocol.py
2023-01-05 15:24:58 -06:00
dustinfaceandGitHub 51fd1d8792 wallet: Don't add derived puzzle hashes to the WalletInterestedStore (#14187)
* wallet: Don't add derived puzzle hashes to the `WalletInterestedStore`

We already use the derived puzzle hashes when we subscribe to the node 
here 
https://github.com/Chia-Network/chia-blockchain/blob/39d733599d170b340b0ae4c13ada8896a78a0d29/chia/wallet/wallet_node.py#L1291. 
I assume this was done to make sure we subscribe to new puzzle hashes 
but at the end it leads to redundant entries in `derivation_paths` vs 
`interested_puzzle_hashes` so we can just subscribe here instead? If we 
want to keep them in both tables for some reason we may at least get rid 
of `get_puzzle_hashes_to_subscribe` and use the ones from the interest 
store only and maybe adjust the other related methods?

* See if there are duplicates in tests
2023-01-05 10:59:47 -06:00
Matt HauffandGitHub 4d482f6105 Add a height timestamp for wallet notifications (#14163)
* Add a height timestamp for wallet notifications

* import sqlite3

* lint

* isort

* catch specific error

* Add a test for db backcompat

* Add a test for correct height

* mypy
2023-01-05 10:58:38 -06:00
Adam KellyandGitHub d658de4e08 Refactor get_bucket_index (#14270) 2023-01-05 10:56:23 -06:00
William AllenandGitHub f3a709e5e8 Fix GITHUB_OUTPUT in build workflows (#14276) 2023-01-05 00:38:59 -06:00
William AllenandGitHub 0673cb624c checkpoint: into main from release/1.6.2 @ ba1ff12b31 (#14265)
Source hash: ba1ff12b31
Remaining commits: 0
2023-01-04 19:08:13 -06:00
Amine KhaldiandGitHub 5974f04257 Remove redundant check for duplicate inputs (#14272)
Remove redundant check for duplicate inputs.
2023-01-04 11:17:00 -06:00
Kyle AltendorfandGitHub 83900d7147 use .get("testing", False) to avoid errors when missing (#14267)
https://github.com/Chia-Network/chia-blockchain/issues/14239
2023-01-03 20:50:58 -06:00
Adam KellyandGitHub 8364166de1 Add MempoolRemoveReason, which represents why we are removing a MempoolItem (#14263)
* Add MempoolRemoveReason, which represents why we are removing a MempoolItem

* Add integration tests for remove_from_pool. Generalize call count tracking in mock Fee Estimator.
2023-01-03 17:08:18 -06:00
Kyle AltendorfandGitHub 559e58a47b close websocket in ssl tests to avoid event loop closed errors (#14242) 2023-01-03 15:00:07 -06:00
dustinfaceandGitHub 34dfdc262c wallet: Drop unused WalletNode.get_coins_with_puzzle_hash (#14182) 2023-01-03 14:59:39 -06:00
Kyle AltendorfandGitHub 026d4671af add cache to speed up manage_clvm/clvm_hex pre-commit check (#14177)
* add cache to speed up manage_clvm/clvm_hex pre-commit check

* Update tools/manage_clvm.py

* add version to cache along with handling of incorrect versions

* force skipping the cache in ci
2023-01-03 14:59:09 -06:00
Amine Khaldi 3a8ffb1b47 Merge commit 'ba1ff12b31f8fea600e8ee2058bf472e211f1f7a' into checkpoint/main_from_release_1.6.2_ba1ff12b31f8fea600e8ee2058bf472e211f1f7a 2023-01-03 21:06:52 +01:00
William AllenandGitHub c826aec84e checkpoint: into main from release/1.6.2 @ 85982974b3 (#14264)
Source hash: 85982974b3
Remaining commits: 1
2023-01-03 14:06:29 -06:00
Amine Khaldi becd04ed25 Merge commit '85982974b360d28f77d8f97deeb2bf6594e24664' into checkpoint/main_from_release_1.6.2_85982974b360d28f77d8f97deeb2bf6594e24664 2023-01-03 21:02:54 +01:00
ba1ff12b31 update changelog (#14147)
* Update changelog

* Changelog updates

* Minor update

* Add release date for 1.6.2

* Revert "Changelog updates"

This reverts commit 333e55f84a.

* undo historical changes

* Adding 1.6.2 change edits

Co-authored-by: Earle Lowe <e.lowe@chia.net>
1.6.2
2023-01-03 13:32:22 -06:00
Kyle AltendorfandGitHub 85982974b3 Force coverage==7.0.1 (#14255) (#14262)
Lots of failures in coverage processing.

https://github.com/Chia-Network/chia-blockchain/actions/runs/3825220672/jobs/6508036405#step:16:558
```python-traceback
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/plugin.py", line 297, in pytest_runtestloop
INTERNALERROR>     self.cov_controller.finish()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
INTERNALERROR>     return meth(self, *args, **kwargs)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 338, in finish
INTERNALERROR>     self.cov.stop()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/control.py", line 797, in combine
INTERNALERROR>     message=self._message,
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/data.py", line 158, in combine_parallel_data
INTERNALERROR>     new_data.read()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 815, in read
INTERNALERROR>     with self._connect():
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 342, in _connect
INTERNALERROR>     self._open_db()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 285, in _open_db
INTERNALERROR>     self._read_db()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 302, in _read_db
INTERNALERROR>     assert row is not None
INTERNALERROR> AssertionError
```

(cherry picked from commit 5fe05bd3a9)
2023-01-03 12:24:49 -06:00
Kyle AltendorfandGitHub 5fe05bd3a9 Force coverage==7.0.1 (#14255)
Lots of failures in coverage processing.

https://github.com/Chia-Network/chia-blockchain/actions/runs/3825220672/jobs/6508036405#step:16:558
```python-traceback
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/plugin.py", line 297, in pytest_runtestloop
INTERNALERROR>     self.cov_controller.finish()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
INTERNALERROR>     return meth(self, *args, **kwargs)
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 338, in finish
INTERNALERROR>     self.cov.stop()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/control.py", line 797, in combine
INTERNALERROR>     message=self._message,
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/data.py", line 158, in combine_parallel_data
INTERNALERROR>     new_data.read()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 815, in read
INTERNALERROR>     with self._connect():
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 342, in _connect
INTERNALERROR>     self._open_db()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 285, in _open_db
INTERNALERROR>     self._read_db()
INTERNALERROR>   File "/home/runner/work/chia-blockchain/chia-blockchain/venv/lib/python3.7/site-packages/coverage/sqldata.py", line 302, in _read_db
INTERNALERROR>     assert row is not None
INTERNALERROR> AssertionError
```
2023-01-03 09:36:14 -06:00
Kyle AltendorfandGitHub d53f249e5c only send_to_all(), drop send_to_all_except() (#14229)
* only send_to_all(), drop send_to_all_except()

* catch up tools/ as well

* add default
2023-01-02 21:39:11 -06:00
Almog De PazandGitHub 18c95da752 add local max subscription config (#14188)
* add local max subscription config

* add and use trusted wallet config
tests

* lint

* unused import

* break early

* dont break because we need to iterate for hints

* fix off by one

* lint
2023-01-02 21:38:38 -06:00
Adam KellyandGitHub d48e65e749 Fix fee estimator being re-created every block (#14175)
* Hold a ref to the fee estimator when the Mempool is destroyed and re-created. Unify the sharing of information between Mempool and MempoolManager

* Adjust tests to new Mempool create interface

* Store dynamic Mempool info in the FeeEstimator and static info in the Mempool

* Adjust tests

* Restore logging of block cost % calculation to use documented full block size

* Omit check for nil self.last_mempool_info

* Annotate Mempool members

* Add integration test for add_mempool_item

* Annotate types in BitcoinFeeEstimator class
2023-01-02 15:02:10 -06:00
Kyle AltendorfandGitHub 8ea3f93339 use adjusted_timeout() for simulator helpers (#14221) 2022-12-23 11:34:42 -06:00
Kyle AltendorfandGitHub 6e315e147a allow more sqlite thread safety than the minimum we require (#14215)
https://docs.python.org/3.11/library/sqlite3.html#sqlite3.threadsafety

extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2022-12-23 11:34:10 -06:00
Kyle AltendorfandGitHub 3056db616c use default_factory= for SpendableCAT mutable defaults (#14214)
extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2022-12-23 11:33:42 -06:00
Amine KhaldiandGitHub 7cba58eb00 Remove redundant check for maximum block CLVM cost (#14212)
Remove redundant check for maximum block CLVM cost.
2022-12-23 11:33:02 -06:00