-
Notifications
You must be signed in to change notification settings - Fork 107
/
test_generalstate_failing.nim
168 lines (167 loc) · 6.27 KB
/
test_generalstate_failing.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Nimbus
# Copyright (c) 2018 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http:https://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http:https://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 = @[
"CrashingTransaction.json",
"callcallcallcode_001.json",
"callcallcallcode_001.json",
"callcallcode_01.json",
"callcallcodecall_010.json",
"callcallcodecallcode_011.json",
"callcodecallcall_100.json",
"callcodecallcallcode_101.json",
"callcodecallcode_11.json",
"callcodecallcodecall_110.json",
"callcodecallcodecallcode_111.json",
"CREATE_EContractCreateEContractInInit_Tr.json",
"CREATE_EContract_ThenCALLToNonExistentAcc.json",
"CREATE_EmptyContract.json",
"CREATE_EmptyContractAndCallIt_0wei.json",
"CREATE_EmptyContractAndCallIt_1wei.json",
"CREATE_EmptyContractWithBalance.json",
"TransactionCollisionToEmptyButCode.json",
"TransactionCollisionToEmptyButNonce.json",
"CallLoseGasOOG.json",
"CallcodeLoseGasOOG.json",
"callOutput1.json",
"callOutput2.json",
"callOutput3.json",
"callOutput3Fail.json",
"callOutput3partial.json",
"callOutput3partialFail.json",
"callcodeOutput1.json",
"callcodeOutput2.json",
"callcodeOutput3.json",
"callcodeOutput3Fail.json",
"callcodeOutput3partial.json",
"callcodeOutput3partialFail.json",
"deleagateCallAfterValueTransfer.json",
"delegatecallInInitcodeToEmptyContract.json",
"delegatecallInInitcodeToExistingContract.json",
"delegatecallSenderCheck.json",
"delegatecallValueCheck.json",
"delegatecodeDynamicCode.json",
"delegatecodeDynamicCode2SelfCall.json",
"RawCreateFailGasValueTransfer2.json",
"RawCreateGasMemory.json",
"RawCreateGasValueTransferMemory.json",
"createContractViaContractOOGInitCode.json",
"CallContractToCreateContractNoCash.json",
"CallContractToCreateContractOOG.json",
"CallContractToCreateContractWhichWouldCreateContractIfCalled.json",
"CallContractToCreateContractWhichWouldCreateContractInInitCode.json",
"CallTheContractToCreateEmptyContract.json",
"OutOfGasContractCreation.json",
"OutOfGasPrefundedContractCreation.json",
"callDataCopyOffset.json",
"codeCopyOffset.json",
"CALLCODEEcrecover0_0input.json",
"CALLCODEEcrecover1.json",
"CALLCODEEcrecover2.json",
"CALLCODEEcrecover80.json",
"CALLCODEEcrecoverR_prefixed0.json",
"CALLCODEEcrecoverV_prefixedf0.json",
"CALLCODERipemd160_2.json",
"CALLCODERipemd160_3.json",
"CALLCODERipemd160_3_postfixed0.json",
"CALLCODERipemd160_3_prefixed0.json",
"CALLCODESha256_2.json",
"CALLCODESha256_3.json",
"CALLCODESha256_3_postfix0.json",
"CALLCODESha256_3_prefix0.json",
"CallEcrecover0_0input.json",
"CallEcrecover1.json",
"CallEcrecover2.json",
"CallEcrecover80.json",
"CallEcrecoverCheckLengthWrongV.json",
"CallEcrecoverR_prefixed0.json",
"CallRipemd160_2.json",
"CallRipemd160_3.json",
"CallRipemd160_3_postfixed0.json",
"CallRipemd160_3_prefixed0.json",
"CallSha256_2.json",
"CallSha256_3.json",
"CallSha256_3_postfix0.json",
"CallSha256_3_prefix0.json",
"randomStatetest14.json",
"randomStatetest184.json",
"randomStatetest85.json",
#"randomStatetest579.json",
"randomStatetest643.json",
"randomStatetest646.json",
"randomStatetest248.json",
"RevertOpcodeCalls.json",
"RevertOpcodeDirectCall.json",
"RevertOpcodeInCallsOnNonEmptyReturnData.json",
"RevertOpcodeInInit.json",
"RevertOpcodeMultipleSubCalls.json",
"RevertOpcodeReturn.json",
"RevertOpcodeWithBigOutputInInit.json",
"RevertPrefound.json",
"RevertPrefoundEmpty.json",
"TestCryptographicFunctions.json",
"tx_e1c174e2.json",
"CreateHashCollision.json",
"suicideCoinbase.json",
"testRandomTest.json",
"Opcodes_TransactionInit.json",
"SuicidesMixingCoinbase.json",
"TransactionFromCoinbaseHittingBlockGasLimit1.json",
"createNameRegistratorPerTxsNotEnoughGasAfter.json",
"createNameRegistratorPerTxsNotEnoughGasAt.json",
"createNameRegistratorPerTxsNotEnoughGasBefore.json",
"delegatecallAfterTransition.json",
"delegatecallAtTransition.json",
"delegatecallBeforeTransition.json",
# 2018-12-07:
# 2019-02-07:
# 2019-02-15:
"randomStatetest101.json",
"randomStatetest116.json",
"randomStatetest237.json",
"randomStatetest7.json",
# 2019-02-17:
"RawCreateFailGasValueTransfer.json",
"NewGasPriceForCodes.json",
"NewGasPriceForCodesWithMemExpandingCalls.json",
"NonZeroValue_CALLCODE_ToNonNonZeroBalance.json",
"pairingTest.json",
"pointAdd.json",
"pointAddTrunc.json",
"pointMulAdd.json",
"pointMulAdd2.json",
# most likely to crash:
"createNameRegistratorOOG_MemExpansionOOV.json",
"createNameRegistratorOutOfMemoryBonds0.json",
"createNameRegistratorOutOfMemoryBonds1.json",
"ContractCreationSpam.json",
"Call1024OOG.json",
"Call1024PreCalls.json",
"CallRecursiveBombPreCall.json",
"Delegatecall1024.json",
"Delegatecall1024OOG.json",
"recursiveCreate.json",
"recursiveCreateReturnValue.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"
]
result = name in allowedFailingGeneralStateTests