316 Commits

Author SHA1 Message Date
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
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
4dd8b7c98a
[WIP] Add new transition tests 2021-10-12 23:05:14 +08:00
Hsiao-Wei Wang
f1f082fbe7
Remove the unused stub constants 2021-10-04 00:30:01 +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
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
c8d05c60ec
Apply suggestions from code review 2021-09-27 08:23:02 -06:00
Dmitrii Shmatko
deb4dbd9c8 Make empty pow_block hash generation Python 3.8 compatible 2021-09-25 01:26:01 +03: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
Dmitrii Shmatko
1ecfc4016c Polishing merge tests 2021-09-23 23:10:29 +03:00
Mikhail Kalinin
7d577ed422 Introduce ExecutionAddress type 2021-09-23 14:35:55 +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
Mikhail Kalinin
cb9e65ab85 Bring on extra_data field 2021-09-20 23:18:39 +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
Mikhail Kalinin
c2084ad5b0 Bring on extra_data field 2021-09-17 18:23:21 +06:00
Mikhail Kalinin
df657f7c93 Merge branch 'dev' into set-random-to-prev-randao-mix 2021-09-17 14:41:43 +06:00
Dmitrii Shmatko
7ff173bd0b Added new Merge tests 2021-09-14 11:51:37 +03:00
Danny Ryan
5348b9a3b9
randomize state can result in some exited vals for current epoch 2021-09-09 15:56:08 -06: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
Alex Stokes
064b489d18
Use spec function for total active balance 2021-09-07 12:23:57 -07:00
Alex Stokes
4168943ecf
Update tests/core/pyspec/eth2spec/test/helpers/random.py 2021-09-02 15:38:52 -06: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
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
Mikhail Kalinin
6ba1f22404 Set ExecutionPayload.random to the previous randao_mix 2021-09-01 18:42:58 +06:00
Hsiao-Wei Wang
da8d22c754
Update checks Checkpoint fields 2021-08-31 13:16:19 +08: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
Alex Stokes
74fcf67cf4
Fix a performance bug with the randomized block tests from #2560 2021-08-26 13:42:12 -07:00
Alex Stokes
1f34ef9b56
modularize the random deposit helpers 2021-08-26 10:50:50 -07:00
Alex Stokes
5b0d2627c3
apply pr feedback on randrange 2021-08-25 15:13:20 -07:00
Alex Stokes
377797fd0d
code layout change 2021-08-25 11:20:17 -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
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
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
cc04da8e79
add randomized block tests for altair 2021-08-23 12:30:05 -07:00