Commit Graph
1095 Commits
Author SHA1 Message Date
Florin Chirica d5e114c480 Lint. 2024-08-28 04:13:34 +03:00
Florin Chirica 146e4a35f5 Add cache. 2024-08-28 03:48:24 +03:00
Matt Hauff 64003a63f5 [CHIA-1067] Integrate coin selection with action scopes (#18424)
* Add TXConfig to action scopes

* Fix DID test

* Fix CR-CAT method

* Fix NFT offer test

* Utilize streamable for WalletSideEffects serialization

* Integrate coin selection with action scopes

* Fix action scope test

* Fix DID test

* Fix NFT tests

* Fix NFT tests
2024-08-19 09:02:36 -07:00
Kyle Altendorf 96cb0a0ba4 Merge branch 'main' into fc.merkle_blob 2024-08-16 11:10:20 -04:00
Florin Chirica 827e86f137 Apply Kyle's change. 2024-08-16 17:56:01 +03:00
Florin Chirica 5b764026c3 Add upsert. 2024-08-15 03:47:19 +03:00
Florin Chirica 64a4b94f79 Lint. 2024-08-14 04:56:03 +03:00
Florin Chirica 62973f7520 Lint.: 2024-08-14 04:45:54 +03:00
Florin Chirica f7bfa2c2d6 Improve test. 2024-08-14 04:37:00 +03:00
Florin Chirica 27b341e36b Lint. 2024-08-13 05:24:37 +03:00
Florin Chirica a78f0eda24 Add free positions. 2024-08-13 05:16:03 +03:00
Florin Chirica 03f51197d6 Lint. 2024-08-10 03:48:04 +03:00
Florin Chirica 73e42221c5 Fix test. 2024-08-10 03:33:37 +03:00
Florin Chirica 8453b52421 Add proof of inclusion code. 2024-08-10 03:14:49 +03:00
Amine Khaldi a712409bbc Merge commit 'd1464da947f04554e8680009539b80723c65cef7' into checkpoint/main_from_release_2.4.3_d1464da947f04554e8680009539b80723c65cef7 2024-08-08 17:05:23 +01:00
Matt Hauff 5761229f1b Remove unused (kinda) functionality (#18408) 2024-08-07 15:03:30 -07:00
Earle Lowe d1464da947 CHIA-783: Stop auto-subscribing to local stores (#18166)
* less auto-subscribing

* Make sure to include owned stores in the managed data loop

* Rearrange flaky test

* trying out flaky and increase timeout

* Test adjustments

* Change to not actually subscribing to owned stores

* Fix up typo

* More test adjustments

* return error when unsubscribing from not-subscribed store

* Add flaky

* flaky is optional dependency

* Increase timeout testing

* Ignore errors in getting owned stores during data loop

* Undo changes to test code

* Need to self-subscribe in unsub tests

* Add tests for auto_subscribe_to_local_stores

* Add negative test and remove flaky

* Linting

* Some test adjustments

* Linting fixes

* updates per PR comments
2024-08-07 11:54:45 -07:00
Matt Hauff 8bc332f95e [CHIA-1037] Add TXConfig to action scopes (#18406)
* Add TXConfig to action scopes

* Fix DID test

* Fix CR-CAT method

* Fix NFT offer test
2024-08-07 11:27:13 -07:00
Florin Chirica b59134532f Lint. 2024-08-06 05:31:07 +03:00
Florin Chirica b51e2a585d Some type checking. 2024-08-06 05:25:38 +03:00
Florin Chirica a72a0c1749 Some linting. 2024-08-06 05:08:42 +03:00
Florin Chirica a9fd907292 Checkpoint. 2024-08-05 19:03:32 +03:00
74b14cee2a [CHIA-299] DL separate DAT files in folders by store id (#17688)
* DL separate files by folder.

* Checkpoint.

* Lint.

* Fix http download args.

* Refactor.

* Fix bug.

* Syntax error.

* Fix bug.

* Lint.

* Add test.

* Add S3 change too.

* Lint.

* Fix bug.

* Fix merge conflict properly.

* Merge conflict.

* Merge conflict.

* Lint.

* Fix bug.

* Fix test post merge.

* Lint.

* Try to fix windows test.

* Coverage.

* Lint.

* Lint.

* Lint.

* Checkpoint have enable config option.

* Lint.

* Lint.

* Fix some tests.

* Fix test.

* Try to fix windows.

* Apply suggestions from code review

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

* Update test_data_store.py

* Address some comments.

* Try with new syntax.

* Refactor.

* Lint.

* Lint.

* Try with overload.

* Lint.

* use ClientTimeout for timeout

* change timeout to ClientTimeout

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2024-08-01 16:38:49 -07:00
Earle Lowe 65e888f245 CHIA-590: Add in connect timeout to DL http download (#18339)
* Add in connect timeout to DL http download

* Update mock function

* Consolidate to using aiohttp.ClientTimeout

* Revert "Consolidate to using aiohttp.ClientTimeout"

This reverts commit db3e77c101.

* Consolidate to using aiohttp.ClientTimeout

* Fix up default value with proper use of default_factory
2024-07-24 10:32:42 -07:00
Matt Hauff 055588914e [CHIA-714] Add usage of action scope throughout wallet codebase (#18128)
* Add the concept of 'action scopes'

* Add `WalletActionScope`

* Fix CATWallet pending_change calculation

* Add action_scope: WalletActionScope to all tx endpoints

* Add usage of action scope throughout wallet codebase

* Add the concept of 'action scopes'

* pylint and test coverage

* add try/finally

* add try/except

* Undo giving a variable a name

* Fix CRCAT test

* Fix trade tests

* Fix cat test

* Fix miscellaneous test

* Fix miscellaneous test

* Fix miscellaneous test

* pylint

* Add auto claim test coverage

* Take advantage of extra_spends

* Fix tests

* test fixes

* pylint
2024-07-17 12:17:16 -07:00
Matt Hauff 4ffb6dfa6f [CHIA-713] Add action_scope: WalletActionScope to all tx endpoints (#18127)
* Add the concept of 'action scopes'

* Add `WalletActionScope`

* Fix CATWallet pending_change calculation

* Add action_scope: WalletActionScope to all tx endpoints

* Add the concept of 'action scopes'

* pylint and test coverage

* add try/finally

* add try/except

* Undo giving a variable a name

* Fix CRCAT test

* Fix trade tests

* Fix cat test

* Fix miscellaneous test

* Fix miscellaneous test

* Fix miscellaneous test

* Add auto claim test coverage
2024-07-16 11:06:01 -07:00
Michael TaylorandKyle Altendorf a4da91a86d Changed: Enhance DataLayer Plugin Registration System for Improved Third-Party Integration (#17711)
* feat: load plugins from file

* feat: add tests

* feat: add file based datalayr plugin support

* fix: isort

* match mozilla-ca repo with main

* chore: fix linting

* add additional test coverage

* Update chia/util/misc.py

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

* move utility to datalayer folder

* fix lint

* use PluginRemote schema

* remove check

* remove check

* Update chia/data_layer/util/plugin.py

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

* load plugin using yaml.safe_load instead of json.load

* add default value to headers if doesnt exist

* fix: syntax error

* add log exception

* Update chia/data_layer/util/plugin.py

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

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-07-16 11:05:11 -07:00
Kyle Altendorf 7de41fc9b4 tidy import aiosqlite as aiosqlite (#18278) 2024-07-15 13:36:01 -07:00
Kyle Altendorf e785c7bfc6 less tree_id (#18130) 2024-07-11 13:45:13 -07:00
Kyle Altendorf cf7b54966e root hash, does None mean empty or unspecified? (#18244)
* mark some cases where a none root hash means unspecified, not empty

* propagate, hint for help tracking, etc

* cp

* enum trick

* tidy

* tidy

* fixup
2024-07-11 13:44:36 -07:00
Arvid Norberg 956894dbd0 use rust version of SpendBundle (#17430) 2024-07-08 09:47:28 -07:00
Florin ChiricaandKyle Altendorf 9e1a4dceb7 CHIA-732 Optimize min height leaf. (#18123)
* Optimize min height leaf.

* Lint.

* Lint.

* Add tests.

* Lint.

* Lint.

* Parametrize test.

* Lint.

* Update chia/data_layer/data_store.py

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

* Address review comments.

* Report all hashes.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-06-26 09:22:15 -07:00
c25eeb08f7 [CHIA-504] Add support for external signers (PLEASE SQUASH) (#18199)
* Repin hsms

* Add to sdist only allowed list

* Signer protocol tweaks

* Convert wallet RPC client to deserialized types

* Introduce @tx_out_cmd decorator

* Make execute_signing_instructions RPC

* Add transport layer support

* Add signer commands

* Rework wallet execute_signing_instructions

* Inadvertent merge changes

* Fix signer command tests

* Try a different approach: recursive flattening

* Bump hsms

* Add comments

* Test coverage

* Coverage ignores

* Remove inadvertent time traveler

* Bring in lost time traveler

* pylint

* Attempt to make qr test less flaky

* Actually test coverage ignore

* Small refactor for test coverage

* transport -> translation

* missed one

* transport -> translation

* Fix asdict error

* coverage

* Forgoe rotation testing for now

* Test coverage

* jsonify_unsigned_txs -> full_jsonify

* Move a class

* Add better type checking to framework

* explicitly state kwargs on _CommandParsingStage

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

* Address comments by @altendky

* Consolidate add_private_key and add_public_key

* Consolidate get_key_for_fingerprint and get_public_key_for_fingerprint

* Test fix

* Merge fix

* Bad merge

* Bad merge

* oops

* pylint

* Tweak keychain_proxy.get_key_for_fingerprint

* Fix wallet RPC test?

* pragma: no cover

* Redesign clvm_streamable

* Fix test imports

* black

* fix one more test

* Address comments by @altendky

* Test coverage

* bytes32

* Better CLI mnemonic check

* Use functools.partial

* Rename full jsonify to chip 29

* whoops missed a couple

* Better CLI mnemonic check

* black

* pylint

* Missed one

* black

* Farm at least one block

* Revert last change and fix 0 block farming

* black

* bad merge

* Merge fix

* Inadvertent changes

* Inadvertent changes

* Syncronize with quex.tx_out_decorator2

* These are no longer dictionaries.

* Use new clvm_streamable pattern

* Fix offer endpoint

* Add @tx_out_cmd decorator

* Bump ecdsa version

* Fix @marshal util to return proper transactions

* Add get_public_key

* port `chia wallet send` to @tx_out_cmd

* merge fix of puzzle hash derivation

* Port `chia wallet coins` to @tx_out_cmd

* Port chia wallet clawback to @tx_out_cmd

* Port `chia wallet take/cancel_offer` to @tx_out_cmd

* Port `chia wallet did ...` to @tx_out_cmd

* Port `chia wallet nft ...` to @tx_out_cmd

* Port `chia wallet notifications send` to @tx_out_cmd

* Port `chia wallet vcs ...` to @tx_out_cmd

* Port `chia dao ...` to @tx_out_cmd

* Exclude data layer and plotnft functions

* [no ci]

* Address comments by @AmineKhaldi

* Fix rpc util

* add test for BSTLSigningInstructions

* [UNDO] d9c6f54398

* [UNDO] 7fc1d2adfd

* [UNDO] 23c9ee8549

* [UNDO] aacc9f0228

* [UNDO] 548465403b

* Undo unintentional changes

* Stuff that's not part of this

* More stuff that doesn't belong

* One last thing that doesn't belong

* Unintentional change

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-06-26 09:21:33 -07:00
Florin Chirica 20fb8b223f DL query multiple ancestors in upsert. (#18146) 2024-06-24 13:54:13 -07:00
Kyle Altendorf 74b86c0001 remove unused tree_id parameter from DataStore.batch_upsert() (#18137) 2024-06-18 14:24:42 -05:00
Kyle Altendorf a9dfc7589f avoid interpolating values into sql queries (#18181)
* avoid interpolating values into sql queries

* Update data_store.py
2024-06-18 14:23:18 -05:00
Matt Hauff 3637bd33c6 Delete chia.util.misc (#18170)
* Move VersionedBlob to chia.util.streamable

* Move format_bytes to chia.cmds.cmds_util

* Move format_minutes to chia.cmds.cmds_util

* Move prompt_yes_no to chia.cmds.cmds_util

* Move get_list_or_len to from chia.plot_sync.receiver

* Move validate_directory_writable to chia.cmds.cmds_util

* Move *termination_signals to test_services

* Move UInt*Range to chia.util.streamable

* Create chia.util.batches

* Create chia.server.signal_handlers

* Create chia._tests.util.split_managers

* Move ValuedEvent to chia.types.transaction_queue_entry

* Move available_logical_cores to chia.util.cpu

* Move caller_file_and_line to chia._tests.util.misc

* Move satisfies_hint to chia._tests.wallet.test_singleton_lifecycle_fast
2024-06-18 08:27:17 -05:00
Kyle Altendorf c78d974825 tidy data store (#18111)
* tidy data store

* more
2024-06-09 00:27:00 +01:00
Florin Chirica 9b7bb246cb CHIA-645 Optimize build ancestors table. (#18100)
* Optimize build ancestors table.

* Update data_store.py

* Add test

* Lint

* Lint

* Lint

* Simplify query

* Add test for sparse ancestor table.

* Lint.

* Lint.

* Lint.

* Update test_data_store.py

* Fix test.
2024-06-09 00:26:48 +01:00
Kyle Altendorf b69d91d439 Merge branch 'main' into merkle_blob 2024-06-04 14:39:40 -04:00
Florin Chirica 81838c1892 CHIA-582 Use kv compressed in DL batch update (#18032)
* Use kv compressed in DL batch update

* Mypy.

* Lint.

* Lint

* Lint.

* Retrieve only keys.

* Lint.

* Address review comments.

* Lint.

* Increase timeout

* Revert
2024-06-04 17:02:44 +01:00
dependabot[bot]andKyle Altendorf b31806bca1 build(deps-dev): bump pylint from 3.1.0 to 3.2.2 (#18019)
* build(deps-dev): bump pylint from 3.1.0 to 3.2.0

Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.1.0...v3.2.0)

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

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

* clean up some

* more

* pylint==3.2.2

* a few left

* ignore a few

---------

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-06-03 12:21:09 -05:00
a58cc334a4 clvm mypie (#16898)
* clvm mypie

* update exclusions

* wip

* some

* undo for now

* more

* more

* drop the program usage in datalayer tests

* ignore tree hash errors

* ignore enough in _sexp_replace...

* again

* almost

* Fix test_singleton.py

* dl fixup

* did fixup

* touchup

* nft fixup

* fixup tests

* Revert "fixup tests"

This reverts commit 5df1a705ec.

* or this i guess

* blah

* Fix get_owner_did

* tidy

* blah

* `.as_atom()`

* `.as_int()`

* Update chia/wallet/nft_wallet/nft_puzzles.py

* `rrrff`

* stop using `CastableType`

* undo stuff around using `CastableType`

* `announcement_assertions: List[Program]`

* Update chia/types/blockchain_format/program.py

* more

* clvm==0.9.10

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Matt <quexington@gmail.com>
2024-05-22 12:28:07 -05:00
Earle Lowe b76a4f4a0a [CHIA-365] Return exception and error from get_kv_diff when either of the hashes has no data (#18039)
* Return exception and error from get_kv_diff when either of the hashes has no data

* Fix up test to handle expected error for invalid hash
2024-05-21 20:10:56 -05:00
Florin Chirica b7e8fe7d93 [CHIA-387] DL batch upsert optimization. (#17999)
* DL batch upsert optimization.

* Lint

* Lint

* Fix test.

* Convert delete/insert to upserts.

* Update data_store.py

* Improve coverage.

* Whitespace.

* Change test to use upsert too.

* Clarify test usage.
2024-05-16 09:25:43 -05:00
Matt Hauff 44c6b44c46 [CHIA-302] Handle reorgs in data layer wallet (#17992)
* Handle reorgs in data layer wallet

* Update WalletNode.reset_sync_db

* Fix test

* Make new tables easily forwards compatible

* Use singleton_records table instead of launcher_confirmations

* Only select launcher_id
2024-05-15 09:52:34 -05:00
Kyle Altendorf de2d8c0ac0 store the index on the raw node objects (great? or not...?) 2024-05-15 08:57:15 -04:00
Kyle Altendorf 4a9e876666 add MerkleBlob.get_lineage() 2024-05-14 21:24:35 -04:00
Kyle Altendorf 7e0c897555 comment 2024-05-14 21:16:47 -04:00
Kyle Altendorf c772ae66cd trivial tree deserialization 2024-05-14 21:12:13 -04:00