mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 12:54:13 +00:00
Was confused about ∧ in the Yellow paper. Fix #50 - pass 2 new tests. Only 1 arithmetic failure left.
This commit is contained in:
parent
90c3ca4a96
commit
8d76cab46a
10
VMTests.md
10
VMTests.md
@ -9,7 +9,7 @@ VMTests
|
||||
+ add4.json OK
|
||||
+ addmod0.json OK
|
||||
+ addmod1.json OK
|
||||
- addmod1_overflow2.json Fail
|
||||
+ addmod1_overflow2.json OK
|
||||
+ addmod1_overflow3.json OK
|
||||
+ addmod1_overflow4.json OK
|
||||
+ addmod1_overflowDiff.json OK
|
||||
@ -135,7 +135,7 @@ VMTests
|
||||
+ mulUnderFlow.json OK
|
||||
+ mulmod0.json OK
|
||||
+ mulmod1.json OK
|
||||
- mulmod1_overflow.json Fail
|
||||
+ mulmod1_overflow.json OK
|
||||
+ mulmod1_overflow2.json OK
|
||||
+ mulmod1_overflow3.json OK
|
||||
+ mulmod1_overflow4.json OK
|
||||
@ -185,9 +185,9 @@ VMTests
|
||||
+ smod2.json OK
|
||||
+ smod3.json OK
|
||||
+ smod4.json OK
|
||||
- smod5.json Fail
|
||||
+ smod5.json OK
|
||||
+ smod6.json OK
|
||||
- smod7.json Fail
|
||||
+ smod7.json OK
|
||||
+ smod8_byZero.json OK
|
||||
+ smod_i256min1.json OK
|
||||
+ smod_i256min2.json OK
|
||||
@ -198,7 +198,7 @@ VMTests
|
||||
+ sub3.json OK
|
||||
+ sub4.json OK
|
||||
```
|
||||
OK: 189/195 Fail: 5/195 Skip: 1/195
|
||||
OK: 193/195 Fail: 1/195 Skip: 1/195
|
||||
## vmBitwiseLogicOperation
|
||||
```diff
|
||||
+ and0.json OK
|
||||
|
@ -183,13 +183,13 @@ template gasCosts(FeeSchedule: GasFeeSchedule, prefix, ResultGasCostsName: untyp
|
||||
gSreset = FeeSchedule[GasSreset]
|
||||
|
||||
# Gas cost - literal translation of Yellow Paper
|
||||
result.gasCost = if value.isZero.not xor gasParams.s_isStorageEmpty:
|
||||
result.gasCost = if value.isZero.not and gasParams.s_isStorageEmpty:
|
||||
gSet
|
||||
else:
|
||||
gSreset
|
||||
|
||||
# Refund
|
||||
if value.isZero xor gasParams.s_isStorageEmpty:
|
||||
if value.isZero and not gasParams.s_isStorageEmpty:
|
||||
result.gasRefund = static(FeeSchedule[RefundSclear])
|
||||
|
||||
func `prefix gasLog0`(activeMemSize, requestedMemSize: Natural): GasInt {.nimcall.} =
|
||||
|
Loading…
x
Reference in New Issue
Block a user