cadence icon indicating copy to clipboard operation
cadence copied to clipboard

Account Storage Hash

Open bluesign opened this issue 3 years ago • 0 comments

Issue To Be Solved

It would be nice to have one of the options below in cadence for an AuthAccount / PublicAccount.

  • Storage hash ( which is the hash of total content stored )
  • Storage delta, after a transaction or script

Lately I have been thinking and discussing with people how to make more secure transactions, usual bottleneck is to detect storage changes. ( without parsing all storage )

Hash can be useful :

  • if I can run the transaction as script first, then check events ( if scripts can support events ) and when I am sure for the events, check storage hash. Then run this transaction again as a transaction while expecting post condition hash = expectedHash

Delta would be useful:

  • With this we could avoid script execution, transaction would declare expected storage changes, and post condition would list all deltas.

Anyway I am curious about your opinions.

bluesign avatar Jul 01 '22 18:07 bluesign