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

External function calls, what to do? #9

Open
ehildenb opened this issue Aug 23, 2019 · 1 comment
Open

External function calls, what to do? #9

ehildenb opened this issue Aug 23, 2019 · 1 comment

Comments

@ehildenb
Copy link
Member

ehildenb commented Aug 23, 2019

Right now the set_free_balance calls these external functions:

  • $ext_blake2_256
  • $ext_clear_storage
  • $ext_set_storage
  • $ext_twox_128

We have two options for dealing with this:

  • Make abstract "loose" K specs of these functions behavior, in terms of the expected overall change in the state. Works well for functions which take input and give back some well-structured output (eg. $ext_blake2_256). Specs are "loose" because we cannot verify them over the existing code. Might not work in all cases.
  • Compile said functions to Wasm and actually try to build a specification for them. Depending on their size, this can be very time consuming.

Either way, it might be helpful to have the Wasm implementations of these functions available. But if in reality people use the non-Wasm implementations, this doesn't add any security to have specifications of these functions.

@Demi-Marie
Copy link
Contributor

@ehildenb I think the first approach is better, at least in this case. The second approach will not be practical, as it would involve verifying all of RocksDB. I would love to do that, but that is far beyond the scope of this project.

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

2 participants