chips icon indicating copy to clipboard operation
chips copied to clipboard

CHIP-0026: New Wallet Sync Protocol

Open Rigidity opened this issue 11 months ago • 5 comments

Rigidity avatar Mar 06 '24 01:03 Rigidity

CHIP-26 is now a Draft. It proposes a new set of protocol messages for syncing a light wallet against a full node. This CHIP will likely be of interest to all Chia wallet developers. Please leave your reviews as comments in this PR.

danieljperry avatar Mar 06 '24 02:03 danieljperry

I support this chip because I am affected by the described problems.

However, I have not made a code review because im not familiar with the wallet internal code and protocols

forReason avatar Mar 06 '24 15:03 forReason

We will have a public Zoom call to discuss the details of this CHIP's design, as well as to answer any questions. When: March 21 at 7 AM PDT 2 PM UTC 10 PM China

See the #chips channel in our Discord for more details.

danieljperry avatar Mar 14 '24 02:03 danieljperry

Here is the video from Brandon's discussion of this CHIP: https://youtu.be/onIB-ikRJ-M

Please leave your reviews here soon. The implementation is nearly complete.

danieljperry avatar Mar 22 '24 02:03 danieljperry

Update on this CHIP - I've removed AddPuzzleSubscriptions and AddCoinSubscriptions, since they were redundant. RequestCoinState and RequestPuzzleState both have a toggle to subscribe when you have been fully synced to the peak. And if you want to skip syncing coin states for RequestPuzzleState, you can disable both include_spent and include_unspent in the CoinStateFilter object.

So to simplify the protocol and reduce confusion, I've removed the subscribe-only messages. I have also added a reason to RejectCoinState and RejectPuzzleState, to where they will now reject the request if you exceed the subscription limit, in addition to when a reorg occurred. This is a change in behavior from before, where reaching the limit would be silently ignored.

The coin_ids and puzzle_hashes fields in the response of the request state messages will now only indicate which coin ids or puzzle hashes were actually processed and included in a query. Any request items which were not in the response should be requested separately. This allows implementors of the protocol to set their own limits, (hopefully) without breaking wallets that use the protocol.

Lastly, the mempool event (TransactionAdded and TransactionRemoved) functionality will not be in the initial implementation PR for this CHIP.

Rigidity avatar Mar 27 '24 19:03 Rigidity

This CHIP is now in Review. Most of the implementation is complete and ready to be merged. Please leave your reviews here.

danieljperry avatar Jun 04 '24 06:06 danieljperry

This CHIP is now in Last Call. If no changes are required after two weeks, it will be moved to Final.

danieljperry avatar Jun 20 '24 14:06 danieljperry

This CHIP is now Final. No further changes are allowed (other than adding errata).

danieljperry avatar Jul 05 '24 13:07 danieljperry