Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soroban-simulation refactoring followups #96

Open
dmkozh opened this issue Mar 5, 2024 · 0 comments
Open

soroban-simulation refactoring followups #96

dmkozh opened this issue Mar 5, 2024 · 0 comments

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Mar 5, 2024

This is a list of suggested followups enabled by the soroban-simulation changes (#92). None of these are critical to be implemented, this is just a dump of potential possibilities to consider:

  • Return contract_events separately from diagnostic_events. Contract events are hashed into ledger and thus can be used for off-chain applications, while diagnostic events are intended for the contract and dapp developers and are not standardized and might change with time. With the clear distinction it's easier for the users to distinguish between the two, e.g. wallets could use this to tell with confidence which transfers have happened during simulation without the risk of reporting a diagnostic event that imitates a transfer.
  • Return simulated_instructions/memory in respectively named fields (with the respective documentation). These will always be populated, even in case of the failure, which could help contract developers to debug their contracts. There is also an option to explicitly return the adjusted instructions as a separate field for the ease of access)
  • Return modified_entries in the response (optionally?). These represent the states of all the writeable entries before and after the host invocation. This is important for wallets to be able to present the transaction effects to the user, but also may be a generally useful debugging tool for contract developers.
  • Provide configuration mechanism for Soroban RPC to configure the default simulation adjustments without recompilation. The adjustments can then be passed directly to soroban-simulation.
  • Expose the simulation adjustments to the users via request parameters
  • Pass lists of keys in ExtendTtl/Restore ops instead of operation body XDR - this reduces the risk of providing a bad simulation request as currently the user has to be aware that RO footprint is used for TTL extension and RW footprint is used for restoration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant