Commit Graph

5634 Commits

Author SHA1 Message Date
dependabot[bot]
9a0d4775ae
Bump actions/github-script from 4 to 6 (#10246)
* Bump actions/github-script from 4 to 6

Bumps [actions/github-script](https://github.com/actions/github-script) from 4 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v4...v6)

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

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

* Update to github.rest.* for calls to API for compat w/ github-script@v5+

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
2022-03-29 10:34:12 -07:00
Adam Kelly
aaba00c354
Add more type checks to CAT Wallet (#10934) 2022-03-29 10:30:46 -07:00
Adam Kelly
9005e4e595
Use uint128 for wallet balances (#10936) 2022-03-29 10:30:09 -07:00
Adam Kelly
62c9670999
Type check values in RL Wallet (#10935) 2022-03-29 10:29:41 -07:00
Amine Khaldi
94a4cb2e99
Contextualize some store test db names. (#10942) 2022-03-29 10:15:02 -07:00
Kyle Altendorf
94241078ef
ignore lack of hinting on clvm_tools.binutils.assemble() (#10926) 2022-03-28 19:50:53 -07:00
Kyle Altendorf
fb68bebfc3
fixup workflow template merge env duplication (#10925) 2022-03-28 19:50:42 -07:00
Kyle Altendorf
fda14b5b47
restrict click to < 8.1 for black (#10923)
https://github.com/pallets/click/issues/2225

Doing this instead of updating since updating black will change several
files due to some formatting change.  I would like to take that on
separately from unbreaking CI.
2022-03-28 19:49:22 -07:00
Kyle Altendorf
36bee1b8ca
run tests in CI via coverage (#9704)
* Add coverage (without collection)

* Separate test_block_compression() to avoid coverage-related hangs

* Revert "Separate test_block_compression() to avoid coverage-related hangs"

This reverts commit ebad3d0017.

* multiprocessing.set_start_method("spawn")

* multiprocessing.set_start_method() in conftest.py

* hand hold cc wallet tests

* lint

* spawn for running chia as well

* handle already set start method case

* a bit more timeout for test_multiple_writers

* more timeout for test_writer_lock_blocked_by_readers

* 45 minute tieout for tests/pools/

* 45 minute tieout for tests/pools/

* some more hand holding sleeps

* report coverage in each workflow

only really useful to make sure it is capturing something

* oops

* complete the job name and the JOB_NAME

* better coverage result file names

* reset worker process titles

* rebuild workflows

* rebuild workflows

* black

* black

* rebuild workflows

* push timeouts

* actually include the updated workflows...

* push more workflow timeouts

* parallel=True

* rebuild workflows
2022-03-28 13:22:23 -07:00
Kyle Altendorf
a691d3c4b2
asyncio.get_event_loop() is deprecated in 3.10, stop using it (mostly) (#10418)
* asyncio.get_event_loop() is deprecated in 3.10, stop using it

https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.get_event_loop
> Deprecated since version 3.10: Deprecation warning is emitted if there is no running event loop. In future Python releases, this function will be an alias of get_running_loop().

* black
2022-03-28 13:20:50 -07:00
Kyle Altendorf
287bf6c0cc
Remove sys.exit() from chia daemon /exit endpoint (#10454) 2022-03-28 13:16:16 -07:00
Kyle Altendorf
219e815fc4
set CHIA_ROOT in tests instead of symlinking (#10682)
* attempt to checkout test-cache directly to desired location

* rebuild workflows

* maybe we can use CHIA_ROOT

* use CHIA_ROOT to find blocks and plots for tests

* oops

* more informational printing

* oops

* --capture no for debugging

* flake8

* import os

* undo some unrelated changes now covered elsewhere

* undo some debug changes

* rebuild workflows
2022-03-28 13:15:24 -07:00
Kyle Altendorf
655b27fb44
move pytest.ini to the root directory (#10892)
* move pytest.ini to the root directory

* pytest.ini: testpaths = tests

https://docs.pytest.org/en/7.1.x/reference/reference.html?highlight=testpaths#confval-testpaths
2022-03-28 13:13:58 -07:00
Kyle Altendorf
e0a1fc4eaf
Switch to integrated lock_and_load_config() context manager (#10698)
* minor lock scope reduction

* use the lock in tests

* Use the passed root_path in configure CLI command

* switch to lock_and_load_config()

* oops

* cleanup

* make _load_config_maybe_locked() private

* black

* Remove future improvement opportunity TODO comment
2022-03-28 12:52:51 -07:00
dustinface
fbd3845028
wallet: Drop unused WalletStateManager.load_wallets (#10756) 2022-03-28 12:50:50 -07:00
Arvid Norberg
84cdd609e9
bump clvm_tools dependency to make every chia-blockchain installation get the new brun that reports cost accurately (#10880) 2022-03-28 12:49:14 -07:00
Kyle Altendorf
f0e5b5814b
bump pre-commit mypy to v0.942 (#10902) 2022-03-28 12:48:36 -07:00
Adam Kelly
efcf0cf0ad
await the db commit in the async version of set_db_version (#10906) 2022-03-28 12:48:14 -07:00
Arvid Norberg
1bcf409ee1
single thread executor (#10919)
* add inline executor and an option to run single-threaded

* add option to run test_full_sync in single-thread mode, to include block validation in profiles. Also attempt to speed it up by disabling db_sync
2022-03-28 12:47:46 -07:00
Matt Hauff
6997adeab6
Fix flaky trade test (#10921) 2022-03-28 12:46:13 -07:00
Arvid Norberg
7a82f0d299
use rust clvm in Program.run() (#10878)
* remove Program.from_serialized_program

* run the rust clvm implementation (instead of python) even for wallet programs
2022-03-28 11:58:59 -07:00
Arvid Norberg
a100dda37e
new DBWrapper supporting concurrent readers (#10166)
* new DBWrapper supporting concurrent readers

* adress review comments

* fixup default database version, when file doesn't exist

* remove unused argument
2022-03-28 11:58:00 -07:00
Arvid Norberg
656d7d94d8
fix type annotations for FullBlock.header_hash and FullBlock.prev_header_hash (#10909) 2022-03-27 12:20:30 -07:00
Arvid Norberg
b1e7b8d0a1
fix type annotations for get_block_generator() (#10907) 2022-03-26 21:05:20 -07:00
dependabot[bot]
7c49e29eaf
Bump github/super-linter from 4.8.1 to 4.9.1 (#10894)
* Bump github/super-linter from 4.8.1 to 4.9.1

Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.1 to 4.9.1.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/v4.8.1...v4.9.1)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Ignore too-many-function-args in test_type_checking.py

* black

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
2022-03-25 22:23:51 -07:00
dependabot[bot]
8781569829
Bump actions/checkout from 2 to 3 (#10505)
* Bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Update actions in templates too

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
2022-03-25 22:23:27 -07:00
dependabot[bot]
aa296db3cb
Bump colorlog from 5.0.1 to 6.6.0 (#9207)
Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 5.0.1 to 6.6.0.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v5.0.1...v6.6.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-25 22:23:08 -07:00
Arvid Norberg
7ea074c9e7
fixup and enable condition checking tests (#10888)
* fixup and enable tests for the edge cases of absolute timestamp and absolute height conditions in mempool_manager

* Update chia/full_node/full_node_api.py

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
2022-03-25 18:49:11 -07:00
Chris Marslender
536d7c4e03
Update appdmg to 0.6.4 to work with macos 12.3 (#10886) 2022-03-25 11:44:00 -07:00
Arvid Norberg
d20cf06f59
fix typo and index issues in wallet database (#10273)
* fix typo in wallet_puzzle_store

* check some SQL statements

* deduplicate name SQL index

* deduplicate wallet_type index

* deduplicate wallet_id index
2022-03-25 09:28:06 -07:00
Arvid Norberg
42f5ba07da
reduce indentation in a few functions in blockchain.py by negating early-exit checks and loop continues (#10872) 2022-03-25 09:26:19 -07:00
Jeff
292c26d3d8
Hardcoded SSL test certs/keys (#10828)
* Hardcoded SSL test certs/keys

* Added a second set of certs/keys.
Cert/key sets are infinitely cycled-through using get_next_private_ca_cert_and_key() and get_next_nodes_certs_and_keys()

* More cert/key sets and a tool to generate them

* Updated SSL generator to sign with the appropriate root CA.
Fixed linter issues.

* Linter fixes

* Updated generate_ssl_for_nodes() based on feedback
2022-03-25 09:24:59 -07:00
Jeff
58f8a4d2ed
Minor output formatting/enhancements for chia wallet show (#10863)
* Minor output formatting/enhancements for `chia wallet show`

* Updated format based on internal poll results

* Linter fix and row rearrangement.
2022-03-24 17:40:33 -07:00
Jeff
5c43950f93
Added -n/--new-address option to chia wallet get_address (#10861)
* Added `-n`/`--new-address` option to `chia wallet get_address`

* Formatting fix

* Complemented --new-address with --latest-address per feedback
2022-03-24 14:57:08 -07:00
William Blanke
9c443624da
updated gui to 054d7b342e 2022-03-24 12:33:38 -07:00
Matt Hauff
06d160d0a4
Check for requesting items when creating an offer (#10864) 2022-03-24 09:45:32 -07:00
Kyle Altendorf
2eb4fdeaee
Disable the pytest-monitor plugin in CI if not checking results (#10837)
* disable the pytest-monitor plugin if not reporting results

pytest-monitor uses multiprocessing and has caused multiple confusing
issues.  Perhaps it can be adjusted to not use multiprocessing, but
for now lets just isolate the oddities to where we actually use it.

* use a template for resource usage check, similar to timelord install

* hint testconfig.custom_vars
2022-03-24 09:30:42 -07:00
Kyle Altendorf
4ea82fdb09
use DEFAULT_ROOT_PATH in tests (#10801) 2022-03-24 09:29:05 -07:00
William Allen
b1acb5597b
Adding check for python3.9 alongside python3.10 on Arch (#10363)
* Adding check for python3.9 alongside python3.10 on Arch

* Adjusting install.sh instructions for Arch

* Disabling prescribed python install for Arch

* Setting Arch install script to exit 0 to pass tests

* Adding workflow step for functional Arch install testing

* Adding noconfirm to pacman install command

* Relocating Arch support message for install.sh
2022-03-22 16:22:17 -07:00
Adam Kelly
063333ee92
remove duplicate event_loop (#10768) 2022-03-22 16:21:06 -07:00
Matt Hauff
620a1b3f23
add optional persistence to SpendSim (#10780)
* add optional persistence to SpendSim

* Accidental rename
2022-03-22 16:20:32 -07:00
Amine Khaldi
4fe5737da0
Fix timelord installation for Debian. (#10841) 2022-03-22 16:19:32 -07:00
Arvid Norberg
b5d51c38f8
run tests in parallel in CI (#10499) 2022-03-22 15:04:07 -07:00
Earle Lowe
b7a1c9ccb8
Handle cases where one node doesn't have the coin we are looking for (#10829)
* Continue if one node doesn't have the coin

* Pass in coin_state list

* Pass in the single coinstate instead of list

* more simplifications
2022-03-22 11:36:28 -07:00
wjblanke
171abb03ee
atomic rollback for wallet (#10799)
* atomic rollback for wallet
2022-03-22 11:35:35 -07:00
Adam Kelly
b8e1f3b9a9
Rename confusing fixtures, especially ones with the same name but dif… (#10772)
* Rename confusing fixtures, especially ones with the same name but different implementation

* rename test_environment to test_plot_environment

* Make it so setup_two_nodes is no longer the name of a fixture and a utility function

* revert premature fixture rename: two_wallet_nodes_start_height_1
2022-03-22 11:24:55 -07:00
Jack Nelson
3d7fda4770
small change to fix branch in contributing (#10805)
* small change to fix branch in contributing

* Update CONTRIBUTING.md
2022-03-22 10:51:01 -07:00
Kyle Altendorf
7f84309e70
stop using deadsnakes, unless we need it (#10752)
* stop using deadsnakes.  and see...

* only install dead snakes stuff if building the timelord on linux
2022-03-21 16:27:43 -07:00
Adam Kelly
1d6ce4da12
Remove accidental parameters from calls to setup_simulators_and_wallets and prevent future mistakes (#10770) 2022-03-21 16:26:11 -07:00
hugepants
aaf949aa8b
Capitalize display of Rpc -> RPC in chia show -s (#10797) 2022-03-21 16:22:37 -07:00