* Add DataLayer self-heal for blobless stores
Reset stores with missing committed Merkle blobs to a clean empty root before sync so already-corrupted subscriptions can recover instead of remaining falsely synced.
* Clear Merkle cache when resetting DataLayer stores
Invalidate cached Merkle blobs during store reset so recovery cannot keep serving stale in-memory blobs after the corresponding file has gone missing.
* Fix DataLayer reset helper formatting.
* [ASB-272] Pass remaining CLVM cost budget when building Offer caches
Offer.__post_init__ tracked a shrinking max_cost but never passed it into
compute_spend_hints_and_additions, and cost ValidationErrors were swallowed.
Propagate the remaining budget and re-raise cost limit failures.
Co-authored-by: Cursor <cursoragent@cursor.com>
* [ASB-272] Replace Offer max_cost spy test with conditions() cost check
Co-authored-by: Cursor <cursoragent@cursor.com>
* [ASB-272] Assert Offer rejects on remaining budget, not post-sum check
Co-authored-by: Cursor <cursoragent@cursor.com>
* [ASB-272] Leave Offer.conditions() unchanged
Co-authored-by: Cursor <cursoragent@cursor.com>
* [ASB-272] Use pytest.raises match= for Offer remaining cost test
Co-authored-by: Cursor <cursoragent@cursor.com>
* Cover Offer remapping of CLVM cost-exceeded ValueError
Lower MAX_BLOCK_COST_CLVM so a cheap first spend leaves too little budget for
the next puzzle run, hitting the ValueError→ValidationError path without mocks.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* Continue wallet subscriptions after a single peer fails
One bad peer in _process_new_subscriptions previously aborted the whole
batch, leaving later peers without the new PH/coin-id registrations.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Use real peers in subscription peer-error test
Replace MagicMock peers with two full nodes and only fail the bad peer's register handlers.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Narrow subscription peer-error handling to RPC failures
Only catch subscribe failures so local apply errors do not ban every peer, and guard peer.close so close exceptions cannot abort the batch.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Tighten subscription failure handling to peer/RPC errors
Catch ValueError/ProtocolError/OSError instead of Exception, and use log_exceptions when closing a failed peer.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Treat protocol Error and StreamableError as subscription peer failures
Normalize Error/unexpected subscribe responses to ValueError, and catch
StreamableError in the per-peer handler so corrupt payloads do not abort the batch.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Add unit tests for subscribe response normalization helper.
Cover Error, unexpected-type, None, and success paths without mocking peers.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Drop happy-path unit test for subscribe response helper.
Rejection cases are enough for the coverage gap; success is already exercised elsewhere.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* Use a separate config for pooling information
* New PlotNFT drivers
* PlotNFT2 Wallet
* PlotNFT V2 RPCs and CLI
* Integrate v2 pooling protocol into farmer
* Comment by @cursor
* Fix test
* Comments by @cursor
* whoops
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Some tidying
* fix test for memo adjustment
* tweak additional memos again
* empirical testing with v1 pools
* Add expiration to `GetAuthRequest`
* Remove pyjwt dep
* Revert `get_login_link` to old behavior
* Add an extra derivation to auth key for v2
* unhardened
* Fix login link test
* Fix login link test again
* Fix network protocol data
* Comments by cursor
* Fix test
* Use correct pool url after redirect
* Fix test for coverage
* Upstream wallet fixes
* Add `REMARK` option to `launch`
* pre-commit
* chmod
* test coverage
* Add wallet name
* test coverage
* moar test coverage
* commentsby @cursor
* moar test coverage
* fix custody architecture namespace
* Comments by @matt-o-how
* Fix /GET farmer to omit the signature rather than None
* Fix protocol test
* fix test
* comments by @cursor
* diff minimizatino
* event dispatch
* Fix test deadlock
* Comments by @cursor
* test coverage
* Comments by @cursor
* Comments by @cursor
* Port `chia wallet notifications` to `@chia_command` framework
* Comments by @cursor
* Add parsing tests
* Fix tests
* Add context for AddressParamType
* Comments by @cursor
* Port `chia wallet vcs` to `@chia_command` framework
* Add context for AddressParamType
* Remove old CLI test
* [LABS-189] Port `chia wallet did` to `@chia_command`
* Fix tests
* Fix tests
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Port `chia wallet nft` to `@chia_command`
* test coverage
* remove executable bit
* Bad merge
* little bit more test coverage
The wallet sync path holds WalletStateManager.lock for the duration of
sync. When _add_coin_states discovers a DataLayer launcher and no
DataLayer wallet exists yet, it called
get_dl_wallet(create_if_not_found=True), which re-acquires the same
non-reentrant asyncio.Lock, deadlocking the sync task. Create the
wallet directly at the sync call site instead, leaving get_dl_wallet
unchanged for RPC callers.
Regression from #20320 (baf8bd05c0).
* [LABS-480] Remove interested_ph_cache and initialize coin cache in init
* [LABS-481] Remove unnecessary `server` field from WSM
* [LABS-486] Remove useless `add_transaction` from WSM
* [LABS-488] Extract signing functionality to its own module
* Test coverage
* Generate Wallet RPC
* Comment by @cursor
* fix test
* executable bit
* Comments by @cursor & fix tests
* Fix tests
* Fix tests
* Comments by @cursor
* test coverage
* Add pre-commit build for wallet stubs
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Port `get_coin_records` and `get_height_info` to `@marshal` decorator
* Remove executable bits?
* Comments by @cursor
* Comments by @cursor
* Add comment at top of .pyi file
Drop always-true metadata guard in DID CLI test helper
metadata is typed dict[str, str] with an empty-dict default, so the
None check was unreachable and tripped mypy's redundant-expr check.
* [LABS-470] Fix mismatching Wallets with WalletProtocol
* [LABS-471] Remove contravariant from WalletProtocol
* [LABS-472] Remove some `has/getattr` in favor of `runtime_checkable` protocols
* [LABS-473] Fix `clvm_streamable` to prevent typing through wrapping
* [LABS-474] Make sure `crcat` is always bound
* [LABS-475] Fix basedpyright errors
* Comments by @cursor
* fix tests
* remove trade_store from mypy exclusions
* some easy wallet_rpc_api fixes
* Another easy fix for WalletRpcAPI
* [LABS-476] Make CATWallet subclassing less problematic
* Comment by @cursor
* fix tests
* Remove puzzle_for_pk methods as unused
* Port `chia wallet notifications` to `@chia_command` framework
* Comments by @cursor
* Add parsing tests
* Fix tests
* Add context for AddressParamType
* Comments by @cursor
* Port `chia wallet vcs` to `@chia_command` framework
* Add context for AddressParamType
* Remove old CLI test
* [LABS-189] Port `chia wallet did` to `@chia_command`
* Fix tests
* Fix tests
* Comments by @cursor
* Comments by @cursor
* Comments by @cursor
* Test coverage
* Fix tests
* Comments by @cursor
* bad merge
* [LABS-480] Remove interested_ph_cache and initialize coin cache in init
* [LABS-481] Remove unnecessary `server` field from WSM
* [LABS-486] Remove useless `add_transaction` from WSM
* also remove `unlink_db`