Commit Graph

5617 Commits

Author SHA1 Message Date
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
Kyle Altendorf
25917d56a5
stop helping mkdir() do what it already does (#10802)
* stop helping mkdir() do what it already does

* flake8
2022-03-21 16:22:05 -07:00
Arvid Norberg
9db85f3284
when running multiple services in the same process (in tests), don't initialize logging for all of them, and don't set the proctitle of the test (#10686) 2022-03-17 14:58:30 -07:00
arty
36ea914201
Bump clvm_tools_rs to fix a problem running as daemon caused by old log message that is now eliminated (#10788) 2022-03-17 14:57:39 -07:00
Kyle Altendorf
161a838b6a
more set -o errexit (#10468)
* more set -o errexit -o pipefail

* no pipefail, too fancy for dash at least...
2022-03-17 09:13:27 -07:00
Arvid Norberg
144c4d1478
improve error messages from chia db upgrade, specifically to help users if the disk is full (#10494) 2022-03-17 09:11:08 -07:00
Francesco Truzzi
53da6ab41b
add select_coins RPC method (#10495)
* add select_coins RPC method

* typing fix

* fix typing, casts

* add RPC coin selection tests

* black formatting

* fix select_coins tests
2022-03-17 09:10:21 -07:00
Arvid Norberg
ba6eb6af3d
when creating a new blockchain database implicitly, make it v2 (#10498)
* when creating a new blockchain database implicitly, make it v2

* fix config deadlock
2022-03-17 09:09:26 -07:00
arty
4bd8498e5a
Enable clvm_tools_rs by default (#10554)
* Enable clvm_tools_rs by default

* Re-add clvm_tools dep for now as it provides python idioms for interacting with clvm data

* Take lint formatting

* Adam: Try making this non-parallel

* Try fix for threading issue in tests

* Test whether turning off parallel runs causes things to work (temp)

* Test use of temp files in clvm_tools_rs as a candidate solution for atomic replacement of hex output

* Use proper git+https url scheme (oops)

* Update to candidate 0.1.6 so we can test

* Revert version bump to re-test

* Test whether we can re-enable parallelism

* Attempt to mitigate concurrent test running: return own conception of the compiled output.  This will work if the failing path is downstream of recompilation

* fix path to hex file

* Probe for source of 0-length data

* Further exploration: more assertions, hopefully to trigger in the test on ci

* Do an even more paranoid check to verify that we observe a file whose filesystem reported size is much smaller than expected

* Try a heavier handed approach, using heavyweight lockfiles on the filesystem

* Import a simple lockfile implementation and use it to enforce mutual exclusion.  Simplify it and remove the unwanted os traffic

* Take lint, precommit advice, bump to clvm_tools_rs 0.1.6 now that it's released

* Fix lint

* While i was working on this, -n auto was on the command line so i think this didn't actually do anything, but reverting my change just in case

* Lint

* label the hashes re: pr

* Add a lock.py for spot exclusivity using the filesystem (re: adam in the pr) and a convenience wrapper that hides the details

* Formatting warning

* Ensure type info is present and do the obvious return of the inner function's result

* Use double quotes (lint)

* Properly balance blank lines

* Lint: alphabetize imports

* One line is required here (lint)

* Remove unnecessary assignment
2022-03-17 09:08:36 -07:00
dustinface
0abaea3393
cmds: Fix trusted peer hint in chia wallet show (#10695)
`config` is the root config here.
2022-03-17 09:07:05 -07:00
Kyle Altendorf
aead84a346
less optional around ssl (#10558)
* less optional

* clean up cruft

* more

* more

* just a little less optional
2022-03-17 09:06:22 -07:00
Amine Khaldi
6e499e0e62
Improve the CI runs w.r.t. timelord installation (#10673)
* Superficial analysis showed that only two test groups require (for now) installing the timelord. This change aims to save us hours of CI running time by simply running the install timelord script only for those test groups, with everything else having it omitted. Dedicated to @hoffmang9

* We don't need these anymore.
2022-03-17 09:05:33 -07:00
Kyle Altendorf
1c8e4aef10
Use the passed root_path in configure CLI command (#10694) 2022-03-17 09:04:47 -07:00
Kyle Altendorf
48cd97cf47
minor followup to config locking (#10696)
* minor lock scope reduction

* use the lock in tests
2022-03-17 09:03:58 -07:00
ChiaMineJP
42fff8e773
Issues found in RPC API review (#10702)
* Removed unnecessary substitution

* Recovered  property which was accidentally removed in full node RPC API

* Added backward compatibility to `get_additions_and_removals` full_node RPC API

* Fixed full_node rpc client
2022-03-17 09:03:30 -07:00
Kyle Altendorf
f5d692f5c3
require test-cache repo is found in CI (#10711) 2022-03-17 09:02:41 -07:00
Freddie Coleman
687ea720e3
New RPC get_coin_records_by_hint - Get coins for a given hint (#10715)
* RPC endpoint to retrieve coins by hint

* RPC client update for get_coin_records_by_hint

* start writing tests for get_coin_records_by_hint

* Address linting concerns.

* Address flake8. Fix the get_coin_ids() call.

* convert hint to bytes32

* tests for get_coin_records_by_hint

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2022-03-17 08:48:09 -07:00
Arvid Norberg
cd83a9ecde
fix typo in command line argument parsing for chia db validate (#10716) 2022-03-17 08:47:31 -07:00