Commit Graph
14659 Commits
Author SHA1 Message Date
JeffandGitHub fc453e637c Fixed test failures on Windows. (#10740) 2022-03-15 09:59:27 -07:00
Kyle AltendorfandGitHub a0c89dea9b Merge pull request #10730 from Chia-Network/atari-merge_main_97ef7b275a81f89044868c0e42c6411317511afb-take_2 2022-03-15 10:15:02 -04:00
Florin Chirica 36daffa8e7 Fix test. 2022-03-15 15:37:28 +02:00
dustinfaceandGitHub 0036118177 tests: Add _PYTEST_RAISE to fix exception breakpoints with pytest (#10487)
It's currently not possible to have the debuger stop on an uncaucht 
exception when debugging tests. With this patch, adding 
`_PYTEST_RAISE=1` to the environment variables in the pytest 
configuration template fixes this.
2022-03-15 06:08:29 -07:00
Florin Chirica 4e161cf56e Checkpoint deltas. 2022-03-15 14:46:05 +02:00
Kyle Altendorf ab1e897945 Merge commit '97ef7b275a81f89044868c0e42c6411317511afb' into atari-merge_main_97ef7b275a81f89044868c0e42c6411317511afb-take_2 2022-03-14 22:55:44 -04:00
Kyle AltendorfandGitHub b16147f740 Merge pull request #10727 from Chia-Network/atari-merge_main_8a5c12541809526ef55995674595ed6485c6c330 2022-03-14 22:54:57 -04:00
Kyle Altendorf 0650052603 Merge commit '8a5c12541809526ef55995674595ed6485c6c330' into atari-merge_main_8a5c12541809526ef55995674595ed6485c6c330 2022-03-14 21:04:05 -04:00
Kyle AltendorfandGitHub 673831ded1 Merge pull request #10724 from Chia-Network/atari-merge_main_ce533879e25a536b6414307c4e6d850c1da06d4f 2022-03-14 20:59:57 -04:00
Kyle Altendorf beea401b9e use pytest_asyncio.fixture as needed 2022-03-14 19:06:00 -04:00
Kyle Altendorf d4ccfa1a9b Merge commit 'ce533879e25a536b6414307c4e6d850c1da06d4f' into atari-merge_main_ce533879e25a536b6414307c4e6d850c1da06d4f 2022-03-14 19:03:45 -04:00
Kyle AltendorfandGitHub 26cb9db3db Merge pull request #10660 from Chia-Network/atari-merge_main_98971de9d525e1de323ecb09f0777cca6286f932 2022-03-14 17:22:34 -04:00
William Blanke 622cdeb396 updated gui to c992d07c956501f92e84ead80127c6b1e882fc21 2022-03-14 13:10:16 -07:00
Kyle Altendorf 619751e69b Merge branch 'atari' into atari-merge_main_98971de9d525e1de323ecb09f0777cca6286f932 2022-03-14 14:56:58 -04:00
Kyle AltendorfandGitHub b81518e4a7 Provide default for when rpc_server_max_request_body_size is not specified 2022-03-14 14:45:42 -04:00
Kyle AltendorfandGitHub 89a66acfc7 Merge pull request #10662 from Chia-Network/atari-merge_main_7fa1861def5797f63edfd2ad54f3efb77b52695b-take_2 2022-03-14 13:12:45 -04:00
matt b47c94180b flake 8 stupid fix 2022-03-14 13:30:46 +00:00
Kyle AltendorfandGitHub c63324abe9 remove some event_loop() fixtures (#10420)
* remove event_loop() fixtures

* flake8

* flake8

* remove sys.exit() from daemon shutdown

* bump full node test timeout.  a lot...  to see.

* fixup some tests

* back to module scope event loop fixture for test_full_node.py

* Update test_full_node.py

* Iterator...

* for the whole directory

* some fixtures back to module scope for reduced runtime

* back to 40 minute workflow timeouts

* these are being addressed separately
2022-03-14 06:08:35 -07:00
Kyle AltendorfandGitHub 4915477fcb bump pre-commit mypy to 0.940 (#10672) 2022-03-14 06:08:05 -07:00
Arvid NorbergandGitHub 773d692fc5 fix usage of the bt fixture in conftest fixtures (#10688) 2022-03-12 10:40:52 -08:00
dbeff36ae0 Add configuration locking (#10680)
* Add configuration locking

Extracted from https://github.com/Chia-Network/chia-blockchain/pull/10631

* note that fasteners will likely be replaced by filelock

* Fix test_multiple_writers on macOS

* create_all_ssl() doesn't need to be inside the config access lock

* add warnings about not using async within get_config_lock() get lock contexts

* no need to pre-touch the lock file

* .yaml.lock instead of just .lock

* test_multiple_writers() is sync

* Revert "add warnings about not using async within get_config_lock() get lock contexts"

This reverts commit 681af3835b.

* reduce lock context size in chia_init()

* use an exit stack in load_config()

* avoid config existence precheck

* only lock around the read in load_config()

* do not raise e, just raise

* tidy new imports

* fix queue empty check in test_config.py

* remove commented out code in test_config.py

* remove unused import

Co-authored-by: Jeff Cruikshank <jeff@chia.net>
2022-03-12 06:52:47 -08:00
Earle LoweandGitHub 19ee652d73 better TLS1.3 check (#10552)
* better TLS1.3 check

* catch ValueError instead of Exception

* Code simplification and cleanup

* a few nits in comments
2022-03-11 18:52:00 -08:00
JeffandGitHub 184920a55c Better management of KeyringWrapper's keys_root_path when using TempKeyring for tests (#10636)
* Better management of KeyringWrapper's keys_root_path when using TempKeyring for tests.

* Move keys_root_path restoration code into `cleanup()`
Added an assert to detect if an unexpected shared KeyringWrapper is injected during a test.

* Conditionally restore keys_root_path for testing
2022-03-11 18:48:45 -08:00
William Blanke 917fb5db4c updated gui to cdfa2b98217fa8755c0da4f7409e6f90032c4c4c 2022-03-11 18:04:07 -08:00
Adam KellyandGitHub 70639be906 Ak.convert fixtures (#10612)
* Use bt fixture

* rebase

* Use local_hostname

* flake8

* Remove set_shared_instance

* Remove unneeded comments

* Revert unrelated change

* Add back type signature - rebase issue

* Correct type for _configure_legacy_backend

* See what's going on during CI mypy run

* github workflows

* mypy typing

* Remove legacy Keyring create method

* Start daemon first

* Set chia-blockchain-gui to hash in main

* Fix two test files that were not importing self_hostname

* self_hostname fixture

* Convert all class fixtures to top level functions
2022-03-11 16:26:54 -08:00
Chris MarslenderandGitHub efdff0adba Check prefix on send_transaction before sending (#10566)
* Check prefix on send_transaction

* Fix failing RPC tests - xch -> txch since tests are a testnet and we enforce valid prefixes with this PR
2022-03-11 16:25:55 -08:00
Chris MarslenderandGitHub 230b785d3a Slightly different query for V2 DBs for getting compact/uncompact block counts, to ensure the available index is used / avoid a table scan (#10661) 2022-03-11 16:24:58 -08:00
JeffandGitHub 75ed1307e5 Fix exception when chia keys migrate is run without needing migration (#10655)
* Fix exception when `chia keys migrate` is run without needing migration

* Linter fixes
2022-03-11 16:23:24 -08:00
dustinfaceandGitHub 0bf370c642 plotting: Only lock while actually accessing PlotManager.plots (#10675) 2022-03-11 16:23:01 -08:00
austinsirkinandGitHub caaf7f40e1 Version control (#10479)
* Added version control enforcement to macOS m1

* Added enforced version control

* Added enforce version compliance

* Added enforced version compliance

* Added enforced versioning

* Updating this to include DRY internal action.

* Removed some unintended whitespace.

* Removed some unintended whitespace.

* CI re-run

* Trying to figure out why it's failing one test.

* Trying to figure out why it's failing one test.

* Trying to figure out why it's failing one test.
2022-03-11 15:57:35 -07:00
Florin Chirica 349a71edaf Store only batch. 2022-03-11 18:31:15 +02:00
matt 72a7f96411 flake8 fixes for tests 2022-03-11 16:12:51 +00:00
matt cf8d00b884 fix rpc test 2022-03-11 15:04:07 +00:00
matt 6c303c4a4a add clvm files to recomp list 2022-03-11 14:27:28 +00:00
Kyle Altendorf 9d340d756c add_interested_coin_ids became plural 2022-03-10 22:02:42 -05:00
Kyle Altendorf 38e9d73e8f add_interested_puzzle_hash became plural 2022-03-10 21:57:56 -05:00
Kyle Altendorf def22282ec Merge commit '7fa1861def5797f63edfd2ad54f3efb77b52695b' into atari-merge_main_7fa1861def5797f63edfd2ad54f3efb77b52695b-take_2 2022-03-10 21:52:02 -05:00
Kyle Altendorf 5c4becaad0 catchup with isort enforcement/ignores 2022-03-10 21:35:35 -05:00
Kyle Altendorf e79768ede6 Merge commit '98971de9d525e1de323ecb09f0777cca6286f932' into atari-merge_main_98971de9d525e1de323ecb09f0777cca6286f932 2022-03-10 21:26:45 -05:00
Don KackmanandGitHub ef4224d9e4 fix [Bug] #10569 (#10571) 2022-03-10 11:25:28 -08:00
Don KackmanandGitHub 7c717853a1 correct spelling of genrated (#10653) 2022-03-10 11:11:30 -08:00
Mariano SorgenteandGitHub fe964a48bd Fix invalid DB commit (#10594)
* Fix invalid DB commit

* More fixes

* Add raise

* Fix test
2022-03-10 11:11:04 -08:00
Johannes TysiakandGitHub e8ff5a32a7 fix initial-config typo - log_maxbytesrotation (#10598) 2022-03-10 11:10:28 -08:00
dustinfaceandGitHub 7a8cae2936 pools: Fix plotnft claim command's output (#10609)
If you currently claim rewards `claim_cmd` fails to print the txhash 
with the lookup hint in `submit_tx_with_confirmation`

```
Error performing operation on Plot NFT -f 172057028 wallet id: 12: 
'dict' object has no attribute 'name'
```

Because `submit_tx_with_confirmation` expects a `TransactionRecord` as 
result from its callable parameter `func` but `pw_absorb_rewards` 
returns a dict which includes the `TransactionRecord` as value for the 
key `transaction`. This PR makes sure all other methods used as `func` 
callable have the same return behaviour as `pw_absorb_rewards`. We could 
have adjusted it the other way around (only return `TransactionRecord` 
in `pw_absorb_rewards`) but then we would drop information in the RPC 
client.  


With this PR you get:

```
Do chia wallet get_transaction -f 172057028 -tx 
0x34f74a1ffd9da9a493b78463e635996fd03d4f805ade583acb9764df73355f9c to 
get status
```
2022-03-10 11:10:03 -08:00
JeffandGitHub 88f7c6bd83 chia keys show will default to displaying the first observer-derived wallet address. With the addition of the -d option, the non-observer derived wallet address can be displayed. (#10615) 2022-03-10 11:09:29 -08:00
Arvid NorbergandGitHub 5b0fb70d97 a problem with using random.randint() to pick a port is that all processes (running in parallel) are seeded the same, and so pick the same ports at the same time, causing conflicts. This uses proper entropy instead. (#10621) 2022-03-10 11:08:30 -08:00
Adam KellyandGitHub ff324095cc Remove block tools and keychain globals (#10358)
* Use bt fixture

* rebase

* Use local_hostname

* Fix test_json (inheritance from unittest.TestCase)

* Use correct BlockTools fixture for test_simulation

* Pass bt fixture into cost calculation tests

* flake8

* Add missing parameters to test functions

* Fix from rebase issues

* Remove set_shared_instance

* Update comment

* Remove unneeded comments

* Remove unused code

* Remove unused code, run `multiprocessing.set_start_method("spawn")` at correct time.

* Revert unrelated change

* Set daemon_port. Teardown services in correct order.
    BIG thanks to Mariano Sorgente for debugging help.

* Add back type signature - rebase issue

* Apply review fixes from Jeff

* Document why we need a later pytest-asyncio version

* Correct type for _configure_legacy_backend

* See what's going on during CI mypy run

* github workflows

* mypy typing

* Remove legacy Keyring create method

* Start daemon first

* Shutdown daemon coroutine properly

* Remove un-needed daemon_port argument

* Set chia-blockchain-gui to hash in main

* Remove connect_to_daemon_port

* Remove code that set "daemon_port" before calling `setup_daemon`

* Remove self_hostname fixture and extra self_hostname global

* Fix two test files that were not importing self_hostname

* self_hostname fixture

* Remove more unused test code

* Simplify  fixture
2022-03-10 11:06:49 -08:00
Florin Chirica 31b92c4cd7 Checkpoint new server. 2022-03-09 15:35:14 +02:00
Arvid NorbergandGitHub 0e29dbc6d4 Bump CAT wallet test timeout to 40 minutes (#10605) 2022-03-09 03:41:18 -08:00
Kyle AltendorfandGitHub a0897d8d31 context manager for socket in find_available_listen_port(), catch OSError (#10567) 2022-03-09 03:40:52 -08:00