State-key simulation for calling a program #1117
Replies: 3 comments 4 replies
-
I don't love this because it seems so wasteful, and the HyperSDK is all about efficiency. I get that it's something we may want to do anyway, but I'm thinking that we don't want this for every single program interaction. |
Beta Was this translation helpful? Give feedback.
-
I also don't love this. I feel like it's not foolproof |
Beta Was this translation helpful? Give feedback.
-
I find this solution to be the most... interesting? We make an RPC endpoint for getting the state at any particular key, then have the client/end-user run the simulation to generate the keys. Build and sign the transaction once. We will probably want an endpoint like this anyway such that program-authors can just delegate to this endpoint instead of having to write getters themselves. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, a HyperVM requires that all state-keys are specified in advance, even if the state-keys if state-keys for the same call can change between blocks.
I see a spectrum of solutions for this
Where the
my_func_state_keys
function with the same argument signature could return the set of state-keys.There are trade-offs to each, will discuss in the comments below
Note:
Just to be clear, this is not necessarily directly related to #736. It could be affected by decisions made there, though.
Beta Was this translation helpful? Give feedback.
All reactions