Commit Graph
14659 Commits
Author SHA1 Message Date
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
almog a52d0b4fed lint 2021-10-12 18:49:02 +03:00
matt 833c6d0255 more descriptive function name 2021-10-12 17:05:00 +02:00
almog 1a4cb2f391 revert get_raw_pairs 2021-10-12 17:47:51 +03:00
matt 143c24c0b9 merkle tree should work - time to write tests 2021-10-12 16:42:19 +02:00
almog 1e5eb7d31b data_layer_types.py
data_layer_util.py
add tree id to nodes table
2021-10-12 16:44:29 +03:00
matt 55053b248f add db_layer and db_offer (minus merkle proof functionality) 2021-10-12 15:14:55 +02:00
almog 86c81da1d8 unused imports 2021-10-11 17:35:45 +03:00
almog af72d774fd lint 2021-10-11 17:30:41 +03:00
Kyle AltendorfandGitHub 8f496301dd rewrite data layer based around a CLVM object tree (#8738)
* end of day for a start into the set -> tree data layer transition

* data layer node first/rest split to left/right and key/value

* data layer can maybe insert into a tree

* Apply suggestions from code review

* add DataStore.get_tree_as_program(), and misc

* pass data store balanced 4KV build

* data store query parent -> tree from root hash

* DataStore.get_heritage() (and misc)

* DataStore.get_pairs()

* data store fail on insert of already present key
2021-10-11 16:59:00 +03: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
Kyle Altendorf 96383bd871 Merge branch 'main' into altendky-data_layer_exploration 2021-10-05 13:39:28 -04: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
Kyle AltendorfandGitHub c8a5da977a add a couple # lgtm [py/clear-text-logging-sensitive-data] (#8646) 2021-10-04 10:45:20 -07:00
Kyle AltendorfandGitHub aa243d2b72 correct super-linter name typo to GitHub (#8693) 2021-10-04 10:44:56 -07:00
Earle LoweandGitHub 5891835560 Added harvesters info to farmer logging (#8572) 2021-10-04 10:44:08 -07:00
Mariano SorgenteandGitHub a9dd5b7f33 Remove sanity check (#8708) 2021-10-04 10:43:21 -07:00
dustinfaceandGitHub 849b5811de tests|plotting: Some refactoring/improvements around BlockTools (#8483)
* tests: Use `time_out_assert` to wait for plot refreshing

* tests: Make `plot_manager` member of `BlockTools`

This also:

- Moves some code 
related to refreshing into `BlockTools.refresh_plots`.
- Moves setting the public keys of `PlotManager` into `setup_keys.

* tests: Directly use the plot info, don't create a sorted list upfront

* tests: Refactor a loop to use `values` instead of `items`

* plotting: Return paths of created and existed plots in `create_plots`

* tests: Introduce `new_plot` in `BlockTools`

* tests: Use `BlockTools.new_plot` in `TestPoolWalletRpc`

* tests: Allow and fix `flake8` validation in `test_pool_rpc.py`

* tests: Introduce `BlockTools.delete_plot` and use it in pool tests

* tests: Cleanup plots potentially left from a failed run in pool tests
2021-10-04 10:42:36 -07:00
Mariano SorgenteandGitHub 62c9a3c3e5 Ms.full node race (#8571)
* Add a test to check that we don't reorg subslots unless there is a new peak.

* Adds an additional check to protect from a race condition when adding a block right after a subslot.

* Change comment to trigger re-run of CI
2021-10-04 10:42:10 -07:00
Jeff CruikshankandGitHub 0e015a8755 Powershell scripts to support installation from source. (#8651)
* Powershell scripts to support installation from source.

* Update Install-gui.ps1

* Update Install-gui.ps1

* Linter fixes

* Revert "Linter fixes"

This reverts commit 8c4e073671.

* Linter fixes

* Minor textual changes. Updated encoding/line-endings to UTF-8/LF. Git on Windows should autocrlf as necessary.
2021-10-04 10:41:49 -07:00
Kyle AltendorfandGitHub 2a12c0b085 Merge pull request #8699 from Chia-Network/altendky-data_layer_exploration-just_serialized_program 2021-10-04 12:15:49 -04:00
Chris MarslenderandGitHub de5c955b29 Catch errors in the build script for intel mac (match m1 script) (#8706) 2021-10-04 08:56:48 -07:00
Kyle Altendorf de33d2be40 Merge branch 'altendky-data_layer_exploration' into altendky-data_layer_exploration-just_serialized_program 2021-10-04 10:37:28 -04:00
Kyle Altendorf d144174740 mypy 2021-10-03 18:20:18 -04:00
Kyle Altendorf d1e5be18d7 misc data layer tidying 2021-10-03 17:35:44 -04:00
Kyle Altendorf c05ee032d2 Merge branch 'main' into altendky-data_layer_exploration 2021-10-03 17:23:06 -04:00
Kyle Altendorf d66461ed14 use SerializedProgram in the DataStore interface 2021-10-03 15:49:54 -04:00
Kyle Altendorf 9151d261e4 Merge branch 'altendky-data_layer_exploration' into altendky-data_layer_exploration-just_serialized_program 2021-10-03 15:42:54 -04:00
Kyle Altendorf 4e21efb54b mypy 2021-10-03 15:42:21 -04:00
Kyle Altendorf e029c33109 add log reporting for data layer cli test 2021-10-03 15:40:04 -04:00
Kyle Altendorf 5f36ad1b3f fixup data layer cli test 2021-10-03 15:39:43 -04:00
Kyle Altendorf 00dfd56360 return response or None from all data cli functions 2021-10-03 14:13:32 -04:00
Kyle Altendorf 58152d9a4b data layer typo fix 2021-10-03 13:26:04 -04:00