You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the EVM runtime handles calls on method_num 2 (InvokeActor). It should instead handle any method number and support a METHODNUM opcode to retrieve the method number from the Filecoin message. This would be a Filecoin-specific opcode and the upcoming Solidity library would offer a funcition that handles the assembly behind the scenes.
Doing it this way is important so that Ethereum contracts can act as proxies for native actors or built-in actors (e.g. wrapping actors and intercepting calls).
OTOH, we also need a way to specify a method number when performing a CALL. That's a separate issue, but I'll put a pin on that.
The text was updated successfully, but these errors were encountered:
The propsed approach to solve this problem, while maintaining compatibility with existing code, is to introduce two new opcodes:
CALLACTOR which takes an explicit method number and executes a call (send) with fvm call conventions.
METHODUM which is a contextual opcode that returns the method number of the current invocation entry point.
Reserved method numbers for EVM actors:
0, which is SEND.
1, which is the constructor and is only implicitly invoked during initializstion.
2, which is EVM contract invocations with EVM call conventions..
Note that it is possible to CALLACTOR into method 2, and enter the vanilla contract invocation flow.
Also note that this approach maintains full binary compatibility with existing code, as CALL and its brethren can only invoke EVM actors with EVM call conventions.
Currently the EVM runtime handles calls on method_num 2 (InvokeActor). It should instead handle any method number and support a
METHODNUM
opcode to retrieve the method number from the Filecoin message. This would be a Filecoin-specific opcode and the upcoming Solidity library would offer a funcition that handles the assembly behind the scenes.Doing it this way is important so that Ethereum contracts can act as proxies for native actors or built-in actors (e.g. wrapping actors and intercepting calls).
OTOH, we also need a way to specify a method number when performing a CALL. That's a separate issue, but I'll put a pin on that.
The text was updated successfully, but these errors were encountered: