George Kadianakis
2558282e6d
EIP-4844: Introduce KZG and blob verification unittests
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:14:31 +03:00
George Kadianakis
567a25f883
EIP-4844: Make the spec executable
...
- Implement all the required glue code to make things executable
- Implement a dummy KZG trusted setup
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:14:05 +03:00
Etan Kissling
654970c605
Add `LightClientBootstrap`
...
Introduces a new `LightClientBootstrap` structure to allow setting up a
`LightClientStore` with the initial sync committee and block header from
a user-configured trusted block root.
This leads to new cases where the `LightClientStore` is only aware of
the current but not the next sync committee. As a side effect of these
new cases, the store's `finalized_header` may now advance into the next
sync committee period before a corresponding `LightClientUpdate` with
the new sync committee is obtained, improving responsiveness.
Note that so far, `LightClientUpdate.attested_header.slot` needed to be
newer than `LightClientStore.finalized_header.slot`. However, it is now
necessary to also consider certain older updates to try and backfill the
`next_sync_committee`. The `is_better_update` helper is also updated to
improve `best_valid_update` tracking.
2022-07-12 07:27:00 +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
Hsiao-Wei Wang
bfa048a449
Merge pull request #2929 from etan-status/lc-testterms
...
Cleanup light client tests
2022-07-02 02:32:18 +08:00
Hsiao-Wei Wang
d2a1f57e09
Merge pull request #2928 from ralexstokes/test-gen-patch-up
...
remove data logging from BLS test gen
2022-06-30 17:10:08 +08:00
Etan Kissling
e269b305b9
Cleanup light client tests
...
Various cleanups and minor fixes:
- Consistent terminology:
- `signed_block` -> `attested_block`
- `finalized_block_header` -> `finalized_header`
- `snapshot_period` -> `store_period`
- Use correct block in finality test (`blocks[-1]` instead of new one)
- Add `signed_block_header` func to get header from `SignedBeaconBlock`
- Remove `block_header` from `get_sync_aggregate` helper arguments
- Use `state_transition_with_full_block` as shortcut for multiple calls
- Have `finalized_header` actually be header instead of full block body
- Consistent ordering of `assert` to match structure definition
2022-06-30 11:09:49 +02:00
Alex Stokes
529ce301b8
write test generator diagnostics to a summary file
2022-06-29 12:09:56 -06:00
Alex Stokes
2dd9a52fe4
remove data logging from BLS test gen
2022-06-29 10:24:53 -06:00
Etan Kissling
f5f3031c5e
Allow passing redundant `next_sync_committee`
...
The producer of `LightClientUpdate` structures usually does not know how
far the `LightClientStore` on the client side has advanced. Updates are
currently rejected when including a redundant `next_sync_committee` not
advancing the `LightClientStore`. Behaviour is changed to allow this.
2022-06-29 13:16:03 +02:00
Etan Kissling
9a253e437d
create decorator for tests with matching config
2022-06-24 01:05:11 +02:00
Etan Kissling
0b8ab23bd4
Remove `fork_version` from `LightClientUpdate`
...
The `fork_version` field in `LightClientUpdate` can be derived from the
`update.signature_slot` value by consulting the locally configured fork
schedule. The light client already needs access to the fork schedule to
determine the `GeneralizedIndex` values used for merkle proofs, and the
memory layouts of the structures (including `LightClientUpdate`). The
`fork_version` itself is network dependent and doesn't reveal that info.
2022-06-16 17:17:24 +02:00
Hsiao-Wei Wang
8cc008d11c
Merge pull request #2805 from etan-status/lc-period
...
Allow light client to verify signatures at period boundary
2022-06-16 16:53:12 +02:00
Danny Ryan
74489d5523
Partial withdrawals ( #2862 )
...
* t push base design for partial withdrawals
* moor tests
* clean up withdrawals naming
* make partial withdrawal randomized tests better
* Apply suggestions from code review
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* fix mainnet brokn test
* name swap
* lint
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-06-08 13:16:12 -06:00
Hsiao-Wei Wang
c165d31ccb
Remove `@disable_process_reveal_deadlines`
2022-06-06 16:24:44 +08:00
Alex Stokes
0d305f0ae3
Update README.md
...
Some edits to remove stale information
2022-06-01 22:00:11 -06:00
Danny Ryan
e43b1f7679
bump version.txt ( #2900 )
2022-05-23 05:25:20 -06:00
Danny Ryan
895cce5aeb
bump version.txt
2022-05-23 05:23:16 -06:00
Danny Ryan
1d82d33774
Merge pull request #2887 from jtraglia/add-invalid-withdrawable-epoch-test
...
Add invalid large withdrawable epoch test
2022-05-16 08:07:21 -06:00
Hsiao-Wei Wang
89e7a1073d
Add notes about invalid case to `epoch_processing` test format
2022-05-10 19:02:10 +02:00
Justin Traglia
02090d94ab
Remove pytest import
2022-05-10 11:00:16 -05:00
Justin Traglia
d1f0187076
Revert "Move test case to new location"
...
This reverts commit e2cbdb2b67
.
2022-05-10 10:48:59 -05:00
Justin Traglia
5868a53cf1
Revert "Fix linter warnings again"
...
This reverts commit ac7267c938
.
2022-05-10 10:48:51 -05:00
Justin Traglia
ac7267c938
Fix linter warnings again
2022-05-09 16:50:43 -05:00
Justin Traglia
e2cbdb2b67
Move test case to new location
2022-05-09 16:47:19 -05:00
Justin Traglia
90c1825637
Convert participation_fn from lambda to def
...
I felt that the the lambda was a little too complicated.
2022-05-09 15:53:36 -05:00
Justin Traglia
9dcb2eecbc
Fix linter warnings
2022-05-09 14:28:54 -05:00
Justin Traglia
a7bda480fe
Convert sets to sorted lists prior to sampling
...
This is because sampling of sets has been deprecated in Python 3.9. I used
sorted() instead of list() so that things are deterministic.
2022-05-09 14:09:27 -05:00
Justin Traglia
3c7544af3d
Add invalid large withdrawable epoch test
2022-05-06 13:56:40 -05:00
Danny Ryan
c1d0836936
Merge pull request #2855 from ethereum/00-to-01
...
00 to 01 cred change
2022-05-05 07:31:49 -06:00
Hsiao-Wei Wang
8a4ea1d13d
Merge pull request #2877 from zilm13/fix/equivocating-indices
...
Yield attestation in equivocating indices test
2022-05-03 14:44:57 +02:00
Etan Kissling
5653649ca8
Allow light client to verify signatures at period boundary
...
As the sync committee signs the previous block, the situation arises at
every sync committee period boundary, that the new sync committee signs
a block in the previous sync committee period. The light client cannot
reliably detect this condition (e.g., assume that this is the case when
it is currently on the last slot of a sync committee period), because
the last couple slots of a sync committee period may not have a block.
For example, when receiving a `LightClientUpdate` that is constructed
as in the following illustration, it is unknown whether `sync_aggregate`
was signed by the current or next sync committee at `attested_header`.
```
slot N N + 1 | N + 2 (slot not sent!)
|
+-----------------+ \ / | +----------------+
| attested_header | <--- X ----|---- | sync_aggregate |
+-----------------+ / \ | +----------------+
missed |
|
sync committee
period boundary
```
This patch addresses this edge case by including the slot at which the
`sync_aggregate` was created into the `LightClientUpdate` object.
Note that the `signature_slot` cannot be trusted beyond the purpose of
signature verification, as it could be manipulated to any other slot
within the same sync committee period and fork version, without making
the `sync_aggregate` invalid.
2022-05-02 13:08:20 +02:00
Dmitrii Shmatko
b9cb294650
Yield attestation in equivocating indices test
2022-04-25 23:23:44 +03:00
Etan Kissling
f125538122
Fix param order in `prepare_execution_payload`
...
Documentation on how to call `prepare_execution_payload` had the params
for `safe_block_hash` and `finalized_block` hash flipped compared to the
function definition. Also updated tests for consistency.
2022-04-25 16:49:00 +02:00
Danny Ryan
1bfefe301d
Merge pull request #2858 from mkalinin/justified-to-safe-block
...
Bellatrix: pass justified as a safe block
2022-03-30 12:19:21 -06:00
Danny Ryan
ee5f29cb75
fix ci
2022-03-24 09:57:43 -06:00
Danny Ryan
6e369e4a53
Apply suggestions from code review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-03-23 10:55:27 -06:00
Danny Ryan
2017b61265
test address_change
2022-03-22 13:37:17 -06:00
Mikhail Kalinin
95a2327800
Bellatrix: add get_safe_block_hash to validator.md
2022-03-22 22:51:45 +06:00
Danny Ryan
702ed9f39a
Merge branch 'withdrawals-push' into 00-to-01
2022-03-22 08:23:34 -06:00
Danny Ryan
b469593219
toc
2022-03-22 08:22:35 -06:00
Danny Ryan
0da78ebc4b
Merge branch 'withdrawals-push' into 00-to-01
2022-03-22 08:19:31 -06:00
Danny Ryan
c10d219664
Merge branch 'dev' into withdrawals-push
2022-03-22 08:11:09 -06:00
Danny Ryan
493b169022
refine naming for withdrawals
2022-03-22 07:55:45 -06:00
Danny Ryan
79cdb88e66
wip 00 to 01 cred change
2022-03-16 15:41:37 -06:00
Danny Ryan
36aae1d848
add tests for process_withdrawals
2022-03-16 13:35:29 -06:00
Mikhail Kalinin
cc347c6ff4
Merge pull request #2851 from mkalinin/safe-head
...
Add safe_block_hash to notify_forkchoice_updated
2022-03-16 13:29:23 +06:00
Mikhail Kalinin
84ab086d94
Add safe_block_hash to notify_fc_updated
2022-03-14 19:09:21 +06:00
Danny Ryan
3dd83cf4ee
minor withdrawals renamings
2022-03-10 12:30:51 -07:00
Danny Ryan
507f550cb1
Merge branch 'dev' into withdrawals-push
2022-03-10 10:27:20 -07:00
Hsiao-Wei Wang
3cdc0e61ed
Add `on_attester_slashing` execution step
2022-03-09 10:18:00 +08:00
Hsiao-Wei Wang
95c712598a
Fix `test_discard_equivocations` test vectors
2022-03-09 10:16:37 +08:00
Danny Ryan
e1b9cf97e2
add withdrawal index to wihdrawal transaction
2022-03-03 14:02:52 -07:00
Aditya Asgaonkar
7f31c80b8f
Fix lint & CI
2022-03-01 11:47:45 -08:00
Aditya Asgaonkar
4fbe162655
Add on_attester_slashing() and related test
2022-03-01 11:42:49 -08:00
Danny Ryan
1fb7a95329
bump VERSION.txt to 1.1.10
2022-02-25 11:23:15 -07:00
Danny Ryan
0a55f062d7
fix execution paylaod tests
2022-02-24 15:38:23 -07:00
Danny Ryan
f5dab5b666
fix fully withdrawal tests
2022-02-24 15:06:31 -07:00
Danny Ryan
2026103bb9
Merge branch 'dev' into withdrawals-push
2022-02-23 15:08:29 -07:00
Mikhail Kalinin
1280fe2a02
Bellatrix: random -> prev_randao
2022-02-22 17:16:33 +06:00
Hsiao-Wei Wang
3d7f307020
Refactor test_sync_protocol.py a bit
2022-02-04 17:46:37 -08:00
Hsiao-Wei Wang
f2fd673a66
Merge pull request #2807 from etan-status/compute-sync-period
...
Consistently use `compute_sync_committee_period`
2022-02-01 16:05:58 -08:00
Danny Ryan
67fcbf22ec
bump version
2022-01-28 06:44:04 -07:00
Alex Stokes
129d9e28b4
add randomized tests for bellatrix
2022-01-27 19:41:09 -08:00
Mikhail Kalinin
eb4497fae7
Bellatrix: Rename execute_payload to notify_new_payload
2022-01-27 15:24:53 +06:00
Danny Ryan
671c4f0e3a
receipt_root -> receipts_root
2022-01-17 13:42:10 -07:00
Etan Kissling
8319d07084
Consistently use `compute_sync_committee_period`
...
There were a couple instances where a division was used on an epoch
to derive the corresponding sync committee period instead of calling the
`compute_sync_committee_period` function.
These instances were changed to also use the function.
2022-01-17 17:38:24 +01:00
Alex Stokes
50a63c4135
Merge pull request #2790 from asanso/patch-5
...
Add 3 new invalid test cases
2022-01-13 12:56:38 -06:00
Hsiao-Wei Wang
16c350ebcd
Merge pull request #2796 from etan-status/lc-aggregate
...
Rename `sync_committee_aggregate` > `sync_aggregate`
2022-01-13 21:07:50 +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
Danny Ryan
a1719f9afc
Merge pull request #2784 from status-im/config-name
...
Add `CONFIG_NAME` to configs
2022-01-11 07:24:15 -07:00
Etan Kissling
48e19b15ae
Rename `sync_committee_aggregate` > `sync_aggregate`
...
This renames the `sync_committee_aggregate` field of `LightClientUpdate`
to `sync_aggregate` for consistency with the terminology in the rest of
the spec.
2022-01-11 11:22:39 +01: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
Danny Ryan
af4725d08a
add some non-empty extra_data tests
2022-01-03 07:51:35 -07:00
Jacek Sieka
46bc206740
Add `CONFIG_NAME` to configs
...
Runtime configurations apply to a certain network and the name of that
network is useful for humans such that they can talk about it.
Some of the existing configs already include a `CONFIG_NAME` toggle -
might as well add it here as well and avoid some confusion - this name
above all becomes useful in the beacon API.
By extension, the `CONFIG_NAME` config will appear in the beacon api as
a result of being defined here.
2021-12-29 13:02:36 +01:00
Hsiao-Wei Wang
cbf314c67e
Move capella fork tests to the correct folder and resolve conflicts
2021-12-27 18:44:03 +08:00
Hsiao-Wei Wang
171a9ccc81
Resolve conflicts
2021-12-27 18:30:12 +08:00
Hsiao-Wei Wang
db642e0586
bump VERSION.txt to 1.1.8
2021-12-25 00:59:11 +08:00
Alex Stokes
b1998872fa
Merge pull request #2777 from ethereum/bellatrix-fork-testgen
...
Enable Bellatrix fork tests in test generator
2021-12-24 08:22:45 -08:00
Hsiao-Wei Wang
ba690852d6
Merge pull request #2774 from ethereum/bellatrix
...
Rename "Merge" -> "Bellatrix"
2021-12-24 01:46:55 +08:00
Hsiao-Wei Wang
5910b90c43
Enable Bellatrix fork tests in test generator
2021-12-24 00:56:55 +08:00
Hsiao-Wei Wang
a7df9a39cc
Set RNG seed
2021-12-23 21:33:23 +08:00
Hsiao-Wei Wang
41af639517
PR feedback from @mkalinin
2021-12-23 17:26:48 +08:00
Hsiao-Wei Wang
8facc0a095
Merge -> Bellatrix
2021-12-23 14:25:43 +08:00
Hsiao-Wei Wang
cba3ddfc3d
bump VERSION.txt to 1.1.7
2021-12-22 15:47:38 +08:00
Hsiao-Wei Wang
2fa396f67d
Merge pull request #2746 from ethereum/vbuterin-patch-12
...
Simplify sync protocol and update to calculate optimistic heads
2021-12-16 00:12:36 +08:00
Hsiao-Wei Wang
257c2413a5
Update test_sync_protocol.py per the new optimistic_header and data structure
2021-12-14 22:06:25 +08:00
Hsiao-Wei Wang
6edf840992
fix lint
2021-12-11 09:06:56 +08:00
Hsiao-Wei Wang
4cea972cc0
Apply suggestions from code review
...
Co-authored-by: Caspar Schwarz-Schilling <31305984+casparschwa@users.noreply.github.com>
2021-12-11 09:01:16 +08:00
Hsiao-Wei Wang
11a42f8d06
Remove `*_without_boost` tests
2021-12-09 17:58:31 +08:00
Hsiao-Wei Wang
addc03cb7c
Enable ex-ante tests in testgen and minor fixes
2021-12-09 17:47:20 +08:00
Caspar Schwarz-Schilling
9f614fca83
Fix linting
2021-12-08 18:31:14 +01:00
Caspar Schwarz-Schilling
79e1d5e021
Fix head view comparison
2021-12-08 18:14:46 +01:00
Caspar Schwarz-Schilling
dc9db78a67
Add sandwich test scenarios
2021-12-08 17:05:44 +01:00
Alex Stokes
db2be42baa
use a specific `spec` rather than the pre-defined phases
2021-12-07 18:50:00 +01:00
Alex Stokes
55c9c03f08
simply module import and fix config adjustment
2021-12-07 18:22:10 +01:00
Alex Stokes
733f37715e
use `importlib` to perform an actual spec copy
2021-12-07 17:55:17 +01:00
Alex Stokes
57be9d064f
update per-test config to be unique per-test
2021-12-07 17:13:26 +01:00
Hsiao-Wei Wang
200ed58dd9
Merge branch 'dev' into ex-ante-tests
2021-12-07 18:29:48 +08:00
Hsiao-Wei Wang
9dc1b7af7e
Test with strict `proposer_boost + 1` attestation participants
2021-12-07 00:25:26 +08:00
Danny Ryan
59d48210a1
fix forkchoice tests
2021-12-02 12:10:46 -07:00
Danny Ryan
6969c8af67
lint
2021-12-02 12:03:51 -07:00
Danny Ryan
180abb90ec
clean up some withdrawal logic and add tests
2021-12-02 11:56:33 -07:00
Hsiao-Wei Wang
6308cee7a6
Fix typo
2021-12-03 02:17:57 +08:00
Danny Ryan
3024dc8ba8
add withdrawn_epoch to capella validators
2021-12-02 10:52:56 -07:00
Hsiao-Wei Wang
a399d953d3
Add assertion to `test_shorter_chain_but_heavier_weight`
2021-12-02 17:21:42 +08:00
Danny Ryan
78d55839b9
fix tsts
2021-12-01 16:42:12 -07:00
Danny Ryan
b7308e0953
remove capella built files
2021-12-01 11:43:32 -07:00
Danny Ryan
4f24fe455b
basic capella withdrawal in place
2021-12-01 11:37:30 -07:00
Hsiao-Wei Wang
dc52b35145
Add `PROPOSER_SCORE_BOOST` to meta.yaml and fix comments
2021-12-02 01:37:01 +08:00
Hsiao-Wei Wang
bb8168fd95
Make config dict compatible with yaml.dump
2021-12-02 01:34:35 +08:00
Hsiao-Wei Wang
d7f6a42729
[WIP] Add ex-ante fork choice test cases
2021-12-01 02:37:22 +08:00
Antonio Sanso
dfb3ef8f2c
Update ssz_container.py
2021-11-24 08:42:27 +01:00
Danny Ryan
4370b9c816
bump VERSION.txt to 1.1.6
2021-11-23 14:53:13 -07:00
Danny Ryan
69e7f586ac
Merge pull request #2738 from ethereum/fix-names
...
is_merge -> is_merge_transition
2021-11-23 14:52:05 -07:00
Danny Ryan
a0d008bb86
is_merge -> is_merge_transition
2021-11-23 14:45:03 -07:00
Danny Ryan
32e8ca26a0
Merge pull request #2737 from ethereum/test_prepare_execution_payload
...
Fix spec typo and add `test_prepare_execution_payload` unit tests
2021-11-23 14:25:48 -07:00
Danny Ryan
395fdd4566
Merge pull request #2730 from ethereum/proposer-score-boost
...
Proposer LMD Score Boosting
2021-11-23 11:39:07 -07:00
Hsiao-Wei Wang
8050de384e
Fix spec typo and add `test_prepare_execution_payload` unit tests
2021-11-24 02:23:24 +08:00
Danny Ryan
975931b5cf
pr feedback
2021-11-23 11:19:22 -07:00
Hsiao-Wei Wang
2ba0586c3d
Add `proposer_boost_root` field to test vector "checks" step
2021-11-24 00:09:48 +08:00
Aditya Asgaonkar
6f95637637
Merging local branch to remote latest
2021-11-23 07:32:56 -08:00
Aditya Asgaonkar
ecbe9190b9
Apply HWW code's review - properly update test steps
2021-11-23 07:20:54 -08:00
Hsiao-Wei Wang
bdd7b0782e
Add configuration value checks
2021-11-23 16:44:12 +08:00
Ori Pomerantz
9999331f81
How to write tests for the consensus layer ( #2700 )
...
* Create README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Signed my name
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update tests/README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
* Update README.md
* Update README.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-11-22 16:30:12 -07:00
Aditya Asgaonkar
d85d4399cb
Rename test
2021-11-22 14:45:20 -08:00
Aditya Asgaonkar
1d835c5198
Apply Danny's code review & suggestions
2021-11-22 14:44:52 -08:00
Danny Ryan
ea09df50db
toc
2021-11-22 11:39:08 -07:00
Aditya Asgaonkar
2d161b4244
Add proposer score boosting & related tests
2021-11-22 11:12:24 -07:00
Danny Ryan
bbdb0d8fba
Merge pull request #2727 from ethereum/fc-dev-validate_target_epoch_scope-patch
...
always atomically update justified and finalized
2021-11-22 09:42:20 -07:00
Danny Ryan
97e6d5c6d6
Merge branch 'fc-dev-validate_target_epoch_scope-patch' into dev
2021-11-22 08:32:32 -07:00
Hsiao-Wei Wang
29beba6ab5
Merge pull request #2706 from ethereum/transition-reuse
2021-11-20 08:21:22 +08:00
Danny Ryan
3c25da8218
Merge pull request #2726 from ethereum/get_pow_block_at_ttd-tests
...
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-19 09:37:11 -07:00
Danny Ryan
e7df64b0a4
Merge pull request #2723 from ethereum/add-test_is_execution_enabled_false
...
Add a test to cover the case of `is_execution_enabled` result is false
2021-11-19 09:33:34 -07:00
Danny Ryan
dc14b79a52
Merge pull request #2720 from paulhauner/patch-34
...
Remove `difficulty` from `PowBlock`
2021-11-18 15:49:27 -07:00
Mikhail Kalinin
58968f9286
Rename coinbase to fee_recipient
2021-11-18 19:23:52 +06:00
Hsiao-Wei Wang
2c865e3627
Resolve the commented out code in `test_new_finalized_slot_is_not_justified_checkpoint_ancestor`
2021-11-18 11:02:12 +08:00
Danny Ryan
3d4ece44df
port phase0 forkchocie changes to merge
2021-11-17 18:37:45 -07:00
Danny Ryan
eb00f8f735
cleanup forkchoice tests
2021-11-17 18:24:47 -07:00
Hsiao-Wei Wang
e56bbb8c44
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-17 18:00:35 +08:00
Hsiao-Wei Wang
79f1f16adf
Clean `PowBlock.difficulty` leftover
2021-11-16 22:08:00 +08:00
Hsiao-Wei Wang
2b9692a22c
Add a test to cover the case of `is_execution_enabled` result is false
2021-11-16 21:56:55 +08:00
Hsiao-Wei Wang
63c9e5ea56
Minor refactoring and add comments
2021-11-16 00:32:29 +08:00
Hsiao-Wei Wang
f0bb032eb1
Fix `test_transition_with_one_fourth_exiting_validators_exit_at_fork` assertions
2021-11-15 23:46:40 +08:00
Hsiao-Wei Wang
f643554aa5
Fix issue around on_attestation validation by skipping epoch scope
...
validation if attestation is from a block message
2021-11-13 18:28:05 +08:00
Danny Ryan
cd3d2ce692
working through test issues
2021-11-12 12:43:54 -07:00
Hsiao-Wei Wang
49d96f92ef
Add a sample altair-to-merge-only transition
2021-11-12 17:06:10 +08:00
Hsiao-Wei Wang
e70da78377
Merge branch 'dev' into transition-reuse
2021-11-12 15:57:27 +08:00
Danny Ryan
342171f441
version.txt bump to v1.1.5
2021-11-08 07:50:54 -07:00
Mikhail Kalinin
f463c32879
Apply feedback from the review of test_validate_merge_block
2021-11-06 10:21:56 +06:00
Mikhail Kalinin
56bb393eb5
Refine validate_merge_block unit tests
2021-11-05 19:56:53 +06:00
Danny Ryan
1361078a75
bump VERSION.txt to 1.1.4
2021-11-02 09:38:49 -06: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
fa4dc0c168
Apply suggestions from code review
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-11-02 18:38:24 +08:00
Hsiao-Wei Wang
0b0fe15c75
Make altair transition tests support merge forks
2021-11-02 14:47:24 +08:00
Danny Ryan
7a5eec3c5f
Merge pull request #2704 from ethereum/disable-too-slow-fork-choice-tests
...
Disable some too-slow mainnet preset fork choice tests
2021-11-01 12:23:23 -06:00
Danny Ryan
7e3ccb706d
remove block_number validation from CL
2021-11-01 07:57:49 -06:00
Danny Ryan
52a97ab494
remove gas validations from CL
2021-11-01 07:39:13 -06:00
Danny Ryan
78040ac3ae
update penalty params for Merge
2021-10-29 12:41:38 -06:00
Alex Stokes
0eff6e0a93
Merge pull request #2677 from ethereum/ralexstokes-patch-1
...
Update `ssz_generic` test format README
2021-10-28 02:33:56 -06:00
Alex Stokes
43a659a51b
Update tests/formats/ssz_generic/README.md
2021-10-27 05:55:53 -06:00
Hsiao-Wei Wang
314840117d
Add `test_invalid_previous_source_root` and fix `test_invalid_current_source_root`
2021-10-26 16:04:52 +08:00
Hsiao-Wei Wang
405f2e2c2f
Update tests/core/pyspec/eth2spec/test/conftest.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-10-21 23:21:56 +08:00
Hsiao-Wei Wang
cb513aa82d
--fork cli option: fix the case of unset directory path + validate fork name
2021-10-21 12:26:11 +08:00
Hsiao-Wei Wang
4f3637851c
Disable some too-slow mainnet preset fork choice tests
2021-10-19 00:54:29 +08:00
Hsiao-Wei Wang
afb62eebf0
Add pytest CLI option `--fork` so that we can just run with specific phase (fork)
2021-10-18 17:59:55 +08: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
Danny Ryan
c5b169bd62
fix issue with mutation in test generation
2021-10-15 16:15:37 -06:00
Alex Stokes
aa91788dfb
Yield the `pre` state for this test type before making blocks
2021-10-15 19:46:46 +01:00
Danny Ryan
a05a78246f
bump version.txt to 1.1.3
2021-10-15 09:47:24 -06:00
Alex Stokes
bf01e11cae
Merge pull request #2664 from ethereum/new-transition-test-cases
...
Add new Altair transition tests
2021-10-15 09:38:24 -06:00
Hsiao-Wei Wang
e70ef11b4d
Fix SSZ underflow
2021-10-15 22:49:43 +08:00
Hsiao-Wei Wang
7480fad8cd
Add `test_transition_with_activation_at_fork_epoch`
2021-10-15 22:46:16 +08:00
Hsiao-Wei Wang
b0b3733243
Fix `randomize_state` default params
2021-10-15 22:18:13 +08:00
Hsiao-Wei Wang
40869d6e39
PR feedback on `exit_random_validators` helper
2021-10-15 22:14:30 +08:00
Hsiao-Wei Wang
be6d2017bb
fix typo
2021-10-15 22:05:07 +08:00
Hsiao-Wei Wang
162711ea56
PR feedback. Rework `transition_to_next_epoch_and_append_blocks` a bit
2021-10-15 22:00:48 +08:00
Hsiao-Wei Wang
a4e5d50660
Fix/ignore mainnet preset cases
2021-10-15 11:57:10 +08:00
Hsiao-Wei Wang
52235a9e40
minor: Use pre spec for running `prepare_state_and_deposit`
2021-10-15 00:44:11 +08:00
Hsiao-Wei Wang
f62167c4ab
pr feedback
2021-10-15 00:30: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
cbba5426fe
PR feedback
2021-10-14 20:22:03 +08:00
Hsiao-Wei Wang
9879e0475d
Add random test format doc
2021-10-14 00:27:08 +08:00
Hsiao-Wei Wang
67da1ba2bf
Minor refactoring
...
- sanity check: deposit operation is independent of spec fork versions
- refactoring
- add comments
2021-10-14 00:06:29 +08:00
Hsiao-Wei Wang
53d4fa5187
Make operation (attester_slashing, proposer_slashing, voluntary_exit) at the fork block
2021-10-13 02:01:13 +08:00
Hsiao-Wei Wang
f0980a4ab9
Refactoring. Sort tests to specific files.
2021-10-13 00:26:23 +08:00
Hsiao-Wei Wang
95f940cc74
ensure that some of the current sync committee members are the slashed
2021-10-12 23:33:48 +08:00
Hsiao-Wei Wang
4dd8b7c98a
[WIP] Add new transition tests
2021-10-12 23:05:14 +08:00
Danny Ryan
e5bbbc5191
base_fee_per_gas to uint256
2021-10-11 16:25:01 -06:00
Danny Ryan
ac911558ac
Merge pull request #2655 from ethereum/bump-version
...
bump VERSION.txt to v1.1.2
2021-10-07 17:32:27 +03:00
Hsiao-Wei Wang
e821ddade2
Remove the trailing comma
2021-10-07 21:44:51 +08:00
Danny Ryan
154212dc58
bump VERSION.txt to v1.1.2
2021-10-07 11:54:58 +03:00
Hsiao-Wei Wang
ff15d0bc39
Apply PR feedback from @ralexstokes
2021-10-07 16:04:06 +08:00
Hsiao-Wei Wang
4ae8fb182e
Fix `run_sync_committee_sanity_test` so that it works with duplicate committee indices
2021-10-07 03:29:09 +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
Danny Ryan
dd6f09dab8
bump version.txt to v1.1.1
2021-10-04 08:06:04 +03:00
Hsiao-Wei Wang
f1f082fbe7
Remove the unused stub constants
2021-10-04 00:30:01 +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
Hsiao-Wei Wang
296f9bab81
Merge pull request #2638 from etan-status/exec-payload-time
...
use correct timestamp for empty ExecutionPayload
2021-10-02 14:44:20 +08:00
Etan Kissling
65649c0383
use correct timestamp for empty ExecutionPayload
...
There are two similar functions to compute the timestamp for a given
beacon chain slot. `compute_time_at_slot` is used for processing Eth1
votes, and does not take into account `GENESIS_TIME`. The other one,
`compute_timestamp_at_slot`, is used everywhere else. When processing
`ExecutionPayload`, the `merge/beacon-chain.md` spec uses the latter,
`compute_timestamp_at_slot`, to verify the timestamp. However, in the
test code, `build_empty_execution_payload` uses `compute_time_at_slot`.
This patch changes the test to use the same function for creating the
timestamp that is later used to verify it. Note that `GENESIS_TIME` is 0
so there is no practical difference.
2021-10-01 14:52:30 +02: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
Danny Ryan
334e3138fa
Merge pull request #2628 from ethereum/bump-version
...
bump VERSION.txt to 1.1.0
2021-09-27 11:14:37 -06:00
Hsiao-Wei Wang
ef51e1cfb9
Change mainnet `TERMINAL_TOTAL_DIFFICULTY` placeholder to `2**256-2**10` to avoid overflow
2021-09-28 01:02:53 +08:00
Hsiao-Wei Wang
5ab2824427
Clean up, refactor test_transition.py
2021-09-28 00:59:03 +08:00
Hsiao-Wei Wang
2fa595f784
Apply the trivial suggestions
2021-09-28 00:17:18 +08: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
Danny Ryan
c8d05c60ec
Apply suggestions from code review
2021-09-27 08:23:02 -06:00
Danny Ryan
42ef3548e1
bump VERSION.txt to 1.1.0
2021-09-27 08:01:27 -06:00
Dmitrii Shmatko
deb4dbd9c8
Make empty pow_block hash generation Python 3.8 compatible
2021-09-25 01:26:01 +03:00
Danny Ryan
8d5106808f
bump version to v1.1.0-beta.5
2021-09-24 12:26:40 -06:00
Dmitrii Shmatko
f8b3a67152
Fixed test_on_merge_block tests
2021-09-24 21:06:02 +03:00
Dmitrii Shmatko
457b0396dd
update PowBlock generation with random hash
2021-09-24 20:25:18 +03:00
Danny Ryan
940d6b1cc5
Merge pull request #2613 from mkalinin/execution-engine-update
...
Update execution engine calls
2021-09-24 05:57:27 -06:00
Dmitrii Shmatko
f3f1c86a57
Fixed imports in merge tests
2021-09-23 23:13:04 +03:00
Dmitrii Shmatko
1ecfc4016c
Polishing merge tests
2021-09-23 23:10:29 +03:00
Dmitrii Shmatko
8ae078a4f5
Merge branch 'dev' into tests/merge
2021-09-23 22:24:33 +03:00
Dmitrii Shmatko
239653ea01
Fixed lint errors for `test_on_merge_block.py`
2021-09-23 22:24:02 +03:00
Dmitrii Shmatko
b1aa227983
Added `on_merge_block` client tests
2021-09-23 22:22:34 +03:00
Etan Kissling
0c65f79d82
fix merkle proof test for mainnet
...
The `test_next_sync_committee_tree` currently only supports the minimal
preset, as it incorrectly initializes the `next_sync_committee`. On the
mainnet preset, `SYNC_COMMITTEE_SIZE` is 512, but the default states use
only 256 validators, leading to an IndexError during the test execution.
`next_sync_committee` is already initialized correctly prior to the test
run using the spec's `get_next_sync_committee` function, which fills up
extra committee slots with duplicate validators in this scenario. This
makes it unnecessary to manually initialize the `next_sync_committee`.
Removed the incorrect initialization to allow testing on mainnet preset.
2021-09-23 15:20:18 +02:00
Mikhail Kalinin
7d577ed422
Introduce ExecutionAddress type
2021-09-23 14:35:55 +06: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
Mikhail Kalinin
8cecf405cb
Merge branch 'dev' into execution-engine-update
2021-09-22 17:47:02 +06:00
Dmitrii Shmatko
cdcf366007
merge tests updated to be in line with transition_store removal
2021-09-21 15:20:19 +03:00
Dmitrii Shmatko
8bfa5188c1
Merge branch 'hardcoded-ttd' into tests/merge
2021-09-20 22:26:35 +03:00
Danny Ryan
e2af59c8cd
ensure random is validated for all payloads including transition
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
cb9e65ab85
Bring on extra_data field
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
b530e01761
Update calls to execution_engine
2021-09-20 20:57:45 +06:00
Danny Ryan
5811046f1a
Merge pull request #2581 from mkalinin/set-random-to-prev-randao-mix
...
Set the value of the random field to the previous randao_mix
2021-09-20 08:17:55 -06:00
Danny Ryan
3ef13561e6
ensure random is validated for all payloads including transition
2021-09-17 11:00:32 -06:00
Mikhail Kalinin
c2084ad5b0
Bring on extra_data field
2021-09-17 18:23:21 +06:00
Mikhail Kalinin
26c78b540a
Fix test_blocks#test_parent_from_same_slot
2021-09-17 16:01:15 +06:00
Mikhail Kalinin
df657f7c93
Merge branch 'dev' into set-random-to-prev-randao-mix
2021-09-17 14:41:43 +06:00
Etan Kissling
370b9e86e3
pass sync committee sig consistently in tests
...
There are three defined unit tests for the light client sync protocol.
They all follow a similar structure. However, there is an inconcistency
how they pass the slot to compute_aggregate_sync_committee_signature.
In one instance it is passed as `block.slot`. In the other two cases
it is passed as `block_header.slot`. As the `block_header` is created
from the `block`, they share the same value. This patch makes the way
how the slot is passed consistent across all of the test cases.
2021-09-15 21:34:10 +02:00
Dmitrii Shmatko
829c6e7325
Enable genesis client tests for MERGE
2021-09-15 18:27:20 +03:00
Dmitrii Shmatko
b99720ec26
Renamed test_on_block -> test_terminal_validity to avoid misleading as generator test
2021-09-14 17:56:49 +03:00
Dmitrii Shmatko
cf1bd6ccc0
Fixed lint errors for merge tests
2021-09-14 15:26:10 +03:00
Dmitrii Shmatko
7ff173bd0b
Added new Merge tests
2021-09-14 11:51:37 +03:00
Danny Ryan
70de0c3fa3
Merge pull request #2594 from ethereum/fix-agg-test
...
fix sync agg test for mainnet
2021-09-09 20:05:10 -06:00
Danny Ryan
d6b5cbd94c
fix sync agg test for mainnet
2021-09-09 19:53:30 -06:00
Danny Ryan
8f064d104f
bmp version.txt to 1.1.0-beta-4
2021-09-09 17:11:27 -06:00
Danny Ryan
a3e2e79ce7
Merge pull request #2591 from ralexstokes/add-exited-sync-comm-member-test
...
Add sync committee tests with exited and withdrawable members
2021-09-09 17:09:10 -06:00
Alex Stokes
0cee5660db
pr feedback
2021-09-09 15:43:42 -07:00
Danny Ryan
b660892ca3
Merge pull request #2586 from ethereum/churn-test
...
Add churn tests for when churn limit scales with v-set size
2021-09-09 16:41:37 -06:00
Danny Ryan
5348b9a3b9
randomize state can result in some exited vals for current epoch
2021-09-09 15:56:08 -06:00
Danny Ryan
a47ade3ba6
pr feedback
2021-09-09 15:27:23 -06:00
Alex Stokes
c0994e6736
Add sync committee tests with exited and withdrawable members
2021-09-09 13:27:54 -07:00
Alex Stokes
989cd38041
add rewards spec test with exit in current epoch
2021-09-08 20:24:22 -07:00
Hsiao-Wei Wang
d23444a2db
Merge pull request #2577 from ethereum/fix-fork-choice-tests
...
Fix fork choice `on_block` tests and update test format
2021-09-08 21:35:32 +08:00
Danny Ryan
8220f7dd44
ensure new dynamic queue tests don't run for mainnet cofig
2021-09-08 07:31:13 -06:00
Hsiao-Wei Wang
5bc59d8aab
Fix the comments
2021-09-08 21:22:48 +08:00
Danny Ryan
6784025d64
add scaled churn limit tests for voluntary exits
2021-09-07 20:49:54 -06:00
Danny Ryan
43e79a7ee0
add process_registry_updates tests for scaled churn limit
2021-09-07 20:34:28 -06:00
Danny Ryan
4faff4f899
Merge pull request #2580 from ralexstokes/add-rewards-test-case-for-exited-vals
...
Add test cases to ensure coverage with exited validators
2021-09-07 16:11:53 -06:00
Alex Stokes
14f71ffb4b
Use realistic `withdrawable_epoch` in spec test
2021-09-07 12:53:06 -07:00
Alex Stokes
064b489d18
Use spec function for total active balance
2021-09-07 12:23:57 -07:00
Alex Stokes
fb4a4f6694
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate_random.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-07 13:09:23 -06:00
Danny Ryan
ccd48d7286
Merge pull request #2579 from ethereum/fix-process_and_sign_block_without_header_validations
...
Fix testing helper `process_and_sign_block_without_header_validations`
2021-09-07 12:57:26 -06:00
Alex Stokes
25c290474f
fix test filtering on eth1 voting spec test
2021-09-02 15:50:26 -07:00
Alex Stokes
4168943ecf
Update tests/core/pyspec/eth2spec/test/helpers/random.py
2021-09-02 15:38:52 -06:00
Alex Stokes
30596fb8a1
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate_random.py
2021-09-02 15:35:15 -06:00
Alex Stokes
d834b6e800
add active/exited balances test for justification
2021-09-02 12:37:11 -07:00
Alex Stokes
bd38587a1e
add active/exited balances test for `process_slashings`
2021-09-02 09:50:40 -07:00
Alex Stokes
ad076697f4
add test case for active/exited difference for sync rewards processing
2021-09-02 09:50:39 -07:00
Alex Stokes
df89763777
ensure balance differential as a sanity check
2021-09-02 08:48:32 -07:00
Alex Stokes
58c0da9059
ensure rewards spec test with exited validators
2021-09-02 08:48:32 -07:00
Alex Stokes
0cc5f9cd59
modify helper for more precision on exited validators
2021-09-02 08:48:32 -07:00
Alex Stokes
cf23cd00ab
ensure the test covers exited, unslashed validators
2021-09-02 08:48:32 -07:00
Alex Stokes
7cb5901ee6
add spec test case for rewards with exited validators and _no_ leak
2021-09-02 08:48:31 -07:00
Alex Stokes
e341f4e1f8
refactor "leaking patch" helper
2021-09-02 08:48:31 -07:00
Antonio Sanso
ae8c0447ef
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-09-02 14:57:47 +02:00
Antonio Sanso
5f1a444e70
Update test_process_sync_aggregate.py
2021-09-02 11:34:42 +02:00
Antonio Sanso
2206a58335
Update test_process_sync_aggregate.py
2021-09-02 11:33:12 +02:00
Antonio Sanso
2d736139d5
Update test_process_sync_aggregate.py
2021-09-02 11:19:58 +02:00
Antonio Sanso
9bf8ad9130
Update test_process_sync_aggregate.py
2021-09-02 11:00:51 +02: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
Mikhail Kalinin
6ba1f22404
Set ExecutionPayload.random to the previous randao_mix
2021-09-01 18:42:58 +06:00
Hsiao-Wei Wang
4c34518edf
Call Altair and Merge operations in `process_and_sign_block_without_header_validations`
2021-09-01 00:23:42 +08:00
Hsiao-Wei Wang
b23ed05eee
[`test_on_block_finalized_skip_slots`] Make target state right after skipped slots
2021-08-31 18:40:26 +08:00
Hsiao-Wei Wang
085045a860
Since merge spec was rebased, make `merge_mods` base on `altair_mods` instead of `phase_0_mods`
2021-08-31 18:06:55 +08:00
Hsiao-Wei Wang
9b065c7816
To avoid using non-genesis anchor state, rewrite `test_on_block_finalized_skip_slots_not_in_skip_chain`
2021-08-31 17:42:10 +08:00
Hsiao-Wei Wang
da8d22c754
Update `checks` Checkpoint fields
2021-08-31 13:16:19 +08:00
Hsiao-Wei Wang
189a9d4ae9
Add the missed on_tick output and remove the useless on_tick call
2021-08-31 12:10:47 +08:00
Alex Stokes
2477deaf13
Allow test driver to batch test cases under one handler name with a list
2021-08-30 13:53:05 -07:00
Alex Stokes
387113b2f4
add "collect only" mode to spec test generator
2021-08-30 13:36:01 -07:00
Danny Ryan
125bf22494
Merge pull request #2570 from ralexstokes/fix-deposits-randomized-tests
...
Fix randomized deposit testing
2021-08-26 17:47:03 -06:00
Danny Ryan
c45e77b0b5
Merge pull request #2571 from ralexstokes/add-timing-info-to-test-gen
...
add timing information to spec test generation
2021-08-26 17:14:52 -06:00
Alex Stokes
74fcf67cf4
Fix a performance bug with the randomized block tests from #2560
2021-08-26 13:42:12 -07:00
Alex Stokes
9474f0a051
construct and supply scenario-wide state to facilitate deposit processing
2021-08-26 12:02:59 -07:00
Alex Stokes
b45601f44c
add timing information to spec test generation
...
in particular, warn if any particular operation takes longer than
some threshold, e.g. 1.0 second.
2021-08-26 11:50:24 -07:00
Alex Stokes
1f34ef9b56
modularize the random deposit helpers
2021-08-26 10:50:50 -07:00
Danny Ryan
17fece57b6
Merge pull request #2560 from ralexstokes/add-broad-spectrum-spec-tests
...
Broad-spectrum randomized block tests
2021-08-25 20:34:47 -06:00
Alex Stokes
a890d04a62
Merge branch 'add-broad-spectrum-spec-tests' of https://github.com/ralexstokes/eth2.0-specs into add-broad-spectrum-spec-tests
2021-08-25 17:18:08 -07:00
Alex Stokes
874ea80cb8
use more precise name for altair block randomizer and re-gen tests
2021-08-25 17:18:02 -07:00
Alex Stokes
4b3022a767
Update tests/generators/random/generate.py
2021-08-25 16:19:46 -06:00
Alex Stokes
5b0d2627c3
apply pr feedback on randrange
2021-08-25 15:13:20 -07:00
Alex Stokes
c206a2772a
update docs via PR feedback
2021-08-25 14:46:17 -07:00
Alex Stokes
e2dc9f9ec2
update generation of randomized scenarios for more variability
2021-08-25 14:42:41 -07:00
Alex Stokes
047ff5b099
unify visibility on names for doc purposes
2021-08-25 14:16:39 -07:00
Alex Stokes
961953ac15
update parameter name
2021-08-25 13:10:41 -07:00
Alex Stokes
377797fd0d
code layout change
2021-08-25 11:20:17 -07:00
Alex Stokes
14518d4d64
update name of utility module to be more specific
2021-08-25 11:15:59 -07:00
Alex Stokes
a6f8870e18
update makefile to use correct python version
2021-08-25 11:15:27 -07:00
Alex Stokes
0da1fe947d
clarify how the random block generator works
2021-08-25 11:09:35 -07:00
Alex Stokes
81971a8957
update readme for pytest
2021-08-25 11:01:26 -07:00
Alex Stokes
e575b222be
clarify readme
2021-08-25 10:54:55 -07:00
Alex Stokes
e72edf07f9
consolidate call to `max` into `randrange`
2021-08-25 10:40:15 -07:00
Alex Stokes
4d4f4e89f4
be specific about which slot we want a sync committee root for
2021-08-25 10:38:01 -07:00
Alex Stokes
02bc6541d9
extend Makefile
2021-08-24 16:40:16 -07:00
Alex Stokes
7874e8db88
clean up unnecessary comment
2021-08-24 16:40:16 -07:00
Alex Stokes
33c96127da
fix bug with random sync aggregate helper
2021-08-24 16:40:15 -07:00
Alex Stokes
f7c0dc36be
skip running heavy randomized tests in CI
2021-08-24 15:05:07 -07:00
Alex Stokes
933c1323dd
lint updates
2021-08-24 14:46:31 -07:00
Alex Stokes
8a32bef58b
update skipped test count when test already exists
2021-08-24 13:19:31 -07:00
Alex Stokes
8e5a34c38a
adjust helper to account for additional slashings
2021-08-24 12:46:03 -07:00
Alex Stokes
d1f3ec59af
ensure at least 1 operation when making random block
2021-08-24 11:56:19 -07:00
Alex Stokes
c27e4d140e
move to code-gen under new test generator
2021-08-24 11:56:15 -07:00
Alex Stokes
505bdba8f8
fix imports
2021-08-23 12:49:36 -07:00
Alex Stokes
d037c6662a
lint fix
2021-08-23 12:40:42 -07:00
Alex Stokes
cc04da8e79
add randomized block tests for altair
2021-08-23 12:30:05 -07:00
Alex Stokes
58c6f33e85
ensure at least one proposer slashing
2021-08-23 12:15:22 -07:00
Alex Stokes
7b9d70fcec
allow test customization (for future forks)
2021-08-23 12:15:09 -07:00
Alex Stokes
ff6863e689
fix bug with deposit generation code
2021-08-23 12:01:05 -07:00
Alex Stokes
31d46247ce
file re-org to re-use for later forks
2021-08-23 11:48:22 -07:00
Alex Stokes
20e3934fa2
do not exit validators who are already exited
2021-08-23 11:46:20 -07:00
Alex Stokes
16423880aa
add multiple blocks to each test
2021-08-23 11:00:33 -07:00
Alex Stokes
6316c7d364
ensure at least 1 attester slashing
2021-08-23 10:29:39 -07:00
Alex Stokes
361d97c54b
fix bug with proposer search
2021-08-23 10:13:19 -07:00
Hsiao-Wei Wang
15a6c48a46
Merge pull request #2518 from ethereum/fix-store-justified-checkpoint
...
Fix fork choice store checkpoints inconsistency issue
2021-08-23 23:41:11 +08:00
Hsiao-Wei Wang
838c263c4a
Apply suggestions from code review
...
Co-authored-by: Aditya Asgaonkar <adiasg@users.noreply.github.com>
2021-08-23 23:21:15 +08:00
Alex Stokes
2db01ba6d0
use fixed seed for block randomization
2021-08-22 13:55:29 -07:00
Alex Stokes
253f927c0a
fix randomness seed across randomized test
2021-08-22 13:55:29 -07:00
Alex Stokes
0c401a3e2a
filter for exit eligibility in helper
2021-08-22 13:55:28 -07:00
Alex Stokes
ce471b702e
code org
2021-08-22 10:54:00 -07:00
Alex Stokes
f76a29c1f9
patch state to not be leaking at start
2021-08-22 10:52:22 -07:00
Alex Stokes
993997aca5
ensure no leak on "normal" transitions
2021-08-22 10:19:21 -07:00