Open fulldecent opened 4 years ago
This is a restriction imposed by AVM, specifically: https://github.com/aionnetwork/AVM/blob/764e6195d6131d539eb46333d830d3a1f81edd2f/org.aion.avm.rt/src/s/java/math/BigInteger.java#L392
In standard Java, these are unbounded, but the limit is imposed by the AVM to constrain the effort expended for constant cost.
Ah, so the Aion BigInteger implementation shadows java.math.BigInteger
.
What is the primary documentation I should cite for that?
Can I get a BigInteger.MAX_VALUE
and BigInteger.MIN_VALUE
?
Is BigInteger.MAX_VALUE.add(BigInteger.ONE)
undefined? Is that documented?
Right now AIP-040 was expecting BigInteger.MAX_VALUE == 2^256
but that is not the case.
This is where I checked for documentation
https://github.com/aionnetwork/AVM/blob/master/org.aion.avm.userlib/src/org/aion/avm/userlib/AionBuffer.java#L388
Because BigIntegers are possible to get to this point which are large.
It also says
If this is true I'm wrong, please reference proof for that statement