I noticed the following peculiarity:
CALL opcode
vm trace step: 1122
execution step: 1122
add memory:
gas: 3859834
remaining gas: 3921090
loaded address: 0xa7913fc3e4dbf3d8caca06e1c2da85ed838e150f
0: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
1: 0x6
2: 0x
3: 0x800
4: 0x80
5: 0x7c0
6: 0x40
7: 0x
8: 0x800
9: 0x7c0
10: 0x780
11: 0x300
12: 0x891
It used 3.8 Million gas, in a single call? You can see the call was to 0x6, which is a precompile. However, it should cost a flat-rate 500 gas. I believe it's draining the gas because the arguments I gave didn't lie on the curve, by why wouldn't it simply return false? Or if the precompile doesn't like it, simply revert the transaction. I'm calling it like so:
if iszero(call(not(0), 0x06, 0, input, 0x80, ret, 0x40)) {
failed := 1
}
I expect it to simply return false and set the "failed" variable, still using 500 gas. If my assumption is incorrect, I expected it to revert. Is there documentation for the 3.8 Million gas that it's consuming?