design icon indicating copy to clipboard operation
design copied to clipboard

EEI: Specify signness

Open chfast opened this issue 7 years ago • 7 comments

Resolves #132.

chfast avatar Aug 21 '18 12:08 chfast

Can you split this into two PRs? One codifies what is happening in Hera right now, the other one changes to signed types.

axic avatar Aug 22 '18 04:08 axic

Looks like a lot of unnecessary work.

chfast avatar Aug 22 '18 09:08 chfast

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,

axic avatar Sep 19 '18 10:09 axic

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?

axic avatar Oct 18 '18 12:10 axic

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.

poemm avatar Oct 18 '18 16:10 poemm

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.

axic avatar Oct 18 '18 23:10 axic

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.

gballet avatar Oct 21 '18 09:10 gballet