Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balance overflowing in sha3_memSizeNoQuadraticCost31 #690

Closed
adria0 opened this issue May 21, 2020 · 3 comments
Closed

Balance overflowing in sha3_memSizeNoQuadraticCost31 #690

adria0 opened this issue May 21, 2020 · 3 comments

Comments

@adria0
Copy link

adria0 commented May 21, 2020

In the https://github.com/ethereum/tests/blob/v7.0.0/BlockchainTests/ValidBlocks/VMTests/vmSha3Test/sha3_memSizeNoQuadraticCost31.json test

the initial balance is

"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",

and after sending 0x7c, the final balance is

Is this the expected way to manage overflows? I think that will have more sense to do saturating overflow or just reject the tx.

(since is filled by geth, cc/@karalabe)

@karalabe
Copy link
Member

Weeell, I think that's undefined behavior which we should not test. A gazillion things can go wrong all over the place if balances start overflowing, something which cannot ever happen in a live network. It would be a pointless can of worms to start speccing what clients should do in these cases.

@adria0
Copy link
Author

adria0 commented May 28, 2020

related #688

@winsvega
Copy link
Collaborator

winsvega commented Jun 5, 2020

Fixed
#695

@winsvega winsvega closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants