-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytests use configuration system #979
Conversation
I made another PR on it: #981 so that we can organize all dependencies in |
eb6007e
to
02e6d5b
Compare
rebased on dev, PR should run cleanly now. Hope this resolves the strange local-execution issues @hwwhww was experiencing. |
It works now! Straaange. |
1. Move .venv to TEST_LIBS_DIR/ 2. Install `config_helpers` separately
16d6014
to
b1874dc
Compare
These failed tests had to do with the low number of validators (100) compared to the slots_per_epoch. When generating attestations, I am often assuming there is at least 2 validators per committee. I changed |
requirements.txt
in two: one for normal use (whatever that may be), one for running tests (has the normalrequirements.txt
as-r
line to ensure you don't miss the dependencies)Also: I fixed a minor testing bug that was uncovered because of a small constant change: minimal config has a shorter eth1-data voting period. The new winning vote set the eth1-deposit count to 0, and it resulted in a negative expected-deposit-count. Default test-blocks are prepared with a vote for whatever deposit count the state says it is at.
Maybe we should add a voting requirement to the spec itself, so that you can't make the eth1-data deposit counter lower than the deposit index in the state.
Note: I don't believe anyone has actively been maintaining the test-correctness for non-
minimal_config
. Currently, when running tests against the mainnet config (slower), some of them fail. I identified a few root causes:assert verify_attestation(...)
fails for some reason, acommittee
for some shard was not found, and committee size <-> bitfield size is off.