Commit Graph
65 Commits
Author SHA1 Message Date
Matt HauffandGitHub 40db4635a8 [LABS-245] Enable PEP604 Ruff rules (#20269)
* Enable PEP604 Ruff rules

* Fix harcoded signature in test

* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00
Almog De PazandGitHub 6bd9360f5e Farmer solver networking (#20019)
* farmer connects to solver

* default solver peer

* configure solver peer

* solver trusted peers

* minor fixes

* connect to solver cli

* fix and rename fixture

* pr fixes

* load new service config if missing

* fix failling test

* fix test
2025-09-29 09:39:10 -07:00
Richard KissandGitHub 15a4536a7a The chia.consensus module no longer depends upon chia.wallet. (#19665)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->

### Purpose:

This PR removes a dependency that is inappropriate and caused a
dependency loop.
2025-06-03 12:31:30 -07:00
Richard KissandGitHub 20a0d934cb Move ssl_check.py to chia/ssl (#19596) 2025-05-12 08:53:18 -04:00
6c90a76b56 Tighten up ruff ignore list (#18837)
* Tighten up ruff ignore list

* Okay that fix was indeed unsafe

* enable type-name-incorrect-variance

* enable literal-membership

* enable non-augmented-assignment

* enable useless-return

* enable global-variable-not-assigned

* -

* fixup

* Clean up roff.toml from annotations

* use ignore instead of explicit re-export

* use more descriptive names

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-11-12 12:19:31 -07:00
Kyle AltendorfandGitHub 9c8557a1f8 Remove Python 3.8 support and update source to 3.9 standards (#18687)
* manual python 3.8 removals

* poetry

* pyupgrade

* black

* isort

* manually tidy imports

* work around shadowed type

* catch up build network protocol files for pyupgrade changes

* placate pylint

* re-enable 20.04

* placate flake8
2024-10-16 14:21:15 -07:00
Felix BruckerandGitHub d09b61b72d Pass full version in Handshake (#15679)
* Pass full version in Handshake

* Move chia version conversion into crawler

* Rename to overloaded `chia_short_version` and always return str

* Ensure we extract major.minor.patch from invalid pep440 if available
2024-03-27 10:40:47 -07:00
Kyle AltendorfandGitHub 90c1441af0 apply pyupgrade --py38-plus --keep-runtime-typing (#14646) 2023-10-24 12:01:23 -05:00
Kyle AltendorfandGitHub 381d1317de hint chia.cmds.init, chia.cmds.init_funcs (#14682)
* hint chia.cmds.init, chia.cmds.init_funcs

* optional for now at least

* we will update mypy.ini later
2023-02-28 03:04:08 -06:00
dustinfaceandGitHub 977d2e97cd isort: Remove all chia.cmds exceptions and sort the related files (#13940) 2022-11-17 15:32:03 -06:00
Almog De PazandGitHub ac2203eda8 Refactor test utils for import availability outside of repo (#13880)
* refactor for import availability outside of repo

* refactor for import availability outside of repo

* small revert

* newline

* fix imports

* fix pre-commit issues

* types issort, adapt mypy ignore

* redundant imports

* move files from util to simulator

* run pre_commit

* remove setup_nodes/keyring from isort.cfg

* fix asyncio import
2022-11-15 18:51:05 -06:00
Amine Khaldi a615dee862 Merge commit '27df8e28e3c2082f8959607c07188e56395c6715' into checkpoint/main_from_release_1.6.0_27df8e28e3c2082f8959607c07188e56395c6715 2022-09-01 21:25:38 +01:00
Kyle AltendorfandGitHub 27df8e28e3 fill in data layer certs at startup (#13225)
* fill in data layer certs at startup

* tidy

* don't overwrite

* add overwrite parameter to write_ssl_cert_and_key()
2022-08-30 02:57:36 -05:00
Amine Khaldi eeb2277955 Merge commit '12fcaf0e982590efcf26a954c67cd760035d9e6e' into checkpoint/main_from_release_1.6.0_12fcaf0e982590efcf26a954c67cd760035d9e6e 2022-08-29 17:45:49 +01:00
dustinfaceandGitHub af48eff03b cmds: Drop unused chia_minor_release_number (#12357) 2022-08-10 15:14:37 -05:00
Amine Khaldi d730773ea2 Merge commit 'e7a8f021d3280e0795ea722d9f75679bc1f9c970' into checkpoint/long_lived_atari_from_main_e7a8f021d3280e0795ea722d9f75679bc1f9c970 2022-07-26 11:22:52 +01:00
Amine Khaldi 18313573d3 Merge commit '90516263aa19afbfc4ef62947c8ac7e8c2889e32' into checkpoint/long_lived_atari_from_main_90516263aa19afbfc4ef62947c8ac7e8c2889e32 2022-07-16 17:12:58 +01:00
Jack NelsonandGitHub e7a8f021d3 Fix sql error when only config file is deleted (#12087)
* fix table already exists error

* catch when db exists without possible race conditon

avoid race condition hazard
2022-06-28 13:15:52 -05:00
Kyle AltendorfandGitHub 90516263aa remove chia.util.path.mkdir() (#10842)
* remove chia.util.path.mkdir()

* remove submodule change

* less tmpdir, more tmp_path
2022-06-08 10:24:40 -05:00
Kyle Altendorf 259a2ce0ea Merge commit 'd1e445fac2e503ea230acf74ec24a1bb9c529aee' into atari-merge_main_d1e445fac2e503ea230acf74ec24a1bb9c529aee 2022-05-13 16:08:17 -04:00
Chris MarslenderandGitHub acfdd75a20 Updated warning about CHIA_ROOT being set when running init (#11346)
* Remove warning about CHIA_ROOT being set when running init

* Update to still output the CHIA_ROOT if set, but not instruct the user to remove it

* Store chia_root in a var
2022-04-28 09:16:53 -07:00
Kyle Altendorf 29ce5b74e0 black 2022-04-19 23:35:38 -04:00
Kyle Altendorf b6c5babba3 Merge commit 'd154105a6b35f94649f15bca4e3fb8a11a39e70e' into atari-merge_main_d154105a6b35f94649f15bca4e3fb8a11a39e70e 2022-04-19 22:44:02 -04:00
Arvid NorbergandGitHub 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
Kyle AltendorfandGitHub e0a1fc4eaf Switch to integrated lock_and_load_config() context manager (#10698)
* minor lock scope reduction

* use the lock in tests

* Use the passed root_path in configure CLI command

* switch to lock_and_load_config()

* oops

* cleanup

* make _load_config_maybe_locked() private

* black

* Remove future improvement opportunity TODO comment
2022-03-28 12:52:51 -07:00
Kyle Altendorf 6fc66009c6 Merge commit 'bf2976a2a9dfdd1b71db48030ef79a4a571feae0' into atari-merge_main_bf2976a2a9dfdd1b71db48030ef79a4a571feae0 2022-03-25 17:13:28 -04:00
JeffandGitHub 292c26d3d8 Hardcoded SSL test certs/keys (#10828)
* Hardcoded SSL test certs/keys

* Added a second set of certs/keys.
Cert/key sets are infinitely cycled-through using get_next_private_ca_cert_and_key() and get_next_nodes_certs_and_keys()

* More cert/key sets and a tool to generate them

* Updated SSL generator to sign with the appropriate root CA.
Fixed linter issues.

* Linter fixes

* Updated generate_ssl_for_nodes() based on feedback
2022-03-25 09:24:59 -07:00
Arvid NorbergandGitHub ba6eb6af3d when creating a new blockchain database implicitly, make it v2 (#10498)
* when creating a new blockchain database implicitly, make it v2

* fix config deadlock
2022-03-17 09:09:26 -07: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
Kyle Altendorf e79768ede6 Merge commit '98971de9d525e1de323ecb09f0777cca6286f932' into atari-merge_main_98971de9d525e1de323ecb09f0777cca6286f932 2022-03-10 21:26:45 -05:00
Kyle Altendorf af163a1c5b Merge commit '87aeadc34310eb86aa0bd56f4eb00f84cc9563b2' into atari-merge_main_87aeadc34310eb86aa0bd56f4eb00f84cc9563b2 2022-03-01 17:59:11 -05:00
Kyle Altendorf a50b113bc7 Merge commit 'fa2cdd6492bcffbe61f50fde8b5e1d4fd2ac5a16' into atari-merge_main_fa2cdd6492bcffbe61f50fde8b5e1d4fd2ac5a16 2022-03-01 10:25:32 -05:00
Chris MarslenderandGitHub eb3ed142e0 Crawler RPC (#10141)
* Add crawler RPC server

* Generate private keypair for crawler

* Bring over cleanup changes from the last closed PR

* Update the crawler RPC information to be its own subsection within seeder

* Add sleep before crawling to let the daemon connection get set up

* Wait for the actual callback to not be None, instead of just a random sleep interval

* Rework crawler/dns seeder to use the daemon + normal chia start process rather than the old system intended for the standalone repo

* Update configure testnet to work with seeder config

* Add back the crawler/seeder options from the standalone version

* Remove the check for none/sleep. Not needed when this is started by the daemon

* Add real data to the get_peer_counts endpoint

* Lint

* Fix calls to configure from init

* Turns out we still might sometimes move too quick before daemon/state changed callback is ready

* Add peer counts in the state_changed callback method

* Add a setting for peer_connect_timeout in the seeder: section so we can control it just for crawler

* start_seeder

* Pass config/root_path to the DNSServer so it can also use the configured crawler DB Path

* change in () instead of if/or

* Remove unnecessary return
2022-02-14 11:48:35 -08:00
Arvid NorbergandGitHub fa256b8149 fix typo in 'chia init --db-v1' (#10109) 2022-02-04 08:46:17 -08:00
Mariano SorgenteandGitHub b0a19582f5 check_keys: check 50 instead of 500, farm default observer (#10083)
* check_keys: check 100 instead of 500, and also observer

* check_keys: check 50, and address PR comments
2022-02-03 10:34:26 -08:00
Arvid NorbergandGitHub a501c53228 default new installs to use v2 blockchain database schema (#9951)
* default new installs to use v2 blockchain database schema. Leave an option to initialize a v1 database

* rename default database file to say v2
2022-01-26 17:14:05 -08:00
Kyle Altendorf 2a79868a61 Merge commit '0ba838b7a8ea2b5410d438ac70295df699a30dae' (main) into atari-merge_main_0ba838b7a8ea2b5410d438ac70295df699a30dae 2022-01-14 19:21:13 -05:00
Arvid NorbergandGitHub 9de8235691 extend chia init to support initializing an (experimental) v2 blockchain database (#9599) 2021-12-17 14:35:43 -08:00
Kyle Altendorf 5bd8b3dbaa Merge branch 'main' into atari 2021-11-11 08:57:35 -05:00
justinenglandandJustin England 479f89c9b0 friendlier class calls 2021-11-01 22:39:26 -06:00
justinenglandandJustin England acea2fccb4 black 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 7aee94c82b removing is not none 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 99cbdedc1c using None again 2021-11-01 22:39:26 -06:00
justinenglandandJustin England f79f07ab98 changing bool to string 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 02ece9c549 replacing none with quotes 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 2c54becd02 fixing bad include 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 1e3985c56f syntax 2021-11-01 22:39:26 -06:00
justinenglandandJustin England d6ff52cc0b syntax 2021-11-01 22:39:26 -06:00
justinenglandandJustin England c32721d28c syntax 2021-11-01 22:39:26 -06:00
justinenglandandJustin England 552b4a1860 more formatting 2021-11-01 22:39:26 -06:00