Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: Update lightwalletd RPCs for "spend before sync" algorithm #6642

Closed
33 of 38 tasks
teor2345 opened this issue May 9, 2023 · 10 comments
Closed
33 of 38 tasks

Tracking: Update lightwalletd RPCs for "spend before sync" algorithm #6642

teor2345 opened this issue May 9, 2023 · 10 comments
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-concurrency Area: Async code, needs extra work to make it work properly. A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes C-feature Category: New features C-tracking-issue Category: This is a tracking issue for other tasks S-needs-design Status: Needs a design decision S-needs-triage Status: A bug report needs triage

Comments

@teor2345
Copy link
Collaborator

teor2345 commented May 9, 2023

Motivation

The zcashd and lightwalletd teams have been working on a "spend before sync" algorithm, targeted for zcashd 5.6.0 in June 2023.

As part of that change, the JSON-RPC interface used by lightwalletd will need extra methods or fields.

Preparation:

completed preparation

Zebra will need to implement some of those changes to remain compatible with the latest lightwalletd versions:

Extra Dependencies & Tests:

completed

Lower Priority

Minor bug or test fixes:

completed performance & documentation

To get reasonable lookup performance:

Documentation:

Optional Cleanups & Fixes:

these tickets are optional, ask Pili before starting them

Bug fixes:

Technical debt:

Diagnostics:

Needs decision/triage:

Timing

zcashd aims to finalize the RPC design by the end of May, and then release it in the first two weeks of June.

lightwalletd will start calling the new RPCs around the same time, but they aim to be compatible with old RPC versions using an off-by-default flag.

Implementation Notes

Zebra already stores the data we need for these lookups. We might need extra indexes for good performance, but that's not a breaking state change. (So we don't need to upgrade the state version, we can just automatically add/update a new column family with the new index at startup.)

We will need to implement #4784 to have acceptable note commitment tree scanning performance.

@teor2345 teor2345 added S-needs-design Status: Needs a design decision S-needs-triage Status: A bug report needs triage P-Medium ⚡ A-rpc Area: Remote Procedure Call interfaces C-feature Category: New features A-concurrency Area: Async code, needs extra work to make it work properly. A-compatibility Area: Compatibility with other nodes or wallets, or standard rules labels May 9, 2023
@mpguerra
Copy link
Contributor

@teor2345
Copy link
Collaborator Author

@mpguerra I can't estimate this ticket until the zcashd team has decided what the changes to the RPCs will be.

@teor2345 teor2345 added the A-state Area: State / database changes label May 17, 2023
@teor2345 teor2345 changed the title Update lightwalletd RPCs for faster sync algorithm Update lightwalletd RPCs for "fast spend ability" algorithm May 17, 2023
@teor2345 teor2345 changed the title Update lightwalletd RPCs for "fast spend ability" algorithm Update lightwalletd RPCs for "fast spendability" algorithm May 17, 2023
@str4d
Copy link
Contributor

str4d commented May 19, 2023

The current draft of the JSON-RPC changes is here (last few commits, the PR is currently based on another one and will be rebased as the backend changes are landed): zcash/zcash#6677.

@teor2345 teor2345 self-assigned this May 22, 2023
@teor2345
Copy link
Collaborator Author

I've added a draft list of RPC changes to the ticket, just trying to work out how to calculate subtree roots:
https://discord.com/channels/809218587167293450/809251012610752513/1110391483367960646

@teor2345
Copy link
Collaborator Author

teor2345 commented Jun 5, 2023

Note from the engineering sync: This seems risky to do between the last release candidate and the first stable release. There is no specific deadline for this change.

@teor2345
Copy link
Collaborator Author

@mpguerra I'd like to talk through the design for this change with the engineers who will be working on it. We need to work out the tree API changes, and the database format changes.

Did you want to have a large group meeting? Or we could do it in two smaller groups: tree APIs and database format.

@teor2345
Copy link
Collaborator Author

Also I just split this task into tickets, can we schedule them in this sprint or next sprint?
I haven't set up the dependencies yet, but they are in the right order in the list in the PR.

@mpguerra mpguerra changed the title Update lightwalletd RPCs for "fast spendability" algorithm Tracking: Update lightwalletd RPCs for "fast spendability" algorithm Jun 15, 2023
@mpguerra
Copy link
Contributor

Unscheduling as this will be the overall "tracking" issue and we'll schedule individual issues in sprints instead

@mpguerra
Copy link
Contributor

@mpguerra I'd like to talk through the design for this change with the engineers who will be working on it. We need to work out the tree API changes, and the database format changes.

Did you want to have a large group meeting? Or we could do it in two smaller groups: tree APIs and database format.

I think it's probably best to have smaller group meetings and involve only the people that will need to be involved

@teor2345 teor2345 removed their assignment Jul 11, 2023
@teor2345 teor2345 changed the title Tracking: Update lightwalletd RPCs for "fast spendability" algorithm Tracking: Update lightwalletd RPCs for "spend before sync" algorithm Jul 13, 2023
@mpguerra mpguerra added the C-tracking-issue Category: This is a tracking issue for other tasks label Oct 26, 2023
@mpguerra
Copy link
Contributor

We are done here for now 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-concurrency Area: Async code, needs extra work to make it work properly. A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes C-feature Category: New features C-tracking-issue Category: This is a tracking issue for other tasks S-needs-design Status: Needs a design decision S-needs-triage Status: A bug report needs triage
Projects
Archived in project
Development

No branches or pull requests

3 participants