Commit Graph

5792 Commits

Author SHA1 Message Date
Arvid Norberg
21fb6f260e
transition to using chia_rs module (#11094) 2022-04-08 09:37:10 -07:00
Kyle Altendorf
02a880fbac
rebuild workflows (#11092) 2022-04-07 20:43:27 -07:00
Chris Marslender
c7a89fc425
Add wallentx as additional assignee on mozilla CA update PRs (#11089) 2022-04-07 19:43:14 -05:00
dustinface
ded9f68583
chia|tests|github: Implement, integrate and test plot sync protocol (#9695)
* protocols|server: Define new harvester plot refreshing protocol messages

* protocols: Bump `protocol_version` to `0.0.34`

* tests: Introduce `setup_farmer_multi_harvester`

Allows to run a test setup with 1 farmer and mutiple harvesters.

* plotting: Add an initial plot loading indication to `PlotManager`

* plotting|tests: Don't add removed duplicates to `total_result.removed`

`PlotRefreshResult.removed` should only contain plots that were loaded
properly before they were removed. It shouldn't contain e.g. removed
duplicates or invalid plots since those are synced in an extra sync step
and not as diff but as whole list every time.

* harvester: Reset `PlotManager` on shutdown

* plot_sync: Implement plot sync protocol

* farmer|harvester: Integrate and enable plot sync

* tests: Implement tests for the plot sync protocol

* farmer|tests: Drop obsolete harvester caching code

* setup: Add `chia.plot_sync` to packages

* plot_sync: Type hints in `DeltaType`

* plot_sync: Drop parameters in `super()` calls

* plot_sync: Introduce `send_response` helper in `Receiver._process`

* plot_sync: Add some parentheses

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

* plot_sync: Additional hint for a `Receiver.process_path_list` parameter

* plot_sync: Force named parameters in `Receiver.process_path_list`

* test: Fix fixtures after rebase

* tests: Fix sorting after rebase

* tests: Return type hint for `plot_sync_setup`

* tests: Rename `WSChiaConnection` and move it in the outer scope

* tests|plot_sync: More type hints

* tests: Rework some delta tests

* tests: Drop a `range` and iterate over the list directly

* tests: Use the proper flags to overwrite

* test: More missing duplicates tests

* tests: Drop `ExpectedResult.reset`

* tests: Reduce some asserts

* tests: Add messages to some `assert False` statements

* tests: Introduce `ErrorSimulation` enum in `test_sync_simulated.py`

* tests: Use `secrects` instead of `Crypto.Random`

* Fixes after rebase

* Import from `typing_extensions` to support python 3.7

* Drop task name to support python 3.7

* Introduce `Sender.syncing`, `Sender.connected` and a log about the task

* Add `tests/plot_sync/config.py`

* Align the multi harvester fixture with what we do in other places

* Update the workflows

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-04-07 17:10:44 -07:00
Arvid Norberg
8c0cdda880
extend tests in test_blockchain to include more conditions, as well as ensuring consensus rules allow unknown condition parameters (#11079) 2022-04-07 12:04:44 -07:00
Mariano Sorgente
4c9a0edc64
Increases the probability of connecting to local trusted node (#10633) 2022-04-07 09:24:59 -07:00
Kronus91
ffd3b19315
Add /cat_get_unacknowledged API for accessing unknown CATs (#10382)
* Add /cat_get_unacknowledged API for accessing unknown CATs

* Reformat & fix cast issue

* Integration tested & add unit test

* Handle optional uint32

* Reformat

* Reformat

* Reformat

* Merge PR 10308

* Reformat

* Fix concurrent issue

* Add state change notification

* rename API

* Fix failing tests

* Updated state_change name

Co-authored-by: Jeff Cruikshank <jeff@chia.net>
2022-04-07 09:22:59 -07:00
dustinface
c8468bea07
wallet: Improve logging in create_more_puzzle_hashes (#10761)
* wallet: Improve logging in `create_more_puzzle_hashes`

It's pretty spammy currently when scanning puzzle hashes.

* scan -> create, Scanning -> Creating

* `scanning_msg` -> `creating_msg`
2022-04-07 09:21:08 -07:00
dependabot[bot]
ab71236215
Bump cryptography from 3.4.7 to 36.0.2 (#10787)
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.7 to 36.0.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.4.7...36.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  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-04-07 09:20:30 -07:00
dustinface
0917d0ae78
wallet: Drop puzzles/genesis_checkers.py and related puzzles (#10790)
Its all duplicated code and puzzles as far as i can tell, see 
`chia/wallet/puzzles/tails.py`.
2022-04-07 09:19:37 -07:00
Kyle Altendorf
d892e14c64
Handle INSTALL_PYTHON_VERSION in Install.ps1, otherwise search 3.9/3.8/3.7 (#11034)
* Handle INSTALL_PYTHON_VERSION in Install.ps1, otherwise search 3.9/3.8/3.7

* fix python availability check in Install.ps1

* when Install.ps1 does not find an acceptable python, list supported versions in order

* Update Install.ps1

Co-authored-by: Matt Hauff <quexington@gmail.com>

Co-authored-by: Matt Hauff <quexington@gmail.com>
2022-04-07 09:18:54 -07:00
Kyle Altendorf
c0d346d428
Remove dead snakes usage from benchmark tests (#11053) 2022-04-07 09:18:15 -07:00
dependabot[bot]
42245d74eb
Bump github/super-linter from 4.9.1 to 4.9.2 (#11067)
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.1 to 4.9.2.
- [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.9.1...v4.9.2)

---
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>
2022-04-07 09:17:53 -07:00
Amine Khaldi
6026d734cf
Significantly speedup preparing test blocks and plots by opting for a release download instead of a shallow git clone, and also by putting a caching layer on top of that. (#11065) 2022-04-06 20:15:10 -07:00
Jeff
d35c414c09
Set keychain_proxy to None in await_closed() to support reinitialization (#11075)
* Set keychain_proxy to None in await_closed() to support reinitialization.

* Added `shutting_down` param to _await_closed() to control whether the keychain_proxy is closed.
2022-04-06 20:14:49 -07:00
Kyle Altendorf
c238ce17ba
add -d for Install.ps1 (#11062) 2022-04-05 17:00:10 -07:00
Arvid Norberg
492503f109
print average block rate at different block height windows (#11064) 2022-04-05 16:11:03 -07:00
Jeff
bb57ccffa9
Improve handling of unknown pending balances (likely change from addi… (#10984)
* Improve handling of unknown pending balances (likely change from adding a maker fee).
Minor improvement for fingerprint selection -- enter/return selects the logged-in fingerprint.

* Minor output formatting improvements when showing offer summaries.
Minor wallet key selection improvements.
Added tests for print_offer_summary

* Linter fixes

* isort fix

* Coroutine -> Awaitable

* Removed problematic fee calculation from get_pending_amounts per feedback.
2022-04-05 16:09:00 -07:00
Kyle Altendorf
45e4c7c156
Checkout test blocks and plots for benchmarks workflow (#11068) 2022-04-05 17:16:38 -05:00
William Allen
6ed61bfbe5
Adding clean-workspace step to benchmarks (#11063) 2022-04-05 15:28:33 -05:00
Amine Khaldi
a2fa8dda01
Prepare test blocks and plots only for tests that need them. This saves us a couple more hours of CI running time. (#10975) 2022-04-05 10:34:57 -07:00
Jack Nelson
9b7d7d2555
Remove websockets dependency & do some refactoring (#10611)
* remove old ws
2022-04-05 10:19:09 -07:00
Kyle Altendorf
d87b8ac087
simplify some header hash getting and assertions (#11007) 2022-04-05 08:54:38 -07:00
dustinface
9311e58ac4
full_node: Drop unused MempoolManager.constants_json (#11046) 2022-04-05 08:53:48 -07:00
Arvid Norberg
b377339372
fix memory leak in test_full_sync (#11004) 2022-04-05 08:53:12 -07:00
wjblanke
261f5baa6f
bump up to 2.1.7 to fix inotify issue resolved by 848 (#11042) 2022-04-04 23:35:28 -07:00
dustinface
4a4b14b78b
github: Drop unused BUILD_VDF_CLIENT variables (#11050)
From my understanding this is only used by `chiavdf` source builds which 
happen only if `install-timelord.sh` gets called but it doesn't in the 
addressed cases.
2022-04-04 18:43:51 -07:00
Adam Kelly
22edd73331
Force apt to install the things we asked it to (#11047)
* Force apt to install the things we asked it to

* Update .github/workflows/benchmarks.yml

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-04-04 17:43:31 -07:00
Mariano Sorgente
35fb7d341c
Faster full node tests (#10986)
* Start fast full node tests

* Perf improvement on send_transaction

* Major performance improvement for mempool test

* Speed up another test

* Speed up mempool tests startup

* Lint

* Debug tests

* Try function scope for wallet_nodes

* Update comment
2022-04-04 13:49:33 -07:00
Arvid Norberg
fe77c69018
run_generator2 rust call and compact conditions data structure (#8862)
* use run_generator2 rust call and compact spend bundle conditions data structure pervasively.

* address review comments
2022-04-04 11:53:13 -07:00
dustinface
62de4a883c
streamable|pools: Fix Optional parsing in dataclass_from_dict (#10573)
* Test more `Optional` parsing in `dataclass_from_dict`

* Fix optional parsing in `dataclass_from_dict`

* Fix pool wallet / tests
2022-04-04 11:50:59 -07:00
Mariano Sorgente
890c7d3754
Fix remaining linting issues (#10962)
* FIx remaining linting issues

* Revert type:ignore

* Revert token_bytes change
2022-04-02 13:22:55 -07:00
roseiliend
8b5c7012dc
force index in get_coin_records_by_names (#10987)
* force index in get_coin_records_by_names

* fix lint
2022-04-02 13:21:54 -07:00
Gene Hoffman
131bd4e2f3
install.sh is not upgrading OpenSSL on MacOS (#11003)
* MacOS isn't updating OpenSSL in install.sh

* Exit if no brew on MacOS

* Code the if tree like a pro instead.

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-04-01 21:22:56 -07:00
Gene Hoffman
e3e814b9ec
Compile python 3.9.11 which is aware of the openssl issue (#11001) 2022-04-01 21:06:32 -07:00
Gene Hoffman
3e2b979751
install/upgrade openssl on Arch Linux also (#10999) 2022-04-01 19:28:20 -07:00
Gene Hoffman
14627d8a6e
apt show not needed (#10997) 2022-04-01 18:01:30 -07:00
Gene Hoffman
8cbf96d73c
Non Hobo patch the winstaller for CVE-2022-0778 (#10995) 2022-04-01 16:31:00 -07:00
Gene Hoffman
58abb35114
Check for vulnerable openssl (#10988)
* Check for vulnerable openssl

* Update OpenSSL on MacOS

* First attempt - openssl Ubuntu 18.04 and 20.04

* place local/bin ahead in PATH

* specify install openssl

* correct path

* run ldconfig

* stop building and check for patched openssl

* spell sudo right by removing it

* Remove openssl building - 1st attempt RHs

* Test Windows OpenSSL version HT @AmineKhaldi
2022-04-01 13:20:29 -07:00
Arvid Norberg
647cf6b52b
fix performance tests (#10983) 2022-04-01 10:12:10 -04:00
Adam Kelly
441823f0da
normalized_to_identity_cc_ip from get_consecutive_blocks was being passed in as overflow_cc_challenge in get_full_block_and_block_record (#10941) 2022-03-31 23:05:30 -07:00
dependabot[bot]
fc1d52de6a
Bump peter-evans/create-pull-request from 3 to 4 (#10950)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  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-31 23:04:48 -07:00
Arvid Norberg
8ca0633d9f
fix test_full_sync.py to only feed the blocks in the main chain to the node (#10974) 2022-03-31 23:03:59 -07:00
Mariano Sorgente
685744218e
Ms.flaky gen speed (#10965)
* Flaky test sometimes goes slower than 1 second

* Add sleep to reduce flakiness

* Increase timeout instead of sleeping to hopefully reduce flakiness
2022-03-31 23:03:22 -07:00
Arvid Norberg
a571c78899
limit test output on CI by dropping -s and -v. Also, only print the 10 slowest tests, instead of all (#10959) 2022-03-31 23:01:50 -07:00
Kyle Altendorf
e5ab4cd842
back to a single option for workflow parallel config (#10979) 2022-03-31 23:01:20 -07:00
Mariano Sorgente
a2490e0765
Fix the issues in main (failing tests) (#10977)
* Fix one of the issues in test_blockchain

* Only rollback after all async operations are finished
2022-03-31 14:27:01 -04:00
Arvid Norberg
8833cc351c
reorg fixes (#10943)
* when going through a reorg, maintain all chain state until the very end, when the new fork has been fully validated and added

* when rolling back the chain, also rollback the height-to-hash map

* add tests
2022-03-31 08:26:23 -07:00
Mariano Sorgente
908f186c1e
Also throw DB error on double spending a coin (#10947)
* Throw error on double spending a coin

* Throw error on double spending a coin

* Improve test
2022-03-31 08:25:57 -07:00
Arvid Norberg
6075027e6d
improve error message when a block is missing from the blockchain database (#10958)
* improve error message when a block is missing from the blockchain database

* Update chia/full_node/block_height_map.py

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-03-31 08:24:37 -07:00