- 
                Notifications
    You must be signed in to change notification settings 
- Fork 109
rules+session_rpc: use existing privacy mapper for obfuscating rules of linked sessions #637
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
rules+session_rpc: use existing privacy mapper for obfuscating rules of linked sessions #637
Conversation
7f5c99a    to
    9bd69b6      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥 🚀 ! Great find and fix to both of you :)! Leaving only a small comment regarding the unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes 🍀! LGTM
44a2ab9    to
    be65af1      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I like that new approach 👍🚀, will still test a bit.
be65af1    to
    9d1cf4e      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tACK 🎉 nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New fixes looks good 🚀 !
Leaving some suggestions for the PrivacyMapPairs.Add that's non-blocking,  and one small issue that I think should be fixed.
Amazed at the speed you're implementing these fixes @ellemouton, it's incredibly impressive 😃!!
This commit adds a new FetchAllPairs to the PrivacyMapTx interface. This method returns a new PrivacyMapPairs struct which is an in-memory privacy map DB. The PrivacyMapPairs struct implements a new PrivacyMapReader interface which can be used to pass around read only access to the PrivacyMapPairs struct.
This commit expands the RealToPseudo methods to take in a privacy map db reader. This allows the methods to check if the privacy map db already contains an entry for a "real" string before generating a new one. For now, only an empty PrivacyMapReader is ever provided to the RealToPseudo call. This will be changed in the following commit.
In this commit, we keep track of all known privacy map pairs for a session along with any new pairs to be persisted.
9d1cf4e    to
    7bb4d3b      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! LGTM 🚀:fire::rocket:!!
In this PR, we ensure that if we are linking a session to a previous one, that we extract any existing real-to-pseudo pairs from the privacy map DB instead of generating new ones.