-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
Milestone
Description
Currently, we charge a flat "syscall" gas on every syscall here:
ref-fvm/fvm/src/syscalls/bind.rs
Line 127 in 9c35c30
charge_syscall_gas!(data.kernel); |
However, we should be charging this gas before making the syscall to avoid letting an attacker perform an operation where it can't quite cover the gas.
Right now, it's not really an issue because we can only run into this situation once per message. However, with gas limits on internal sends (#966), it may be possible to trigger this multiple times.
Of course, it's not a huge issue because an attacker could only do this once per send, but it's still something we should look into.