design
design copied to clipboard
EEI: Specify signness
Resolves #132.
Can you split this into two PRs? One codifies what is happening in Hera right now, the other one changes to signed types.
Looks like a lot of unnecessary work.
Looks like a lot of unnecessary work.
Yeah but it would be nice to merge what's going on right now, and then we can review the proposed changes and reason about them,
Needs to be rebased.
We also need to make a decision about this and implement it in Hera.
@jakelang @poemm @gballet can you please review?
I looked through each edit. I see no reason for any of these arguments to be signed. It just adds complexity, adds checking overhead, and decreases possible address offsets, lengths, indices, and gas by a factor of approximately two.
I vote to interpret all of these arguments as unsigned integers. If a contract makes an error and uses a number which is negative in 2's complement, then they will probably quickly run out of gas.
There seems to be strong opinions on this one. @chfast can you reflect on @poemm's points?
Do you think we can make a resolution in the next few days? If not, we have to move this off "Revision 4". Would like to close "Revision 4" before Monday.
Agreed with @poemm , already had to deal with nasty sign conversion bugs in the EEI and I don't want the extra complexity. Plus, modifying the i32ptr type is going to reduce the available memory from 4G down to 2G and I'm sure that's going to impact turbo-ewasm and wasmOS in the not too distant future.