add comments about disabled EIPs

This commit is contained in:
jangko 2021-01-11 15:33:30 +07:00
parent 01dec1d359
commit f906d177f4
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
5 changed files with 24 additions and 7 deletions

View File

@ -783,7 +783,7 @@ template genCall(callName: untyped, opCode: Op): untyped =
c_memLength: memLength
))
# EIP 2046
# EIP 2046: temporary disabled
# reduce gas fee for precompiles
# from 700 to 40
#when opCode == StaticCall:

View File

@ -228,6 +228,7 @@ proc modExpFee(c: Computation, baseLen, expLen, modLen: Uint256, fork: Fork): Ga
max(adjExpLen, 1.u256)
) div divisor
# EIP2565: temporary disabled
#let gasFee = if fork >= FkBerlin: gasCalc(mulComplexityEIP2565, GasQuadDivisorEIP2565)
#else: gasCalc(mulComplexity, GasQuadDivisor)
@ -237,6 +238,8 @@ proc modExpFee(c: Computation, baseLen, expLen, modLen: Uint256, fork: Fork): Ga
raise newException(OutOfGas, "modExp gas overflow")
result = gasFee.truncate(GasInt)
# EIP2565: temporary disabled
#if fork >= FkBerlin and result < 200.GasInt:
# result = 200.GasInt

View File

@ -87,6 +87,14 @@ func slowGSTTests(folder: string, name: string): bool =
# Istanbul slow tests
"CALLBlake2f_MaxRounds.json",
# Berlin slow tests,
"static_LoopCallsDepthThenRevert.json",
"static_LoopCallsDepthThenRevert2.json",
"static_LoopCallsDepthThenRevert3.json",
"static_log_Caller.json",
"static_log1_MaxTopic.json",
"static_log1_logMemStartTooHigh.json"
]
func skipGSTTests*(folder: string, name: string): bool =
@ -125,7 +133,7 @@ func skipBCTests*(folder: string, name: string): bool =
]
func skipNewBCTests*(folder: string, name: string): bool =
if folder == "vmPerformance":
if folder == "vmPerformance" or folder == "stStaticCall":
return true
# the new BC tests also contains these slow tests
@ -136,5 +144,11 @@ func skipNewBCTests*(folder: string, name: string): bool =
name in @[
# BC huge memory consumption
"randomStatetest94.json",
"DelegateCallSpam.json"
"DelegateCallSpam.json",
"InternalCallHittingGasLimit.json"
]
func skipPrecompilesTests*(folder: string, name: string): bool =
# EIP2565: temporary disabled
name == "modexp_eip2565.json"

View File

@ -764,8 +764,8 @@ proc blockchainJsonMain*(debugMode = false) =
if paramCount() == 0 or not debugMode:
# run all test fixtures
suite "block chain json tests":
jsonTest(legacyFolder, "BlockchainTests", testFixture, skipBCTests)
#suite "block chain json tests":
#jsonTest(legacyFolder, "BlockchainTests", testFixture, skipBCTests)
suite "new block chain json tests":
jsonTest(newFolder, "newBlockchainTests", testFixture, skipNewBCTests)
else:

View File

@ -9,7 +9,7 @@ import
unittest2, ../nimbus/vm/precompiles, json, stew/byteutils, test_helpers, os, tables,
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/db_chain,
../nimbus/[vm_types, vm_state], ../nimbus/vm/computation, macros,
../nimbus/vm/interpreter/vm_forks
../nimbus/vm/interpreter/vm_forks, test_allowed_to_fail
proc initAddress(i: byte): EthAddress = result[19] = i
@ -73,7 +73,7 @@ proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus) =
of "sha256" : data.doTest(fork, paSha256)
of "ripemd" : data.doTest(fork, paRipeMd160)
of "identity" : data.doTest(fork, paIdentity)
#of "modexp" : data.doTest(fork, paModExp)
of "modexp" : data.doTest(fork, paModExp)
of "bn256add" : data.doTest(fork, paEcAdd)
of "bn256mul" : data.doTest(fork, paEcMul)
of "ecpairing": data.doTest(fork, paPairing)