FVM M2.2: Replace the Constructor method with a wasm-level "constructor" entrypoint #500
Stebalien
started this conversation in
Enhancements - Technical
Replies: 1 comment
-
Ack, no objections from me to this basic idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For some background, Filecoin "sends a message" to an actor (i.e., "calls" an FVM actor) by calling a single wasm-level
invoke
function. Thisinvoke
function internally dispatches on the method number.When a user constructs a new actor:
Exec
method on the init actor.Constructor
method (method 1) using the normal calling convention. Internally, this will call theinvoke
function on the actor's wasm module.However, this has two significant drawbacks:
I'd like to propose an alternative: introduce a new wasm-level function called
constructor
. In this new world:Exec
method on the init actor.constructor
function on the actor's WASM module, exporting the user's actor from step 1 as the "caller".Alternatives
An alternative is to:
Beta Was this translation helpful? Give feedback.
All reactions