Daohub-io/cap9

Procedure#Call Syscall Update

Latrasis opened this issue · 5 comments

Following #118 and #119 we need to update the Procedure#Call Syscall to #113. This includes:

  • Updating Tests including BeakerContract.sol
  • Updating #_callSystemCall

I'll tackle this one next seeing as I just did Account Call. There shouldn't be much to change here.

Is there a reason that the line:

  function proc_call(uint8 capIndex, bytes32 procId, string fselector, uint32[] input) internal returns (uint32 err, bytes memory output) {

...uses uint32[] as the input buffer? In our specification we specify the input buffer as bytes, because that's what the EVM uses. There might be an argument to use uint256[] (32-byte words) because I think Solidity will always be 32-byte aligned.

I've used 1-byte words for acc-call currently. If there's no particular reason for 4-byte words, I think we should go with 1-byte or 32-byte words.

Is there a reason that the line:

  function proc_call(uint8 capIndex, bytes32 procId, string fselector, uint32[] input) internal returns (uint32 err, bytes memory output) {

...uses uint32[] as the input buffer? In our specification we specify the input buffer as bytes, because that's what the EVM uses. There might be an argument to use uint256[] (32-byte words) because I think Solidity will always be 32-byte aligned.

Yep that's a regression, I don't remember the reason. I agree that bytes should be used. Especially since users will be likely using abi#encode/abi#decode with this.

This is being addressed in #127.

Closing with #127