-
Notifications
You must be signed in to change notification settings - Fork 107
/
engine_sim.nim
56 lines (47 loc) · 1.25 KB
/
engine_sim.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
# Nimbus
# Copyright (c) 2023-2024 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.
import
std/times,
chronicles,
results,
./types,
../sim_utils,
../../../nimbus/core/eip4844
import
./engine_tests,
./auths_tests,
./exchange_cap_tests,
./withdrawal_tests,
./cancun_tests
proc combineTests(): seq[TestDesc] =
result.add wdTestList
result.add ecTestList
result.add authTestList
result.add engineTestList
result.add cancunTestList
let
testList = combineTests()
proc main() =
var stat: SimStat
let start = getTime()
let res = loadKzgTrustedSetup()
if res.isErr:
fatal "Cannot load baked in Kzg trusted setup", msg=res.error
quit(QuitFailure)
for x in testList:
let status = if x.run(x.spec):
TestStatus.OK
else:
TestStatus.Failed
stat.inc(x.name, status)
let elpd = getTime() - start
print(stat, elpd, "engine")
echo stat
main()