I started to look at the pyspec project. It's a work related to consensus-specs test generators.
The [consensus-specs] is repository that describe in python what must be done by consensus clients. To ensure there are doing the same things for the same objects, there are test generators. The run is super slow, I am not sure why but most likely du to many I/O operations.
I haven't worked much this week because I had hard time with my work, lo siento.
I am working on fixing some redundant generator tests on consensus-specs; not a complicated fix but ask me a lot of time to understand the generator structure.
@spec_state_test
, if you want to run a test for only Altair phas you can use @with_phases([ALTAIR])
etc. The way tests are define is strange but somehow interesting..ssz
and .ssz_snappy
+ the JSON file updated for each tests (with the file mutex). But it seems around 50% of the own time comes from a dependency named remerkleable. It's a package wrote in pure python that stores some types and nodes that can be serialized/deserialized in SSZ. It is very often used in consensus-specs. I will need to run the profiler for another generator test to be sure it comes from this dependency.get_random_ssz_object
for some tests.make test
(and it could replace many others make
command). A guy ask if he could make a docker image of the repo to facilitate the test run so I proposed what I did. It's absolutely not prod-ready since it's just a bunch of script I used to interact with the projectAt the beginning of the week I was wondering why tests were setup like this, because it's so unconventional and it seemed to be "dark magic". But after debugging it I think I understand why the setup is so complicated:
.py
files which are themself based on the .md
.I need to ask to the project proposer what are optimization he has in mind. For the moment, I only thought about I/O. => I am wrong
During the week, I will send a message to HWW to ask her about the python package that's using almost all tests ressources; if it's the issue she want to fix or is there something else to optimized before.