Post
Topic
Board Announcements (Altcoins)
Re: NXT :: descendant of Bitcoin - Updated Information
by
ChuckOne
on 09/02/2014, 23:57:51 UTC
if you're asking if negative input is legal, yes it is.

To simplify it, it's similar to how modulo operates in C.
If you do:
Code:
int x = (1-3) % 5;    // -2 % 5

you'll get "-2" as a result, but what you're actually interested in is:
Code:
int x = (1-3 + group_order) % 5;    // (-2 + 5) % 5  = 3 % 5 == 5

group_order == 5, and you'll get 3 as a result...

Yes, I know.

So, the problem is that -2 or 3 is processed further and we are not certain if -2 behaves differently than 3 does. That is certainly a problem.

EDIT: we are not certain if the 3 resulting from a -2 is process the same way as we would give it another try.

"-2" is passed as input to verify() which was expecting to see "3" not "-2"...


But it is not sure, if -2 in form as a 3 would result in the same outcome as it would be a 'real' 3 from the beginning.