Commit Graph
14659 Commits
Author SHA1 Message Date
Florin Chirica a02ce4f2d2 flake 2022-02-02 22:26:55 +02:00
Florin Chirica 0b2e0ca9a3 Address some review comments. 2022-02-02 22:06:37 +02:00
artyandGitHub 6f88e961f4 Silence output along the "didn't compile" path since clvm_tools_rs is getting pulled in elsewhere (#10028) 2022-02-02 10:43:16 -08:00
artyandGitHub d2f35e627c Fix some spam when using clvm_tools_rs (#10043) 2022-02-02 10:42:47 -08:00
Arvid NorbergandGitHub 9153e82b1c avoid computing the header hash, when we already have it available (#10075) 2022-02-02 10:40:41 -08:00
Arvid NorbergandGitHub c33dc256c8 update analyze_blockchain tool to read v2 blockchain databases (#9983)
* update analyze_blockchain tool to read v2 blockchain databases and introduce option to run all generators in mempool mode. Also update to use the new clvm_rs API

* update gnuplot file for the new output from analyze_blockchain.py
2022-02-02 10:39:21 -08:00
William Blanke b0e0557535 updated gui to a0259211584cb68405cc6c673ec46fcf7468a43d 2022-02-02 10:37:59 -08:00
Matt Hauff 3a02115701 Lint 2022-02-02 09:28:45 -07:00
4b6e95342c fix test
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-02-02 08:40:18 -07:00
5b58ec3848 Ms.wallet cache (#10070)
* wallet: Invalidate caches for reorg

* wallet: lint

* wallet: remove logging

* wallet: simplify logic

* Update chia/wallet/wallet_node.py

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-02-02 10:05:57 -05:00
Arvid NorbergandGitHub 7fb7a916ee Simplify FullNode._replace_proof (#10049)
* simplify updating of proofs (when compacting them). This also saves two database lookups before the update

* fixup

* insert or ignore duplicate blocks

* when replacing a weight proof with a compact version, we do so by height. Rather than asking for all blocks at the specific height followed by a linear search for the one with the correct header hash, we can simply lookup the correct header hash and just look up that block. This simplifies the logic by dropping the looping over blocks.

* pass in header_hash to _replace_proof() to avoid the height-to-hash lookup
2022-02-01 22:31:47 -08:00
Mariano SorgenteandGitHub 75c9eddcd0 tests: More flaky fixes (#10068) 2022-02-01 21:46:46 -05:00
Chris MarslenderandGitHub 435a077bc6 Allow older jobs to run to completion when on main (#10067) 2022-02-01 19:24:46 -06:00
Florin Chirica afca371d40 Hash can't be NULL. 2022-02-01 21:41:23 +02:00
Florin Chirica efb3fb2450 Initial commit optimize get ancestors. 2022-02-01 21:24:34 +02:00
Kyle AltendorfandGitHub 405b7238e0 Revert "pip==21.3.1 for now (#10035)" (#10055)
This reverts commit fedae0cc97.
2022-02-01 10:26:08 -08:00
William Blanke bd9153c876 updated chiapos 2022-02-01 10:12:12 -08:00
dustinfaceandGitHub eb0e3a2cc8 plotting: Add missing locks in PlotManager (#9708) 2022-02-01 10:02:43 -08:00
Kyle AltendorfandGitHub 29fad42e0c await peer.close() in WalletNode.validate_received_state_from_peer() (#10054)
```
farm/chia-blockchain/chia/wallet/wallet_node.py:1058: RuntimeWarning: coroutine 'WSChiaConnection.close' was never awaited
peer.close(9999)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
```
2022-02-01 09:56:35 -08:00
dustinfaceandGitHub c893c44ab6 tests: Make sure pool plots getting removed from BlockTools at the end (#10052)
Prior to this PR the pool plots created by the pool tests were not 
removed from the global `BlockTools.expected_plots` if the test failed 
which happens here and there because they are flaky. Since the global 
`BlockTools` obviously outlives the parameterization of a test (i.e. in 
`test_absorb_pooling`) there were many CI runs stucking at:

```
2022-01-30T23:25:54.0633324Z 23:25:54 chia.plotting.manager: ERROR 
_refresh_callback raised:  with the traceback: Traceback (most recent 
call last):
2022-01-30T23:25:54.0634415Z 2022-01-30T23:25:54.063 full_node 
chia.plotting.manager   : ERROR    _refresh_callback raised:  
with the traceback: Traceback (most recent call last):
2022-01-30T23:25:54.0635521Z   File 
"/home/runner/work/chia-blockchain/chia-blockchain/chia/plotting/manager.py", 
line 281, in _refresh_task
2022-01-30T23:25:54.0636160Z     
self._refresh_callback(PlotRefreshEvents.batch_processed, batch_result)
2022-01-30T23:25:54.0636916Z   File 
"/home/runner/work/chia-blockchain/chia-blockchain/tests/block_tools.py", 
line 178, in test_callback
2022-01-30T23:25:54.0682983Z     assert update_result.remaining == 
len(self.expected_plots) - self.total_result.processed
2022-01-30T23:25:54.0683833Z   File 
"/home/runner/work/chia-blockchain/chia-blockchain/chia/plotting/manager.py", 
line 281, in _refresh_task
2022-01-30T23:25:54.0684293Z AssertionError
```

And getting canceled after a long time like here after ~40min 
https://github.com/Chia-Network/chia-blockchain/runs/5007793256?check_suite_focus=true.

This PR introduces the class `TemporaryPoolPlot` which provides an async 
context manager which makes sure plots are created on entry and removed 
on exit.
2022-02-01 09:32:15 -05:00
Kyle AltendorfandGitHub 6932f01008 Delete node.prof (#10051) 2022-02-01 08:59:27 -05:00
almog 40d130fda9 uae .get default value 2022-02-01 12:17:26 +02:00
almog c45447cebd Merge branch 'atari' into atari_fees 2022-02-01 12:14:56 +02:00
Earle LoweandGitHub fd5e39470d Do not assert if pool_state is none (#9893) 2022-01-31 19:00:49 -08:00
941bc580d2 Handle CAT units and names in CLI get_transaction[s] (#9942)
* Re-add CAT sending to send CLI

* Fix missing memo param

* chia wallet get_transaction reports CATs correctly

* black

* fixup get_transactions

* fixup get_transaction[s] address prefix

* black

Co-authored-by: Matt Hauff <quexington@gmail.com>
2022-01-31 18:54:31 -08:00
Chris MarslenderandGitHub 677e25fd02 Add data to wallet RPCs to support metrics (+ update log_exceptions helper) (#9996)
* Send coin_added event to metrics

* Add fingerprint to balance response

* Don't consume the exception by default, but enable for the metrics data usecases

* Pass sync_changed event to metrics

* bare raise
2022-01-31 18:53:43 -08:00
dustinfaceandGitHub cc61c82682 tests: Improve tests_farmer_harvester_rpc.py (#10023)
* tests: Drop redundant plot creation in `tests_farmer_harvester_rpc.py`

* tests: Drop redundant class

* tests: Move RPC setup into new `environment` fixture

* tests: Split up the single test `test1`
2022-01-31 18:53:21 -08:00
JeffandGitHub b8b7faacfe Updated tests to use the ready/start/finished model previously added for test_multiple_writers. This reduces timeout-related failures that occur in the CI environment. By waiting for the spawned processes to indicate readiness and wait for a start signal, the test timeouts are better able to target the actual logic being tested rather than flakiness introduced by the OS task scheduler. (#10050) 2022-01-31 18:52:27 -08:00
Arvid NorbergandGitHub 3d063fea8f remove the GeneratorArgs type, and instead include the heights and generator programs as separate lists in BlockGenerator. The heights are not necessary when validating blocks, so this makes it easier to omit them in that case. The heights are only used when generating/farming a block. (#10006) 2022-01-31 18:49:39 -08:00
Arvid NorbergandGitHub 275969ddd1 remove redundant function, calculate_cost_of_program(). The cost is now part of the NPCResult object (#9964) 2022-01-31 18:49:12 -08:00
Arvid NorbergandGitHub e49b11d486 use pytest.fixture instead of pytest_asyncio.fixture in cmd test (#10040) 2022-01-31 18:48:58 -08:00
Arvid NorbergandGitHub 108f72a756 fix DB conversion with duplicate hints in the v1 database (#10041) 2022-01-31 18:48:37 -08:00
JeffandGitHub d136b84498 Fixed Offer history limit and GUI sorting (#10025)
* trade_store: Migrated the `is_my_offer` property from the serialized
trade_record to a new `is_my_offer` column in the trade_records table.
Rewrote get_trades_between to move the query/sorting into the database.
This supports the presentation of offers in the GUI (two lists sorted by
relevance).

RPC: get_all_offers now accepts options to restrict the listing to
completed offers, my offers, taken offers. Added get_offers_count call
to return a breakdown of the number of offers (my offers, taken offers,
total).

CLI: Updated `chia wallet get_offers` to include options to exclude
created/taken offers, as well as an option to reverse the listing. The
-ia|--include-all option has been renamed -ic|--include-completed to
make sense in the context of the --exclude-[my-offers|taken-offers]
options. The full listing is now output, fixing the issue with hitting
the prior paging cap of 50 records.

* Linter fixes

* Updated trade tests. Fixed reverse sort when ordering offers by relevance.

* Make column spec explicit on insert to better support possible future migrations. If a future migration adds a new column with a default value, inserts/updates made by an older client will fail unless the insert explicitly indicates which columns are being updated. By explicitly listing the columns to update, any unspecified columns will have their default value applied.
2022-01-31 18:48:05 -08:00
Kyle AltendorfandGitHub 621eaa2813 Merge pull request #10045 from Chia-Network/ci_fix_pin_black 2022-01-31 17:41:42 -05:00
Matt HauffandGitHub 0bf36b0b9d Fix trade test flakiness (#10048) 2022-01-31 17:10:19 -05:00
Matt Hauff ee76693a7e Check singleton confirmation 2022-01-31 14:54:08 -07:00
Matt Hauff 9d733b5abd Add get_max_send_amount 2022-01-31 13:30:26 -07:00
Matt Hauff 167ab471bc Fix some other sync from scratch issues 2022-01-31 13:01:04 -07:00
almog e47687d19e default config not in conf file 2022-01-31 20:22:17 +02:00
Matt Hauff 4ffedd5b93 fix datalayer wallet creation 2022-01-31 11:14:30 -07:00
Florin Chirica 24dcd79bef Revert "pip==21.3.1 for now (#10035)"
This reverts commit baeabc7446.
2022-01-31 19:54:56 +02:00
Kyle Altendorf f157145e9c Pin black==21.12b0 for click 7 support. (#10027) 2022-01-31 12:50:32 -05:00
Mariano SorgenteandGitHub 00613bc259 Flaky test in wallet rpc (#10039) 2022-01-31 10:05:32 -05:00
almog d694eb3185 unused import 2022-01-31 16:17:25 +02:00
Florin Chirica 9b5876e2de Improve validation logic. 2022-01-31 15:58:27 +02:00
Kyle AltendorfandFlorin Chirica baeabc7446 pip==21.3.1 for now (#10035)
* pip==21.3.1 for now

* More pip pinning

* Pip

* Pip
2022-01-30 23:11:13 +02:00
Kyle AltendorfandGitHub fedae0cc97 pip==21.3.1 for now (#10035)
* pip==21.3.1 for now

* More pip pinning

* Pip

* Pip
2022-01-30 16:05:34 -05:00
Mariano SorgenteandGitHub 34edf6e35e pool_wallet: Deterministic derivation of auth key, and only count poo… (#9922)
* pool_wallet: Deterministic derivation of auth key, and only count poolWallets for indeces

* cli: Use the same limit for cli creation

* farmer: no more auth keys in config

* farmer: handle case of no authentication sk

* farmer: remove async, and fix test

* lint

* test: Add a test for many pool wallets, and user store

* test: Wait for wallet to be synced in test

* wallet: fix startup (no dns servers) and change to server checking of plotnfts

* cli: change to server checking

* tests: fix user store test

* Improve caching

* PR comments

* Remove useless class

* Try to fix test again
2022-01-30 12:31:55 -05:00
Florin Chirica 5b84563cd9 Fix super linter. 2022-01-30 19:30:54 +02:00
Florin Chirica 0bbf2a331e Also LGTM. 2022-01-30 17:50:07 +02:00