gear
gear copied to clipboard
Deterministic responses
Problem to Solve
@NikVolf suggested:
Program in the state A responded with a payload C to a message B. Then we may not execute the program to obtain the response to the message B next time but just provide the payload C iff the program keeps its state A.
Possible Solution
add some circular buffer (program_memory_hash, message_payload_hash)
for several predefined responses
calculate hash of the message on its creation
calculate/reset memory hash after program execution
Notes
As an example get_balance
method for some NFT program could be provided