184 Commits

Author SHA1 Message Date
Hsiao-Wei Wang
6c7922df67
Fix bls test case file name 2022-10-26 11:03:16 -05:00
Hsiao-Wei Wang
940fc20758
Apply suggestions from code review
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2022-10-17 23:21:15 +08:00
Hsiao-Wei Wang
b90436c988
Fix capella random & fork 2022-10-14 23:42:42 -05:00
Hsiao-Wei Wang
03ced9c263
Add Capella tests 2022-10-14 23:40:45 -05:00
Hsiao-Wei Wang
44424c4080
Bump dep packages version and fix lint issues 2022-09-28 12:38:21 +08:00
Hsiao-Wei Wang
f8d92c3bd8
Add basic test case 2022-08-24 23:20:31 +08:00
Hsiao-Wei Wang
5db5b87e5e
Add bellatrix deposit and voluntary_exit tests 2022-08-19 01:52:34 +08:00
Hsiao-Wei Wang
d133dae471
Fix codespell errors (#2975) 2022-08-18 22:08:44 +08:00
Hsiao-Wei Wang
d95c45523f
Fix path: the bellatrix-new tests have been moved to altair file 2022-08-16 14:29:56 +08:00
Hsiao-Wei Wang
176a5d227a
Move merkle/single_proof tests to light_client/single_merkle_proof 2022-07-22 21:34:09 +08:00
Etan Kissling
30d635259b
Move test files to light_client subdir 2022-07-15 21:36:26 +02:00
Etan Kissling
86fe93ca96
Add functions for deriving light client data
Adds `create_light_client_bootstrap` and `create_light_client_update`
functions as a reference implementation for serving light client data.
This also enables a new test harness to verify that light client data
gets applied to a `LightClientStore` as expected.
2022-07-14 09:36:09 +02:00
Etan Kissling
c4dbd241ac
Root next_sync_committee in attested_header
`LightClientUpdate` structures currently use different merkle proof root
depending on the presence of `finalized_header`. By always rooting it in
the same state (the `attested_header.state_root`), logic gets simpler.

Caveats:
- In periods of extended non-finality, `update.finalized_header` may now
  be outdated by several sync committee periods. The old implementation
  rejected such updates as the `next_sync_committee` in them was stale,
  but the new implementation can properly handle this case.
- The `next_sync_committee` can no longer be considered finalized based
  on `is_finality_update`. Instead, waiting until `finalized_header` is
  in the `attested_header`'s sync committee period is now necessary.
- Because `update.finalized_header > store.finalized_header` no longer
  holds (for updates with finality), an `is_better_update` helper is
  added to improve `best_valid_update` tracking (in the past, finalized
  updates with supermajority participation would always directly apply)

This PR builds on prior work from:
- @hwwhww at https://github.com/ethereum/consensus-specs/pull/2829
2022-07-01 14:49:24 -07:00
Alex Stokes
2dd9a52fe4
remove data logging from BLS test gen 2022-06-29 10:24:53 -06:00
Alex Stokes
129d9e28b4
add randomized tests for bellatrix 2022-01-27 19:41:09 -08:00
Antonio Sanso
7255faf41b
Update ssz_container.py 2022-01-13 13:40:48 +01:00
Alex Stokes
c4a60225cb
Merge branch 'dev' into patch-5 2022-01-11 16:09:40 -06:00
Alex Stokes
d74cb5c9ec
remove unnecessary conditional 2022-01-06 15:34:59 -08:00
Antonio Sanso
e56dddd6ec
Update tests/generators/ssz_generic/ssz_container.py
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-01-06 19:07:48 +01:00
Antonio Sanso
69a2fb4af0
Update tests/generators/ssz_generic/ssz_container.py
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-01-06 19:07:31 +01:00
Antonio Sanso
7df0d4d70e
Update tests/generators/ssz_generic/ssz_container.py
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-01-06 19:07:23 +01:00
Antonio Sanso
22719f2748
Update tests/generators/ssz_generic/ssz_container.py
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-01-06 19:06:50 +01:00
Antonio Sanso
6f64d46bc4
Update tests/generators/ssz_generic/ssz_container.py
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-01-06 19:06:42 +01:00
Antonio Sanso
db16f590cb fixing lint 2022-01-06 13:29:57 +01:00
Antonio Sanso
b5908cf294 fixing lint 2022-01-06 13:28:19 +01:00
Antonio Sanso
7ccd528cd1 fixing lint 2022-01-06 13:26:00 +01:00
Antonio Sanso
b220655d24
Add 3 new invalid test cases 2022-01-06 13:08:47 +01:00
Hsiao-Wei Wang
5910b90c43
Enable Bellatrix fork tests in test generator 2021-12-24 00:56:55 +08:00
Hsiao-Wei Wang
8facc0a095
Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
Hsiao-Wei Wang
addc03cb7c
Enable ex-ante tests in testgen and minor fixes 2021-12-09 17:47:20 +08:00
Antonio Sanso
dfb3ef8f2c
Update ssz_container.py 2021-11-24 08:42:27 +01:00
Hsiao-Wei Wang
49d96f92ef
Add a sample altair-to-merge-only transition 2021-11-12 17:06:10 +08:00
Hsiao-Wei Wang
0641d1c184
ALL_FORKS sounds like a list of fork names. Rename it to ALL_FORK_UPGRADES 2021-11-02 19:01:32 +08:00
Hsiao-Wei Wang
0b0fe15c75
Make altair transition tests support merge forks 2021-11-02 14:47:24 +08:00
Hsiao-Wei Wang
3a242a1e0b
Refactor and add test cases of having operation right before the fork 2021-10-15 00:02:33 +08:00
Hsiao-Wei Wang
49bf78d431
PR feedback 2021-10-14 22:40:29 +08:00
Hsiao-Wei Wang
f0980a4ab9
Refactoring. Sort tests to specific files. 2021-10-13 00:26:23 +08:00
Hsiao-Wei Wang
e821ddade2
Remove the trailing comma 2021-10-07 21:44:51 +08:00
Hsiao-Wei Wang
7a7ab81306
Also update other generators so that we won't write the bad pattern again 2021-10-07 03:14:29 +08:00
Hsiao-Wei Wang
dcdbff0728
Combine the conflicting handler names 2021-10-07 02:11:50 +08:00
Hsiao-Wei Wang
e235aa8296
Clean up. Add execution_payload_header to initialization meta.yaml 2021-10-03 22:38:05 +08:00
Etan Kissling
939e6c7e8e
run tests against future forks by default
Some tests are currently restricted to a single phase using @with_phases
even though they could likely run unchanged in later phases. This patch
changes the default for such tests to also run in later phases. If the
beacon chain changes enough in later phases to break these tests, this
highlights that the tests need to be adjusted or extended accordingly.
2021-09-30 10:28:02 +02:00
Danny Ryan
d34b79f4de
Merge pull request #2630 from ethereum/tests/merge-clean-up
#2598 + cleanups
2021-09-27 11:23:30 -06:00
protolambda
bd8c978965
move merkle tests, output proof.yaml, update format 2021-09-27 18:07:59 +02:00
Etan Kissling
e7317e2283
merkle proof test generator
Building merkle proofs is required functionality for implementing light
client sync. Although the spec currently only defines a function to
verify merkle proofs (`is_valid_merkle_branch`) there are still a few
PySpec unit tests that produce merkle proofs. This patch adds a new
generator to extract test vectors from those static unit tests, so that
light client implementations can validate their merkle proof logic.
2021-09-27 17:34:51 +02:00
Dmitrii Shmatko
8ae078a4f5 Merge branch 'dev' into tests/merge 2021-09-23 22:24:33 +03:00
Dmitrii Shmatko
b1aa227983 Added on_merge_block client tests 2021-09-23 22:22:34 +03:00
Etan Kissling
41c12bfcb2
improve grammar in BLS test comments
The comments for the PRIVKEYS definition in the BLS test generator were
a bit difficult to read. Improved by rewording them slightly.
2021-09-22 14:15:07 +02:00
Dmitrii Shmatko
829c6e7325 Enable genesis client tests for MERGE 2021-09-15 18:27:20 +03:00
Danny Ryan
cb7c81eb96
Merge pull request #2576 from ralexstokes/consolidate-like-operations-tests
Allow spec tests author to batch tests under one handler name
2021-09-01 17:54:34 -06:00