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

[Feature Request] Move signature enforcement for script functions from VM -> adapter(s) #76

Open
sblackshear opened this issue Feb 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sblackshear
Copy link
Contributor

Currently, public(script) visibility is the only way to declare an entrypoint in Move. The VM/verifier enforce two things about such functions:

  1. They can only be called by other public(script) functions
  2. There are restrictions on the structure of the function signature described here

This feature suggestion proposes to keep (1) and drop (2). The reason is that every adapter has the concept of “entrypoint” and benefits from the enforcement of (1), but the restrictions in (2) are specific to Diem-like adapters. Thus, it makes sense to move those checks there–let each adapter decide what sorts of entrypoints are valid for its clients.

This is actually eliminating a feature that limits the design space of adapters, not adding a new one. All we need to do is gate the relevant code in the verifier and source language by the relevant bytecode version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant