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
0d305f0ae3
Update README.md
...
Some edits to remove stale information
2022-06-01 22:00:11 -06:00
Hsiao-Wei Wang
89e7a1073d
Add notes about invalid case to `epoch_processing` test format
2022-05-10 19:02:10 +02:00
Hsiao-Wei Wang
3cdc0e61ed
Add `on_attester_slashing` execution step
2022-03-09 10:18:00 +08:00
Hsiao-Wei Wang
8facc0a095
Merge -> Bellatrix
2021-12-23 14:25:43 +08:00
Hsiao-Wei Wang
2ba0586c3d
Add `proposer_boost_root` field to test vector "checks" step
2021-11-24 00:09:48 +08:00
Alex Stokes
43a659a51b
Update tests/formats/ssz_generic/README.md
2021-10-27 05:55:53 -06:00
Alex Stokes
ec516a7625
Update `ssz_generic` test format README
...
The existing README has a reference to an alias type `Bytes[N]` that has been removed from the repo so it is not clear what it exactly refers to.
This PR updates the type to the equivalent `List[T, N]` using more recent SSZ typing syntax.
2021-10-18 02:34:52 -07:00
Hsiao-Wei Wang
9879e0475d
Add random test format doc
2021-10-14 00:27:08 +08:00
Hsiao-Wei Wang
e235aa8296
Clean up. Add `execution_payload_header` to initialization `meta.yaml`
2021-10-03 22:38:05 +08:00
Danny Ryan
789eea0060
fix tests. add new generator
2021-10-03 16:19:50 +03: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
f8b3a67152
Fixed test_on_merge_block tests
2021-09-24 21:06:02 +03:00
Dmitrii Shmatko
1ecfc4016c
Polishing merge tests
2021-09-23 23:10:29 +03:00
Hsiao-Wei Wang
da8d22c754
Update `checks` Checkpoint fields
2021-08-31 13:16:19 +08:00
Danny Ryan
4c1156d504
rename eth1 and eth2 throughout specs and readme where reasonable
2021-08-18 17:13:24 -06:00
Hsiao-Wei Wang
3a9dcbadf0
Merge pull request #2487 from ethereum/on-block-tests
...
Rework + add some `on_block` tests
2021-08-17 21:21:44 +08:00
Hsiao-Wei Wang
ad4445fa9e
Apply PR feedback from Danny and clean up the BLS test format docs
2021-08-06 16:39:35 +08:00
Hsiao-Wei Wang
3b86bd340f
Rename eth2_* to eth_*
2021-08-05 11:20:49 +08:00
Hsiao-Wei Wang
a8383be878
Apply suggestions from code review
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-08-05 11:12:36 +08:00
Hsiao-Wei Wang
d8d0686400
Add tests for the Altair BLS helpers
2021-08-04 02:07:57 +08:00
Hsiao-Wei Wang
88be6cdf60
Apply Danny's suggestions from code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-06-22 20:55:52 +08:00
Hsiao-Wei Wang
7a9ae57335
Minor formatting. `True` -> `true`, `False` -> `false`
2021-06-19 02:13:02 +08:00
Hsiao-Wei Wang
42eae81013
WIP. Rework on_block tests
2021-06-15 21:52:25 +08:00
Danny Ryan
5d9d786499
Merge pull request #2462 from mkalinin/merge-transition-with-dynamic-ttd
...
Merge transition process with computed transition total difficulty
2021-06-08 09:55:10 -06:00
Danny Ryan
09b6fb0e64
ensure consistency about sync committees vs aggregates in naming throughout
2021-06-07 16:17:46 -06:00
Danny Ryan
6f7e04ef5c
Apply suggestions from hwwhww code review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-06-07 07:56:52 -06:00
Mikhail Kalinin
fd4369dc7c
Add merge/fork.md with upgrade_to_merge definition
2021-05-31 19:30:54 +06:00
protolambda
139117d647
update epoch processing test vector format docs
2021-05-22 19:00:55 +02:00
protolambda
48e1ef193a
update docs with config usage
2021-05-18 21:31:27 +02:00
Danny Ryan
699a3f837e
pr feedback
2021-05-13 13:38:43 -06:00
Danny Ryan
4a91c93962
add epoch processing tests for inactivity udpates
2021-05-12 15:06:32 -06:00
Alex Stokes
c08fb7714c
More altair fork tests with varied block conditions
2021-05-11 10:14:28 -07:00
Alex Stokes
d34b2a08d5
Use `fork_block` index in lieu of fork flag
2021-05-11 10:14:28 -07:00
Alex Stokes
0cc6e15b44
Update tests/formats/transition/README.md
...
Co-authored-by: Adrian Sutton <adrian@symphonious.net>
2021-05-11 10:14:27 -07:00
Alex Stokes
b71aa3fb56
add `transition` spec test format
2021-05-11 10:14:23 -07:00
protolambda
36032fd115
update doc about format
2021-05-05 00:37:00 +02:00
Hsiao-Wei Wang
666f847354
Update specs and test format note.
2021-04-20 23:37:53 +08:00
protolambda
d28cac0e8f
clean up test phase 1 testgen references
2021-03-29 15:38:43 +02:00
protolambda
4dd855667a
fix mixed up formats. Output slots as ints, output genesis eth1 init data as yaml dict
2021-03-22 02:50:05 +01:00
protolambda
1eaa3c1742
Define SyncAggregate to bundle sync committee bits and signature, update tests to better isolate the state-change, introduce helper function for future tests, and update test doc
2021-03-15 21:55:36 +01:00
Hsiao-Wei Wang
5d9f4b072c
Update genesis testgen and format
2021-03-16 00:38:30 +08:00
Hsiao-Wei Wang
1c0238075e
Fix some leftover from #2097
2021-03-13 12:42:51 +08:00
Hsiao-Wei Wang
e77ba91821
Apply proto's feedback, fix+refactor test_get_head, fix test format doc
...
Note that to execute on_attestation after on_block
Output more checking field
Disable mainnet config test_filtered_block_tree
Fix after rectoring + use more run_on_block
Fix and refactor `tick_and_run_on_attestation`
2021-03-13 00:29:35 +08:00
Hsiao-Wei Wang
23b28b62d0
Apply suggestions from @djrtwo code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-03-12 20:40:29 +08:00
Hsiao-Wei Wang
216bbb0a46
Merge branch 'dev' into fork-choice-test-vectors
2021-03-12 00:34:23 +08:00
Hsiao-Wei Wang
78a4897418
Add fork choice rule format doc
2021-03-12 00:33:04 +08:00
Hsiao-Wei Wang
b44e576e95
LIGHTCLIENT_PATCH/HF1 -> ALTAIR
2021-03-11 21:32:00 +08:00
Danny Ryan
7205f70192
patch remaining generator docs to reflect snappy_ssz encoding
2021-03-10 16:48:53 -07:00
Danny Ryan
813608928c
Merge branch 'dev' into tests-compression
2021-03-10 16:43:02 -07:00
Danny Ryan
338be1f636
clean up fork gens
2021-03-09 16:27:06 -07:00
Danny Ryan
6c406753f1
working through test gens
2021-03-08 19:11:31 -07:00
Hsiao-Wei Wang
1b00c10ed3
Apply @michaelsproul's feedback
2021-01-27 14:47:52 +08:00
Hsiao-Wei Wang
93d19bdf40
Update and add tests
2021-01-19 22:03:01 +08:00
protolambda
8bbc5f7fc3
update test format docs
2020-10-08 21:02:18 +02:00
Hsiao-Wei Wang
19d6c8336a
Add IETF BLS draft 04 edge cases test vectors
2020-09-25 15:01:38 +08:00
Hsiao-Wei Wang
7eeb754f7d
Add `disable_process_reveal_deadlines` decorator
2020-08-13 18:06:36 +08:00
Hsiao-Wei Wang
64aed78d6a
Only one test format for finality tests. No extra `finality.md` here
2020-07-24 05:25:17 +08:00
Hsiao-Wei Wang
de15960185
Add finality tests to test vectors
2020-07-24 04:23:26 +08:00
protolambda
65b5aa3c63
update test format docs
2020-05-19 14:31:28 +02:00
Danny Ryan
8060505743
refactor rewards/penalties tests to use a single structure
2020-05-18 16:00:59 -06:00
Danny Ryan
4a86c39712
Merge pull request #1799 from ethereum/bls_v2
...
Update to IETF BLS draft-irtf-cfrg-bls-signature-02 + draft-irtf-cfrg-hash-to-curve-07
2020-05-18 07:35:49 -06:00
Hsiao-Wei Wang
fd3cce0d2c
Update README
2020-05-15 23:38:25 +08:00
Hsiao-Wei Wang
d07e594f92
Add `Aggregate()` case
2020-05-15 23:27:35 +08:00
Hsiao-Wei Wang
d27f2350a2
Update BLS test suite to BLS standard draft v2 format
...
1. Make sure that BLS -Verify APIs would only return `True` or `False` , no exceptions.
2. Use `eth2spec.utils.bls` instead of py_ecc for test generator
3. Add assertions in test generator
4. Add some special test cases for the -Verify APIs
5. Clean up the test format documents
2020-05-15 00:55:06 +08:00
Danny Ryan
4ffa0dba60
Apply suggestions from code review
...
"rewards/penalties" -> "deltas" in throughout test comments/descriptions
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-05-05 16:31:40 -06:00
Danny Ryan
4f401133e1
address PR feedback from @protolambda
2020-05-05 15:37:14 -06:00
Danny Ryan
eda249957e
basic generators work
2020-05-04 13:20:32 -06:00
Nathaniel Jensen
83851f6919
Fix inaccuracies in test format documentation.
...
* `block_header` operation to accept input of type `BeaconBlock`
* `voluntary_exit` operation to accept input of type
`SignedVoluntaryExit`.
* sanity/blocks to note that inputs are of type `SignedBeaconBlock`
2020-03-24 13:39:27 +11:00
Danny Ryan
676e216beb
reorg specs by fork and move ssz out to own folder. make all of the build and link changes to support move
2020-01-10 11:55:13 -07:00