cap9
cap9 copied to clipboard
Syscall Batching
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?