5060 Commits
Author SHA1 Message Date
paulhainsworth-chiaandGitHub 00382222d9 changelog 1.2.10 (#8941)
* changelog 1.2.10
1.2.10
2021-10-25 17:34:01 -07:00
William Blanke c9f981c437 update gui to 14eac4407cb610c984c27c04cf7f8c5fbf591f30 2021-10-25 11:45:21 -07:00
YostraandGitHub 1bbc987171 Fix iteration (#8934)
* iterate values

* add test
2021-10-25 11:39:45 -07:00
Arvid NorbergandGitHub 897b7a4f41 catch BaseException (#8933) 2021-10-25 11:23:14 -07:00
Kyle AltendorfandGitHub b7e8e9c9a6 Fix Install.ps1 check for msvcp140.dll (#8911)
The original resulted in the following error when `msvcp140.dll` was not present.

```console
PS C:\chia\chia-blockchain> ./install.ps1
Get-Item : Cannot find path 'C:\WINDOWS\System32\msvcp140.dll' because it does not exist.
At C:\chia\chia-blockchain\Install.ps1:9 char:11
+ if (-not (Get-Item "$env:windir\System32\msvcp140.dll").Exists)
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\WINDOWS\System32\msvcp140.dll:String) [Get-Item], ItemNotFoundExcept
   ion
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
2021-10-22 16:33:17 -07:00
Jeff CruikshankandGitHub 911d26d3a8 Enable keyring passphrase support by default. Can be disabled by setting the CHIA_PASSPHRASE_SUPPORT env variable to false. (#8864) 2021-10-22 09:03:27 -07:00
William Blanke 98069a19aa update gui to a833cae9d8d887b5076cc17096a279e06dbc717d 2021-10-22 09:00:40 -07:00
dustinfaceandGitHub 7c1a72848c plotting|harvester|tests: Improve batch processing (#8385)
* plotting|harvester|tests: Improve batch processing

Let it only process `batch_size` files per `refresh_batch` call.

* plotting: Improve thread shutdown
2021-10-20 18:06:01 -07:00
Arvid NorbergandGitHub 0cc4251d4f simplify Blockchain.clean_block_records() (#8879) 2021-10-20 10:38:41 -07:00
8f3ea9c81b Update old comment on streamables (#8872)
* Update old comment on streamables

* Apply suggestions from code review

Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>

Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>
2021-10-19 10:37:31 -07:00
Richard KissandGitHub 0c7e5194bd Add Program.at utility function. (#8713) 2021-10-19 10:35:25 -07:00
Kyle AltendorfandGitHub 46ab3a0248 List unopenable plots at end of plots check (#8844)
* List unopenable plots at end of plots check

https://github.com/Chia-Network/chia-blockchain/issues/2825

* f-string

* use os.fspath() for logging bad plots from plots check

* drop .keys() in len() check

* stop using os.fspath() for log output in check plots
2021-10-19 10:30:23 -07:00
Arvid NorbergandGitHub 732fb51fe0 add alternative to pkm_pairs_for_conditions_dict() which is a bit more straigh-forward and returns the public keys and messages in the forms we need them to validate them. This is a step towards simplifying the conditions data structures (#8128) 2021-10-19 06:26:53 -07:00
Arvid NorbergandGitHub 6de03d0fe1 Coin store updates (#8818)
* improve coin store benchmark output

* factor out common row_to_coin() in coin_store, and some other slight cleanups
2021-10-18 09:33:20 -07:00
J. EckertandGitHub d923ae651f Update stale-issue.yml (#8853)
* Update stale-issue.yml

minor QoL updates to wording based on feedback and changed stale PR threshold from 60 days to 45

* Update stale-issue.yml

battling the whitespace yaml demons

* Update stale-issue.yml

battling the whitespace yaml demons

* Update stale-issue.yml

added a EoF newline.
I hate yaml

* Update stale-issue.yml

removing and re-adding newline in a new format to try to appease the pre-commit gods
2021-10-17 15:36:49 -07:00
Arvid NorbergandGitHub 1f893907b9 make db_sync setting default to FULL. Extend the configuration to cover all of OFF, NORMAL and OFF (#8836) 2021-10-16 09:02:18 -07:00
jctengandGitHub 79f9cdaff7 Update units.py (#8789)
fixed bug on chia wallet show with did wallet, name should be 'mojo' not 'mojo:'
2021-10-15 10:37:55 -07:00
Kyle AltendorfandGitHub 8ca6d8dd71 Remove unneeded 's from stale issue message (#8826)
When the `>` approach was used the `'` became part of the text.  Note https://github.com/Chia-Network/chia-blockchain/issues/8344#issuecomment-938552667 vs. https://github.com/Chia-Network/chia-blockchain/issues/8629#issuecomment-943250731.

```console
$ python -c 'import yaml; f = open(".github/workflows/stale-issue.yml"); x = yaml.safe_load(f); print(x)'
{'name': 'Close stale issues', True: {'schedule': [{'cron': '0 11 * * *'}]}, 'jobs': {'stale': {'runs-on': 'ubuntu-latest', 'steps': [{'uses': 'chia-network/stale@main', 'with': {'operations-per-run': 10000, 'ascending': True, 'days-before-issue-stale': 14, 'days-before-issue-close': 7, 'days-before-pr-stale': 60, 'days-before-pr-close': -1, 'exempt-all-pr-milestones': True, 'exempt-all-issue-milestones': True, 'exempt-all-assignees': True, 'stale-issue-label': 'stale-issue', 'stale-pr-label': 'stale-pr', 'remove-stale-when-updated': True, 'stale-issue-message': "'This issue has been flagged as stale, as there has been no activity on it in the last 14 days. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it open.'\n", 'close-issue-message': "'This issue was automatically closed because it has been flagged as stale, and subsequently passed 7 days with no further activity from the submitter or watchers.'\n", 'stale-pr-message': "'This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.'\n"}}]}}}
```

```console
$ git diff
diff --git a/.github/workflows/stale-issue.yml b/.github/workflows/stale-issue.yml
index 2c7c5839a..1ddb819c6 100644
--- a/.github/workflows/stale-issue.yml
+++ b/.github/workflows/stale-issue.yml
@@ -22,16 +22,16 @@ jobs:
           stale-pr-label: stale-pr
           remove-stale-when-updated: true
           stale-issue-message: >
-            'This issue has been flagged as stale, as there has been no
+            This issue has been flagged as stale, as there has been no
             activity on it in the last 14 days. If this issue is still
             affecting you and in need of further review, please comment
-            on it with an update to keep it open.'
+            on it with an update to keep it open.
           close-issue-message: >
-            'This issue was automatically closed because it has been flagged
+            This issue was automatically closed because it has been flagged
             as stale, and subsequently passed 7 days with no further activity
-            from the submitter or watchers.'
+            from the submitter or watchers.
           stale-pr-message: >
-            'This PR has been flagged as stale due to no activity for over 60
+            This PR has been flagged as stale due to no activity for over 60
             days. It will not be automatically closed, but it has been given a
             stale-pr label and should be manually reviewed by the relevant
-            parties.'
+            parties.
```

```console
$ venv/bin/python -c 'import yaml; f = open(".github/workflows/stale-issue.yml"); x = yaml.safe_load(f); print(x)'
{'name': 'Close stale issues', True: {'schedule': [{'cron': '0 11 * * *'}]}, 'jobs': {'stale': {'runs-on': 'ubuntu-latest', 'steps': [{'uses': 'chia-network/stale@main', 'with': {'operations-per-run': 10000, 'ascending': True, 'days-before-issue-stale': 14, 'days-before-issue-close': 7, 'days-before-pr-stale': 60, 'days-before-pr-close': -1, 'exempt-all-pr-milestones': True, 'exempt-all-issue-milestones': True, 'exempt-all-assignees': True, 'stale-issue-label': 'stale-issue', 'stale-pr-label': 'stale-pr', 'remove-stale-when-updated': True, 'stale-issue-message': 'This issue has been flagged as stale, as there has been no activity on it in the last 14 days. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it open.\n', 'close-issue-message': 'This issue was automatically closed because it has been flagged as stale, and subsequently passed 7 days with no further activity from the submitter or watchers.\n', 'stale-pr-message': 'This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.\n'}}]}}}
```

Adding the `-` after the `>` additionally avoids the trailing newline.

```console
$ git diff
diff --git a/.github/workflows/stale-issue.yml b/.github/workflows/stale-issue.yml
index 2c7c5839a..1bee15516 100644
--- a/.github/workflows/stale-issue.yml
+++ b/.github/workflows/stale-issue.yml
@@ -21,17 +21,17 @@ jobs:
           stale-issue-label: stale-issue
           stale-pr-label: stale-pr
           remove-stale-when-updated: true
-          stale-issue-message: >
-            'This issue has been flagged as stale, as there has been no
+          stale-issue-message: >-
+            This issue has been flagged as stale, as there has been no
             activity on it in the last 14 days. If this issue is still
             affecting you and in need of further review, please comment
-            on it with an update to keep it open.'
-          close-issue-message: >
-            'This issue was automatically closed because it has been flagged
+            on it with an update to keep it open.
+          close-issue-message: >-
+            This issue was automatically closed because it has been flagged
             as stale, and subsequently passed 7 days with no further activity
-            from the submitter or watchers.'
-          stale-pr-message: >
-            'This PR has been flagged as stale due to no activity for over 60
+            from the submitter or watchers.
+          stale-pr-message: >-
+            This PR has been flagged as stale due to no activity for over 60
             days. It will not be automatically closed, but it has been given a
             stale-pr label and should be manually reviewed by the relevant
-            parties.'
+            parties.
```

```console
$ python -c 'import yaml; f = open(".github/workflows/stale-issue.yml"); x = yaml.safe_load(f); print(x)'
{'name': 'Close stale issues', True: {'schedule': [{'cron': '0 11 * * *'}]}, 'jobs': {'stale': {'runs-on': 'ubuntu-latest', 'steps': [{'uses': 'chia-network/stale@main', 'with': {'operations-per-run': 10000, 'ascending': True, 'days-before-issue-stale': 14, 'days-before-issue-close': 7, 'days-before-pr-stale': 60, 'days-before-pr-close': -1, 'exempt-all-pr-milestones': True, 'exempt-all-issue-milestones': True, 'exempt-all-assignees': True, 'stale-issue-label': 'stale-issue', 'stale-pr-label': 'stale-pr', 'remove-stale-when-updated': True, 'stale-issue-message': 'This issue has been flagged as stale, as there has been no activity on it in the last 14 days. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it open.', 'close-issue-message': 'This issue was automatically closed because it has been flagged as stale, and subsequently passed 7 days with no further activity from the submitter or watchers.', 'stale-pr-message': 'This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.'}}]}}}
```
2021-10-15 10:35:57 -07:00
051829d855 use a conftest.py for shared blockchain fixtures (#8821)
* use a conftest.py for shared blockchain fixtures

* try delaying import

* Revert "try delaying import"

This reverts commit f86cc305b1.

* debug

* debug

* debug

* create the .chia dir for tests before creating a broken symlink

* go back

* delay more imports

* black

* provide an explanatory TODO

* Apply suggestions from code review

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-10-15 10:35:13 -07:00
Earle LoweandGitHub 8cabdc66bf Remove flaky mtime check for plots (#8590)
* Change logic for mtime mismatch to log but ignore

* Remove entirely flaky mtime check
2021-10-15 10:34:32 -07:00
dustinfaceandGitHub 71f2c68831 plotting: Fix log output for duplicated plots (#8812) 2021-10-15 09:39:50 -07:00
Arvid NorbergandGitHub dbe4829669 regenerate workflow files. fix test_hint_store.py (#8725) 2021-10-13 16:05:07 -07:00
dustinfaceandGitHub 5fae0aae41 plotting|harvester|tests: Drop some parts of PlotRefreshResult (#8760)
* plotting|harvester|tests: Drop `loaded_size` from `PlotRefreshResult`

* rename: Drop `_plots` and `_files` suffixes in `PlotRefreshResult`

* plotting: Drop `PlotRefreshResult.__add__`

I introduced it but i don't really like it because its not a "real" add
any only works in one direction because of `remaining`.
2021-10-13 14:20:32 -07:00
Jeff CruikshankandGitHub 3864f750b4 Backend changes to support passphrase hints and additional GUI passphrase support (#8779)
* Expose GUI option to save passphrase (where available)
Prevent GUI from showing the option to remove migrated keys

* Backend support for getting/setting the passphrase hint. The hint data is stored in keyring.yaml in the clear.

* CLI support for showing/setting/removing the passphrase hint

* Tests for setting/retrieving passphrase hints

* Squelch LGTM false positive

* Fixed issue when running without passphrase support enabled

* CLI updates based on feedback

* Initialize passphrase_hint earlier.

* Minor restructuring to address linter complaint.
2021-10-13 10:36:10 -07:00
dustinfaceandGitHub 5b7bb5e0f6 github|setup: Introduce pre-commit.yml to force pre-commit to pass (#8811)
* github: Add `pre-commit.yml`

This runs `pre-commit` as github action for all PRs and on pushes to 
`main`.

* github: Drop trailing whitespaces in `stale_issue.yml`

* setup: Ignore type errors for `setup` call
2021-10-13 10:26:15 -07:00
Jeff CruikshankandGitHub ab7d07ad30 Renamed chia.util.ssl to avoid conflicting with aiohttp's ssl import. (#8805)
Removed hacky sys.path reordering in dump_keyring.py
2021-10-12 13:59:29 -07:00
J. EckertandJustin England 085191d18d Update stale-issue.yml
bro do you even indent? (whoops)
2021-10-12 10:25:15 -07:00
J. EckertandJustin England 9d58370ba7 Update stale-issue.yml
reformatted message text to comply with yaml line wrapping
2021-10-12 10:25:15 -07:00
Arvid NorbergandGitHub bbc2f76a21 remove unnecessary index in CoinStore & add additional benchmarks (#8641)
* simplify and extend the coin store benchmark to include lookups by coin ID and get_coin_removed_at_height

* remove coin_spent index from coin store table. It's not necessary and slows down updates (and caused one mistaken query plan)
2021-10-12 09:27:47 -07:00
dustinfaceandGitHub 653a11476c plotting|tests: Test duplicates in test_farmer_harvester_rpc.py (#8769)
* plotting: Introduce `PlotManager.get_duplicates`

* tests: Test duplicates in `test_farmer_harvester_rpc.py`
2021-10-12 09:07:18 -07:00
dustinfaceandGitHub 0bb86a0346 tests: Recover flake8 in test_farmer_harvester_rpc.py (#8757) 2021-10-12 09:05:38 -07:00
dustinfaceandGitHub c1381c6752 tests: test_farmer_harvester_rpc.py - Add missing asserts, Introduce test_refresh_results (#8749)
* tests: Add missing result assertions in `test_farmer_harvester_rpc.py`

I forgot to add those in 0b0edd11a1.

* tests: Introduce `test_refresh_results`

This is just some refactoring to simplify the result checks.

* tests: Add comment with the reason for the unusual test behaviour
2021-10-12 09:05:16 -07:00
Jeff CruikshankandGitHub b1fda8f9a8 Fixes cherry-picked from fix_keyring_tests. (#8766)
* Fixes cherry-picked from fix_keyring_tests.

* Logging for the failing test_using_legacy_cryptfilekeyring test

* See if reordering the tests makes a difference.

* Revert "See if reordering the tests makes a difference."

This reverts commit b53807880b.

* Log changes to the _configure_legacy_backend patch

* Fixed patching

* Checking if something isn't cleaned up properly

* Revert "Checking if something isn't cleaned up properly"

This reverts commit ce995ba773.

* Revert "Fixed patching"

This reverts commit 66a70a16ff.

* Revert "Log changes to the _configure_legacy_backend patch"

This reverts commit 26791a40b7.

* Revert "Logging for the failing test_using_legacy_cryptfilekeyring test"

This reverts commit 4fd4873565.

* Move test_keyring_wrapper.py into a standalone test

* Small refactorings/changes per feedback
2021-10-08 11:02:46 -07:00
61a513869d make synchronous mode in sqlite database connections configurable (#8753)
* make synchronous mode in sqlite database connections configurabel. Default to enabling synchronous mode, leaving the door open for a more sophisticated heuristic in the future

* Update chia/util/db_synchronous.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Update chia/util/initial-config.yaml

Co-authored-by: Nino Uzelac <uzelac.nino@gmail.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Nino Uzelac <uzelac.nino@gmail.com>
2021-10-08 06:13:06 -07:00
Arvid NorbergandGitHub 105fe6e1a5 don't create unused indexes in block_records and full_blocks tables (#8755) 2021-10-08 06:12:14 -07:00
Arvid NorbergandGitHub 15da736548 move test utility DBConnection out of test_coin_store and into its own file (#8756) 2021-10-08 06:11:38 -07:00
Arvid NorbergandGitHub f41ad9a2b0 clean up mempool test to use pytest parameters instead of for loops (#8740) 2021-10-08 06:11:04 -07:00
Chris RossandGitHub 0a2294841d Before calling gethostbyname(); check if host is an address (#8765)
* Before calling gethostbyname(), check to see if we already have an address.
That prevents an unnecessary call, and also allows for specifying IPv6
addresses which otherwise cause exceptions here.

* Also recognize addresses when passed to timelord spawn_process, so that
IPv6 addresses can be used.

* Missed importing PeerInfo

* Adjust style to match requirements and existing code

* Cast PeerInfo port to uint16
2021-10-07 16:56:34 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ccb2442ae8 Bump github/super-linter from 4.8.0 to 4.8.1 (#8730)
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.0 to 4.8.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.0...v4.8.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 15:43:03 -07:00
wjblankeandGitHub 5bcfcc1f4f up test_duplicate_coin_announces assert to 21 (#8750) 2021-10-06 21:07:50 -07:00
artyandGitHub 57110087c8 20210923 clvm tools rs (#8601)
* Allow experimental use of clvm_tools_rs via env var

* Final version of load_clvm.  handle module paths

* Fix some lint hopefully

* Opps

* lint

* More lint

* black format
2021-10-05 10:49:21 -07:00
dustinfaceandGitHub 0b0edd11a1 tests|farmer: Attempt to make test_farmer_harvester_rpc.py more reliable (#8491)
* farmer|tests: Update cache more frequent for `test_get_harvesters`

* tests: Increase interval between harvester checks
To avoid spamming logs by excessive plot refreshing and cache updates.

* tests: Log error messages if `get_harvesters` returns unexpected data

* tests: Trigger plot refresh on the harvester in `test_get_harvesters`

* tests: Don't assert in `test_refresh_callback`

This lead to a crash of the plot refreshing thread and with this it 
silently failed. With this change its at least possible to see which 
value is incorrect.
2021-10-05 10:42:21 -07:00
Jeff CruikshankandGitHub 26d23b9279 Keyring windows (#8465)
* Fix to allow migration of keys on macOS

* Fixed file_keyring synchronization test failures on macOS.
Fixed sporadic test failures on macOS when fsevents are delivered for the keyring after deletion.
TempKeyring-based tests now patch supports_os_passphrase_storage() to return False.

* Fixed LGTM issues

* Re-added the cleaning up temp keychain statement. This is being removed in a separate PR.

* Windows keyring passphrase support

* Test tweaks for Windows (mostly to support my slow VM)

* Linter fixes

* Restored prompt_for_passphrase() function which was accidentally removed during a rebase.

* Added CHIA_PASSPHRASE_SUPPORT env variable to allow more testing
2021-10-05 09:59:53 -07:00
dustinfaceandGitHub 82abc836ab install-gui: Drop trailing whitespaces (#8723) 2021-10-05 09:47:57 -07:00
dustinfaceandGitHub 2127634aab benchmarks: Use secrets.token_bytes instead of random.randbytes (#8724)
Latter is only available in python >= 3.9 and lets pre-commit fail for 
lower versions.
2021-10-05 09:47:23 -07:00
dustinfaceandGitHub acbbd3a3dd azure|build_macos: Always export NOTARIZE and check its value (#8717)
* azure: Always export `NOTARIZE`

This *should* fix failures like 
https://dev.azure.com/chianetwork/Build%20MacOS%20Mojave%20chia-blockchain/_build/results?buildId=15533&view=logs&j=69944193-f126-526b-b021-abb6fb4b38ee&t=fa98ba94-cfb8-59e8-e95b-1eee1a49caed&l=906

* build_macos: Test the actual value of `NOTARIZE`
2021-10-05 06:22:03 -07:00
wjblankeandGitHub e1f35c0356 raise test_duplicate_coin_announces to 16 (#8714) 2021-10-04 20:16:57 -07:00
Kyle AltendorfandGitHub 597068f400 Add points found 24h to CLI reporting (#7905)
* Add points found 24h to CLI reporting

The points_found_24h seems to include more data than that so first it
gets filtered down to the past 24 hours.  This additionally affects the
existing percent successful points 24 hours number.  Which is actually
the percent of partials successful, not points.  This could differ a bit
if the difficulty is changed during the relevant period.

* remove 24 hour data truncation

To be handled by #7906 or similar.

https://github.com/Chia-Network/chia-blockchain/pull/7906

* cleanup

* shorten lines for linting

* success_pct = 0.0 for mypy
2021-10-04 10:49:26 -07:00
Kyle AltendorfandGitHub 849fd8ee71 truncate points_[found,acknowledged]_24h to 24 hours at each signage point (#7906)
* truncate points_found_24h to 24 hours at each signage point

* remove extra blank line

* truncate both points_found_24h and points_acknowledged_24h to 24 hours

* also strip pool_errors_24h down to 24 hours

* Revert "also strip pool_errors_24h down to 24 hours"

This reverts commit 69183c1938.

* move 24h truncation to after pool communication

* truncate 24h lists after notifying harvester of signage point

* add testing for 24h age-out

* actually query pool state through the API

* Add return hint for strip_old_entries()

* remove unused Sequence import
2021-10-04 10:49:04 -07:00
Sharjeel AzizandGitHub 36d1ebc45f Update username (#8668)
I am contributing on crowdin with @sharjeelaziz as the username but somehow it is appearing as @sharjeelazizn in the changelog.
2021-10-04 10:46:07 -07:00