#what are the use cases for ephemeral storage?

7 messages · Page 1 of 1 (latest)

icy birch
#

Seems like this is heavily focuses token allowances*. Is there anything else? EIP1153** (similar proposal in ethereum) suggests that this mechanism can also be useful to prevent re-entrance attacks, though those are not possible in soroban right now. EIP1153 is pretty controversial and hasn't landed in ethereum yet.

Given the plethora of storage options due to state expiration (and soon metadata) is it really worth the potential confusion?

* https://github.com/stellar/rs-soroban-env/pull/732#issuecomment-1479975510
** https://eips.ethereum.org/EIPS/eip-1153

GitHub

What
Temporary storage is basically a contract-owned map that isn't persisted in the ledger, but may be used to share values between multiple contract calls within the same top-level invocation...

full ice
#

well, temp allowances are a pretty good case

#

reentrance is not something we support as of now, but that would improve the potential support

#

basically this is useful for any sort contract state tracking. are there many cases for that now? not sure, allowance is just the most obvious one. is it possible to come up with the new cases? I think yes. I think this generally enables some interesting cross-contract interaction patterns without flooding the ledger with throw-away entries and providing a very specific guarantees.

#

from the confusion standpoint, we might converge the external interface to a single temp-storage getter that allows specifying the entry lifetime and defers to this set of host fns when the lifetime is 0

icy birch
#

temp allowances are a pretty good case
Given that (1) auth next approvals cover most simple allowance use cases and (2) temp allowances don't allow for long lasting approvals such as subscriptions, it seems like we're adding an entire storage option for a pretty narrow use case

gusty iris
#

Is there a document proposing and discussing ephemeral storage, problem it solves, solutions we considered?