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

Add create WASM module level function #1821

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sistemd
Copy link

@sistemd sistemd commented Jul 22, 2023

Addresses #746. Adds new create constructor entrypoint for actors. This allows the calling convention for constructors to change. At the moment:

  • The calling convention is the same, only a single params block ID is passed. I think that this is a good way to do it, and the consistency of passing everything as an IPLD block is valuable IMO.
  • The method ID is always set to 1 in the constructor. However, method ID 1 is no longer special, so the invoke entrypoint can use it for whatever it wants.
  • The create call is charged the same gas as if it were a send. It's treated as a call equal to invoke.
  • The caller actor ID will still be set to the init actor within the constructor. However, with the changes in this PR, this becomes trivial to change, allowing us to set it to the ID of the actor which called the init actor. This can be achieved by passing the "original caller" into the create_actor syscall in the init actor.
  • I've only ensured that the integration tests are passing. If I get an approval on the general approach, I will update the rest of the tests as well.

Related updates to the builtin actors: filecoin-project/builtin-actors#1339.

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

Successfully merging this pull request may close these issues.

None yet

1 participant