670 Commits
Author SHA1 Message Date
Matt Hauff bcbc7a7b50 [CHIA-819] Fix 12-word mnemonic support in keychain (#18246)
Fix 12 word mnemonic support in keychain
2024-06-26 09:22:48 -07:00
Kyle Altendorf e8d2710c40 add installed test for chia init and fix importlib_resources uses (#18102)
* add installed test for `chia init`

* `.rpartition(".")[0]`
2024-06-03 12:21:26 -05:00
Arvid Norberg 605e3b8982 [CHIA-615] make BLSCache a proper class (#18053)
* make BlsCache a proper class, rather than a global dict with helper functions

* make the BLS cache a member of the FullNode, rather than a global variable

* add test for BAD_AGGREGATE_SIGNATURE when using the BLS cache
2024-05-31 13:57:20 -05:00
Arvid Norberg a83b240197 CHIA-595: Soft fork 5 (#18072)
* introduce soft-fork-5

* unit test for infinity G1 points
2024-05-30 14:39:31 -05:00
Chris Marslender dafd8b41d9 Add optional trusted CIDR list (#18094)
* trusted_cidr list

* Tests for trusted cidrs

* only check IPs

* Fixing lint
2024-05-29 13:45:59 -05:00
Matt Hauff ad3fb32d19 [CHIA-602] Add bech32m option for adding public keys (#18073)
* Add bech32m option for adding public keys

* Change bech32 prefix
2024-05-29 11:40:43 -05:00
Arvid Norberg a4c11433f9 bump chia_rs to 0.8.0 and update G1Element handling (#18037)
* bump chia_rs to 0.8.0 and update G1Element handling

* use real keys and signatures in mempool tests
2024-05-21 13:42:21 -05:00
Kyle Altendorf 73a7cb4687 CHIA-420 remove ignore for pkg_resources deprecation warning (#17933)
* remove ignore for `pkg_resources` deprecation warning

* replace pkg_resources usages

* fixup

* fixup

* fixup

* a couple

* imports

* cleanup

* maybe
2024-05-15 09:52:22 -05:00
dependabot[bot]andKyle Altendorf 480bba57ba build(deps-dev): bump mypy from 1.8.0 to 1.10.0 (#17984)
* build(deps-dev): bump mypy from 1.8.0 to 1.10.0

Bumps [mypy](https://github.com/python/mypy) from 1.8.0 to 1.10.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.8.0...v1.10.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* adjust

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-05-09 08:56:50 -05:00
Florin ChiricaandKyle Altendorf 6c25d3a184 Optimize DL autoinserts. (#17883)
* Optimize DL autoinserts.

* Lint.

* Improve tests.

* update root history references

* Stress test benchmarks.

* Try with low limit first.

* Try without -k

* Gather more data.

* Run only benchmark.

* Remove exception.

* Increase limit

* Increase limit.

* Increase timeout

* Add new benchmark.

* Increase timeout.

* Timeouts.

* Increase timeout

* Revert stress test.

* Use the correct limit

* Update test.

* Add option to disable the optimization.

* Revert optimisation in offers.

* Test all cases properly.

* Apply suggestions from code review

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

* Improve case handling.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-05-09 08:55:51 -05:00
Earle Lowe 61e22fea87 Make sure to use no more than 61 cpus on windows (#17958)
* Make sure to use no more than 61 cpus on windows

* Type fix
2024-05-07 23:02:30 -05:00
Matt Hauff aefe7fdf28 Observer Mode (#17792)
* Observer Mode

* Address comments by @altendky

* Change RPC default and fix test coverage

* Add test coverage for rpc marshaller

* Fix @marshal util to return proper transactions
2024-05-07 13:39:25 -07:00
Arvid Norberg 40a5be3f11 add ability to profile the farmer process (#17953) 2024-05-04 07:44:11 -07:00
matt-o-how bed6ec7055 Use Rust version of MerkleSet (#17908)
* drop in merkle set from rust

* add test of non-inclusion

* migrate sync_utils to use chia_rs

* remove unused import

* flake8 fixes

* mypy fix

* more lint fixes

* isort

* remove old merkle_set.py

* make test proof of exlcusion more explicit

* covnert test_merkle_set to use chia_rs MerkleSet

* isort again
2024-04-29 11:05:32 -07:00
Arvid Norberg 603910578d remove unnecessary function, dataclass_to_json_dict() (#17917) 2024-04-26 08:07:20 -07:00
Arvid NorbergandRigidity 8eb41c59d7 bump chia_rs to 0.7.0 (#17909)
* bump chia_rs to 0.7.0 and transition using sized ints and sized bytes from chia_rs

* transition StructStream to use the version from chia_rs

* Initial port of ConsensusConstants to Rust

* Revert max cost calculation to use int for now

* Remove SizedBytes, since it was moved to chia_rs

* Remove test_struct_stream, since it was moved to chia_rs

* use [0] * 100 instead of bytes(100)

* restore wallet_rpc_api, and make type hints match JsonDict (Any)

* fixup ConsensusConstants; restore return value of calculate_prefix_bits()

* fixup ConsensusConstants; construct int for intermedate cost values

* fixup ConsensusConstants; construct int for intermedate cost values

* fixup: transition StructStream to use the version from chia_rs

* revert changing type annotations for json dict

---------

Co-authored-by: Rigidity <me@rigidnetwork.com>
2024-04-26 08:06:25 -07:00
Arvid Norberg d117e0a513 simplify MerkleSet by making it immutable (#17861) 2024-04-16 13:25:41 -07:00
Amine Khaldi 040f7531bd Merge commit '65ef0f4ec416a0b161bf5bce854e1d6df66a074a' into checkpoint/main_from_release_2.3.0_65ef0f4ec416a0b161bf5bce854e1d6df66a074a 2024-04-05 17:29:43 +01:00
Amine Khaldi 442bad9f27 Increase in-memory DB URI randomness (#17822)
Increase in-memory DB URI randomness.
2024-04-05 09:29:15 -07:00
Arvid Norberg 65ef0f4ec4 fix error codes and add more test coverage for message conditions (#17819) 2024-04-05 06:45:09 -07:00
Arvid Norberg 4b90197eae Rename softfork (#17799)
* remove disabled tests from CHIP-13

* rename the new soft-fotk to soft-fork 4. We've already had soft-fork 3, but it's activated and its logic has been removed
2024-03-29 08:41:36 -07:00
Arvid Norberg c67b8bbe5e message conditions (#17772)
* bump chia_rs to 0.6.1

* introduce soft-fork 3, to enable message conditions

* add wallet tests
2024-03-27 16:08:29 -07:00
Felix Brucker 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 Altendorf ed786e2f61 add foreign key delay (#17709)
* add foreign key delay

* handle non-`Row` foreign key error reports

* todos

* coverage

* rename to `foreign_key_enforcement_enabled=`
2024-03-27 09:14:57 -07:00
Earle Lowe 5dad9f2148 DL: stop using fee config setting and remove from initial config (#13374)
* DL: stop using fee config setting and remove from initial config

* Updates to set fee manually

* Set back explicit fee to original 0
2024-03-27 09:10:57 -07:00
Izumi Hoshino 2f3fce5c85 Added chia start daemon (#17704)
* Added `chia start daemon`

* Added a test case

* Fixed lint issues

* Reverted changes in `services_for_groups`

* Fixed coverage issue
2024-03-18 09:43:55 -07:00
Felix Brucker acaf7e0a3b Add use_delta_sync option (#17573)
* Add `use_delta_sync` option

* Use fixture for `use_delta_sync` bool param

* Add note in initial-config
2024-03-15 09:22:01 -07:00
Earle Lowe 48e4039e58 Update black to 24.1.1 and update source as needed (#17499)
* Update source to black 24 spec

* update black to 24.1.1

* update pylint to ignore multiple-statements

* update test file

* black updates

* format updates

* Update test_network_protocol_files.py

* Update test_network_protocol_files.py
2024-03-13 11:08:19 -07:00
Kyle Altendorf 57193aec94 watchdog==4.0.0 (#17666) 2024-03-07 12:31:14 -08:00
Kyle Altendorf 151d3555e0 use QueuedAsyncPool for DataLayer.periodically_manage_data() subscription handling (#17550)
* preliminary `AsyncPool`

* touchup

* use `AsyncPool` for `DataLayer.periodically_manage_data()` subscription handling

* fix

* tweak

* more

* test worker exception logging

* ignore

* add `QueuedAsyncPool`

* use `QueuedAsyncPool`

* fix

* cleanup

* tidy

* fixup

* fixup

(cherry picked from commit 484f34044d)

* Update data_layer.py

* fixup test coverage
2024-02-27 15:42:19 -08:00
Arvid Norberg 036313fc7e remove support for migrating peers from legacy file format (#17517) 2024-02-20 13:11:00 -08:00
Kyle Altendorf 1a71a77f62 remove config todo comment from a long time ago (#17566) 2024-02-16 10:17:00 -08:00
Arvid Norberg 362414c226 remove old unhashable special case in Streamable (#17561)
remove old unhashable special case in Streamable. This simplifies the streamable implementation
2024-02-15 09:40:30 -08:00
Amine Khaldi 0c5b4284bb Introduce satisfies_hint to check objects against type hints, use it in from_kwargs and fix all the incorrect and missing cases (#17375)
Introduce satisfies_hint to check objects against type hints, use it in from_kwargs and fix all the incorrect and missing cases.
2024-02-14 11:13:43 -08:00
Arvid Norberg c932324ec0 Bump chia rs 0.5.2 (#17505)
* bump chia_rs to 0.5.2

* specify the correct fixed-width integer types for rust bindings
2024-02-08 09:04:26 -08:00
Kyle Altendorf a64aafae6d add time out assert data collection and presentation (#16831)
* add tests.ether

* add new tests/ether.py

* go time out assert

* remove unused JunitPropertyName

* rename to `tests/process_junit.py`

* fixup

* hinting and pylint

* fixup

* after install

* handle skipped tests

* --only plot_sync/

* better relative paths

* better relative paths

* todos

* todos

* tidy

* back to full test run

* add markdown headings

* just make results an artifact

$GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 6067k.

* also output the top 50 to the step summary

* Update process_junit.py

* Update process_junit.py
2024-02-06 11:19:02 -08:00
Amine Khaldi 1977c2d7c1 Augment conditions_dict_for_solution and conditions_for_solution to accept both types of programs (#17451)
Augment conditions_dict_for_solution and conditions_for_solution to accept both programs and serialized programs.

This allows us to use serialized programs without the need to convert them into programs.
2024-01-31 17:27:49 -08:00
Kyle Altendorf 2dd45157d3 ensure signal objects for signal handlers (#17123)
* ensure signal objects for signal handlers

* Update misc.py

* black
2024-01-31 13:37:10 -08:00
Kyle Altendorf 6fe2c9c58a use psutil.cpu_affinity() instead of os.cpu_count() (#17409)
* use `psutil.cpu_affinity()` instead of `os.cpu_count()`

* go simple for darwin

* assert, yay!
2024-01-31 09:28:37 -08:00
Arvid Norberg bdfffca5ab improve handling of UnfinishedBlocks (#17247)
* update full_node_store to support multiple UnfinishedBlocks with the same reward hash

* extend full node store to support recording outstanding requests for v2 unfinished blocks

* add test for full_node_store

* simplify creation of UnfinishedBlock in test_full_node.py

* extend UnfinishedBlock protocol to support distinguishing between unfinished blocks with the same partial hash but different foliage

* add test for NewUnfinishedBlock and NewUnfinishedBlock2

* when asking the full_node_store for an unfinished block, only by its partial hash; return the highest ranking (lowest foliage tx block hash)
2024-01-26 13:20:03 -08:00
Felix Brucker 82f3b06051 Add support for defining a list of full node peers to connect to (#17369) 2024-01-23 10:00:54 -08:00
Kyle Altendorf 78b7904fda switch transaction queue completion to a new ValuedEvent (#17305)
* switch transaction queue completion to a new `ValuedEvent`

* add tests
2024-01-16 09:22:42 -06:00
Arvid Norberg 51808b4ef7 Rust proof-of-space, reward chain and foliage types (#17218)
* use rust type for ProofOfSpace

* use rust types for Foliage

* use rust types for reward chain blocks
2024-01-10 15:42:31 -06:00
RigidityandKyle Altendorf 3e6e08732f Add a few missing type annotations (#17043)
* Add a few missing type annotations

* Update chia/util/struct_stream.py

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

* Update chia/util/keyring_wrapper.py

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

* add `ClassVar` import

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-01-08 08:36:13 -06:00
Arvid Norberg 92499b64a2 use rust types for VDFInfo, VDFProof and ClassgroupElement (#17102)
* use rust types for VDFInfo, VDFProof and ClassgroupElement. Since these types aren't dataclasses, the dataclass.replace() is changed to method replace()

* add test for recursive_replace()

* add comment in recursive_replace() hack
2024-01-04 10:54:21 -08:00
Arvid Norberg cc4e2d83a1 add feature to profile just the block validation (#17168)
add feature to profile just the block validation. This exposes what is actually going on while we validate blocks. Sometimes the block validation times are affected by other tasks that hog the CPU, blocking the main co-routine from being scheduled
2024-01-04 10:53:13 -08:00
Kyle Altendorf 512f7b9fc5 make sure keyring file gets closed (#17126)
* make sure keyring file gets closed

* Update file_keyring.py
2024-01-02 17:06:39 -08:00
Amine Khaldi 3a2be22c44 Merge commit 'a4cab829edd4f16dd89b29c7234ed39c23c5dcaa' into checkpoint/main_from_release_2.1.4_a4cab829edd4f16dd89b29c7234ed39c23c5dcaa 2023-12-22 23:29:59 +01:00
wjblanke a4cab829ed Performance tweaks (#17155)
* changed default peers from 80 to 40. switched auto db_sync default to NORMAL instead of FULL

* fixed default

* add defaults to config query
2023-12-22 16:28:31 -06:00
dependabot[bot]andKyle Altendorf 1e4bb69b9a build(deps): bump concurrent-log-handler from 0.9.24 to 0.9.25 (#17046)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-12-19 10:59:00 -06:00