namada icon indicating copy to clipboard operation
namada copied to clipboard

Disposable accounts storage keys

Open grarco opened this issue 10 months ago • 0 comments

Currently, when unshielding to a disposable account, the operation ends up writing a balance of 0 in storage (which in turn ends up being diffed and merklized). Since these addresses shouldn't really be reused it would be slightly better to not write anything in storage (the default is 0 anyway).

We could think about doing this with a custom check in the unshielding operation to decide if anything should be written, even though this might not be that simple since a disposable account is indistinguishable from a normal one and would probably require us to examine its subspace.

An alternative could be to not unshield but just consume the spend notes and leave the amount in the masp balance from which we could then move it to the block proposer. This would require a change in the masp vp logic to allow this kind of operation which at the moment is forbidden.

In any case, this should be evaluated together with #2597 and #1677.

grarco avatar Apr 10 '24 17:04 grarco