-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Epic] channeldb+invoices: create native SQL schema for invoice storage #6288
Comments
3 tasks
Open
Started to look into the first two points as of assignment to #6954. |
saubyk
assigned positiveblue, sputn1ck and bitromortac and unassigned sputn1ck and yyforyongyu
Oct 25, 2022
This was referenced Jan 24, 2023
saubyk
changed the title
channeldb+invoices: create native SQL schema for invoice storage
[Epic] channeldb+invoices: create native SQL schema for invoice storage
May 8, 2023
2 tasks
This was referenced Oct 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We recently added postgres support, but in a way that just maps things to a naive key-value table. In order to take advantage of increased queryability, and scalability gains, we should convert the invoices (which can be heavily loaded on large nodes that help to operate services) to a native SQL schema. Along the way, we'll want to abstract away the invoice registry's storage behind an interface, so this new data format can be swapped in at runtime, or during initial configuration of the daemon.
Steps to Completion
DatabaseInstances
. This'll allow projects that "wrap" lnd to pass in their own custom implementations, which may use a different DB backend all together. #6954sqlc
look interesting here as it lets you mainly write SQL in a single file, and have the CRUD code be generated. We use this in some backend products at Lightning Labs now.sqlc
doesn't support sqlite fully (though I think if you don't use any sqlite specific features it works), we could look into using other ORMs.Related to:
* [WIP] sqldb: InvoiceDB interface implementation #7357InvoiceDB
implementation #8052The text was updated successfully, but these errors were encountered: