core/vm: implement EIP-2681: Limit account nonce to 2^64-1 (#23853)

This retroactively implements requirements or EIP-2681 for the account nonce upper limit.
This commit is contained in:
Andrei Maiboroda
2021-11-11 15:00:58 +01:00
committed by GitHub
parent e185a8c818
commit f32feeb260
6 changed files with 39 additions and 13 deletions

View File

@ -154,6 +154,8 @@ func Transaction(ctx *cli.Context) error {
}
// Validate <256bit fields
switch {
case tx.Nonce()+1 < tx.Nonce():
r.Error = errors.New("nonce exceeds 2^64-1")
case tx.Value().BitLen() > 256:
r.Error = errors.New("value exceeds 256 bits")
case tx.GasPrice().BitLen() > 256: