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

Draft design for lightwalletd database support #3137

Merged
merged 8 commits into from
Dec 22, 2021
Merged

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Dec 3, 2021

Motivation

To support lightwalletd, Zebra needs to:

  • add a transparent output address index, and
  • make accessing individual transactions more efficient.

This design change helps us estimate those changes, and open tickets.

This is unexpected work in Sprint 24.

Specifications

List of lightwalletd RPC methods:

Impacted RPCs:

Solution

  • Split transaction data from block data in the on-disk database
  • Add transparent address indexes to the on-disk database
  • Support transparent address balances and address UTXOs
  • Make keys smaller, and make them use chain order, to improve database performance

Review

Anyone can review this database design change.

Reviewer Checklist

  • Design makes sense
  • RPCs could be implemented efficiently using this design

Follow Up Work

  • open tickets for each change in this design

@teor2345 teor2345 added A-docs Area: Documentation C-design Category: Software design work P-Medium labels Dec 3, 2021
@teor2345 teor2345 added this to the 2021 Sprint 24 milestone Dec 3, 2021
@teor2345 teor2345 self-assigned this Dec 3, 2021
@teor2345 teor2345 force-pushed the lightwallet-db-changes branch from 8ac42ff to d8851b2 Compare December 3, 2021 06:10
@teor2345 teor2345 changed the base branch from main to update-state-rfc December 3, 2021 06:15
@teor2345 teor2345 mentioned this pull request Dec 3, 2021
33 tasks
@teor2345 teor2345 force-pushed the lightwallet-db-changes branch 3 times, most recently from 64d13b6 to 04b525d Compare December 6, 2021 03:56
@teor2345 teor2345 force-pushed the lightwallet-db-changes branch from 04b525d to 67c2f83 Compare December 9, 2021 23:26
@teor2345 teor2345 added P-Low and removed P-Medium labels Dec 9, 2021
Base automatically changed from update-state-rfc to main December 10, 2021 13:35
@teor2345 teor2345 marked this pull request as ready for review December 13, 2021 21:38
@teor2345 teor2345 force-pushed the lightwallet-db-changes branch from 67c2f83 to 7aedc1e Compare December 13, 2021 22:53
@teor2345 teor2345 requested review from jvff and conradoplg December 13, 2021 22:54
@teor2345 teor2345 requested a review from dconnolly December 16, 2021 06:01
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dconnolly dconnolly enabled auto-merge (squash) December 22, 2021 01:46
@codecov
Copy link

codecov bot commented Dec 22, 2021

Codecov Report

Merging #3137 (a6b3ef1) into main (31b083f) will increase coverage by 0.73%.
The diff coverage is n/a.

❗ Current head a6b3ef1 differs from pull request most recent head 2d8cac2. Consider uploading reports for the commit 2d8cac2 to get more accurate results

@@            Coverage Diff             @@
##             main    #3137      +/-   ##
==========================================
+ Coverage   77.03%   77.77%   +0.73%     
==========================================
  Files         265      264       -1     
  Lines       31267    31013     -254     
==========================================
+ Hits        24088    24121      +33     
+ Misses       7179     6892     -287     

@dconnolly dconnolly merged commit 3611250 into main Dec 22, 2021
@dconnolly dconnolly deleted the lightwallet-db-changes branch December 22, 2021 06:09
@ftm1000 ftm1000 added the lightwalletd any work associated with lightwalletd label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation C-design Category: Software design work lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants