Commit graph

5900 commits

Author SHA1 Message Date
wjblanke
b44ae22077
updated bls to 13 (#11529) 2022-05-15 15:45:32 -07:00
Kyle Altendorf
0e419822e0
Allow services to set a non-default max request body size limit (#11516) 2022-05-14 02:08:10 -07:00
Kyle Altendorf
7c91f470f4
simplify SizedBytes and StructStream (#11429)
* simplify SizedBytes and StructStream

* lint

* super()  !!!

* do not pass parameter up to super().__init__()

* Update chia/util/struct_stream.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* parse fixed-width int data from class name

* add int512 and uint128 .from_bytes(), test .parse() failures

* test serialization against struct.pack()

* use typing_extensions for final

* override ignore

* stop using struct for StructStream

oh the irony

* fixup .to_bytes() to accept parameters again for where we use that

* bring back signed parameter

* format

* adjust tests for new exception

* eliminate custom coding for uint128 and int512

* tidy

* remove unused StructStream.PACK attribute

* add direct tests for parse_metadata_from_name()

* stricter hinting

* remove no-longer-needed typeshed work-around

* apply strict type checking to all touched files

* remove StructStream override of .to_bytes()

* tidy

* types touchup

* add unused parameter comments

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: wjblanke <wjb98672@gmail.com>
2022-05-14 02:05:27 -07:00
Evan Graham
c3272fa84c
Write python version error to stderr (#11239)
Co-authored-by: wjblanke <wjb98672@gmail.com>
2022-05-14 02:04:18 -07:00
Kyle Altendorf
d1e4a38462
less except -> false (#10219)
* less except -> false

* establish_connection() and .perform_handshake() can just return None

* remove more pointless, and no wrong, assertions
2022-05-14 02:03:56 -07:00
Adam Kelly
298ea9ea20
Resend transactions (#11167)
* Resend transactions

* Don't recheck transactions more frequently than timeout

* Add wallet resend parameter to config, move timeout code out of tx store, but close to call site

* Add a test for wallet transaction resend

* Add test for wallet retry

* isort new files for precommit and update workflows

* Use correct fixture name

* LGTM - remove unused import

Co-authored-by: Earle Lowe <e.lowe@chia.net>
2022-05-14 02:03:10 -07:00
Mariano Sorgente
d1e445fac2
Ms.mypy consensus (#11403)
* Mypy for consensus dir (Except blockchain.py)

* Finish up consensus folder mypy

* Lint

* isort

* lint

* awaitable over coroutine

* less Any

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-12 15:21:47 -07:00
Arvid Norberg
3795a52152
fix some LGTM issues (#11453) 2022-05-12 15:17:24 -07:00
dustinface
fc2d6d3db0
harvester: Fix deadlock on disconnect after a repeated plot sync start (#11481)
* Test plot sync start and disconnect while a sync is in progress

* Drop `Receiver._lock`, instead wait for `Receiver.sync_active` to clear

* Properly stop the sender and plot manager refreshing on disconnect

* Poll faster, drop the log

* Reset `_sync_id` at the very end of `_finalize_sync`
2022-05-12 15:16:22 -07:00
Mariano Sorgente
ce92f36055
Fix Newer block issue (#11486)
* Fix Newer block issue

* Fallback to checking memory
2022-05-12 15:15:36 -07:00
William Allen
9a07247e1f
Merge pull request #11269 from Chia-Network/release/1.3.5
Release/1.3.5
2022-05-11 14:06:22 -05:00
William Allen
b44ebe82b5
Merge branch 'main' into release/1.3.5 2022-05-11 13:18:41 -05:00
wallentx
0f5a6df4ff
Adding correct items to changelog 2022-05-11 11:43:58 -05:00
wallentx
201603b203
Updating CHANGELOG.md with corrections 2022-05-11 10:51:00 -05:00
wallentx
01cea1b4b3
Formatting CHANGELOG.md for 1.3.5 2022-05-11 10:29:04 -05:00
wallentx
d77d2d017b
Updating CHANGELOG.md with 1.3.5 2022-05-11 10:16:53 -05:00
Arvid Norberg
a4ec7e7cb8
Replace MerkleSet with the rust implementation of computing the merkle root. This saves about 20% of the CPU work in the main thread when validating blocks. (#11432) 2022-05-10 04:42:45 -07:00
Kyle Altendorf
6788c0a5ef
Use context manager for locking clvm files (#11467) 2022-05-10 04:41:57 -07:00
dustinface
541b99e311
harvester: Introduce recursive_plot_scan (#11468)
* harvester: Introduce `recursive_plot_scan`

* Change log and merge boths lookups

* Drop redundant assignments
2022-05-09 16:43:53 -07:00
wjblanke
b396c3e76d
updated gui to 32245d869c (#11471) 2022-05-09 12:38:12 -07:00
wjblanke
cc83332c34
updated gui to 32245d869c (#11471) 2022-05-09 12:26:45 -07:00
github-actions[bot]
ba6200d6c6
adding ca updates (#11082)
Co-authored-by: ChiaAutomation <ChiaAutomation@users.noreply.github.com>
2022-05-09 09:58:25 -07:00
wallentx
4d29bbcecf
updating gui for 1.3.5 dogfood build 2022-05-06 16:15:26 -05:00
wjblanke
526eef4b5c
updated gui to 748f99f285 (#11461) 2022-05-06 16:14:16 -05:00
wjblanke
ca78150789
updated gui to 748f99f285 (#11461) 2022-05-06 16:13:02 -05:00
Arvid Norberg
761c42eef5
flag lgtm issues in test code and benchmark code as well (#11445) 2022-05-05 14:22:56 -07:00
arty
60f372fcaf
Bump clvm_tools_rs version for clvm stepper and add a test (#11418)
* Bump clvm_tools_rs version for clvm stepper and add a test

* lint

* lint

* flake8

* lint

* lint?

* formatting

* More formatting

* More formatting

* hopefully final lint

* A bit more formal python style for the clvm test

* Add typing imports
2022-05-05 09:14:23 -07:00
dustinface
d4c2f0c14a
tests: Improve test_wallet_rpc.py (#11148)
* Move wallet RPC test setup into a fixture

* Fix `mypy` issues

* Enable  `isort`

* Move `tx_in_mempool` out and reuse it instead of `tx_in_mempool_2`

* Introduce `get_confirmed_balance` and `get_unconfirmed_balance`

* Use `pytest.raises`

* Only test with an untrusted full node

* Introduce `generate_funds`

* Drop sleeps and create less blocks

* Recover trusted/untrusted sync parameterization
2022-05-05 08:22:02 -07:00
Mariano Sorgente
e0df18f85d
Ms.hint refactor (#11222)
* Some work on hints

* More cleanup and test_generator_tools

* Change relevant calls

* More refactor and cleanup

* More refactor

* Small fix

* Create wrapper object PeakPostProcessingResult

* Lint and small fix

* Fix a hint bug

* Fix hint update_wallets

* Fix test_full_sync

* pre-commit

* Start with PR review comments

* More efficient iteration

* Remove tx_removals_additions_and_hints

* Revert mozilla ca

* Fix issue with startup
2022-05-05 08:19:57 -07:00
Kyle Altendorf
cf5113ae87
Remove outdated 3.8 upgrade comment (#11385) 2022-05-05 08:18:36 -07:00
Mariano Sorgente
a19f18258d
Update CONTRIBUTING.md (#11393)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-05 08:17:59 -07:00
Kyle Altendorf
34eed9a3bc
more isort (#11401) 2022-05-05 08:17:38 -07:00
Zachary Brown
a1db012b7a
Add libgmp-dev to Bladebit installation (#11406) 2022-05-05 08:17:14 -07:00
dustinface
fc64542d50
tests: Use lock_and_load_config in setup_services.py (#11412) 2022-05-05 08:16:51 -07:00
dustinface
2d0d8e175e
test: Missing duplicates tests in test_receiver.py (#11413) 2022-05-05 08:16:33 -07:00
dustinface
629c303077
cmds: Use the new plot_count of get_pool_state in plotnft cmds (#11414) 2022-05-05 08:16:10 -07:00
Kyle Altendorf
2daa524aaf
add long_lived/** and release/** to (almost) all workflow push triggers (#11439) 2022-05-05 08:51:36 -06:00
Arvid Norberg
1b2d119cc3
optimize hash_coin_list() by sorting pure coin_ids, rather than Coins that need to compute its name multiple times during sorting, and also by sorting the actual binary coin names, not hexadecimal strings (#11421) 2022-05-04 07:24:55 -07:00
Arvid Norberg
bb3550f43b
more merkle tree tests (#11424) 2022-05-04 07:24:10 -07:00
dustinface
8f7f439202
harvester: Tweak get_plots RPC (#11246) 2022-05-04 10:46:11 +02:00
dustinface
06684f96d5
streamable: Enable isort + more mypy (#10539)
* isort: Fix `streamable.py` and `test_streamable.py`

* mypy: Drop `streamable.py` and `test_streamable.py` form exclusion

And fix all the mypy issues.

* Fix `pylint`

* Introduce `ParseFunctionType` and `StreamFunctionType`

* Use `object` instead of `Type[Any]` for `is_type_*` functions

* Some `Any` -> `object`

* Use `typing.overload` for `recurse_jsonify`

* Move some comments

* Drop `Union`, use `Literal` properly

* Explicitly ignore the return of `f_type.parse`

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

* Merge two `recurse_jsonify` overloads

* Typing for the base definition of `recurse_jsonify`

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-04 00:10:06 -05:00
dustinface
e1255c91b2
farmer|gui: Enable paginated plot loading and improved state reporting (#11367)
* farmer: Adjust notifications from the farmer to the UI

- Only send the data for the harvester which actually sent an update
- Notify for each loaded batch during initial loading

* Enable improved farmer/harvester GUI
2022-05-04 02:23:18 +02:00
dustinface
8363617557
farmer|rpc|tests: Implement paginated harvester plot endpoints (#11365)
* farmer|rpc|tests: Implement paginated harvester plot endpoints

* Simplify filtering

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

* Let the API handle the exceptions

* Simplify the other filtering too

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

* Simplify count assertions

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

* Refactor `is_filter_match` to `plot_matches_filter`

And just convert to `Plot` in tests.

* Move `chia.util.misc.KeyValue` to `chia.rpc.farmer_rpc_api.FilterItem`

* Rename `peer_id` to `node_id` to be match `get_harvesters_{summary}`

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-04 02:21:46 +02:00
dustinface
946d216835
test: Give setup_farmer and setup_harvester a separate chia root (#11408)
* test: Give `setup_farmer` and `setup_harvester` a separate chia root

* test: Wait for `last_sync_time` in `get_harvesters_{summary}`

To make sure the first sync from the harvester to the farmer is done 
before we check plot counts.
2022-05-04 02:21:05 +02:00
dustinface
5482086bd9
farmer|rpc: Add plot_count to get_pool_state RPC endpoint (#11364)
* farmer|rpc: Add `plot_count` to `get_pool_state` RPC endpoint

* Test `plot_count` of `get_pool_state` farmer RPC endpoint
2022-05-04 02:20:30 +02:00
dustinface
630b401c01
util: Implement Paginator class as interface to access a list by pages (#11247)
* util: Implement `Paginator` class as interface to access a list by pages

* Be less restrictive about page sizes and refactor tests

* Make the pages based of 0 instead of 1 and some more test refactoring

* More tests

* Adjust workflows after rebase

* Introduce `Paginator.create`

* `<=` instead of `- 1`
2022-05-04 02:20:28 +02:00
dustinface
5fd88ce4dd
farmer|rpc: Some changes to get_harvesters{_summary} RPC endpoints (#11342)
* farmer|rpc: Always add `last_sync_time` in `Receiver.to_dict`

This changes the resonse of `get_harvesters` and
`get_harvesters_summary` to always include that field with value
`None`/`null` if the receiver is not yet synced.

* plot_sync: Add sync state to dict in `Receiver.to_dict`

* Add `total_plot_size` to `Receiver.to_dict`

* Refactor sync object assertions

* Access `_current_sync` directly

* Generate `syncing` data outside
2022-05-04 02:20:27 +02:00
dustinface
f4d2e77206
plot_sync: Introduce receiver.Sync (#11267)
* plot_sync: Introduce `receiver.Sync`

* Use `dataclasses.replace`

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-04 02:20:26 +02:00
dustinface
351fd1de56
farmer|rpc: Introduce get_harvesters_summary RPC endpoint (#11245) 2022-05-04 02:20:14 +02:00
dustinface
0d5251c3a7
farmer|gui: Enable paginated plot loading and improved state reporting (#11367)
* farmer: Adjust notifications from the farmer to the UI

- Only send the data for the harvester which actually sent an update
- Notify for each loaded batch during initial loading

* Enable improved farmer/harvester GUI
2022-05-03 15:33:38 -07:00