176 lines
5.9 KiB
Nim
176 lines
5.9 KiB
Nim
# Nimbus
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
# XXX: when all but a relative few dozen, say, GeneralStateTests run, remove this,
|
|
# but for now, this enables some CI use before that to prevent regressions. In the
|
|
# separate file here because it would otherwise just distract. Could use all sorts
|
|
# of O(1) or O(log n) lookup structures, or be more careful to only initialize the
|
|
# table once, but notion's that it should shrink reasonable quickly and disappear,
|
|
# being mostly used for short-term regression prevention.
|
|
func allowedFailingGeneralStateTest*(folder, name: string): bool =
|
|
let allowedFailingGeneralStateTests = @[
|
|
"modexp.json",
|
|
|
|
"sstore_0to0.json",
|
|
"sstore_0toXto0.json",
|
|
"sstore_XtoYtoX.json",
|
|
"sstore_XtoYtoZ.json",
|
|
"sstore_0to0to0.json",
|
|
"sstore_0to0toX.json",
|
|
"sstore_XtoYtoY.json",
|
|
"sstore_XtoYto0.json",
|
|
"sstore_XtoXtoY.json",
|
|
"sstore_XtoX.json",
|
|
"sstore_Xto0toX.json",
|
|
"sstore_changeFromExternalCallInInitCode.json",
|
|
"sstore_Xto0to0.json",
|
|
"sstore_XtoY.json",
|
|
"sstore_Xto0.json",
|
|
"sstore_Xto0toY.json",
|
|
"sstore_0toXtoX.json",
|
|
"sstore_XtoXtoX.json",
|
|
"sstore_0toXto0toX.json",
|
|
"sstore_0toXtoY.json",
|
|
"sstore_XtoXto0.json",
|
|
"sstore_0toX.json",
|
|
"sstore_Xto0toXto0.json",
|
|
|
|
"Create2OOGafterInitCodeReturndataSize.json",
|
|
"call_then_create2_successful_then_returndatasize.json",
|
|
"create2SmartInitCode.json",
|
|
"Create2OnDepth1024.json",
|
|
"call_outsize_then_create2_successful_then_returndatasize.json",
|
|
"CREATE2_Bounds.json",
|
|
"CREATE2_Bounds2.json",
|
|
"Create2OOGafterInitCode.json",
|
|
"create2collisionSelfdestructed2.json",
|
|
"create2callPrecompiles.json",
|
|
"Create2OOGafterInitCodeReturndata2.json",
|
|
"create2collisionCode.json",
|
|
"create2checkFieldsInInitcode.json",
|
|
"Create2OnDepth1023.json",
|
|
"CREATE2_Suicide.json",
|
|
"CREATE2_ContractSuicideDuringInit_ThenStoreThenReturn.json",
|
|
"CreateMessageRevertedOOGInInit.json",
|
|
"Create2Recursive.json",
|
|
"create2InitCodes.json",
|
|
"create2collisionStorage.json",
|
|
"create2collisionNonce.json",
|
|
"create2collisionSelfdestructed.json",
|
|
"create2noCash.json",
|
|
"CreateMessageReverted.json",
|
|
"create2collisionBalance.json",
|
|
"create2collisionCode2.json",
|
|
|
|
"RevertOpcodeCreate.json",
|
|
"RevertInCreateInInitCreate2.json",
|
|
"RevertDepthCreateAddressCollision.json",
|
|
"RevertOpcodeInCreateReturnsCreate2.json",
|
|
"RevertDepthCreate2OOG.json",
|
|
|
|
"extCodeHashSelfInInit.json",
|
|
"extCodeHashDeletedAccount3.json",
|
|
"extCodeHashSubcallOOG.json",
|
|
"extCodeHashCreatedAndDeletedAccountCall.json",
|
|
"extCodeHashNonExistingAccount.json",
|
|
"extCodeHashPrecompiles.json",
|
|
"extCodeHashCreatedAndDeletedAccountRecheckInOuterCall.json",
|
|
"extCodeHashCreatedAndDeletedAccountStaticCall.json",
|
|
"extCodeHashDeletedAccount4.json",
|
|
"extCodeHashInInitCode.json",
|
|
"extCodeHashCreatedAndDeletedAccount.json",
|
|
"extCodeHashDynamicArgument.json",
|
|
"extCodeHashNewAccount.json",
|
|
|
|
"dynamicAccountOverwriteEmpty.json",
|
|
"InitCollision.json",
|
|
"badOpcodes.json",
|
|
"codeCopyZero.json",
|
|
"shiftCombinations.json",
|
|
"returndatacopy_following_revert_in_create.json",
|
|
"returndatacopy_afterFailing_create.json",
|
|
"returndatacopy_0_0_following_successful_create.json",
|
|
"returndatasize_following_successful_create.json",
|
|
|
|
"shl10.json",
|
|
"shl01.json",
|
|
"shl01-0101.json",
|
|
"shl01-0100.json",
|
|
"shl11.json",
|
|
"shl_-1_256.json",
|
|
"shl01-ff.json",
|
|
"shl_-1_1.json",
|
|
"shl_2^255-1_1.json",
|
|
"shl_-1_0.json",
|
|
"shl_-1_255.json",
|
|
|
|
"shr_-1_1.json",
|
|
"shr_2^255_255.json",
|
|
"shr10.json",
|
|
"shr_2^255_1.json",
|
|
"shr01.json",
|
|
"shr_2^255_256.json",
|
|
"shr_2^255_257.json",
|
|
"shr_-1_255.json",
|
|
"shr_-1_256.json",
|
|
"shr_-1_0.json",
|
|
"shr11.json",
|
|
|
|
# all these tests below actually pass
|
|
# but they are very slow
|
|
# byzantium slow
|
|
"LoopCallsDepthThenRevert3.json",
|
|
"LoopCallsDepthThenRevert2.json",
|
|
"LoopCallsDepthThenRevert.json",
|
|
"static_Call50000.json",
|
|
"static_Call50000_ecrec.json",
|
|
"static_Call50000_identity.json",
|
|
"static_Call50000_identity2.json",
|
|
"static_Call50000_rip160.json",
|
|
"static_Call50000_sha256.json",
|
|
"LoopCallsThenRevert.json",
|
|
"LoopDelegateCallsDepthThenRevert.json",
|
|
"recursiveCreateReturnValue.json",
|
|
"static_Call1024PreCalls2.json",
|
|
"Callcode1024BalanceTooLow.json",
|
|
"static_Call1024BalanceTooLow.json",
|
|
"static_Call1024BalanceTooLow2.json",
|
|
"static_Call1024OOG.json",
|
|
"static_Call1024PreCalls3.json",
|
|
"static_Call1024PreCalls.json",
|
|
"static_Call1MB1024Calldepth.json",
|
|
|
|
# Homestead recursives
|
|
"ContractCreationSpam.json",
|
|
"Call1024OOG.json",
|
|
"Call1024PreCalls.json",
|
|
"CallRecursiveBombPreCall.json",
|
|
"Delegatecall1024.json",
|
|
"Delegatecall1024OOG.json",
|
|
"JUMPDEST_Attack.json",
|
|
"JUMPDEST_AttackwithJump.json",
|
|
"ABAcalls1.json",
|
|
"ABAcalls2.json",
|
|
"CallRecursiveBomb0.json",
|
|
"CallRecursiveBomb0_OOG_atMaxCallDepth.json",
|
|
"CallRecursiveBomb1.json",
|
|
"CallRecursiveBomb2.json",
|
|
"CallRecursiveBombLog.json",
|
|
"CallRecursiveBombLog2.json",
|
|
"Call1024BalanceTooLow.json",
|
|
# Frontier recursives
|
|
"Callcode1024OOG.json",
|
|
"callcallcodecall_ABCB_RECURSIVE.json",
|
|
"callcallcodecallcode_ABCB_RECURSIVE.json",
|
|
"callcodecallcall_ABCB_RECURSIVE.json",
|
|
"callcodecallcallcode_ABCB_RECURSIVE.json",
|
|
"callcodecallcodecall_ABCB_RECURSIVE.json",
|
|
"callcodecallcodecallcode_ABCB_RECURSIVE.json",
|
|
"callcallcallcode_ABCB_RECURSIVE.json"
|
|
]
|
|
result = name in allowedFailingGeneralStateTests
|