cap9 icon indicating copy to clipboard operation
cap9 copied to clipboard

Syscall Batching

Open Latrasis opened this issue 5 years ago • 0 comments

At the current moment, each syscall costs an additional DELEGATECALL. Such that if we where to write to n storage keys, we would have to make a DELEGATECALL for each one. One way to reduce these costs would be to introduce batching.

Type of Batching:

There are three types of batching we would have to choose from:

  • Batch by Capability Index where:
    • You can only batch syscalls that use the same cap and thus are the same type.
    • On error, the kernel reverts. On input, the kernel returns input indexed by order.
  • Batch by Capability Type:
    • You can only batch syscalls that use caps with the same type.
    • On error, the kernel reverts. On input, the kernel returns input indexed by order.
  • Batch by any Capability:
    • You can batch syscalls that use any caps.
    • On error, the kernel reverts. On input, the kernel returns input indexed by order.

Issues:

  • Should we allow all syscalls to be batch-able?
  • How do we do error handling?
  • This may introduce a potential gas-limit attack in kernel-space.
  • Can we introduce such a feature with the least amount of additional complexity?

Latrasis avatar Mar 26 '19 02:03 Latrasis