8000 [Feature Request] Move signature enforcement for script functions from VM -> adapter(s) · Issue #76 · diem/move · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Feature Request] Move signature enforcement for script functions from VM -> adapter(s) #76
Open
@sblackshear

Description

@sblackshear

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0