fix rangeToPadded, GST +5

This commit is contained in:
andri lim 2019-04-25 16:50:05 +07:00
parent fd7c447f18
commit 3ccd1b1ee9
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 14 additions and 18 deletions

View File

@ -774,24 +774,24 @@ OK: 24/24 Fail: 0/24 Skip: 0/24
+ modexp_1_1_1_25000.json OK
+ modexp_1_1_1_35000.json OK
+ modexp_37120_22411_22000.json OK
modexp_37120_37111_0_1000000.json Skip
+ modexp_37120_37111_0_1000000.json OK
+ modexp_37120_37111_0_155000.json OK
+ modexp_37120_37111_0_20500.json OK
+ modexp_37120_37111_0_22000.json OK
+ modexp_37120_37111_0_25000.json OK
+ modexp_37120_37111_0_35000.json OK
modexp_37120_37111_1_1000000.json Skip
+ modexp_37120_37111_1_1000000.json OK
+ modexp_37120_37111_1_155000.json OK
+ modexp_37120_37111_1_20500.json OK
+ modexp_37120_37111_1_25000.json OK
+ modexp_37120_37111_1_35000.json OK
modexp_37120_37111_37111_1000000.json Skip
+ modexp_37120_37111_37111_1000000.json OK
+ modexp_37120_37111_37111_155000.json OK
+ modexp_37120_37111_37111_20500.json OK
+ modexp_37120_37111_37111_22000.json OK
+ modexp_37120_37111_37111_25000.json OK
+ modexp_37120_37111_37111_35000.json OK
modexp_37120_37111_97_1000000.json Skip
+ modexp_37120_37111_97_1000000.json OK
+ modexp_37120_37111_97_155000.json OK
+ modexp_37120_37111_97_20500.json OK
+ modexp_37120_37111_97_22000.json OK
@ -827,7 +827,7 @@ OK: 24/24 Fail: 0/24 Skip: 0/24
+ modexp_55190_55190_42965_22000.json OK
+ modexp_55190_55190_42965_25000.json OK
+ modexp_55190_55190_42965_35000.json OK
modexp_9_37111_37111_1000000.json Skip
+ modexp_9_37111_37111_1000000.json OK
+ modexp_9_37111_37111_155000.json OK
+ modexp_9_37111_37111_20500.json OK
+ modexp_9_37111_37111_22000.json OK
@ -835,7 +835,7 @@ OK: 24/24 Fail: 0/24 Skip: 0/24
+ modexp_9_3711_37111_25000.json OK
+ sec80.json OK
```
OK: 90/96 Fail: 0/96 Skip: 6/96
OK: 95/96 Fail: 0/96 Skip: 1/96
## stPreCompiledContracts2
```diff
+ CALLCODEEcrecover0.json OK
@ -1552,7 +1552,7 @@ OK: 19/19 Fail: 0/19 Skip: 0/19
+ call_then_call_value_fail_then_returndatasize.json OK
+ call_then_create_successful_then_returndatasize.json OK
+ create_callprecompile_returndatasize.json OK
modexp_modsize0_returndatasize.json Skip
+ modexp_modsize0_returndatasize.json OK
+ returndatacopy_0_0_following_successful_create.json OK
+ returndatacopy_afterFailing_create.json OK
+ returndatacopy_after_failing_callcode.json OK
@ -1585,7 +1585,7 @@ OK: 19/19 Fail: 0/19 Skip: 0/19
+ returndatasize_initial.json OK
+ returndatasize_initial_zero_read.json OK
```
OK: 36/37 Fail: 0/37 Skip: 1/37
OK: 37/37 Fail: 0/37 Skip: 0/37
## stRevertTest
```diff
LoopCallsDepthThenRevert.json Skip
@ -2520,4 +2520,4 @@ OK: 130/133 Fail: 0/133 Skip: 3/133
OK: 130/130 Fail: 0/130 Skip: 0/130
---TOTAL---
OK: 2217/2334 Fail: 0/2334 Skip: 117/2334
OK: 2223/2334 Fail: 0/2334 Skip: 111/2334

View File

@ -60,7 +60,7 @@ proc rangeToPadded*[T: StUint](x: openarray[byte], first, last: int): T =
## including 0-length sequences.
let lo = max(0, first)
let hi = min(x.high, last)
let hi = min(min(x.high, last), (lo+T.bits div 8)-1)
if not(lo <= hi):
return # 0

View File

@ -13,21 +13,17 @@
# being mostly used for short-term regression prevention.
func allowedFailingGeneralStateTest*(folder, name: string): bool =
let allowedFailingGeneralStateTests = @[
# a family of UInt256 truncated to int problems
"randomStatetest14.json", # SHA3 offset
"randomStatetest85.json", # CALL* memoffset
"sha3_deja.json", # SHA3 startPos
# modexp exp_len & friends truncated to int
# and not OOG where it should OOG
"modexpRandomInput.json",
"CreateOOGafterInitCodeReturndataSize.json",
"RevertInCreateInInit.json",
"modexp.json",
"modexpRandomInput.json",
"modexp_modsize0_returndatasize.json",
"modexp_9_37111_37111_1000000.json",
"modexp_37120_37111_0_1000000.json",
"modexp_37120_37111_1_1000000.json",
"modexp_37120_37111_97_1000000.json",
"modexp_37120_37111_37111_1000000.json",
"ecpairing_perturb_g2_by_field_modulus_again.json",
"ecpairing_perturb_zeropoint_by_field_modulus.json",