Reduce the constant private logs length #12773
Labels
A-privacy-leakage
Area: Relates to privacy leakage.
C-protocol-circuits
Component: Protocol circuits (kernel & rollup)
team-turing
Leila's team
The only thing seemingly requiring the current number of fields (it's something like 16 or 18) is our own "contract instance deployment" contract, where data about the contract instance (something like 16 fields) is broadcast. We can still make a private log be 8 fields, and then simply split that 16-field log into two 8-field private logs.
Why 8 fields?
We should validate that this is an acceptable number, but 16 is too high, since all example contracts use far fewer fields per log, so users would be burning blob money on padding.
TODO: How much money per Field? How much money per tx? How much money per block? (Range of estimates, depending on blob gas market).
A basic token note, which uses AES might contain this data:
That's 7 Fields + 1 bit + 2 * 16 bytes. Hmmm... ok so 8 fields might not be enough.
Non-token use cases might not need those extra two fields.
Also note: Other encryption schemes use more data than AES:
Of course, alt encryption schemes can always break their logs into chunks (albeit a faff), but poseidon2 encryption will be common (I've already seen it a few times in the wild, on Aztec).
Ignoring the post-quantum bullet (to simplify the conversation), there's a hint that 8 fields isn't actually enough, and perhaps 16 fields is actually more attractive. I'm mentally being "sticky" against powers of 2. We could also choose a length between 8 and 16.
It could be that an outcome of this rambling issue is that 16 is actually a good length after all. Or maybe 12 is the best number. We need an upper bound that's a good balance between reducing costs for common use cases, and flexibility. We can also always socially introduce a few log length privacy sets (as a social experiment): 8, 12, and 16, and therefore leave the max "private log" length untouched at 16.
cc @LeilaWang @nventuro
The text was updated successfully, but these errors were encountered: