Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid Norberg 40a5be3f11 add ability to profile the farmer process (#17953) 2024-05-04 07:44:11 -07:00
Amine Khaldi 1a69bd2927 Merge commit '861280f08c801138762d5fae8402b5311fdd649a' into checkpoint/main_from_release_2.3.0_861280f08c801138762d5fae8402b5311fdd649a 2024-05-01 22:35:53 +01:00
Rigidity 7fa27cbad5 Filter out duplicate coins returned by RequestPuzzleState (#17941) 2024-05-01 07:23:18 -07:00
Patrick Maslana ca897f149a Fix memo plotid (#17856)
* Convert hex to a string for memo and plotid

* Create a check for converting bytes to a string and remove the 32 bytes check for memo and plotid args in create_plots.py

* Return the args.plotid bytes32.fromhex(plot_str) instead of bytes.fromhex(plot_str)

* Remove debugging print that was used to print out the type

* Fix invalid type annotation

* Start using bytes32 for the type to prevent errors

* Change bytes32 to bytes
2024-04-30 15:23:00 -07:00
Arvid Norberg 6360ac078a add test for replace_str_to_bytes (#17922)
add test for replace_str_to_bytes
2024-04-30 09:47:36 -07:00
Amine Khaldi a963d75f25 Remove unused assert_sb_in_pool and inline assert_sb_not_in_pool as it's used only once (#17926)
Remove unused assert_sb_in_pool and inline assert_sb_not_in_pool as it's used only once.
2024-04-29 13:13:04 -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
Patrick Maslana 87a5d24e34 checkpoint: into main from release/2.3.0 @ cfa218dd82 (#17895)
Source hash: cfa218dd82
Remaining commits: 1
2024-04-26 08:09:14 -07:00
Amine Khaldi d9612ba0e3 Use txs values in test_add_eviction (#17910)
Use txs values in test_add_eviction.
2024-04-26 08:08:28 -07:00
Arvid Norberg 603910578d remove unnecessary function, dataclass_to_json_dict() (#17917) 2024-04-26 08:07:20 -07:00
Arvid Norberg 47fddc54d6 introduce early continue/exit to reduce the indentation level (#17918) 2024-04-26 08:07:02 -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
80880bfa71 DL Multistore batch update. (#17806)
* Multistore batch update.

* Lint

* Lint.

* Add test.

* Update data_layer_rpc_api.py

* Read from 'transactions' instead of 'tx_records'

* Fix test.

* Improve coverage.

* Submit all pending roots.

* Lint.

* Revert debug change.

* Add fee.

* Fix fee test.

* Update chia/cmds/data_funcs.py

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

* Address review comments.

* Lint.

* Refactor RPC.

* Apply suggestions from code review

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

* Improve coverage

* Lint

* Update data_layer_rpc_api.py

---------

Co-authored-by: Matt <quexington@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-04-26 08:05:30 -07:00
Matt Hauff 6c1579c414 Do not return unexpected coins from get_coin_state (#17850)
* Do not return unexpected coins from get_coin_state

* Add test

* Add no cover comment

* Ban instead of skipping

* Do better

* Better exception message
2024-04-24 14:37:16 -07:00
Earle Lowe c04cd66b15 Skip problem test_every_simulator_command (#17898)
Skip problem
2024-04-24 14:13:54 -07:00
Matt Hauff 1821d6b575 Add new command class framework for easier testing (#17851)
* Add new command class framework for easier testing

* Add better test coverage

* Surface exception message

* textwrap.dedent

* remove unnecessary list

* Remove type check

* helper attribute variable name

* Rename helper attribute

* Simplify and statement

* Do some de-nesting

* Take default suggestion

* Add a __call__ method to the command parser

* subclass -> member

* Remove requirement that requied=False on optionals

* remove useless is_command_option

* Use global 'register' for special types

* Use a class for metadata optiona args

* Revert option args to class
2024-04-23 18:09:09 -07:00
Arvid Norberg 861280f08c push out soft-fork 4 activation point to 5716000 (#17892)
push out soft-fork 4 activation point to 5716000 since the 2.3.0 release is slipping
2024-04-22 12:25:19 -07:00
Kyle Altendorf 698455ee7e update example.net IPs (main) (#17897) 2024-04-19 15:46:15 -05:00
Kyle Altendorf f4d2d31646 update example.net IPs (release/2.3.0) (#17894)
* update `example.net` ip to `93.184.215.14`

* and v6
2024-04-19 12:45:18 -07:00
Amine Khaldi c4f0cc742b Merge commit 'cfa218dd8288945a454da3f56ed03356d45a43a6' into checkpoint/main_from_release_2.3.0_cfa218dd8288945a454da3f56ed03356d45a43a6 2024-04-19 16:43:05 +01:00
Amine Khaldi f57d538795 Merge commit '8b6f76179109838efc844e3fb51dc5e08c86aba8' into checkpoint/main_from_release_2.3.0_8b6f76179109838efc844e3fb51dc5e08c86aba8 2024-04-18 22:29:10 +01:00
Amine Khaldi 960274899e Move SimulatorFullNodeService type alias to start_simulator (#17875)
Move SimulatorFullNodeService type alias to start_simulator.
2024-04-18 14:26:36 -07:00
Izumi Hoshino cfa218dd82 Added --skip-keyring option to chia start xxx command (#17857)
* Added `--skip-keyring` option to `chia start daemon` command

* Fixed a lint error and adopted review comments

* Fixed a lint error

* Fixed a test

* Fixed a test

* Added mocks to test

* Fixed a test

* Removed `bt: BlockTools` from the test case because it seemed to cause config file dead lock

* Removed unused mock method

* Set `parallel=False` to chia/_tests/cmds/config.py

* Set `parallel=False` to chia/_tests/core/util/config.py

* Added missing coverage

* Fixed mypy error
2024-04-17 10:02:42 -07:00
Amine Khaldi 0fd225ff56 Merge commit 'a441eb1db77e879be34a444ebb8b5eb5b28e335e' into checkpoint/main_from_release_2.3.0_a441eb1db77e879be34a444ebb8b5eb5b28e335e 2024-04-16 22:38:53 +01:00
Amine Khaldi a5ae6356a4 Use as_iter instead of as_python in get_delayed_puz_info_from_launcher_spend and construct return values with proper types (#17847)
Use as_iter instead of as_python in get_delayed_puz_info_from_launcher_spend and construct return values with proper types.
2024-04-16 13:54:37 -07:00
Arvid NorbergandEarle Lowe 8b6f761791 Run core util tests sequential (#17871)
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2024-04-16 13:39:03 -07:00
Arvid Norberg d117e0a513 simplify MerkleSet by making it immutable (#17861) 2024-04-16 13:25:41 -07:00
Matt Hauff 831cb9bd7f Make a couple of DAOWallet methods return lists of transaction records (#17853) 2024-04-15 12:10:43 -07:00
Matt Hauff 198dfa2f3b Remove tx_records from dl_update_multiple RPC (breaking change) (#17846)
* Read from 'transactions' instead of 'tx_records'

* Remove tx_records from dl_update_multiple
2024-04-15 12:09:35 -07:00
Amine Khaldi 59ee9438ba Remove (undocumented) no longer needed farm_block from WalletRpcApi (Breaking Change) (#17844)
Remove (undocumented) no longer needed farm_block from WalletRpcApi.
2024-04-15 12:08:46 -07:00
Amine Khaldi e90f1cec4b Make generate_test_spend_bundle accept a named wallet param (#17838)
Make generate_test_spend_bundle accept a named wallet param.
2024-04-15 12:07:26 -07:00
Florin Chirica a441eb1db7 DL migrate DB. (#17814)
* DL migrate DB.

* Add test.

* Add get_keys to the test.

* Skip mypy for dynamic classmember.

* Mypy.

* Black.

* Update data_store.py

* Add unknown version test.
2024-04-09 14:23:12 -07:00
Matt Hauff 5da5db1278 Remove unused files (#17807)
* Remove unused files

* Remove chialisp test

* mypy exclusion
2024-04-09 09:58:20 -07:00
Patrick Maslana 02a7e8b1b5 checkpoint: into main from release/2.3.0 @ 65ef0f4ec4 (#17835)
Source hash: 65ef0f4ec4
Remaining commits: 0
2024-04-08 09:54:52 -07:00
Geoff Walmsley 72b9756598 add bytes type to DerivationRecord.pubkey (#17433)
* add bytes type to DerivationRecord.pubkey

* coverage

* comment and no cover for added line in find_lost_did

* Revert "add bytes type to DerivationRecord.pubkey"

This reverts commit 0918d2ec3f.

* create @property for DerivationRecord.pubkey
2024-04-05 09:30:39 -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
Kyle Altendorf 122d85c095 Merge commit '7966d96b10abff2bb206164f0d8750a50396b5a9' into checkpoint/main_from_release_2.3.0_7966d96b10abff2bb206164f0d8750a50396b5a9 2024-04-05 11:46:17 -04:00
Arvid Norberg 65ef0f4ec4 fix error codes and add more test coverage for message conditions (#17819) 2024-04-05 06:45:09 -07:00
Earle Lowe 7966d96b10 Add timeout for flaky test (#17823) 2024-04-04 11:36:50 -07:00
Arvid Norberg 3f0d5c070b use rust types for RecentChainData, ProofBlockHeader and WeightProof (#17738) 2024-04-03 09:08:04 -07:00
Kyle Altendorf 7c65c4363b fix other cases as well 2024-04-01 13:36:52 -04:00
Rigidity dd0c1751e7 Rename set to Set in cast 2024-04-01 11:36:19 -04:00
Patrick Maslana 07bc1f33e8 Fall back to default values for peer file path (#17802)
<!-- 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:

Enhance backwards compatibility with this config option.

<!-- Does this PR introduce a breaking change? -->
### Current Behavior:

Would fail if peer file paths were not set.

### New Behavior:

Has a default value matching the initial config.
2024-03-30 12:14:39 -07:00
Rigidity 1ff7e09a5a Only log rollback if heights are actually deleted (#17803) 2024-03-30 10:48:05 -07:00
Rigidity 4e625a54d4 Fall back to default values for peer file path 2024-03-29 20:19:17 -04:00
Arvid Norberg 23288e78b9 only print warnings about protocol mismatches for farmer and harvester (#17801)
only print warnings about protocol mismatches for farmer and harvester. In the future, maybe this should also include trusted wallets
2024-03-29 16:06:05 -07:00
Amine Khaldi ec258d0ce6 Optimized v1 to v2 DB upgrade (#17793)
Optimized v1 to v2 DB upgrade.
2024-03-29 13:41:07 -07:00
Rigidity 23e88632d5 New subscription and wallet sync protocol (#17340)
* New wallet sync protocol

* New updates to protocol and initial tests

* Bump new message ids

* Bump protocol version

* Update existing messages

* Implementation of TransactionAddedUpdate

* Improve unit tests

* Update protocol and tests to use previous height

* Testing tweaks

* Remove transaction subscriptions

* Update protocol tests

* Fix request_coin_state test

* Improve test suite, add min_amount, fix bugs

* Update protocol message serialization tests

* Resolve conflicting file

* Remove old hint store code

* Remove transaction added protocol type

* Make height optional for genesis challenge

* Test subscribe after initial state and dedupe ids in that case

* Forcing an empty commit.

* Fix new protocol tests

* Improve performance of clearing subscriptions

* Add more amounts to coin store test

* Lower max items for coin store test

* Fix test coverage, set lower max response items

* Remove add_puzzle_subscriptions and remove_puzzle_subscriptions from protocol

* Update protocol message list test

* Fix valid reply len

* Fix performance issue in query and add error codes

* Add missing message to regression tes

* Add rate limits

* Add test for hint store get_coin_ids_multi

* Increase max puzzle hash batch size and make it a constant

* Use actual params on to_bytes

* Fix test

* Actually check output of no puzzle hash coin state test
2024-03-29 12:56:20 -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