Skip to content

[sql-24] firewalldb: thread contexts through for privacy mapper interfaces #1002

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

Merged
merged 7 commits into from
Mar 27, 2025

Conversation

ellemouton
Copy link
Member

@ellemouton ellemouton commented Mar 11, 2025

Here we do a a few things:

  1. thread contexts through for privacy mapper interfaces
  2. use the new DBExecutor to init the PrivacyMapDB
  3. Unify the kv store and privacy map implementations of DBExecutor to a single bbolt backed one. Later on we will add a sql backed one

@ellemouton ellemouton self-assigned this Mar 11, 2025
@ellemouton ellemouton force-pushed the sql24 branch 6 times, most recently from 4b0986c to 8239e03 Compare March 13, 2025 21:50
@ellemouton ellemouton added the no-changelog This PR is does not require a release notes entry label Mar 13, 2025
@ellemouton ellemouton force-pushed the sql24 branch 2 times, most recently from b60a5c6 to e4cf3f5 Compare March 24, 2025 10:48
Update the PrivacyMapDB interface methods to take contexts (both the
methods themselves and the call-back params) and then ensure all
implementations are updated and all call-sites pass contexts through
correctly.
Update the NewPair method of the PrivacyMapTx interface to take a
context.
Update the PseudoToReal method of the PrivacyMapTx interface to take a
context.
Update the RealToPseudo method of the PrivacyMapTx interface to take a
context.
Update the FetchAllPairs method of the PrivacyMapTx interface to take a
context.
In this commit, we delete the PrivacyMapDB interface definition and
instead use the generic DBExecutor interface parameterised by a
PrivacyMapTx to define the PrivacyMapDB interface.
The `kvStores` and `privacyMapDB` types have very similar looking
`Update` and `View` methods. Instead of the duplication, here we let
things be more generic by defining a generic `kvdbExecutor` which has
Update and View methods defined.
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom left a comment

Choose a reason for hiding this comment

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

Niiiice, LGTM 🚀!

Copy link
Contributor

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@ellemouton ellemouton merged commit 4cc7bf2 into lightninglabs:master Mar 27, 2025
19 of 21 checks passed
@ellemouton ellemouton deleted the sql24 branch March 27, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This PR is does not require a release notes entry sql-ize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants